simpleparse.generator
index
s:\sp\simpleparse\generator.py

 
Modules
            
mx.TextTools.TextTools
traceback
 
Classes
            
Generator
GeneratorAPI1
 
class Generator
      The generator class manages a collection of
ElementToken objects.  These element token objects
allow the generator to be separated from the
particular parser associated with any particular EBNF
grammar.  In fact, it is possible to create entire grammars
using only the generator objects as a python API.
 
   Methods defined here:
__init__(self)
addDefinition(self, name, rootElement)
Add a new definition (object) to the generator
addDefinitionSource(self, item)
Add a source for definitions when the current grammar doesn't supply
a particular rule (effectively common/shared items for the grammar).
buildParser(self, name, methodSource=None)
Build the given parser definition, returning a TextTools parsing tuple
getNameIndex(self, name)
Return the index into the main list for the given name
getNames(self)
Return the list of root generator objects
getObjectForName(self, name)
Determine whether our methodSource has a parsing method for the given name
 
returns ( flags or 0 , tagobject)
getParserList(self)
getRootObject(self, name)
Get a particular root object by name
getRootObjects(self)
Return the list of root generator objects
getTagObjectForName(self, name)
Get any explicitly defined tag object for the given name

Data and non-method functions defined here:
__doc__ = 'The generator class manages a collection of\n\tEle...ing only the generator objects as a python API.\n\t'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
__module__ = 'simpleparse.generator'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
 
class GeneratorAPI1
      Stand-in class supporting operation of SimpleParse 1.0 applications
 
There was really only the one method of interest, parserbyname,
everything else was internal (and is now part of
simpleparsegrammar.py).
 
   Methods defined here:
__init__(self, production, prebuilt=())
parserbyname(self, name)
Retrieve a tag-table by production name

Data and non-method functions defined here:
__doc__ = 'Stand-in class supporting operation of SimplePar...al (and is now part of\n\tsimpleparsegrammar.py).\n\t'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
__module__ = 'simpleparse.generator'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
 
Functions
            
buildParser(declaration, prebuiltnodes=())
API 1.0 primary entry point, returns a GeneratorAPI1 instance
 
That object will respond to the parserbyname API expected by
SimpleParse 1.0 applications.
 
Data
             __file__ = r'S:\sp\simpleparse\generator.pyc'
__name__ = 'simpleparse.generator'