IDEMPIERE-4824 Boolean Logic Expression Enhancements (#717)
Regenerated source with correct antlr4 version to remove deprecation warnings.
This commit is contained in:
parent
d7153575e6
commit
e7ea517b99
|
@ -1,33 +1,33 @@
|
|||
QTEXT=17
|
||||
OR=2
|
||||
LT=8
|
||||
LPAREN=13
|
||||
TRUE=4
|
||||
DECIMAL=15
|
||||
TEXT=19
|
||||
RPAREN=14
|
||||
EQ=10
|
||||
GT=6
|
||||
NOT=3
|
||||
RE=12
|
||||
VARIABLE=16
|
||||
AND=1
|
||||
NE=11
|
||||
LE=9
|
||||
OR=2
|
||||
NOT=3
|
||||
TRUE=4
|
||||
FALSE=5
|
||||
DQTEXT=18
|
||||
WS=20
|
||||
GT=6
|
||||
GE=7
|
||||
'false'=5
|
||||
')'=14
|
||||
'('=13
|
||||
LT=8
|
||||
LE=9
|
||||
EQ=10
|
||||
NE=11
|
||||
RE=12
|
||||
LPAREN=13
|
||||
RPAREN=14
|
||||
DECIMAL=15
|
||||
VARIABLE=16
|
||||
QTEXT=17
|
||||
DQTEXT=18
|
||||
TEXT=19
|
||||
WS=20
|
||||
'&'=1
|
||||
'<='=9
|
||||
'>'=6
|
||||
'~'=12
|
||||
'$!'=3
|
||||
'='=10
|
||||
'|'=2
|
||||
'<'=8
|
||||
'>='=7
|
||||
'$!'=3
|
||||
'true'=4
|
||||
'false'=5
|
||||
'>'=6
|
||||
'>='=7
|
||||
'<'=8
|
||||
'<='=9
|
||||
'='=10
|
||||
'~'=12
|
||||
'('=13
|
||||
')'=14
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
// Generated from SimpleBoolean.g4 by ANTLR 4.4
|
||||
// Generated from SimpleBoolean.g4 by ANTLR 4.9.2
|
||||
|
||||
package org.idempiere.expression.logic;
|
||||
|
||||
import org.antlr.v4.runtime.misc.NotNull;
|
||||
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
|
||||
|
||||
/**
|
||||
|
@ -20,96 +19,96 @@ public class SimpleBooleanBaseVisitor<T> extends AbstractParseTreeVisitor<T> imp
|
|||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitBoolExpression(@NotNull SimpleBooleanParser.BoolExpressionContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitParse(SimpleBooleanParser.ParseContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitBool(@NotNull SimpleBooleanParser.BoolContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitBinaryExpression(SimpleBooleanParser.BinaryExpressionContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitNotExpression(@NotNull SimpleBooleanParser.NotExpressionContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitDecimalExpression(SimpleBooleanParser.DecimalExpressionContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitParse(@NotNull SimpleBooleanParser.ParseContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitBoolExpression(SimpleBooleanParser.BoolExpressionContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitParenExpression(@NotNull SimpleBooleanParser.ParenExpressionContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitContextVariables(SimpleBooleanParser.ContextVariablesContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitDoubleQuotedText(@NotNull SimpleBooleanParser.DoubleQuotedTextContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitNotExpression(SimpleBooleanParser.NotExpressionContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitBinaryExpression(@NotNull SimpleBooleanParser.BinaryExpressionContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitParenExpression(SimpleBooleanParser.ParenExpressionContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitComparator(@NotNull SimpleBooleanParser.ComparatorContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitText(SimpleBooleanParser.TextContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitDecimalExpression(@NotNull SimpleBooleanParser.DecimalExpressionContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitQuotedText(SimpleBooleanParser.QuotedTextContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitBinary(@NotNull SimpleBooleanParser.BinaryContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitDoubleQuotedText(SimpleBooleanParser.DoubleQuotedTextContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitContextVariables(@NotNull SimpleBooleanParser.ContextVariablesContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitComparatorExpression(SimpleBooleanParser.ComparatorExpressionContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitText(@NotNull SimpleBooleanParser.TextContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitComparator(SimpleBooleanParser.ComparatorContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitQuotedText(@NotNull SimpleBooleanParser.QuotedTextContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitBinary(SimpleBooleanParser.BinaryContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitComparatorExpression(@NotNull SimpleBooleanParser.ComparatorExpressionContext ctx) { return visitChildren(ctx); }
|
||||
@Override public T visitBool(SimpleBooleanParser.BoolContext ctx) { return visitChildren(ctx); }
|
||||
}
|
|
@ -74,4 +74,4 @@ mode names:
|
|||
DEFAULT_MODE
|
||||
|
||||
atn:
|
||||
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 22, 136, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 5, 16, 83, 10, 16, 3, 16, 6, 16, 86, 10, 16, 13, 16, 14, 16, 87, 3, 16, 3, 16, 6, 16, 92, 10, 16, 13, 16, 14, 16, 93, 5, 16, 96, 10, 16, 3, 17, 3, 17, 7, 17, 100, 10, 17, 12, 17, 14, 17, 103, 11, 17, 3, 17, 3, 17, 3, 18, 3, 18, 7, 18, 109, 10, 18, 12, 18, 14, 18, 112, 11, 18, 3, 18, 3, 18, 3, 19, 3, 19, 7, 19, 118, 10, 19, 12, 19, 14, 19, 121, 11, 19, 3, 19, 3, 19, 3, 20, 6, 20, 126, 10, 20, 13, 20, 14, 20, 127, 3, 21, 6, 21, 131, 10, 21, 13, 21, 14, 21, 132, 3, 21, 3, 21, 4, 110, 119, 2, 22, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 3, 2, 9, 4, 2, 35, 35, 96, 96, 3, 2, 50, 59, 8, 2, 37, 38, 50, 59, 67, 92, 97, 97, 99, 124, 128, 128, 3, 2, 41, 41, 3, 2, 36, 36, 7, 2, 46, 46, 50, 59, 67, 92, 97, 97, 99, 124, 5, 2, 11, 12, 14, 15, 34, 34, 2, 144, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 3, 43, 3, 2, 2, 2, 5, 45, 3, 2, 2, 2, 7, 47, 3, 2, 2, 2, 9, 50, 3, 2, 2, 2, 11, 55, 3, 2, 2, 2, 13, 61, 3, 2, 2, 2, 15, 63, 3, 2, 2, 2, 17, 66, 3, 2, 2, 2, 19, 68, 3, 2, 2, 2, 21, 71, 3, 2, 2, 2, 23, 73, 3, 2, 2, 2, 25, 75, 3, 2, 2, 2, 27, 77, 3, 2, 2, 2, 29, 79, 3, 2, 2, 2, 31, 82, 3, 2, 2, 2, 33, 97, 3, 2, 2, 2, 35, 106, 3, 2, 2, 2, 37, 115, 3, 2, 2, 2, 39, 125, 3, 2, 2, 2, 41, 130, 3, 2, 2, 2, 43, 44, 7, 40, 2, 2, 44, 4, 3, 2, 2, 2, 45, 46, 7, 126, 2, 2, 46, 6, 3, 2, 2, 2, 47, 48, 7, 38, 2, 2, 48, 49, 7, 35, 2, 2, 49, 8, 3, 2, 2, 2, 50, 51, 7, 118, 2, 2, 51, 52, 7, 116, 2, 2, 52, 53, 7, 119, 2, 2, 53, 54, 7, 103, 2, 2, 54, 10, 3, 2, 2, 2, 55, 56, 7, 104, 2, 2, 56, 57, 7, 99, 2, 2, 57, 58, 7, 110, 2, 2, 58, 59, 7, 117, 2, 2, 59, 60, 7, 103, 2, 2, 60, 12, 3, 2, 2, 2, 61, 62, 7, 64, 2, 2, 62, 14, 3, 2, 2, 2, 63, 64, 7, 64, 2, 2, 64, 65, 7, 63, 2, 2, 65, 16, 3, 2, 2, 2, 66, 67, 7, 62, 2, 2, 67, 18, 3, 2, 2, 2, 68, 69, 7, 62, 2, 2, 69, 70, 7, 63, 2, 2, 70, 20, 3, 2, 2, 2, 71, 72, 7, 63, 2, 2, 72, 22, 3, 2, 2, 2, 73, 74, 9, 2, 2, 2, 74, 24, 3, 2, 2, 2, 75, 76, 7, 128, 2, 2, 76, 26, 3, 2, 2, 2, 77, 78, 7, 42, 2, 2, 78, 28, 3, 2, 2, 2, 79, 80, 7, 43, 2, 2, 80, 30, 3, 2, 2, 2, 81, 83, 7, 47, 2, 2, 82, 81, 3, 2, 2, 2, 82, 83, 3, 2, 2, 2, 83, 85, 3, 2, 2, 2, 84, 86, 9, 3, 2, 2, 85, 84, 3, 2, 2, 2, 86, 87, 3, 2, 2, 2, 87, 85, 3, 2, 2, 2, 87, 88, 3, 2, 2, 2, 88, 95, 3, 2, 2, 2, 89, 91, 7, 48, 2, 2, 90, 92, 9, 3, 2, 2, 91, 90, 3, 2, 2, 2, 92, 93, 3, 2, 2, 2, 93, 91, 3, 2, 2, 2, 93, 94, 3, 2, 2, 2, 94, 96, 3, 2, 2, 2, 95, 89, 3, 2, 2, 2, 95, 96, 3, 2, 2, 2, 96, 32, 3, 2, 2, 2, 97, 101, 7, 66, 2, 2, 98, 100, 9, 4, 2, 2, 99, 98, 3, 2, 2, 2, 100, 103, 3, 2, 2, 2, 101, 99, 3, 2, 2, 2, 101, 102, 3, 2, 2, 2, 102, 104, 3, 2, 2, 2, 103, 101, 3, 2, 2, 2, 104, 105, 7, 66, 2, 2, 105, 34, 3, 2, 2, 2, 106, 110, 9, 5, 2, 2, 107, 109, 11, 2, 2, 2, 108, 107, 3, 2, 2, 2, 109, 112, 3, 2, 2, 2, 110, 111, 3, 2, 2, 2, 110, 108, 3, 2, 2, 2, 111, 113, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 113, 114, 9, 5, 2, 2, 114, 36, 3, 2, 2, 2, 115, 119, 9, 6, 2, 2, 116, 118, 11, 2, 2, 2, 117, 116, 3, 2, 2, 2, 118, 121, 3, 2, 2, 2, 119, 120, 3, 2, 2, 2, 119, 117, 3, 2, 2, 2, 120, 122, 3, 2, 2, 2, 121, 119, 3, 2, 2, 2, 122, 123, 9, 6, 2, 2, 123, 38, 3, 2, 2, 2, 124, 126, 9, 7, 2, 2, 125, 124, 3, 2, 2, 2, 126, 127, 3, 2, 2, 2, 127, 125, 3, 2, 2, 2, 127, 128, 3, 2, 2, 2, 128, 40, 3, 2, 2, 2, 129, 131, 9, 8, 2, 2, 130, 129, 3, 2, 2, 2, 131, 132, 3, 2, 2, 2, 132, 130, 3, 2, 2, 2, 132, 133, 3, 2, 2, 2, 133, 134, 3, 2, 2, 2, 134, 135, 8, 21, 2, 2, 135, 42, 3, 2, 2, 2, 12, 2, 82, 87, 93, 95, 101, 110, 119, 127, 132, 3, 8, 2, 2]
|
||||
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 22, 136, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 5, 16, 83, 10, 16, 3, 16, 6, 16, 86, 10, 16, 13, 16, 14, 16, 87, 3, 16, 3, 16, 6, 16, 92, 10, 16, 13, 16, 14, 16, 93, 5, 16, 96, 10, 16, 3, 17, 3, 17, 7, 17, 100, 10, 17, 12, 17, 14, 17, 103, 11, 17, 3, 17, 3, 17, 3, 18, 3, 18, 7, 18, 109, 10, 18, 12, 18, 14, 18, 112, 11, 18, 3, 18, 3, 18, 3, 19, 3, 19, 7, 19, 118, 10, 19, 12, 19, 14, 19, 121, 11, 19, 3, 19, 3, 19, 3, 20, 6, 20, 126, 10, 20, 13, 20, 14, 20, 127, 3, 21, 6, 21, 131, 10, 21, 13, 21, 14, 21, 132, 3, 21, 3, 21, 5, 101, 110, 119, 2, 22, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 3, 2, 8, 4, 2, 35, 35, 96, 96, 3, 2, 50, 59, 3, 2, 41, 41, 3, 2, 36, 36, 7, 2, 46, 46, 50, 59, 67, 92, 97, 97, 99, 124, 5, 2, 11, 12, 14, 15, 34, 34, 2, 144, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 3, 43, 3, 2, 2, 2, 5, 45, 3, 2, 2, 2, 7, 47, 3, 2, 2, 2, 9, 50, 3, 2, 2, 2, 11, 55, 3, 2, 2, 2, 13, 61, 3, 2, 2, 2, 15, 63, 3, 2, 2, 2, 17, 66, 3, 2, 2, 2, 19, 68, 3, 2, 2, 2, 21, 71, 3, 2, 2, 2, 23, 73, 3, 2, 2, 2, 25, 75, 3, 2, 2, 2, 27, 77, 3, 2, 2, 2, 29, 79, 3, 2, 2, 2, 31, 82, 3, 2, 2, 2, 33, 97, 3, 2, 2, 2, 35, 106, 3, 2, 2, 2, 37, 115, 3, 2, 2, 2, 39, 125, 3, 2, 2, 2, 41, 130, 3, 2, 2, 2, 43, 44, 7, 40, 2, 2, 44, 4, 3, 2, 2, 2, 45, 46, 7, 126, 2, 2, 46, 6, 3, 2, 2, 2, 47, 48, 7, 38, 2, 2, 48, 49, 7, 35, 2, 2, 49, 8, 3, 2, 2, 2, 50, 51, 7, 118, 2, 2, 51, 52, 7, 116, 2, 2, 52, 53, 7, 119, 2, 2, 53, 54, 7, 103, 2, 2, 54, 10, 3, 2, 2, 2, 55, 56, 7, 104, 2, 2, 56, 57, 7, 99, 2, 2, 57, 58, 7, 110, 2, 2, 58, 59, 7, 117, 2, 2, 59, 60, 7, 103, 2, 2, 60, 12, 3, 2, 2, 2, 61, 62, 7, 64, 2, 2, 62, 14, 3, 2, 2, 2, 63, 64, 7, 64, 2, 2, 64, 65, 7, 63, 2, 2, 65, 16, 3, 2, 2, 2, 66, 67, 7, 62, 2, 2, 67, 18, 3, 2, 2, 2, 68, 69, 7, 62, 2, 2, 69, 70, 7, 63, 2, 2, 70, 20, 3, 2, 2, 2, 71, 72, 7, 63, 2, 2, 72, 22, 3, 2, 2, 2, 73, 74, 9, 2, 2, 2, 74, 24, 3, 2, 2, 2, 75, 76, 7, 128, 2, 2, 76, 26, 3, 2, 2, 2, 77, 78, 7, 42, 2, 2, 78, 28, 3, 2, 2, 2, 79, 80, 7, 43, 2, 2, 80, 30, 3, 2, 2, 2, 81, 83, 7, 47, 2, 2, 82, 81, 3, 2, 2, 2, 82, 83, 3, 2, 2, 2, 83, 85, 3, 2, 2, 2, 84, 86, 9, 3, 2, 2, 85, 84, 3, 2, 2, 2, 86, 87, 3, 2, 2, 2, 87, 85, 3, 2, 2, 2, 87, 88, 3, 2, 2, 2, 88, 95, 3, 2, 2, 2, 89, 91, 7, 48, 2, 2, 90, 92, 9, 3, 2, 2, 91, 90, 3, 2, 2, 2, 92, 93, 3, 2, 2, 2, 93, 91, 3, 2, 2, 2, 93, 94, 3, 2, 2, 2, 94, 96, 3, 2, 2, 2, 95, 89, 3, 2, 2, 2, 95, 96, 3, 2, 2, 2, 96, 32, 3, 2, 2, 2, 97, 101, 7, 66, 2, 2, 98, 100, 11, 2, 2, 2, 99, 98, 3, 2, 2, 2, 100, 103, 3, 2, 2, 2, 101, 102, 3, 2, 2, 2, 101, 99, 3, 2, 2, 2, 102, 104, 3, 2, 2, 2, 103, 101, 3, 2, 2, 2, 104, 105, 7, 66, 2, 2, 105, 34, 3, 2, 2, 2, 106, 110, 9, 4, 2, 2, 107, 109, 11, 2, 2, 2, 108, 107, 3, 2, 2, 2, 109, 112, 3, 2, 2, 2, 110, 111, 3, 2, 2, 2, 110, 108, 3, 2, 2, 2, 111, 113, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 113, 114, 9, 4, 2, 2, 114, 36, 3, 2, 2, 2, 115, 119, 9, 5, 2, 2, 116, 118, 11, 2, 2, 2, 117, 116, 3, 2, 2, 2, 118, 121, 3, 2, 2, 2, 119, 120, 3, 2, 2, 2, 119, 117, 3, 2, 2, 2, 120, 122, 3, 2, 2, 2, 121, 119, 3, 2, 2, 2, 122, 123, 9, 5, 2, 2, 123, 38, 3, 2, 2, 2, 124, 126, 9, 6, 2, 2, 125, 124, 3, 2, 2, 2, 126, 127, 3, 2, 2, 2, 127, 125, 3, 2, 2, 2, 127, 128, 3, 2, 2, 2, 128, 40, 3, 2, 2, 2, 129, 131, 9, 7, 2, 2, 130, 129, 3, 2, 2, 2, 131, 132, 3, 2, 2, 2, 132, 130, 3, 2, 2, 2, 132, 133, 3, 2, 2, 2, 133, 134, 3, 2, 2, 2, 134, 135, 8, 21, 2, 2, 135, 42, 3, 2, 2, 2, 12, 2, 82, 87, 93, 95, 101, 110, 119, 127, 132, 3, 8, 2, 2]
|
|
@ -1,4 +1,4 @@
|
|||
// Generated from SimpleBoolean.g4 by ANTLR 4.4
|
||||
// Generated from SimpleBoolean.g4 by ANTLR 4.9.2
|
||||
|
||||
package org.idempiere.expression.logic;
|
||||
|
||||
|
@ -13,7 +13,7 @@ import org.antlr.v4.runtime.misc.*;
|
|||
|
||||
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
|
||||
public class SimpleBooleanLexer extends Lexer {
|
||||
static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); }
|
||||
static { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); }
|
||||
|
||||
protected static final DFA[] _decisionToDFA;
|
||||
protected static final PredictionContextCache _sharedContextCache =
|
||||
|
@ -22,21 +22,70 @@ public class SimpleBooleanLexer extends Lexer {
|
|||
AND=1, OR=2, NOT=3, TRUE=4, FALSE=5, GT=6, GE=7, LT=8, LE=9, EQ=10, NE=11,
|
||||
RE=12, LPAREN=13, RPAREN=14, DECIMAL=15, VARIABLE=16, QTEXT=17, DQTEXT=18,
|
||||
TEXT=19, WS=20;
|
||||
public static String[] channelNames = {
|
||||
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
||||
};
|
||||
|
||||
public static String[] modeNames = {
|
||||
"DEFAULT_MODE"
|
||||
};
|
||||
|
||||
public static final String[] tokenNames = {
|
||||
"'\\u0000'", "'\\u0001'", "'\\u0002'", "'\\u0003'", "'\\u0004'", "'\\u0005'",
|
||||
"'\\u0006'", "'\\u0007'", "'\b'", "'\t'", "'\n'", "'\\u000B'", "'\f'",
|
||||
"'\r'", "'\\u000E'", "'\\u000F'", "'\\u0010'", "'\\u0011'", "'\\u0012'",
|
||||
"'\\u0013'", "'\\u0014'"
|
||||
};
|
||||
public static final String[] ruleNames = {
|
||||
"AND", "OR", "NOT", "TRUE", "FALSE", "GT", "GE", "LT", "LE", "EQ", "NE",
|
||||
"RE", "LPAREN", "RPAREN", "DECIMAL", "VARIABLE", "QTEXT", "DQTEXT", "TEXT",
|
||||
"WS"
|
||||
};
|
||||
private static String[] makeRuleNames() {
|
||||
return new String[] {
|
||||
"AND", "OR", "NOT", "TRUE", "FALSE", "GT", "GE", "LT", "LE", "EQ", "NE",
|
||||
"RE", "LPAREN", "RPAREN", "DECIMAL", "VARIABLE", "QTEXT", "DQTEXT", "TEXT",
|
||||
"WS"
|
||||
};
|
||||
}
|
||||
public static final String[] ruleNames = makeRuleNames();
|
||||
|
||||
private static String[] makeLiteralNames() {
|
||||
return new String[] {
|
||||
null, "'&'", "'|'", "'$!'", "'true'", "'false'", "'>'", "'>='", "'<'",
|
||||
"'<='", "'='", null, "'~'", "'('", "')'"
|
||||
};
|
||||
}
|
||||
private static final String[] _LITERAL_NAMES = makeLiteralNames();
|
||||
private static String[] makeSymbolicNames() {
|
||||
return new String[] {
|
||||
null, "AND", "OR", "NOT", "TRUE", "FALSE", "GT", "GE", "LT", "LE", "EQ",
|
||||
"NE", "RE", "LPAREN", "RPAREN", "DECIMAL", "VARIABLE", "QTEXT", "DQTEXT",
|
||||
"TEXT", "WS"
|
||||
};
|
||||
}
|
||||
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
|
||||
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #VOCABULARY} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String[] tokenNames;
|
||||
static {
|
||||
tokenNames = new String[_SYMBOLIC_NAMES.length];
|
||||
for (int i = 0; i < tokenNames.length; i++) {
|
||||
tokenNames[i] = VOCABULARY.getLiteralName(i);
|
||||
if (tokenNames[i] == null) {
|
||||
tokenNames[i] = VOCABULARY.getSymbolicName(i);
|
||||
}
|
||||
|
||||
if (tokenNames[i] == null) {
|
||||
tokenNames[i] = "<INVALID>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public String[] getTokenNames() {
|
||||
return tokenNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public Vocabulary getVocabulary() {
|
||||
return VOCABULARY;
|
||||
}
|
||||
|
||||
|
||||
public SimpleBooleanLexer(CharStream input) {
|
||||
|
@ -47,15 +96,15 @@ public class SimpleBooleanLexer extends Lexer {
|
|||
@Override
|
||||
public String getGrammarFileName() { return "SimpleBoolean.g4"; }
|
||||
|
||||
@Override
|
||||
public String[] getTokenNames() { return tokenNames; }
|
||||
|
||||
@Override
|
||||
public String[] getRuleNames() { return ruleNames; }
|
||||
|
||||
@Override
|
||||
public String getSerializedATN() { return _serializedATN; }
|
||||
|
||||
@Override
|
||||
public String[] getChannelNames() { return channelNames; }
|
||||
|
||||
@Override
|
||||
public String[] getModeNames() { return modeNames; }
|
||||
|
||||
|
@ -63,7 +112,7 @@ public class SimpleBooleanLexer extends Lexer {
|
|||
public ATN getATN() { return _ATN; }
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\26\u0088\b\1\4\2"+
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\26\u0088\b\1\4\2"+
|
||||
"\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+
|
||||
"\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
|
||||
"\t\22\4\23\t\23\4\24\t\24\4\25\t\25\3\2\3\2\3\3\3\3\3\4\3\4\3\4\3\5\3"+
|
||||
|
@ -75,15 +124,15 @@ public class SimpleBooleanLexer extends Lexer {
|
|||
"\3\23\3\23\3\24\6\24~\n\24\r\24\16\24\177\3\25\6\25\u0083\n\25\r\25\16"+
|
||||
"\25\u0084\3\25\3\25\5enw\2\26\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13"+
|
||||
"\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26\3\2\b\4\2##``"+
|
||||
"\3\2\62;\3\2))\3\2$$\7\2..\62;C\\aac|\5\2\13\f\16\17\"\"\u0090\2\3\3\2"+
|
||||
"\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17"+
|
||||
"\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2"+
|
||||
"\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3"+
|
||||
"\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\3+\3\2\2\2\5-\3\2\2\2\7/\3\2\2\2\t\62\3"+
|
||||
"\2\2\2\13\67\3\2\2\2\r=\3\2\2\2\17?\3\2\2\2\21B\3\2\2\2\23D\3\2\2\2\25"+
|
||||
"G\3\2\2\2\27I\3\2\2\2\31K\3\2\2\2\33M\3\2\2\2\35O\3\2\2\2\37R\3\2\2\2"+
|
||||
"!a\3\2\2\2#j\3\2\2\2%s\3\2\2\2\'}\3\2\2\2)\u0082\3\2\2\2+,\7(\2\2,\4\3"+
|
||||
"\2\2\2-.\7~\2\2.\6\3\2\2\2/\60\7&\2\2\60\61\7#\2\2\61\b\3\2\2\2\62\63"+
|
||||
"\3\2\62;\3\2))\3\2$$\7\2..\62;C\\aac|\5\2\13\f\16\17\"\"\2\u0090\2\3\3"+
|
||||
"\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2"+
|
||||
"\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3"+
|
||||
"\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2"+
|
||||
"%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\3+\3\2\2\2\5-\3\2\2\2\7/\3\2\2\2\t\62"+
|
||||
"\3\2\2\2\13\67\3\2\2\2\r=\3\2\2\2\17?\3\2\2\2\21B\3\2\2\2\23D\3\2\2\2"+
|
||||
"\25G\3\2\2\2\27I\3\2\2\2\31K\3\2\2\2\33M\3\2\2\2\35O\3\2\2\2\37R\3\2\2"+
|
||||
"\2!a\3\2\2\2#j\3\2\2\2%s\3\2\2\2\'}\3\2\2\2)\u0082\3\2\2\2+,\7(\2\2,\4"+
|
||||
"\3\2\2\2-.\7~\2\2.\6\3\2\2\2/\60\7&\2\2\60\61\7#\2\2\61\b\3\2\2\2\62\63"+
|
||||
"\7v\2\2\63\64\7t\2\2\64\65\7w\2\2\65\66\7g\2\2\66\n\3\2\2\2\678\7h\2\2"+
|
||||
"89\7c\2\29:\7n\2\2:;\7u\2\2;<\7g\2\2<\f\3\2\2\2=>\7@\2\2>\16\3\2\2\2?"+
|
||||
"@\7@\2\2@A\7?\2\2A\20\3\2\2\2BC\7>\2\2C\22\3\2\2\2DE\7>\2\2EF\7?\2\2F"+
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
QTEXT=17
|
||||
OR=2
|
||||
LT=8
|
||||
LPAREN=13
|
||||
TRUE=4
|
||||
DECIMAL=15
|
||||
TEXT=19
|
||||
RPAREN=14
|
||||
EQ=10
|
||||
GT=6
|
||||
NOT=3
|
||||
RE=12
|
||||
VARIABLE=16
|
||||
AND=1
|
||||
NE=11
|
||||
LE=9
|
||||
OR=2
|
||||
NOT=3
|
||||
TRUE=4
|
||||
FALSE=5
|
||||
DQTEXT=18
|
||||
WS=20
|
||||
GT=6
|
||||
GE=7
|
||||
'false'=5
|
||||
')'=14
|
||||
'('=13
|
||||
LT=8
|
||||
LE=9
|
||||
EQ=10
|
||||
NE=11
|
||||
RE=12
|
||||
LPAREN=13
|
||||
RPAREN=14
|
||||
DECIMAL=15
|
||||
VARIABLE=16
|
||||
QTEXT=17
|
||||
DQTEXT=18
|
||||
TEXT=19
|
||||
WS=20
|
||||
'&'=1
|
||||
'<='=9
|
||||
'>'=6
|
||||
'~'=12
|
||||
'$!'=3
|
||||
'='=10
|
||||
'|'=2
|
||||
'<'=8
|
||||
'>='=7
|
||||
'$!'=3
|
||||
'true'=4
|
||||
'false'=5
|
||||
'>'=6
|
||||
'>='=7
|
||||
'<'=8
|
||||
'<='=9
|
||||
'='=10
|
||||
'~'=12
|
||||
'('=13
|
||||
')'=14
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated from SimpleBoolean.g4 by ANTLR 4.4
|
||||
// Generated from SimpleBoolean.g4 by ANTLR 4.9.2
|
||||
|
||||
package org.idempiere.expression.logic;
|
||||
|
||||
|
@ -13,7 +13,7 @@ import java.util.ArrayList;
|
|||
|
||||
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
|
||||
public class SimpleBooleanParser extends Parser {
|
||||
static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); }
|
||||
static { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); }
|
||||
|
||||
protected static final DFA[] _decisionToDFA;
|
||||
protected static final PredictionContextCache _sharedContextCache =
|
||||
|
@ -22,24 +22,67 @@ public class SimpleBooleanParser extends Parser {
|
|||
AND=1, OR=2, NOT=3, TRUE=4, FALSE=5, GT=6, GE=7, LT=8, LE=9, EQ=10, NE=11,
|
||||
RE=12, LPAREN=13, RPAREN=14, DECIMAL=15, VARIABLE=16, QTEXT=17, DQTEXT=18,
|
||||
TEXT=19, WS=20;
|
||||
public static final String[] tokenNames = {
|
||||
"<INVALID>", "'&'", "'|'", "'$!'", "'true'", "'false'", "'>'", "'>='",
|
||||
"'<'", "'<='", "'='", "NE", "'~'", "'('", "')'", "DECIMAL", "VARIABLE",
|
||||
"QTEXT", "DQTEXT", "TEXT", "WS"
|
||||
};
|
||||
public static final int
|
||||
RULE_parse = 0, RULE_expression = 1, RULE_comparator = 2, RULE_binary = 3,
|
||||
RULE_bool = 4;
|
||||
public static final String[] ruleNames = {
|
||||
"parse", "expression", "comparator", "binary", "bool"
|
||||
};
|
||||
private static String[] makeRuleNames() {
|
||||
return new String[] {
|
||||
"parse", "expression", "comparator", "binary", "bool"
|
||||
};
|
||||
}
|
||||
public static final String[] ruleNames = makeRuleNames();
|
||||
|
||||
private static String[] makeLiteralNames() {
|
||||
return new String[] {
|
||||
null, "'&'", "'|'", "'$!'", "'true'", "'false'", "'>'", "'>='", "'<'",
|
||||
"'<='", "'='", null, "'~'", "'('", "')'"
|
||||
};
|
||||
}
|
||||
private static final String[] _LITERAL_NAMES = makeLiteralNames();
|
||||
private static String[] makeSymbolicNames() {
|
||||
return new String[] {
|
||||
null, "AND", "OR", "NOT", "TRUE", "FALSE", "GT", "GE", "LT", "LE", "EQ",
|
||||
"NE", "RE", "LPAREN", "RPAREN", "DECIMAL", "VARIABLE", "QTEXT", "DQTEXT",
|
||||
"TEXT", "WS"
|
||||
};
|
||||
}
|
||||
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
|
||||
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #VOCABULARY} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String[] tokenNames;
|
||||
static {
|
||||
tokenNames = new String[_SYMBOLIC_NAMES.length];
|
||||
for (int i = 0; i < tokenNames.length; i++) {
|
||||
tokenNames[i] = VOCABULARY.getLiteralName(i);
|
||||
if (tokenNames[i] == null) {
|
||||
tokenNames[i] = VOCABULARY.getSymbolicName(i);
|
||||
}
|
||||
|
||||
if (tokenNames[i] == null) {
|
||||
tokenNames[i] = "<INVALID>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public String[] getTokenNames() {
|
||||
return tokenNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public Vocabulary getVocabulary() {
|
||||
return VOCABULARY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGrammarFileName() { return "SimpleBoolean.g4"; }
|
||||
|
||||
@Override
|
||||
public String[] getTokenNames() { return tokenNames; }
|
||||
|
||||
@Override
|
||||
public String[] getRuleNames() { return ruleNames; }
|
||||
|
||||
|
@ -53,11 +96,12 @@ public class SimpleBooleanParser extends Parser {
|
|||
super(input);
|
||||
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
|
||||
}
|
||||
|
||||
public static class ParseContext extends ParserRuleContext {
|
||||
public TerminalNode EOF() { return getToken(SimpleBooleanParser.EOF, 0); }
|
||||
public ExpressionContext expression() {
|
||||
return getRuleContext(ExpressionContext.class,0);
|
||||
}
|
||||
public TerminalNode EOF() { return getToken(SimpleBooleanParser.EOF, 0); }
|
||||
public ParseContext(ParserRuleContext parent, int invokingState) {
|
||||
super(parent, invokingState);
|
||||
}
|
||||
|
@ -75,8 +119,10 @@ public class SimpleBooleanParser extends Parser {
|
|||
try {
|
||||
enterOuterAlt(_localctx, 1);
|
||||
{
|
||||
setState(10); expression(0);
|
||||
setState(11); match(EOF);
|
||||
setState(10);
|
||||
expression(0);
|
||||
setState(11);
|
||||
match(EOF);
|
||||
}
|
||||
}
|
||||
catch (RecognitionException re) {
|
||||
|
@ -105,14 +151,14 @@ public class SimpleBooleanParser extends Parser {
|
|||
public ExpressionContext left;
|
||||
public BinaryContext op;
|
||||
public ExpressionContext right;
|
||||
public BinaryContext binary() {
|
||||
return getRuleContext(BinaryContext.class,0);
|
||||
public List<ExpressionContext> expression() {
|
||||
return getRuleContexts(ExpressionContext.class);
|
||||
}
|
||||
public ExpressionContext expression(int i) {
|
||||
return getRuleContext(ExpressionContext.class,i);
|
||||
}
|
||||
public List<ExpressionContext> expression() {
|
||||
return getRuleContexts(ExpressionContext.class);
|
||||
public BinaryContext binary() {
|
||||
return getRuleContext(BinaryContext.class,0);
|
||||
}
|
||||
public BinaryExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
|
||||
@Override
|
||||
|
@ -164,10 +210,10 @@ public class SimpleBooleanParser extends Parser {
|
|||
}
|
||||
public static class ParenExpressionContext extends ExpressionContext {
|
||||
public TerminalNode LPAREN() { return getToken(SimpleBooleanParser.LPAREN, 0); }
|
||||
public TerminalNode RPAREN() { return getToken(SimpleBooleanParser.RPAREN, 0); }
|
||||
public ExpressionContext expression() {
|
||||
return getRuleContext(ExpressionContext.class,0);
|
||||
}
|
||||
public TerminalNode RPAREN() { return getToken(SimpleBooleanParser.RPAREN, 0); }
|
||||
public ParenExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
|
||||
@Override
|
||||
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
||||
|
@ -206,14 +252,14 @@ public class SimpleBooleanParser extends Parser {
|
|||
public ExpressionContext left;
|
||||
public ComparatorContext op;
|
||||
public ExpressionContext right;
|
||||
public ComparatorContext comparator() {
|
||||
return getRuleContext(ComparatorContext.class,0);
|
||||
public List<ExpressionContext> expression() {
|
||||
return getRuleContexts(ExpressionContext.class);
|
||||
}
|
||||
public ExpressionContext expression(int i) {
|
||||
return getRuleContext(ExpressionContext.class,i);
|
||||
}
|
||||
public List<ExpressionContext> expression() {
|
||||
return getRuleContexts(ExpressionContext.class);
|
||||
public ComparatorContext comparator() {
|
||||
return getRuleContext(ComparatorContext.class,0);
|
||||
}
|
||||
public ComparatorExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
|
||||
@Override
|
||||
|
@ -239,25 +285,31 @@ public class SimpleBooleanParser extends Parser {
|
|||
enterOuterAlt(_localctx, 1);
|
||||
{
|
||||
setState(26);
|
||||
_errHandler.sync(this);
|
||||
switch (_input.LA(1)) {
|
||||
case NOT:
|
||||
{
|
||||
_localctx = new NotExpressionContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
|
||||
setState(14); match(NOT);
|
||||
setState(15); expression(9);
|
||||
}
|
||||
break;
|
||||
case LPAREN:
|
||||
{
|
||||
_localctx = new ParenExpressionContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(16); match(LPAREN);
|
||||
setState(17); expression(0);
|
||||
setState(18); match(RPAREN);
|
||||
|
||||
setState(14);
|
||||
match(LPAREN);
|
||||
setState(15);
|
||||
expression(0);
|
||||
setState(16);
|
||||
match(RPAREN);
|
||||
}
|
||||
break;
|
||||
case NOT:
|
||||
{
|
||||
_localctx = new NotExpressionContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(18);
|
||||
match(NOT);
|
||||
setState(19);
|
||||
expression(9);
|
||||
}
|
||||
break;
|
||||
case TRUE:
|
||||
|
@ -266,7 +318,8 @@ public class SimpleBooleanParser extends Parser {
|
|||
_localctx = new BoolExpressionContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(20); bool();
|
||||
setState(20);
|
||||
bool();
|
||||
}
|
||||
break;
|
||||
case VARIABLE:
|
||||
|
@ -274,7 +327,8 @@ public class SimpleBooleanParser extends Parser {
|
|||
_localctx = new ContextVariablesContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(21); match(VARIABLE);
|
||||
setState(21);
|
||||
match(VARIABLE);
|
||||
}
|
||||
break;
|
||||
case QTEXT:
|
||||
|
@ -282,7 +336,8 @@ public class SimpleBooleanParser extends Parser {
|
|||
_localctx = new QuotedTextContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(22); match(QTEXT);
|
||||
setState(22);
|
||||
match(QTEXT);
|
||||
}
|
||||
break;
|
||||
case DQTEXT:
|
||||
|
@ -290,7 +345,8 @@ public class SimpleBooleanParser extends Parser {
|
|||
_localctx = new DoubleQuotedTextContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(23); match(DQTEXT);
|
||||
setState(23);
|
||||
match(DQTEXT);
|
||||
}
|
||||
break;
|
||||
case TEXT:
|
||||
|
@ -298,7 +354,8 @@ public class SimpleBooleanParser extends Parser {
|
|||
_localctx = new TextContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(24); match(TEXT);
|
||||
setState(24);
|
||||
match(TEXT);
|
||||
}
|
||||
break;
|
||||
case DECIMAL:
|
||||
|
@ -306,7 +363,8 @@ public class SimpleBooleanParser extends Parser {
|
|||
_localctx = new DecimalExpressionContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(25); match(DECIMAL);
|
||||
setState(25);
|
||||
match(DECIMAL);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -322,6 +380,7 @@ public class SimpleBooleanParser extends Parser {
|
|||
_prevctx = _localctx;
|
||||
{
|
||||
setState(36);
|
||||
_errHandler.sync(this);
|
||||
switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
|
||||
case 1:
|
||||
{
|
||||
|
@ -330,8 +389,10 @@ public class SimpleBooleanParser extends Parser {
|
|||
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
||||
setState(28);
|
||||
if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)");
|
||||
setState(29); ((ComparatorExpressionContext)_localctx).op = comparator();
|
||||
setState(30); ((ComparatorExpressionContext)_localctx).right = expression(9);
|
||||
setState(29);
|
||||
((ComparatorExpressionContext)_localctx).op = comparator();
|
||||
setState(30);
|
||||
((ComparatorExpressionContext)_localctx).right = expression(9);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
@ -341,8 +402,10 @@ public class SimpleBooleanParser extends Parser {
|
|||
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
||||
setState(32);
|
||||
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
|
||||
setState(33); ((BinaryExpressionContext)_localctx).op = binary();
|
||||
setState(34); ((BinaryExpressionContext)_localctx).right = expression(8);
|
||||
setState(33);
|
||||
((BinaryExpressionContext)_localctx).op = binary();
|
||||
setState(34);
|
||||
((BinaryExpressionContext)_localctx).right = expression(8);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -366,13 +429,13 @@ public class SimpleBooleanParser extends Parser {
|
|||
}
|
||||
|
||||
public static class ComparatorContext extends ParserRuleContext {
|
||||
public TerminalNode RE() { return getToken(SimpleBooleanParser.RE, 0); }
|
||||
public TerminalNode GT() { return getToken(SimpleBooleanParser.GT, 0); }
|
||||
public TerminalNode GE() { return getToken(SimpleBooleanParser.GE, 0); }
|
||||
public TerminalNode LT() { return getToken(SimpleBooleanParser.LT, 0); }
|
||||
public TerminalNode GT() { return getToken(SimpleBooleanParser.GT, 0); }
|
||||
public TerminalNode LE() { return getToken(SimpleBooleanParser.LE, 0); }
|
||||
public TerminalNode EQ() { return getToken(SimpleBooleanParser.EQ, 0); }
|
||||
public TerminalNode NE() { return getToken(SimpleBooleanParser.NE, 0); }
|
||||
public TerminalNode RE() { return getToken(SimpleBooleanParser.RE, 0); }
|
||||
public ComparatorContext(ParserRuleContext parent, int invokingState) {
|
||||
super(parent, invokingState);
|
||||
}
|
||||
|
@ -396,7 +459,11 @@ public class SimpleBooleanParser extends Parser {
|
|||
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << GT) | (1L << GE) | (1L << LT) | (1L << LE) | (1L << EQ) | (1L << NE) | (1L << RE))) != 0)) ) {
|
||||
_errHandler.recoverInline(this);
|
||||
}
|
||||
consume();
|
||||
else {
|
||||
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
||||
_errHandler.reportMatch(this);
|
||||
consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (RecognitionException re) {
|
||||
|
@ -436,7 +503,11 @@ public class SimpleBooleanParser extends Parser {
|
|||
if ( !(_la==AND || _la==OR) ) {
|
||||
_errHandler.recoverInline(this);
|
||||
}
|
||||
consume();
|
||||
else {
|
||||
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
||||
_errHandler.reportMatch(this);
|
||||
consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (RecognitionException re) {
|
||||
|
@ -451,8 +522,8 @@ public class SimpleBooleanParser extends Parser {
|
|||
}
|
||||
|
||||
public static class BoolContext extends ParserRuleContext {
|
||||
public TerminalNode FALSE() { return getToken(SimpleBooleanParser.FALSE, 0); }
|
||||
public TerminalNode TRUE() { return getToken(SimpleBooleanParser.TRUE, 0); }
|
||||
public TerminalNode FALSE() { return getToken(SimpleBooleanParser.FALSE, 0); }
|
||||
public BoolContext(ParserRuleContext parent, int invokingState) {
|
||||
super(parent, invokingState);
|
||||
}
|
||||
|
@ -476,7 +547,11 @@ public class SimpleBooleanParser extends Parser {
|
|||
if ( !(_la==TRUE || _la==FALSE) ) {
|
||||
_errHandler.recoverInline(this);
|
||||
}
|
||||
consume();
|
||||
else {
|
||||
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
||||
_errHandler.reportMatch(this);
|
||||
consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (RecognitionException re) {
|
||||
|
@ -492,33 +567,36 @@ public class SimpleBooleanParser extends Parser {
|
|||
|
||||
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
|
||||
switch (ruleIndex) {
|
||||
case 1: return expression_sempred((ExpressionContext)_localctx, predIndex);
|
||||
case 1:
|
||||
return expression_sempred((ExpressionContext)_localctx, predIndex);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
private boolean expression_sempred(ExpressionContext _localctx, int predIndex) {
|
||||
switch (predIndex) {
|
||||
case 0: return precpred(_ctx, 8);
|
||||
case 1: return precpred(_ctx, 7);
|
||||
case 0:
|
||||
return precpred(_ctx, 8);
|
||||
case 1:
|
||||
return precpred(_ctx, 7);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\26\62\4\2\t\2\4\3"+
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\26\62\4\2\t\2\4\3"+
|
||||
"\t\3\4\4\t\4\4\5\t\5\4\6\t\6\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+
|
||||
"\3\3\3\3\3\3\3\3\3\3\3\5\3\35\n\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\7\3"+
|
||||
"\'\n\3\f\3\16\3*\13\3\3\4\3\4\3\5\3\5\3\6\3\6\3\6\2\3\4\7\2\4\6\b\n\2"+
|
||||
"\5\3\2\b\16\3\2\3\4\3\2\6\7\65\2\f\3\2\2\2\4\34\3\2\2\2\6+\3\2\2\2\b-"+
|
||||
"\3\2\2\2\n/\3\2\2\2\f\r\5\4\3\2\r\16\7\2\2\3\16\3\3\2\2\2\17\20\b\3\1"+
|
||||
"\2\20\21\7\5\2\2\21\35\5\4\3\13\22\23\7\17\2\2\23\24\5\4\3\2\24\25\7\20"+
|
||||
"\2\2\25\35\3\2\2\2\26\35\5\n\6\2\27\35\7\22\2\2\30\35\7\23\2\2\31\35\7"+
|
||||
"\24\2\2\32\35\7\25\2\2\33\35\7\21\2\2\34\17\3\2\2\2\34\22\3\2\2\2\34\26"+
|
||||
"\3\2\2\2\34\27\3\2\2\2\34\30\3\2\2\2\34\31\3\2\2\2\34\32\3\2\2\2\34\33"+
|
||||
"\3\2\2\2\35(\3\2\2\2\36\37\f\n\2\2\37 \5\6\4\2 !\5\4\3\13!\'\3\2\2\2\""+
|
||||
"#\f\t\2\2#$\5\b\5\2$%\5\4\3\n%\'\3\2\2\2&\36\3\2\2\2&\"\3\2\2\2\'*\3\2"+
|
||||
"\2\2(&\3\2\2\2()\3\2\2\2)\5\3\2\2\2*(\3\2\2\2+,\t\2\2\2,\7\3\2\2\2-.\t"+
|
||||
"\3\2\2.\t\3\2\2\2/\60\t\4\2\2\60\13\3\2\2\2\5\34&(";
|
||||
"\5\3\2\b\16\3\2\3\4\3\2\6\7\2\65\2\f\3\2\2\2\4\34\3\2\2\2\6+\3\2\2\2\b"+
|
||||
"-\3\2\2\2\n/\3\2\2\2\f\r\5\4\3\2\r\16\7\2\2\3\16\3\3\2\2\2\17\20\b\3\1"+
|
||||
"\2\20\21\7\17\2\2\21\22\5\4\3\2\22\23\7\20\2\2\23\35\3\2\2\2\24\25\7\5"+
|
||||
"\2\2\25\35\5\4\3\13\26\35\5\n\6\2\27\35\7\22\2\2\30\35\7\23\2\2\31\35"+
|
||||
"\7\24\2\2\32\35\7\25\2\2\33\35\7\21\2\2\34\17\3\2\2\2\34\24\3\2\2\2\34"+
|
||||
"\26\3\2\2\2\34\27\3\2\2\2\34\30\3\2\2\2\34\31\3\2\2\2\34\32\3\2\2\2\34"+
|
||||
"\33\3\2\2\2\35(\3\2\2\2\36\37\f\n\2\2\37 \5\6\4\2 !\5\4\3\13!\'\3\2\2"+
|
||||
"\2\"#\f\t\2\2#$\5\b\5\2$%\5\4\3\n%\'\3\2\2\2&\36\3\2\2\2&\"\3\2\2\2\'"+
|
||||
"*\3\2\2\2(&\3\2\2\2()\3\2\2\2)\5\3\2\2\2*(\3\2\2\2+,\t\2\2\2,\7\3\2\2"+
|
||||
"\2-.\t\3\2\2.\t\3\2\2\2/\60\t\4\2\2\60\13\3\2\2\2\5\34&(";
|
||||
public static final ATN _ATN =
|
||||
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
||||
static {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
// Generated from SimpleBoolean.g4 by ANTLR 4.4
|
||||
// Generated from SimpleBoolean.g4 by ANTLR 4.9.2
|
||||
|
||||
package org.idempiere.expression.logic;
|
||||
|
||||
import org.antlr.v4.runtime.misc.NotNull;
|
||||
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
|
||||
|
||||
/**
|
||||
|
@ -13,98 +12,98 @@ import org.antlr.v4.runtime.tree.ParseTreeVisitor;
|
|||
* operations with no return type.
|
||||
*/
|
||||
public interface SimpleBooleanVisitor<T> extends ParseTreeVisitor<T> {
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code boolExpression}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitBoolExpression(@NotNull SimpleBooleanParser.BoolExpressionContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by {@link SimpleBooleanParser#bool}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitBool(@NotNull SimpleBooleanParser.BoolContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code notExpression}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitNotExpression(@NotNull SimpleBooleanParser.NotExpressionContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by {@link SimpleBooleanParser#parse}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitParse(@NotNull SimpleBooleanParser.ParseContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code parenExpression}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitParenExpression(@NotNull SimpleBooleanParser.ParenExpressionContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code doubleQuotedText}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitDoubleQuotedText(@NotNull SimpleBooleanParser.DoubleQuotedTextContext ctx);
|
||||
T visitParse(SimpleBooleanParser.ParseContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code binaryExpression}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitBinaryExpression(@NotNull SimpleBooleanParser.BinaryExpressionContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by {@link SimpleBooleanParser#comparator}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitComparator(@NotNull SimpleBooleanParser.ComparatorContext ctx);
|
||||
T visitBinaryExpression(SimpleBooleanParser.BinaryExpressionContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code decimalExpression}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitDecimalExpression(@NotNull SimpleBooleanParser.DecimalExpressionContext ctx);
|
||||
T visitDecimalExpression(SimpleBooleanParser.DecimalExpressionContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by {@link SimpleBooleanParser#binary}.
|
||||
* Visit a parse tree produced by the {@code boolExpression}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitBinary(@NotNull SimpleBooleanParser.BinaryContext ctx);
|
||||
T visitBoolExpression(SimpleBooleanParser.BoolExpressionContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code contextVariables}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitContextVariables(@NotNull SimpleBooleanParser.ContextVariablesContext ctx);
|
||||
T visitContextVariables(SimpleBooleanParser.ContextVariablesContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code notExpression}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitNotExpression(SimpleBooleanParser.NotExpressionContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code parenExpression}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitParenExpression(SimpleBooleanParser.ParenExpressionContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code text}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitText(@NotNull SimpleBooleanParser.TextContext ctx);
|
||||
T visitText(SimpleBooleanParser.TextContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code quotedText}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitQuotedText(@NotNull SimpleBooleanParser.QuotedTextContext ctx);
|
||||
T visitQuotedText(SimpleBooleanParser.QuotedTextContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code doubleQuotedText}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitDoubleQuotedText(SimpleBooleanParser.DoubleQuotedTextContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code comparatorExpression}
|
||||
* labeled alternative in {@link SimpleBooleanParser#expression}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitComparatorExpression(@NotNull SimpleBooleanParser.ComparatorExpressionContext ctx);
|
||||
T visitComparatorExpression(SimpleBooleanParser.ComparatorExpressionContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by {@link SimpleBooleanParser#comparator}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitComparator(SimpleBooleanParser.ComparatorContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by {@link SimpleBooleanParser#binary}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitBinary(SimpleBooleanParser.BinaryContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by {@link SimpleBooleanParser#bool}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitBool(SimpleBooleanParser.BoolContext ctx);
|
||||
}
|
Loading…
Reference in New Issue