pos = parseRule(rule, pos, limit);
}
}
} catch (IllegalArgumentException e) {
if (errorCount == 30) {
errors.add(new IllegalIcuArgumentException("\nMore than 30 errors; further messages squelched")
//#if defined(FOUNDATION10) || defined(J2SE13)
//#else
.initCause(e)
//#endif
);
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++) {
RuleBasedTransliterator.Data data = (RuleBasedTransliterator.Data)dataVector.get(i);
data.variables = new Object[variablesVector.size()];
variablesVector.copyInto(data.variables);
data.variableNames = new Hashtable();
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++) {
RuleBasedTransliterator.Data data = (RuleBasedTransliterator.Data)dataVector.get(i);