istream &operator >> (istream &is, SemiProduccion &S){ //is sera "-> xxxX" o "-> Xxxx", y xxx será la //entrada, sin saber a priori su longitud
do
is.ignore(1);
while (is.peek() != '>');
is.ignore(1);
vector <char> aux;
if (islower (is.peek())){
do{
char ch;
is >> ch;
aux.push_back(ch);
}while (islower(is.peek()));
is >> S.Siguiente;
}
else{
is >> S.Siguiente;
if (isalpha(is.peek())){
do{
char ch;
is >> ch;
aux.push_back(ch);
}while (islower(is.peek()));
}
S.Entrada = &aux[0];
} //Hasta aquí, todo bien...
return is; //Pero en cuanto llego a esta linea, S.Entrada vuelve a valer "" (La pongo a null en el constructor)
}