Report errors when extra underscores used in meta-comments.

This commit is contained in:
Wilson Snyder
2010-03-24 22:08:59 -04:00
parent 64719f3ace
commit 7c3048ab9c
4 changed files with 35 additions and 0 deletions
+2
View File
@@ -323,9 +323,11 @@ void V3PreProcImp::comment(const string& text) {
if ((cp[0]=='v' || cp[0]=='V')
&& 0==(strncmp(cp+1,"erilator",8))) {
cp+=strlen("verilator");
if (*cp == '_') fileline()->v3error("Extra underscore in meta-comment; use /*verilator {...}*/ not /*verilator_{...}*/");
} else if (0==(strncmp(cp,"synopsys",strlen("synopsys")))) {
cp+=strlen("synopsys");
synth = true;
if (*cp == '_') fileline()->v3error("Extra underscore in meta-comment; use /*synopsys {...}*/ not /*synopsys_{...}*/");
} else if (0==(strncmp(cp,"cadence",strlen("cadence")))) {
cp+=strlen("cadence");
synth = true;