gavo.stc.stcsgen module

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.

gavo.stc.stcsgen.getSTCS(astRoot)[source]

returns an STC-S string for an AST.

gavo.stc.stcsgen.getSpatialSystem(astRoot)[source]

returns a phrase for the spatial system (for manual STC-S generation).

gavo.stc.stcsgen.refPosToCST(node)[source]