diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /web/yacco2/grammar-testsuite/dp_2.cpp |
Initial commit
Diffstat (limited to 'web/yacco2/grammar-testsuite/dp_2.cpp')
-rw-r--r-- | web/yacco2/grammar-testsuite/dp_2.cpp | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/web/yacco2/grammar-testsuite/dp_2.cpp b/web/yacco2/grammar-testsuite/dp_2.cpp new file mode 100644 index 0000000000..1d9b488c8e --- /dev/null +++ b/web/yacco2/grammar-testsuite/dp_2.cpp @@ -0,0 +1,88 @@ +/* + File: dp_2.cpp + Date and Time: Sat Jan 31 11:58:36 2015 +*/ +#include "dp_2.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_dp_2;// grammar's ns +// first set terminals +fsm_rules_reuse_table_type::fsm_rules_reuse_table_type(){ + no_rules_entries_ = 6; + 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(); + per_rule_s_table_[3] = new Per_rule_s_reuse_table(); + per_rule_s_table_[4] = new Per_rule_s_reuse_table(); + per_rule_s_table_[5] = new Per_rule_s_reuse_table(); +} + Cdp_2:: + Cdp_2() + :yacco2::CAbs_fsm + ("dp_2.lex" + ,"1.0" + ,"7 mar 2014" + ,false + ,"LR(0) Deremer and Pennello grammar from page 633." + ,"Sat Jan 31 11:58:36 2015 " + ,S1_Cdp_2){ + + } + +Cdp_2::~Cdp_2(){ + + for(int x = 0;x < 6;++x){ + ///delete fsm_rules_reuse_table.per_rule_s_table_[x]; + } +} + + bool Cdp_2::failed(){ + return false; + } + void Cdp_2::op(){ +} +int Cdp_2::rhs_to_rules_mapping_[9] = { + -1 + ,0 // subrule 1 for rule 1 + ,1 // subrule 2 for rule 2 + ,1 // subrule 3 for rule 2 + ,1 // subrule 4 for rule 2 + ,2 // subrule 5 for rule 3 + ,3 // subrule 6 for rule 4 + ,4 // subrule 7 for rule 5 + ,5 // subrule 8 for rule 6 +}; +Rs::Rs(yacco2::Parser* P) + :CAbs_lr1_sym + ("Rs",0,Cdp_2::R_Rs_,P,false,false){ +} + +Rs1::Rs1(yacco2::Parser* P) + :CAbs_lr1_sym + ("Rs1",0,Cdp_2::R_Rs1_,P,false,false){ +} + +Rb::Rb(yacco2::Parser* P) + :CAbs_lr1_sym + ("Rb",0,Cdp_2::R_Rb_,P,false,false){ +} + +Rc::Rc(yacco2::Parser* P) + :CAbs_lr1_sym + ("Rc",0,Cdp_2::R_Rc_,P,false,false){ +} + +Rd::Rd(yacco2::Parser* P) + :CAbs_lr1_sym + ("Rd",0,Cdp_2::R_Rd_,P,false,false){ +} + +Re::Re(yacco2::Parser* P) + :CAbs_lr1_sym + ("Re",0,Cdp_2::R_Re_,P,false,false){ +} + |