gavo.adql.tree module

Trees of ADQL expressions and operations on them.

gavo.adql.tree.getTreeBuildingGrammar()[source]

returns a pyparsing symbol that can parse ADQL expressions into simple trees of ADQLNodes.

This symbol is shared, so don’t change anything on it.

gavo.adql.tree.registerNode(node)[source]

registers a node class or a symbolAction from a module other than node.

This is a bit of magic – some module can call this to register a node class that is then bound to some parse action as if it were in nodes.

I’d expect this to be messy in the presence of chaotic imports (when classes are not necessarily singletons and a single module can be imported more than once. For now, I ignore this potential bomb.