private LL1Item find(NTType first, VTType second) { if (LL1ItemList.Any(v => v.NT == first && v.meet == second)) { return(LL1ItemList.First(v => v.NT == first && v.meet == second)); } return(null); }
public Rule(NTType start, List <NTVTType> words) { _start = start; _words = new List <NTVTType>(); _words.AddRange(words); }
public Rule(NTType start) { _start = start; _words = new List <NTVTType>(); }
/// <summary> /// 若first课归结为ε,返回True,否则返回False /// </summary> /// <param name="first"></param> /// <returns></returns> private bool existX(NTType first) { return(LL1ItemList.Any(v => v.NT == first && v.Rule.Contains(NTVTType.ε))); }
private NTVTType toNTVT(NTType nt) { return((NTVTType)Enum.Parse(typeof(NTVTType), nt.ToString())); }