Пример #1
0
 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);
Пример #2
0
 public static RulePattern From(ReduceCommand reduce, RuleDefinition[] rules) =>
 new RulePattern(rules[reduce.To].Head.Value, rules[reduce.To].Body.Count());