Fixed handling of quotes in liberty parser
authorClifford Wolf <clifford@clifford.at>
Wed, 18 Mar 2015 15:03:19 +0000 (16:03 +0100)
committerClifford Wolf <clifford@clifford.at>
Wed, 18 Mar 2015 15:03:19 +0000 (16:03 +0100)
passes/techmap/libparse.cc

index f84ce4802e608d15d28ade94b6c5f141ac7bff7e..def480394aec91faee5001920c459cea1bf9edb8 100644 (file)
@@ -105,14 +105,14 @@ int LibertyParser::lexer(std::string &str)
        }
 
        if (c == '"') {
-               str = c;
+               str = "";
                while (1) {
                        c = f.get();
                        if (c == '\n')
                                line++;
-                       str += c;
                        if (c == '"')
                                break;
+                       str += c;
                }
                // fprintf(stderr, "LEX: string >>%s<<\n", str.c_str());
                return 'v';