Check in first version
[IRC.git] / Robust / src / Main / Main.java
1 package Main;
2
3 import java.io.Reader;
4 import java.io.BufferedReader;
5 import java.io.FileReader;
6
7 /* Test skeleton for java parser/lexer.
8  * Copyright (C) 1998 C. Scott Ananian <cananian@alumni.princeton.edu>
9  * This is released under the terms of the GPL with NO WARRANTY.
10  * See the file COPYING for more details.
11  */
12
13 public class Main {
14   public static void main(String args[]) throws Exception {
15       if (args.length<1) {
16         System.out.println("Must input source file");
17         System.exit(-1);
18       }
19     Reader fr = new BufferedReader(new FileReader(args[0]));
20     Lex.Lexer l = new Lex.Lexer(fr);
21     java_cup.runtime.lr_parser g;
22     g = new Parse.Parser(l);
23     g./*debug_*/parse();
24     System.exit(l.numErrors());
25   }
26 }