lexer doesn't seem to return TOK_REG for logic anymore
authorJeff Wang <jjj11x@gmail.com>
Thu, 16 Jan 2020 22:11:08 +0000 (17:11 -0500)
committerJeff Wang <jeffrey.wang@ll.mit.edu>
Thu, 16 Jan 2020 23:08:58 +0000 (18:08 -0500)
frontends/verilog/verilog_parser.y

index 08db36276cc123a91cb34f484e677ebb0e764844..ea0a09599cc154813904992b4e61bc78e39cf939 100644 (file)
@@ -1261,13 +1261,14 @@ enum_type: TOK_ENUM {
 
 enum_base_type: int_vec param_range
        | int_atom
-       | /* nothing */         { addRange(astbuf1); }
+       | /* nothing */         {astbuf1->is_reg = true; addRange(astbuf1); }
        ;
 
-int_atom: TOK_INTEGER          { addRange(astbuf1); }          // probably should do byte, range [7:0] here
+int_atom: TOK_INTEGER          {astbuf1->is_reg=true; addRange(astbuf1); }             // probably should do byte, range [7:0] here
        ;
 
-int_vec: TOK_REG               { astbuf1->is_reg = true; }     // lexer returns this for logic|bit too
+int_vec: TOK_REG {astbuf1->is_reg = true;}
+       | TOK_LOGIC  {astbuf1->is_logic = true;}
        ;
 
 enum_name_list: