Changeset 3846 for devel-tools


Ignore:
Timestamp:
Jul 17, 2008, 3:48:31 PM (12 years ago)
Author:
yura
Message:
Location:
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/Searcher.java

    r3570 r3846  
    101101    }
    102102
     103    public void visit (AstComma astComma) {
     104        check(astComma);
     105    }
     106
    103107    public void visit (AstCut astCut) {
    104108        check(astCut);
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/SentenceVisitor.java

    r3566 r3846  
    33public interface SentenceVisitor {
    44    void visit (AstAlt astAlt);
     5
     6    void visit (AstComma astComma);
    57
    68    void visit (AstCut astCut);
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/SentenceVisitorWithEnv.java

    r3566 r3846  
    33public interface SentenceVisitorWithEnv<E> {
    44    void visit (AstAlt astAlt, E e);
     5
     6    void visit (AstComma astComma, E e);
    57
    68    void visit (AstCut astCut, E e);
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/compiler/ExprChecker.java

    r3787 r3846  
    44import org.refal.rfpdt.ast.AstCall;
    55import org.refal.rfpdt.ast.AstCharSymbol;
     6import org.refal.rfpdt.ast.AstComma;
    67import org.refal.rfpdt.ast.AstConstBinding;
    78import org.refal.rfpdt.ast.AstCut;
     
    227228    }
    228229
     230    public void visit (AstComma astComma) {}
     231
    229232    public void visit (AstCut astCut) {}
    230233
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/compiler/FenceAndCutChecker.java

    r3566 r3846  
    55
    66import org.refal.rfpdt.ast.AstAlt;
     7import org.refal.rfpdt.ast.AstComma;
    78import org.refal.rfpdt.ast.AstConstBinding;
    89import org.refal.rfpdt.ast.AstCut;
     
    7980    }
    8081
     82    public void visit (AstComma astComma, Stack<AstFence> e) {}
     83
    8184    public void visit (AstCut astCut, Stack<AstFence> e) {
    8285        if (e.empty())
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/compiler/FormatChecker.java

    r3619 r3846  
    44import org.refal.rfpdt.ast.AstCall;
    55import org.refal.rfpdt.ast.AstCharSymbol;
     6import org.refal.rfpdt.ast.AstComma;
    67import org.refal.rfpdt.ast.AstConstBinding;
    78import org.refal.rfpdt.ast.AstCut;
     
    138139    }
    139140
     141    public void visit (AstComma astComma) {
     142        throw new UnsupportedOperationException();
     143    }
     144
    140145    public void visit (AstCut astCut) {
    141146        throw new UnsupportedOperationException();
     
    194199        e.reset();
    195200    }
     201
     202    public void visit (AstComma astComma, RefAstExpr e) {}
    196203
    197204    public void visit (AstCut astCut, RefAstExpr e) {}
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/compiler/NameChecker.java

    r3619 r3846  
    88import org.refal.rfpdt.ast.AstCall;
    99import org.refal.rfpdt.ast.AstCharSymbol;
     10import org.refal.rfpdt.ast.AstComma;
    1011import org.refal.rfpdt.ast.AstConstBinding;
    1112import org.refal.rfpdt.ast.AstCut;
     
    271272    }
    272273
     274    public void visit (AstComma astComma) {}
     275
    273276    public void visit (AstCut astCut) {}
    274277
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/compiler/RefalASGenerator.java

    r3793 r3846  
    88import org.refal.rfpdt.ast.AstCall;
    99import org.refal.rfpdt.ast.AstCharSymbol;
     10import org.refal.rfpdt.ast.AstComma;
    1011import org.refal.rfpdt.ast.AstConstBinding;
    1112import org.refal.rfpdt.ast.AstCut;
     
    203204
    204205    public void visit (AstAlt astAlt, Expr.Concatenator e) {
    205         //addLineNumber(astAlt, e);
    206206        Expr.Concatenator items = Expr.getConcatenator();
    207207        items.toRight(astAlt.failMode.select(ALT_Q, ALT));
     
    215215    }
    216216
     217    public void visit (AstComma astComma, Expr.Concatenator e) {
     218        addLineNumber(astComma, e);
     219    }
     220
    217221    public void visit (AstCut astCut, Expr.Concatenator e) {
    218         addLineNumber(astCut, e);
    219222        e.toRight((Comparable<?>) Expr.create(CUT));
    220223    }
    221224
    222225    public void visit (AstCutAll astCutAll, Expr.Concatenator e) {
    223         addLineNumber(astCutAll, e);
    224226        e.toRight((Comparable<?>) Expr.create(CUTALL));
    225227    }
    226228
    227229    public void visit (AstError astError, Expr.Concatenator e) {
    228         addLineNumber(astError, e);
    229230        Expr.Concatenator error = Expr.getConcatenator();
    230231        error.toRight(BRANCH);
     
    234235
    235236    public void visit (AstFail astFail, Expr.Concatenator e) {
    236         addLineNumber(astFail, e);
    237237        e.toRight((Comparable<?>) Expr.create(FAIL));
    238238    }
    239239
    240240    public void visit (AstFence astFence, Expr.Concatenator e) {
    241         addLineNumber(astFence, e);
    242241        e.toRight((Comparable<?>) Expr.create(FENCE));
    243242    }
    244243
    245244    public void visit (AstFormat astFormat, Expr.Concatenator e) {
    246         //addLineNumber(astFormat, e);
    247245        Expr.Concatenator format = Expr.getConcatenator();
    248246        format.toRight(FORMAT);
     
    252250
    253251    public void visit (AstIter astIter, Expr.Concatenator e) {
    254         //addLineNumber(astIter, e);
    255252        Expr.Concatenator iter = Expr.getConcatenator();
    256253        iter.toRight(ITER);
     
    267264
    268265    public void visit (AstNot astNot, Expr.Concatenator e) {
    269         addLineNumber(astNot, e);
    270266        Expr.Concatenator source = Expr.getConcatenator();
    271267        source.toRight(BRANCH);
     
    275271
    276272    public void visit (AstPattern astPattern, Expr.Concatenator e) {
    277         //addLineNumber(astPattern, e);
    278273        Expr.Concatenator items = Expr.getConcatenator();
    279274        items.toRight(astPattern.dir.select(LEFT, RIGHT));
     
    283278
    284279    public void visit (AstResult astResult, Expr.Concatenator e) {
    285         addLineNumber(astResult, e);
    286280        Expr.Concatenator items = Expr.getConcatenator();
    287281        items.toRight(RESULT);
     
    291285
    292286    public void visit (AstSentence astSentence, Expr.Concatenator e) {
    293         //addLineNumber(astSentence, e);
    294287        for (AstStatement statement : astSentence.statementList)
    295288            statement.accept(this, e);
     
    297290
    298291    public void visit (AstTrap astTrap, Expr.Concatenator e) {
    299         addLineNumber(astTrap, e);
    300292        Expr.Concatenator items = Expr.getConcatenator();
    301293        items.toRight(TRY);
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/compiler/VariableScopeChecker.java

    r3619 r3846  
    88import org.refal.rfpdt.ast.AstCall;
    99import org.refal.rfpdt.ast.AstCharSymbol;
     10import org.refal.rfpdt.ast.AstComma;
    1011import org.refal.rfpdt.ast.AstConstBinding;
    1112import org.refal.rfpdt.ast.AstCut;
     
    199200    }
    200201
     202    public void visit (AstComma astComma, LexicalEnvironment e) {}
     203
    201204    public void visit (AstCut astCut, LexicalEnvironment e) {}
    202205
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/parser/RfpParser.java

    r3619 r3846  
    7575import org.refal.rfpdt.ast.AstCall;
    7676import org.refal.rfpdt.ast.AstCharSymbol;
     77import org.refal.rfpdt.ast.AstComma;
    7778import org.refal.rfpdt.ast.AstConstBinding;
    7879import org.refal.rfpdt.ast.AstCut;
     
    611612        sync(s_rest, ftk);
    612613        if (tkIs(COMMA)) {
     614            statements.add(new AstComma(tkPos));
    613615            nextTk();
    614616            path(ftk, statements);
     
    647649            statements.add(new AstTrap(SrcPosition.fromToInclusive(start, astSentence.pos), astPath, astSentence));
    648650        } else {
     651            statements.add(new AstComma(tkPos));
    649652            statements.add(new AstResult(tkPos, new AstExpr(tkPos)));
    650653            return true;
Note: See TracChangeset for help on using the changeset viewer.