/*
 File: linker_id.cpp
 Date and Time: Fri Jan 30 18:55:14 2015 
*/
#include "linker_id.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_linker_id;// grammar's ns
// first set terminals
fsm_rules_reuse_table_type::fsm_rules_reuse_table_type(){
 no_rules_entries_ = 11;
 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();
}
  Clinker_id::
  Clinker_id()
    :yacco2::CAbs_fsm
      ("linker_id.lex"
      ,"1.0"
      ,"17 Juin 2003"
      ,false
      ,"\\olinker identifiers recognizer: uses symbol table."
      ,"Fri Jan 30 18:55:14 2015 "
      ,S1_Clinker_id){
    
    data_.erase();
  
  }
 
Clinker_id::~Clinker_id(){

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

  bool Clinker_id::failed(){
      return false;
  }
  void Clinker_id::op(){
    data_.erase();
  
}
int Clinker_id::rhs_to_rules_mapping_[87] = {
 -1
 ,0 // subrule 1 for rule 1
 ,0 // subrule 2 for rule 1
 ,1 // subrule 3 for rule 2
 ,1 // subrule 4 for rule 2
 ,2 // subrule 5 for rule 3
 ,2 // subrule 6 for rule 3
 ,2 // subrule 7 for rule 3
 ,2 // subrule 8 for rule 3
 ,3 // subrule 9 for rule 4
 ,3 // subrule 10 for rule 4
 ,4 // subrule 11 for rule 5
 ,4 // subrule 12 for rule 5
 ,4 // subrule 13 for rule 5
 ,4 // subrule 14 for rule 5
 ,4 // subrule 15 for rule 5
 ,5 // subrule 16 for rule 6
 ,5 // subrule 17 for rule 6
 ,5 // subrule 18 for rule 6
 ,5 // subrule 19 for rule 6
 ,5 // subrule 20 for rule 6
 ,5 // subrule 21 for rule 6
 ,5 // subrule 22 for rule 6
 ,5 // subrule 23 for rule 6
 ,5 // subrule 24 for rule 6
 ,6 // subrule 25 for rule 7
 ,6 // subrule 26 for rule 7
 ,6 // subrule 27 for rule 7
 ,6 // subrule 28 for rule 7
 ,6 // subrule 29 for rule 7
 ,6 // subrule 30 for rule 7
 ,6 // subrule 31 for rule 7
 ,6 // subrule 32 for rule 7
 ,6 // subrule 33 for rule 7
 ,6 // subrule 34 for rule 7
 ,6 // subrule 35 for rule 7
 ,6 // subrule 36 for rule 7
 ,6 // subrule 37 for rule 7
 ,7 // subrule 38 for rule 8
 ,7 // subrule 39 for rule 8
 ,7 // subrule 40 for rule 8
 ,7 // subrule 41 for rule 8
 ,7 // subrule 42 for rule 8
 ,7 // subrule 43 for rule 8
 ,7 // subrule 44 for rule 8
 ,7 // subrule 45 for rule 8
 ,7 // subrule 46 for rule 8
 ,7 // subrule 47 for rule 8
 ,7 // subrule 48 for rule 8
 ,7 // subrule 49 for rule 8
 ,7 // subrule 50 for rule 8
 ,8 // subrule 51 for rule 9
 ,8 // subrule 52 for rule 9
 ,8 // subrule 53 for rule 9
 ,8 // subrule 54 for rule 9
 ,8 // subrule 55 for rule 9
 ,8 // subrule 56 for rule 9
 ,8 // subrule 57 for rule 9
 ,8 // subrule 58 for rule 9
 ,8 // subrule 59 for rule 9
 ,8 // subrule 60 for rule 9
 ,8 // subrule 61 for rule 9
 ,8 // subrule 62 for rule 9
 ,8 // subrule 63 for rule 9
 ,9 // subrule 64 for rule 10
 ,9 // subrule 65 for rule 10
 ,9 // subrule 66 for rule 10
 ,9 // subrule 67 for rule 10
 ,9 // subrule 68 for rule 10
 ,9 // subrule 69 for rule 10
 ,9 // subrule 70 for rule 10
 ,9 // subrule 71 for rule 10
 ,9 // subrule 72 for rule 10
 ,9 // subrule 73 for rule 10
 ,9 // subrule 74 for rule 10
 ,9 // subrule 75 for rule 10
 ,9 // subrule 76 for rule 10
 ,10 // subrule 77 for rule 11
 ,10 // subrule 78 for rule 11
 ,10 // subrule 79 for rule 11
 ,10 // subrule 80 for rule 11
 ,10 // subrule 81 for rule 11
 ,10 // subrule 82 for rule 11
 ,10 // subrule 83 for rule 11
 ,10 // subrule 84 for rule 11
 ,10 // subrule 85 for rule 11
 ,10 // subrule 86 for rule 11
}; 
Rlinker_id::Rlinker_id(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rlinker_id",0,Clinker_id::R_Rlinker_id_,P,false,false){
}

void Rlinker_id::op(){
  sstrace_rulesss
 
    Clinker_id* fsm = (Clinker_id*) rule_info__.parser__->fsm_tbl__;
    T_sym_tbl_report_card report_card;
    kw_in_stbl* kw_in;
    using namespace yacco2_stbl;
    
    find_sym_in_stbl(report_card,*fsm->data_.c_str());
    if(report_card.action_ == T_sym_tbl_report_card::fnd){
      if(report_card.tbl_entry_->type_ == table_entry::keyword){
		kw_in = (kw_in_stbl*)report_card.tbl_entry_->symbol_;
		CAbs_lr1_sym* kw = kw_in->keyword_in_stbl();
			CAbs_lr1_sym* nkw;
			switch(kw->enumerated_id__){
			case T_Enum::T_T_transitive_:{nkw = new T_transitive;break;}  
			case T_Enum::T_T_grammar_name_:{nkw = new T_grammar_name;break;}  
			case T_Enum::T_T_error_symbols_:{nkw = new T_error_symbols;break;}  
			case T_Enum::T_T_name_space_:{nkw = new T_name_space;break;}  

			case T_Enum::T_T_thread_name_:{nkw = new T_thread_name;break;}  
			case T_Enum::T_T_monolithic_:{nkw = new T_monolithic;break;}  
			case T_Enum::T_T_file_name_:{nkw = new T_file_name;break;}  
			case T_Enum::T_T_no_of_T_:{nkw = new T_no_of_T;break;}  

			case T_Enum::T_T_list_of_native_first_set_terminals_:
	{nkw = new T_list_of_native_first_set_terminals;break;}  
			case T_Enum::T_T_end_list_of_native_first_set_terminals_:
	{nkw = new T_end_list_of_native_first_set_terminals;break;}  
			case T_Enum::T_T_list_of_transitive_threads_:
	{nkw = new T_list_of_transitive_threads;break;}  
			case T_Enum::T_T_end_list_of_transitive_threads_:
	{nkw = new T_end_list_of_transitive_threads;break;}  
			case T_Enum::T_T_list_of_used_threads_:
	{nkw = new T_list_of_used_threads;break;}  
			case T_Enum::T_T_end_list_of_used_threads_:
	{nkw = new T_end_list_of_used_threads;break;}  
			case T_Enum::T_T_T_alphabet_:{nkw = new T_T_alphabet;break;}  
			case T_Enum::T_T_end_T_alphabet_:{nkw = new T_end_T_alphabet;break;}  
			case T_Enum::T_T_file_of_T_alphabet_:{nkw = new T_file_of_T_alphabet;break;}  
			case T_Enum::T_T_emitfile_:{nkw = new T_emitfile;break;}  
			case T_Enum::T_T_preamble_:{nkw = new T_preamble;break;}  
			case T_Enum::T_T_fsm_comments_:{nkw = new T_fsm_comments;break;}  
			case T_Enum::T_T_end_preamble_:{nkw = new T_end_preamble;break;}  
			}
			nkw->set_rc(*rule_info__.parser__->start_token__,__FILE__,__LINE__);
			RSVP(nkw);
			return;
		}else{
		  RSVP(report_card.tbl_entry_->symbol_);
		  return;
		}      
    }
    T_identifier* id = new T_identifier(fsm->data_.c_str());
    id->set_rc(*rule_info__.parser__->start_token__,__FILE__,__LINE__);
    RSVP(id);
  
}
Rtail_chars::Rtail_chars(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rtail_chars",0,Clinker_id::R_Rtail_chars_,P,false,false){
}

Rstart_char::Rstart_char(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rstart_char",0,Clinker_id::R_Rstart_char_,P,false,false){
}

Rtail_char::Rtail_char(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rtail_char",0,Clinker_id::R_Rtail_char_,P,false,false){
}

Rno_and_underscore_and_hyphen::Rno_and_underscore_and_hyphen(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rno_and_underscore_and_hyphen",0,Clinker_id::R_Rno_and_underscore_and_hyphen_,P,false,false){
}

void Rno_and_underscore_and_hyphen::sr1(){
  struct SF{
   raw_colon* 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);
  
      Clinker_id* fsm = (Clinker_id*) rule_info__.parser__->fsm_tbl__;
      fsm->data_ += sf->p1__->id__;
    
}

void Rno_and_underscore_and_hyphen::sr2(){
  struct SF{
   raw_period* 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);
  
      Clinker_id* fsm = (Clinker_id*) rule_info__.parser__->fsm_tbl__;
      fsm->data_ += sf->p1__->id__;
    
}

void Rno_and_underscore_and_hyphen::sr3(){
  struct SF{
   raw_under_score* 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);
  
      Clinker_id* fsm = (Clinker_id*) rule_info__.parser__->fsm_tbl__;
      fsm->data_ += sf->p1__->id__;
    
}

void Rno_and_underscore_and_hyphen::sr4(){
  struct SF{
   raw_minus* 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);
  
      Clinker_id* fsm = (Clinker_id*) rule_info__.parser__->fsm_tbl__;
      fsm->data_ += sf->p1__->id__;
    
}

Rminus_la::Rminus_la(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rminus_la",0,Clinker_id::R_Rminus_la_,P,false,false){
}

RUPPER_A_M::RUPPER_A_M(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RUPPER_A_M",0,Clinker_id::R_RUPPER_A_M_,P,false,false){
}

void RUPPER_A_M::op(){
  sstrace_rulesss
 
    Clinker_id* fsm = (Clinker_id*) rule_info__.parser__->fsm_tbl__;
    size_t pos = rule_info__.parser__->parse_stack__.top_sub__ - 1;
    CAbs_lr1_sym* sym = rule_info__.parser__->get_spec_stack_token(pos);
    fsm->data_ += sym->id__;
  
}
RUPPER_N_Z::RUPPER_N_Z(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RUPPER_N_Z",0,Clinker_id::R_RUPPER_N_Z_,P,false,false){
}

void RUPPER_N_Z::op(){
  sstrace_rulesss
 
    Clinker_id* fsm = (Clinker_id*) rule_info__.parser__->fsm_tbl__;
    size_t pos = rule_info__.parser__->parse_stack__.top_sub__ - 1;
    CAbs_lr1_sym* sym = rule_info__.parser__->get_spec_stack_token(pos);
    fsm->data_ += sym->id__;
  
}
Rlower_a_m::Rlower_a_m(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rlower_a_m",0,Clinker_id::R_Rlower_a_m_,P,false,false){
}

void Rlower_a_m::op(){
  sstrace_rulesss
 
    Clinker_id* fsm = (Clinker_id*) rule_info__.parser__->fsm_tbl__;
    size_t pos = rule_info__.parser__->parse_stack__.top_sub__ - 1;
    CAbs_lr1_sym* sym = rule_info__.parser__->get_spec_stack_token(pos);
    fsm->data_ += sym->id__;
  
}
Rlower_n_z::Rlower_n_z(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rlower_n_z",0,Clinker_id::R_Rlower_n_z_,P,false,false){
}

void Rlower_n_z::op(){
  sstrace_rulesss
 
    Clinker_id* fsm = (Clinker_id*) rule_info__.parser__->fsm_tbl__;
    size_t pos = rule_info__.parser__->parse_stack__.top_sub__ - 1;
    CAbs_lr1_sym* sym = rule_info__.parser__->get_spec_stack_token(pos);
    fsm->data_ += sym->id__;
  
}
RNUMBERS::RNUMBERS(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RNUMBERS",0,Clinker_id::R_RNUMBERS_,P,false,false){
}

void RNUMBERS::op(){
  sstrace_rulesss
 
    Clinker_id* fsm = (Clinker_id*) rule_info__.parser__->fsm_tbl__;
    size_t pos = rule_info__.parser__->parse_stack__.top_sub__ - 1;
    CAbs_lr1_sym* sym = rule_info__.parser__->get_spec_stack_token(pos);
    fsm->data_ += sym->id__;
  
}
