[antlr-interest] Possible C Runtime Error
Bot Tiger
bottiger1 at gmail.com
Mon Jan 26 20:26:53 PST 2009
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 <bottiger1 at gmail.com> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090126/40d02da2/attachment.html
More information about the antlr-interest
mailing list