internal void Adapt(ParserCompiler compiler) { if (this.dfaState != null) { var adaptLookup = new Dictionary <SyntacticalDFAState, PredictionTreeDFAdapter>(); this.Adapter = PredictionTreeDFAdapter.Adapt(this.dfaState, ref adaptLookup, compiler); this.Adapter.AssociatedContext.StateAdapterLookup = new ControlledDictionary <SyntacticalDFAState, PredictionTreeDFAdapter>(adaptLookup); foreach (var adapter in adaptLookup.Values) { adapter.AssociatedContext.PostConnect(this.EdgeNode, this.Adapter); } } else { throw new InvalidOperationException(); } }
internal void PostConnect(PredictionTreeLeaf rootNode, PredictionTreeDFAdapter rootAdapter) { this.rootNode = rootNode; this.rootAdapter = rootAdapter; }
internal void Connect(PredictionTreeDFAdapter adapter, ParserCompiler compiler) { this.Adapter = adapter; this.AssociatedCompiler = compiler; }
internal void ReplaceState(SyntacticalDFAState replacement, PredictionTreeDFAdapter adapter) { this.dfaState = replacement; this.Adapter = adapter; }