private CachedDottedRuleSetTransition CreateTopCachedItem( DeterministicState stateFrame, ISymbol postDotSymbol) { var origin = stateFrame.Origin; CachedDottedRuleSetTransition topCacheItem = null; // search for the top item in the leo chain while (true) { var originFrameSet = Chart.Sets[stateFrame.Origin]; var nextCachedItem = originFrameSet.FindCachedDottedRuleSetTransition(postDotSymbol); if (nextCachedItem == null) { break; } topCacheItem = nextCachedItem; if (origin == nextCachedItem.Origin) { break; } origin = topCacheItem.Origin; } return(new CachedDottedRuleSetTransition( postDotSymbol, stateFrame.DottedRuleSet, topCacheItem == null ? stateFrame.Origin : origin)); }
private void LeoReductionOperation(int iLoc, CachedDottedRuleSetTransition fromLim) { var fromAH = fromLim.DottedRuleSet; var transSym = fromLim.Symbol; var originLoc = fromLim.Origin; var toAH = Goto(fromAH, transSym); if (toAH == null) { return; } AddEimPair(iLoc, toAH, originLoc); }