[antlr-interest] Conflicting lexer tokens?

Dan Ellis dan at remember.this.name
Mon Feb 11 19:46:44 PST 2008


On 12/02/2008, Dan Ellis <dan at remember.this.name> wrote:

> What have I done wrong?

I think my problem here is forgetting that even though all the rules
are in one file, the lexer and the parser are separate, so the lexer
needs to be able to distingiush between Identifier and DomainPart
without any clues from the parser part of the grammar.

I see the Java example uses Identifier for DomainPart, which does rule
out domains with '-' in them and allows ones with '_'. Is there a
better way to do what I'm trying?


More information about the antlr-interest mailing list