+opt_primary_parameters
+ : /* empty */
+ {
+ $$ = null;
+ }
+ | primary_parameters
+ ;
+
+primary_parameters
+ : OPEN_PARENS opt_formal_parameter_list CLOSE_PARENS
+ {
+ $$ = $2;
+
+ // Cannot use opt_formal_parameter_list because it can be shared instance for empty parameters
+ lbag.AppendToMember (current_container, GetLocation ($1), GetLocation ($3));
+ }
+ ;
+
+opt_primary_parameters_with_class_base
+ : /* empty */
+ {
+ $$ = null;
+ }
+ | class_base
+ {
+ $$ = null;
+ }
+ | primary_parameters
+ {
+ $$ = $1;
+ }
+ | primary_parameters class_base OPEN_PARENS
+ {
+ ++lexer.parsing_block;
+ }
+ opt_argument_list CLOSE_PARENS
+ {
+ lbag.AppendToMember (current_container, GetLocation ($3), GetLocation ($6));
+ ((Class)current_type).PrimaryConstructorBaseArguments = (Arguments) $5;
+ --lexer.parsing_block;
+
+ $$ = $1;
+ }
+ ;
+