use of org.apache.qpid.server.filter.Expression in project qpid-broker-j by apache.
the class SelectorParser method unaryExpr.
public final Expression unaryExpr() throws ParseException {
String s = null;
Expression left = null;
if (jj_2_6(2147483647)) {
jj_consume_token(36);
left = unaryExpr();
} else {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 37:
jj_consume_token(37);
left = unaryExpr();
left = UnaryExpression.createNegate(left);
break;
case NOT:
jj_consume_token(NOT);
left = unaryExpr();
left = UnaryExpression.createNOT(asBooleanExpression(left));
break;
case TRUE:
case FALSE:
case NULL:
case DECIMAL_LITERAL:
case HEX_LITERAL:
case OCTAL_LITERAL:
case FLOATING_POINT_LITERAL:
case STRING_LITERAL:
case ID:
case QUOTED_ID:
case 33:
left = primaryExpr();
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
{
if (true)
return left;
}
throw new Error("Missing return statement in function");
}
use of org.apache.qpid.server.filter.Expression in project qpid-broker-j by apache.
the class SelectorParser method equalityExpression.
public final Expression equalityExpression() throws ParseException {
Expression left;
Expression right;
left = comparisonExpression();
label_3: while (true) {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IS:
case 27:
case 28:
;
break;
default:
break label_3;
}
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 27:
jj_consume_token(27);
right = comparisonExpression();
left = ComparisonExpression.createEqual(left, right);
break;
case 28:
jj_consume_token(28);
right = comparisonExpression();
left = ComparisonExpression.createNotEqual(left, right);
break;
default:
if (jj_2_1(2)) {
jj_consume_token(IS);
jj_consume_token(NULL);
left = ComparisonExpression.createIsNull(left);
} else {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IS:
jj_consume_token(IS);
jj_consume_token(NOT);
jj_consume_token(NULL);
left = ComparisonExpression.createIsNotNull(left);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
}
}
{
if (true)
return left;
}
throw new Error("Missing return statement in function");
}
use of org.apache.qpid.server.filter.Expression in project qpid-broker-j by apache.
the class SelectorParser method primaryExpr.
public final Expression primaryExpr() throws ParseException {
Expression left = null;
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case TRUE:
case FALSE:
case NULL:
case DECIMAL_LITERAL:
case HEX_LITERAL:
case OCTAL_LITERAL:
case FLOATING_POINT_LITERAL:
case STRING_LITERAL:
left = literal();
break;
case ID:
case QUOTED_ID:
left = variable();
break;
case 33:
jj_consume_token(33);
left = orExpression();
jj_consume_token(35);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
{
if (true)
return left;
}
throw new Error("Missing return statement in function");
}
use of org.apache.qpid.server.filter.Expression in project qpid-broker-j by apache.
the class ConfiguredObjectFilterParser method andExpression.
public final Expression andExpression() throws ParseException {
Expression left;
Expression right;
left = equalityExpression();
label_2: while (true) {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case AND:
;
break;
default:
break label_2;
}
jj_consume_token(AND);
right = equalityExpression();
left = LogicExpression.createAND(asBooleanExpression(left), asBooleanExpression(right));
}
{
if (true)
return left;
}
throw new Error("Missing return statement in function");
}
use of org.apache.qpid.server.filter.Expression in project qpid-broker-j by apache.
the class ConfiguredObjectFilterParser method addExpression.
public final Expression addExpression() throws ParseException {
Expression left;
Expression right;
left = multExpr();
label_7: while (true) {
if (jj_2_5(2147483647)) {
;
} else {
break label_7;
}
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 40:
jj_consume_token(40);
right = multExpr();
left = ArithmeticExpression.createPlus(left, right);
break;
case 41:
jj_consume_token(41);
right = multExpr();
left = ArithmeticExpression.createMinus(left, right);
break;
default:
jj_consume_token(-1);
throw new ParseException();
}
}
{
if (true)
return left;
}
throw new Error("Missing return statement in function");
}
Aggregations