diff options
author | Ruben Undheim <ruben.undheim@gmail.com> | 2018-10-13 20:48:55 +0200 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2018-10-13 20:50:33 +0200 |
commit | 736105b0468f9468f00915cad60949535ce5a496 (patch) | |
tree | 58c3ea9ac3ba2d7c3fecd33f815494dac9c8c445 /frontends/verilog/verilog_parser.y | |
parent | c50afc4246d552db079aec303b0d79ae92107a67 (diff) | |
download | yosys-736105b0468f9468f00915cad60949535ce5a496.tar.gz yosys-736105b0468f9468f00915cad60949535ce5a496.tar.bz2 yosys-736105b0468f9468f00915cad60949535ce5a496.zip |
Handle FIXME for modport members without type directly in front
Diffstat (limited to 'frontends/verilog/verilog_parser.y')
-rw-r--r-- | frontends/verilog/verilog_parser.y | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index a6f37008a..4dbe028a0 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -1344,16 +1344,18 @@ modport_args: modport_arg | modport_args ',' modport_arg; modport_arg: - modport_type_token TOK_ID { + modport_type_token modport_member | + modport_member + +modport_member: + TOK_ID { AstNode *modport_member = new AstNode(AST_MODPORTMEMBER); ast_stack.back()->children.push_back(modport_member); - modport_member->str = *$2; + modport_member->str = *$1; modport_member->is_input = current_modport_input; modport_member->is_output = current_modport_output; - delete $2; - } | - TOK_ID - /* FIXME for TOK_ID without modport_type_token */ + delete $1; + } modport_type_token: TOK_INPUT {current_modport_input = 1; current_modport_output = 0;} | TOK_OUTPUT {current_modport_input = 0; current_modport_output = 1;} |