SAX handler (to be used with SAXParser) that builds an AST.
Elements of the tree are subclassed from ASTNode; ASTNodeFactory is used to actually create the objects.
Usage:
NEDSAXHandler nedsaxhandler(filename); SAXParser parser;
parser.setHandler(&nedsaxhandler); parser.parse(filename);
ASTNode *result = nedsaxhandler.getTree();
Inherits SaxHandler.
Public Member Functions | |
ASTBuilder (const char *filename, ErrorStore *e) | |
virtual | ~ASTBuilder () |
virtual ASTNode * | getTree () |
SAX event handlers | |
virtual void | startElement (const char *name, const char **atts) override |
virtual void | endElement (const char *name) override |
virtual void | characterData (const char *s, int len) override |
virtual void | processingInstruction (const char *target, const char *data) override |
ASTBuilder | ( | const char * | filename, |
ErrorStore * | e | ||
) |
Constructor. Filename is necessary to create correct src-loc info.
|
virtual |
Destructor
|
virtual |
Returns the object tree that was built up during XML parsing.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |