in src/main/java/org/apache/commons/jxpath/ri/parser/XPathParser.java [3434:3514]
final public Object PrimaryExpr() throws ParseException {
Object ex = null;
switch (jj_nt.kind) {
case VARIABLE:
ex = VariableReference();
break;
case 81:
jj_consume_token(81);
ex = Expression();
jj_consume_token(82);
break;
case Literal:
jj_consume_token(Literal);
ex = compiler.literal(unescape(token.image.substring(1, token.image.length() - 1)));
break;
case Number:
jj_consume_token(Number);
ex = compiler.number(token.image);
break;
default:
jj_la1[16] = jj_gen;
if (jj_2_5(2147483647)) {
ex = CoreFunctionCall();
} else {
switch (jj_nt.kind) {
case OR:
case AND:
case MOD:
case DIV:
case NODE:
case TEXT:
case COMMENT:
case PI:
case FUNCTION_LAST:
case FUNCTION_POSITION:
case FUNCTION_COUNT:
case FUNCTION_ID:
case FUNCTION_KEY:
case FUNCTION_LOCAL_NAME:
case FUNCTION_NAMESPACE_URI:
case FUNCTION_NAME:
case FUNCTION_STRING:
case FUNCTION_CONCAT:
case FUNCTION_STARTS_WITH:
case FUNCTION_ENDS_WITH:
case FUNCTION_CONTAINS:
case FUNCTION_SUBSTRING_BEFORE:
case FUNCTION_SUBSTRING_AFTER:
case FUNCTION_SUBSTRING:
case FUNCTION_STRING_LENGTH:
case FUNCTION_NORMALIZE_SPACE:
case FUNCTION_TRANSLATE:
case FUNCTION_BOOLEAN:
case FUNCTION_NOT:
case FUNCTION_TRUE:
case FUNCTION_FALSE:
case FUNCTION_NULL:
case FUNCTION_LANG:
case FUNCTION_NUMBER:
case FUNCTION_SUM:
case FUNCTION_FLOOR:
case FUNCTION_CEILING:
case FUNCTION_ROUND:
case FUNCTION_FORMAT_NUMBER:
case NCName:
ex = FunctionCall();
break;
default:
jj_la1[17] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
{
if (true) {
return ex;
}
}
throw new Error("Missing return statement in function");
}