summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lr1_pa1sym.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'web/yacco2/qa/lr1_pa1sym.cpp')
-rw-r--r--web/yacco2/qa/lr1_pa1sym.cpp209
1 files changed, 209 insertions, 0 deletions
diff --git a/web/yacco2/qa/lr1_pa1sym.cpp b/web/yacco2/qa/lr1_pa1sym.cpp
new file mode 100644
index 0000000000..a90db633a7
--- /dev/null
+++ b/web/yacco2/qa/lr1_pa1sym.cpp
@@ -0,0 +1,209 @@
+/*
+ File: lr1_pa1sym.cpp
+ Date and Time: Mon Oct 13 18:18:14 2014
+*/
+#include "lr1_pa1.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_lr1_pa1;// grammar's ns
+// first set terminals
+// monolithic grammar --- no thread
+void
+Clr1_pa1_rul_fsm::reduce_rhs_of_rule
+ (yacco2::UINT Sub_rule_no,yacco2::Rule_s_reuse_entry** Recycled_rule){
+ int reducing_rule = rhs_to_rules_mapping_[Sub_rule_no];
+ Per_rule_s_reuse_table* rule_reuse_tbl_ptr =
+ fsm_rules_reuse_table.per_rule_s_table_[reducing_rule];
+ Rule_s_reuse_entry* re(0);
+ find_a_recycled_rule(rule_reuse_tbl_ptr,&re);
+ (*Recycled_rule) = re;
+ fnd_re: switch (Sub_rule_no){
+ case rhs1_Rlr1_pa1_:{
+ Rlr1_pa1* sym;
+ if(re->rule_ == 0){
+ sym = new Rlr1_pa1(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (Rlr1_pa1*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 2;
+
+
+ return;}
+ case rhs1_RX_:{
+ RX* sym;
+ if(re->rule_ == 0){
+ sym = new RX(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RX*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 3;
+
+
+ return;}
+ case rhs2_RX_:{
+ RX* sym;
+ if(re->rule_ == 0){
+ sym = new RX(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RX*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 3;
+
+
+ return;}
+ case rhs3_RX_:{
+ RX* sym;
+ if(re->rule_ == 0){
+ sym = new RX(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RX*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 2;
+
+
+ return;}
+ case rhs4_RX_:{
+ RX* sym;
+ if(re->rule_ == 0){
+ sym = new RX(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RX*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 3;
+
+
+ return;}
+ case rhs5_RX_:{
+ RX* sym;
+ if(re->rule_ == 0){
+ sym = new RX(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RX*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 3;
+
+
+ return;}
+ case rhs6_RX_:{
+ RX* sym;
+ if(re->rule_ == 0){
+ sym = new RX(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RX*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 2;
+
+
+ return;}
+ case rhs1_RY_:{
+ RY* sym;
+ if(re->rule_ == 0){
+ sym = new RY(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RY*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 2;
+
+
+ return;}
+ case rhs2_RY_:{
+ RY* sym;
+ if(re->rule_ == 0){
+ sym = new RY(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RY*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 2;
+
+
+ return;}
+ case rhs1_RZ_:{
+ RZ* sym;
+ if(re->rule_ == 0){
+ sym = new RZ(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RZ*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 2;
+
+
+ return;}
+ case rhs1_RT_:{
+ RT* sym;
+ if(re->rule_ == 0){
+ sym = new RT(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RT*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 3;
+
+
+ return;}
+ case rhs1_RW_:{
+ RW* sym;
+ if(re->rule_ == 0){
+ sym = new RW(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RW*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 2;
+
+
+ return;}
+ case rhs1_RV_:{
+ RV* sym;
+ if(re->rule_ == 0){
+ sym = new RV(parser__);
+ re->rule_ = sym;
+ }else{
+ sym = (RV*)re->rule_;
+ }
+ // no rule's constructor directive
+ (*Recycled_rule)->rule_ = sym;
+ sym->rule_info__.rhs_no_of_parms__ = 0;
+
+
+ return;}
+ default: return;
+ }
+}