[antlr-interest] ANTLRworks vs. Stand-Alone Parser

Randall R Schulz rschulz at sonic.net
Tue Jun 26 07:28:08 PDT 2007


On Tuesday 26 June 2007 07:17, Thomas Brandon wrote:
> ...
>
> > > The ANTLRWorks interpreter does not execute actions, including
> > > predicates.
> >
> > Why not?
>
> I believe the interpreter mode does not compile grammars but instead
> uses custom support in ANTLR to go through the grammar without
> actually generating any code. So executing actions would be very
> difficult (if not impossible) in this case.

OK. I guess that makes sense. Perhaps ANTLRworks should warn when it's 
asked to Interpret a grammar with syntactic predicates. It 
displays "synPred" in the racetrack diagrams when they're present, so 
presumably there's a way for it to know they're there.


> > > ...
>
> ...
> After debugging code is generated (done when you do Debug, or you can
> specify -debug as an option to ANTLR) you can also execute the
> resulting class externally (as you would normally) and then do Debug
> Remote to attach to this parser. Note that the debugging parser will
> wait for a socket connection before parsing, so if you run it and do
> not attach ANTLRWorks to it it will just sit there. So if you are
> executing code for other tests then you will need to turn off
> debugging to do so.

Ah, now that works!


> Tom.


Thanks!


Randall Schulz


More information about the antlr-interest mailing list