public SLRClosure(String title, Grammar grammar, SLRClosure closure) : base(title, grammar) { SLRProductions = (default(SLRClosure) != closure) ? closure.SLRProductions : default(List<SLRProduction>); }
public override Closure GoToEntity(Entity X) { var closure = new SLRClosure("gotoX", Grammar); for (var index = 0; index < Count; ++index) { var product = this[index]; var dot = product.DotPosition; if (dot == product.Count) continue; //Entity Y = product.Product[dot]; if (X == product.Product[dot]) closure.Add(new SLRProduction(product.Producer, product.Product, dot + 1)); } return closure; }
public SLRClosure(String title, Grammar grammar, SLRClosure closure) : base(title, grammar) { SLRProductions = (closure == default(SLRClosure)) ? default(List<SLRProduction>) : closure.SLRProductions; }