本文整理了Java中org.antlr.v4.tool.Grammar.undefineRule()
方法的一些代码示例,展示了Grammar.undefineRule()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grammar.undefineRule()
方法的具体详情如下:
包路径:org.antlr.v4.tool.Grammar
类名称:Grammar
方法名:undefineRule
[英]Undefine the specified rule from this Grammar instance. The instance r is removed from #rules and #indexToRule. This method updates the Rule#index field for all rules defined after r, and decrements #ruleNumberin preparation for adding new rules.
This method does nothing if the current Grammar does not contain the instance r at index r.index in #indexToRule.
[中]从该语法实例中取消定义指定的规则。实例r将从#规则和#索引规则中删除。此方法更新r之后定义的所有规则的规则#索引字段,并递减#RuleNumber以准备添加新规则。
如果当前语法在#indexToRule中的索引r.index处不包含实例r,则此方法不会执行任何操作。
代码示例来源:origin: org.antlr/antlr4
@Override
public boolean undefineRule(Rule r) {
if (!super.undefineRule(r)) {
return false;
}
boolean removed = modes.get(r.mode).remove(r);
assert removed;
return true;
}
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
@Override
public boolean undefineRule(Rule r) {
if (!super.undefineRule(r)) {
return false;
}
boolean removed = modes.get(r.mode).remove(r);
assert removed;
return true;
}
}
代码示例来源:origin: com.tunnelvisionlabs/antlr4
@Override
public boolean undefineRule(Rule r) {
if (!super.undefineRule(r)) {
return false;
}
boolean removed = modes.get(r.mode).remove(r);
assert removed;
return true;
}
}
代码示例来源:origin: uk.co.nichesolutions/antlr4
@Override
public boolean undefineRule(Rule r) {
if (!super.undefineRule(r)) {
return false;
}
boolean removed = modes.get(r.mode).remove(r);
assert removed;
return true;
}
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
@Override
public boolean undefineRule(Rule r) {
if (!super.undefineRule(r)) {
return false;
}
boolean removed = modes.get(r.mode).remove(r);
assert removed;
return true;
}
}
内容来源于网络,如有侵权,请联系作者删除!