string s;
getline(ifile, s, '\n');
stringstream parser(s);
string temp;
while(parser>>temp)
variables.push_back(temp);
getline(ifile, s, '\n');
while(parser>>temp)
terminals.push_back(temp);//Doesn't work the second time.
stringstream can tokenize the string s only for the first time. The string s is passed to it through the constructor. How can reinitialize the stringstream object?