[antlr-interest] Troubles lexing a decimal, (from an antlr beginner)

Johannes Luber jaluber at gmx.de
Wed Jul 25 02:34:19 PDT 2007


Igor Murashkin wrote:
> Hello,
> 
> Thanks for all the help. I used a syntactic predicate like Jim suggested
> and it seems to lex everything properly now. I wish I understood  more
> academically why my original lexing syntax didn't work, does ANTLR not
> put the tokens back and backtrack when it fails to match a rule?

Backtracking has to be explicitly activated because this option is more
time consuming than a straight pass.

> In regards to seeing the answer to this earlier, I couldn't find a
> search option on the mailing list, and using Google I kept coming across
> ANTLRv2 threads which I was afraid to look at since so much ANTLRv2
> information on the internet would break on me (like using ! to exclude
> things from the token text).

How about looking at the wiki first?

> Thanks,
> Igor Murashkin
> 

Best regards,
Johannes Luber


More information about the antlr-interest mailing list