/* File: linker_pass3.h Date and Time: Fri Jan 30 18:55:14 2015 */ #ifndef __linker_pass3_h__ #define __linker_pass3_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 "linker_id.h" #include "linker_preamble_code.h" #include "lint_balls.h" #include "c_string.h" #include "angled_string.h" #include "c_literal.h" #include "bad_char_set.h" using namespace NS_yacco2_terminals; // monolithic grammar: no thread extern yacco2::State S1_Clinker_pass3; namespace NS_linker_pass3 { 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_[10]; }; class Clinker_pass3: public yacco2::CAbs_fsm { public: enum rules_and_subrules{ start_of_rule_list = NS_yacco2_T_enum::T_Enum::sum_total_T ,R_Rlinker_pass3_ = 569//start_of_rule_list + 0 ,rhs1_Rlinker_pass3_ = 1 ,R_RT_alphabet_ = 570//start_of_rule_list + 2 ,rhs1_RT_alphabet_ = 2 ,rhs2_RT_alphabet_ = 3 ,rhs3_RT_alphabet_ = 4 ,R_RT_alphabet_filename_ = 571//start_of_rule_list + 4 ,rhs1_RT_alphabet_filename_ = 5 ,rhs2_RT_alphabet_filename_ = 6 ,rhs3_RT_alphabet_filename_ = 7 ,rhs4_RT_alphabet_filename_ = 8 ,rhs5_RT_alphabet_filename_ = 9 ,rhs6_RT_alphabet_filename_ = 10 ,R_Remitfile_ = 572//start_of_rule_list + 6 ,rhs1_Remitfile_ = 11 ,rhs2_Remitfile_ = 12 ,rhs3_Remitfile_ = 13 ,R_Remitfile_filename_ = 573//start_of_rule_list + 8 ,rhs1_Remitfile_filename_ = 14 ,rhs2_Remitfile_filename_ = 15 ,rhs3_Remitfile_filename_ = 16 ,rhs4_Remitfile_filename_ = 17 ,rhs5_Remitfile_filename_ = 18 ,rhs6_Remitfile_filename_ = 19 ,R_Rpreamble_ = 574//start_of_rule_list + 10 ,rhs1_Rpreamble_ = 20 ,rhs2_Rpreamble_ = 21 ,rhs3_Rpreamble_ = 22 ,R_Rpreamble_code_ = 575//start_of_rule_list + 12 ,rhs1_Rpreamble_code_ = 23 ,rhs2_Rpreamble_code_ = 24 ,rhs3_Rpreamble_code_ = 25 ,R_R_fsc_files_ = 576//start_of_rule_list + 14 ,rhs1_R_fsc_files_ = 26 ,rhs2_R_fsc_files_ = 27 ,rhs3_R_fsc_files_ = 28 ,R_R_fsc_file_ = 577//start_of_rule_list + 16 ,rhs1_R_fsc_file_ = 29 ,rhs2_R_fsc_file_ = 30 ,rhs3_R_fsc_file_ = 31 ,rhs4_R_fsc_file_ = 32 ,rhs5_R_fsc_file_ = 33 ,R_Rlint_ = 578//start_of_rule_list + 18 ,rhs1_Rlint_ = 34 ,rhs2_Rlint_ = 35 }; //no of la sets = 5 //no of states = 60 Clinker_pass3(); ~Clinker_pass3(); 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_[36]; public: bool chk_filename(const char* Filename,CAbs_lr1_sym* Tok,CAbs_lr1_sym* Err); bool chk_ofilename(const char* Filename,CAbs_lr1_sym* Tok); yacco2::CAbs_lr1_sym* chk_for_overrun(); std::string t_alphabet_filename_; std::string emitfile_filename_; T_syntax_code* preamble_srce_; std::vector grammars_fsc_files_; std::vector directories_; }; struct Rlinker_pass3; struct RT_alphabet; struct RT_alphabet_filename; struct Remitfile; struct Remitfile_filename; struct Rpreamble; struct Rpreamble_code; struct R_fsc_files; struct R_fsc_file; struct Rlint; struct Rlinker_pass3:public yacco2::CAbs_lr1_sym { Rlinker_pass3(yacco2::Parser* P); void op(); public: }; struct RT_alphabet:public yacco2::CAbs_lr1_sym { RT_alphabet(yacco2::Parser* P); public: void sr2(); void sr3(); }; struct RT_alphabet_filename:public yacco2::CAbs_lr1_sym { RT_alphabet_filename(yacco2::Parser* P); public: void sr1(); void sr2(); void sr3(); void sr4(); void sr5(); void sr6(); }; struct Remitfile:public yacco2::CAbs_lr1_sym { Remitfile(yacco2::Parser* P); public: void sr2(); void sr3(); }; struct Remitfile_filename:public yacco2::CAbs_lr1_sym { Remitfile_filename(yacco2::Parser* P); public: void sr1(); void sr2(); void sr3(); void sr4(); void sr5(); void sr6(); }; struct Rpreamble:public yacco2::CAbs_lr1_sym { Rpreamble(yacco2::Parser* P); public: void sr2(); void sr3(); }; struct Rpreamble_code:public yacco2::CAbs_lr1_sym { Rpreamble_code(yacco2::Parser* P); public: void sr1(); void sr2(); void sr3(); }; struct R_fsc_files:public yacco2::CAbs_lr1_sym { R_fsc_files(yacco2::Parser* P); public: void sr3(); }; struct R_fsc_file:public yacco2::CAbs_lr1_sym { R_fsc_file(yacco2::Parser* P); public: void sr1(); void sr2(); void sr3(); void sr4(); void sr5(); }; struct Rlint:public yacco2::CAbs_lr1_sym { Rlint(yacco2::Parser* P); public: }; } // end of namespace #endif