Fixed parsing of macros with no arguments and expansion text starting with "("
authorClifford Wolf <clifford@clifford.at>
Fri, 27 Dec 2013 14:05:52 +0000 (15:05 +0100)
committerClifford Wolf <clifford@clifford.at>
Fri, 27 Dec 2013 14:05:52 +0000 (15:05 +0100)
frontends/verilog/preproc.cc

index 023c4dbcc4d25389a2ed986b1680a19c12b8fb42..501adf0591032e3a1b658244a536f984775b10f2 100644 (file)
@@ -309,9 +309,10 @@ std::string frontend_verilog_preproc(FILE *f, std::string filename, const std::m
                        std::map<std::string, int> args;
                        skip_spaces();
                        name = next_token(true);
-                       skip_spaces();
                        int newline_count = 0;
                        int state = 0;
+                       if (skip_spaces() != "")
+                               state = 3;
                        while (!tok.empty()) {
                                tok = next_token();
                                if (state == 0 && tok == "(") {