提交 dbc23ef3 authored 作者: Thomas Mueller's avatar Thomas Mueller

remove unused methods

上级 c0c3cc9e
......@@ -29,8 +29,6 @@ import org.h2.util.StringUtils;
*/
public class Bnf {
static final boolean COMBINE_KEYWORDS = false;
private static final String SEPARATORS = " [](){}|.,\r\n<>:-+*/=<\">!'$";
private static final long MAX_PARSE_TIME = 100;
......
......@@ -129,8 +129,4 @@ public class RuleElement implements Rule {
link.addNextTokenList(sentence);
}
boolean isKeyword() {
return keyword;
}
}
......@@ -52,24 +52,6 @@ public class RuleList implements Rule {
} else {
list.add(next);
}
if (!or && Bnf.COMBINE_KEYWORDS) {
for (int i = 0; i < list.size() - 1; i++) {
Rule r1 = (Rule) list.get(i);
Rule r2 = (Rule) list.get(i + 1);
if (!(r1 instanceof RuleElement) || !(r2 instanceof RuleElement)) {
continue;
}
RuleElement re1 = (RuleElement) r1;
RuleElement re2 = (RuleElement) r2;
if (!re1.isKeyword() || !re2.isKeyword()) {
continue;
}
re1 = re1.merge(re2);
list.set(i, re1);
list.remove(i + 1);
i--;
}
}
this.or = or;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论