- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathASTTest1.java
More file actions
Latest commit
21 lines (16 loc) · 431 Bytes
/
Copy pathASTTest1.java
File metadata and controls
21 lines (16 loc) · 431 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
importjava.io.*;
importminipython.lexer.Lexer;
importminipython.parser.Parser;
importminipython.node.Start;
publicclassASTTest1 {
publicstaticvoidmain(String[] args) {
try {
Parserparser = newParser(newLexer(newPushbackReader(
newFileReader(args[0].toString()), 1024)));
Startast = parser.parse();
ast.apply(newASTPrinter());
} catch (Exceptione) {
System.err.println(e);
}
}
}