public bool InheritContextsOnSkip(PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> parent, PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> child, TState nextState, TTransition sourceTransition, bool memoized) { parent.AddTransition( new ExtractedTransition <PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition>, TTransition>( sourceTransition, child, PdaAction.Skip)); return(true); }
public void MergeContexts( PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> source, PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> target) { if (ReferenceEquals(source, target)) { return; } foreach (var transition in target.Transitions) { source.AddTransition(transition); } }
public bool InheritContextsOnPop(PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> parent, PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> child, TState nextState, TTransition sourceTransition, bool memoized) { foreach (var record in GetOrCreatePushHistory(parent.StackTop)) { record.Pusher.AddTransition( new ExtractedTransition <PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition>, TTransition>( record.SourceTransition, record.Child, PdaAction.Push)); } ClearPushHistory(parent.StackTop); parent.AddTransition( new ExtractedTransition <PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition>, TTransition>( sourceTransition, child, PdaAction.Pop)); return(true); }
public MyPushHistoryRecord(PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> pusher, PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> child, TTransition sourceTransition) : base(pusher, child, sourceTransition) { }
public bool InheritContextsOnPush(PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> parent, PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> child, TState nextState, TStackSymbol pushed, TTransition sourceTransition, bool memoized) { AddToPushHistory(child.StackTop, new MyPushHistoryRecord(parent, child, sourceTransition)); return(true); }