cleanup silly dfa class distinctions (e.g. ({1},{2}))

This commit is contained in:
peter
2012-04-18 19:28:41 +02:00
parent c1ef4bf5b6
commit dc9a6b2d18
3 changed files with 40 additions and 3 deletions
@@ -0,0 +1,16 @@
class X {
public static void buildRegexp(String pattern, int exactPrefixLen, boolean forCompletion) {
System.out.println(!forCompletion && pattern.endsWith(" "));
System.out.println(exactPrefixLen == 0);
boolean prevIsUppercase = false;
for (int i = 0; i < pattern.length(); i++) {
final char c = pattern.charAt(i);
if (c == '*') { }
else if (c == ' ') { }
else if (c == ':' || prevIsUppercase) { }
}
}
}