How can I tell what subtree my tree walker is screwing up on?
Created May 4, 2012
Monty Zukowski
Try adding an exception handler to the rule. I cheat and use the _t variable which is passed into every tree rule and is eqivalent to LA(1) in the parser.
constant options { defaultErrorHandler=false; } : INT | FLOAT | HEX | STRING | "null"; exception catch [ParserException ex] { reportError(ex); System.out.println("constant PROBLEM TREE: " + _t.toStringTree()); throw ex; }