[antlr-interest] Conflicting lexer tokens?

Dan Ellis dan at remember.this.name
Mon Feb 11 19:22:09 PST 2008


Hi. I'm new to ANTLR, but liking the look of it. However, I'm having a
problem with my first grammar. When I try to parse test_input.txt with
grammar Parser.g using ptest.py, I get the following error:

    line 6:11 mismatched input 'foo' expecting DomainPart

If I swap the order of DomainPart and Identifier, I get this error:

    line 1:9 mismatched input 'Room' expecting Identifier

What have I done wrong? Thanks.

Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Package.g
Type: application/octet-stream
Size: 907 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080212/7d1b647e/attachment.obj 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_input.txt
Url: http://www.antlr.org/pipermail/antlr-interest/attachments/20080212/7d1b647e/attachment.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptest.py
Type: application/octet-stream
Size: 372 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080212/7d1b647e/attachment-0001.obj 


More information about the antlr-interest mailing list