[antlr-interest] please help on simple parser antlr v3

Thomas Brandon tbrandonau at gmail.com
Wed Sep 27 17:47:53 PDT 2006


Wouldn't that mean with the above lexer if you tried to use WS in your
parser to match an LF that nothing would match but you would have got
no warnings (not an issue here as they're all skipped)? Or what if you
had actions in the WS rule (other than skip)? Unless I'm
misunderstanding that seems like it could lead to rather annoying
grammar problems.

Tom.
On 9/28/06, Terence Parr <parrt at cs.usfca.edu> wrote:
>
> On Sep 27, 2006, at 5:52 AM, Michiel Vermandel wrote:
>
> >
> > Hi Tom,
> >
> > Thanks for your explanation.
> > I made some extra lexer rules and I succeeded in eliminating the
> > warnings.
> > Though I'm not sure my grammar is still correct and I don't
> > understand why this solution does not generate the warnings.
>
> ANTLR (in lexer) gives priority to rules listed first and hence no
> error when there is overlap.
>
> Ter
>
>


More information about the antlr-interest mailing list