diff options
author | Lester Solbakken <lesters@yahoo-inc.com> | 2017-11-15 15:40:00 +0100 |
---|---|---|
committer | Lester Solbakken <lesters@yahoo-inc.com> | 2017-11-15 15:40:00 +0100 |
commit | 0d69ba9852d879eb5bf61962095e95cd5f3e3c7d (patch) | |
tree | 793de7797a4786a3c319c5c0f6757d21a3247291 /searchlib/src/main/javacc | |
parent | c7c7f25a47b9debfc07a6ebbe7702d3d8ed8c476 (diff) |
Add Java ranking power operator
Diffstat (limited to 'searchlib/src/main/javacc')
-rwxr-xr-x | searchlib/src/main/javacc/RankingExpressionParser.jj | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/searchlib/src/main/javacc/RankingExpressionParser.jj b/searchlib/src/main/javacc/RankingExpressionParser.jj index 035a92b0365..7821ab88b86 100755 --- a/searchlib/src/main/javacc/RankingExpressionParser.jj +++ b/searchlib/src/main/javacc/RankingExpressionParser.jj @@ -66,6 +66,7 @@ TOKEN : <MUL: "*"> | <DOT: "."> | <MOD: "%"> | + <POWOP: "^"> | <DOLLAR: "$"> | <COMMA: ","> | @@ -204,13 +205,14 @@ ExpressionNode arithmeticExpression() : ArithmeticOperator arithmetic() : { } { - ( <ADD> { return ArithmeticOperator.PLUS; } | - <SUB> { return ArithmeticOperator.MINUS; } | - <DIV> { return ArithmeticOperator.DIVIDE; } | - <MUL> { return ArithmeticOperator.MULTIPLY; } | - <MOD> { return ArithmeticOperator.MODULO; } | - <AND> { return ArithmeticOperator.AND; } | - <OR> { return ArithmeticOperator.OR; } ) + ( <ADD> { return ArithmeticOperator.PLUS; } | + <SUB> { return ArithmeticOperator.MINUS; } | + <DIV> { return ArithmeticOperator.DIVIDE; } | + <MUL> { return ArithmeticOperator.MULTIPLY; } | + <MOD> { return ArithmeticOperator.MODULO; } | + <AND> { return ArithmeticOperator.AND; } | + <OR> { return ArithmeticOperator.OR; } | + <POWOP> { return ArithmeticOperator.POWER; } ) { return null; } } |