/*
 File: fsm_class_phrase_th.h
 Date and Time: Fri Jan 30 18:55:12 2015 
*/
#ifndef __fsm_class_phrase_th_h__
#define __fsm_class_phrase_th_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"

using namespace NS_yacco2_terminals;
#include "lint_balls.h"
#include "cweb_or_c_k.h"
#include "identifier.h"
#include "o2_sdc.h"
  
extern yacco2::Thread_entry ITH_fsm_class_phrase_th;

extern yacco2::State S1_Cfsm_class_phrase_th;
namespace NS_fsm_class_phrase_th {
yacco2::THR _YACCO2_CALL_TYPE
TH_fsm_class_phrase_th(yacco2::Parser* Caller);// called thread
yacco2::THR_result _YACCO2_CALL_TYPE
PROC_TH_fsm_class_phrase_th(yacco2::Parser* Caller);// called thread's twin the procedure
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_[15];
};
class Cfsm_class_phrase_th: public yacco2::CAbs_fsm {
 public:
  enum rules_and_subrules{
   start_of_rule_list = NS_yacco2_T_enum::T_Enum::sum_total_T
   ,R_Rfsm_class_phrase_th_ = 569//start_of_rule_list + 0
    ,rhs1_Rfsm_class_phrase_th_ = 1
   ,R_Rid_ = 570//start_of_rule_list + 2
    ,rhs1_Rid_ = 2
    ,rhs2_Rid_ = 3
    ,rhs3_Rid_ = 4
   ,R_Rpotential_code_blk_ = 571//start_of_rule_list + 4
    ,rhs1_Rpotential_code_blk_ = 5
   ,R_Rpotential_directives_ = 572//start_of_rule_list + 6
    ,rhs1_Rpotential_directives_ = 6
    ,rhs2_Rpotential_directives_ = 7
   ,R_Rmust_directive_phrase_ = 573//start_of_rule_list + 8
    ,rhs1_Rmust_directive_phrase_ = 8
   ,R_Rmust_directive_ = 574//start_of_rule_list + 10
    ,rhs1_Rmust_directive_ = 9
    ,rhs2_Rmust_directive_ = 10
    ,rhs3_Rmust_directive_ = 11
    ,rhs4_Rmust_directive_ = 12
    ,rhs5_Rmust_directive_ = 13
    ,rhs6_Rmust_directive_ = 14
    ,rhs7_Rmust_directive_ = 15
    ,rhs8_Rmust_directive_ = 16
    ,rhs9_Rmust_directive_ = 17
    ,rhs10_Rmust_directive_ = 18
    ,rhs11_Rmust_directive_ = 19
    ,rhs12_Rmust_directive_ = 20
   ,R_Rmaybe_more_directives_ = 575//start_of_rule_list + 12
    ,rhs1_Rmaybe_more_directives_ = 21
    ,rhs2_Rmaybe_more_directives_ = 22
   ,R_Rmaybe_directive_phrases_ = 576//start_of_rule_list + 14
    ,rhs1_Rmaybe_directive_phrases_ = 23
    ,rhs2_Rmaybe_directive_phrases_ = 24
   ,R_Rmaybe_directive_phrase_ = 577//start_of_rule_list + 16
    ,rhs1_Rmaybe_directive_phrase_ = 25
    ,rhs2_Rmaybe_directive_phrase_ = 26
   ,R_Rdirective_ = 578//start_of_rule_list + 18
    ,rhs1_Rdirective_ = 27
    ,rhs2_Rdirective_ = 28
    ,rhs3_Rdirective_ = 29
    ,rhs4_Rdirective_ = 30
    ,rhs5_Rdirective_ = 31
    ,rhs6_Rdirective_ = 32
    ,rhs7_Rdirective_ = 33
    ,rhs8_Rdirective_ = 34
    ,rhs9_Rdirective_ = 35
    ,rhs10_Rdirective_ = 36
    ,rhs11_Rdirective_ = 37
   ,R_Rclosing_brace_ = 579//start_of_rule_list + 20
    ,rhs1_Rclosing_brace_ = 38
    ,rhs2_Rclosing_brace_ = 39
   ,R_Rsyntax_code_ = 580//start_of_rule_list + 22
    ,rhs1_Rsyntax_code_ = 40
    ,rhs2_Rsyntax_code_ = 41
   ,R_Rlint_ = 581//start_of_rule_list + 24
    ,rhs1_Rlint_ = 42
    ,rhs2_Rlint_ = 43
   ,R_Rdirective_cweb_k_ = 582//start_of_rule_list + 26
    ,rhs1_Rdirective_cweb_k_ = 44
    ,rhs2_Rdirective_cweb_k_ = 45
    ,rhs3_Rdirective_cweb_k_ = 46
   ,R_Rcweb_k_ = 583//start_of_rule_list + 28
    ,rhs1_Rcweb_k_ = 47
    ,rhs2_Rcweb_k_ = 48
  };
  //no of la sets = 7
  //no of states = 70
  Cfsm_class_phrase_th();
  ~Cfsm_class_phrase_th();
  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_[49];
  
