/*
 File: rhs_bnd.cpp
 Date and Time: Fri Jan 30 18:55:22 2015 
*/
#include "rhs_bnd.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_rhs_bnd;// grammar's ns
// first set terminals
fsm_rules_reuse_table_type::fsm_rules_reuse_table_type(){
 no_rules_entries_ = 1;
 per_rule_s_table_[0] =  new Per_rule_s_reuse_table();
}
  Crhs_bnd::
  Crhs_bnd()
    :yacco2::CAbs_fsm
      ("rhs_bnd.lex"
      ,"1.0"
      ,"24 mar 2004"
      ,false
      ,"Determine end-of-subrule expression within a rule."
      ,"Fri Jan 30 18:55:22 2015 "
      ,S1_Crhs_bnd){
    
  }
 
Crhs_bnd::~Crhs_bnd(){

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

  bool Crhs_bnd::failed(){
      return false;
  }
  void Crhs_bnd::op(){
}
int Crhs_bnd::rhs_to_rules_mapping_[5] = {
 -1
 ,0 // subrule 1 for rule 1
 ,0 // subrule 2 for rule 1
 ,0 // subrule 3 for rule 1
 ,0 // subrule 4 for rule 1
}; 
Rrhs_bnd::Rrhs_bnd(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rrhs_bnd",0,Crhs_bnd::R_Rrhs_bnd_,P,false,false){
}

void Rrhs_bnd::op(){
  sstrace_rulesss
  
    CAbs_lr1_sym* sym = new T_eosubrule;
    sym->set_rc(*rule_info__.parser__->start_token__,__FILE__,__LINE__);
    // pass back lookahead as start of thread 
  RSVP_WLA(sym,rule_info__.parser__->start_token__,sym->tok_co_ords__.rc_pos__);
  
}
void Rrhs_bnd::sr4(){
  
		CAbs_lr1_sym* sym = new Err_subrule_overrun;
		sym->set_rc(*rule_info__.parser__->start_token__,__FILE__,__LINE__);
		RSVP(sym);
		rule_info__.parser__->set_stop_parse(true);  
	
}

