mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
Allow packed arrays of scoped types identifiers
Allow scoped identifiers to be used as the base type for packed array types. Scoped type identifiers can be used the same way as unscoped type identifiers. E.g. ``` package p; typedef logic [1:0] vector; endpackage module test; p::vector [1:0] pa; endmodule ``` is a valid construct. Signed-off-by: Lars-Peter Clausen <[email protected]>
This commit is contained in:
@@ -1186,6 +1186,13 @@ packed_array_data_type /* IEEE1800-2005: A.2.2.1 */
|
||||
delete[]$1.text;
|
||||
$$ = $1.type;
|
||||
}
|
||||
| PACKAGE_IDENTIFIER K_SCOPE_RES
|
||||
{ lex_in_package_scope($1); }
|
||||
TYPE_IDENTIFIER
|
||||
{ lex_in_package_scope(0);
|
||||
$$ = $4.type;
|
||||
delete[]$4.text;
|
||||
}
|
||||
;
|
||||
|
||||
data_type /* IEEE1800-2005: A.2.2.1 */
|
||||
@@ -1233,13 +1240,6 @@ data_type /* IEEE1800-2005: A.2.2.1 */
|
||||
$$ = $1;
|
||||
}
|
||||
}
|
||||
| PACKAGE_IDENTIFIER K_SCOPE_RES
|
||||
{ lex_in_package_scope($1); }
|
||||
TYPE_IDENTIFIER
|
||||
{ lex_in_package_scope(0);
|
||||
$$ = $4.type;
|
||||
delete[]$4.text;
|
||||
}
|
||||
| K_string
|
||||
{ string_type_t*tmp = new string_type_t;
|
||||
FILE_NAME(tmp, @1);
|
||||
|
||||
Reference in New Issue
Block a user