diff options
author | Jeff Wang <jjj11x@gmail.com> | 2020-01-16 17:17:42 -0500 |
---|---|---|
committer | Jeff Wang <jeffrey.wang@ll.mit.edu> | 2020-01-16 17:17:42 -0500 |
commit | 5ddf84d430a176acf5ab638a86c84484277bee84 (patch) | |
tree | 3d541e0ca6012ae1861b263d4c05be2488634189 | |
parent | 16ea4ea61abd8f000564b3bfe1c88246c1caf631 (diff) | |
download | yosys-5ddf84d430a176acf5ab638a86c84484277bee84.tar.gz yosys-5ddf84d430a176acf5ab638a86c84484277bee84.tar.bz2 yosys-5ddf84d430a176acf5ab638a86c84484277bee84.zip |
allow enum typedefs
-rw-r--r-- | frontends/verilog/verilog_parser.y | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index 66dcf1fec..08db36276 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -1523,7 +1523,12 @@ typedef_decl: ast_stack.back()->children.push_back(new AstNode(AST_TYPEDEF, astbuf1)); ast_stack.back()->children.back()->str = *$4; - }; + } | + TOK_TYPEDEF enum_type TOK_ID ';' { + ast_stack.back()->children.push_back(new AstNode(AST_TYPEDEF, astbuf1)); + ast_stack.back()->children.back()->str = *$3; + } + ; cell_stmt: attr TOK_ID { |