diff --git a/src/verilog.l b/src/verilog.l index 36d8c41b6..1faf7a4bc 100644 --- a/src/verilog.l +++ b/src/verilog.l @@ -455,7 +455,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} "return" { FL; return yRETURN; } "shortint" { FL; return ySHORTINT; } "shortreal" { FL; return ySHORTREAL; } - "static" { FL; return ySTATIC; } + "static" { FL; return ySTATIC__ETC; } "string" { FL; return ySTRING; } "struct" { FL; return ySTRUCT; } "timeprecision" { FL; return yTIMEPRECISION; } diff --git a/src/verilog.y b/src/verilog.y index 68fc6208a..fc380300f 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -446,7 +446,7 @@ class AstSenTree; %token ySIGNED "signed" %token ySPECIFY "specify" %token ySPECPARAM "specparam" -%token ySTATIC "static" +%token ySTATIC__ETC "static" %token ySTRING "string" %token ySTRUCT "struct" %token ySUPPLY0 "supply0" @@ -1750,7 +1750,7 @@ type_declaration: // ==IEEE: type_declaration yTYPEDEF data_type idAny variable_dimensionListE dtypeAttrListE ';' /**/ { $$ = new AstTypedef($3, *$3, $5, VFlagChildDType(), GRAMMARP->createArray($2,$4,false)); SYMP->reinsert($$); PARSEP->tagNodep($$); } - //UNSUP yTYPEDEF id/*interface*/ '.' idAny/*type*/ idAny/*type*/ ';' { $$ = NULL; $1->v3error("Unsupported: SystemVerilog 2005 typedef in this context"); } //UNSUP + | yTYPEDEF id/*interface*/ '.' idAny/*type*/ idAny/*type*/ ';' { $$ = NULL; BBUNSUP($1, "Unsupported: SystemVerilog 2005 typedef in this context"); } // // Combines into above "data_type id" rule // // Verilator: Not important what it is in the AST, just need to make sure the yaID__aTYPE gets returned | yTYPEDEF id ';' { $$ = NULL; $$ = new AstTypedefFwd($2, *$2); SYMP->reinsert($$); PARSEP->tagNodep($$); } @@ -3051,7 +3051,7 @@ lifetimeE: // IEEE: [lifetime] lifetime: // ==IEEE: lifetime // // Note lifetime used by members is instead under memberQual - ySTATIC { $1->v3error("Unsupported: Static in this context"); } + ySTATIC__ETC { BBUNSUP($1, "Unsupported: Static in this context"); } | yAUTOMATIC { } ; @@ -3356,9 +3356,9 @@ expr: // IEEE: part of expression/constant_expression/primary // // Indistinguishable from function_subroutine_call:method_call // | '$' { $$ = new AstConst($1, AstConst::LogicFalse()); - $1->v3error("Unsupported: $ expression"); } + BBUNSUP($1, "Unsupported: $ expression"); } | yNULL { $$ = new AstConst($1, AstConst::LogicFalse()); - $1->v3error("Unsupported: null expression"); } + BBUNSUP($1, "Unsupported: null expression"); } // // IEEE: yTHIS // // See exprScope // @@ -3372,7 +3372,7 @@ expr: // IEEE: part of expression/constant_expression/primary // // IEEE: cond_predicate - here to avoid reduce problems // // Note expr includes cond_pattern | ~l~expr yP_ANDANDAND ~r~expr { $$ = new AstConst($2, AstConst::LogicFalse()); - $2->v3error("Unsupported: &&& expression"); } + BBUNSUP($2, "Unsupported: &&& expression"); } // // // IEEE: cond_pattern - here to avoid reduce problems // // "expr yMATCHES pattern"