/*
 File: lr1_tstsym.cpp
 Date and Time: Mon Oct 13 18:18:15 2014 
*/

      // test out Clr1\_tst\_fsm fsm user-imp-sym emit code
    
#include "lr1_tst.h"
using namespace NS_yacco2_T_enum;// enumerate
using namespace NS_yacco2_err_symbols;// error symbols
using namespace NS_yacco2_k_symbols;// lrk 
using namespace NS_yacco2_terminals;// terminals
using namespace NS_yacco2_characters;// rc 
using namespace yacco2;// yacco2 library
using namespace NS_lr1_tst;// grammar's ns
// first set terminals
yacco2::THR _YACCO2_CALL_TYPE
NS_lr1_tst::TH_lr1_tst(yacco2::Parser* Caller_pp){
  yacco2::Thread_entry& pp_thread_entry = ITH_lr1_tst;
  NS_lr1_tst::Clr1_tst_fsm Clr1_tst_fsm_;// parallel-parser's parse table
#define ssPARSE_TABLE Clr1_tst_fsm_
#include "wpp_core.h"
}
THR_result _YACCO2_CALL_TYPE
NS_lr1_tst::PROC_TH_lr1_tst(yacco2::Parser* Caller_pp){
  char called_proc_name[] = "PROC_TH_lr1_tst";
  static bool one_time(false);
  static NS_lr1_tst::Clr1_tst_fsm* NS_lr1_tst_Clr1_tst_fsm_(0);// parallel-parser's fsm table
  static Parser* NS_lr1_tst_Clr1_tst_fsm_parser(0);
  Parser* proc_parser(0);
  if(one_time == false){
    one_time = true;
    NS_lr1_tst_Clr1_tst_fsm_ = new NS_lr1_tst::Clr1_tst_fsm();// parallel-parser's fsm table
    NS_lr1_tst_Clr1_tst_fsm_parser = new Parser(*NS_lr1_tst_Clr1_tst_fsm_,Caller_pp);
  }
 proc_parser = NS_lr1_tst_Clr1_tst_fsm_parser;
#include "wproc_pp_core.h"
}
void 
Clr1_tst_fsm::reduce_rhs_of_rule
    (yacco2::UINT Sub_rule_no,yacco2::Rule_s_reuse_entry** Recycled_rule){
   int reducing_rule = rhs_to_rules_mapping_[Sub_rule_no];
   Per_rule_s_reuse_table* rule_reuse_tbl_ptr = 
        fsm_rules_reuse_table.per_rule_s_table_[reducing_rule];
   Rule_s_reuse_entry* re(0);
   find_a_recycled_rule(rule_reuse_tbl_ptr,&re);
   (*Recycled_rule) = re;
   fnd_re: switch (Sub_rule_no){
    case rhs1_Rlr1_tst_:{
       Rlr1_tst* sym;
     if(re->rule_ == 0){
       sym = new Rlr1_tst(parser__);
       re->rule_ = sym;
     }else{
       sym = (Rlr1_tst*)re->rule_;
     }
    sym->ctor();

     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 3;
    

     sym->sr1();
     sym->op();
     return;}
    case rhs2_Rlr1_tst_:{
       Rlr1_tst* sym;
     if(re->rule_ == 0){
       sym = new Rlr1_tst(parser__);
       re->rule_ = sym;
     }else{
       sym = (Rlr1_tst*)re->rule_;
     }
    sym->ctor();

     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 3;
    

     sym->op();
     return;}
    case rhs3_Rlr1_tst_:{
       Rlr1_tst* sym;
     if(re->rule_ == 0){
       sym = new Rlr1_tst(parser__);
       re->rule_ = sym;
     }else{
       sym = (Rlr1_tst*)re->rule_;
     }
    sym->ctor();

     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 3;
    

     sym->op();
     return;}
    case rhs4_Rlr1_tst_:{
       Rlr1_tst* sym;
     if(re->rule_ == 0){
       sym = new Rlr1_tst(parser__);
       re->rule_ = sym;
     }else{
       sym = (Rlr1_tst*)re->rule_;
     }
    sym->ctor();

     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 3;
    

     sym->op();
     return;}
    case rhs1_RAabBab_:{
       RAabBab* sym;
     if(re->rule_ == 0){
       sym = new RAabBab(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAabBab*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs2_RAabBab_:{
       RAabBab* sym;
     if(re->rule_ == 0){
       sym = new RAabBab(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAabBab*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs1_RAbaBab_:{
       RAbaBab* sym;
     if(re->rule_ == 0){
       sym = new RAbaBab(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAbaBab*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs2_RAbaBab_:{
       RAbaBab* sym;
     if(re->rule_ == 0){
       sym = new RAbaBab(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAbaBab*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs1_RAabBba_:{
       RAabBba* sym;
     if(re->rule_ == 0){
       sym = new RAabBba(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAabBba*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs2_RAabBba_:{
       RAabBba* sym;
     if(re->rule_ == 0){
       sym = new RAabBba(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAabBba*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs1_RAbaBba_:{
       RAbaBba* sym;
     if(re->rule_ == 0){
       sym = new RAbaBba(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAbaBba*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs2_RAbaBba_:{
       RAbaBba* sym;
     if(re->rule_ == 0){
       sym = new RAbaBba(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAbaBba*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs1_RAab_:{
       RAab* sym;
     if(re->rule_ == 0){
       sym = new RAab(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAab*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs2_RAab_:{
       RAab* sym;
     if(re->rule_ == 0){
       sym = new RAab(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAab*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs1_RAba_:{
       RAba* sym;
     if(re->rule_ == 0){
       sym = new RAba(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAba*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs2_RAba_:{
       RAba* sym;
     if(re->rule_ == 0){
       sym = new RAba(parser__);
       re->rule_ = sym;
     }else{
       sym = (RAba*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs1_RBab_:{
       RBab* sym;
     if(re->rule_ == 0){
       sym = new RBab(parser__);
       re->rule_ = sym;
     }else{
       sym = (RBab*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs2_RBab_:{
       RBab* sym;
     if(re->rule_ == 0){
       sym = new RBab(parser__);
       re->rule_ = sym;
     }else{
       sym = (RBab*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs1_RBba_:{
       RBba* sym;
     if(re->rule_ == 0){
       sym = new RBba(parser__);
       re->rule_ = sym;
     }else{
       sym = (RBba*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs2_RBba_:{
       RBba* sym;
     if(re->rule_ == 0){
       sym = new RBba(parser__);
       re->rule_ = sym;
     }else{
       sym = (RBba*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 2;
    

     return;}
    case rhs1_RA1_:{
       RA1* sym;
     if(re->rule_ == 0){
       sym = new RA1(parser__);
       re->rule_ = sym;
     }else{
       sym = (RA1*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 1;
    

     return;}
    case rhs1_RA2_:{
       RA2* sym;
     if(re->rule_ == 0){
       sym = new RA2(parser__);
       re->rule_ = sym;
     }else{
       sym = (RA2*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 1;
    

     return;}
    case rhs1_RB1_:{
       RB1* sym;
     if(re->rule_ == 0){
       sym = new RB1(parser__);
       re->rule_ = sym;
     }else{
       sym = (RB1*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 1;
    

     return;}
    case rhs1_RB2_:{
       RB2* sym;
     if(re->rule_ == 0){
       sym = new RB2(parser__);
       re->rule_ = sym;
     }else{
       sym = (RB2*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 1;
    

     return;}
    default: return;
   }
}
