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