CIT 594 Funl parser tests
Spring 2013, David Matuszek
I have written some tests for the Funl parser. It would be a good idea to get your parser to pass these tests.
My tests assume that your Stack and HashMap in your Parser class are defined as follows:
Stack<Tree<Token>> stack = new Stack<Tree<Token>>();
HashMap<String, Tree<Token>> functions = new HashMap<String, Tree<Token>>();
These are accessed directly from the parser tests.
The code for the parser tests is ParserTest.java.
The parser tests compare your parsed AST against a tree built by the
Tree.parse(String s) method. Since may of you did not get this (admittedly difficult) method to work, I am supplying it as tree-parser.java. With luck, you can just add this to your Tree class and it should work.