def make_parser(): return ox.make_parser([ ("expr : NUMBER", lambda x: as_expr(float(x))), ("expr : STRING", lambda x: as_expr(clean_string(x))), ("expr : NAME", var), ("expr : SYMBOL", var.read), ("expr : 'if'", handle_if), ("expr : 'let'", handle_let), ("expr : '(' 'items' ')'", handle_eval), ])
def Tuple(values): return as_expr(tuple(to_python(x) for x in values))
def List(values): return as_expr([to_python(x) for x in values])
def Atom(value): # noqa: N802, N805 return as_expr(value)
def Record(values): d = {} for i, j in values.items(): d[str(i)] = to_python(j) return as_expr(d)