[antlr-interest] Re: Lexer problem
manfredlotz
Manfred.Lotz at web.de
Wed Jan 2 11:12:35 PST 2002
--- In antlr-interest at y..., mzukowski at b... wrote:
> Yes try something like this:
>
> ( ".a" | (".a.a")=>".a.a" | ".b" | 'a' | 'c' )
>
> Read the docs and look at the generated code to understand what it
does.
>
> Monty
Hi Monty,
Your suggestion was great.
That did the trick. Now the lexer is able to scan a ".a.b" as well as
".a.a".
I read the docs. My understanding is that the syntactic predicate
gives the lexer a way to backtrack if it is on a wrong path like after
".a." where there is no 'a' but a 'b'.
Best,
Manfred
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list