/*
 File: eval_phrasessym.cpp
 Date and Time: Fri Jan 30 18:55:11 2015 
*/
#include "eval_phrases.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_eval_phrases;// grammar's ns
// first set terminals
// monolithic grammar --- no thread
void 
Ceval_phrases::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_Reval_phrases_:{
       Reval_phrases* sym;
     if(re->rule_ == 0){
       sym = new Reval_phrases(parser__);
       re->rule_ = sym;
     }else{
       sym = (Reval_phrases*)re->rule_;
     }
    // no rule's constructor directive
     (*Recycled_rule)->rule_ = sym;
     sym->rule_info__.rhs_no_of_parms__ = 9;
    

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

     sym->sr2();
     return;}
    default: return;
   }
}
