Skip to content

Commit 53aba86

Browse files
committed
Fix operator predecence
1 parent 5ff94fb commit 53aba86

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/antlr4/org/jabref/search/Search.g4

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ start:
3434
// labels are used to refer to parts of the rules in the generated code later on
3535
// label=actualThingy
3636
expression:
37-
LPAREN expression RPAREN #parenExpression // example: (author=miller)
38-
| left=expression operator=(AND | OR) right=expression #binaryExpression // example: author = miller and title = test
39-
| NOT expression #unaryExpression // example: not author = miller
40-
| comparison #atomExpression
37+
LPAREN expression RPAREN #parenExpression // example: (author=miller)
38+
| NOT expression #unaryExpression // example: not author = miller
39+
| left=expression operator=AND right=expression #binaryExpression // example: author = miller and title = test
40+
| left=expression operator=OR right=expression #binaryExpression // example: author = miller and title = test
41+
| comparison #atomExpression
4142
;
4243
4344
comparison:

0 commit comments

Comments
 (0)