# HG changeset patch # User mjsousa # Date 1420931828 0 # Node ID 7c01878bd525a91a13aae1b1e6c776d89fe56491 # Parent 2064a22cc1f2df666495981cb0d205a057fb5ffa Correct the number given to actions in the #define's 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++) {