[antlr-interest] newbie question about nondeterminism between keywords and identifiers

David Guy dguy at bea.com
Fri Feb 2 07:45:44 PST 2007


I have tried putting my IDENT lexer rule last, but TYPE_DATE still
matches first. No matter what order I have tried, TYPE_DATE matches
first.

 

If "mydate : date" , "mydate" gets tokenized as IDENT, TYPE_DATE,

 

I am using ANTLR 2.7.2 in case that matters.

 

I am parsing a pre-existing language that I cannot change. Actually,
"date" can be an identifier and a type.

"date : date" is valid.

 

 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070202/caa76bca/attachment.html 


More information about the antlr-interest mailing list