Skip to content

Commit e73ac32

Browse files
committed
Verilog: add missing expression precedences
This adds the missing precedences for some Verilog operators.
1 parent 2be0696 commit e73ac32

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/verilog/parser.y

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ int yyverilogerror(const char *error)
581581
// following System Verilog 1800-2017 Table 11-2.
582582
// Bison expects these in order of increasing precedence,
583583
// whereas the table gives them in decreasing order.
584+
%nonassoc '{'
585+
%nonassoc '=' "+=" "-=" "*=" "/=" "%=" "&=" "^=" "|=" "<<=" ">>=" "<<<=" ">>>=" ":=" ":/"
584586
%right "->" "<->"
585587
%right "?" ":"
586588
%left "||"

0 commit comments

Comments
 (0)