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
11 ///////////////////////////////////////////////////////////////////////////////
13 // Forward class definition for T
15 ///////////////////////////////////////////////////////////////////////////////
16 #ifndef datatype_T_defined
17 #define datatype_T_defined
27 ///////////////////////////////////////////////////////////////////////////////
29 // Base class for datatype T
31 ///////////////////////////////////////////////////////////////////////////////
39 const Tag_T tag__
; // variant tag
41 inline a_T(Tag_T t__
) : tag__(t__
) {}
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
{
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
{
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
)
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_
; }
106 extern void _T_6co_X1_rewrite(T
& );
107 _T_6co_X1_rewrite(e
);
113 class _T_6co_X1
: public BURS
{
115 _T_6co_X1(const _T_6co_X1
&); // no copy constructor
116 void operator = (const _T_6co_X1
&); // no assignment
118 struct _T_6co_X1_StateRec
* stack__
, * stack_top__
;
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); }
126 inline _T_6co_X1() {}
128 void _T_6co_X1_rewrite(T
& _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
141 static const char * _T_6co_X1_file_name
= "T6.pcc";
144 static const TreeTables::ShortState _T_6co_X1_theta_4
[3][3] = {
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)
168 inline void _T_6co_X1::labeler(Quark redex
,int& s__
,int)
175 void _T_6co_X1::labeler (T
& redex
, int& s__
, int r__
)
181 labeler(_g(redex
)->g
, s0__
, r__
);
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__
]];
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;
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__
; }
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__
; }
215 { redex
= DEBUG__T_6co_X1(_f(redex
)->_2
,redex
,_T_6co_X1_file_name
,8,"f (c, X): ...");
216 r__
= 1; goto replacement__
; }
223 { redex
= DEBUG__T_6co_X1(a
,redex
,_T_6co_X1_file_name
,7,"f (b, X): ...");
224 r__
= 1; goto replacement__
; }
229 { redex
= DEBUG__T_6co_X1(b
,redex
,_T_6co_X1_file_name
,6,"a: ...");
230 r__
= 1; goto replacement__
; }
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
245 Adaptive matching = disabled
246 Fast string matching = disabled
247 Inline downcasts = disabled
248 --------------------------------------------------------------------------