Python: module simpleparse.printers

simpleparse.printers | index /home/mcfletch/pylive/simpleparse/printers.py

`Utility to print Python code for a given generator object's element tokens`

Modules
`` |  |
string |  |  |

Classes
`` |  | _GeneratorFormatter
class _GeneratorFormatter
`` | `Singleton Class to give a generator's element tokens as a source string Call this as: printers.asGenerator( generator ) to get a Python source string that tries to recreate the generator as a set of objectgenerator element token objects (as seen in simpleparsegrammar).`
| Methods defined here: __call__(self, generator) reprObject(self, obj, depth=0, indent=' ') `Return a recognisable version of an objectgenerator element token` Data and other attributes defined here: HEAD = 'from simpleparse import generator\nfrom simplepar...return GENERATOR.buildParser( name, processor )\n\n' ITEM = 'GENERATOR.addDefinition(\n %(name)s,\n %(element)s,\n)\n'

Functions
`` |  | asObject = reprObject(self, obj, depth=0, indent=' ') method of _GeneratorFormatter instance `Return a recognisable version of an objectgenerator element token`

Data
`` |  | asGenerator = <simpleparse.printers._GeneratorFormatter instance>