Changeset 2410


Ignore:
Timestamp:
Sep 27, 2012, 11:38:00 AM (7 years ago)
Author:
ksherdy
Message:

Refactored Pablo compiler structure.

Location:
proto/pablo/src
Files:
7 added
2 deleted
4 edited
3 moved

Legend:

Unmodified
Added
Removed
  • proto/pablo/src/compiler/visitors/AdvanceCombiner.java

    r2399 r2410  
    11package compiler.visitors;
     2
     3
     4import compiler.ast.ASTHelpers;
    25
    36import tokens.*;
     
    9699        }
    97100        private boolean isAdvance(ASTNode node) {
    98                 return Builtins.isAdvance(node);
     101                return ASTHelpers.isAdvance(node);
    99102        }
    100103       
  • proto/pablo/src/compiler/visitors/AdvanceNCounter.java

    r2403 r2410  
    11package compiler.visitors;
    22
    3 import java.util.*;
    4 import java.util.Map.Entry;
    5 
     3import compiler.ast.ASTHelpers;
    64import ast.*;
    75
     
    2725
    2826                public void visitLeave(FunctionInvocationNode node) {
    29                         if(Builtins.isAdvanceN(node)) {
     27                        if(ASTHelpers.isAdvanceN(node)) {
    3028                            this.advNCount += 1;
    3129                        }
  • proto/pablo/src/compiler/visitors/CarryCounter.java

    r2399 r2410  
    11package compiler.visitors;
    22
    3 import java.util.*;
    4 import java.util.Map.Entry;
    5 
    63import ast.*;
     4import compiler.ast.*;
    75
    86public class CarryCounter {
     
    2927                public void visitLeave(FunctionInvocationNode node) {
    3028
    31                         if(Builtins.isBuiltInCall(node)) {
     29                        if(ASTHelpers.isBuiltInCall(node)) {
    3230                            carryCount += 1;
    3331                        }
  • proto/pablo/src/compiler/visitors/StreamFunctionVisitor.java

    r2399 r2410  
    66
    77import java.util.*;
     8
     9import compiler.ast.ASTHelpers;
    810
    911//class StreamFunctionVisitor(ast.NodeVisitor):
  • proto/pablo/src/grammar/PabloAbstractSyntaxTree.java

    r2404 r2410  
    33// See applications.SampleApplication.java.
    44//
    5 package test;
     5package grammar;
    66
    77import java.io.BufferedReader;
     
    3333 **/
    3434
    35 public class TestAbstractSyntaxTree extends SampleApplication {
     35public class PabloAbstractSyntaxTree extends SampleApplication {
    3636        /** Prints abstract syntax tree of a Sample file.
    3737         *  Prints errors if syntax incorrect.
     
    4040         */
    4141        public static void main(String[] args) throws FileNotFoundException {
    42                 TestApplication.checkArguments(args, "SampleAbstractSyntaxTree");
     42                PabloApplication.checkArguments(args, "SampleAbstractSyntaxTree");
    4343               
    4444                ASTPrinter.setPrintLevel(ASTPrinter.Level.FULL);
  • proto/pablo/src/grammar/PabloApplication.java

    r2404 r2410  
    33// See applications.SampleApplication.java.
    44//
    5 package test;
     5package grammar;
    66
    77import java.io.File;
    88
    9 public class TestApplication {
     9public class PabloApplication {
    1010
    1111        private static final int EXIT_CODE_FOR_ERROR = 1;
     
    1313        protected static String inputDirectory = null;
    1414       
    15         public TestApplication() {
     15        public PabloApplication() {
    1616                super();
    1717        }
Note: See TracChangeset for help on using the changeset viewer.