-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJavaParser.java
32 lines (26 loc) · 1.14 KB
/
JavaParser.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright (C) 1998-2015 Gerwin Klein <[email protected]> *
* All rights reserved. *
* *
* License: BSD *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
import java.io.*;
/**
* Simple test driver for the java parser. Just runs it on some
* input files, gives no useful output.
*/
public class JavaParser {
public static void main(String argv[]) {
try {
System.out.println("Parsing [" + argv[0] + "]");
Scanner s = new Scanner(new UnicodeEscapes(new FileReader(argv[0])));
parser p = new parser(s);
p.parse();
System.out.println("No errors.");
} catch (Exception e) {
e.printStackTrace(System.out);
System.exit(1);
}
}
}