jj_consume_token(DEC);
break;
default:
jj_la1[62] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
switch (jj_nt.kind) {
case LEFT_PAREN:
jj_consume_token(LEFT_PAREN);
precision = precision();
switch (jj_nt.kind) {
case COMMA:
jj_consume_token(COMMA);
scale = scale();
break;
default:
jj_la1[63] = jj_gen;
;
}
jj_consume_token(RIGHT_PAREN);
break;
default:
jj_la1[64] = jj_gen;
;
}
if ((precision <= 0) ||
(precision > TypeCompiler.MAX_DECIMAL_PRECISION_SCALE))
{
{if (true) throw StandardException.newException(SQLState.LANG_INVALID_PRECISION,
typeStr, String.valueOf(precision));}
}
else if ((scale < 0) ||
(scale > TypeCompiler.MAX_DECIMAL_PRECISION_SCALE))
{
{if (true) throw StandardException.newException(SQLState.LANG_INVALID_DECIMAL_SCALE,
typeStr, String.valueOf(scale));}
}
else if (scale > precision)
{
{if (true) throw StandardException.newException(SQLState.LANG_INVALID_DECIMAL_PRECISION_SCALE,
String.valueOf(scale),
String.valueOf(precision));}
}
/*
** If we have a decimal point, need to count it
** towards maxwidth. Max width needs to account
** for the possible leading '0' and '-' and the
** decimal point. e.g., DEC(1,1) has a maxwidth
** of 4 (to handle "-0.1").
*/
maxWidth = DataTypeUtilities.computeMaxWidth( precision, scale);
{if (true) return getDataTypeServices(type, precision, scale, maxWidth);}
break;
case INT:
case INTEGER:
case SMALLINT:
case LONGINT:
dtd = exactIntegerType();
{if (true) return dtd;}
break;
default:
jj_la1[65] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
throw new Error("Missing return statement in function");
}