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