Esempio n. 1
0
def p_express_arg_10(p):
    """
    express_arg : express_arg RELOP express_arg
    """
    p[0] = Expression(p[2], p[1], p[3])
Esempio n. 2
0
def p_express_arg_7(p):
    """
    express_arg : UNARYOP express_arg 
    """
    p[0] = Expression(p[1], p[2], None)
Esempio n. 3
0
def p_express_arg_8(p):
    """
    express_arg : express_arg ARITOP express_arg
    """
    p[0] = Expression(p[2], p[1], p[3])
Esempio n. 4
0
def p_express_arg_5(p):
    """
    express_arg : binary_func LPAR express_arg COMA express_arg RPAR
    """
    p[0] = Expression(p[1], p[3], p[5])
Esempio n. 5
0
def p_express_arg_6(p):
    """
    express_arg : unary_func LPAR express_arg RPAR
    """
    p[0] = Expression(p[1], p[3], None)
Esempio n. 6
0
def p_express_rel_4(p):
    """
    express_rel : NEG express_rel 
    """
    p[0] = Expression(p[1], p[2], None)
Esempio n. 7
0
def p_express_arg_4(p):
    """
    express_arg : REGEX LPAR express_arg COMA pattern_arg regex_flag
    """
    p[0] = Expression("REGEX", p[3], Argument(p[5], False, p[6]))
Esempio n. 8
0
def p_express_rel_0(p):
    """
    express_rel : express_arg RELOP express_rel
    """
    p[0] = Expression(p[2], p[1], p[3])
Esempio n. 9
0
def p_express_rel_3(p):
    """
    express_rel : NEG LPAR expression RPAR 
    """
    p[0] = Expression(p[1], p[3], None)
Esempio n. 10
0
def p_expression_0(p):
    """
    expression : express_rel LOGOP expression
    """
    p[0] = Expression(p[2], p[1], p[3])
Esempio n. 11
0
def p_desc_var_3(p):
    """
    desc_var : unary_func LPAR desc_var RPAR
    """
    p[0] = Expression(p[1], p[3], None)
Esempio n. 12
0
def p_expression_6(p):
    """
    expression : expression GREATEREQ expression
    """
    p[0] = Expression(p[2], p[1], p[3])
Esempio n. 13
0
def p_expression_4(p):
    """
    expression : expression LESSEQ expression
    """
    p[0] = Expression(p[2], p[1], p[3])
Esempio n. 14
0
def p_expression_0(p):
    """
    expression : expression EQUALS expression
    """
    p[0] = Expression(p[2], p[1], p[3])