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