Advertisement
Guest User

Untitled

a guest
May 25th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. char* clausuraEpsilon(AFnD afnd, char estado){
  2.     int aux_es;
  3.     int aux_al;
  4.     stack <char> pila;
  5.     char* conjunto;
  6.     int j=0;
  7.     if (estado == pila.top() || '-'== estado)
  8.     {  
  9.         while(!pila.empty())
  10.         {
  11.             conjunto[j]=pila.top();
  12.             pila.pop();
  13.             j++;
  14.         }
  15.         return conjunto;
  16.        
  17.     }else{
  18.         cout<<"pene"<<endl;
  19.         pila.push(estado);
  20.         for (int i = 0; i < afnd.size_states(); ++i)
  21.         {
  22.             if(estado == afnd.states()[i])
  23.                 aux_es=i;
  24.         }
  25.         for (int i = 0; i < afnd.size_alphabet(); ++i)
  26.         {
  27.             if('v'==afnd.alphabet()[i])
  28.                 aux_al=i;
  29.         }
  30.         pila.push(afnd.transicion()[aux_es][aux_al]);
  31.         clausuraEpsilon(afnd,afnd.transicion()[aux_es][aux_al]);
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement