[antlr-interest] intermittent problem with lexer

Darien Hager darien.hager at etelos-inc.com
Mon Mar 10 10:44:11 PDT 2008


I don't think I have strong enough Antlr-fu to reliably help you with your
main problem, but I'd like to point out one (probably optional) spot for
improving the grammar.

The T33, T35, T37 tokens, etc. are basically tokens that the parser rules
assume exist but aren't defined with a name (so they get auto-named.)

For example, the inequality operators under relationalOp on line 190. In
ANTLRworks, you can right-click on them and do "Replace literals with token
label" to refactor them out, giving them names which are much more
informative, e.g.

GT_OR_EQ : '>=' ;


-- 
Darien Hager
Developer
Etelos, Inc.
darien at etelos.com

http://www.etelos.com
"Revolutionizing the way applications are developed, distributed and
consumed."

This e-mail message, including attachments, may contain confidential
information for the sole use of the intended recipient(s). If you are not
the intended recipient, then this is notice that any use, disclosure,
dissemination, distribution or copying is strictly prohibited. If you have
received this message in error please contact the sender by reply mail and
destroy all copies of the original message.

This e-mail message, including attachments, may contain confidential information 
for the sole use of the intended recipient(s). If you are not the intended recipient,
then this is notice that any use, disclosure, dissemination, distribution or copying is 
strictly prohibited.  If you have received this message in error please contact the 
sender by reply mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080310/a8a39986/attachment-0001.html 


More information about the antlr-interest mailing list