Skip to content

Commit

Permalink
-> and <-> are System Verilog
Browse files Browse the repository at this point in the history
The two operators -> and <-> are valid System Verilog, but not Verilog.
  • Loading branch information
kroening committed Dec 2, 2023
1 parent 5217d7b commit 46bf195
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/verilog/scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ void verilog_scanner_init()
"^" { return TOK_CARET; }
"~^" { return TOK_TILDECARET; }
"^~" { return TOK_CARETTILDE; }
"->" { return TOK_MINUSGREATER; }

/* Binary operators */

Expand All @@ -210,7 +209,6 @@ void verilog_scanner_init()
">>>" { return TOK_GREATERGREATERGREATER; }
"<<" { return TOK_LESSLESS; }
"<<<" { return TOK_LESSLESSLESS; }
"<->" { return TOK_LESSMINUSGREATER; }

/* Trinary operators */

Expand Down Expand Up @@ -238,6 +236,8 @@ void verilog_scanner_init()
"<<<=" { SYSTEM_VERILOG_OPERATOR(TOK_LESSLESSLESSEQUAL, "<<<="); }
">>>=" { SYSTEM_VERILOG_OPERATOR(TOK_GREATERGREATERGREATEREQUAL, ">>>="); }
"##" { SYSTEM_VERILOG_OPERATOR(TOK_HASHHASH, "##"); }
"<->" { SYSTEM_VERILOG_OPERATOR(TOK_LESSMINUSGREATER, "<->"); }
"->" { SYSTEM_VERILOG_OPERATOR(TOK_MINUSGREATER, "->"); }

/* Verilog keywords */

Expand Down

0 comments on commit 46bf195

Please sign in to comment.