Lines Matching full:env
1 #!/usr/bin/env python3
188 def ast_sym(ast, env): argument
189 if ast in env:
190 return str(env[ast])
193 def ast_sym_int(ast, env): argument
194 if ast in env:
195 v = env[ast]
202 def ast_expr(ast, env, edt): argument
204 return not ast_expr(ast[1], env, edt)
206 return ast_expr(ast[1], env, edt) or ast_expr(ast[2], env, edt)
208 return ast_expr(ast[1], env, edt) and ast_expr(ast[2], env, edt)
210 return ast_sym(ast[1], env) == ast[2]
212 return ast_sym(ast[1], env) != ast[2]
214 return ast_sym_int(ast[1], env) > int(ast[2])
216 return ast_sym_int(ast[1], env) < int(ast[2])
218 return ast_sym_int(ast[1], env) >= int(ast[2])
220 return ast_sym_int(ast[1], env) <= int(ast[2])
222 return ast_sym(ast[1], env) in ast[2]
224 return bool(ast_sym(ast[1], env))
226 return bool(re.match(ast[2], ast_sym(ast[1], env)))
305 def parse(expr_text, env, edt): argument
317 return ast_expr(ast, env, edt)