[antlr-interest] TinyC

Henry Butowsky henryb at ntlworld.com
Wed Oct 5 05:34:11 PDT 2005


Hi Guys,
   I have compiled a C++ parser for the tinyc example.

Below is some of main.cpp

try {
	MyTinyCLexer lexer( str );
	MyTinyCParser parser(lexer);

	parser.funclist();	

	print_tree pr;
	pr.pr_tree( parser.getAST() );
	//trav_tree( parser.getAST(), 0 );
	
       } catch(std::exception& e) {
	std::cerr << "exception: " << e.what() << std::endl;

The program is crashing out on the call parser.funclist()

More specifically its a problem with the "ASTFactory".

See below

Program received signal SIGSEGV, Segmentation fault.
0x08063b50 in 
antlr::ASTFactory::create(antlr::TokenRefCount<antlr::Token>) ()


With my miniscule understanding of ANTLR -- Is the problem to do with 
the fact that I am using the default AST class ?
Pleas Help




More information about the antlr-interest mailing list