/*
 File: rule_lhs_phrase.h
 Date and Time: Fri Jan 30 18:55:23 2015 
*/
#ifndef __rule_lhs_phrase_h__
#define __rule_lhs_phrase_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 "c_string.h"
#include "o2_sdc.h"
  
extern yacco2::Thread_entry ITH_rule_lhs_phrase;

extern yacco2::State S1_Crule_lhs_phrase;
namespace NS_rule_lhs_phrase {
yacco2::THR _YACCO2_CALL_TYPE
TH_rule_lhs_phrase(yacco2::Parser* Caller);// called thread
yacco2::THR_result _YACCO2_CALL_TYPE
PROC_TH_rule_lhs_phrase(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_[16];
};
class Crule_lhs_phrase: public yacco2::CAbs_fsm {
 public:
  enum rules_and_subrules{
   start_of_rule_list = NS_yacco2_T_enum::T_Enum::sum_total_T
   ,R_Rrule_lhs_phrase_ = 569//start_of_rule_list + 0
    ,rhs1_Rrule_lhs_phrase_ = 1
   ,R_Rlhs_ = 570//start_of_rule_list + 2
    ,rhs1_Rlhs_ = 2
    ,rhs2_Rlhs_ = 3
   ,R_Rpotential_directives_ = 571//start_of_rule_list + 4
    ,rhs1_Rpotential_directives_ = 4
    ,rhs2_Rpotential_directives_ = 5
   ,R_Rmust_directive_phrase_ = 572//start_of_rule_list + 6
    ,rhs1_Rmust_directive_phrase_ = 6
   ,R_Rmust_directive_ = 573//start_of_rule_list + 8
    ,rhs1_Rmust_directive_ = 7
    ,rhs2_Rmust_directive_ = 8
    ,rhs3_Rmust_directive_ = 9
    ,rhs4_Rmust_directive_ = 10
    ,rhs5_Rmust_directive_ = 11
    ,rhs6_Rmust_directive_ = 12
    ,rhs7_Rmust_directive_ = 13
   ,R_Rclose_brace_ = 574//start_of_rule_list + 10
    ,rhs1_Rclose_brace_ = 14
    ,rhs2_Rclose_brace_ = 15
   ,R_Rmaybe_more_directives_ = 575//start_of_rule_list + 12
    ,rhs1_Rmaybe_more_directives_ = 16
    ,rhs2_Rmaybe_more_directives_ = 17
   ,R_Rmaybe_directive_phrases_ = 576//start_of_rule_list + 14
    ,rhs1_Rmaybe_directive_phrases_ = 18
    ,rhs2_Rmaybe_directive_phrases_ = 19
   ,R_Rmaybe_directive_phrase_ = 577//start_of_rule_list + 16
    ,rhs1_Rmaybe_directive_phrase_ = 20
    ,rhs2_Rmaybe_directive_phrase_ = 21
   ,R_Rdirective_phrase_ = 578//start_of_rule_list + 18
    ,rhs1_Rdirective_phrase_ = 22
   ,R_Rdirective_ = 579//start_of_rule_list + 20
    ,rhs1_Rdirective_ = 23
    ,rhs2_Rdirective_ = 24
    ,rhs3_Rdirective_ = 25
    ,rhs4_Rdirective_ = 26
    ,rhs5_Rdirective_ = 27
    ,rhs6_Rdirective_ = 28
   ,R_Rsyntax_code_ = 580//start_of_rule_list + 22
    ,rhs1_Rsyntax_code_ = 29
    ,rhs2_Rsyntax_code_ = 30
   ,R_Rlint_ = 581//start_of_rule_list + 24
    ,rhs1_Rlint_ = 31
    ,rhs2_Rlint_ = 32
   ,R_Rcweb_marker_ = 582//start_of_rule_list + 26
    ,rhs1_Rcweb_marker_ = 33
   ,R_Rdirective_cweb_k_ = 583//start_of_rule_list + 28
    ,rhs1_Rdirective_cweb_k_ = 34
    ,rhs2_Rdirective_cweb_k_ = 35
    ,rhs3_Rdirective_cweb_k_ = 36
   ,R_Rcweb_k_ = 584//start_of_rule_list + 30
    ,rhs1_Rcweb_k_ = 37
    ,rhs2_Rcweb_k_ = 38
  };
  //no of la sets = 6
  //no of states = 56
  Crule_lhs_phrase();
  ~Crule_lhs_phrase();
  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_[39];
  
    public:
    void add_sdc_to_directive(yacco2::CAbs_lr1_sym* Dir,T_syntax_code* Sdc);
    T_rule_lhs_phrase* rule_lhs_phrase_;
  
 };
struct Rrule_lhs_phrase;
struct Rlhs;
struct Rpotential_directives;
struct Rmust_directive_phrase;
struct Rmust_directive;
struct Rclose_brace;
struct Rmaybe_more_directives;
struct Rmaybe_directive_phrases;
struct Rmaybe_directive_phrase;
struct Rdirective_phrase;
struct Rdirective;
struct Rsyntax_code;
struct Rlint;
struct Rcweb_marker;
struct Rdirective_cweb_k;
struct Rcweb_k;
struct Rrule_lhs_phrase:public yacco2::CAbs_lr1_sym {
  Rrule_lhs_phrase(yacco2::Parser* P);
  public:
  void sr1();
};

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

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 ctor();

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

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

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_phrase:public yacco2::CAbs_lr1_sym {
  Rdirective_phrase(yacco2::Parser* P);
  public:
  void sr1();
};

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

    CAbs_lr1_sym* directive_;
  
  public:
  void sr1();
  void sr2();
  void sr3();
  void sr4();
  void sr5();
  void sr6();
};

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

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

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

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

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

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
