summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontends/verilog/lexer.l6
-rw-r--r--frontends/verilog/preproc.cc2
2 files changed, 4 insertions, 4 deletions
diff --git a/frontends/verilog/lexer.l b/frontends/verilog/lexer.l
index 0839f5cf..00deeb0b 100644
--- a/frontends/verilog/lexer.l
+++ b/frontends/verilog/lexer.l
@@ -74,21 +74,21 @@ namespace VERILOG_FRONTEND {
%%
-"`file_push "[^\n]* {
+<INITIAL,SYNOPSYS_TRANSLATE_OFF>"`file_push "[^\n]* {
fn_stack.push_back(current_filename);
ln_stack.push_back(frontend_verilog_yyget_lineno());
current_filename = yytext+11;
frontend_verilog_yyset_lineno(0);
}
-"`file_pop"[^\n]*\n {
+<INITIAL,SYNOPSYS_TRANSLATE_OFF>"`file_pop"[^\n]*\n {
current_filename = fn_stack.back();
fn_stack.pop_back();
frontend_verilog_yyset_lineno(ln_stack.back());
ln_stack.pop_back();
}
-"`line"[ \t]+[^ \t\r\n]+[ \t]+\"[^ \r\n]+\"[^\r\n]*\n {
+<INITIAL,SYNOPSYS_TRANSLATE_OFF>"`line"[ \t]+[^ \t\r\n]+[ \t]+\"[^ \r\n]+\"[^\r\n]*\n {
char *p = yytext + 5;
while (*p == ' ' || *p == '\t') p++;
frontend_verilog_yyset_lineno(atoi(p));
diff --git a/frontends/verilog/preproc.cc b/frontends/verilog/preproc.cc
index 9ff68822..2cfa8ca7 100644
--- a/frontends/verilog/preproc.cc
+++ b/frontends/verilog/preproc.cc
@@ -300,7 +300,7 @@ std::string frontend_verilog_preproc(FILE *f, std::string filename, const std::m
input_file(fp, fn);
fclose(fp);
} else
- output_code.push_back("`file_notfound " + fn + "\n");
+ output_code.push_back("`file_notfound " + fn);
continue;
}