if (bestPosn >= 0) {
if (bestValue == Builder.MATCH) { // exact match!
n = delegate.next(); // skip this one. Find the next lowerlevel break.
- if (n == BreakIterator.DONE)
- return n;
+ if (n == BreakIterator.DONE) {
+ break;
+ }
continue; // See if the next is another exception.
} else if (bestValue == Builder.PARTIAL && forwardsPartialTrie != null) {
// make sure there's a forward trie
// only full matches here, nothing to check
// skip the next:
n = delegate.next();
- if (n == BreakIterator.DONE)
- return n;
+ if (n == BreakIterator.DONE) {
+ break;
+ }
continue;
} else {
// no match (no exception) -return the 'underlying' break
- return n;
+ break;
}
} else {
- return n; // internal error and/or no forwards trie
+ break; // internal error and/or no forwards trie
}
} else {
- return n; // No match - so exit. Not an exception.
+ break; // No match - so exit. Not an exception.
}
} while (n != BreakIterator.DONE);
return n;
if (!altered2.equals(definition2)) {
unused.remove(variable);
variables.put(variable2, altered2);
- if (log != null) {
- try {
- log.append(variable2 + "=" + altered2 + ";");
- } catch (IOException e) {
- throw (IllegalArgumentException) new IllegalArgumentException().initCause(e);
- }
- }
+// if (log != null) {
+// try {
+// log.append(variable2 + "=" + altered2 + ";");
+// } catch (IOException e) {
+// throw (IllegalArgumentException) new IllegalArgumentException().initCause(e);
+// }
+// }
}
}
}
}
}
- private static UnicodeRegex STANDARD = new UnicodeRegex();
+ private static final UnicodeRegex STANDARD = new UnicodeRegex();
private String bnfCommentString = "#";
private String bnfVariableInfix = "=";
private String bnfLineSeparator = "\n";
- private Appendable log = null;
+// private Appendable log = null;
private Comparator<Object> LongestFirst = new Comparator<Object>() {
public int compare(Object obj0, Object obj1) {