public static StatePattern From(ReduceCommand reduce) => reduce.Symbol is ParserGenerator.Models.Symbols.EndOfInput ? (StatePattern) new StateEnd(reduce.From) : new StateIndexAndLabel(reduce.From, reduce.Symbol.Value);
public static RulePattern From(ReduceCommand reduce, RuleDefinition[] rules) => new RulePattern(rules[reduce.To].Head.Value, rules[reduce.To].Body.Count());