-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
28 lines (23 loc) · 821 Bytes
/
Copy pathMain.java
File metadata and controls
28 lines (23 loc) · 821 Bytes
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
package FinalProject;
import FinalProject.lexer.*;
import FinalProject.node.*;
import FinalProject.parser.*;
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] arguments){
try{
Lexer lexer = new Lexer(new PushbackReader
(new InputStreamReader(System.in), 1024));
Parser parser = new Parser(lexer);
Start ast = parser.parse();
ast.apply(new SymbolTraverse());
//System.out.println("traverse good");
ast.apply(new CheckType());
//System.out.println("checktype good");
ast.apply(new Translate());
//SymbolTraverse.st.print();
}
catch(Exception e){ System.out.println("Error: " + e.getMessage()); }
}
}