[antlr-interest] SEGV when running AST builder in C target, antlr3.0
Hardy, Stephen
Stephen_Hardy at rabbit.com
Tue Jul 3 16:10:48 PDT 2007
Jim,
when adding output=AST stuff to the C grammar, the runtime library gets
a seg fault in becomeRoot(). The main problem seems to be that the code
tests pointers for NULL, whereas the pointers are actually getting small
negative numbers because of various consitions in the token stream (such
as empty). Probably, there needs to be a macro like
IS_NOT_A_POINTER_OR_IS_NULL(newRootTree) etc.
Regards,
SJH
More information about the antlr-interest
mailing list