Example #1
0
 public override string ToString()
 {
     return(ClosureItems.Any()
         ? string.Concat(KernelItems.ToVectorString(), Environment.NewLine, ClosureItems.ToVectorString())
         : KernelItems.ToVectorString());
 }
Example #2
0
 /// <summary>
 /// Does this LR(k) item set contain a kernel item with a given CORE (dotted production).
 /// </summary>
 public bool CoreOfKernelContains(MarkedProduction dottedProduction)
 {
     return(_anyLookaheads
         ? KernelItems.Select(item => item.MarkedProduction).Contains(dottedProduction)
         : _kernelItems.Contains(dottedProduction.AsLr0Item <TTokenKind>()));
 }