@@ -750,19 +750,66 @@ program_declaration:
750
750
;
751
751
752
752
checker_declaration:
753
- TOK_CHECKER checker_identifier
754
- {
755
- init ($$, ID_verilog_checker);
756
- stack_expr ($$).set (ID_base_name, stack_expr ($2 ).id ());
757
- }
758
- ' ;'
753
+ TOK_CHECKER { init ($$); } checker_identifier
754
+ checker_port_list_paren_opt ' ;'
759
755
checker_or_generate_item_brace
760
756
TOK_ENDCHECKER
761
757
{
762
- $$ = $3 ;
758
+ init ($$);
759
+ irept attributes;
760
+ exprt parameter_port_list;
761
+ stack_expr ($$) = verilog_parse_treet::create_module (
762
+ attributes, // attributes,
763
+ stack_expr ($2 ), // module_keyword
764
+ stack_expr ($3 ), // name
765
+ parameter_port_list, // parameter_port_list
766
+ stack_expr ($4 ), // ports
767
+ stack_expr ($6 ) // module_items
768
+ );
769
+ stack_expr ($$).id (ID_verilog_checker);
763
770
}
764
771
;
765
772
773
+ checker_port_list_paren_opt:
774
+ /* Optional */
775
+ { init ($$); }
776
+ | ' (' checker_port_list_opt ' )'
777
+ { $$ = $2 ; }
778
+ ;
779
+
780
+ checker_port_list_opt:
781
+ /* Optional */
782
+ { init ($$); }
783
+ | checker_port_list
784
+ ;
785
+
786
+ checker_port_list:
787
+ checker_port_item
788
+ { init ($$); mts ($$, $1 ); }
789
+ | checker_port_list checker_port_item
790
+ { $$ = $1 ; mts ($$, $2 ); }
791
+ ;
792
+
793
+ checker_port_item:
794
+ attribute_instance_brace
795
+ checker_port_direction_opt
796
+ property_formal_type
797
+ formal_port_identifier
798
+ variable_dimension_brace
799
+ { init ($$, ID_decl);
800
+ mto ($$, $4 );
801
+ }
802
+ ;
803
+
804
+ checker_port_direction_opt:
805
+ /* Optional */
806
+ { init ($$); }
807
+ | TOK_INPUT
808
+ { init ($$, ID_input); }
809
+ | TOK_OUTPUT
810
+ { init ($$, ID_output); }
811
+ ;
812
+
766
813
class_declaration:
767
814
TOK_CLASS class_identifier
768
815
' ;'
@@ -1030,7 +1077,9 @@ non_port_interface_item:
1030
1077
1031
1078
checker_or_generate_item_brace:
1032
1079
/* Optional */
1080
+ { init ($$); }
1033
1081
| checker_or_generate_item_brace attribute_instance_brace checker_or_generate_item
1082
+ { $$ = $1 ; mts ($$, $3 ); }
1034
1083
;
1035
1084
1036
1085
checker_or_generate_item:
@@ -2323,7 +2372,8 @@ property_port_item:
2323
2372
;
2324
2373
2325
2374
property_formal_type:
2326
- TOK_PROPERTY
2375
+ sequence_formal_type
2376
+ | TOK_PROPERTY
2327
2377
;
2328
2378
2329
2379
property_spec:
@@ -2334,6 +2384,14 @@ property_spec:
2334
2384
| property_expr
2335
2385
;
2336
2386
2387
+ sequence_formal_type:
2388
+ data_type
2389
+ | TOK_SEQUENCE
2390
+ { init ($$, ID_verilog_sequence); }
2391
+ | TOK_UNTYPED
2392
+ { init ($$, ID_verilog_untyped); }
2393
+ ;
2394
+
2337
2395
// The 1800-2017 grammar has an ambiguity where
2338
2396
// '(' expression ')' can either be an expression or a property_expr,
2339
2397
// which yields a reduce/reduce conflict. Hence, we split the rules
0 commit comments