diff -r e8563dcaefca -r 56ebe2a31b5b stage4/generate_c/generate_c_sfcdecl.cc --- a/stage4/generate_c/generate_c_sfcdecl.cc Mon Apr 03 22:06:40 2017 +0100 +++ b/stage4/generate_c/generate_c_sfcdecl.cc Mon Apr 03 22:18:22 2017 +0100 @@ -85,7 +85,7 @@ switch (wanted_sfcdeclaration) { case sfcdecl_sd: for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); /* steps table declaration */ s4o.print(s4o.indent_spaces + "STEP __step_list["); @@ -120,7 +120,7 @@ /* steps table count */ wanted_sfcdeclaration = stepcount_sd; for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); s4o.print(s4o.indent_spaces); print_variable_prefix(); s4o.print("__nb_steps = "); @@ -141,12 +141,12 @@ s4o.indent_left(); s4o.print(s4o.indent_spaces + "}\n"); for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); /* actions table count */ wanted_sfcdeclaration = actioncount_sd; for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); s4o.print(s4o.indent_spaces); print_variable_prefix(); s4o.print("__nb_actions = "); @@ -170,7 +170,7 @@ /* transitions table count */ wanted_sfcdeclaration = transitioncount_sd; for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); s4o.print(s4o.indent_spaces); print_variable_prefix(); s4o.print("__nb_transitions = "); @@ -187,7 +187,7 @@ case stepdef_sd: s4o.print("// Steps definitions\n"); for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); s4o.print("\n"); break; case actiondef_sd: @@ -196,12 +196,12 @@ // first fill up the this->variable_list variable! wanted_sfcdeclaration = actioncount_sd; for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); action_number = 0; // reset the counter! wanted_sfcdeclaration = actiondef_sd; // Now do the defines for actions! for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); // Now do the defines for actions that reference a variable instead of an action block! std::list::iterator pt; for(pt = variable_list.begin(); pt != variable_list.end(); pt++) { @@ -219,18 +219,18 @@ case stepundef_sd: s4o.print("// Steps undefinitions\n"); for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); s4o.print("\n"); break; case actionundef_sd: s4o.print("// Actions undefinitions\n"); for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); { // first fill up the this->variable_list variable! wanted_sfcdeclaration = actioncount_sd; for(int i = 0; i < symbol->n; i++) - symbol->elements[i]->accept(*this); + symbol->get_element(i)->accept(*this); wanted_sfcdeclaration = actionundef_sd; std::list::iterator pt; for(pt = variable_list.begin(); pt != variable_list.end(); pt++) {