4 import java.io.BufferedReader;
5 import java.io.FileReader;
6 import IR.Tree.ParseNode;
7 import IR.Tree.BuildIR;
10 /* Test skeleton for java parser/lexer.
11 * Copyright (C) 1998 C. Scott Ananian <cananian@alumni.princeton.edu>
12 * This is released under the terms of the GPL with NO WARRANTY.
13 * See the file COPYING for more details.
17 public static void main(String args[]) throws Exception {
19 System.out.println("Must input source file");
22 Reader fr = new BufferedReader(new FileReader(args[0]));
23 Lex.Lexer l = new Lex.Lexer(fr);
24 java_cup.runtime.lr_parser g;
25 g = new Parse.Parser(l);
26 ParseNode p=(ParseNode) g./*debug_*/parse().value;
27 // System.out.println(p.PPrint(2,true));
28 State state=new State(p);
29 BuildIR bir=new BuildIR(state);
31 System.exit(l.numErrors());