Package gavo :: Package stc :: Module stcsgen
[frames] | no frames]

Module stcsgen

source code

Converting ASTs to STC-S.

The strategy here is to first generate an STCS CST, remove defaults from it and then flatten out the whole thing.

The AST serializers here either return a dictionary, which is then updated to the current node's dictionary, or a tuple of key and value, which is then added to the current dictionary.

Functions
 
refPosToCST(node) source code
 
getSTCS(astRoot)
returns an STC-S string for an AST.
source code
 
getSpatialSystem(astRoot)
returns a phrase for the spatial system (for manual STC-S generation).
source code
Variables
  stcsFlavors = {(1, 'CARTESIAN'): 'CART1', (2, 'CARTESIAN'): 'C...
  __package__ = 'gavo.stc'
  n = 'Not'
Variables Details

stcsFlavors

Value:
{(1, 'CARTESIAN'): 'CART1',
 (2, 'CARTESIAN'): 'CART2',
 (2, 'SPHERICAL'): 'SPHER2',
 (3, 'CARTESIAN'): 'CART3',
 (3, 'SPHERICAL'): 'SPHER3',
 (3, 'UNITSPHERE'): 'UNITSPHER'}