Skip to content
Snippets Groups Projects
Commit 310414cd authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Simplified usage.

parent d94ef7d6
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,8 @@ import java.io.PrintStream;
public class GenCompiler extends Parser {
public static void main(String args[]) {
String dir = "examples/x3d";
String outName = "x3d";
String dir = "generated";
String outName = "generated";
String[] schema = new String[1];
String grammarName = new String();
boolean first = true;
......@@ -35,17 +35,19 @@ public class GenCompiler extends Parser {
for (int i=0; i<args.length; i++) {
if (args[i].equals("-d")) {
dir = args[++i];
System.out.println("dir: "+dir);
// System.out.println("dir: "+dir);
} else if (args[i].equals("-g")) {
grammarName = args[++i];
System.out.println("grammar: "+grammarName);
dir = grammarName;
outName = grammarName;
// System.out.println("grammar: "+grammarName);
} else if (args[i].equals("-o")) {
outName = args[++i];
System.out.println("outName: "+outName);
// System.out.println("outName: "+outName);
} else {
// OK, we suppose the remaing arg to be parsed.
schema[0] = args[i++];
System.out.println("schema: "+schema[0]);
// System.out.println("schema: "+schema[0]);
}
}
Start ast = parse(schema);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment