3211 ; |
3211 ; |
3212 |
3212 |
3213 |
3213 |
3214 structure_element_declaration: |
3214 structure_element_declaration: |
3215 structure_element_name ':' simple_spec_init |
3215 structure_element_name ':' simple_spec_init |
3216 {$$ = new structure_element_declaration_c($1, $3, locloc(@$));} |
3216 {$$ = new structure_element_declaration_c($1, $3, locloc(@$)); $$->token = $1->token;} |
3217 | structure_element_name ':' subrange_spec_init |
3217 | structure_element_name ':' subrange_spec_init |
3218 {$$ = new structure_element_declaration_c($1, $3, locloc(@$));} |
3218 {$$ = new structure_element_declaration_c($1, $3, locloc(@$)); $$->token = $1->token;} |
3219 | structure_element_name ':' enumerated_spec_init |
3219 | structure_element_name ':' enumerated_spec_init |
3220 {$$ = new structure_element_declaration_c($1, $3, locloc(@$));} |
3220 {$$ = new structure_element_declaration_c($1, $3, locloc(@$)); $$->token = $1->token;} |
3221 | structure_element_name ':' array_spec_init |
3221 | structure_element_name ':' array_spec_init |
3222 {$$ = new structure_element_declaration_c($1, $3, locloc(@$));} |
3222 {$$ = new structure_element_declaration_c($1, $3, locloc(@$)); $$->token = $1->token;} |
3223 | structure_element_name ':' initialized_structure |
3223 | structure_element_name ':' initialized_structure |
3224 {$$ = new structure_element_declaration_c($1, $3, locloc(@$));} |
3224 {$$ = new structure_element_declaration_c($1, $3, locloc(@$)); $$->token = $1->token;} |
3225 | structure_element_name ':' ref_spec_init /* non standard extension: Allow use of struct elements storing REF_TO datatypes (either using REF_TO or a previosuly declared ref type) */ |
3225 | structure_element_name ':' ref_spec_init /* non standard extension: Allow use of struct elements storing REF_TO datatypes (either using REF_TO or a previosuly declared ref type) */ |
3226 { $$ = new structure_element_declaration_c($1, $3, locloc(@$)); |
3226 { $$ = new structure_element_declaration_c($1, $3, locloc(@$)); |
3227 if (!allow_ref_to_in_derived_datatypes) { |
3227 if (!allow_ref_to_in_derived_datatypes) { |
3228 print_err_msg(locf(@$), locl(@$), "REF_TO and reference datatypes may not be used in a STRUCT element (use -R option to activate support for this non-standard syntax)."); |
3228 print_err_msg(locf(@$), locl(@$), "REF_TO and reference datatypes may not be used in a STRUCT element (use -R option to activate support for this non-standard syntax)."); |
3229 yynerrs++; |
3229 yynerrs++; |