class documentation

class ParseTreeBuilder(Builder): (source)

View In Hierarchy

Builder object that builds a ParseTree
Method __init__ Undocumented
Method append No summary
Method end No summary
Method get_parsetree Returns the constructed ParseTree object. Can only be called once, after calling this method the object can not be re-used.
Method start No summary
Method text Append text @param text: text to be appended as string @implementation: must be implemented by sub-classes
Instance Variable stack Undocumented
Instance Variable _b Undocumented
Instance Variable _last_char Undocumented
def __init__(self): (source)

Undocumented

def append(self, tag, attrib=None, text=None): (source)
Convenience function to open a tag, append text and close it immediatly. Only used for formatted text that has no sub-processing done.
Parameters
tagthe tag name
attriboptional dict with attributes
textformatted text
Unknown Field: implementation
optional for subclasses, default implementation calls start(), text(), and end()
def end(self, tag): (source)
End formatted region
Parameters
tagthe tag name
Raises
XXXwhen tag does not match current state
Unknown Field: implementation
must be implemented by sub-classes
def get_parsetree(self): (source)
Returns the constructed ParseTree object. Can only be called once, after calling this method the object can not be re-used.
def start(self, tag, attrib=None): (source)
Start formatted region
Parameters
tagthe tag name
attriboptional dict with attributes
Unknown Field: implementation
must be implemented by sub-classes
def text(self, text): (source)
Append text
Parameters
texttext to be appended as string
Unknown Field: implementation
must be implemented by sub-classes
stack: list = (source)

Undocumented

Undocumented

_last_char = (source)

Undocumented