»Ø¸´£º [antlr-interest] Adding Utility Methods to a parser

Martin Probst mail at martin-probst.com
Fri Mar 10 15:37:43 PST 2006

> anywhere after your parser declaration, put your method definition in {},

Another way is to extend an abstract base parser. While that is still not
a very clean separation between Java code and parser rules you can at
least use your favorite Editor / IDE with all functionality on the Java

class MyParser extends Parser("com.foo.bar.AbstractParser");
   | yyyy { myMethod();}

More information about the antlr-interest mailing list