Recognizer an expression that is OK for a SystemVerilog-2012
(vl-expr-net-lvalue-p x) → bool
Here's the grammar for
net_lvalue ::= ps_or_hierarchical_net_identifier constant_select | '{' net_lvalue { ',' net_lvalue } '}' | [ assignment_pattern_expression_type ] assignment_pattern_net_lvalue
The first production essentially corresponds to our notion of an
index expression and the second to concatenation. The third
production is quite similar to
assignment_pattern_expression ::= [ assignment_pattern_expression_type ] assignment_pattern
Except that here we have an
assignment_pattern_net_lvalue ::= QUOTE '{' net_lvalue { ',' net_lvalue } '}' assignment_pattern ::= QUOTE '{' expression { ',' expression } '}' | QUOTE '{' structure_pattern_key ... | QUOTE '{' array_pattern_key ... | QUOTE '{' constant_expression '{' ...
So essentially the grammar is just trying to (1) rule out the
fancier structure/array/replication assignment patterns while still
allowing basic positional assignment patterns, and (2) ensure that all
of the expressions within the assignment pattern here happen to be
good