Search in sources :

Example 1 with ConstantExpression

use of org.apache.qpid.server.filter.ConstantExpression in project qpid-broker-j by apache.

the class SelectorParser method literal.

public final ConstantExpression literal() throws ParseException {
    Token t;
    String s;
    ConstantExpression left = null;
    switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
        case STRING_LITERAL:
            s = stringLiteral();
            left = new ConstantExpression(s);
            break;
        case DECIMAL_LITERAL:
            t = jj_consume_token(DECIMAL_LITERAL);
            left = ConstantExpression.createFromDecimal(t.image);
            break;
        case HEX_LITERAL:
            t = jj_consume_token(HEX_LITERAL);
            left = ConstantExpression.createFromHex(t.image);
            break;
        case OCTAL_LITERAL:
            t = jj_consume_token(OCTAL_LITERAL);
            left = ConstantExpression.createFromOctal(t.image);
            break;
        case FLOATING_POINT_LITERAL:
            t = jj_consume_token(FLOATING_POINT_LITERAL);
            left = ConstantExpression.createFloat(t.image);
            break;
        case TRUE:
            jj_consume_token(TRUE);
            left = ConstantExpression.TRUE;
            break;
        case FALSE:
            jj_consume_token(FALSE);
            left = ConstantExpression.FALSE;
            break;
        case NULL:
            jj_consume_token(NULL);
            left = ConstantExpression.NULL;
            break;
        default:
            jj_consume_token(-1);
            throw new ParseException();
    }
    {
        if (true)
            return left;
    }
    throw new Error("Missing return statement in function");
}
Also used : ConstantExpression(org.apache.qpid.server.filter.ConstantExpression)

Example 2 with ConstantExpression

use of org.apache.qpid.server.filter.ConstantExpression in project qpid-broker-j by apache.

the class ConfiguredObjectFilterParser method literal.

public final ConstantExpression literal() throws ParseException {
    Token t;
    String s;
    ConstantExpression left = null;
    switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
        case STRING_LITERAL:
            s = stringLiteral();
            left = new ConstantExpression(s);
            break;
        case DECIMAL_LITERAL:
            t = jj_consume_token(DECIMAL_LITERAL);
            left = ConstantExpression.createFromDecimal(t.image);
            break;
        case HEX_LITERAL:
            t = jj_consume_token(HEX_LITERAL);
            left = ConstantExpression.createFromHex(t.image);
            break;
        case OCTAL_LITERAL:
            t = jj_consume_token(OCTAL_LITERAL);
            left = ConstantExpression.createFromOctal(t.image);
            break;
        case FLOATING_POINT_LITERAL:
            t = jj_consume_token(FLOATING_POINT_LITERAL);
            left = ConstantExpression.createFloat(t.image);
            break;
        case TRUE:
            jj_consume_token(TRUE);
            left = ConstantExpression.TRUE;
            break;
        case FALSE:
            jj_consume_token(FALSE);
            left = ConstantExpression.FALSE;
            break;
        case NULL:
            jj_consume_token(NULL);
            left = ConstantExpression.NULL;
            break;
        default:
            jj_consume_token(-1);
            throw new ParseException();
    }
    {
        if (true)
            return left;
    }
    throw new Error("Missing return statement in function");
}
Also used : ConstantExpression(org.apache.qpid.server.filter.ConstantExpression)

Aggregations

ConstantExpression (org.apache.qpid.server.filter.ConstantExpression)2