bool Overlap(Action a, Action b) { CharSet seta, setb; if (a.typ == Node.chr) { if (b.typ == Node.chr) { return(a.sym == b.sym); } else { setb = tab.CharClassSet(b.sym); return(setb[a.sym]); } } else { seta = tab.CharClassSet(a.sym); if (b.typ == Node.chr) { return(seta[b.sym]); } else { setb = tab.CharClassSet(b.sym); return(seta.Intersects(setb)); } } }
public CharSet Symbols(Tab tab) { CharSet s; if (typ == Node.clas) { s = tab.CharClassSet(sym).Clone(); } else { s = new CharSet(); s.Set(sym); } return(s); }
public CharSet Symbols(Tab tab) { CharSet s; if (typ == Node.clas) s = tab.CharClassSet(sym).Clone(); else { s = new CharSet(); s.Set(sym); } return s; }