38 typedef factory_type_ factory_type;
39 typedef factory_descriptor_ factory_descriptor;
40 typedef factory_descriptor_list_ factory_descriptor_list;
44 factory_descriptor default_factory_descriptor;
45 factory_descriptor_list nodeFactories;
54 ASTFactory(
const char* factory_node_name, factory_type factory );
59 void registerFactory(
int type,
const char* ast_name, factory_type factory );
61 void setMaxNodeType(
int type );
70 RefAST create(
int type,
const ANTLR_USE_NAMESPACE(std)
string& txt);
76 RefAST create(
const ANTLR_USE_NAMESPACE(std)
string& txt, ANTLR_USE_NAMESPACE(std)istream& infile );
93 RefAST make(ANTLR_USE_NAMESPACE(std)vector<RefAST>& nodes);
109 void setASTNodeFactory(
const char* factory_node_name, factory_type factory );
111#ifdef ANTLR_SUPPORT_XML
116 RefAST LoadAST( ANTLR_USE_NAMESPACE(std)istream& infile );
119 void loadChildren( ANTLR_USE_NAMESPACE(std)istream& infile,
RefAST current );
120 void loadSiblings( ANTLR_USE_NAMESPACE(std)istream& infile,
RefAST current );
121 bool checkCloseTag( ANTLR_USE_NAMESPACE(std)istream& infile );
123#ifdef ANTLR_VECTOR_HAS_AT
125 inline RefAST getNodeOfType(
unsigned int type )
127 return RefAST(nodeFactories.at(type)->second());
130 const char* getASTNodeType(
unsigned int type )
132 return nodeFactories.at(type)->first;
135 factory_type getASTNodeFactory(
unsigned int type )
137 return nodeFactories.at(type)->second;
140 inline RefAST getNodeOfType(
unsigned int type )
142 return RefAST(nodeFactories[type]->second());
147 return nodeFactories[type]->first;
149 factory_type getASTNodeFactory(
unsigned int type )
151 return nodeFactories[type]->second;
157 ASTFactory(
const ASTFactory& );
158 ASTFactory& operator=(
const ASTFactory& );