Add Class object so that we can implement getClass() and can have class lock for...
[IRC.git] / Robust / src / Main / Main.java
index 0c6c2b7b0b77da0007567f8cc84e1db8c2f2f35d..d33533db08962315cba8604aeb807bbf5f1442da 100644 (file)
@@ -15,8 +15,10 @@ import IR.Tree.ParseNode;
 import IR.Tree.BuildIR;
 import IR.Tree.SemanticCheck;
 import IR.Flat.BuildCodeMultiCore;
+import IR.Flat.BuildCodeMGC;
 import IR.Flat.BuildFlat;
 import IR.Flat.BuildCode;
+import IR.Flat.Inliner;
 import IR.ClassDescriptor;
 import IR.State;
 import IR.TaskDescriptor;
@@ -40,6 +42,14 @@ import Analysis.Locality.GenerateConversions;
 import Analysis.Prefetch.PrefetchAnalysis;
 import Analysis.FlatIRGraph.FlatIRGraph;
 import Analysis.OwnershipAnalysis.OwnershipAnalysis;
+import Analysis.MLP.MLPAnalysis;
+import Analysis.Disjoint.DisjointAnalysis;
+import Analysis.OoOJava.OoOJavaAnalysis;
+import Analysis.Loops.*;
+import Analysis.Liveness;
+import Analysis.ArrayReferencees;
+import IR.MethodDescriptor;
+import IR.Flat.FlatMethod;
 import Interface.*;
 import Util.GraphNode;
 import Util.GraphNode.DFS;
