예제 #1
0
파일: Grammar.java 프로젝트: norswap/caxap
 /**
  * *************************************************************************** Same as {@link
  * #addRuleAlternative(Rule, Rule)}, but allows the alternative to already be known by the
  * grammar.
  */
 public void addExistingRuleAlternative(Rule extendedRule, Rule rule, boolean prioritary) {
   if (prioritary) {
     extendedRule.children().add(0, rule);
   } else {
     extendedRule.children().add(rule);
   }
 }
예제 #2
0
파일: Grammar.java 프로젝트: norswap/caxap
 /** ************************************************************************* */
 public void removeRuleAlternative(Rule extendedRule, Rule rule) {
   unregisterRule(rule);
   extendedRule.children().remove(rule);
 }