[antlr-interest] Fwd: Fwd: ANTLR generating invalid Java

Oren Ben-Kiki oren at ben-kiki.org
Fri Aug 8 18:16:14 PDT 2008


On Fri, Aug 8, 2008 at 4:25 PM, Gavin Lambert <antlr at mirality.co.nz> wrote:
> What?  The WS rule is a rule in your grammar, so you can do whatever you
> want with it.  And you *want* it to match WS, you just don't want it to hide
> them.  So just make sure it's not hiding or skipping the WS tokens and
> you're golden.

<smack self on head> Now why didn't I think of that? :-)
Just because my rules have a naming convention doesn't mean I can't
make use of a "WS" rule...
Just tested this and it works like a charm.

I'm still stumped by the inability to performing actions during
lookahead though...

Oren.


More information about the antlr-interest mailing list