@@ -57,6 +67,8 @@ public class Main {
 
     String outputdir = null;
     boolean isDistributeInfo = false;
+    boolean isDisAll = false;
+    int startnum = 0;
 
     for(int i=0; i<args.length; i++) {
       String option=args[i];
@@ -76,9 +88,15 @@ public class Main {
        state.excprefetch.add(args[++i]);
       else if (option.equals("-classlibrary"))
        state.classpath.add(args[++i]);
-      else if(option.equals("-numcore")) {
+      else if (option.equals("-inlineatomic")) {
+       state.INLINEATOMIC=true;
+       state.inlineatomicdepth=Integer.parseInt(args[++i]);
+      } else if(option.equals("-numcore")) {
        ++i;
        state.CORENUM = Integer.parseInt(args[i]);
+      } else if(option.equals("-numcore4gc")) {
+        ++i;
+        state.CORENUM4GC = Integer.parseInt(args[i]);
       } else if (option.equals("-mainclass"))
        state.main=args[++i];
       else if (option.equals("-trueprob")) {
@@ -87,6 +105,8 @@ public class Main {
        State.PRINTFLAT=true;
       else if (option.equals("-printscheduling"))
        State.PRINTSCHEDULING=true;
+      else if (option.equals("-minimize"))
+       state.MINIMIZE=true;
       else if (option.equals("-printschedulesim"))
        State.PRINTSCHEDULESIM=true;
       else if (option.equals("-printcriticalpath"))
@@ -99,10 +119,20 @@ public class Main {
        state.TASK=true;
       else if (option.equals("-abortreaders"))
        state.ABORTREADERS=true;
+      else if (option.equals("-sandbox"))
+       state.SANDBOX=true;
       else if (option.equals("-taskstate"))
        state.TASKSTATE=true;
       else if (option.equals("-tagstate"))
        state.TAGSTATE=true;
+      else if (option.equals("-stmarray"))
+       state.STMARRAY=true;
+      else if (option.equals("-eventmonitor"))
+       state.EVENTMONITOR=true;
+      else if (option.equals("-dualview"))
+       state.DUALVIEW=true;
+      else if (option.equals("-hybrid"))
+       state.HYBRID=true;
       else if (option.equals("-flatirtasks")) {
        state.FLATIRGRAPH=true;
        state.FLATIRGRAPHTASKS=true;
@@ -112,9 +142,15 @@ public class Main {
       } else if (option.equals("-flatirlibmethods")) {
        state.FLATIRGRAPH=true;
        state.FLATIRGRAPHLIBMETHODS=true;
+      } else if (option.equals("-bamboocompiletime")) {
+        state.BAMBOOCOMPILETIME = true;
       } else if (option.equals("-multicore"))
        state.MULTICORE=true;
-      else if (option.equals("-ownership"))
+      else if (option.equals("-multicoregc"))
+        state.MULTICOREGC=true;
+      else if (option.equals("-mgc")) {
+        state.MGC = true;
+      } else if (option.equals("-ownership"))
        state.OWNERSHIP=true;
       else if (option.equals("-ownallocdepth")) {
        state.OWNERSHIPALLOCDEPTH=Integer.parseInt(args[++i]);
@@ -123,33 +159,187 @@ public class Main {
        if (args[++i].equals("all")) {
          state.OWNERSHIPWRITEALL=true;
        }
-      } else if (option.equals("-ownaliasfile"))
+      } else if (option.equals("-ownaliasfile")) {
        state.OWNERSHIPALIASFILE=args[++i];
+      } else if (option.equals("-ownaliasfiletab")) {
+       state.OWNERSHIPALIASFILE=args[++i];
+        state.OWNERSHIPALIASTAB=true;      
+      } else if (option.equals("-owndebugcallee")) {
+       state.OWNERSHIPDEBUGCALLEE=args[++i];
+      } else if (option.equals("-owndebugcaller")) {
+       state.OWNERSHIPDEBUGCALLER=args[++i];
+      } else if (option.equals("-owndebugcallcount")) {
+       state.OWNERSHIPDEBUGCALLCOUNT=Integer.parseInt(args[++i]);
+      }
+
+      else if (option.equals("-disjoint"))
+       state.DISJOINT=true;
+
+      else if (option.equals("-disjoint-k")) {
+       state.DISJOINTALLOCDEPTH=Integer.parseInt(args[++i]);
+
+      } else if (option.equals("-disjoint-write-dots")) {
+       state.DISJOINTWRITEDOTS = true;
+        String arg = args[++i];
+       if( arg.equals("all") ) {
+         state.DISJOINTWRITEALL = true;
+       } else if( arg.equals("final") ) {
+          state.DISJOINTWRITEALL = false;
+        } else {
+          throw new Error("disjoint-write-dots requires argument <all/final>");
+        }
+
+      } else if (option.equals("-disjoint-write-initial-contexts")) {
+       state.DISJOINTWRITEINITCONTEXTS = true;
+
+      } else if (option.equals("-disjoint-write-ihms")) {
+       state.DISJOINTWRITEIHMS = true;
+
+      } else if (option.equals("-disjoint-alias-file")) {
+       state.DISJOINTALIASFILE = args[++i];
+        String arg = args[++i];
+       if( arg.equals("normal") ) {
+         state.DISJOINTALIASTAB = false;
+       } else if( arg.equals("tabbed") ) {
+          state.DISJOINTALIASTAB = true;
+        } else {
+          throw new Error("disjoint-alias-file requires arguments: <filename> <normal/tabbed>");
+        }
+
+      } else if (option.equals("-disjoint-debug-callsite")) {
+       state.DISJOINTDEBUGCALLEE=args[++i];
+       state.DISJOINTDEBUGCALLER=args[++i];
+       state.DISJOINTDEBUGCALLVISITTOSTART=Integer.parseInt(args[++i]);
+       state.DISJOINTDEBUGCALLNUMVISITS=Integer.parseInt(args[++i]);
+        String arg = args[++i];
+       if( arg.equals("true") ) {
+         state.DISJOINTDEBUGCALLSTOPAFTER = true;
+       } else if( arg.equals("false") ) {
+          state.DISJOINTDEBUGCALLSTOPAFTER = false;
+        } else {
+          throw new Error("disjoint-debug-callsite requires arguments:\n"+
+                          "  <callee symbol> <caller symbol> <# visit to start> <# visits to capture> <T/F stop after>");
+        }
+      
+      } else if (option.equals("-disjoint-debug-snap-method")) {
+       state.DISJOINTSNAPSYMBOL=args[++i];
+        state.DISJOINTSNAPVISITTOSTART=Integer.parseInt(args[++i]);
+       state.DISJOINTSNAPNUMVISITS=Integer.parseInt(args[++i]);
+        String arg = args[++i];
+       if( arg.equals("true") ) {
+         state.DISJOINTSNAPSTOPAFTER = true;
+       } else if( arg.equals("false") ) {
+          state.DISJOINTSNAPSTOPAFTER = false;
+        } else {
+          throw new Error("disjoint-debug-snap-method requires arguments:\n"+
+                          "  <method symbol> <# visit to start> <# visits to snap> <T/F stop after>");
+        }
+
+      } else if( option.equals( "-disjoint-release-mode" ) ) {
+        state.DISJOINTRELEASEMODE = true;        
+
+      } else if( option.equals( "-disjoint-dvisit-stack" ) ) {
+        state.DISJOINTDVISITSTACK         = true;      
+        state.DISJOINTDVISITPQUE          = false;
+        state.DISJOINTDVISITSTACKEESONTOP = false;
+
+      } else if( option.equals( "-disjoint-dvisit-pqueue" ) ) {
+        state.DISJOINTDVISITPQUE          = true;
+        state.DISJOINTDVISITSTACK         = false;
+        state.DISJOINTDVISITSTACKEESONTOP = false;
+
+      } else if( option.equals( "-disjoint-dvisit-stack-callees-on-top" ) ) {
+        state.DISJOINTDVISITSTACKEESONTOP = true;
+        state.DISJOINTDVISITPQUE          = false;
+        state.DISJOINTDVISITSTACK         = false;      
+
+      } else if( option.equals( "-disjoint-desire-determinism" ) ) {
+        state.DISJOINTDETERMINISM = true;
+
+        // when asking analysis for a deterministic result, force
+        // a stack-based visiting scheme, because the priority queue
+        // requires a non-deterministic topological sort
+        state.DISJOINTDVISITSTACKEESONTOP = true;
+        state.DISJOINTDVISITPQUE          = false;
+        state.DISJOINTDVISITSTACK         = false;
+
+
+      } else if( option.equals( "-disjoint-debug-scheduling" ) ) {
+        state.DISJOINTDEBUGSCHEDULING = true;
+      }
+      
+
       else if (option.equals("-optional"))
        state.OPTIONAL=true;
+      else if (option.equals("-optimize"))
+       state.OPTIMIZE=true;
+      else if (option.equals("-noloop"))
+       state.NOLOOP=true;
+      else if (option.equals("-dcopts"))
+       state.DCOPTS=true;
+      else if (option.equals("-arraypad"))
+       state.ARRAYPAD=true;
+      else if (option.equals("-delaycomp"))
+       state.DELAYCOMP=true;
       else if (option.equals("-raw"))
        state.RAW=true;
       else if (option.equals("-scheduling"))
        state.SCHEDULING=true;
       else if (option.equals("-distributioninfo"))
        isDistributeInfo=true;
-      else if (option.equals("-useprofile"))
+      else if (option.equals("-disall"))
+        isDisAll=true;
+      else if (option.equals("-disstart"))
+        startnum = Integer.parseInt(args[++i]);
+      else if (option.equals("-useprofile")) {
        state.USEPROFILE=true;
+    state.profilename = args[++i];
+      }
       else if (option.equals("-thread"))
        state.THREAD=true;
       else if (option.equals("-dsm"))
        state.DSM=true;
+      else if (option.equals("-recoverystats"))
+  state.DSMRECOVERYSTATS=true;
+      else if (option.equals("-dsmtask"))
+  state.DSMTASK=true;
       else if (option.equals("-singleTM"))
        state.SINGLETM=true;
+      else if (option.equals("-readset"))
+       state.READSET=true;
       else if (option.equals("-webinterface"))
        state.WEBINTERFACE=true;
       else if (option.equals("-instructionfailures"))
        state.INSTRUCTIONFAILURE=true;
       else if (option.equals("-abcclose"))
        state.ARRAYBOUNDARYCHECK=false;
-      else if (option.equals("-mlp"))
-       state.MLP=true;
-      else if (option.equals("-help")) {
+
+      else if (option.equals("-mlp")) {
+       state.MLP            = true;
+       state.OWNERSHIP      = true;
+       state.MLP_NUMCORES   = Integer.parseInt( args[++i] );
+       state.MLP_MAXSESEAGE = Integer.parseInt( args[++i] );
+
+      } else if (option.equals("-mlpdebug")) {
+       state.MLPDEBUG=true;
+
+      } else if (option.equals("-methodeffects")) {
+       state.METHODEFFECTS=true;
+       
+      } else if (option.equals("-coreprof")) {
+       state.COREPROF=true;
+
+      } else if (option.equals("-ooojava")) {
+       state.OOOJAVA  = true;
+       state.DISJOINT = true;
+       state.MLP_NUMCORES   = Integer.parseInt( args[++i] );
+       state.MLP_MAXSESEAGE = Integer.parseInt( args[++i] );
+
+      } else if (option.equals("-ooodebug") ){ 
+  state.OOODEBUG  = true;
+      } else if (option.equals("-rcr")){
+   state.RCR = true;
+      } else if (option.equals("-help")) {
        System.out.println("-classlibrary classlibrarydirectory -- directory where classlibrary is located");
        System.out.println("-selfloop task -- this task doesn't self loop its parameters forever");
        System.out.println("-dir outputdirectory -- output code in outputdirectory");
@@ -175,13 +365,15 @@ public class Main {
        System.out.println("-ownallocdepth <d> -- set allocation depth for ownership analysis");
        System.out.println("-ownwritedots <all/final> -- write ownership graphs; can be all results or just final results");
        System.out.println("-ownaliasfile <filename> -- write a text file showing all detected aliases in program tasks");
+       System.out.println("-optimize -- enable optimizations");
+       System.out.println("-noloop -- disable loop optimizations");
        System.out.println("-optional -- enable optional arguments");
        System.out.println("-abcclose close the array boundary check");
        System.out.println("-scheduling do task scheduling");
-       System.out.println("-mlp build mlp code");
+       System.out.println("-mlp <num cores> <max sese age> build mlp code");
+       System.out.println("-mlpdebug if mlp, report progress and interim results");
        System.out.println("-multicore generate multi-core version binary");
        System.out.println("-numcore set the number of cores (should be used together with -multicore), defaultly set as 1");
-       System.out.println("-raw generate raw version binary (should be used together with -multicore)");
        System.out.println("-interrupt generate raw version binary with interruption (should be used togethere with -raw)");
        System.out.println("-rawconfig config raw simulator as 4xn (should be used together with -raw)");
        System.out.println("-rawpath print out execute path information for raw version (should be used together with -raw)");
@@ -197,7 +389,7 @@ public class Main {
        sourcefiles.add(args[i]);
       }
     }
-
+    
     //add default classpath
     if (state.classpath.size()==1)
       state.classpath.add(ClassLibraryPrefix);
@@ -211,6 +403,7 @@ public class Main {
     for(int i=0;i<sourcefiles.size();i++)
       loadClass(state, bir,(String)sourcefiles.get(i));
 
+
     //Stuff the runtime wants to see
     sc.getClass("String");
     sc.getClass("Math");
@@ -222,10 +415,11 @@ public class Main {
     if (state.TASK) {
       sc.getClass("TagDescriptor");
     }
-    if (state.THREAD||state.DSM) {
-       sc.getClass("Thread");
+    if (state.THREAD||state.DSM||state.SINGLETM||state.MGC) {
+      sc.getClass("Thread");
     }
 
+
     sc.semanticCheck();
 
     tu.createFullTable();
@@ -234,6 +428,114 @@ public class Main {
     bf.buildFlat();
     SafetyAnalysis sa=null;
     PrefetchAnalysis pa=null;
+    MLPAnalysis mlpa=null;
+    OoOJavaAnalysis  oooa=null;
+    if (state.INLINEATOMIC) {
+      Iterator classit=state.getClassSymbolTable().getDescriptorsIterator();
+      while(classit.hasNext()) {
+        ClassDescriptor cn=(ClassDescriptor)classit.next();
+        Iterator methodit=cn.getMethods();
+        while(methodit.hasNext()) {
+         // do inlining
+          MethodDescriptor md=(MethodDescriptor)methodit.next();
+          FlatMethod fm=state.getMethodFlat(md);
+         Inliner.inlineAtomic(state, tu, fm, state.inlineatomicdepth);
+       }
+      }
+    }
+
+
+    if (state.OPTIMIZE) {
+      CallGraph callgraph=new CallGraph(state);
+      CopyPropagation cp=new CopyPropagation();
+      DeadCode dc=new DeadCode();
+      GlobalFieldType gft=new GlobalFieldType(callgraph, state, tu.getMain());
+      CSE cse=new CSE(gft, tu);
+      localCSE lcse=new localCSE(gft, tu);
+      LoopOptimize lo=null;
+      if (!state.NOLOOP)
+         lo=new LoopOptimize(gft, tu);
+      Iterator classit=state.getClassSymbolTable().getDescriptorsIterator();
+      while(classit.hasNext()) {
+        ClassDescriptor cn=(ClassDescriptor)classit.next();
+        Iterator methodit=cn.getMethods();
+        while(methodit.hasNext()) {
+          /* Classify parameters */
+          MethodDescriptor md=(MethodDescriptor)methodit.next();
+          FlatMethod fm=state.getMethodFlat(md);
+         cp.optimize(fm);
+         dc.optimize(fm);
+         if (!state.NOLOOP)
+             lo.optimize(fm);
+         cp.optimize(fm);
+         dc.optimize(fm);
+         lcse.doAnalysis(fm);
+         cse.doAnalysis(fm);
+         cp.optimize(fm);
+         dc.optimize(fm);
+         cp.optimize(fm);
+         dc.optimize(fm);
+        }
+      }
+    }
+
+    if (state.FLATIRGRAPH) {
+      FlatIRGraph firg = new FlatIRGraph(state,
+                                         state.FLATIRGRAPHTASKS,
+                                         state.FLATIRGRAPHUSERMETHODS,
+                                         state.FLATIRGRAPHLIBMETHODS);
+    }
+    
+    if (state.OWNERSHIP && !state.MLP) {
+      CallGraph callGraph = new CallGraph(state);
+      Liveness liveness = new Liveness();
+      ArrayReferencees ar = new ArrayReferencees(state);
+      OwnershipAnalysis oa = new OwnershipAnalysis(state,
+                                                   tu,
+                                                   callGraph,
+                                                  liveness,
+                                                   ar,
+                                                   state.OWNERSHIPALLOCDEPTH,
+                                                   state.OWNERSHIPWRITEDOTS,
+                                                   state.OWNERSHIPWRITEALL,
+                                                   state.OWNERSHIPALIASFILE,
+                                                   state.METHODEFFECTS);
+    }
+
+    if (state.MLP) {
+      CallGraph callGraph = new CallGraph(state);
+      Liveness liveness = new Liveness();
+      ArrayReferencees ar = new ArrayReferencees(state);
+      OwnershipAnalysis oa = new OwnershipAnalysis(state,
+                                                   tu,
+                                                   callGraph,
+                                                  liveness,
+                                                   ar,
+                                                  state.OWNERSHIPALLOCDEPTH,
+                                                   state.OWNERSHIPWRITEDOTS,
+                                                   state.OWNERSHIPWRITEALL,
+                                                   state.OWNERSHIPALIASFILE,
+                                                   state.METHODEFFECTS);
+      mlpa = new MLPAnalysis(state,
+                             tu,
+                             callGraph,
+                             oa);
+    }    
+
+    if (state.DISJOINT && !state.OOOJAVA) {
+      CallGraph        cg = new CallGraph(state);
+      Liveness         l  = new Liveness();
+      ArrayReferencees ar = new ArrayReferencees(state);
+      DisjointAnalysis da = new DisjointAnalysis(state, tu, cg, l, ar, null, null, null);
+    }
+
+    if (state.OOOJAVA) {
+      CallGraph        cg  = new CallGraph(state);
+      Liveness         l   = new Liveness();
+      ArrayReferencees ar  = new ArrayReferencees(state);
+      oooa  = new OoOJavaAnalysis(state, tu, cg, l, ar);
+    }
+
 
     if (state.TAGSTATE) {
       CallGraph callgraph=new CallGraph(state);
@@ -268,9 +570,13 @@ public class Main {
       if (state.SCHEDULING) {
        // Use ownership analysis to get alias information
        CallGraph callGraph = new CallGraph(state);
+       Liveness liveness = new Liveness();
+        ArrayReferencees ar = new ArrayReferencees(state);
        OwnershipAnalysis oa = null;/*new OwnershipAnalysis(state,
                                                     tu,
                                                     callGraph,
+                                                 liveness,
+                                                 ar,
                                                     state.OWNERSHIPALLOCDEPTH,
                                                     state.OWNERSHIPWRITEDOTS,
                                                     state.OWNERSHIPWRITEALL,
@@ -281,12 +587,20 @@ public class Main {
                                                              ta,
                                                              oa);
        if(isDistributeInfo) {
-           mcImplSynthesis.distribution();
+           mcImplSynthesis.distribution(isDisAll, startnum);
        } else {
+           double timeStartAnalysis = (double) System.nanoTime();
            mcImplSynthesis.setScheduleThreshold(20);
            mcImplSynthesis.setProbThreshold(0);
            mcImplSynthesis.setGenerateThreshold(30);
            Vector<Schedule> scheduling = mcImplSynthesis.synthesis();
+           
+           double timeEndAnalysis = (double) System.nanoTime();
+        if(state.BAMBOOCOMPILETIME) {
+          double dt = (timeEndAnalysis - timeStartAnalysis)/(Math.pow( 10.0, 9.0 ) );
+          System.err.println("The analysis took" + dt +  "sec.");
+          System.exit(0);
+        }
 
            // generate multicore codes
            if(state.MULTICORE) {
@@ -296,6 +610,7 @@ public class Main {
                                                              sa,
                                                              scheduling,
                                                              mcImplSynthesis.getCoreNum(),
+                                                  state.CORENUM4GC,
                                                              pa);
                bcm.setOwnershipAnalysis(oa);
                bcm.buildCode();
@@ -305,52 +620,57 @@ public class Main {
        }
       }
     }
-
+    
+    if (state.MGC) {
+      // generate multicore codes
+      if(state.MULTICORE) {
+        BuildCodeMGC bcmgc=new BuildCodeMGC(state,
+                                            bf.getMap(),
+                                            tu,
+                                            sa,
+                                            state.CORENUM,
+                                            state.CORENUM,
+                                            state.CORENUM4GC,
+                                            pa);
+        bcmgc.buildCode();
+      }
+    }
+  
     if(!state.MULTICORE) {
-      if (state.DSM) {
+      if (state.DSM||state.SINGLETM) {
        CallGraph callgraph=new CallGraph(state);
        if (state.PREFETCH) {
          //speed up prefetch generation using locality analysis results
          LocalityAnalysis la=new LocalityAnalysis(state, callgraph, tu);
          pa=new PrefetchAnalysis(state, callgraph, tu, la);
        }
-
        LocalityAnalysis la=new LocalityAnalysis(state, callgraph, tu);
        GenerateConversions gc=new GenerateConversions(la, state);
-       BuildCode bc=new BuildCode(state, bf.getMap(), tu, la, pa);
+       BuildCode bc=new BuildCode(state, bf.getMap(), tu, la, pa, mlpa,oooa);
        bc.buildCode();
       } else {
-       BuildCode bc=new BuildCode(state, bf.getMap(), tu, sa, pa);
+       BuildCode bc=new BuildCode(state, bf.getMap(), tu, sa, pa, mlpa,oooa);
        bc.buildCode();
       }
     }
 
-    if (state.FLATIRGRAPH) {
-      FlatIRGraph firg = new FlatIRGraph(state,
-                                         state.FLATIRGRAPHTASKS,
-                                         state.FLATIRGRAPHUSERMETHODS,
-                                         state.FLATIRGRAPHLIBMETHODS);
-    }
-
-    if (state.OWNERSHIP) {
-      CallGraph callGraph = new CallGraph(state);
-      OwnershipAnalysis oa = new OwnershipAnalysis(state,
-                                                   tu,
-                                                   callGraph,
-                                                   state.OWNERSHIPALLOCDEPTH,
-                                                   state.OWNERSHIPWRITEDOTS,
-                                                   state.OWNERSHIPWRITEALL,
-                                                   state.OWNERSHIPALIASFILE);
-    }
-
-
     System.out.println("Lines="+state.lines);
     System.exit(0);
   }
 
   public static void loadClass(State state, BuildIR bir, String sourcefile) {
-    ParseNode pn=readSourceFile(state, sourcefile);
-    bir.buildtree(pn, null);
+    try {
+      ParseNode pn=readSourceFile(state, sourcefile);
+      bir.buildtree(pn, null);
+    } catch (Exception e) {
+      System.out.println("Error in sourcefile:"+sourcefile);
+      e.printStackTrace();
+      System.exit(-1);
+    } catch (Error e) {
+      System.out.println("Error in sourcefile:"+sourcefile);
+      e.printStackTrace();
+      System.exit(-1);
+    }
   }
 
   /** Reads in a source file and adds the parse tree to the state object. */
@@ -363,7 +683,7 @@ public class Main {
       g = new Parse.Parser(l);
       ParseNode p=null;
       try {
-       p=(ParseNode) g./*debug_*/ parse().value;
+       p=(ParseNode) g./*debug_*/parse().value;
       } catch (Exception e) {
        System.err.println("Error parsing file:"+sourcefile);
        e.printStackTrace();