not needed
[prop.git] / prop-src / T6.cc
blob7a882ae8be1feb5b7c49a0359c0fa614ae7f2b10
1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.4),
3 // last updated on Apr 3, 1997.
4 // The original source file is "T6.pcc".
5 ///////////////////////////////////////////////////////////////////////////////
7 #define PROP_REWRITING_USED
8 #define PROP_QUARK_USED
9 #include <propdefs.h>
10 #line 1 "T6.pcc"
11 ///////////////////////////////////////////////////////////////////////////////
13 // Forward class definition for T
15 ///////////////////////////////////////////////////////////////////////////////
16 #ifndef datatype_T_defined
17 #define datatype_T_defined
18 class a_T;
19 typedef a_T * T;
20 #endif
22 # define a (T)0
23 # define b (T)1
24 # define c (T)2
25 # define d (T)3
27 ///////////////////////////////////////////////////////////////////////////////
29 // Base class for datatype T
31 ///////////////////////////////////////////////////////////////////////////////
32 class a_T {
33 public:
34 enum Tag_T {
35 tag_f = 0, tag_g = 1
38 public:
39 const Tag_T tag__; // variant tag
40 protected:
41 inline a_T(Tag_T t__) : tag__(t__) {}
42 public:
44 inline int boxed(const a_T * x) { return (unsigned long)x >= 4; }
45 inline int untag(const a_T * x) { return boxed(x) ? x->tag__ + 4 : (int)x; }
46 ///////////////////////////////////////////////////////////////////////////////
48 // Class for datatype constructor T::f
50 ///////////////////////////////////////////////////////////////////////////////
51 class T_f : public a_T {
52 public:
53 #line 1 "T6.pcc"
54 T _1; T _2;
55 inline T_f (T x_1, T x_2)
56 : a_T(tag_f), _1(x_1), _2(x_2)
61 ///////////////////////////////////////////////////////////////////////////////
63 // Class for datatype constructor T::g
65 ///////////////////////////////////////////////////////////////////////////////
66 class T_g : public a_T {
67 public:
68 #line 1 "T6.pcc"
69 T g;
70 inline T_g (T x_g)
71 : a_T(tag_g), g(x_g)
76 ///////////////////////////////////////////////////////////////////////////////
78 // Datatype constructor functions for T
80 ///////////////////////////////////////////////////////////////////////////////
81 inline a_T * f (T x_1, T x_2)
83 return new T_f (x_1, x_2);
85 inline a_T * g (T x_g)
87 return new T_g (x_g);
89 ///////////////////////////////////////////////////////////////////////////////
91 // Downcasting functions for T
93 ///////////////////////////////////////////////////////////////////////////////
94 inline T_f * _f(const a_T * _x_) { return (T_f *)_x_; }
95 inline T_g * _g(const a_T * _x_) { return (T_g *)_x_; }
97 #line 1 "T6.pcc"
98 #line 1 "T6.pcc"
101 int main()
102 { T e;
104 #line 5 "T6.pcc"
105 #line 12 "T6.pcc"
106 extern void _T_6co_X1_rewrite(T & );
107 _T_6co_X1_rewrite(e);
108 #line 12 "T6.pcc"
109 #line 12 "T6.pcc"
112 #line 14 "T6.pcc"
113 class _T_6co_X1 : public BURS {
114 private:
115 _T_6co_X1(const _T_6co_X1&); // no copy constructor
116 void operator = (const _T_6co_X1&); // no assignment
117 public:
118 struct _T_6co_X1_StateRec * stack__, * stack_top__;
119 public:
120 void labeler(const char *, int&, int);
121 void labeler(Quark, int&, int);
122 void labeler(T & redex, int&, int);
123 inline virtual void operator () (T & redex) { int s; labeler(redex,s,0); }
124 private:
125 public:
126 inline _T_6co_X1() {}
128 void _T_6co_X1_rewrite(T & _x_)
129 { _T_6co_X1 _r_;
130 _r_(_x_);
133 ///////////////////////////////////////////////////////////////////////////////
135 // This macro can be redefined by the user for debugging
137 ///////////////////////////////////////////////////////////////////////////////
138 #ifndef DEBUG__T_6co_X1
139 #define DEBUG__T_6co_X1(repl,redex,file,line,rule) repl
140 #else
141 static const char * _T_6co_X1_file_name = "T6.pcc";
142 #endif
144 static const TreeTables::ShortState _T_6co_X1_theta_4[3][3] = {
145 { 0, 6, 10 },
146 { 5, 8, 12 },
147 { 9, 7, 11 }
151 static const TreeTables::ShortState _T_6co_X1_mu_4_0[13] = {
152 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0
156 static const TreeTables::ShortState _T_6co_X1_mu_4_1[13] = {
157 0, 0, 0, 1, 0, 0, 2, 2, 2, 0, 0, 0, 0
161 inline void _T_6co_X1::labeler(char const * redex,int& s__,int)
164 s__ = 0;
168 inline void _T_6co_X1::labeler(Quark redex,int& s__,int)
171 s__ = 0;
175 void _T_6co_X1::labeler (T & redex, int& s__, int r__)
177 replacement__:
178 if (boxed(redex)) {
179 if (redex->tag__) {
180 int s0__;
181 labeler(_g(redex)->g, s0__, r__);
182 s__ = 4;
183 } else {
184 int s0__;
185 int s1__;
186 labeler(_f(redex)->_1, s0__, r__);
187 labeler(_f(redex)->_2, s1__, r__);
188 s__ = _T_6co_X1_theta_4[_T_6co_X1_mu_4_0[s0__]][_T_6co_X1_mu_4_1[s1__]];
190 } else {
191 switch(((int)redex)) {
192 case ((int)a): { s__ = 1;} break;
193 case ((int)b): { s__ = 2;} break;
194 case ((int)c): { s__ = 3;} break;
195 default: { s__ = 0;} break;
198 switch (s__) {
199 case 10: {
200 #line 11 "T6.pcc"
201 { redex = DEBUG__T_6co_X1(f(d,g(_f(_f(redex)->_2)->_1)),redex,_T_6co_X1_file_name,11,"f (_, f (X, c)): ...");
202 r__ = 1; goto replacement__; }
203 #line 12 "T6.pcc"
204 } break;
205 case 4: {
206 #line 9 "T6.pcc"
207 { redex = DEBUG__T_6co_X1(f(c,_g(redex)->g),redex,_T_6co_X1_file_name,9,"g X: ...");
208 r__ = 1; goto replacement__; }
209 #line 10 "T6.pcc"
210 } break;
211 case 11:
212 case 9:
213 case 7: {
214 #line 8 "T6.pcc"
215 { redex = DEBUG__T_6co_X1(_f(redex)->_2,redex,_T_6co_X1_file_name,8,"f (c, X): ...");
216 r__ = 1; goto replacement__; }
217 #line 9 "T6.pcc"
218 } break;
219 case 12:
220 case 8:
221 case 5: {
222 #line 7 "T6.pcc"
223 { redex = DEBUG__T_6co_X1(a,redex,_T_6co_X1_file_name,7,"f (b, X): ...");
224 r__ = 1; goto replacement__; }
225 #line 8 "T6.pcc"
226 } break;
227 case 1: {
228 #line 6 "T6.pcc"
229 { redex = DEBUG__T_6co_X1(b,redex,_T_6co_X1_file_name,6,"a: ...");
230 r__ = 1; goto replacement__; }
231 #line 7 "T6.pcc"
232 } break;
238 ------------------------------- Statistics -------------------------------
239 Merge matching rules = yes
240 Number of DFA nodes merged = 0
241 Number of ifs generated = 0
242 Number of switches generated = 0
243 Number of labels = 0
244 Number of gotos = 0
245 Adaptive matching = disabled
246 Fast string matching = disabled
247 Inline downcasts = disabled
248 --------------------------------------------------------------------------