public LR0Item(Production production, int position) { Production = production; Position = position; ID = _maxID++; _toString = Production.ToString(Position); }
}//method private LRItem FindItem(ParserState state, Production production, int position) { foreach (LRItem item in state.Items) { if (item.Core.Production == production && item.Core.Position == position) { return(item); } } string msg = string.Format("Failed to find an LRItem in state {0} by production [{1}] and position {2}. ", state, production.ToString(), position.ToString()); throw new CompilerException(msg); }//method