Lines Matching refs:t
23 def p_statement_assign(t): argument
25 names[t[1]] = t[3]
27 def p_statement_assign_2(t): argument
29 names[t[1]] = t[3]
31 def p_statement_expr(t): argument
33 print(t[1])
35 def p_expression_binop(t): argument
40 if t[2] == '+' : t[0] = t[1] + t[3]
41 elif t[2] == '-': t[0] = t[1] - t[3]
42 elif t[2] == '*': t[0] = t[1] * t[3]
43 elif t[2] == '/': t[0] = t[1] / t[3]
45 def p_expression_uminus(t): argument
47 t[0] = -t[2]
49 def p_expression_group(t): argument
51 t[0] = t[2]
53 def p_expression_number(t): argument
55 t[0] = t[1]
57 def p_expression_name(t): argument
60 t[0] = names[t[1]]
62 print("Undefined name '%s'" % t[1])
63 t[0] = 0
65 def p_error(t): argument
66 print("Syntax error at '%s'" % t.value)