stage4/generate_cc/generate_cc_sfcdecl.cc
changeset 18 e6af5eb5f546
parent 17 38754701ac41
child 22 08bcc40be1fa
equal deleted inserted replaced
17:38754701ac41 18:e6af5eb5f546
    37 /***********************************************************************/
    37 /***********************************************************************/
    38 /***********************************************************************/
    38 /***********************************************************************/
    39 /***********************************************************************/
    39 /***********************************************************************/
    40 /***********************************************************************/
    40 /***********************************************************************/
    41 
    41 
    42 class generate_cc_sfc_stepdecl_c: public generate_cc_base_c {
    42 class generate_cc_sfc_steptable_c: public generate_cc_base_c {
    43   
    43   
    44   private:
    44   private:
    45     char step_number;
    45     char step_number;
    46     
    46     
    47   public:
    47   public:
    48     generate_cc_sfc_stepdecl_c(stage4out_c *s4o_ptr): generate_cc_base_c(s4o_ptr) {}
    48     generate_cc_sfc_steptable_c(stage4out_c *s4o_ptr): generate_cc_base_c(s4o_ptr) {}
    49     ~generate_cc_sfc_stepdecl_c(void) {}
    49     ~generate_cc_sfc_steptable_c(void) {}
    50     
    50     
    51     void reset_step_number(void) {step_number = 0;}
    51     void reset_step_number(void) {step_number = 0;}
    52     char get_step_number(void) {return step_number;}
       
    53     void increment_step_number(void) {step_number++;}
       
    54     void print_step_number(void) {
    52     void print_step_number(void) {
    55       char str[10];
    53       char str[10];
    56       sprintf(str, "%d", step_number);
    54       sprintf(str, "%d", step_number);
    57       s4o.print(str);
    55       s4o.print(str);
    58     }
    56     }
    59 
       
    60 /*********************************************/
    57 /*********************************************/
    61 /* B.1.6  Sequential function chart elements */
    58 /* B.1.6  Sequential function chart elements */
    62 /*********************************************/
    59 /*********************************************/
    63     
    60     
    64     void *visit(initial_step_c *symbol) {
    61     void *visit(initial_step_c *symbol) {
    65       s4o.print("#define ");
    62       if (step_number > 0) {
    66       symbol->step_name->accept(*this);
    63         s4o.print(",\n");
    67       s4o.print(" ");
    64       }
    68       print_step_number();
    65       s4o.print(s4o.indent_spaces + "{1, 0, 0}");
    69       s4o.print("\n");
    66       step_number++;
    70       increment_step_number();
       
    71       return NULL;
    67       return NULL;
    72     }
    68     }
    73     
    69     
    74     void *visit(step_c *symbol) {
    70     void *visit(step_c *symbol) {
    75       s4o.print("#define ");
    71       if (step_number > 0) {
    76       symbol->step_name->accept(*this);
    72         s4o.print(",\n");
    77       s4o.print(" ");
    73       }
    78       print_step_number();
    74       s4o.print(s4o.indent_spaces + "{0, 0, 0}");
    79       s4o.print("\n");
    75       step_number++;
    80       increment_step_number();
       
    81       return NULL;
    76       return NULL;
    82     }
    77     }
    83 
    78 
    84     void *visit(transition_c *symbol) {return NULL;}
    79     void *visit(transition_c *symbol) {return NULL;}
    85 
    80 
    86     void *visit(action_c *symbol) {return NULL;}
    81     void *visit(action_c *symbol) {return NULL;}
    87 
    82 
    88 }; /* generate_cc_sfc_stepdecl_c */
    83 }; /* generate_cc_sfc_steptable_c */
    89 
    84 
    90 
    85 
    91 
    86 
    92 
    87 
    93 /***********************************************************************/
    88 /***********************************************************************/
    94 /***********************************************************************/
    89 /***********************************************************************/
    95 /***********************************************************************/
    90 /***********************************************************************/
    96 /***********************************************************************/
    91 /***********************************************************************/
    97 
    92 
    98 class generate_cc_sfc_actiondecl_c: public generate_cc_base_c {
    93 class generate_cc_sfc_actiontable_c: public generate_cc_base_c {
    99   
    94   
   100   private:
    95   private:
   101     char action_number;
    96     char action_number;
   102     
    97     
   103   public:
    98   public:
   104     generate_cc_sfc_actiondecl_c(stage4out_c *s4o_ptr): generate_cc_base_c(s4o_ptr) {}
    99     generate_cc_sfc_actiontable_c(stage4out_c *s4o_ptr): generate_cc_base_c(s4o_ptr) {}
   105     ~generate_cc_sfc_actiondecl_c(void) {}
   100     ~generate_cc_sfc_actiontable_c(void) {}
   106     
   101     
   107     void reset_action_number(void) {action_number = 0;}
   102     void reset_action_number(void) {action_number = 0;}
   108     char get_action_number(void) {return action_number;}
       
   109     void increment_action_number(void) {action_number++;}
       
   110     void print_action_number(void) {
   103     void print_action_number(void) {
   111       char str[10];
   104       char str[10];
   112       sprintf(str, "%d", action_number);
   105       sprintf(str, "%d", action_number);
   113       s4o.print(str);
   106       s4o.print(str);
   114     }
   107     }
   115 
       
   116 /*********************************************/
   108 /*********************************************/
   117 /* B.1.6  Sequential function chart elements */
   109 /* B.1.6  Sequential function chart elements */
   118 /*********************************************/
   110 /*********************************************/
   119     
   111     
   120     void *visit(initial_step_c *symbol) {return NULL;}
   112     void *visit(initial_step_c *symbol) {return NULL;}
   122     void *visit(step_c *symbol) {return NULL;}
   114     void *visit(step_c *symbol) {return NULL;}
   123 
   115 
   124     void *visit(transition_c *symbol) {return NULL;}
   116     void *visit(transition_c *symbol) {return NULL;}
   125 
   117 
   126     void *visit(action_c *symbol) {
   118     void *visit(action_c *symbol) {
   127       s4o.print("#define ");
   119       if (action_number > 0) {
   128       symbol->action_name->accept(*this);
   120         s4o.print(",\n");
   129       s4o.print(" ");
   121       }
   130       print_action_number();
   122       s4o.print(s4o.indent_spaces + "{0, 0, 0, 0, 0, 0}");
   131       s4o.print("\n");
   123       action_number++;
   132       increment_action_number();
   124       return NULL;
   133       return NULL;
   125     }
   134     }
   126 
   135 
   127 }; /* generate_cc_sfc_actiontable_c */
   136 }; /* generate_cc_sfc_actiondecl_c */
   128 
   137 
   129 
   138 
   130 
   139 
   131 
   140 /***********************************************************************/
   132 /***********************************************************************/
   141 /***********************************************************************/
   133 /***********************************************************************/
   142 /***********************************************************************/
   134 /***********************************************************************/
   143 /***********************************************************************/
   135 /***********************************************************************/
   144 
   136 
   145 class generate_cc_sfcdecl_c: public iterator_visitor_c {
   137 class generate_cc_sfc_transitiontable_c: public generate_cc_base_c {
       
   138   
       
   139   private:
       
   140     char transition_number;
       
   141     
       
   142   public:
       
   143     generate_cc_sfc_transitiontable_c(stage4out_c *s4o_ptr): generate_cc_base_c(s4o_ptr) {}
       
   144     ~generate_cc_sfc_transitiontable_c(void) {}
       
   145     
       
   146     void reset_transition_number(void) {transition_number = 0;}
       
   147     void print_transition_number(void) {
       
   148       char str[10];
       
   149       sprintf(str, "%d", transition_number);
       
   150       s4o.print(str);
       
   151     }
       
   152 /*********************************************/
       
   153 /* B.1.6  Sequential function chart elements */
       
   154 /*********************************************/
       
   155     
       
   156     void *visit(initial_step_c *symbol) {return NULL;}
       
   157     
       
   158     void *visit(step_c *symbol) {return NULL;}
       
   159 
       
   160     void *visit(transition_c *symbol) {return NULL;}
       
   161 
       
   162     void *visit(action_c *symbol) {
       
   163       transition_number++;
       
   164       return NULL;
       
   165     }
       
   166 
       
   167 }; /* generate_cc_sfc_steptable_c */
       
   168 
       
   169 
       
   170 
       
   171 
       
   172 /***********************************************************************/
       
   173 /***********************************************************************/
       
   174 /***********************************************************************/
       
   175 /***********************************************************************/
       
   176 
       
   177 class generate_cc_sfctables_c: public iterator_visitor_c {
   146   
   178   
   147   protected:
   179   protected:
   148     stage4out_c &s4o;
   180     stage4out_c &s4o;
   149   
   181   
   150   private:
   182   private:
   151     generate_cc_sfc_stepdecl_c *generate_cc_sfc_stepdecl;
   183     generate_cc_sfc_steptable_c *generate_cc_sfc_steptable;
   152     generate_cc_sfc_actiondecl_c *generate_cc_sfc_actiondecl;
   184     generate_cc_sfc_actiontable_c *generate_cc_sfc_actiontable;
   153 
   185     generate_cc_sfc_transitiontable_c *generate_cc_sfc_transitiontable;
   154   public:
   186 
   155     generate_cc_sfcdecl_c(stage4out_c *s4o_ptr) : s4o(*s4o_ptr) {
   187   public:
   156       generate_cc_sfc_stepdecl = new generate_cc_sfc_stepdecl_c(s4o_ptr);
   188     generate_cc_sfctables_c(stage4out_c *s4o_ptr) : s4o(*s4o_ptr) {
   157       generate_cc_sfc_actiondecl = new generate_cc_sfc_actiondecl_c(s4o_ptr);
   189       generate_cc_sfc_steptable = new generate_cc_sfc_steptable_c(s4o_ptr);
   158     }
   190       generate_cc_sfc_actiontable = new generate_cc_sfc_actiontable_c(s4o_ptr);
   159 
   191       generate_cc_sfc_transitiontable = new generate_cc_sfc_transitiontable_c(s4o_ptr);
   160     virtual ~generate_cc_sfcdecl_c(void) {
   192     }
   161       delete generate_cc_sfc_stepdecl;
   193 
   162       delete generate_cc_sfc_actiondecl;
   194     virtual ~generate_cc_sfctables_c(void) {
   163     }
   195       delete generate_cc_sfc_steptable;
   164 
   196       delete generate_cc_sfc_actiontable;
   165   public:
   197       delete generate_cc_sfc_transitiontable;
   166 
   198     }
   167 /*********************************************/
   199 
   168 /* B.1.6  Sequential function chart elements */
   200   public:
   169 /*********************************************/
   201 
   170 
   202     /* generate steps and actions tables */
   171     /*| sequential_function_chart sfc_network*/
   203     void *visit(sequential_function_chart_c *symbol) {
   172     void *visit(sfc_network_c *symbol) {
   204       /* generate steps table */
   173       char i;
   205       generate_cc_sfc_steptable->reset_step_number();
   174       
   206       s4o.print(s4o.indent_spaces + "STEP step_list[] = {\n");
   175       /* generate step number definitions */
       
   176       s4o.print(s4o.indent_spaces + "// Steps declaration\n");
       
   177       generate_cc_sfc_stepdecl->reset_step_number();
       
   178       symbol->accept(*generate_cc_sfc_stepdecl);
       
   179       s4o.print("\n" + s4o.indent_spaces + "nb_steps = ");
       
   180       generate_cc_sfc_stepdecl->print_step_number();
       
   181       s4o.print(";\n" + s4o.indent_spaces + "STEP step_list[");
       
   182       generate_cc_sfc_stepdecl->print_step_number();
       
   183       s4o.print("] = {\n");
       
   184       s4o.indent_right();
   207       s4o.indent_right();
   185       for (i = 0; i < generate_cc_sfc_stepdecl->get_step_number(); i++) {
   208       symbol->accept(*generate_cc_sfc_steptable);
   186         if (i == 0) {
   209       s4o.indent_left();
   187           s4o.print(s4o.indent_spaces + "{1, 0, 0}");
   210       s4o.print("\n" + s4o.indent_spaces + "};\n" + s4o.indent_spaces + "nb_steps = ");
   188         }
   211       generate_cc_sfc_steptable->print_step_number();
   189         else {
   212       s4o.print(";\n");
   190           s4o.print(",\n" + s4o.indent_spaces + "{0, 0, 0}");
   213       
   191         }
   214       /* generate actions table */
   192       }
   215       generate_cc_sfc_actiontable->reset_action_number();
   193       s4o.indent_left();  
   216       s4o.print(s4o.indent_spaces + "ACTION action_list[] = {\n");
   194       s4o.print("\n" + s4o.indent_spaces + "};\n\n");
       
   195       
       
   196       /* generate action number definitions */
       
   197       s4o.print(s4o.indent_spaces + "// Actions declaration\n");
       
   198       generate_cc_sfc_actiondecl->reset_action_number();
       
   199       symbol->accept(*generate_cc_sfc_actiondecl);
       
   200       s4o.print("\n" + s4o.indent_spaces + "nb_actions = ");
       
   201       generate_cc_sfc_actiondecl->print_action_number();
       
   202       s4o.print(";\n" + s4o.indent_spaces + "STEP step_list[");
       
   203       generate_cc_sfc_actiondecl->print_action_number();
       
   204       s4o.print("] = {\n");
       
   205       s4o.indent_right();
   217       s4o.indent_right();
   206       for (i = 0; i < generate_cc_sfc_actiondecl->get_action_number(); i++) {
   218       symbol->accept(*generate_cc_sfc_actiontable);
   207         if (i == 0) {
   219       s4o.indent_left();
   208           s4o.print(s4o.indent_spaces + "{0, 0, 0, 0, 0, 0}");
   220       s4o.print("\n" + s4o.indent_spaces + "};\n" + s4o.indent_spaces + "nb_actions = ");
   209         }
   221       generate_cc_sfc_actiontable->print_action_number();
   210         else {
   222       s4o.print(";\n");
   211           s4o.print(",\n" + s4o.indent_spaces + "{0, 0, 0, 0, 0, 0}");
   223       
   212         }
   224       /* generate actions table */
   213       }
   225       generate_cc_sfc_transitiontable->reset_transition_number();
   214       s4o.indent_left();  
   226       s4o.print(s4o.indent_spaces + "char transition_list[");
   215       s4o.print("\n" + s4o.indent_spaces + "};\n\n");
   227       generate_cc_sfc_transitiontable->print_transition_number();
       
   228       s4o.print("];\n");
   216       
   229       
   217       return NULL;
   230       return NULL;
   218     }
   231     }
   219 
   232 
   220 /***********************************/
   233 /***********************************/
   227 /* B.3 - Language ST (Structured Text) */
   240 /* B.3 - Language ST (Structured Text) */
   228 /***************************************/
   241 /***************************************/
   229 /********************/
   242 /********************/
   230 /* B 3.2 Statements */
   243 /* B 3.2 Statements */
   231 /********************/
   244 /********************/
   232 void *visit(statement_list_c *symbol) {return NULL;}
   245     void *visit(statement_list_c *symbol) {return NULL;}
   233 
   246 
   234 /* Remainder implemented in generate_cc_sfcdecl_c... */
   247 /* Remainder implemented in generate_cc_sfcdecl_c... */
   235 };
   248 };
       
   249 
       
   250     
       
   251 
       
   252 
       
   253 /***********************************************************************/
       
   254 /***********************************************************************/
       
   255 /***********************************************************************/
       
   256 /***********************************************************************/
       
   257 
       
   258 class generate_cc_sfc_stepdecl_c: public generate_cc_base_c {
       
   259   
       
   260   private:
       
   261     char step_number;
       
   262     
       
   263   public:
       
   264     generate_cc_sfc_stepdecl_c(stage4out_c *s4o_ptr): generate_cc_base_c(s4o_ptr) {}
       
   265     ~generate_cc_sfc_stepdecl_c(void) {}
       
   266     
       
   267     void reset_step_number(void) {step_number = 0;}
       
   268     void print_step_number(void) {
       
   269       char str[10];
       
   270       sprintf(str, "%d", step_number);
       
   271       s4o.print(str);
       
   272     }
       
   273 
       
   274 /*********************************************/
       
   275 /* B.1.6  Sequential function chart elements */
       
   276 /*********************************************/
       
   277     
       
   278     void *visit(initial_step_c *symbol) {
       
   279       s4o.print("#define ");
       
   280       s4o.print(SFC_STEP_ACTION_PREFIX);
       
   281       symbol->step_name->accept(*this);
       
   282       s4o.print(" ");
       
   283       print_step_number();
       
   284       s4o.print("\n");
       
   285       step_number++;
       
   286       return NULL;
       
   287     }
       
   288     
       
   289     void *visit(step_c *symbol) {
       
   290       s4o.print("#define ");
       
   291       s4o.print(SFC_STEP_ACTION_PREFIX);
       
   292       symbol->step_name->accept(*this);
       
   293       s4o.print(" ");
       
   294       print_step_number();
       
   295       s4o.print("\n");
       
   296       step_number++;
       
   297       return NULL;
       
   298     }
       
   299 
       
   300     void *visit(transition_c *symbol) {return NULL;}
       
   301 
       
   302     void *visit(action_c *symbol) {return NULL;}
       
   303 
       
   304 }; /* generate_cc_sfc_stepdecl_c */
       
   305 
       
   306 
       
   307 
       
   308 
       
   309 /***********************************************************************/
       
   310 /***********************************************************************/
       
   311 /***********************************************************************/
       
   312 /***********************************************************************/
       
   313 
       
   314 class generate_cc_sfc_actiondecl_c: public generate_cc_base_c {
       
   315   
       
   316   private:
       
   317     char action_number;
       
   318     
       
   319   public:
       
   320     generate_cc_sfc_actiondecl_c(stage4out_c *s4o_ptr): generate_cc_base_c(s4o_ptr) {}
       
   321     ~generate_cc_sfc_actiondecl_c(void) {}
       
   322     
       
   323     void reset_action_number(void) {action_number = 0;}
       
   324     void print_action_number(void) {
       
   325       char str[10];
       
   326       sprintf(str, "%d", action_number);
       
   327       s4o.print(str);
       
   328     }
       
   329 
       
   330 /*********************************************/
       
   331 /* B.1.6  Sequential function chart elements */
       
   332 /*********************************************/
       
   333     
       
   334     void *visit(initial_step_c *symbol) {return NULL;}
       
   335     
       
   336     void *visit(step_c *symbol) {return NULL;}
       
   337 
       
   338     void *visit(transition_c *symbol) {return NULL;}
       
   339 
       
   340     void *visit(action_c *symbol) {
       
   341       s4o.print("#define ");
       
   342       s4o.print(SFC_STEP_ACTION_PREFIX);
       
   343       symbol->action_name->accept(*this);
       
   344       s4o.print(" ");
       
   345       print_action_number();
       
   346       s4o.print("\n");
       
   347       action_number++;
       
   348       return NULL;
       
   349     }
       
   350 
       
   351 }; /* generate_cc_sfc_actiondecl_c */
       
   352 
       
   353 
       
   354 
       
   355 
       
   356 /***********************************************************************/
       
   357 /***********************************************************************/
       
   358 /***********************************************************************/
       
   359 /***********************************************************************/
       
   360 
       
   361 class generate_cc_sfcdecl_c: public iterator_visitor_c {
       
   362   
       
   363   protected:
       
   364     stage4out_c &s4o;
       
   365   
       
   366   private:
       
   367     generate_cc_sfc_stepdecl_c *generate_cc_sfc_stepdecl;
       
   368     generate_cc_sfc_actiondecl_c *generate_cc_sfc_actiondecl;
       
   369 
       
   370   public:
       
   371     generate_cc_sfcdecl_c(stage4out_c *s4o_ptr) : s4o(*s4o_ptr) {
       
   372       generate_cc_sfc_stepdecl = new generate_cc_sfc_stepdecl_c(s4o_ptr);
       
   373       generate_cc_sfc_actiondecl = new generate_cc_sfc_actiondecl_c(s4o_ptr);
       
   374     }
       
   375 
       
   376     virtual ~generate_cc_sfcdecl_c(void) {
       
   377       delete generate_cc_sfc_stepdecl;
       
   378       delete generate_cc_sfc_actiondecl;
       
   379     }
       
   380 
       
   381   public:
       
   382 
       
   383     /* generate steps and actions tables */
       
   384     void *visit(sequential_function_chart_c *symbol) {
       
   385       /* generate steps definitions */
       
   386       generate_cc_sfc_stepdecl->reset_step_number();
       
   387       s4o.print("// Steps definitions\n");
       
   388       symbol->accept(*generate_cc_sfc_stepdecl);
       
   389       s4o.print("\n");
       
   390       
       
   391       /* generate actions definitions */
       
   392       generate_cc_sfc_actiondecl->reset_action_number();
       
   393       s4o.print("// Actions definitions\n");
       
   394       symbol->accept(*generate_cc_sfc_actiondecl);
       
   395       s4o.print("\n");
       
   396       
       
   397       return NULL;
       
   398     }
       
   399 
       
   400 /***********************************/
       
   401 /* B 2.1 Instructions and Operands */
       
   402 /***********************************/
       
   403 /*| instruction_list il_instruction */
       
   404     void *visit(instruction_list_c *symbol) {return NULL;}
       
   405 
       
   406 /***************************************/
       
   407 /* B.3 - Language ST (Structured Text) */
       
   408 /***************************************/
       
   409 /********************/
       
   410 /* B 3.2 Statements */
       
   411 /********************/
       
   412     void *visit(statement_list_c *symbol) {return NULL;}
       
   413 
       
   414 /* Remainder implemented in generate_cc_sfcdecl_c... */
       
   415 };
       
   416 
       
   417 
       
   418 
       
   419 
       
   420 /***********************************************************************/
       
   421 /***********************************************************************/
       
   422 /***********************************************************************/
       
   423 /***********************************************************************/
       
   424 
       
   425 class generate_cc_sfc_stepundecl_c: public generate_cc_base_c {
       
   426   
       
   427   public:
       
   428     generate_cc_sfc_stepundecl_c(stage4out_c *s4o_ptr): generate_cc_base_c(s4o_ptr) {}
       
   429     ~generate_cc_sfc_stepundecl_c(void) {}
       
   430 
       
   431 /*********************************************/
       
   432 /* B.1.6  Sequential function chart elements */
       
   433 /*********************************************/
       
   434     
       
   435     void *visit(initial_step_c *symbol) {
       
   436       s4o.print("#undef ");
       
   437       s4o.print(SFC_STEP_ACTION_PREFIX);
       
   438       symbol->step_name->accept(*this);
       
   439       s4o.print("\n");
       
   440       return NULL;
       
   441     }
       
   442     
       
   443     void *visit(step_c *symbol) {
       
   444       s4o.print("#undef ");
       
   445       s4o.print(SFC_STEP_ACTION_PREFIX);
       
   446       symbol->step_name->accept(*this);
       
   447       s4o.print("\n");
       
   448       return NULL;
       
   449     }
       
   450 
       
   451     void *visit(transition_c *symbol) {return NULL;}
       
   452 
       
   453     void *visit(action_c *symbol) {return NULL;}
       
   454 
       
   455 }; /* generate_cc_sfc_stepdecl_c */
       
   456 
       
   457 
       
   458 
       
   459 
       
   460 /***********************************************************************/
       
   461 /***********************************************************************/
       
   462 /***********************************************************************/
       
   463 /***********************************************************************/
       
   464 
       
   465 class generate_cc_sfc_actionundecl_c: public generate_cc_base_c {
       
   466   
       
   467   public:
       
   468     generate_cc_sfc_actionundecl_c(stage4out_c *s4o_ptr): generate_cc_base_c(s4o_ptr) {}
       
   469     ~generate_cc_sfc_actionundecl_c(void) {}
       
   470 
       
   471 /*********************************************/
       
   472 /* B.1.6  Sequential function chart elements */
       
   473 /*********************************************/
       
   474     
       
   475     void *visit(initial_step_c *symbol) {return NULL;}
       
   476     
       
   477     void *visit(step_c *symbol) {return NULL;}
       
   478 
       
   479     void *visit(transition_c *symbol) {return NULL;}
       
   480 
       
   481     void *visit(action_c *symbol) {
       
   482       s4o.print("#undef ");
       
   483       s4o.print(SFC_STEP_ACTION_PREFIX);
       
   484       symbol->action_name->accept(*this);
       
   485       s4o.print("\n");
       
   486       return NULL;
       
   487     }
       
   488 
       
   489 }; /* generate_cc_sfc_stepdecl_c */
       
   490 
       
   491 
       
   492 
       
   493 
       
   494 /***********************************************************************/
       
   495 /***********************************************************************/
       
   496 /***********************************************************************/
       
   497 /***********************************************************************/
       
   498 
       
   499 class generate_cc_sfcundecl_c: public iterator_visitor_c {
       
   500   
       
   501   protected:
       
   502     stage4out_c &s4o;
       
   503   
       
   504   private:
       
   505     generate_cc_sfc_stepundecl_c *generate_cc_sfc_stepundecl;
       
   506     generate_cc_sfc_actionundecl_c *generate_cc_sfc_actionundecl;
       
   507 
       
   508   public:
       
   509     generate_cc_sfcundecl_c(stage4out_c *s4o_ptr) : s4o(*s4o_ptr) {
       
   510       generate_cc_sfc_stepundecl = new generate_cc_sfc_stepundecl_c(s4o_ptr);
       
   511       generate_cc_sfc_actionundecl = new generate_cc_sfc_actionundecl_c(s4o_ptr);
       
   512     }
       
   513 
       
   514     virtual ~generate_cc_sfcundecl_c(void) {
       
   515       delete generate_cc_sfc_stepundecl;
       
   516       delete generate_cc_sfc_actionundecl;
       
   517     }
       
   518 
       
   519   public:
       
   520 
       
   521 /*********************************************/
       
   522 /* B.1.6  Sequential function chart elements */
       
   523 /*********************************************/
       
   524 
       
   525     /* generate steps and actions tables */
       
   526     void *visit(sequential_function_chart_c *symbol) {
       
   527       /* generate steps undefinitions */
       
   528       s4o.print("// Steps undefinitions\n");
       
   529       symbol->accept(*generate_cc_sfc_stepundecl);
       
   530       s4o.print("\n");
       
   531       
       
   532       /* generate actions table */
       
   533       s4o.print("// Actions undefinitions\n");
       
   534       symbol->accept(*generate_cc_sfc_actionundecl);
       
   535       s4o.print("\n");
       
   536       
       
   537       return NULL;
       
   538     }
       
   539 
       
   540 /***********************************/
       
   541 /* B 2.1 Instructions and Operands */
       
   542 /***********************************/
       
   543 /*| instruction_list il_instruction */
       
   544     void *visit(instruction_list_c *symbol) {return NULL;}
       
   545 
       
   546 /***************************************/
       
   547 /* B.3 - Language ST (Structured Text) */
       
   548 /***************************************/
       
   549 /********************/
       
   550 /* B 3.2 Statements */
       
   551 /********************/
       
   552     void *visit(statement_list_c *symbol) {return NULL;}
       
   553 
       
   554 /* Remainder implemented in generate_cc_sfcdecl_c... */
       
   555 };