How do I process or examine each token consumed by the parser?
Created May 4, 2012
Terence Parr Override Parser.consume(). Put an class member action after the Parser class definition in your grammar file:
class P extends Parser; { public void consume() throws IOException { //do what you want with LA(1) super.consume(); // MAKE SURE TO PUT THIS IN!!! //do what you want with LA(1) } }