    public:
    T_fsm_class_phrase* fsm_class_phrase_;
    std::map<std::string,yacco2::CAbs_lr1_sym*> directives_map_;
    void remove_directives_from_map();
    yacco2::CAbs_lr1_sym* add_directive_to_map(yacco2::CAbs_lr1_sym* Directive);
    void add_sdc_to_directive(yacco2::CAbs_lr1_sym* Dir,T_syntax_code* Sdc);
  
 };
struct Rfsm_class_phrase_th;
struct Rid;
struct Rpotential_code_blk;
struct Rpotential_directives;
struct Rmust_directive_phrase;
struct Rmust_directive;
struct Rmaybe_more_directives;
struct Rmaybe_directive_phrases;
struct Rmaybe_directive_phrase;
struct Rdirective;
struct Rclosing_brace;
struct Rsyntax_code;
struct Rlint;
struct Rdirective_cweb_k;
struct Rcweb_k;
struct Rfsm_class_phrase_th:public yacco2::CAbs_lr1_sym {
  Rfsm_class_phrase_th(yacco2::Parser* P);
  public:
  void sr1();
};

struct Rid:public yacco2::CAbs_lr1_sym {
  Rid(yacco2::Parser* P);
  public:
  void sr1();
  void sr2();
  void sr3();
};

struct Rpotential_code_blk:public yacco2::CAbs_lr1_sym {
  Rpotential_code_blk(yacco2::Parser* P);
  public:
};

struct Rpotential_directives:public yacco2::CAbs_lr1_sym {
  Rpotential_directives(yacco2::Parser* P);
  public:
};

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

struct Rmust_directive:public yacco2::CAbs_lr1_sym {
  Rmust_directive(yacco2::Parser* P);
  void op();

    CAbs_lr1_sym* directive_;
  
  public:
  void sr1();
  void sr2();
  void sr3();
  void sr4();
  void sr5();
  void sr6();
  void sr7();
  void sr8();
  void sr9();
  void sr10();
  void sr11();
  void sr12();
};

struct Rmaybe_more_directives:public yacco2::CAbs_lr1_sym {
  Rmaybe_more_directives(yacco2::Parser* P);
  public:
};

struct Rmaybe_directive_phrases:public yacco2::CAbs_lr1_sym {
  Rmaybe_directive_phrases(yacco2::Parser* P);
  public:
};

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

struct Rdirective:public yacco2::CAbs_lr1_sym {
  Rdirective(yacco2::Parser* P);
  void op();

    CAbs_lr1_sym* directive_;
  
  public:
  void sr1();
  void sr2();
  void sr3();
  void sr4();
  void sr5();
  void sr6();
  void sr7();
  void sr8();
  void sr9();
  void sr10();
  void sr11();
};

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

struct Rsyntax_code:public yacco2::CAbs_lr1_sym {
  Rsyntax_code(yacco2::Parser* P);

    T_syntax_code* syntax_code_;
  
  public:
  void sr1();
  void sr2();
};

struct Rlint:public yacco2::CAbs_lr1_sym {
  Rlint(yacco2::Parser* P);
  public:
};

struct Rdirective_cweb_k:public yacco2::CAbs_lr1_sym {
  Rdirective_cweb_k(yacco2::Parser* P);
  void ctor();

	  AST* cweb_t_;
	
  public:
  void sr2();
  void sr3();
};

struct Rcweb_k:public yacco2::CAbs_lr1_sym {
  Rcweb_k(yacco2::Parser* P);
  void ctor();

	  AST* cweb_t_;
	
  public:
  void sr1();
  void sr2();
};

} // end of namespace

#endif
