/*
 File: t_alphabet.h
 Date and Time: Fri Jan 30 18:55:25 2015 
*/
#ifndef __t_alphabet_h__
#define __t_alphabet_h__ 1
#include "yacco2.h"
#include "yacco2_T_enumeration.h"
#include "yacco2_k_symbols.h"
#include "yacco2_err_symbols.h"
#include "yacco2_terminals.h"
#include "yacco2_characters.h"

	#include "yacco2_stbl.h"
    extern std::vector<NS_yacco2_terminals::table_entry*> T_DICTIONARY;
    extern std::vector< std::set<int> > T_THREAD_ID_LIST;
  
// monolithic grammar: no thread
extern yacco2::State S1_Ct_alphabet;
namespace NS_t_alphabet {
using namespace NS_yacco2_T_enum;// enumerate
using namespace yacco2;
struct fsm_rules_reuse_table_type{
 fsm_rules_reuse_table_type();
 int no_rules_entries_;
 Per_rule_s_reuse_table* per_rule_s_table_[6];
};
class Ct_alphabet: public yacco2::CAbs_fsm {
 public:
  enum rules_and_subrules{
   start_of_rule_list = NS_yacco2_T_enum::T_Enum::sum_total_T
   ,R_Rt_alphabet_ = 569//start_of_rule_list + 0
    ,rhs1_Rt_alphabet_ = 1
   ,R_Reog_ = 570//start_of_rule_list + 2
    ,rhs1_Reog_ = 2
   ,R_RT_alphabet_ = 571//start_of_rule_list + 4
    ,rhs1_RT_alphabet_ = 3
    ,rhs2_RT_alphabet_ = 4
   ,R_Rlist_of_Ts_ = 572//start_of_rule_list + 6
    ,rhs1_Rlist_of_Ts_ = 5
    ,rhs2_Rlist_of_Ts_ = 6
    ,rhs3_Rlist_of_Ts_ = 7
   ,R_Ra_T_ = 573//start_of_rule_list + 8
    ,rhs1_Ra_T_ = 8
   ,R_Rend_T_alphabet_ = 574//start_of_rule_list + 10
    ,rhs1_Rend_T_alphabet_ = 9
    ,rhs2_Rend_T_alphabet_ = 10
  };
  //no of la sets = 4
  //no of states = 14
  Ct_alphabet();
  ~Ct_alphabet();
  void op();
  bool failed();
  void reduce_rhs_of_rule
      (yacco2::UINT Sub_rule_no,yacco2::Rule_s_reuse_entry** Recycled_rule);
  fsm_rules_reuse_table_type fsm_rules_reuse_table;
  static int rhs_to_rules_mapping_[11];
  
    public:
    std::map<int,std::string> enum_T_dictionary_;
    std::map<std::string,int> T_dictionary_;
    int enum_cnt_;
  
 };
struct Rt_alphabet;
struct Reog;
struct RT_alphabet;
struct Rlist_of_Ts;
struct Ra_T;
struct Rend_T_alphabet;
struct Rt_alphabet:public yacco2::CAbs_lr1_sym {
  Rt_alphabet(yacco2::Parser* P);
  void op();
  public:
};

struct Reog:public yacco2::CAbs_lr1_sym {
  Reog(yacco2::Parser* P);
  public:
  void sr1();
};

struct RT_alphabet:public yacco2::CAbs_lr1_sym {
  RT_alphabet(yacco2::Parser* P);
  public:
  void sr2();
};

struct Rlist_of_Ts:public yacco2::CAbs_lr1_sym {
  Rlist_of_Ts(yacco2::Parser* P);
  public:
  void sr3();
};

struct Ra_T:public yacco2::CAbs_lr1_sym {
  Ra_T(yacco2::Parser* P);
  public:
  void sr1();
};

struct Rend_T_alphabet:public yacco2::CAbs_lr1_sym {
  Rend_T_alphabet(yacco2::Parser* P);
  public:
  void sr2();
};

} // end of namespace

#endif
