[antlr-interest] ANTLRWorks and separate lexer/parser grammars - pleading?

Terence Parr parrt at cs.usfca.edu
Fri Jan 18 13:18:44 PST 2008


On Jan 18, 2008, at 12:55 PM, Mark Volkmann wrote:

> On Jan 18, 2008 2:29 PM, Terence Parr <parrt at cs.usfca.edu> wrote:
>> run -debug on the parser grammar from command line.
>
> Okay, I added the "-debug" option when running org.antlr.Tool on my
> grammar files.

  only run it on the one grammar you want to debug.

>> compile.  start
>
> The code generated with -debug compiles fine, but when I run it I get
>
> Exception in thread "main" java.lang.NullPointerException at
> org
> .antlr.runtime.debug.DebugTokenStream.<init>(DebugTokenStream.java:45)
>
>
> Do I have to do something different in my code that uses the  
> generated classes?

Hm.... This doesn't happen for me.  Try again only using -debug on the  
parser grammar.

Ter


More information about the antlr-interest mailing list