# HG changeset patch # User Mario de Sousa # Date 1361567399 0 # Node ID 970c582885bf43eb4c187876f4448ce2d5ef5991 # Parent d9c48ad646f15f44a1ac0149e26e6efa61bdee76 Allow variables declared inside resources to be referenced by res_name.var_name diff -r d9c48ad646f1 -r 970c582885bf stage1_2/iec_bison.yy --- a/stage1_2/iec_bison.yy Wed Feb 13 18:56:25 2013 +0000 +++ b/stage1_2/iec_bison.yy Fri Feb 22 21:09:59 2013 +0000 @@ -5692,11 +5692,11 @@ resource_declaration: - RESOURCE {variable_name_symtable.push();direct_variable_symtable.push();} resource_name ON resource_type_name + RESOURCE {variable_name_symtable.push();direct_variable_symtable.push();} resource_name {variable_name_symtable.insert($3, prev_declared_resource_name_token);} ON resource_type_name optional_global_var_declarations single_resource_declaration END_RESOURCE - {$$ = new resource_declaration_c($3, $5, $6, $7, locloc(@$)); + {$$ = new resource_declaration_c($3, $6, $7, $8, locloc(@$)); variable_name_symtable.pop(); direct_variable_symtable.pop(); variable_name_symtable.insert($3, prev_declared_resource_name_token); @@ -8246,7 +8246,6 @@ symbol_c **tree_root_ref, bool full_token_loc_ /* error messages specify full token location */ ) { - char *libfilename = NULL; if (includedir != NULL) { @@ -8296,7 +8295,6 @@ library_element_symtable.end_value()) library_element_symtable.insert(standard_function_block_names[i], standard_function_block_name_token); - /* now parse the input file... */ #if YYDEBUG yydebug = 1;