aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/main
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-09-28 20:37:47 +0200
committerJon Bratseth <bratseth@gmail.com>2022-09-28 20:37:47 +0200
commitfb0074925e9e8358d38145dc5753de1c935f737d (patch)
tree206843648b85ac843e724291ef9d7f719e5e7510 /searchlib/src/main
parent9f152d2147a7839dccd707aae0887e1309e8ae82 (diff)
Follow API changes
Diffstat (limited to 'searchlib/src/main')
-rwxr-xr-xsearchlib/src/main/javacc/RankingExpressionParser.jj40
1 files changed, 20 insertions, 20 deletions
diff --git a/searchlib/src/main/javacc/RankingExpressionParser.jj b/searchlib/src/main/javacc/RankingExpressionParser.jj
index 2261d39829c..42b5f2c191a 100755
--- a/searchlib/src/main/javacc/RankingExpressionParser.jj
+++ b/searchlib/src/main/javacc/RankingExpressionParser.jj
@@ -190,7 +190,7 @@ ExpressionNode expression() :
List<ExpressionNode> rightList;
}
{
- ( left = arithmeticExpression()
+ ( left = operationExpression()
(
( <IN> rightList = expressionList() { left = new SetMembershipNode(left, rightList); } )
) ?
@@ -198,36 +198,36 @@ ExpressionNode expression() :
{ return left; }
}
-ExpressionNode arithmeticExpression() :
+ExpressionNode operationExpression() :
{
ExpressionNode left, right = null;
- ArithmeticOperator arithmeticOp;
+ Operator operator;
}
{
( left = value()
- ( arithmeticOp = arithmetic() right = value() { left = ArithmeticNode.resolve(left, arithmeticOp, right); } ) *
+ ( operator = binaryOperator() right = value() { left = OperationNode.resolve(left, operator, right); } ) *
)
{ return left; }
}
-ArithmeticOperator arithmetic() : { }
+Operator binaryOperator() : { }
{
(
- <OR> { return ArithmeticOperator.OR; } |
- <AND> { return ArithmeticOperator.AND; } |
- <GREATEREQUAL> { return ArithmeticOperator.GREATEREQUAL; } |
- <GREATER> { return ArithmeticOperator.GREATER; } |
- <LESSEQUAL> { return ArithmeticOperator.LESSEQUAL; } |
- <LESS> { return ArithmeticOperator.LESS; } |
- <APPROX> { return ArithmeticOperator.APPROX; } |
- <NOTEQUAL> { return ArithmeticOperator.NOTEQUAL; } |
- <EQUAL> { return ArithmeticOperator.EQUAL; } |
- <ADD> { return ArithmeticOperator.PLUS; } |
- <SUB> { return ArithmeticOperator.MINUS; } |
- <DIV> { return ArithmeticOperator.DIVIDE; } |
- <MUL> { return ArithmeticOperator.MULTIPLY; } |
- <MOD> { return ArithmeticOperator.MODULO; } |
- <POWOP> { return ArithmeticOperator.POWER; }
+ <OR> { return Operator.or; } |
+ <AND> { return Operator.and; } |
+ <GREATEREQUAL> { return Operator.largerOrEqual; } |
+ <GREATER> { return Operator.larger; } |
+ <LESSEQUAL> { return Operator.smallerOrEqual; } |
+ <LESS> { return Operator.smaller; } |
+ <APPROX> { return Operator.approxEqual; } |
+ <NOTEQUAL> { return Operator.notEqual; } |
+ <EQUAL> { return Operator.equal; } |
+ <ADD> { return Operator.plus; } |
+ <SUB> { return Operator.minus; } |
+ <DIV> { return Operator.divide; } |
+ <MUL> { return Operator.multiply; } |
+ <MOD> { return Operator.modulo; } |
+ <POWOP> { return Operator.power; }
)
{ return null; }
}