Skip to content

Commit

Permalink
Fix my previous fix for issue #3 which wasn't properly accounting for…
Browse files Browse the repository at this point in the history
… the contents of savedWrd_.
  • Loading branch information
dmcc committed Sep 23, 2011
1 parent cd47a99 commit be613c6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions first-stage/PARSE/ewDciTokStrm.C
Expand Up @@ -108,9 +108,14 @@ read() // tion, savedWrd_ may or may not be empty, and nextWrd_
// will be empty only if the input stream has run dry.
{
if (nextWrd_ == "</s>") {
savedWrd_ = "";
nextWrd_ = "";
return "</s>";
if (savedWrd_.length()) { // return saved word first
ECString saved = savedWrd_;
savedWrd_ = "";
return saved;
} else {
nextWrd_ = "";
return "</s>";
}
}

if( !savedWrd_.length() )
Expand Down

0 comments on commit be613c6

Please sign in to comment.