[antlr-interest] Simple parsing question

Chris Rebert cvrebert at gmail.com
Fri Sep 5 19:53:32 PDT 2008


Including at least part of the grammar in question would probably be
very useful to anyone trying to help you.

Regards,
Chris

On Fri, Sep 5, 2008 at 7:45 PM, George J. Shannon
<George.Shannon at raphaelanalytics.com> wrote:
> 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)
>
> George.Shannon at 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.
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>
>



-- 
Follow the path of the Iguana...
http://rebertia.com


More information about the antlr-interest mailing list