// Methods public LRConflictItem(SymbolBuild Symbol) { this.Symbol = Symbol; this.Conflict = LRConflict.None; this.Shifts = new LRConfigSet(); this.Reduces = new LRConfigSet(); }
public LRConflictItem(LRConflictItem Item, LRConflict Status) { this.Symbol = Item.Symbol; this.Conflict = Status; this.Shifts = Item.Shifts; this.Reduces = Item.Reduces; }
public FAStateBuild(SymbolBuild Accept) : base(Accept) { this.NFAStates = new NumberSet(new int[0]); this.AcceptList = new FAAcceptList(); this.PriorStates = new NumberSet(new int[0]); base.EdgeList = new FAEdgeBuildList(); }
// Methods private LRConflict ActionAdd(SymbolBuild TheSymbol, LRActionType Type, short Value = 0) { bool flag2 = false; bool flag = false; LRConflict none = LRConflict.None; for (short i = 0; ((i < base.Count) & !flag2) & !flag; i = (short)(i + 1)) { LRAction action = base[i]; if (action.Symbol.IsEqualTo(TheSymbol)) { if ((action.Type() == Type) & (action.Value() == Value)) { flag = true; } else { none = BuildLR.GetConflict(action.Type(), Type); flag2 = true; } } } if (!flag) { base.Add(new LRAction(TheSymbol, Type, Value)); } return(none); }
public new LRConflict Add(LRAction Action) { LRAction action = Action; SymbolBuild symbol = (SymbolBuild)action.Symbol; action.Symbol = symbol; return(this.ActionAdd(symbol, Action.Type(), Action.Value())); }
internal GroupBuild(string Name, SymbolBuild Container, SymbolBuild Start, SymbolBuild End, EndingMode Mode) { base.Name = Name; base.Container = Container; base.Start = Start; base.End = End; base.Ending = Mode; this.IsBlock = false; this.NestingNames = "None"; base.Advance = AdvanceMode.Character; }
public bool IsLessThan(SymbolBuild Symbol2) { short num = this.SymbolKindValue(base.Type); short num2 = this.SymbolKindValue(Symbol2.Type); if (num == num2) { return(Operators.CompareString(base.Name.ToUpper(), Symbol2.Name.ToUpper(), false) < 0); } return(num < num2); }
internal short ItemIndexCategory(string Name, SymbolCategory Category) { int num = -1; for (int i = 0; (i < base.Count()) & (num == -1); i++) { SymbolBuild build = (SymbolBuild) base[i]; if ((build.Name.ToUpper() == Name.ToUpper()) & (build.Category() == Category)) { num = i; } } return((short)num); }
internal short ItemIndex(string Name, SymbolType Type) { int num = -1; for (int i = 0; (i < base.Count()) & (num == -1); i++) { SymbolBuild build = (SymbolBuild) base[i]; if ((build.Name.ToUpper() == Name.ToUpper()) & (build.Type == Type)) { num = i; } } return((short)num); }
public SymbolBuild AddUnique(SymbolBuild Item) { short num = this.ItemIndex(Item); if (num == -1) { num = (short)base.Add(Item); } else { SymbolBuild build2 = (SymbolBuild) base[num]; if (build2.RegularExp == null) { build2.RegularExp = Item.RegularExp; build2.Type = Item.Type; } } return((SymbolBuild) base[num]); }
public LRConflict ConflictForAction(SymbolBuild TheSymbol, LRActionType Type, short Value) { bool flag = false; LRConflict none = LRConflict.None; for (short i = 0; (i < base.Count) & !flag; i = (short)(i + 1)) { LRAction action = base[i]; if (action.Symbol.IsEqualTo(TheSymbol)) { if ((action.Type() == Type) & (action.Value() == Value)) { none = LRConflict.None; } else { none = BuildLR.GetConflict(action.Type(), Type); } flag = true; } } return(none); }
internal short ItemIndex(SymbolBuild Search) { return(this.ItemIndex(Search.Name, Search.Type)); }
public int Add(SymbolBuild Item) { return(base.Add(Item)); }