Skip to content

Commit b43ff97

Browse files
committed
SystemVerilog .*
SystemVerilog 1800-2005 has introduced the .* operator, used for a) implicit port connections, and b) patterns. This adds support to the scanner, parser, and type checker.
1 parent d7fd7c2 commit b43ff97

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Verilog: $onehot and $onehot0 are now elaboration-time constant
66
* SystemVerilog: fix for #-# and #=# for empty matches
77
* SystemVerilog: fix for |-> and |=> for empty matches
8+
* SystemVerilog: support 1800-2005 .*
89
* LTL/SVA to Buechi with --buechi
910
* SMV: abs, bool, count, max, min, toint, word1
1011
* BMC: new encoding for F, avoiding spurious traces

src/verilog/parser.y

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ int yyverilogerror(const char *error)
405405
%token TOK_LSQPLUS "[+"
406406
%token TOK_LSQEQUAL "[="
407407
%token TOK_LSQMINUSGREATER "[->"
408+
%token TOK_DOTASTERIC ".*"
408409

409410
/* System Verilog Keywords */
410411
%token TOK_ACCEPT_ON "accept_on"

src/verilog/scanner.l

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ void verilog_scanner_init()
273273
"[+" { SYSTEM_VERILOG_OPERATOR(TOK_LSQPLUS, "[+"); }
274274
"[=" { SYSTEM_VERILOG_OPERATOR(TOK_LSQEQUAL, "[="); }
275275
"[->" { SYSTEM_VERILOG_OPERATOR(TOK_LSQMINUSGREATER, "[->"); }
276+
/* port connections, patterns */
277+
".*" { SYSTEM_VERILOG_OPERATOR(TOK_DOTASTERIC, ".*"); }
276278

277279
/* Verilog 1364-1995 keywords */
278280

0 commit comments

Comments
 (0)