Esempio n. 1
0
bool Etat20::transition(Automate & automate, Symbole * s ){
	int idSym = *s ; 
	switch (idSym) {
		case fois :
			automate.decalage(s, new Etat33("33"));
		break;
		case divise :
			automate.decalage(s, new Etat34("34"));
		break;
		case pf :
		case add :
		case moins :
		case pv :
		{
			//TODO : r16 E → T
			Expression* expr = (Expression*)automate.getNthSymbole(0);
			expr->setE();

			automate.popAndDeleteState();
			automate.popSymbole();

			automate.reduction(expr);
			break;
		}
		case OM : 
			automate.decalage(s, new Etat32("32"));
		break;
		default:
		break;
	}
	return false;
}
Esempio n. 2
0
bool Etat13::transition(Automate & automate, Symbole * s ){
	int idSym = *s ; 
	switch (idSym) {
		case eg :
			automate.decalage(s, new Etat26("26"));
			break;
		default : break;
	}
	return false;
}
Esempio n. 3
0
bool Etat42::transition(Automate & automate, Symbole * s ){
	int idSym = *s ; 
	switch (idSym) {
		case num :
			automate.decalage(s, new Etat43("43"));
			break;
		default : break;
	}
	return false;
}
Esempio n. 4
0
bool Etat8::transition(Automate & automate, Symbole * s ){
	int idSym = *s ; 
	switch (idSym) {
		case af :
			automate.decalage(s, new Etat17("17"));
		break;
		default :
            automate.recuperation(new Symbole(107), true); // on est sûr qu'il manque un :=
        break;
	}
	return false;
}
Esempio n. 5
0
bool Etat24::transition(Automate & automate, Symbole * s ){
	int idSym = *s ; 
	switch (idSym) {
		case E :
			automate.decalage(s, new Etat35("35"));
			break;
		case T :
			automate.decalage(s, new Etat20("20"));
			break;
		case F :
			automate.decalage(s, new Etat21("21"));
			break;
		case id :
			automate.decalage(s, new Etat22("22"));
			break;
		case num :
			automate.decalage(s, new Etat23("23"));
			break;
		case po:
			automate.decalage(s, new Etat24("24"));
			break;
		default : break;
	}
	return false;
}