[antlr-interest] Re: crash in 2.7.2
lgcraymer
lgc at mail1.jpl.nasa.gov
Sat Jun 14 00:28:29 PDT 2003
Mona--
AST factory initialization has changed in 2.7.2, and this looks like
you have tripped over that. At a guess, you have a custom
constructor for your parser and haven't spliced in the AST factory
initialization code.
Ric Klaren can probably clarify--I can't find the initialization
code from just browsing the C++ support stuff.
--Loring
--- In antlr-interest at yahoogroups.com, "monaabs" <monaabs at y...>
wrote:
> Hi ,
> My application is crashing on this statement
> astFactory->addASTChild(currentAST, n_AST);
> The SQL_Parser.cpp looks like this
>
> void SQL_Parser::r_QNamePart() {
> returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
> ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
> ANTLR_USE_NAMESPACE(antlr)RefAST r_QNamePart_AST =
> ANTLR_USE_NAMESPACE(antlr)nullAST;
> ANTLR_USE_NAMESPACE(antlr)RefToken n = ANTLR_USE_NAMESPACE
> (antlr)nullToken;
> ANTLR_USE_NAMESPACE(antlr)RefAST n_AST = ANTLR_USE_NAMESPACE
> (antlr)nullAST;
>
> n = LT(1);
> if ( inputState->guessing == 0 ) {
> n_AST = astFactory->create(n);
> astFactory->addASTChild(currentAST, n_AST);
> }
>
> The astFactory seems to have a value of 0x0000ffff. why would this
> happen ?
>
> To compile the lib , i used ANTLR_EXPORTS in my project
settings ..
> is this a reason for crash ?
>
> Regards
> Mona
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list