示例#1
0
 private static bool IsIgnoredProductionRule(ProductionRule productionRule)
 {
     return
         ((productionRule.Rule is TokenRule && productionRule.Type != ProductionRuleType.Process) ||
          (!productionRule.Rule.AllowProductionRules)
         );
 }
示例#2
0
 private static ProductionRule OptimizeProduction(ProductionRule productionRule)
 {
     if (productionRule.Rule is TokenRule)
     {
         return(new ProductionRule(ProductionRuleType.Process, null));
     }
     return(productionRule);
 }
示例#3
0
 protected bool Equals(ProductionRule other)
 {
     return(Type == other.Type && Equals(Rule, other.Rule));
 }