@@ -746,6 +746,20 @@ program_declaration:
746746 TOK_PROGRAM TOK_ENDPROGRAM
747747 ;
748748
749+ checker_declaration:
750+ TOK_CHECKER checker_identifier
751+ {
752+ init ($$, ID_verilog_checker);
753+ stack_expr ($$).set (ID_base_name, stack_expr ($2 ).id ());
754+ }
755+ ' ;'
756+ checker_or_generate_item_brace
757+ TOK_ENDCHECKER
758+ {
759+ $$ = $3 ;
760+ }
761+ ;
762+
749763class_declaration:
750764 TOK_CLASS class_identifier
751765 ' ;'
@@ -1007,6 +1021,42 @@ non_port_interface_item:
10071021 | interface_declaration
10081022 /* | timeunits_declaration */
10091023 ;
1024+
1025+ // System Verilog standard 1800-2017
1026+ // A.1.9 Checker items
1027+
1028+ checker_or_generate_item_brace:
1029+ /* Optional */
1030+ | checker_or_generate_item_brace attribute_instance_brace checker_or_generate_item
1031+ ;
1032+
1033+ checker_or_generate_item:
1034+ checker_or_generate_item_declaration
1035+ | initial_construct
1036+ | always_construct
1037+ | final_construct
1038+ | assertion_item
1039+ | continuous_assign
1040+ | checker_generate_item
1041+ ;
1042+
1043+ checker_or_generate_item_declaration:
1044+ data_declaration
1045+ | function_declaration
1046+ | checker_declaration
1047+ | assertion_item_declaration
1048+ | covergroup_declaration
1049+ | genvar_declaration
1050+ | TOK_DEFAULT TOK_CLOCKING clocking_identifier ' ;'
1051+ | TOK_DEFAULT TOK_DISABLE TOK_IFF expression_or_dist ' ;'
1052+ | ' ;'
1053+ ;
1054+
1055+ checker_generate_item:
1056+ loop_generate_construct
1057+ | conditional_generate_construct
1058+ | generate_region
1059+ ;
10101060
10111061// System Verilog standard 1800-2017
10121062// A.1.9 Class items
@@ -1170,6 +1220,7 @@ package_or_generate_item_declaration:
11701220 | data_declaration
11711221 | task_declaration
11721222 | function_declaration
1223+ | checker_declaration
11731224 | class_declaration
11741225 | local_parameter_declaration ' ;'
11751226 | parameter_declaration ' ;'
@@ -4076,6 +4127,10 @@ endmodule_identifier_opt:
40764127 | TOK_COLON module_identifier
40774128 ;
40784129
4130+ clocking_identifier: TOK_NON_TYPE_IDENTIFIER;
4131+
4132+ checker_identifier: TOK_NON_TYPE_IDENTIFIER;
4133+
40794134net_identifier: identifier;
40804135
40814136package_identifier: TOK_NON_TYPE_IDENTIFIER;
0 commit comments