[antlr-interest] segmentation fault with AST
Ric Klaren
klaren at cs.utwente.nl
Mon May 19 00:51:23 PDT 2003
Hi,
On Sat, May 17, 2003 at 12:55:14PM -0000, DrXenos wrote:
> I hope someone can tell me what I am doing wrong. My antlr
> parser works fine unless I set the "buildAST=true" option. With this
> option on, it will segmentation fault on a call to
> astFactory->create(LT(1)).
Did you set the astFactory ?
E.g. as in the exprAST example in examples/cpp/exprAST:
ASTFactory my_factory;
ExprLexer lexer(cin);
ExprParser parser(lexer);
parser.initializeASTFactory(my_factory);
parser.setASTFactory(&my_factory);
parser.expr();
> I have built and tried it using mingw (gcc 3.2) and djgpp (gcc 3.2.2).
> I don't know if I just built it wrong, or am not including something
> in the grammer file that I need to. I'm using Windows so I can't run
> the configure script, so I don't know if I am building antlr wrong
> (everything but this seems to work fine).
Building the lib should not be a problem manually. There's nothing fancy
needed actually. Gcc 3.2.2 I have not tried myself but with 3.2.3 it works
(and with 3.2.1).
Cheers,
Ric
--
-----+++++*****************************************************+++++++++-------
---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722 ----
-----+++++*****************************************************+++++++++-------
"I don't have anything against Java - it's the best damn implementation
of UCSD Pascal ever released..." --- Larry Smith
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list