Changeset 3457 for devel-tools


Ignore:
Timestamp:
Feb 29, 2008, 7:41:54 PM (13 years ago)
Author:
yura
Message:
  • Woring Alpha version of debugger - lines are in AST.
Location:
devel-tools/trunk/eclipse/org.refal.plus.rfpdt/src/org/refal/plus/rfpdt/core/builder
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt/src/org/refal/plus/rfpdt/core/builder/RefalASGenerator.java

    r3454 r3457  
    11package org.refal.plus.rfpdt.core.builder;
     2
     3import java.math.BigInteger;
    24
    35import org.refal.plus.Expr;
     
    6971    private static final String FAIL = "FAIL";
    7072    private static final String ERROR = "ERROR";
    71     //private static final String LINENUMBER = "LINENUMBER";
     73    private static final String LINENUMBER = "LINENUMBER";
    7274
    7375    private static Expr makeName (String name) {
     
    7880        return new Expr(concat.yield());
    7981    }
    80    
     82
    8183    private static void addLineNumber (AstNode astNode, Expr.Concatenator e) {
    82     // Expr.Concatenator items = Expr.getConcatenator(2);
    83     // items.toRight(LINENUMBER);
    84     // items.toRight(BigInteger.valueOf(astNode.pos.line));
    85     // e.toRight((Comparable<?>) items.yield());
     84        Expr.Concatenator items = Expr.getConcatenator(2);
     85        items.toRight(LINENUMBER);
     86        items.toRight(BigInteger.valueOf(astNode.pos.line));
     87        e.toRight((Comparable<?>) items.yield());
    8688    }
    8789
     
    201203
    202204    public void visit (AstAlt astAlt, Expr.Concatenator e) {
    203         addLineNumber(astAlt, e);
     205        //addLineNumber(astAlt, e);
    204206        Expr.Concatenator items = Expr.getConcatenator();
    205207        items.toRight(astAlt.failMode.select(ALT_Q, ALT));
     
    242244
    243245    public void visit (AstFormat astFormat, Expr.Concatenator e) {
    244         addLineNumber(astFormat, e);
     246        //addLineNumber(astFormat, e);
    245247        Expr.Concatenator format = Expr.getConcatenator();
    246248        format.toRight(FORMAT);
     
    250252
    251253    public void visit (AstIter astIter, Expr.Concatenator e) {
    252         addLineNumber(astIter, e);
     254        //addLineNumber(astIter, e);
    253255        Expr.Concatenator iter = Expr.getConcatenator();
    254256        iter.toRight(ITER);
     
    273275
    274276    public void visit (AstPattern astPattern, Expr.Concatenator e) {
    275         addLineNumber(astPattern, e);
     277        //addLineNumber(astPattern, e);
    276278        Expr.Concatenator items = Expr.getConcatenator();
    277279        items.toRight(astPattern.dir.select(LEFT, RIGHT));
     
    289291
    290292    public void visit (AstSentence astSentence, Expr.Concatenator e) {
    291         addLineNumber(astSentence, e);
     293        //addLineNumber(astSentence, e);
    292294        for (AstStatement statement : astSentence.statementList)
    293295            statement.accept(this, e);
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt/src/org/refal/plus/rfpdt/core/builder/RfpBuilder.java

    r3453 r3457  
    264264        try {
    265265            Expr ast = RefalASGenerator.generateAS(astImplem);
    266             Expr list = CallListGenerator.generateAS(astImplem);
    267266            Result res = new Result();
    268             org.refal.plus.compiler.rfpc.CompileASToJBC2(ast, list, res);
     267            org.refal.plus.compiler.rfpc.CompileASToJBC(ast, res);
    269268            for (Comparable<?> p : res.getExpr()) {
    270269                Expr e = (Expr) p;
Note: See TracChangeset for help on using the changeset viewer.