[antlr-interest] Simple parsing question

George J. Shannon George.Shannon at raphaelanalytics.com
Fri Sep 5 19:45:07 PDT 2008


I have a parser that gets a MismatchedTokenException error that I would
appreciate assistance on.

Within the text being parsed is a simple rule that looks for '[' IntValue
']' where IntValue is the rule ('0'..'9')+ (i.e., integer value inside
brackets).

This may not be relevant, but I guess I should mention that this rule is
called by other rules, so this sequence is embedded inside other text.

Anyway, I get the MismatchedTokenException whenever I run into a '[0]', but
not when I run into '[00]' or any single digit other than '0'.

So, what's so special about 0 that I'm obviously missing?

Sorry to bother you with an obvious question; I have brain cramp after
staring at this for about an hour.

I'm using antlr 3.2 with ANTLRworks 1.2, but the error occurs with the
3.1/1.1.7 combination as well.

Thanks in advance for the help.

Regards,

George

 

 

 

 

George Shannon

President, Raphael Analytics, Inc.

16 Spur Drive

Fenton, MO 63026

(314) 550-5589 (cell)

 <mailto:George.Shannon at raphaelanalytics.com>
George.Shannon at raphaelanalytics.com

 <http://www.raphaelanalytics.com> www.raphaelanalytics.com

 

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080905/72ce2914/attachment.html 


More information about the antlr-interest mailing list