read_xaiger to cope with optional '\n' after 'c'
authorEddie Hung <eddie@fpgeh.com>
Tue, 17 Dec 2019 23:43:21 +0000 (15:43 -0800)
committerEddie Hung <eddie@fpgeh.com>
Tue, 17 Dec 2019 23:45:26 +0000 (15:45 -0800)
frontends/aiger/aigerparse.cc

index 65a9e30ae3db0fb3fcb0fef05703cb0b4d465eea..abc2f414486840e5d98c176d9cb3ed6220e63b9c 100644 (file)
@@ -379,8 +379,8 @@ void AigerReader::parse_xaiger(const dict<int,IdString> &box_lookup)
        int c = f.get();
        if (c != 'c')
                log_error("Line %u: cannot interpret first character '%c'!\n", line_count, c);
-       c = f.get();
-       log_assert(c == '\n');
+       if (f.peek() == '\n')
+               f.get();
 
        // Parse footer (symbol table, comments, etc.)
        std::string s;