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; } }
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); }
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 SplitActions(State state, Action a, Action b) { Action c; BitArray seta, setb, setc; seta = a.Symbols(); setb = b.Symbols(); if (Sets.Equals(seta, setb)) { a.AddTargets(b); state.DetachAction(b); } else if (Sets.Includes(seta, setb)) { setc = (BitArray)seta.Clone(); Sets.Subtract(setc, setb); b.AddTargets(a); a.ShiftWith(setc); } else if (Sets.Includes(setb, seta)) { setc = (BitArray)setb.Clone(); Sets.Subtract(setc, seta); a.AddTargets(b); b.ShiftWith(setc); } else { setc = (BitArray)seta.Clone(); setc.And(setb); Sets.Subtract(seta, setc); Sets.Subtract(setb, setc); a.ShiftWith(seta); b.ShiftWith(setb); c = new Action(0, 0, Node.normalTrans); // typ and sym are set in ShiftWith c.AddTargets(a); c.AddTargets(b); c.ShiftWith(setc); state.AddAction(c); } }
void SplitActions(State state, Action a, Action b) { Action c; CharSet seta, setb, setc; seta = a.Symbols(tab); setb = b.Symbols(tab); if (seta.Equals(setb)) { a.AddTargets(b); state.DetachAction(b); } else if (seta.Includes(setb)) { setc = seta.Clone(); setc.Subtract(setb); b.AddTargets(a); a.ShiftWith(setc, tab); } else if (setb.Includes(seta)) { setc = setb.Clone(); setc.Subtract(seta); a.AddTargets(b); b.ShiftWith(setc, tab); } else { setc = seta.Clone(); setc.And(setb); seta.Subtract(setc); setb.Subtract(setc); a.ShiftWith(seta, tab); b.ShiftWith(setb, tab); c = new Action(0, 0, Node.normalTrans); // typ and sym are set in ShiftWith c.AddTargets(a); c.AddTargets(b); c.ShiftWith(setc, tab); state.AddAction(c); } }
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); }