public void EndElement(String tag) {
if (token.Length > 0) {
String word = token.ToString();
switch (currElement) {
case ELEM_CLASSES:
consumer.AddClass(word);
break;
case ELEM_EXCEPTIONS:
exception.Add(word);
exception = NormalizeException(exception);
consumer.AddException(GetExceptionWord(exception),
(ArrayList)exception.Clone());
break;
case ELEM_PATTERNS:
consumer.AddPattern(GetPattern(word),
GetInterletterValues(word));
break;
case ELEM_HYPHEN:
// nothing to do
break;
}
if (currElement != ELEM_HYPHEN) {
token.Length = 0;
}
}
if (currElement == ELEM_HYPHEN) {
currElement = ELEM_EXCEPTIONS;
} else {
currElement = 0;
}
}