@@ -2633,9 +2633,7 @@ part_select_range:
2633
2633
// A.8.4 Primaries
2634
2634
2635
2635
primary : primary_literal
2636
- | indexed_variable_lvalue
2637
- | indexed_variable_lvalue ' [' part_select_range ' ]'
2638
- { extractbits($$ , $1 , $3 ); }
2636
+ | hierarchical_identifier_select
2639
2637
| concatenation
2640
2638
| replication
2641
2639
| function_subroutine_call
@@ -2649,6 +2647,20 @@ primary_literal:
2649
2647
| time_literal
2650
2648
;
2651
2649
2650
+ // This is equivalent to two System Verilog 1800-2017 productions
2651
+ // hierarchical_identifier select.
2652
+ hierarchical_identifier_select :
2653
+ hierarchical_identifier_bit_select_brace
2654
+ | hierarchical_identifier_bit_select_brace ' [' part_select_range ' ]'
2655
+ { extractbits($$ , $1 , $3 ); }
2656
+ ;
2657
+
2658
+ hierarchical_identifier_bit_select_brace :
2659
+ hierarchical_variable_identifier
2660
+ | hierarchical_identifier_bit_select_brace bit_select
2661
+ { extractbit($$ , $1 , $2 ); }
2662
+ ;
2663
+
2652
2664
time_literal : TOK_TIME_LITERAL
2653
2665
{ init($$ , ID_constant);
2654
2666
addswap ($$, ID_value, $1 );
@@ -2661,9 +2673,7 @@ time_literal: TOK_TIME_LITERAL
2661
2673
net_lvalue : variable_lvalue ;
2662
2674
2663
2675
variable_lvalue :
2664
- indexed_variable_lvalue
2665
- | indexed_variable_lvalue ' [' part_select_range ' ]'
2666
- { extractbits($$ , $1 , $3 ); }
2676
+ hierarchical_identifier_select
2667
2677
| concatenation
2668
2678
/* more generous than the rule below to avoid conflict */
2669
2679
/*
@@ -2679,12 +2689,6 @@ variable_concatenation_lvalue_brace:
2679
2689
{ $$ =$1 ; mto($$ , $3 ); }
2680
2690
;
2681
2691
2682
- indexed_variable_lvalue :
2683
- hierarchical_variable_identifier
2684
- | indexed_variable_lvalue bit_select
2685
- { extractbit($$ , $1 , $2 ); }
2686
- ;
2687
-
2688
2692
const_expression : expression ;
2689
2693
2690
2694
mintypmax_expression :
0 commit comments