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 33 34 35 36
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright (C) 1998-2018 Gerwin Klein <lsf@jflex.de> *
* 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[]) {
for (int i = 0; i < argv.length; i++) {
try {
System.out.println("Parsing ["+argv[i]+"]");
Scanner s = new Scanner(new UnicodeEscapes(new FileReader(argv[i])));
parser p = new parser(s);
p.parse();
System.out.println("No errors.");
}
catch (Exception e) {
e.printStackTrace(System.out);
System.exit(1);
}
}
}
}
|