Parse package import declarations.
This commit is contained in:
parent
62be9c5b46
commit
0339f5ed57
|
|
@ -192,6 +192,7 @@ TU [munpf]
|
||||||
"++" { return K_INCR; }
|
"++" { return K_INCR; }
|
||||||
"--" {return K_DECR; }
|
"--" {return K_DECR; }
|
||||||
"'{" { return K_LP; }
|
"'{" { return K_LP; }
|
||||||
|
"::" { return K_SCOPE_RES; }
|
||||||
|
|
||||||
/* Watch out for the tricky case of (*). Cannot parse this as "(*"
|
/* Watch out for the tricky case of (*). Cannot parse this as "(*"
|
||||||
and ")", but since I know that this is really ( * ), replace it
|
and ")", but since I know that this is really ( * ), replace it
|
||||||
|
|
|
||||||
19
parse.y
19
parse.y
|
|
@ -409,6 +409,7 @@ static void current_function_set_statement(const YYLTYPE&loc, vector<Statement*>
|
||||||
%token K_PO_POS K_PO_NEG K_POW
|
%token K_PO_POS K_PO_NEG K_POW
|
||||||
%token K_PSTAR K_STARP K_DOTSTAR
|
%token K_PSTAR K_STARP K_DOTSTAR
|
||||||
%token K_LOR K_LAND K_NAND K_NOR K_NXOR K_TRIGGER
|
%token K_LOR K_LAND K_NAND K_NOR K_NXOR K_TRIGGER
|
||||||
|
%token K_SCOPE_RES
|
||||||
%token K_edge_descriptor
|
%token K_edge_descriptor
|
||||||
|
|
||||||
/* The base tokens from 1364-1995. */
|
/* The base tokens from 1364-1995. */
|
||||||
|
|
@ -1335,6 +1336,22 @@ package_declaration /* IEEE1800-2005 A.1.2 */
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
package_import_declaration /* IEEE1800-2005 A.2.1.3 */
|
||||||
|
: K_import package_import_item_list ';'
|
||||||
|
{ yyerror(@1, "sorry: Package import declarations not supported.");
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
package_import_item
|
||||||
|
: IDENTIFIER K_SCOPE_RES IDENTIFIER
|
||||||
|
| IDENTIFIER K_SCOPE_RES '*'
|
||||||
|
;
|
||||||
|
|
||||||
|
package_import_item_list
|
||||||
|
: package_import_item_list',' package_import_item
|
||||||
|
| package_import_item
|
||||||
|
;
|
||||||
|
|
||||||
package_item /* IEEE1800-2005 A.1.10 */
|
package_item /* IEEE1800-2005 A.1.10 */
|
||||||
: timeunits_declaration
|
: timeunits_declaration
|
||||||
| K_localparam param_type localparam_assign_list ';'
|
| K_localparam param_type localparam_assign_list ';'
|
||||||
|
|
@ -4267,6 +4284,8 @@ module_item
|
||||||
pform_endgenerate();
|
pform_endgenerate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
| package_import_declaration
|
||||||
|
|
||||||
/* 1364-2001 and later allow specparam declarations outside specify blocks. */
|
/* 1364-2001 and later allow specparam declarations outside specify blocks. */
|
||||||
|
|
||||||
| attribute_list_opt K_specparam specparam_decl ';'
|
| attribute_list_opt K_specparam specparam_decl ';'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue