[antlr-interest] Using ANTLRv3
Stefan
jan_ek at op.pl
Fri May 4 05:35:48 PDT 2007
Gavin Lambert napisał(a):
> At 23:14 4/05/2007, Stefan wrote:
> >Nope. The complete file is just this:
> >
> >grammar Test2;
> >
> >string : '"' (~'"')+ '"';
>
> Ah, that's because you've written a parser rule when you should have
> been using a lexer rule.
>
> Capitalise at least the first letter of "string" (all-caps is the
> convention but is not required) and it will be a lexer rule instead.
> Then it should work.
Oh, I see. Could you please tell me when I should write lexer rules
instead of parser rules? What's the difference? Where can I read about
it more?
Stefan Chrobot
More information about the antlr-interest
mailing list