# HG changeset patch # User Mario de Sousa # Date 1358952794 0 # Node ID 7a6b53d61ea3557d0f78a104848abf8c7d5b13cf # Parent 4d71292f87320cf2a7a4453ca2819ef67246b93b Consider fb_name_decl_c a non base data type class! diff -r 4d71292f8732 -r 7a6b53d61ea3 absyntax_utils/search_base_type.cc --- a/absyntax_utils/search_base_type.cc Wed Jan 23 14:30:03 2013 +0000 +++ b/absyntax_utils/search_base_type.cc Wed Jan 23 14:53:14 2013 +0000 @@ -372,7 +372,19 @@ */ void *search_base_type_c::visit(string_type_declaration_c *symbol) {return (void *)symbol;} - + +/******************************************/ +/* B 1.4.3 - Declaration & Initialisation */ +/******************************************/ +/* fb_name_list ':' function_block_type_name ASSIGN structure_initialization */ +/* structure_initialization -> may be NULL ! */ +// SYM_REF3(fb_name_decl_c, fb_name_list, function_block_type_name, structure_initialization) +// NOTE: Although the fb_name_decl_c is in section ( B 1.4.3 - Declaration & Initialisation), it is also acting +// as a datatype declaration, so we need to handle it here! +void *search_base_type_c::visit(fb_name_decl_c *symbol) { + return symbol->function_block_type_name->accept(*this); +} + /*****************************/ /* B 1.5.2 - Function Blocks */ diff -r 4d71292f8732 -r 7a6b53d61ea3 absyntax_utils/search_base_type.hh --- a/absyntax_utils/search_base_type.hh Wed Jan 23 14:30:03 2013 +0000 +++ b/absyntax_utils/search_base_type.hh Wed Jan 23 14:53:14 2013 +0000 @@ -234,6 +234,13 @@ */ void *visit(string_type_declaration_c *symbol); + /******************************************/ + /* B 1.4.3 - Declaration & Initialisation */ + /******************************************/ + /* fb_name_list ':' function_block_type_name ASSIGN structure_initialization */ + /* structure_initialization -> may be NULL ! */ + void *visit(fb_name_decl_c *symbol); + /*****************************/ /* B 1.5.2 - Function Blocks */ /*****************************/ diff -r 4d71292f8732 -r 7a6b53d61ea3 stage3/fill_candidate_datatypes.cc --- a/stage3/fill_candidate_datatypes.cc Wed Jan 23 14:30:03 2013 +0000 +++ b/stage3/fill_candidate_datatypes.cc Wed Jan 23 14:53:14 2013 +0000 @@ -1255,6 +1255,13 @@ +/* fb_name_list ':' function_block_type_name ASSIGN structure_initialization */ +/* structure_initialization -> may be NULL ! */ +// SYM_REF3(fb_name_decl_c, fb_name_list, function_block_type_name, structure_initialization) +// NOTE: Although the fb_name_decl_c is in section ( B 1.4.3 - Declaration & Initialisation), it is also acting +// as a datatype declaration, so we need to handle it here! +void *fill_candidate_datatypes_c::visit(fb_name_decl_c *symbol) {return fill_spec_init(symbol, symbol->function_block_type_name, symbol->structure_initialization);} + /************************************/ diff -r 4d71292f8732 -r 7a6b53d61ea3 stage3/fill_candidate_datatypes.hh --- a/stage3/fill_candidate_datatypes.hh Wed Jan 23 14:30:03 2013 +0000 +++ b/stage3/fill_candidate_datatypes.hh Wed Jan 23 14:53:14 2013 +0000 @@ -218,7 +218,7 @@ void *visit(var1_list_c *symbol); void *visit(location_c *symbol); void *visit(located_var_decl_c *symbol); - + void *visit(fb_name_decl_c *symbol); /**************************************/ /* B 1.5 - Program organization units */ diff -r 4d71292f8732 -r 7a6b53d61ea3 stage3/narrow_candidate_datatypes.cc --- a/stage3/narrow_candidate_datatypes.cc Wed Jan 23 14:30:03 2013 +0000 +++ b/stage3/narrow_candidate_datatypes.cc Wed Jan 23 14:53:14 2013 +0000 @@ -718,6 +718,14 @@ } +/* fb_name_list ':' function_block_type_name ASSIGN structure_initialization */ +/* structure_initialization -> may be NULL ! */ +// SYM_REF3(fb_name_decl_c, fb_name_list, function_block_type_name, structure_initialization) +// NOTE: Although the fb_name_decl_c is in section ( B 1.4.3 - Declaration & Initialisation), it is also acting +// as a datatype declaration, so we need to handle it here! +void *narrow_candidate_datatypes_c::visit(fb_name_decl_c *symbol) {return narrow_spec_init(symbol, symbol->function_block_type_name, symbol->structure_initialization);} + + /************************************/ /* B 1.5 Program organization units */ /************************************/ diff -r 4d71292f8732 -r 7a6b53d61ea3 stage3/narrow_candidate_datatypes.hh --- a/stage3/narrow_candidate_datatypes.hh Wed Jan 23 14:30:03 2013 +0000 +++ b/stage3/narrow_candidate_datatypes.hh Wed Jan 23 14:53:14 2013 +0000 @@ -195,6 +195,7 @@ void *visit(var1_list_c *symbol); void *visit(location_c *symbol); void *visit(located_var_decl_c *symbol); + void *visit(fb_name_decl_c *symbol); /**************************************/ /* B 1.5 - Program organization units */