Logical Expressions with >2 Primary Expressions

.. ie. expr && expr was supported but not
   expr && expr && expr
This commit is contained in:
Mark Liversedge
2015-08-11 20:08:07 +01:00
parent 23633692c4
commit a93f37459e

View File

@@ -88,6 +88,11 @@ lexpr : expr lop expr { $$ = new Leaf();
$$->lvalue.l = $1;
$$->op = $2;
$$->rvalue.l = $3; }
| lexpr lop lexpr { $$ = new Leaf();
$$->type = Leaf::Logical;
$$->lvalue.l = $1;
$$->op = $2;
$$->rvalue.l = $3; }
| '(' expr ')' { $$ = new Leaf();
$$->type = Leaf::Logical;
$$->lvalue.l = $2;