BigDecimal bd = new BigDecimal(number);
BigDecimal denominator = BigDecimal.ONE.scaleByPowerOfTen(bd.scale());
BigDecimal numerator = bd.multiply(denominator);
try {
yaccValue = new RationalNode(getPosition(), numerator.longValueExact(), denominator.longValueExact());
} catch (ArithmeticException ae) {
// FIXME: Rational supports Bignum numerator and denominator
throw new SyntaxException(PID.RATIONAL_OUT_OF_RANGE, getPosition(), getCurrentLine(), "Rational (" + numerator + "/" + denominator + ") out of range.");
}
return Tokens.tRATIONAL;