Merge
authorAlpar Juttner <alpar@cs.elte.hu>
Fri, 12 Dec 2008 22:14:29 +0000
changeset 4345c69a36729cb
parent 432 e9a568cc86e3
parent 428 919878a41a60
child 435 30d22b636e57
Merge
     1.1 --- a/lemon/lgf_reader.h	Fri Dec 12 21:41:05 2008 +0000
     1.2 +++ b/lemon/lgf_reader.h	Fri Dec 12 22:14:29 2008 +0000
     1.3 @@ -870,7 +870,9 @@
     1.4        while (readSuccess() && line >> c && c != '@') {
     1.5          readLine();
     1.6        }
     1.7 -      line.putback(c);
     1.8 +      if (readSuccess()) {
     1.9 +        line.putback(c);
    1.10 +      }
    1.11      }
    1.12  
    1.13      void readNodes() {
    1.14 @@ -1699,7 +1701,9 @@
    1.15        while (readSuccess() && line >> c && c != '@') {
    1.16          readLine();
    1.17        }
    1.18 -      line.putback(c);
    1.19 +      if (readSuccess()) {
    1.20 +        line.putback(c);
    1.21 +      }
    1.22      }
    1.23  
    1.24      void readNodes() {
    1.25 @@ -2226,7 +2230,9 @@
    1.26        while (readSuccess() && line >> c && c != '@') {
    1.27          readLine();
    1.28        }
    1.29 -      line.putback(c);
    1.30 +      if (readSuccess()) {
    1.31 +        line.putback(c);
    1.32 +      }
    1.33      }
    1.34  
    1.35    public:
    1.36 @@ -2567,7 +2573,9 @@
    1.37        while (readSuccess() && line >> c && c != '@') {
    1.38          readLine();
    1.39        }
    1.40 -      line.putback(c);
    1.41 +      if (readSuccess()) {
    1.42 +        line.putback(c);
    1.43 +      }
    1.44      }
    1.45  
    1.46      void readMaps(std::vector<std::string>& maps) {