Home | Trees | Indices | Help |
|
---|
|
Parsing and generating STC-S
The general plan is to parse STC-S into some sort of tree (dictionaries with list values, possibly containing more such dictionaries). These trees can then be processed into something roughly resembling the data model, furnished with defaults, and processed by what essentially is user code.
Extensions to what the note says:
Classes | |
AComputedDefault A sentinel for computed default values. |
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
stcsFlavors =
|
|
spatialUnits =
|
|
temporalUnits =
|
|
spectralUnits =
|
|
getGrammar = <gavo.utils.codetricks.CachedGetter object>
|
|
getColrefGrammar = <gavo.utils.codetricks.CachedGetter object>
|
|
__package__ =
|
Function Details |
traverses the concrete syntax tree in postorder, returning pairs of paths and nodes. A node returned here is always a dictionary. The path consists of the keys leading to the node in a tuple. |
adds defaults for missing values for a concrete syntax tree. The tree is changed in place. For details, see stcsdefaults. |
removes defaults from a concrete syntax tree. The tree is changed in place. For details, see stcsdefaults. |
returns the pyparsing parseResult as a data structure consisting of simple python dicts and lists. The "tree" has two kinds of nodes: Dictionaries having lists as values, and lists containing (as a rule) literals or (for more deeply nested constructs, which are rare in STC-S) other dictionaries of this kind. A parse node becomes a dict node if it has named children. The root always is a dict. Note that unnamed children of nodes becoming dicts will be lost in the result. |
returns an STC-S grammar with column references as values. The column references used here have the form "<colref>" to cut down on ambiguities. We only accept simple identifiers (i.e., not quoted in the SQL sense), though. |
returns a CST for an STC-S expression. grammarFactory is a function returning the grammar, in this case either getGrammar (which gets used if the argument is left out) or getColrefGrammar. |
Variables Details |
stcsFlavors
|
spatialUnits
|
spectralUnits
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |