Match a
(vl-parse-hierarchical-identifier
recursivep &key (tokstream 'tokstream)
(config 'config))
→
(mv errmsg? value new-tokstream)In Verilog-2005, the rule is:
hierarchical_identifier ::=
{ identifier [ '[' expression ']' '.' } identifier
This permits, e.g.,
SystemVerilog extends this in two ways. The new rule is:
hierarchical_identifier ::=
[ '$root' '.' ] { identifier bit_select '.' } identifier
bit_select ::= { '[' expression ']' }
The first extension,
The second extension is that there can now be multiple levels of indexing,
because the
This function can return a hierarchical identifier or a simple identifier expression. The recursivep argument is used to determine, in the base case, whether the atom we build should be a hidpiece or an ordinary id. Basically, if we have not yet seen a dot then recursivep is nil and we want to just build a regular id token. But otherwise, this id is just part of a hierarchical identifier, so we convert it into a hidpiece.