diff -r 2064a22cc1f2 -r 7c01878bd525 stage4/generate_c/generate_c_sfcdecl.cc --- a/stage4/generate_c/generate_c_sfcdecl.cc Thu Jan 08 19:04:03 2015 +0000 +++ b/stage4/generate_c/generate_c_sfcdecl.cc Sat Jan 10 23:17:08 2015 +0000 @@ -192,14 +192,16 @@ break; case actiondef_sd: s4o.print("// Actions definitions\n"); - for(int i = 0; i < symbol->n; i++) - symbol->elements[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); + 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); // 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++) {