[antlr-interest] Please Help : How do i change the default AST node type for a grammar ?

Anthony Brenelière abreneliere at telys.com
Wed Feb 19 07:09:48 PST 2003


1/
The parser ::setASTNodeType method, as specified in the documentation,
does not exist in the Cpp distrib.

2/
I also specified the option :
options {
	..
	ASTLabelType = "ANTLR_USE_NAMESPACE(antlr)RefTextNode";
         ..
}
.. but there is no effect, commonAST is still used.

3/
In..

ASTFactory::ASTFactory( const char* factory_node_name, factory_type fact
)

..what does the second arguement mean ? there is no comment about the
second arguement.

I also tried to declare the factory in that way:
ASTFactory ast_factory( "RefTextNode", 0 )
..but there is no effect when i run the program.

So/
My question is :

How do i set the default AST node type ?



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list