diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-05-11 09:33:19 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-05-25 07:36:53 -0700 |
commit | d21a07c7b5ef57de5428e5f7913338af582146b5 (patch) | |
tree | a37819fc58c3c44b7ca9fe2ad212e300c5f1b2a4 /frontends | |
parent | 589775538c23975d79aa21050557a37b76acb1dd (diff) | |
download | yosys-d21a07c7b5ef57de5428e5f7913338af582146b5.tar.gz yosys-d21a07c7b5ef57de5428e5f7913338af582146b5.tar.bz2 yosys-d21a07c7b5ef57de5428e5f7913338af582146b5.zip |
verilog: fix #2037 by permitting (and freeing) attributes on null stmt
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/verilog/verilog_parser.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index d39b72547..a0250439e 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -2228,7 +2228,11 @@ simple_behavioral_stmt: behavioral_stmt: defattr | assert | wire_decl | param_decl | localparam_decl | typedef_decl | non_opt_delay behavioral_stmt | - attr simple_behavioral_stmt ';' | ';' | + attr simple_behavioral_stmt ';' | + attr ';' { + log_file_warning(current_filename, get_line_num(), "Attribute(s) attached to null statement. Ignoring.\n"); + free_attr($1); + } | attr hierarchical_id { AstNode *node = new AstNode(AST_TCALL); node->str = *$2; |