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.RBlockRelationAnalysis;
46 import Analysis.Disjoint.DisjointAnalysis;
47 import Analysis.OoOJava.OoOJavaAnalysis;
48 import Analysis.Loops.*;
49 import Analysis.Liveness;
50 import Analysis.ArrayReferencees;
51 import IR.MethodDescriptor;
52 import IR.Flat.FlatMethod;
54 import Util.GraphNode;
55 import Util.GraphNode.DFS;
56 import Util.GraphNode.SCC;
60 /** Main method for the compiler. */
62 public static void main(String args[]) throws Exception {
63 String ClassLibraryPrefix="./ClassLibrary/";
64 State state=new State();
65 Vector sourcefiles=new Vector();
66 state.classpath.add(".");
68 String outputdir = null;
69 boolean isDistributeInfo = false;
70 boolean isDisAll = false;
73 for(int i=0; i<args.length; i++) {
74 String option=args[i];
75 if (option.equals("-precise"))
76 IR.Flat.BuildCode.GENERATEPRECISEGC=true;
77 else if (option.equals("-prefetch"))
79 else if (option.equals("-dir"))
80 IR.Flat.BuildCode.PREFIX=args[++i]+"/";
81 else if (option.equals("-fastcheck"))
83 else if (option.equals("-selfloop"))
84 state.selfloops.add(args[++i]);
85 else if (option.equals("-outputdir"))
86 state.outputdir = args[++i];
87 else if (option.equals("-excprefetch"))
88 state.excprefetch.add(args[++i]);
89 else if (option.equals("-classlibrary"))
90 state.classpath.add(args[++i]);
91 else if (option.equals("-inlineatomic")) {
92 state.INLINEATOMIC=true;
93 state.inlineatomicdepth=Integer.parseInt(args[++i]);
94 } else if(option.equals("-numcore")) {
96 state.CORENUM = Integer.parseInt(args[i]);
97 } else if(option.equals("-numcore4gc")) {
99 state.CORENUM4GC = Integer.parseInt(args[i]);
100 } else if (option.equals("-mainclass"))
101 state.main=args[++i];
102 else if (option.equals("-trueprob")) {
103 state.TRUEPROB=Double.parseDouble(args[++i]);
104 } else if (option.equals("-printflat"))
105 State.PRINTFLAT=true;
106 else if (option.equals("-printscheduling"))
107 State.PRINTSCHEDULING=true;
108 else if (option.equals("-minimize"))
110 else if (option.equals("-printschedulesim"))
111 State.PRINTSCHEDULESIM=true;
112 else if (option.equals("-printcriticalpath"))
113 State.PRINTCRITICALPATH=true;
114 else if (option.equals("-struct"))
115 state.structfile=args[++i];
116 else if (option.equals("-conscheck"))
117 state.CONSCHECK=true;
118 else if (option.equals("-task"))
120 else if (option.equals("-abortreaders"))
121 state.ABORTREADERS=true;
122 else if (option.equals("-sandbox"))
124 else if (option.equals("-taskstate"))
125 state.TASKSTATE=true;
126 else if (option.equals("-tagstate"))
128 else if (option.equals("-stmarray"))
130 else if (option.equals("-eventmonitor"))
131 state.EVENTMONITOR=true;
132 else if (option.equals("-dualview"))
134 else if (option.equals("-hybrid"))
136 else if (option.equals("-flatirtasks")) {
137 state.FLATIRGRAPH=true;
138 state.FLATIRGRAPHTASKS=true;
139 } else if (option.equals("-flatirusermethods")) {
140 state.FLATIRGRAPH=true;
141 state.FLATIRGRAPHUSERMETHODS=true;
142 } else if (option.equals("-flatirlibmethods")) {
143 state.FLATIRGRAPH=true;
144 state.FLATIRGRAPHLIBMETHODS=true;
145 } else if (option.equals("-bamboocompiletime")) {
146 state.BAMBOOCOMPILETIME = true;
147 } else if (option.equals("-multicore"))
148 state.MULTICORE=true;
149 else if (option.equals("-multicoregc"))
150 state.MULTICOREGC=true;
151 else if (option.equals("-ownership"))
152 state.OWNERSHIP=true;
153 else if (option.equals("-ownallocdepth")) {
154 state.OWNERSHIPALLOCDEPTH=Integer.parseInt(args[++i]);
155 } else if (option.equals("-ownwritedots")) {
156 state.OWNERSHIPWRITEDOTS=true;
157 if (args[++i].equals("all")) {
158 state.OWNERSHIPWRITEALL=true;
160 } else if (option.equals("-ownaliasfile")) {
161 state.OWNERSHIPALIASFILE=args[++i];
162 } else if (option.equals("-ownaliasfiletab")) {
163 state.OWNERSHIPALIASFILE=args[++i];
164 state.OWNERSHIPALIASTAB=true;
165 } else if (option.equals("-owndebugcallee")) {
166 state.OWNERSHIPDEBUGCALLEE=args[++i];
167 } else if (option.equals("-owndebugcaller")) {
168 state.OWNERSHIPDEBUGCALLER=args[++i];
169 } else if (option.equals("-owndebugcallcount")) {
170 state.OWNERSHIPDEBUGCALLCOUNT=Integer.parseInt(args[++i]);
173 else if (option.equals("-disjoint"))
176 else if (option.equals("-disjoint-k")) {
177 state.DISJOINTALLOCDEPTH=Integer.parseInt(args[++i]);
179 } else if (option.equals("-disjoint-write-dots")) {
180 state.DISJOINTWRITEDOTS = true;
181 String arg = args[++i];
182 if( arg.equals("all") ) {
183 state.DISJOINTWRITEALL = true;
184 } else if( arg.equals("final") ) {
185 state.DISJOINTWRITEALL = false;
187 throw new Error("disjoint-write-dots requires argument <all/final>");
190 } else if (option.equals("-disjoint-write-initial-contexts")) {
191 state.DISJOINTWRITEINITCONTEXTS = true;
193 } else if (option.equals("-disjoint-write-ihms")) {
194 state.DISJOINTWRITEIHMS = true;
196 } else if (option.equals("-disjoint-alias-file")) {
197 state.DISJOINTALIASFILE = args[++i];
198 String arg = args[++i];
199 if( arg.equals("normal") ) {
200 state.DISJOINTALIASTAB = false;
201 } else if( arg.equals("tabbed") ) {
202 state.DISJOINTALIASTAB = true;
204 throw new Error("disjoint-alias-file requires arguments: <filename> <normal/tabbed>");
207 } else if (option.equals("-disjoint-debug-callsite")) {
208 state.DISJOINTDEBUGCALLEE=args[++i];
209 state.DISJOINTDEBUGCALLER=args[++i];
210 state.DISJOINTDEBUGCALLVISITTOSTART=Integer.parseInt(args[++i]);
211 state.DISJOINTDEBUGCALLNUMVISITS=Integer.parseInt(args[++i]);
212 String arg = args[++i];
213 if( arg.equals("true") ) {
214 state.DISJOINTDEBUGCALLSTOPAFTER = true;
215 } else if( arg.equals("false") ) {
216 state.DISJOINTDEBUGCALLSTOPAFTER = false;
218 throw new Error("disjoint-debug-callsite requires arguments:\n"+
219 " <callee symbol> <caller symbol> <# visit to start> <# visits to capture> <T/F stop after>");
222 } else if (option.equals("-disjoint-debug-snap-method")) {
223 state.DISJOINTSNAPSYMBOL=args[++i];
224 state.DISJOINTSNAPVISITTOSTART=Integer.parseInt(args[++i]);
225 state.DISJOINTSNAPNUMVISITS=Integer.parseInt(args[++i]);
226 String arg = args[++i];
227 if( arg.equals("true") ) {
228 state.DISJOINTSNAPSTOPAFTER = true;
229 } else if( arg.equals("false") ) {
230 state.DISJOINTSNAPSTOPAFTER = false;
232 throw new Error("disjoint-debug-snap-method requires arguments:\n"+
233 " <method symbol> <# visit to start> <# visits to snap> <T/F stop after>");
236 } else if( option.equals( "-disjoint-release-mode" ) ) {
237 state.DISJOINTRELEASEMODE = true;
239 } else if( option.equals( "-disjoint-dvisit-stack" ) ) {
240 state.DISJOINTDVISITSTACK = true;
241 state.DISJOINTDVISITPQUE = false;
242 state.DISJOINTDVISITSTACKEESONTOP = false;
244 } else if( option.equals( "-disjoint-dvisit-pqueue" ) ) {
245 state.DISJOINTDVISITPQUE = true;
246 state.DISJOINTDVISITSTACK = false;
247 state.DISJOINTDVISITSTACKEESONTOP = false;
249 } else if( option.equals( "-disjoint-dvisit-stack-callees-on-top" ) ) {
250 state.DISJOINTDVISITSTACKEESONTOP = true;
251 state.DISJOINTDVISITPQUE = false;
252 state.DISJOINTDVISITSTACK = false;
254 } else if( option.equals( "-disjoint-desire-determinism" ) ) {
255 state.DISJOINTDETERMINISM = true;
257 // when asking analysis for a deterministic result, force
258 // a stack-based visiting scheme, because the priority queue
259 // requires a non-deterministic topological sort
260 state.DISJOINTDVISITSTACKEESONTOP = true;
261 state.DISJOINTDVISITPQUE = false;
262 state.DISJOINTDVISITSTACK = false;
265 } else if( option.equals( "-disjoint-debug-scheduling" ) ) {
266 state.DISJOINTDEBUGSCHEDULING = true;
270 else if (option.equals("-optional"))
272 else if (option.equals("-optimize"))
274 else if (option.equals("-dcopts"))
276 else if (option.equals("-arraypad"))
278 else if (option.equals("-delaycomp"))
279 state.DELAYCOMP=true;
280 else if (option.equals("-raw"))
282 else if (option.equals("-scheduling"))
283 state.SCHEDULING=true;
284 else if (option.equals("-distributioninfo"))
285 isDistributeInfo=true;
286 else if (option.equals("-disall"))
288 else if (option.equals("-disstart"))
289 startnum = Integer.parseInt(args[++i]);
290 else if (option.equals("-useprofile")) {
291 state.USEPROFILE=true;
292 state.profilename = args[++i];
294 else if (option.equals("-thread"))
296 else if (option.equals("-dsm"))
298 else if (option.equals("-recoverystats"))
299 state.DSMRECOVERYSTATS=true;
300 else if (option.equals("-dsmtask"))
302 else if (option.equals("-singleTM"))
304 else if (option.equals("-readset"))
306 else if (option.equals("-webinterface"))
307 state.WEBINTERFACE=true;
308 else if (option.equals("-instructionfailures"))
309 state.INSTRUCTIONFAILURE=true;
310 else if (option.equals("-abcclose"))
311 state.ARRAYBOUNDARYCHECK=false;
313 else if (option.equals("-mlp")) {
315 state.OWNERSHIP = true;
316 state.MLP_NUMCORES = Integer.parseInt( args[++i] );
317 state.MLP_MAXSESEAGE = Integer.parseInt( args[++i] );
319 } else if (option.equals("-mlpdebug")) {
322 } else if (option.equals("-methodeffects")) {
323 state.METHODEFFECTS=true;
325 } else if (option.equals("-ooojava")) {
326 state.OOOJAVA = true;
327 state.DISJOINT = true;
329 }else if (option.equals("-help")) {
330 System.out.println("-classlibrary classlibrarydirectory -- directory where classlibrary is located");
331 System.out.println("-selfloop task -- this task doesn't self loop its parameters forever");
332 System.out.println("-dir outputdirectory -- output code in outputdirectory");
333 System.out.println("-struct structfile -- output structure declarations for repair tool");
334 System.out.println("-mainclass -- main function to call");
335 System.out.println("-dsm -- distributed shared memory support");
336 System.out.println("-singleTM -- single machine committing transactions");
337 System.out.println("-abortreaders -- abort readers");
338 System.out.println("-precise -- use precise garbage collection");
339 System.out.println("-conscheck -- turn on consistency checking");
340 System.out.println("-task -- compiler for tasks");
341 System.out.println("-fastcheck -- fastcheckpointing for Bristlecone");
342 System.out.println("-thread -- threads");
343 System.out.println("-trueprob <d> -- probability of true branch");
344 System.out.println("-printflat -- print out flat representation");
345 System.out.println("-instructionfailures -- insert code for instruction level failures");
346 System.out.println("-taskstate -- do task state analysis");
347 System.out.println("-flatirtasks -- create dot files for flat IR graphs of tasks");
348 System.out.println("-flatirusermethods -- create dot files for flat IR graphs of user methods");
349 System.out.println("-flatirlibmethods -- create dot files for flat IR graphs of library class methods");
350 System.out.println(" note: -flatirusermethods or -flatirlibmethods currently generate all class method flat IR graphs");
351 System.out.println("-ownership -- do ownership analysis");
352 System.out.println("-ownallocdepth <d> -- set allocation depth for ownership analysis");
353 System.out.println("-ownwritedots <all/final> -- write ownership graphs; can be all results or just final results");
354 System.out.println("-ownaliasfile <filename> -- write a text file showing all detected aliases in program tasks");
355 System.out.println("-optimize -- enable optimizations");
356 System.out.println("-optional -- enable optional arguments");
357 System.out.println("-abcclose close the array boundary check");
358 System.out.println("-scheduling do task scheduling");
359 System.out.println("-mlp <num cores> <max sese age> build mlp code");
360 System.out.println("-mlpdebug if mlp, report progress and interim results");
361 System.out.println("-multicore generate multi-core version binary");
362 System.out.println("-numcore set the number of cores (should be used together with -multicore), defaultly set as 1");
363 System.out.println("-interrupt generate raw version binary with interruption (should be used togethere with -raw)");
364 System.out.println("-rawconfig config raw simulator as 4xn (should be used together with -raw)");
365 System.out.println("-rawpath print out execute path information for raw version (should be used together with -raw)");
366 System.out.println("-useprofile use profiling data for scheduling (should be used together with -raw)");
367 System.out.println("-threadsimulate generate multi-thread simulate version binary");
368 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");
369 System.out.println("-printscheduling -- print out scheduling graphs");
370 System.out.println("-printschedulesim -- print out scheduling simulation result graphs");
371 System.out.println("-webinterface -- enable web interface");
372 System.out.println("-help -- print out help");
375 sourcefiles.add(args[i]);
379 //add default classpath
380 if (state.classpath.size()==1)
381 state.classpath.add(ClassLibraryPrefix);
383 BuildIR bir=new BuildIR(state);
384 TypeUtil tu=new TypeUtil(state, bir);
387 SemanticCheck sc=new SemanticCheck(state,tu);
389 for(int i=0;i<sourcefiles.size();i++)
390 loadClass(state, bir,(String)sourcefiles.get(i));
392 //Stuff the runtime wants to see
393 sc.getClass("String");
396 sc.getClass("Socket");
397 sc.getClass("ServerSocket");
398 sc.getClass("FileInputStream");
399 sc.getClass("FileOutputStream");
401 sc.getClass("TagDescriptor");
403 if (state.THREAD||state.DSM||state.SINGLETM) {
404 sc.getClass("Thread");
409 tu.createFullTable();
411 BuildFlat bf=new BuildFlat(state,tu);
413 SafetyAnalysis sa=null;
414 PrefetchAnalysis pa=null;
415 MLPAnalysis mlpa=null;
416 if (state.INLINEATOMIC) {
417 Iterator classit=state.getClassSymbolTable().getDescriptorsIterator();
418 while(classit.hasNext()) {
419 ClassDescriptor cn=(ClassDescriptor)classit.next();
420 Iterator methodit=cn.getMethods();
421 while(methodit.hasNext()) {
423 MethodDescriptor md=(MethodDescriptor)methodit.next();
424 FlatMethod fm=state.getMethodFlat(md);
425 Inliner.inlineAtomic(state, tu, fm, state.inlineatomicdepth);
431 if (state.OPTIMIZE) {
432 CallGraph callgraph=new CallGraph(state);
433 CopyPropagation cp=new CopyPropagation();
434 DeadCode dc=new DeadCode();
435 GlobalFieldType gft=new GlobalFieldType(callgraph, state, tu.getMain());
436 CSE cse=new CSE(gft, tu);
437 localCSE lcse=new localCSE(gft, tu);
438 LoopOptimize lo=new LoopOptimize(gft, tu);
439 Iterator classit=state.getClassSymbolTable().getDescriptorsIterator();
440 while(classit.hasNext()) {
441 ClassDescriptor cn=(ClassDescriptor)classit.next();
442 Iterator methodit=cn.getMethods();
443 while(methodit.hasNext()) {
444 /* Classify parameters */
445 MethodDescriptor md=(MethodDescriptor)methodit.next();
446 FlatMethod fm=state.getMethodFlat(md);
462 if (state.FLATIRGRAPH) {
463 FlatIRGraph firg = new FlatIRGraph(state,
464 state.FLATIRGRAPHTASKS,
465 state.FLATIRGRAPHUSERMETHODS,
466 state.FLATIRGRAPHLIBMETHODS);
469 if (state.OWNERSHIP && !state.MLP) {
470 CallGraph callGraph = new CallGraph(state);
471 Liveness liveness = new Liveness();
472 ArrayReferencees ar = new ArrayReferencees(state);
473 OwnershipAnalysis oa = new OwnershipAnalysis(state,
478 state.OWNERSHIPALLOCDEPTH,
479 state.OWNERSHIPWRITEDOTS,
480 state.OWNERSHIPWRITEALL,
481 state.OWNERSHIPALIASFILE,
482 state.METHODEFFECTS);
486 CallGraph callGraph = new CallGraph(state);
487 Liveness liveness = new Liveness();
488 ArrayReferencees ar = new ArrayReferencees(state);
489 OwnershipAnalysis oa = new OwnershipAnalysis(state,
494 state.OWNERSHIPALLOCDEPTH,
495 state.OWNERSHIPWRITEDOTS,
496 state.OWNERSHIPWRITEALL,
497 state.OWNERSHIPALIASFILE,
498 state.METHODEFFECTS);
499 mlpa = new MLPAnalysis(state,
505 if (state.DISJOINT && !state.OOOJAVA) {
506 CallGraph cg = new CallGraph(state);
507 Liveness l = new Liveness();
508 ArrayReferencees ar = new ArrayReferencees(state);
509 DisjointAnalysis da = new DisjointAnalysis(state, tu, cg, l, ar, null, null);
513 CallGraph cg = new CallGraph(state);
514 Liveness l = new Liveness();
515 ArrayReferencees ar = new ArrayReferencees(state);
516 OoOJavaAnalysis oa = new OoOJavaAnalysis(state, tu, cg, l, ar);
520 if (state.TAGSTATE) {
521 CallGraph callgraph=new CallGraph(state);
522 TagAnalysis taganalysis=new TagAnalysis(state, callgraph);
523 TaskTagAnalysis tta=new TaskTagAnalysis(state, taganalysis, tu);
526 if (state.TASKSTATE) {
527 CallGraph callgraph=new CallGraph(state);
528 TagAnalysis taganalysis=new TagAnalysis(state, callgraph);
529 TaskAnalysis ta=new TaskAnalysis(state, taganalysis, tu);
531 TaskGraph tg=new TaskGraph(state, ta);
534 if (state.OPTIONAL) {
535 ExecutionGraph et=new ExecutionGraph(state, ta);
536 et.createExecutionGraph();
537 sa = new SafetyAnalysis(et.getExecutionGraph(), state, ta);
539 state.storeAnalysisResult(sa.getResult());
540 state.storeOptionalTaskDescriptors(sa.getOptionalTaskDescriptors());
543 if (state.WEBINTERFACE) {
544 GarbageAnalysis ga=new GarbageAnalysis(state, ta);
545 WebInterface wi=new WebInterface(state, ta, tg, ga, taganalysis);
546 JhttpServer serve=new JhttpServer(8000,wi);
550 if (state.SCHEDULING) {
551 // Use ownership analysis to get alias information
552 CallGraph callGraph = new CallGraph(state);
553 Liveness liveness = new Liveness();
554 ArrayReferencees ar = new ArrayReferencees(state);
555 OwnershipAnalysis oa = new OwnershipAnalysis(state,
560 state.OWNERSHIPALLOCDEPTH,
561 state.OWNERSHIPWRITEDOTS,
562 state.OWNERSHIPWRITEALL,
563 state.OWNERSHIPALIASFILE);
565 // synthesis a layout according to target multicore processor
566 MCImplSynthesis mcImplSynthesis = new MCImplSynthesis(state,
569 if(isDistributeInfo) {
570 mcImplSynthesis.distribution(isDisAll, startnum);
572 double timeStartAnalysis = (double) System.nanoTime();
573 mcImplSynthesis.setScheduleThreshold(20);
574 mcImplSynthesis.setProbThreshold(0);
575 mcImplSynthesis.setGenerateThreshold(30);
576 Vector<Schedule> scheduling = mcImplSynthesis.synthesis();
578 double timeEndAnalysis = (double) System.nanoTime();
579 if(state.BAMBOOCOMPILETIME) {
580 double dt = (timeEndAnalysis - timeStartAnalysis)/(Math.pow( 10.0, 9.0 ) );
581 System.err.println("The analysis took" + dt + "sec.");
585 // generate multicore codes
586 if(state.MULTICORE) {
587 BuildCodeMultiCore bcm=new BuildCodeMultiCore(state,
592 mcImplSynthesis.getCoreNum(),
595 bcm.setOwnershipAnalysis(oa);
603 if(!state.MULTICORE) {
604 if (state.DSM||state.SINGLETM) {
605 CallGraph callgraph=new CallGraph(state);
606 if (state.PREFETCH) {
607 //speed up prefetch generation using locality analysis results
608 LocalityAnalysis la=new LocalityAnalysis(state, callgraph, tu);
609 pa=new PrefetchAnalysis(state, callgraph, tu, la);
611 LocalityAnalysis la=new LocalityAnalysis(state, callgraph, tu);
612 GenerateConversions gc=new GenerateConversions(la, state);
613 BuildCode bc=new BuildCode(state, bf.getMap(), tu, la, pa, mlpa);
616 BuildCode bc=new BuildCode(state, bf.getMap(), tu, sa, pa, mlpa);
621 System.out.println("Lines="+state.lines);
625 public static void loadClass(State state, BuildIR bir, String sourcefile) {
627 ParseNode pn=readSourceFile(state, sourcefile);
628 bir.buildtree(pn, null);
629 } catch (Exception e) {
630 System.out.println("Error in sourcefile:"+sourcefile);
634 System.out.println("Error in sourcefile:"+sourcefile);
640 /** Reads in a source file and adds the parse tree to the state object. */
642 public static ParseNode readSourceFile(State state, String sourcefile) {
644 Reader fr= new BufferedReader(new FileReader(sourcefile));
645 Lex.Lexer l = new Lex.Lexer(fr);
646 java_cup.runtime.lr_parser g;
647 g = new Parse.Parser(l);
650 p=(ParseNode) g./*debug_*/parse().value;
651 } catch (Exception e) {
652 System.err.println("Error parsing file:"+sourcefile);
656 state.addParseNode(p);
657 if (l.numErrors()!=0) {
658 System.out.println("Error parsing "+sourcefile);
659 System.exit(l.numErrors());
661 state.lines+=l.line_num;
664 } catch (Exception e) {