public bool IsNongreedyExit; // indicates a nongreedy exit branch (which takes priority in case of ambiguity) public void UpdateSet(bool addEOF) { if (Cases.Count == 0) { Set = Set.Empty; if (addEOF) { Set = Set.WithEOF(); } AndReq = new Set <AndPred>(); return; } Set = Cases[0].Set; var andI = new MSet <AndPred>(Cases[0].AndPreds); for (int i = 1; i < Cases.Count; i++) { Set = Set.Union(Cases[i].Set); andI.IntersectWith(Cases[i].AndPreds); } AndReq = (Set <AndPred>)andI; if (addEOF) { Set = Set.WithEOF(); } }
public static IPGTerminalSet WithoutEOF(this IPGTerminalSet @this) { return(@this.WithEOF(false)); }