def p_unary_expression_4(p): 'unary_expression : unary_operator unary_expression' if p[1] == '+': p[0] = ast.UnaryExp(p[2], ast.UnaryExp.PLUS, line_no=str(p.lineno(1) + __start_line_no - 1)) elif p[1] == '-': p[0] = ast.UnaryExp(p[2], ast.UnaryExp.MINUS, line_no=str(p.lineno(1) + __start_line_no - 1)) elif p[1] == '!': p[0] = ast.UnaryExp(p[2], ast.UnaryExp.LNOT, line_no=str(p.lineno(1) + __start_line_no - 1)) else: err('orio.module.loop.parser internal error: unknown unary operator')
def p_postfix_expression_5(p): 'postfix_expression : postfix_expression MINUSMINUS' p[0] = ast.UnaryExp(p[1], ast.UnaryExp.POST_DEC, line_no=str(p.lineno(1) + __start_line_no - 1))
def p_postfix_expression_4(p): 'postfix_expression : postfix_expression PLUSPLUS' p[0] = ast.UnaryExp(p[1], ast.UnaryExp.POST_INC, line_no=str(p.lineno(1) + __start_line_no - 1))
def p_unary_expression_3(p): 'unary_expression : MINUSMINUS unary_expression' p[0] = ast.UnaryExp(p[2], ast.UnaryExp.PRE_DEC, line_no=str(p.lineno(1) + __start_line_no - 1))
def p_unary_expression_2(p): 'unary_expression : PLUSPLUS unary_expression' p[0] = ast.UnaryExp(p[2], ast.UnaryExp.PRE_INC, line_no=str(p.lineno(1) + __start_line_no - 1))