public void AddTargets(Action a) { // add copy of a.targets to action.targets for (Target p = a.target; p != null; p = p.next) { Target t = new Target(p.state); AddTarget(t); } if (a.tc == Node.contextTrans) tc = Node.contextTrans; }
public void AddTarget(Target t) { // add t to the action.targets Target last = null; Target p = target; while (p != null && t.state.nr >= p.state.nr) { if (t.state == p.state) return; last = p; p = p.next; } t.next = p; if (p == target) target = t; else last.next = t; }
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; }
void NewTransition(State from, State to, int typ, int sym, int tc) { if (to == firstState) parser.SemErr("token must not start with an iteration"); 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; }
static void NewTransition(State from, State to, int typ, int sym, int tc) { if (to == firstState) Parser.SemErr("token must not start with an iteration"); Target t = new Target(to); Action a = new Action(typ, sym, tc); a.target = t; from.AddAction(a); }