1#ifndef INC_ASTFactory_hpp__
2#define INC_ASTFactory_hpp__
19#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
59 void registerFactory(
int type,
const char* ast_name,
factory_type factory );
61 void setMaxNodeType(
int type );
109 void setASTNodeFactory(
const char* factory_node_name,
factory_type factory );
111#ifdef ANTLR_SUPPORT_XML
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;
142 return RefAST(nodeFactories[type]->second());
147 return nodeFactories[type]->first;
151 return nodeFactories[type]->second;
161#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
std ::pair< const char *, factory_type_ > factory_descriptor_
Definition ASTFactory.hpp:25
RefAST(* factory_type_)()
Definition ASTFactory.hpp:24
std ::vector< factory_descriptor_ * > factory_descriptor_list_
Definition ASTFactory.hpp:26
ASTRefCount< AST > RefAST
Definition ASTRefCount.hpp:92
Definition ASTArray.hpp:23
Definition ASTFactory.hpp:36
RefAST create(const std ::string &txt, std ::istream &infile)
Create new AST node and initialize contents from a stream.
factory_descriptor_list_ factory_descriptor_list
Definition ASTFactory.hpp:40
factory_type getASTNodeFactory(unsigned int type)
Definition ASTFactory.hpp:149
factory_descriptor default_factory_descriptor
Definition ASTFactory.hpp:44
factory_descriptor_list nodeFactories
Definition ASTFactory.hpp:45
const char * getASTNodeType(unsigned int type)
get the name of the node 'type'
Definition ASTFactory.hpp:145
void loadChildren(std ::istream &infile, RefAST current)
factory_descriptor_ factory_descriptor
Definition ASTFactory.hpp:39
ASTFactory & operator=(const ASTFactory &)
factory_type_ factory_type
Definition ASTFactory.hpp:38
RefAST getNodeOfType(unsigned int type)
Definition ASTFactory.hpp:140
bool checkCloseTag(std ::istream &infile)
ASTFactory(const ASTFactory &)
void loadSiblings(std ::istream &infile, RefAST current)
Definition ASTPair.hpp:26
#define ANTLR_USE_NAMESPACE(_x_)
Definition config.hpp:18
#define ANTLR_API
Definition config.hpp:22
Definition ANTLRException.hpp:15