relax-parse: use cin.peek()

Hope this eliminates some weird behavior
This commit is contained in:
Matthias Huck 2014-07-17 20:19:28 +01:00
parent eb5336ad9c
commit 19a5ef4a1a

View File

@ -31,15 +31,15 @@ int main(int argc, char* argv[])
// loop through all sentences
int i=0;
string inBuffer;
while(getline(cin, inBuffer)) {
string inBufferString;
while(cin.peek() != EOF) {
getline(cin,inBufferString);
i++;
if (i%1000 == 0) cerr << "." << flush;
if (i%10000 == 0) cerr << ":" << flush;
if (i%100000 == 0) cerr << "!" << flush;
// process into syntax tree representation
string inBufferString = string( inBuffer );
set< string > labelCollection; // set of labels, not used
map< string, int > topLabelCollection; // count of top labels, not used
SyntaxTree tree;