Added implementation for a visitor
This commit is contained in:
@@ -19,6 +19,7 @@ public class Klang {
|
||||
KlangParser parser = new KlangParser(tokens);
|
||||
|
||||
ParseTree tree = parser.parse(); // begin parsing at init rule
|
||||
System.out.println(tree.toStringTree(parser)); // print LISP-style tree
|
||||
EvalVisitor visitor = new EvalVisitor();
|
||||
visitor.visit(tree);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user