3 source/parse.y | 5 +++--
4 1 file changed, 3 insertions(+), 2 deletions(-)
6 diff --quilt old/source/parse.y new/source/parse.y
9 @@ -153,7 +153,7 @@ static int nextSymIsField = 0;
10 %left GT GE LT LE EQ NE IN
13 -%nonassoc UNARY_MINUS NOT
14 +%nonassoc UNARY_MINUS NOT NOTNOT
18 @@ -685,6 +685,7 @@ numexpr: '(' blank expr blank ')'
20 | '-' blank numexpr %prec UNARY_MINUS { ADD_OP(OP_NEGATE); }
21 | NOT blank numexpr { ADD_OP(OP_NOT); }
22 + | NOTNOT blank numexpr { ADD_OP(OP_BOOLEANIZE); }
23 | numexpr '+' blank numexpr { ADD_OP(OP_ADD); }
24 | numexpr '-' blank numexpr { ADD_OP(OP_SUB); }
25 | numexpr '*' blank numexpr { ADD_OP(OP_MUL); }
26 @@ -967,7 +968,7 @@ static int yylex(void)
27 case '>': return follow('=', GE, GT);
28 case '<': return follow('=', LE, LT);
29 case '=': return eq_look_ahead();
30 - case '!': return follow('=', NE, NOT);
31 + case '!': return follow2('=', NE, '!', NOTNOT, NOT);
32 case '+': return follow2('+', INCR, '=', ADDEQ, '+');
33 case '-': return follow2('-', DECR, '=', SUBEQ, '-');
34 case '|': return follow2('|', OR, '=', OREQ, '|');