

def convert(gr, raw_node):
    '\n    Convert raw node information to a Node or Leaf instance.\n\n    This is passed to the parser driver which calls it whenever a reduction of a\n    grammar rule produces a new complete node, so that the tree is build\n    strictly bottom-up.\n    '
    (type, value, context, children) = raw_node
    if (not children):
        t = tokens.get(type, None)
        if (t is not None):
            return t(value, context)
    t = symbols.get(type, None)
    if (t is not None):
        return t(children, t)
    try:
        raise NotImplementedError(grammar.number2symbol[type])
    except KeyError:
        raise NotImplementedError(token.tok_name[type])

dataset/ETHPy150Open tailhook/pyzza/pyzza/parser.py convert/VarMisuse@91/196 `context`->`t`