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:
Lars-Peter Clausen
2022-01-15 22:26:29 +01:00
parent ae954e5df7
commit 3ca1c129ce
+7 -7
View File
@@ -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);