}
// Convert the supplied value to the desired value ...
tokens.consume(')');
try {
Object literal = typeFactory.create(value);
return new Literal(literal);
} catch (ValueFormatException e) {
String msg = GraphI18n.valueCannotBeCastToSpecifiedType.text(value,
pos.getLine(),
pos.getColumn(),
typeFactory.getTypeName(),
e.getMessage());
throw new ParsingException(pos, msg);
}
}
// Just create a literal out of the supplied value ...
return new Literal(parseLiteralValue(tokens, typeSystem));
}