Example #1
0
File: parser.py Project: jwilk/jtc
 def p_assign_e(self, p):
     'assign_e : IDENT ASSIGN expr'
     p[0] = expression.assignment(expression.reference(p[1], p.lexpos(1)), p[3], p.lexpos(2))
Example #2
0
File: parser.py Project: jwilk/jtc
 def p_dec(self, p):
     'assign_e : IDENT DEC'
     q = expression.reference(p[1], p.lexpos(1))
     p[0] = expression.assignment(q, expression.binary_operator('-', q, expression.const(1, type.int_t, p.lexpos(2)), p.lexpos(2)), p.lexpos(2))