The Meta-Environment API
pt-support Documentation
pt-support contains the definition and implementation of UPTR: A universal parse tree representation and manipulation format. UPTR is constructed from:
- An abstract representation of productions.
- Tree and forest construction nodes (with productions in each node).
- ASCII character values as leafs.
SGLR produces parse trees using MEPT.h. You can use the API to traverse these trees. The API can also be used to produce trees that look exactly like they have been constructed by SGLR. Tools that use this API are rewriters, structure editors, parse tree visualizers, fact extractors, etc.
A selected number of functions from both MEPT-utils.h and PTMEPT-utils.h are available as commandline tools, and as ToolBus tools:
- unparsePT: yields the characters of a parse tree
- liftPT: lifts a parse tree to a parse tree of a parse tree, or vice versa
- implodePT: maps a parse tree to a more abstract ATerm (abstract syntax tree)
- addPosInfo: add position annotations to each sub-tree
- ambtracker: prints a report of all ambiguities in a parse forest
- unparseProd: maps the AsFix representation of a production to the SDF presentation.
- applyFunction: construct a new production for a prefix function and applies it to a list of parse trees, constructing a new parse tree
Generated on Thu Feb 11 11:26:19 2010 for pt-support by
1.4.6