grammar: Fix parsing of complex expression

This fixes parsing of expressions of the form '(x) AND/OR y' and similar
types. It also fixes expression of the '(x)' type and of the '(x op y
AND z op w)' type.

See issue #1454.
This commit is contained in:
Martin Kleusberg
2018-07-10 23:07:38 +02:00
parent 961141ec36
commit 788134eee6
7 changed files with 671 additions and 603 deletions
+2 -1
View File
@@ -431,7 +431,8 @@ functionname
expr
:
( LPAREN subexpr (COMMA subexpr)+ RPAREN binaryoperator LPAREN subexpr (COMMA subexpr)+ RPAREN )
( LPAREN expr RPAREN ((AND | OR) expr)* )
| ( LPAREN subexpr (COMMA subexpr)+ RPAREN binaryoperator LPAREN subexpr (COMMA subexpr)+ RPAREN )
| ( subexpr ((binaryoperator | AND | OR) subexpr )* )
;