[antlr-interest] ANTLR 3.0 tree construction proposal
Bryan Ewbank
ewbank at gmail.com
Thu Feb 3 09:21:37 PST 2005
For unit testing, I've found that I can write dummy "productions" in
tree grammars that return the input tree to test:
// this "production" generates the tree to be traversed
unittest_input: { ## = #( #[S,"S"], #( #[R,"R"], #[E,"E"]) ); } ;
So a unit test framework is
1. call unittest_input to generate the input tree
2. call the production to be tested
3. compare the tree produced with the expected tree
It's enough for unit testing.
More information about the antlr-interest
mailing list