/*
 File: parallel_parser_ph_th.cpp
 Date and Time: Fri Jan 30 18:55:19 2015 
*/
#include "parallel_parser_ph_th.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_parallel_parser_ph_th;// grammar's ns
// first set terminals
fsm_rules_reuse_table_type::fsm_rules_reuse_table_type(){
 no_rules_entries_ = 12;
 per_rule_s_table_[0] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[1] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[2] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[3] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[4] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[5] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[6] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[7] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[8] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[9] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[10] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[11] =  new Per_rule_s_reuse_table();
}
  Cparallel_parser_ph_th::
  Cparallel_parser_ph_th()
    :yacco2::CAbs_fsm
      ("parallel_parser_ph_th.lex"
      ,"1.0"
      ,"11 mar 2004"
      ,false
      ,"Parse grammar's parallel-parser construct."
      ,"Fri Jan 30 18:55:19 2015 "
      ,S1_Cparallel_parser_ph_th){
    
    parallel_parser_phrase_ = 0;
  
  }
 
Cparallel_parser_ph_th::~Cparallel_parser_ph_th(){

  for(int x = 0;x < 12;++x){
   ///delete fsm_rules_reuse_table.per_rule_s_table_[x];
  }
} 

  bool Cparallel_parser_ph_th::failed(){
      return false;
  }
  void Cparallel_parser_ph_th::op(){
    if(parallel_parser_phrase_ != 0){
      delete parallel_parser_phrase_;
      parallel_parser_phrase_ = 0;
    }
    parallel_parser_phrase_ = new T_parallel_parser_phrase;
    parallel_parser_phrase_->set_rc(*parser__->start_token__,__FILE__,__LINE__);
    AST* t = new AST(*parallel_parser_phrase_);
    parallel_parser_phrase_->phrase_tree(t);
  
}
int Cparallel_parser_ph_th::rhs_to_rules_mapping_[25] = {
 -1
 ,0 // subrule 1 for rule 1
 ,1 // subrule 2 for rule 2
 ,1 // subrule 3 for rule 2
 ,2 // subrule 4 for rule 3
 ,2 // subrule 5 for rule 3
 ,3 // subrule 6 for rule 4
 ,3 // subrule 7 for rule 4
 ,4 // subrule 8 for rule 5
 ,5 // subrule 9 for rule 6
 ,6 // subrule 10 for rule 7
 ,6 // subrule 11 for rule 7
 ,6 // subrule 12 for rule 7
 ,7 // subrule 13 for rule 8
 ,7 // subrule 14 for rule 8
 ,7 // subrule 15 for rule 8
 ,8 // subrule 16 for rule 9
 ,8 // subrule 17 for rule 9
 ,9 // subrule 18 for rule 10
 ,10 // subrule 19 for rule 11
 ,10 // subrule 20 for rule 11
 ,10 // subrule 21 for rule 11
 ,11 // subrule 22 for rule 12
 ,11 // subrule 23 for rule 12
 ,11 // subrule 24 for rule 12
}; 
Rparallel_parser_phrase::Rparallel_parser_phrase(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rparallel_parser_phrase",0,Cparallel_parser_ph_th::R_Rparallel_parser_phrase_,P,false,false){
}

void Rparallel_parser_phrase::sr1(){
  
      Cparallel_parser_ph_th* fsm = 
	(Cparallel_parser_ph_th*)rule_info__.parser__->fsm_tbl__;
      RSVP(fsm->parallel_parser_phrase_);
      fsm->parallel_parser_phrase_ = 0;
    
}

Rlint::Rlint(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rlint",0,Cparallel_parser_ph_th::R_Rlint_,P,false,false){
}

Ropen_par::Ropen_par(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Ropen_par",0,Cparallel_parser_ph_th::R_Ropen_par_,P,false,false){
}

void Ropen_par::sr1(){
  struct SF{
   CAbs_lr1_sym* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(1);
  
        CAbs_lr1_sym* sym = new Err_no_open_parenthesis;
        sym->set_rc(*sf->p1__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

Rclose_par::Rclose_par(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rclose_par",0,Cparallel_parser_ph_th::R_Rclose_par_,P,false,false){
}

void Rclose_par::sr1(){
  struct SF{
   CAbs_lr1_sym* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(1);
  
        CAbs_lr1_sym* sym = new Err_no_close_parenthesis;
        sym->set_rc(*sf->p1__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

Rparameters::Rparameters(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rparameters",0,Cparallel_parser_ph_th::R_Rparameters_,P,false,false){
}

Rpp_thread_fnct_phrase::Rpp_thread_fnct_phrase(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rpp_thread_fnct_phrase",0,Cparallel_parser_ph_th::R_Rpp_thread_fnct_phrase_,P,false,false){
}

void Rpp_thread_fnct_phrase::sr1(){
  struct SF{
   Rpp_thread_fnct* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   Rlint* p2__;
   State* s2__;
   bool abort2__;
   Rule_s_reuse_entry* rule_s_reuse_entry2__;
   Rpp_thread_fnct_id* p3__;
   State* s3__;
   bool abort3__;
   Rule_s_reuse_entry* rule_s_reuse_entry3__;
   Rlint* p4__;
   State* s4__;
   bool abort4__;
   Rule_s_reuse_entry* rule_s_reuse_entry4__;
   R3asterics* p5__;
   State* s5__;
   bool abort5__;
   Rule_s_reuse_entry* rule_s_reuse_entry5__;
   Rlint* p6__;
   State* s6__;
   bool abort6__;
   Rule_s_reuse_entry* rule_s_reuse_entry6__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(6);
  
      T_parallel_thread_function* pp_fnct = sf->p1__->pp_fnct_;
      pp_fnct->identifier(sf->p3__->id_);
      Cparallel_parser_ph_th* fsm = 
		(Cparallel_parser_ph_th*)rule_info__.parser__->fsm_tbl__;
      fsm->parallel_parser_phrase_->pp_funct(pp_fnct);
    
}

Rpp_thread_fnct::Rpp_thread_fnct(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rpp_thread_fnct",0,Cparallel_parser_ph_th::R_Rpp_thread_fnct_,P,false,false){
}

void Rpp_thread_fnct::sr1(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_parallel_thread_function* p2__;
   State* s2__;
   bool abort2__;
   Rule_s_reuse_entry* rule_s_reuse_entry2__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(2);
  
      pp_fnct_ = sf->p2__;
    
}

void Rpp_thread_fnct::sr2(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   CAbs_lr1_sym* p2__;
   State* s2__;
   bool abort2__;
   Rule_s_reuse_entry* rule_s_reuse_entry2__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(2);
  
        pp_fnct_ = 0;
        sf->p2__->set_auto_delete(true);
        CAbs_lr1_sym* sym = new Err_no_pp_thread_function_present;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
    
}

void Rpp_thread_fnct::sr3(){
  
        pp_fnct_ = 0;
        CAbs_lr1_sym* sym = new Err_no_pp_thread_function_present;
        sym->set_rc(*rule_info__.parser__->current_token(),__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

Rpp_thread_fnct_id::Rpp_thread_fnct_id(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rpp_thread_fnct_id",0,Cparallel_parser_ph_th::R_Rpp_thread_fnct_id_,P,false,false){
}

void Rpp_thread_fnct_id::sr1(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_identifier* p2__;
   State* s2__;
   bool abort2__;
   Rule_s_reuse_entry* rule_s_reuse_entry2__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(2);
  
        id_ = sf->p2__;
      
}

void Rpp_thread_fnct_id::sr2(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   CAbs_lr1_sym* p2__;
   State* s2__;
   bool abort2__;
   Rule_s_reuse_entry* rule_s_reuse_entry2__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(2);
  
      sf->p2__->set_auto_delete(true);
        id_ = 0;
        CAbs_lr1_sym* sym = new Err_no_pp_fnct_id_present;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
    
}

void Rpp_thread_fnct_id::sr3(){
  
        id_ = 0;
        CAbs_lr1_sym* sym = new Err_no_pp_fnct_id_present;
        sym->set_rc(*rule_info__.parser__->current_token(),__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

R3asterics::R3asterics(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("R3asterics",0,Cparallel_parser_ph_th::R_R3asterics_,P,false,false){
}

void R3asterics::sr2(){
  struct SF{
   CAbs_lr1_sym* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(1);
  
        CAbs_lr1_sym* sym = new Err_no_syntax_code_end_present;
        sym->set_rc(*sf->p1__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

Rpp_la_bndary_phrase::Rpp_la_bndary_phrase(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rpp_la_bndary_phrase",0,Cparallel_parser_ph_th::R_Rpp_la_bndary_phrase_,P,false,false){
}

void Rpp_la_bndary_phrase::sr1(){
  struct SF{
   Rpp_la_bndary* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   Rlint* p2__;
   State* s2__;
   bool abort2__;
   Rule_s_reuse_entry* rule_s_reuse_entry2__;
   Rpp_la_bndary_stc* p3__;
   State* s3__;
   bool abort3__;
   Rule_s_reuse_entry* rule_s_reuse_entry3__;
   Rlint* p4__;
   State* s4__;
   bool abort4__;
   Rule_s_reuse_entry* rule_s_reuse_entry4__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(4);
  
      pp_la_bndary_ = sf->p1__->pp_la_bndary_;
      pp_la_bndary_->la_supplier(sf->p3__->la_exp_->la_tok_can());
      sf->p3__->la_exp_->zero_la_tok_can();
      Cparallel_parser_ph_th* fsm = 
		(Cparallel_parser_ph_th*)rule_info__.parser__->fsm_tbl__;
      fsm->parallel_parser_phrase_->la_bndry(pp_la_bndary_);
    
}

Rpp_la_bndary::Rpp_la_bndary(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rpp_la_bndary",0,Cparallel_parser_ph_th::R_Rpp_la_bndary_,P,false,false){
}

void Rpp_la_bndary::sr1(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_parallel_la_boundary* p2__;
   State* s2__;
   bool abort2__;
   Rule_s_reuse_entry* rule_s_reuse_entry2__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(2);
  
      pp_la_bndary_ = sf->p2__;
    
}

void Rpp_la_bndary::sr2(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   CAbs_lr1_sym* p2__;
   State* s2__;
   bool abort2__;
   Rule_s_reuse_entry* rule_s_reuse_entry2__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(2);
  
		pp_la_bndary_ = 0;
        sf->p2__->set_auto_delete(true);
        CAbs_lr1_sym* sym = new Err_no_pp_bndry_present;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
    
}

void Rpp_la_bndary::sr3(){
  struct SF{
   CAbs_lr1_sym* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(1);
  
		pp_la_bndary_ = 0;
        CAbs_lr1_sym* sym = new Err_no_pp_bndry_present;
        sym->set_rc(*sf->p1__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

Rpp_la_bndary_stc::Rpp_la_bndary_stc(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rpp_la_bndary_stc",0,Cparallel_parser_ph_th::R_Rpp_la_bndary_stc_,P,false,false){
}

void Rpp_la_bndary_stc::sr1(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_la_expr_src* p2__;
   State* s2__;
   bool abort2__;
   Rule_s_reuse_entry* rule_s_reuse_entry2__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(2);
  
        la_exp_ = sf->p2__;
      
}

void Rpp_la_bndary_stc::sr2(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   CAbs_lr1_sym* p2__;
   State* s2__;
   bool abort2__;
   Rule_s_reuse_entry* rule_s_reuse_entry2__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(2);
  
		la_exp_ = 0;
        RSVP(sf->p2__);
        rule_info__.parser__->set_stop_parse(true);
    
}

void Rpp_la_bndary_stc::sr3(){
  struct SF{
   CAbs_lr1_sym* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
  };
  SF* sf = (SF*)rule_info__.parser__->parse_stack__.sf_by_top(1);
  
	la_exp_ = 0;
        CAbs_lr1_sym* sym = new Err_no_pp_la_bndary_expr_present;
        sym->set_rc(*sf->p1__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

