at.jku.ssw.Coco.State.AddAction C# (CSharp) Method

AddAction() public method

public AddAction ( Action act ) : void
act Action
return void
        public void AddAction(Action act)
        {
            Action lasta = null, a = firstAction;
            while (a != null && act.typ >= a.typ) {lasta = a; a = a.next;}
            // collecting classes at the beginning gives better performance
            act.next = a;
            if (a==firstAction) firstAction = act; else lasta.next = act;
        }

Usage Example

Example #1
0
        void NewTransition(State from, State to, int typ, int sym, int tc)
        {
            Target t = new Target(to);
            Action a = new Action(typ, sym, tc); a.target = t;

            from.AddAction(a);
            if (typ == Node.clas)
            {
                curSy.tokenKind = Symbol.classToken;
            }
        }
All Usage Examples Of at.jku.ssw.Coco.State::AddAction