use of org.apache.qpid.server.filter.ComparisonExpression in project qpid-broker-j by apache.
the class ConfiguredObjectFilterParser 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 31:
case 32:
;
break;
default:
break label_3;
}
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 31:
jj_consume_token(31);
right = comparisonExpression();
left = ComparisonExpression.createEqual(left, right);
break;
case 32:
jj_consume_token(32);
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.ComparisonExpression 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.ComparisonExpression in project qpid-broker-j by apache.
the class ConfiguredObjectFilterParser method comparisonExpression.
public final Expression comparisonExpression() throws ParseException {
Expression left;
Expression right;
Expression low;
Expression high;
String t, u;
boolean not;
ArrayList list;
left = addExpression();
label_4: while (true) {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case NOT:
case BETWEEN:
case LIKE:
case IN:
case 33:
case 34:
case 35:
case 36:
;
break;
default:
break label_4;
}
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 33:
jj_consume_token(33);
right = addExpression();
left = ComparisonExpression.createGreaterThan(left, right);
break;
case 34:
jj_consume_token(34);
right = addExpression();
left = ComparisonExpression.createGreaterThanEqual(left, right);
break;
case 35:
jj_consume_token(35);
right = addExpression();
left = ComparisonExpression.createLessThan(left, right);
break;
case 36:
jj_consume_token(36);
right = addExpression();
left = ComparisonExpression.createLessThanEqual(left, right);
break;
case LIKE:
u = null;
jj_consume_token(LIKE);
t = stringLiteral();
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ESCAPE:
jj_consume_token(ESCAPE);
u = stringLiteral();
break;
default:
;
}
left = ComparisonExpression.createLike(left, t, u);
break;
default:
if (jj_2_2(2)) {
u = null;
jj_consume_token(NOT);
jj_consume_token(LIKE);
t = stringLiteral();
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ESCAPE:
jj_consume_token(ESCAPE);
u = stringLiteral();
break;
default:
;
}
left = ComparisonExpression.createNotLike(left, t, u);
} else {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BETWEEN:
jj_consume_token(BETWEEN);
low = addExpression();
jj_consume_token(AND);
high = addExpression();
left = ComparisonExpression.createBetween(left, low, high);
break;
default:
if (jj_2_3(2)) {
jj_consume_token(NOT);
jj_consume_token(BETWEEN);
low = addExpression();
jj_consume_token(AND);
high = addExpression();
left = ComparisonExpression.createNotBetween(left, low, high);
} else {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IN:
jj_consume_token(IN);
jj_consume_token(37);
right = primaryExpr();
list = new ArrayList();
list.add(right);
label_5: while (true) {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 38:
;
break;
default:
break label_5;
}
jj_consume_token(38);
right = primaryExpr();
list.add(right);
}
jj_consume_token(39);
left = ComparisonExpression.createInFilter(left, list, true);
break;
default:
if (jj_2_4(2)) {
jj_consume_token(NOT);
jj_consume_token(IN);
jj_consume_token(37);
right = primaryExpr();
list = new ArrayList();
list.add(right);
label_6: while (true) {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 38:
;
break;
default:
break label_6;
}
jj_consume_token(38);
right = primaryExpr();
list.add(right);
}
jj_consume_token(39);
left = ComparisonExpression.createNotInFilter(left, list, true);
} else {
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.ComparisonExpression in project qpid-broker-j by apache.
the class SelectorParser method comparisonExpression.
public final Expression comparisonExpression() throws ParseException {
Expression left;
Expression right;
Expression low;
Expression high;
String t, u;
boolean not;
ArrayList list;
left = addExpression();
label_4: while (true) {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case NOT:
case BETWEEN:
case LIKE:
case IN:
case 29:
case 30:
case 31:
case 32:
;
break;
default:
break label_4;
}
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 29:
jj_consume_token(29);
right = addExpression();
left = ComparisonExpression.createGreaterThan(left, right);
break;
case 30:
jj_consume_token(30);
right = addExpression();
left = ComparisonExpression.createGreaterThanEqual(left, right);
break;
case 31:
jj_consume_token(31);
right = addExpression();
left = ComparisonExpression.createLessThan(left, right);
break;
case 32:
jj_consume_token(32);
right = addExpression();
left = ComparisonExpression.createLessThanEqual(left, right);
break;
case LIKE:
u = null;
jj_consume_token(LIKE);
t = stringLiteral();
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ESCAPE:
jj_consume_token(ESCAPE);
u = stringLiteral();
break;
default:
;
}
left = ComparisonExpression.createLike(left, t, u);
break;
default:
if (jj_2_2(2)) {
u = null;
jj_consume_token(NOT);
jj_consume_token(LIKE);
t = stringLiteral();
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ESCAPE:
jj_consume_token(ESCAPE);
u = stringLiteral();
break;
default:
;
}
left = ComparisonExpression.createNotLike(left, t, u);
} else {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BETWEEN:
jj_consume_token(BETWEEN);
low = addExpression();
jj_consume_token(AND);
high = addExpression();
left = ComparisonExpression.createBetween(left, low, high);
break;
default:
if (jj_2_3(2)) {
jj_consume_token(NOT);
jj_consume_token(BETWEEN);
low = addExpression();
jj_consume_token(AND);
high = addExpression();
left = ComparisonExpression.createNotBetween(left, low, high);
} else {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IN:
jj_consume_token(IN);
jj_consume_token(33);
t = stringLiteral();
list = new ArrayList();
list.add(t);
label_5: while (true) {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 34:
;
break;
default:
break label_5;
}
jj_consume_token(34);
t = stringLiteral();
list.add(t);
}
jj_consume_token(35);
left = ComparisonExpression.createInFilter(left, list, false);
break;
default:
if (jj_2_4(2)) {
jj_consume_token(NOT);
jj_consume_token(IN);
jj_consume_token(33);
t = stringLiteral();
list = new ArrayList();
list.add(t);
label_6: while (true) {
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 34:
;
break;
default:
break label_6;
}
jj_consume_token(34);
t = stringLiteral();
list.add(t);
}
jj_consume_token(35);
left = ComparisonExpression.createNotInFilter(left, list, false);
} else {
jj_consume_token(-1);
throw new ParseException();
}
}
}
}
}
}
}
{
if (true)
return left;
}
throw new Error("Missing return statement in function");
}
Aggregations