diff --git a/src/V3PreLex.l b/src/V3PreLex.l index 429d1c3cc..63e5989c2 100644 --- a/src/V3PreLex.l +++ b/src/V3PreLex.l @@ -160,7 +160,7 @@ bom [\357\273\277] BEGIN(ENCBASE64); return VP_TEXT; } ("begin_protected"|"end_protected"|"end")[\n\r] { FL_FWDC; linenoInc(); BEGIN(INITIAL); return VP_TEXT; } -"version="[^\n\r]*[\n\r] { +"version"{wsn}*={wsn}*[^\n\r]*[\n\r] { FL_FWDC; linenoInc(); BEGIN(INITIAL); diff --git a/test_regress/t/t_lint_pragma_protected.v b/test_regress/t/t_lint_pragma_protected.v index 3852391fc..5525477b2 100644 --- a/test_regress/t/t_lint_pragma_protected.v +++ b/test_regress/t/t_lint_pragma_protected.v @@ -9,7 +9,11 @@ module t_lint_pragma_protected; `pragma protect begin_protected +// Any amount of whitespace should be ok `pragma protect version=1 +`pragma protect version = 1 +`pragma protect version= 1 +`pragma protect version =1 `pragma protect encrypt_agent="XXXXX" `pragma protect encrypt_agent_info="YYYYY" `pragma protect data_method="AES128-CBC"