예제 #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;
 }
예제 #2
0
파일: DFA.cs 프로젝트: 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;
	}
예제 #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;
 }
예제 #4
0
파일: DFA.cs 프로젝트: 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;
	}
예제 #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);
	}