3213 */ |
3213 */ |
3214 |
3214 |
3215 /* NOTE: in IEC 61131-3 v3, the formal syntax definition does not define non_generic_type_name to include FB type names. |
3215 /* NOTE: in IEC 61131-3 v3, the formal syntax definition does not define non_generic_type_name to include FB type names. |
3216 * However, in section "6.3.4.10 References", example 4 includes a REF_TO a FB type! |
3216 * However, in section "6.3.4.10 References", example 4 includes a REF_TO a FB type! |
3217 * We have therefore explicitly added the "REF_TO function_block_type_name" to this rule! |
3217 * We have therefore explicitly added the "REF_TO function_block_type_name" to this rule! |
|
3218 * NOTE: the REF_TO ANY is a non-standard extension to the standard. This is basically equivalent to a (void *) |
3218 */ |
3219 */ |
3219 ref_spec: /* defined in IEC 61131-3 v3 */ |
3220 ref_spec: /* defined in IEC 61131-3 v3 */ |
3220 REF_TO non_generic_type_name |
3221 REF_TO non_generic_type_name |
3221 {$$ = new ref_spec_c($2, locloc(@$));} |
3222 {$$ = new ref_spec_c($2, locloc(@$));} |
3222 | REF_TO function_block_type_name |
3223 | REF_TO function_block_type_name |
3223 {$$ = new ref_spec_c($2, locloc(@$));} |
3224 {$$ = new ref_spec_c($2, locloc(@$));} |
|
3225 | REF_TO ANY |
|
3226 {$$ = new ref_spec_c(new generic_type_any_c(locloc(@2)), locloc(@$));} |
3224 /* The following line is actually not included in IEC 61131-3, but we add it anyway otherwise it will not be possible to |
3227 /* The following line is actually not included in IEC 61131-3, but we add it anyway otherwise it will not be possible to |
3225 * define a REF_TO datatype as an alias to an already previously declared REF_TO datatype. |
3228 * define a REF_TO datatype as an alias to an already previously declared REF_TO datatype. |
3226 * For example: |
3229 * For example: |
3227 * TYPE |
3230 * TYPE |
3228 * ref1: REF_TO INT; |
3231 * ref1: REF_TO INT; |