/*
* Assume we have a {num}{ident} instance (DIMEN), and then override
* that if a specific quantity literal is found.
*/
builder.type = Type.QNTY_DIMEN;
TokenBuilder suffix = new TokenBuilder(reader, errHandler);
append(QNTSTART, suffix);
if (suffix.getLast() != '%')
{ // QNTSTART = NMSTART | '%'
append(NMCHAR, suffix);
}
if (suffix.getLength() > QNT_TOKEN_MAXLENGTH)
{
// longer than max length in quantities map
builder.append(suffix.toString());
return;
}
// shorter or equal to max length in quantities map
// we might have a more specific match
final int[] ident = suffix.toArray();
int[] match = null;
for (int[] test : quantities.keySet())
{
if (equals(ident, test, true))