default:
throw getSyntaxError("Illegal operation: -" + currentValue);
}
}
if (currentTokenType == VALUE) {
Literal literal = getUncastLiteral(currentValue);
read();
return literal;
} else if (currentTokenType == PARAMETER) {
read();
String name = readName();
if (readIf(":")) {
name = name + ":" + readName();
}
BindVariableValue var = bindVariables.get(name);
if (var == null) {
var = factory.bindVariable(name);
bindVariables.put(name, var);
}
return var;
} else if (readIf("TRUE")) {
Literal literal = getUncastLiteral(valueFactory.createValue(true));
return literal;
} else if (readIf("FALSE")) {
Literal literal = getUncastLiteral(valueFactory.createValue(false));
return literal;
} else if (readIf("CAST")) {
read("(");
StaticOperand op = parseStaticOperand();
if (!(op instanceof Literal)) {
throw getSyntaxError("literal");
}
Literal literal = (Literal) op;
Value value = literal.getLiteralValue();
read("AS");
value = parseCastAs(value);
read(")");
// CastLiteral
literal = factory.literal(value);