/*
 File: ws.cpp
 Date and Time: Fri Jan 30 18:55:28 2015 
*/
#include "ws.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_ws;// grammar's ns
// first set terminals
fsm_rules_reuse_table_type::fsm_rules_reuse_table_type(){
 no_rules_entries_ = 2;
 per_rule_s_table_[0] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[1] =  new Per_rule_s_reuse_table();
}
  Cws::
  Cws()
    :yacco2::CAbs_fsm
      ("ws.lex"
      ,"1.0"
      ,"17 Juin 2003"
      ,false
      ,"White space globber."
      ,"Fri Jan 30 18:55:28 2015 "
      ,S1_Cws){
    
  }
 
Cws::~Cws(){

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

  bool Cws::failed(){
      return false;
  }
  void Cws::op(){
}
int Cws::rhs_to_rules_mapping_[6] = {
 -1
 ,0 // subrule 1 for rule 1
 ,1 // subrule 2 for rule 2
 ,1 // subrule 3 for rule 2
 ,1 // subrule 4 for rule 2
 ,1 // subrule 5 for rule 2
}; 

       void Cws::read_white_stuff(){
loop:
	  switch (parser__->current_token()->enumerated_id__){
	  case T_Enum::T_raw_sp_: goto other;
	  case T_Enum::T_raw_ht_: goto other;
	  case T_Enum::T_raw_vt_: goto other;
	  case T_Enum::T_raw_ff_: goto other;	
          default: return;
          }
    other:{
          parser__->get_next_token();
goto loop;
      }

        }
  
Rws::Rws(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rws",0,Cws::R_Rws_,P,false,false){
}

void Rws::sr1(){
  
    Cws* fsm = (Cws*) rule_info__.parser__->fsm_tbl__;
    CAbs_lr1_sym* sym = NS_yacco2_terminals::PTR_ws__;
    sym->set_rc(*rule_info__.parser__->start_token__,__FILE__,__LINE__);
     sym->set_line_no_and_pos_in_line(*rule_info__.parser__->start_token__);
    RSVP(sym);
  
}

Rchr::Rchr(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rchr",0,Cws::R_Rchr_,P,false,false){
}

void Rchr::op(){
  sstrace_rulesss
 
    Cws* fsm = (Cws*) rule_info__.parser__->fsm_tbl__;
    fsm->read_white_stuff();// current token is the next character to assess
  
}
