3 import java.io.FileOutputStream;
4 import java.io.PrintStream;
6 import java.io.BufferedReader;
7 import java.io.FileReader;
8 import java.io.FileInputStream;
9 import java.util.Hashtable;
10 import java.util.Iterator;
12 import java.util.Vector;
14 import IR.Tree.ParseNode;
15 import IR.Tree.BuildIR;
16 import IR.Tree.SemanticCheck;
17 import IR.Flat.BuildCodeMultiCore;
18 import IR.Flat.BuildFlat;
19 import IR.Flat.BuildCode;
20 import IR.Flat.Inliner;
21 import IR.ClassDescriptor;
23 import IR.TaskDescriptor;
25 import Analysis.Scheduling.MCImplSynthesis;
26 import Analysis.Scheduling.Schedule;
27 import Analysis.Scheduling.ScheduleAnalysis;
28 import Analysis.Scheduling.ScheduleSimulator;
29 import Analysis.TaskStateAnalysis.TaskAnalysis;
30 import Analysis.TaskStateAnalysis.TaskTagAnalysis;
31 import Analysis.TaskStateAnalysis.TaskGraph;
32 import Analysis.CallGraph.CallGraph;
33 import Analysis.TaskStateAnalysis.FEdge;
34 import Analysis.TaskStateAnalysis.FlagState;
35 import Analysis.TaskStateAnalysis.TagAnalysis;
36 import Analysis.TaskStateAnalysis.GarbageAnalysis;
37 import Analysis.TaskStateAnalysis.ExecutionGraph;
38 import Analysis.TaskStateAnalysis.SafetyAnalysis;
39 import Analysis.Locality.LocalityAnalysis;
40 import Analysis.Locality.GenerateConversions;
41 import Analysis.Prefetch.PrefetchAnalysis;
42 import Analysis.FlatIRGraph.FlatIRGraph;
43 import Analysis.OwnershipAnalysis.OwnershipAnalysis;
44 import Analysis.MLP.MLPAnalysis;
45 import Analysis.Disjoint.DisjointAnalysis;
46 import Analysis.OoOJava.OoOJavaAnalysis;
47 import Analysis.Loops.*;
48 import Analysis.Liveness;
49 import Analysis.ArrayReferencees;
50 import IR.MethodDescriptor;
51 import IR.Flat.FlatMethod;
53 import Util.GraphNode;
54 import Util.GraphNode.DFS;
55 import Util.GraphNode.SCC;
59 /** Main method for the compiler. */
61 public static void main(String args[]) throws Exception {
62 String ClassLibraryPrefix="./ClassLibrary/";
63 State state=new State();
64 Vector sourcefiles=new Vector();
65 state.classpath.add(".");
67 String outputdir = null;
68 boolean isDistributeInfo = false;
69 boolean isDisAll = false;
72 for(int i=0; i<args.length; i++) {
73 String option=args[i];
74 if (option.equals("-precise"))
75 IR.Flat.BuildCode.GENERATEPRECISEGC=true;
76 else if (option.equals("-prefetch"))
78 else if (option.equals("-dir"))
79 IR.Flat.BuildCode.PREFIX=args[++i]+"/";
80 else if (option.equals("-fastcheck"))
82 else if (option.equals("-selfloop"))
83 state.selfloops.add(args[++i]);
84 else if (option.equals("-outputdir"))
85 state.outputdir = args[++i];
86 else if (option.equals("-excprefetch"))
87 state.excprefetch.add(args[++i]);
88 else if (option.equals("-classlibrary"))
89 state.classpath.add(args[++i]);
90 else if (option.equals("-inlineatomic")) {
91 state.INLINEATOMIC=true;
92 state.inlineatomicdepth=Integer.parseInt(args[++i]);
93 } else if(option.equals("-numcore")) {
95 state.CORENUM = Integer.parseInt(args[i]);
96 } else if(option.equals("-numcore4gc")) {
98 state.CORENUM4GC = Integer.parseInt(args[i]);
99 } else if (option.equals("-mainclass"))
100 state.main=args[++i];
101 else if (option.equals("-trueprob")) {
102 state.TRUEPROB=Double.parseDouble(args[++i]);
103 } else if (option.equals("-printflat"))
104 State.PRINTFLAT=true;
105 else if (option.equals("-printscheduling"))
106 State.PRINTSCHEDULING=true;
107 else if (option.equals("-minimize"))
109 else if (option.equals("-printschedulesim"))
110 State.PRINTSCHEDULESIM=true;
111 else if (option.equals("-printcriticalpath"))
112 State.PRINTCRITICALPATH=true;
113 else if (option.equals("-struct"))
114 state.structfile=args[++i];
115 else if (option.equals("-conscheck"))
116 state.CONSCHECK=true;
117 else if (option.equals("-task"))
119 else if (option.equals("-abortreaders"))
120 state.ABORTREADERS=true;
121 else if (option.equals("-sandbox"))
123 else if (option.equals("-taskstate"))
124 state.TASKSTATE=true;
125 else if (option.equals("-tagstate"))
127 else if (option.equals("-stmarray"))
129 else if (option.equals("-eventmonitor"))
130 state.EVENTMONITOR=true;
131 else if (option.equals("-dualview"))
133 else if (option.equals("-hybrid"))
135 else if (option.equals("-flatirtasks")) {
136 state.FLATIRGRAPH=true;
137 state.FLATIRGRAPHTASKS=true;
138 } else if (option.equals("-flatirusermethods")) {
139 state.FLATIRGRAPH=true;
140 state.FLATIRGRAPHUSERMETHODS=true;
141 } else if (option.equals("-flatirlibmethods")) {
142 state.FLATIRGRAPH=true;
143 state.FLATIRGRAPHLIBMETHODS=true;
144 } else if (option.equals("-bamboocompiletime")) {
145 state.BAMBOOCOMPILETIME = true;
146 } else if (option.equals("-multicore"))
147 state.MULTICORE=true;
148 else if (option.equals("-multicoregc"))
149 state.MULTICOREGC=true;
150 else if (option.equals("-ownership"))
151 state.OWNERSHIP=true;
152 else if (option.equals("-ownallocdepth")) {
153 state.OWNERSHIPALLOCDEPTH=Integer.parseInt(args[++i]);
154 } else if (option.equals("-ownwritedots")) {
155 state.OWNERSHIPWRITEDOTS=true;
156 if (args[++i].equals("all")) {
157 state.OWNERSHIPWRITEALL=true;
159 } else if (option.equals("-ownaliasfile")) {
160 state.OWNERSHIPALIASFILE=args[++i];
161 } else if (option.equals("-ownaliasfiletab")) {
162 state.OWNERSHIPALIASFILE=args[++i];
163 state.OWNERSHIPALIASTAB=true;
164 } else if (option.equals("-owndebugcallee")) {
165 state.OWNERSHIPDEBUGCALLEE=args[++i];
166 } else if (option.equals("-owndebugcaller")) {
167 state.OWNERSHIPDEBUGCALLER=args[++i];
168 } else if (option.equals("-owndebugcallcount")) {
169 state.OWNERSHIPDEBUGCALLCOUNT=Integer.parseInt(args[++i]);
172 else if (option.equals("-disjoint"))
175 else if (option.equals("-disjoint-k")) {
176 state.DISJOINTALLOCDEPTH=Integer.parseInt(args[++i]);
178 } else if (option.equals("-disjoint-write-dots")) {
179 state.DISJOINTWRITEDOTS = true;
180 String arg = args[++i];
181 if( arg.equals("all") ) {
182 state.DISJOINTWRITEALL = true;
183 } else if( arg.equals("final") ) {
184 state.DISJOINTWRITEALL = false;
186 throw new Error("disjoint-write-dots requires argument <all/final>");
189 } else if (option.equals("-disjoint-write-initial-contexts")) {
190 state.DISJOINTWRITEINITCONTEXTS = true;
192 } else if (option.equals("-disjoint-write-ihms")) {
193 state.DISJOINTWRITEIHMS = true;
195 } else if (option.equals("-disjoint-alias-file")) {
196 state.DISJOINTALIASFILE = args[++i];
197 String arg = args[++i];
198 if( arg.equals("normal") ) {
199 state.DISJOINTALIASTAB = false;
200 } else if( arg.equals("tabbed") ) {
201 state.DISJOINTALIASTAB = true;
203 throw new Error("disjoint-alias-file requires arguments: <filename> <normal/tabbed>");
206 } else if (option.equals("-disjoint-debug-callsite")) {
207 state.DISJOINTDEBUGCALLEE=args[++i];
208 state.DISJOINTDEBUGCALLER=args[++i];
209 state.DISJOINTDEBUGCALLVISITTOSTART=Integer.parseInt(args[++i]);
210 state.DISJOINTDEBUGCALLNUMVISITS=Integer.parseInt(args[++i]);
211 String arg = args[++i];
212 if( arg.equals("true") ) {
213 state.DISJOINTDEBUGCALLSTOPAFTER = true;
214 } else if( arg.equals("false") ) {
215 state.DISJOINTDEBUGCALLSTOPAFTER = false;
217 throw new Error("disjoint-debug-callsite requires arguments:\n"+
218 " <callee symbol> <caller symbol> <# visit to start> <# visits to capture> <T/F stop after>");
221 } else if (option.equals("-disjoint-debug-snap-method")) {
222 state.DISJOINTSNAPSYMBOL=args[++i];
223 state.DISJOINTSNAPVISITTOSTART=Integer.parseInt(args[++i]);
224 state.DISJOINTSNAPNUMVISITS=Integer.parseInt(args[++i]);
225 String arg = args[++i];
226 if( arg.equals("true") ) {
227 state.DISJOINTSNAPSTOPAFTER = true;
228 } else if( arg.equals("false") ) {
229 state.DISJOINTSNAPSTOPAFTER = false;
231 throw new Error("disjoint-debug-snap-method requires arguments:\n"+
232 " <method symbol> <# visit to start> <# visits to snap> <T/F stop after>");
235 } else if( option.equals( "-disjoint-release-mode" ) ) {
236 state.DISJOINTRELEASEMODE = true;
238 } else if( option.equals( "-disjoint-dvisit-stack" ) ) {
239 state.DISJOINTDVISITSTACK = true;
240 state.DISJOINTDVISITPQUE = false;
241 state.DISJOINTDVISITSTACKEESONTOP = false;
243 } else if( option.equals( "-disjoint-dvisit-pqueue" ) ) {
244 state.DISJOINTDVISITPQUE = true;
245 state.DISJOINTDVISITSTACK = false;
246 state.DISJOINTDVISITSTACKEESONTOP = false;
248 } else if( option.equals( "-disjoint-dvisit-stack-callees-on-top" ) ) {
249 state.DISJOINTDVISITSTACKEESONTOP = true;
250 state.DISJOINTDVISITPQUE = false;
251 state.DISJOINTDVISITSTACK = false;
253 } else if( option.equals( "-disjoint-desire-determinism" ) ) {
254 state.DISJOINTDETERMINISM = true;
256 // when asking analysis for a deterministic result, force
257 // a stack-based visiting scheme, because the priority queue
258 // requires a non-deterministic topological sort
259 state.DISJOINTDVISITSTACKEESONTOP = true;
260 state.DISJOINTDVISITPQUE = false;
261 state.DISJOINTDVISITSTACK = false;
264 } else if( option.equals( "-disjoint-debug-scheduling" ) ) {
265 state.DISJOINTDEBUGSCHEDULING = true;
269 else if (option.equals("-optional"))
271 else if (option.equals("-optimize"))
273 else if (option.equals("-dcopts"))
275 else if (option.equals("-arraypad"))
277 else if (option.equals("-delaycomp"))
278 state.DELAYCOMP=true;
279 else if (option.equals("-raw"))
281 else if (option.equals("-scheduling"))
282 state.SCHEDULING=true;
283 else if (option.equals("-distributioninfo"))
284 isDistributeInfo=true;
285 else if (option.equals("-disall"))
287 else if (option.equals("-disstart"))
288 startnum = Integer.parseInt(args[++i]);
289 else if (option.equals("-useprofile")) {
290 state.USEPROFILE=true;
291 state.profilename = args[++i];
293 else if (option.equals("-thread"))
295 else if (option.equals("-dsm"))
297 else if (option.equals("-recoverystats"))
298 state.DSMRECOVERYSTATS=true;
299 else if (option.equals("-dsmtask"))
301 else if (option.equals("-singleTM"))
303 else if (option.equals("-readset"))
305 else if (option.equals("-webinterface"))
306 state.WEBINTERFACE=true;
307 else if (option.equals("-instructionfailures"))
308 state.INSTRUCTIONFAILURE=true;
309 else if (option.equals("-abcclose"))
310 state.ARRAYBOUNDARYCHECK=false;
312 else if (option.equals("-mlp")) {
314 state.OWNERSHIP = true;
315 state.MLP_NUMCORES = Integer.parseInt( args[++i] );
316 state.MLP_MAXSESEAGE = Integer.parseInt( args[++i] );
318 } else if (option.equals("-mlpdebug")) {
321 } else if (option.equals("-methodeffects")) {
322 state.METHODEFFECTS=true;
324 } else if (option.equals("-ooojava")) {
325 state.OOOJAVA = true;
326 state.DISJOINT = true;
328 }else if (option.equals("-help")) {
329 System.out.println("-classlibrary classlibrarydirectory -- directory where classlibrary is located");
330 System.out.println("-selfloop task -- this task doesn't self loop its parameters forever");
331 System.out.println("-dir outputdirectory -- output code in outputdirectory");
332 System.out.println("-struct structfile -- output structure declarations for repair tool");
333 System.out.println("-mainclass -- main function to call");
334 System.out.println("-dsm -- distributed shared memory support");
335 System.out.println("-singleTM -- single machine committing transactions");
336 System.out.println("-abortreaders -- abort readers");
337 System.out.println("-precise -- use precise garbage collection");
338 System.out.println("-conscheck -- turn on consistency checking");
339 System.out.println("-task -- compiler for tasks");
340 System.out.println("-fastcheck -- fastcheckpointing for Bristlecone");
341 System.out.println("-thread -- threads");
342 System.out.println("-trueprob <d> -- probability of true branch");
343 System.out.println("-printflat -- print out flat representation");
344 System.out.println("-instructionfailures -- insert code for instruction level failures");
345 System.out.println("-taskstate -- do task state analysis");
346 System.out.println("-flatirtasks -- create dot files for flat IR graphs of tasks");
347 System.out.println("-flatirusermethods -- create dot files for flat IR graphs of user methods");
348 System.out.println("-flatirlibmethods -- create dot files for flat IR graphs of library class methods");
349 System.out.println(" note: -flatirusermethods or -flatirlibmethods currently generate all class method flat IR graphs");
350 System.out.println("-ownership -- do ownership analysis");
351 System.out.println("-ownallocdepth <d> -- set allocation depth for ownership analysis");
352 System.out.println("-ownwritedots <all/final> -- write ownership graphs; can be all results or just final results");
353 System.out.println("-ownaliasfile <filename> -- write a text file showing all detected aliases in program tasks");
354 System.out.println("-optimize -- enable optimizations");
355 System.out.println("-optional -- enable optional arguments");
356 System.out.println("-abcclose close the array boundary check");
357 System.out.println("-scheduling do task scheduling");
358 System.out.println("-mlp <num cores> <max sese age> build mlp code");
359 System.out.println("-mlpdebug if mlp, report progress and interim results");
360 System.out.println("-multicore generate multi-core version binary");
361 System.out.println("-numcore set the number of cores (should be used together with -multicore), defaultly set as 1");
362 System.out.println("-interrupt generate raw version binary with interruption (should be used togethere with -raw)");
363 System.out.println("-rawconfig config raw simulator as 4xn (should be used together with -raw)");
364 System.out.println("-rawpath print out execute path information for raw version (should be used together with -raw)");
365 System.out.println("-useprofile use profiling data for scheduling (should be used together with -raw)");
366 System.out.println("-threadsimulate generate multi-thread simulate version binary");
367 System.out.println("-rawuseio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version");
368 System.out.println("-printscheduling -- print out scheduling graphs");
369 System.out.println("-printschedulesim -- print out scheduling simulation result graphs");
370 System.out.println("-webinterface -- enable web interface");
371 System.out.println("-help -- print out help");
374 sourcefiles.add(args[i]);
378 //add default classpath
379 if (state.classpath.size()==1)
380 state.classpath.add(ClassLibraryPrefix);
382 BuildIR bir=new BuildIR(state);
383 TypeUtil tu=new TypeUtil(state, bir);
386 SemanticCheck sc=new SemanticCheck(state,tu);
388 for(int i=0;i<sourcefiles.size();i++)
389 loadClass(state, bir,(String)sourcefiles.get(i));
391 //Stuff the runtime wants to see
392 sc.getClass("String");
395 sc.getClass("Socket");
396 sc.getClass("ServerSocket");
397 sc.getClass("FileInputStream");
398 sc.getClass("FileOutputStream");
400 sc.getClass("TagDescriptor");
402 if (state.THREAD||state.DSM||state.SINGLETM) {
403 sc.getClass("Thread");
408 tu.createFullTable();
410 BuildFlat bf=new BuildFlat(state,tu);
412 SafetyAnalysis sa=null;
413 PrefetchAnalysis pa=null;
414 MLPAnalysis mlpa=null;
415 if (state.INLINEATOMIC) {
416 Iterator classit=state.getClassSymbolTable().getDescriptorsIterator();
417 while(classit.hasNext()) {
418 ClassDescriptor cn=(ClassDescriptor)classit.next();
419 Iterator methodit=cn.getMethods();
420 while(methodit.hasNext()) {
422 MethodDescriptor md=(MethodDescriptor)methodit.next();
423 FlatMethod fm=state.getMethodFlat(md);
424 Inliner.inlineAtomic(state, tu, fm, state.inlineatomicdepth);
430 if (state.OPTIMIZE) {
431 CallGraph callgraph=new CallGraph(state);
432 CopyPropagation cp=new CopyPropagation();
433 DeadCode dc=new DeadCode();
434 GlobalFieldType gft=new GlobalFieldType(callgraph, state, tu.getMain());
435 CSE cse=new CSE(gft, tu);
436 localCSE lcse=new localCSE(gft, tu);
437 LoopOptimize lo=new LoopOptimize(gft, tu);
438 Iterator classit=state.getClassSymbolTable().getDescriptorsIterator();
439 while(classit.hasNext()) {
440 ClassDescriptor cn=(ClassDescriptor)classit.next();
441 Iterator methodit=cn.getMethods();
442 while(methodit.hasNext()) {
443 /* Classify parameters */
444 MethodDescriptor md=(MethodDescriptor)methodit.next();
445 FlatMethod fm=state.getMethodFlat(md);
461 if (state.FLATIRGRAPH) {
462 FlatIRGraph firg = new FlatIRGraph(state,
463 state.FLATIRGRAPHTASKS,
464 state.FLATIRGRAPHUSERMETHODS,
465 state.FLATIRGRAPHLIBMETHODS);
468 if (state.OWNERSHIP && !state.MLP) {
469 CallGraph callGraph = new CallGraph(state);
470 Liveness liveness = new Liveness();
471 ArrayReferencees ar = new ArrayReferencees(state);
472 OwnershipAnalysis oa = new OwnershipAnalysis(state,
477 state.OWNERSHIPALLOCDEPTH,
478 state.OWNERSHIPWRITEDOTS,
479 state.OWNERSHIPWRITEALL,
480 state.OWNERSHIPALIASFILE,
481 state.METHODEFFECTS);
485 CallGraph callGraph = new CallGraph(state);
486 Liveness liveness = new Liveness();
487 ArrayReferencees ar = new ArrayReferencees(state);
488 OwnershipAnalysis oa = new OwnershipAnalysis(state,
493 state.OWNERSHIPALLOCDEPTH,
494 state.OWNERSHIPWRITEDOTS,
495 state.OWNERSHIPWRITEALL,
496 state.OWNERSHIPALIASFILE,
497 state.METHODEFFECTS);
498 mlpa = new MLPAnalysis(state,
504 if (state.DISJOINT && !state.OOOJAVA) {
505 CallGraph cg = new CallGraph(state);
506 Liveness l = new Liveness();
507 ArrayReferencees ar = new ArrayReferencees(state);
508 DisjointAnalysis da = new DisjointAnalysis(state, tu, cg, l, ar, null, null, null);
512 CallGraph cg = new CallGraph(state);
513 Liveness l = new Liveness();
514 ArrayReferencees ar = new ArrayReferencees(state);
515 OoOJavaAnalysis oa = new OoOJavaAnalysis(state, tu, cg, l, ar);
519 if (state.TAGSTATE) {
520 CallGraph callgraph=new CallGraph(state);
521 TagAnalysis taganalysis=new TagAnalysis(state, callgraph);
522 TaskTagAnalysis tta=new TaskTagAnalysis(state, taganalysis, tu);
525 if (state.TASKSTATE) {
526 CallGraph callgraph=new CallGraph(state);
527 TagAnalysis taganalysis=new TagAnalysis(state, callgraph);
528 TaskAnalysis ta=new TaskAnalysis(state, taganalysis, tu);
530 TaskGraph tg=new TaskGraph(state, ta);
533 if (state.OPTIONAL) {
534 ExecutionGraph et=new ExecutionGraph(state, ta);
535 et.createExecutionGraph();
536 sa = new SafetyAnalysis(et.getExecutionGraph(), state, ta);
538 state.storeAnalysisResult(sa.getResult());
539 state.storeOptionalTaskDescriptors(sa.getOptionalTaskDescriptors());
542 if (state.WEBINTERFACE) {
543 GarbageAnalysis ga=new GarbageAnalysis(state, ta);
544 WebInterface wi=new WebInterface(state, ta, tg, ga, taganalysis);
545 JhttpServer serve=new JhttpServer(8000,wi);
549 if (state.SCHEDULING) {
550 // Use ownership analysis to get alias information
551 CallGraph callGraph = new CallGraph(state);
552 Liveness liveness = new Liveness();
553 ArrayReferencees ar = new ArrayReferencees(state);
554 OwnershipAnalysis oa = new OwnershipAnalysis(state,
559 state.OWNERSHIPALLOCDEPTH,
560 state.OWNERSHIPWRITEDOTS,
561 state.OWNERSHIPWRITEALL,
562 state.OWNERSHIPALIASFILE);
564 // synthesis a layout according to target multicore processor
565 MCImplSynthesis mcImplSynthesis = new MCImplSynthesis(state,
568 if(isDistributeInfo) {
569 mcImplSynthesis.distribution(isDisAll, startnum);
571 double timeStartAnalysis = (double) System.nanoTime();
572 mcImplSynthesis.setScheduleThreshold(20);
573 mcImplSynthesis.setProbThreshold(0);
574 mcImplSynthesis.setGenerateThreshold(30);
575 Vector<Schedule> scheduling = mcImplSynthesis.synthesis();
577 double timeEndAnalysis = (double) System.nanoTime();
578 if(state.BAMBOOCOMPILETIME) {
579 double dt = (timeEndAnalysis - timeStartAnalysis)/(Math.pow( 10.0, 9.0 ) );
580 System.err.println("The analysis took" + dt + "sec.");
584 // generate multicore codes
585 if(state.MULTICORE) {
586 BuildCodeMultiCore bcm=new BuildCodeMultiCore(state,
591 mcImplSynthesis.getCoreNum(),
594 bcm.setOwnershipAnalysis(oa);
602 if(!state.MULTICORE) {
603 if (state.DSM||state.SINGLETM) {
604 CallGraph callgraph=new CallGraph(state);
605 if (state.PREFETCH) {
606 //speed up prefetch generation using locality analysis results
607 LocalityAnalysis la=new LocalityAnalysis(state, callgraph, tu);
608 pa=new PrefetchAnalysis(state, callgraph, tu, la);
610 LocalityAnalysis la=new LocalityAnalysis(state, callgraph, tu);
611 GenerateConversions gc=new GenerateConversions(la, state);
612 BuildCode bc=new BuildCode(state, bf.getMap(), tu, la, pa, mlpa);
615 BuildCode bc=new BuildCode(state, bf.getMap(), tu, sa, pa, mlpa);
620 System.out.println("Lines="+state.lines);
624 public static void loadClass(State state, BuildIR bir, String sourcefile) {
626 ParseNode pn=readSourceFile(state, sourcefile);
627 bir.buildtree(pn, null);
628 } catch (Exception e) {
629 System.out.println("Error in sourcefile:"+sourcefile);
633 System.out.println("Error in sourcefile:"+sourcefile);
639 /** Reads in a source file and adds the parse tree to the state object. */
641 public static ParseNode readSourceFile(State state, String sourcefile) {
643 Reader fr= new BufferedReader(new FileReader(sourcefile));
644 Lex.Lexer l = new Lex.Lexer(fr);
645 java_cup.runtime.lr_parser g;
646 g = new Parse.Parser(l);
649 p=(ParseNode) g./*debug_*/parse().value;
650 } catch (Exception e) {
651 System.err.println("Error parsing file:"+sourcefile);
655 state.addParseNode(p);
656 if (l.numErrors()!=0) {
657 System.out.println("Error parsing "+sourcefile);
658 System.exit(l.numErrors());
660 state.lines+=l.line_num;
663 } catch (Exception e) {