So, it is a bug in the tree grammar and you have not implemented an error
message handler that can help you in development. I cannot create an error
handler that is all things to all men - hence the supplied default just
tries to use lots of ways to gather information, so you can decide what is
needed for your specific case.

Jim

> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of Petteri Räty
> Sent: Wednesday, May 25, 2011 12:57 PM
> To: [email protected]
> Subject: Re: [antlr-interest] Why stream name can't be printed out when
> error occurs(ANTLR C)?
>
> On 05/25/2011 10:39 PM, Jim Idle wrote:
> > Why would you need to use a virtual token to issue an error?
> >
> > Jim
> >
>
> The situation happens at least when a tree grammar detects a tree it's
> not prepared for. This of course is more common during development than
> in production but can't see why bugs couldn't leak there too. An
> example:
>
> -unknown source-(32)  : error 3 : , at offset 8, near (STRING
> autotools)
> : cannot match to any predicted input...
>
> first frames from an another error:
>
> (gdb) bt
> #0  antlr3RecognitionExceptionNew (recognizer=0xb74e1978) at
> src/antlr3baserecognizer.c:382
> #1  0xb7dc7baf in recoverFromMismatchedToken (recognizer=0xb74e1978,
> ttype=3, follow=0x0) at src/antlr3baserecognizer.c:1469
> #2  0xb7dc6c72 in match (recognizer=0xb74e1978, ttype=3, follow=0x0) at
> src/antlr3baserecognizer.c:478
>
> Regards,
> Petteri
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to