/*
 File: prt_fs_of_rules.cpp
 Date and Time: Fri Jan 30 18:55:20 2015 
*/
#include "prt_fs_of_rules.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_prt_fs_of_rules;// grammar's ns
// first set terminals
fsm_rules_reuse_table_type::fsm_rules_reuse_table_type(){
 no_rules_entries_ = 3;
 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();
}
  Cprt_fs_of_rules::
  Cprt_fs_of_rules()
    :yacco2::CAbs_fsm
      ("prt_fs_of_rules.lex"
      ,"1.0"
      ,"26 sept. 2005"
      ,false
      ,"Print first set per rule"
      ,"Fri Jan 30 18:55:20 2015 "
      ,S1_Cprt_fs_of_rules){
    
  }
 
Cprt_fs_of_rules::~Cprt_fs_of_rules(){

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

  bool Cprt_fs_of_rules::failed(){
      return false;
  }
  void Cprt_fs_of_rules::op(){
}
int Cprt_fs_of_rules::rhs_to_rules_mapping_[5] = {
 -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
}; 
Rprt_first_set_rules::Rprt_first_set_rules(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rprt_first_set_rules",0,Cprt_fs_of_rules::R_Rprt_first_set_rules_,P,true,true){
}

Rrules::Rrules(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rrules",0,Cprt_fs_of_rules::R_Rrules_,P,true,true){
}

Rrule_def::Rrule_def(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rrule_def",0,Cprt_fs_of_rules::R_Rrule_def_,P,true,true){
}

void Rrule_def::sr1(){
  struct SF{
   rule_def* 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);
  
    rule_def* rdef = sf->p1__;
    PRT_RULE_S_FIRST_SET(rdef);
  
}

