Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* clausuraEpsilon(AFnD afnd, char estado){
- int aux_es;
- int aux_al;
- stack <char> pila;
- char* conjunto;
- int j=0;
- if (estado == pila.top() || '-'== estado)
- {
- while(!pila.empty())
- {
- conjunto[j]=pila.top();
- pila.pop();
- j++;
- }
- return conjunto;
- }else{
- cout<<"pene"<<endl;
- pila.push(estado);
- for (int i = 0; i < afnd.size_states(); ++i)
- {
- if(estado == afnd.states()[i])
- aux_es=i;
- }
- for (int i = 0; i < afnd.size_alphabet(); ++i)
- {
- if('v'==afnd.alphabet()[i])
- aux_al=i;
- }
- pila.push(afnd.transicion()[aux_es][aux_al]);
- clausuraEpsilon(afnd,afnd.transicion()[aux_es][aux_al]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement