diff --git a/lexor.lex b/lexor.lex index bac72dedd..3381581a7 100644 --- a/lexor.lex +++ b/lexor.lex @@ -429,6 +429,12 @@ TU [munpf] if (strcmp(yytext,"$attribute") == 0) return KK_attribute; + + if (gn_system_verilog() && strcmp(yytext,"$unit") == 0) { + yylval.package = pform_units.back(); + return PACKAGE_IDENTIFIER; + } + yylval.text = strdupnew(yytext); return SYSTEM_IDENTIFIER; }