Home | Trees | Indices | Help |
|
---|
|
Parse utype sets into ASTs.
The rough plan is to build an ElementTree from a sequence of utype/value pairs (as returned by utypegen.getUtypes). This ElementTree can then be used to build an AST using stcxast. The ElementTree contains common.ColRefs and thus cannot be serialized to an XML string.
Most of the magic happens in utypeParseToTree, where the utypes are dissected; it is important that the utypes sequence passed to this is sorted such that utypes for things below an STC-X node are actually immediately below the utype pair for their parent.
Functions | |||
|
|||
|
|||
|
|||
|
Variables | |
__package__ =
|
Function Details |
returns an ElementTree from a sequence of (utype, value) pairs. nameQualifier(str) -> anything is a function producing element names. The utypes are processed as they come in. In practice this means you should sort them (or similar). The utype can be none, meaning "Use last node". |
returns a morphed sequence of utype/value pairs. morphers is a dictionary of utypes to handling generators. Each of those most take a utype and a value and generate utype/value pairs. This is used here to fix the abominations where system elements become values in utype representation. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |