/*
 File: err_symbols_ph_th.cpp
 Date and Time: Fri Jan 30 18:55:10 2015 
*/
#include "err_symbols_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_err_symbols_ph_th;// grammar's ns
// first set terminals
fsm_rules_reuse_table_type::fsm_rules_reuse_table_type(){
 no_rules_entries_ = 17;
 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();
 per_rule_s_table_[12] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[13] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[14] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[15] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[16] =  new Per_rule_s_reuse_table();
}
  Cerr_symbols_ph_th::
  Cerr_symbols_ph_th()
    :yacco2::CAbs_fsm
      ("err_symbols_ph_th.lex"
      ,"1.0"
      ,"22 mar 2004"
      ,false
      ,"Parse Error vocabulary."
      ,"Fri Jan 30 18:55:10 2015 "
      ,S1_Cerr_symbols_ph_th){
    
    error_symbols_phrase_ = 0;
  
  }
 
Cerr_symbols_ph_th::~Cerr_symbols_ph_th(){

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

  bool Cerr_symbols_ph_th::failed(){
      return false;
  }
  void Cerr_symbols_ph_th::op(){
    if(error_symbols_phrase_ != 0){
      delete error_symbols_phrase_;
      error_symbols_phrase_ = 0;
    }
    error_symbols_phrase_ = new T_error_symbols_phrase;
    error_symbols_phrase_->set_rc(*parser__->start_token__,__FILE__,__LINE__);
    AST* t = new AST(*error_symbols_phrase_);
    error_symbols_phrase_->phrase_tree(t);
  
}
int Cerr_symbols_ph_th::rhs_to_rules_mapping_[42] = {
 -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
 ,4 // subrule 7 for rule 5
 ,5 // subrule 8 for rule 6
 ,5 // subrule 9 for rule 6
 ,5 // subrule 10 for rule 6
 ,6 // subrule 11 for rule 7
 ,6 // subrule 12 for rule 7
 ,6 // subrule 13 for rule 7
 ,7 // subrule 14 for rule 8
 ,7 // subrule 15 for rule 8
 ,8 // subrule 16 for rule 9
 ,8 // subrule 17 for rule 9
 ,8 // subrule 18 for rule 9
 ,9 // subrule 19 for rule 10
 ,9 // subrule 20 for rule 10
 ,9 // subrule 21 for rule 10
 ,10 // subrule 22 for rule 11
 ,11 // subrule 23 for rule 12
 ,11 // subrule 24 for rule 12
 ,12 // subrule 25 for rule 13
 ,12 // subrule 26 for rule 13
 ,12 // subrule 27 for rule 13
 ,12 // subrule 28 for rule 13
 ,12 // subrule 29 for rule 13
 ,12 // subrule 30 for rule 13
 ,13 // subrule 31 for rule 14
 ,13 // subrule 32 for rule 14
 ,13 // subrule 33 for rule 14
 ,13 // subrule 34 for rule 14
 ,13 // subrule 35 for rule 14
 ,14 // subrule 36 for rule 15
 ,14 // subrule 37 for rule 15
 ,15 // subrule 38 for rule 16
 ,15 // subrule 39 for rule 16
 ,16 // subrule 40 for rule 17
 ,16 // subrule 41 for rule 17
}; 
Rerror_symbols_phrase::Rerror_symbols_phrase(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rerror_symbols_phrase",0,Cerr_symbols_ph_th::R_Rerror_symbols_phrase_,P,false,false){
}

void Rerror_symbols_phrase::sr1(){
  
      Cerr_symbols_ph_th* fsm = (Cerr_symbols_ph_th*)rule_info__.parser__->fsm_tbl__;
      RSVP(fsm->error_symbols_phrase_);
      fsm->error_symbols_phrase_ = 0;
    
}

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

void Ropen_par::sr1(){
  
        CAbs_lr1_sym* sym = new Err_no_open_parenthesis;
        sym->set_rc(*rule_info__.parser__->current_token(),__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

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

void Rclose_par::sr1(){
  
        CAbs_lr1_sym* sym = new Err_no_close_parenthesis;
        sym->set_rc(*rule_info__.parser__->current_token(),__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

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

Rfilename_phrase::Rfilename_phrase(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rfilename_phrase",0,Cerr_symbols_ph_th::R_Rfilename_phrase_,P,false,false){
}

Rfilename::Rfilename(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rfilename",0,Cerr_symbols_ph_th::R_Rfilename_,P,false,false){
}

void Rfilename::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);
        CAbs_lr1_sym* sym = new Err_no_filename_present;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
    
}

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

Rfilename_id::Rfilename_id(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rfilename_id",0,Cerr_symbols_ph_th::R_Rfilename_id_,P,false,false){
}

void Rfilename_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);
  
        Cerr_symbols_ph_th* fsm = (Cerr_symbols_ph_th*)rule_info__.parser__->fsm_tbl__;
        fsm->error_symbols_phrase_->filename_id(sf->p2__);
      
}

void Rfilename_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);
        CAbs_lr1_sym* sym = new Err_no_filename_id_present;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
    
}

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

Rnamespace_phrase::Rnamespace_phrase(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rnamespace_phrase",0,Cerr_symbols_ph_th::R_Rnamespace_phrase_,P,false,false){
}

void Rnamespace_phrase::sr2(){
  
        CAbs_lr1_sym* sym = new Err_no_comma_present;
        sym->set_rc(*rule_info__.parser__->current_token(),__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

Rnamespace::Rnamespace(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rnamespace",0,Cerr_symbols_ph_th::R_Rnamespace_,P,false,false){
}

void Rnamespace::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);
        CAbs_lr1_sym* sym = new Err_no_namespace_present;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
    
}

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

Rnamespace_id::Rnamespace_id(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rnamespace_id",0,Cerr_symbols_ph_th::R_Rnamespace_id_,P,false,false){
}

void Rnamespace_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);
  
        Cerr_symbols_ph_th* fsm = (Cerr_symbols_ph_th*)rule_info__.parser__->fsm_tbl__;
        fsm->error_symbols_phrase_->namespace_id(sf->p2__);
      
}

void Rnamespace_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);
        CAbs_lr1_sym* sym = new Err_no_namespace_id_present;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
    
}

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

Rsym_defs_phrase::Rsym_defs_phrase(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rsym_defs_phrase",0,Cerr_symbols_ph_th::R_Rsym_defs_phrase_,P,false,false){
}

Rsym_defs::Rsym_defs(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rsym_defs",0,Cerr_symbols_ph_th::R_Rsym_defs_,P,false,false){
}

Rsym_def::Rsym_def(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rsym_def",0,Cerr_symbols_ph_th::R_Rsym_def_,P,false,false){
}

void Rsym_def::sr1(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_terminal_def* 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);
  
      Cerr_symbols_ph_th* fsm = (Cerr_symbols_ph_th*)rule_info__.parser__->fsm_tbl__;
	  sf->p2__->classification(T_terminal_def::err);
      CAbs_lr1_sym* r = 
		fsm->error_symbols_phrase_->add_t_to_alphabet(sf->p2__,rule_info__.parser__);
      if(r == 0) return;
      RSVP(r);
      rule_info__.parser__->set_stop_parse(true);
    
}

void Rsym_def::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);
  
        RSVP(sf->p2__);
        rule_info__.parser__->set_stop_parse(true);
      
}

void Rsym_def::sr3(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_lrk_sufx* 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);
        CAbs_lr1_sym* sym = new Err_improper_directive;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

void Rsym_def::sr4(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_terminals_refs* 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);
        CAbs_lr1_sym* sym = new Err_improper_directive;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

void Rsym_def::sr5(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_terminals_sufx* 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);
        CAbs_lr1_sym* sym = new Err_improper_directive;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

void Rsym_def::sr6(){
  
        CAbs_lr1_sym* sym = new Err_no_sym_defs_present;
        sym->set_rc(*rule_info__.parser__->current_token(),__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
    
}

Rsym_def1::Rsym_def1(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rsym_def1",0,Cerr_symbols_ph_th::R_Rsym_def1_,P,false,false){
}

void Rsym_def1::sr1(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_terminal_def* 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);
  
      Cerr_symbols_ph_th* fsm = (Cerr_symbols_ph_th*)rule_info__.parser__->fsm_tbl__;
	  sf->p2__->classification(T_terminal_def::err);
      CAbs_lr1_sym* r = 
		fsm->error_symbols_phrase_->add_t_to_alphabet(sf->p2__,rule_info__.parser__);
      if(r == 0) return;
      RSVP(r);
      rule_info__.parser__->set_stop_parse(true);
    
}

void Rsym_def1::sr2(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_lrk_sufx* 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);
        CAbs_lr1_sym* sym = new Err_improper_directive;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

void Rsym_def1::sr3(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_terminals_refs* 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);
        CAbs_lr1_sym* sym = new Err_improper_directive;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

void Rsym_def1::sr4(){
  struct SF{
   LR1_parallel_operator* p1__;
   State* s1__;
   bool abort1__;
   Rule_s_reuse_entry* rule_s_reuse_entry1__;
   T_terminals_sufx* 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);
        CAbs_lr1_sym* sym = new Err_improper_directive;
        sym->set_rc(*sf->p2__,__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

void Rsym_def1::sr5(){
  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);
  
        RSVP(sf->p2__);
        rule_info__.parser__->set_stop_parse(true);
      
}

Ropen_brace::Ropen_brace(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Ropen_brace",0,Cerr_symbols_ph_th::R_Ropen_brace_,P,false,false){
}

void Ropen_brace::sr1(){
  
        CAbs_lr1_sym* sym = new Err_no_open_brace;
        sym->set_rc(*rule_info__.parser__->current_token(),__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

Rclose_brace::Rclose_brace(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rclose_brace",0,Cerr_symbols_ph_th::R_Rclose_brace_,P,false,false){
}

void Rclose_brace::sr1(){
  
        CAbs_lr1_sym* sym = new Err_no_close_brace;
        sym->set_rc(*rule_info__.parser__->current_token(),__FILE__,__LINE__);
        RSVP(sym);
        rule_info__.parser__->set_stop_parse(true);
      
}

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

