summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lr1_tst.cpp
blob: c439ae6822feac590a07205a45112b611a863a73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/*
 File: lr1_tst.cpp
 Date and Time: Mon Oct 13 18:18:15 2014 
*/
#include "lr1_tst.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_tst;// grammar's ns
// first set terminals
fsm_rules_reuse_table_type::fsm_rules_reuse_table_type(){
 no_rules_entries_ = 13;
 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();
 per_rule_s_table_[6] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[7] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[8] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[9] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[10] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[11] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[12] =  new Per_rule_s_reuse_table();
}
  Clr1_tst_fsm::
  Clr1_tst_fsm()
    :yacco2::CAbs_fsm
      ("lr1_tst.lex"
      ,"1.0"
      ,"12 Nov. 2006"
      ,true
      ,"test out lr1 compatibility against 2 sets of reduce /reduce conflict states"
      ,"Mon Oct 13 18:18:15 2014 "
      ,S1_Clr1_tst_fsm){
    
      // test out Clr1\_tst\_fsm fsm constructor emit code
    
  }
 
Clr1_tst_fsm::~Clr1_tst_fsm(){

      // test out Clr1\_tst\_fsm fsm destructor emit code
    
  for(int x = 0;x < 13;++x){
   ///delete fsm_rules_reuse_table.per_rule_s_table_[x];
  }
} 

  bool Clr1_tst_fsm::failed(){
    
      // test out Clr1\_tst\_fsm fsm failed emit code
      return true;
    
  }
  void Clr1_tst_fsm::op(){
      // test out Clr1\_tst\_fsm fsm op emit code
    
}
int Clr1_tst_fsm::rhs_to_rules_mapping_[25] = {
 -1
 ,0 // subrule 1 for rule 1
 ,0 // subrule 2 for rule 1
 ,0 // subrule 3 for rule 1
 ,0 // subrule 4 for rule 1
 ,1 // subrule 5 for rule 2
 ,1 // subrule 6 for rule 2
 ,2 // subrule 7 for rule 3
 ,2 // subrule 8 for rule 3
 ,3 // subrule 9 for rule 4
 ,3 // subrule 10 for rule 4
 ,4 // subrule 11 for rule 5
 ,4 // subrule 12 for rule 5
 ,5 // subrule 13 for rule 6
 ,5 // subrule 14 for rule 6
 ,6 // subrule 15 for rule 7
 ,6 // subrule 16 for rule 7
 ,7 // subrule 17 for rule 8
 ,7 // subrule 18 for rule 8
 ,8 // subrule 19 for rule 9
 ,8 // subrule 20 for rule 9
 ,9 // subrule 21 for rule 10
 ,10 // subrule 22 for rule 11
 ,11 // subrule 23 for rule 12
 ,12 // subrule 24 for rule 13
}; 

      // test out Clr1\_tst\_fsm fsm user-implementation code
    
Rlr1_tst::Rlr1_tst(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rlr1_tst",&dtor_Rlr1_tst,Clr1_tst_fsm::R_Rlr1_tst_,P,false,false){
}

void Rlr1_tst::dtor_Rlr1_tst(yacco2::VOIDP This,yacco2::VOIDP P){
 Rlr1_tst* R = (Rlr1_tst*)(This);
 
      // test out Rlr1\_tst rule destructor emit code
    
}
void Rlr1_tst::op(){
  sstrace_rulesss
 
      // test out Rlr1\_tst rule op emit code
    
}
void Rlr1_tst::ctor(){
 
      // test out Rlr1\_tst rule constructor emit code
    
}

      // test out Rlr1\_tst rule user-implementation code
    
void Rlr1_tst::sr1(){
  
        // test out subrule u RAabBab eog op emit code
      
}

RAabBab::RAabBab(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RAabBab",0,Clr1_tst_fsm::R_RAabBab_,P,false,false){
}

RAbaBab::RAbaBab(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RAbaBab",0,Clr1_tst_fsm::R_RAbaBab_,P,false,false){
}

RAabBba::RAabBba(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RAabBba",0,Clr1_tst_fsm::R_RAabBba_,P,false,false){
}

RAbaBba::RAbaBba(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RAbaBba",0,Clr1_tst_fsm::R_RAbaBba_,P,false,false){
}

RAab::RAab(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RAab",0,Clr1_tst_fsm::R_RAab_,P,false,false){
}

RAba::RAba(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RAba",0,Clr1_tst_fsm::R_RAba_,P,false,false){
}

RBab::RBab(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RBab",0,Clr1_tst_fsm::R_RBab_,P,false,false){
}

RBba::RBba(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RBba",0,Clr1_tst_fsm::R_RBba_,P,false,false){
}

RA1::RA1(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RA1",0,Clr1_tst_fsm::R_RA1_,P,false,false){
}

RA2::RA2(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RA2",0,Clr1_tst_fsm::R_RA2_,P,false,false){
}

RB1::RB1(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RB1",0,Clr1_tst_fsm::R_RB1_,P,false,false){
}

RB2::RB2(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RB2",0,Clr1_tst_fsm::R_RB2_,P,false,false){
}