pos = parseRule(rule, pos, limit);
}
}
} catch (IllegalArgumentException e) {
if (errorCount == 30) {
IllegalIcuArgumentException icuEx = new IllegalIcuArgumentException("\nMore than 30 errors; further messages squelched");
icuEx.initCause(e);
errors.add(icuEx);
break main;
}
e.fillInStackTrace();
errors.add(e);
++errorCount;
pos = ruleEnd(rule, pos, limit) + 1; // +1 advances past ';'
}
}
}
if (parsingIDs && idBlockResult.length() > 0) {
if (direction == Transliterator.FORWARD)
idBlockVector.add(idBlockResult.toString());
else
idBlockVector.insertElementAt(idBlockResult.toString(), 0);
}
else if (!parsingIDs && curData != null) {
if (direction == Transliterator.FORWARD)
dataVector.add(curData);
else
dataVector.insertElementAt(curData, 0);
}
// Convert the set vector to an array
for (int i = 0; i < dataVector.size(); i++) {
Data data = dataVector.get(i);
data.variables = new Object[variablesVector.size()];
variablesVector.copyInto(data.variables);
data.variableNames = new Hashtable<String, char[]>();
data.variableNames.putAll(variableNames);
}
variablesVector = null;
// Do more syntax checking and index the rules
try {
if (compoundFilter != null) {
if ((direction == Transliterator.FORWARD &&
compoundFilterOffset != 1) ||
(direction == Transliterator.REVERSE &&
compoundFilterOffset != ruleCount)) {
throw new IllegalIcuArgumentException("Compound filters misplaced");
}
}
for (int i = 0; i < dataVector.size(); i++) {
Data data = dataVector.get(i);