Esempio n. 1
0
 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;
 }
Esempio n. 2
0
File: DFA.cs Progetto: ggrov/tacny
	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;
	}
Esempio n. 3
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;
 }
Esempio n. 4
0
File: DFA.cs Progetto: SealedSun/prx
	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;
	}
Esempio n. 5
0
	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);
	}