private TSet AddAll(TSet set, Symbol symbol) { var newSet = new TSet(); foreach (var item in set.Where(i => !i.IsComplete && i.PostDot.Equals(symbol))) { newSet.Add(item, item.Next(true)); } newSet.Close(); return(newSet); }
private bool Complete(TSet set) { set.Close(); if (Sets.TryGetValue(set, out var already)) { set.Patch(already); return(false); } else { Sets.Add(set); set.Patch(set); return(true); } }