# HG changeset patch # User mjsousa # Date 1417293131 0 # Node ID 66697c05a147eb58f2906f648e68b662fe8c6ede # Parent e984cfdf3b10080ec131858966bca326fa187c40 Fix bug introduced when adding support for relaxed datatype model: change derived_datatype_identifier_c to identifier_c when used as an identifier diff -r e984cfdf3b10 -r 66697c05a147 stage1_2/iec_bison.yy --- a/stage1_2/iec_bison.yy Sat Nov 29 13:43:20 2014 +0000 +++ b/stage1_2/iec_bison.yy Sat Nov 29 20:32:11 2014 +0000 @@ -1589,13 +1589,14 @@ | prev_declared_fb_name | prev_declared_variable_name /**/ -| prev_declared_enumerated_type_name -| prev_declared_simple_type_name -| prev_declared_subrange_type_name -| prev_declared_array_type_name -| prev_declared_structure_type_name -| prev_declared_string_type_name -| prev_declared_ref_type_name /* defined in IEC 61131-3 v3 */ + /* ref_type_name is defined in IEC 61131-3 v3 */ +| prev_declared_ref_type_name {$$ = new identifier_c(((token_c *)$1)->value, locloc(@$));}; // change the derived_datatype_identifier_c into an identifier_c, as it will be taking the place of an identifier! +| prev_declared_simple_type_name {$$ = new identifier_c(((token_c *)$1)->value, locloc(@$));}; // change the derived_datatype_identifier_c into an identifier_c, as it will be taking the place of an identifier! +| prev_declared_subrange_type_name {$$ = new identifier_c(((token_c *)$1)->value, locloc(@$));}; // change the derived_datatype_identifier_c into an identifier_c, as it will be taking the place of an identifier! +| prev_declared_enumerated_type_name {$$ = new identifier_c(((token_c *)$1)->value, locloc(@$));}; // change the derived_datatype_identifier_c into an identifier_c, as it will be taking the place of an identifier! +| prev_declared_array_type_name {$$ = new identifier_c(((token_c *)$1)->value, locloc(@$));}; // change the derived_datatype_identifier_c into an identifier_c, as it will be taking the place of an identifier! +| prev_declared_structure_type_name {$$ = new identifier_c(((token_c *)$1)->value, locloc(@$));}; // change the derived_datatype_identifier_c into an identifier_c, as it will be taking the place of an identifier! +| prev_declared_string_type_name {$$ = new identifier_c(((token_c *)$1)->value, locloc(@$));}; // change the derived_datatype_identifier_c into an identifier_c, as it will be taking the place of an identifier! | prev_declared_derived_function_name | prev_declared_derived_function_block_name | prev_declared_program_type_name