'Convert raw node information to a PythonBaseNode instance.
This is passed to the parser driver which calls it whenever a reduction of a
grammar rule produces a new complete node, so that the tree is build
strictly bottom-up.'

def convert_node(self, grammar, type, children):

    symbol = grammar.number2symbol[type]
    try:
        return self.node_map[symbol](children)
    except KeyError:
        if (symbol == 'suite'):
            children = ([children[0]] + children[2:(-1)])
        return self.default_node(symbol, children)
