I have found out that this error occurs when the parser expects an EOF
token. If it is the source of the error, the parser will segfault. I am not
sure how to fix this except to avoid calling

recognizer->displayRecognitionError
when recognizer->state->exception->charPositionInLine == -1, but I don't
think this is the correct fix.

On Sun, Jan 25, 2009 at 5:54 PM, Bot Tiger <[email protected]> wrote:

> I have been trying to modify the C runtime lexer/parser error handling.
> However, whenever I try to use the default error reporter by trying to
> parse a single token that is not supposed to be recognized, it gives a
> segfault instead of the proper error reporting behavior.
>
> antlr3baserecognizer.c
> displayRecognitionError:
>
> ANTLR3_FPRINTF(stderr, ", at offset %d",
> recognizer->state->exception->charPositionInLine);
>
> I cannot find any documentation or examples about this.
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

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

Reply via email to