[antlr-interest] ANTLRWorks /debugger question?

Johannes Luber jaluber at gmx.de
Tue Oct 7 06:07:23 PDT 2008


Joost Kraaijeveld schrieb:
> Hi, 
> 
> I have a grammar that if I do a "check grammar" reports that it is OK.
> If I run it through the debugger the debugger stops in the end, but the
> left (stop?) button in the debugger screen stays black. and the debugger
> active.
> 
> My question: should the debugger stop after parsing the file? Is so, I
> assume that my (very simple but than too difficult for me) grammar is
> not correct: is there something special about handling EOF ?

I'd say that the debugger should stop, as long one can still rollback.
EOF is used to tell the parser, that it shouldn't simply say that it
parsed things ok, if some trash comes afterwards. That way EOF is
usually on the top parser rule.

Johannes
> 
> 
> TIA
> 
> 
> 
> NB. all sources can be seen from a Trac/SVN:
> 
> http://trac.askesis.nl/tidbits/browser/AntlrTest
> 
> grammar:
> http://trac.askesis.nl/tidbits/browser/AntlrTest/Specification.g
> 
> test input file: 
> http://trac.askesis.nl/tidbits/browser/AntlrTest/Specification.spec
> 
> Java test application: 
> http://trac.askesis.nl/tidbits/browser/AntlrTest/src/nl/askesis/Application.java
> 
> 
> 



More information about the antlr-interest mailing list