MeltWith() public method

public MeltWith ( State s ) : void
s State
return void
Example #1
0
        void MeltStates(State state)
        {
            bool     ctx;
            BitArray targets;
            Symbol   endOf;

            for (Action action = state.firstAction; action != null; action = action.next)
            {
                if (action.target.next != null)
                {
                    GetTargetStates(action, out targets, out endOf, out ctx);
                    Melted melt = StateWithSet(targets);
                    if (melt == null)
                    {
                        State s = NewState(); s.endOf = endOf; s.ctx = ctx;
                        for (Target targ = action.target; targ != null; targ = targ.next)
                        {
                            s.MeltWith(targ.state);
                        }
                        MakeUnique(s);
                        melt = NewMelted(targets, s);
                    }
                    action.target.next  = null;
                    action.target.state = melt.state;
                }
            }
        }