Fix bug introduced when adding support for relaxed datatype model: change derived_datatype_identifier_c to identifier_c when used as an identifier
authormjsousa
Sat, 29 Nov 2014 20:32:11 +0000
changeset 953 66697c05a147
parent 952 e984cfdf3b10
child 954 a3f6039f1684
Fix bug introduced when adding support for relaxed datatype model: change derived_datatype_identifier_c to identifier_c when used as an identifier
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