(p)
logic_expr :  "-" expression %prec NEG
                |   "+" expression %prec POS
                |   "!" expression %prec NOT
                |   expression "?" expression ":" expression
                |   expression "%" expression
                |   expression "+" expression
                |   expression "-" expression
                |   expression "/" expression
                |   expression "*" expression
                |   expression "^" expression
                |   expression "<" expression
                |   expression ">" expression
                |   expression EQUAL expression
                |   expression NOT_EQUAL expression
                |   expression GREATER_OR_EQUAL expression
                |   expression LESS_OR_EQUAL expression
                |   expression AND expression
                |   expression OR expression
logic_expr :  "-" expression %prec NEG
                |   "+" expression %prec POS
                |   "!" expression %prec NOT
                |   expression "?" expression ":" expression
                |   expression "%" expression
                |   expression "+" expression
                |   expression "-" expression
                |   expression "/" expression
                |   expression "*" expression
                |   expression "^" expression
                |   expression "<" expression
                |   expression ">" expression
                |   expression EQUAL expression
                |   expression NOT_EQUAL expression
                |   expression GREATER_OR_EQUAL expression
                |   expression LESS_OR_EQUAL expression
                |   expression AND expression
                |   expression OR expression
logic_expr : - expression %prec NEG | + expression %prec POS | ! expression %prec NOT | expression ? expression : expression | expression % expression | expression + expression | expression - expression | expression / expression | expression * expression | expression ^ expression | expression < expression | expression > expression | expression EQUAL expression | expression NOT_EQUAL expression | expression GREATER_OR_EQUAL expression | expression LESS_OR_EQUAL expression | expression AND expression | expression OR expression
def p_logic_expr(p):
    '''logic_expr :  "-" expression %prec NEG
                |   "+" expression %prec POS
                |   "!" expression %prec NOT
                |   expression "?" expression ":" expression
                |   expression "%" expression
                |   expression "+" expression
                |   expression "-" expression
                |   expression "/" expression
                |   expression "*" expression
                |   expression "^" expression
                |   expression "<" expression
                |   expression ">" expression
                |   expression EQUAL expression
                |   expression NOT_EQUAL expression
                |   expression GREATER_OR_EQUAL expression
                |   expression LESS_OR_EQUAL expression
                |   expression AND expression
                |   expression OR expression
       '''
def p_logic_expr ( p ) :