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 "T5.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
26 ///////////////////////////////////////////////////////////////////////////////
28 // Base class for datatype T
30 ///////////////////////////////////////////////////////////////////////////////
38 const Tag_T tag__
; // variant tag
40 inline a_T(Tag_T t__
) : tag__(t__
) {}
43 inline int boxed(const a_T
* x
) { return (unsigned long)x
>= 3; }
44 inline int untag(const a_T
* x
) { return boxed(x
) ? x
->tag__
+ 3 : (int)x
; }
45 ///////////////////////////////////////////////////////////////////////////////
47 // Class for datatype constructor T::f
49 ///////////////////////////////////////////////////////////////////////////////
50 class T_f
: public a_T
{
54 inline T_f (T x_1
, T x_2
)
55 : a_T(tag_f
), _1(x_1
), _2(x_2
)
60 ///////////////////////////////////////////////////////////////////////////////
62 // Class for datatype constructor T::g
64 ///////////////////////////////////////////////////////////////////////////////
65 class T_g
: public a_T
{
69 inline T_g (T x_1
, T x_2
)
70 : a_T(tag_g
), _1(x_1
), _2(x_2
)
75 ///////////////////////////////////////////////////////////////////////////////
77 // Datatype constructor functions for T
79 ///////////////////////////////////////////////////////////////////////////////
80 inline a_T
* f (T x_1
, T x_2
)
82 return new T_f (x_1
, x_2
);
84 inline a_T
* g (T x_1
, T x_2
)
86 return new T_g (x_1
, x_2
);
88 ///////////////////////////////////////////////////////////////////////////////
90 // Downcasting functions for T
92 ///////////////////////////////////////////////////////////////////////////////
93 inline T_f
* _f(const a_T
* _x_
) { return (T_f
*)_x_
; }
94 inline T_g
* _g(const a_T
* _x_
) { return (T_g
*)_x_
; }
105 extern void _T_5co_X1_rewrite(T
& );
106 _T_5co_X1_rewrite(e
);
112 class _T_5co_X1
: public BURS
{
114 _T_5co_X1(const _T_5co_X1
&); // no copy constructor
115 void operator = (const _T_5co_X1
&); // no assignment
117 struct _T_5co_X1_StateRec
* stack__
, * stack_top__
;
119 void labeler(const char *, int&, int);
120 void labeler(Quark
, int&, int);
121 void labeler(T
& redex
, int&, int);
122 inline virtual void operator () (T
& redex
) { int s
; labeler(redex
,s
,0); }
125 inline _T_5co_X1() {}
127 void _T_5co_X1_rewrite(T
& _x_
)
132 ///////////////////////////////////////////////////////////////////////////////
134 // This macro can be redefined by the user for debugging
136 ///////////////////////////////////////////////////////////////////////////////
137 #ifndef DEBUG__T_5co_X1
138 #define DEBUG__T_5co_X1(repl,redex,file,line,rule) repl
140 static const char * _T_5co_X1_file_name
= "T5.pcc";
143 inline void _T_5co_X1::labeler(char const * redex
,int& s__
,int)
150 inline void _T_5co_X1::labeler(Quark redex
,int& s__
,int)
157 void _T_5co_X1::labeler (T
& redex
, int& s__
, int r__
)
160 for (int topdown__
= 0; topdown__
<= 1; topdown__
++) {
166 { redex
= DEBUG__T_5co_X1(f(_g(redex
)->_1
,_g(redex
)->_2
),redex
,_T_5co_X1_file_name
,10,"g (X, Y): ...");
167 r__
= 1; goto replacement__
; }
171 if (boxed(_f(redex
)->_1
)) {} else {
172 switch ((int)_f(redex
)->_1
) {
174 if (boxed(_f(redex
)->_2
)) {} else {
175 switch ((int)_f(redex
)->_2
) {
176 case ((int)a
): {} break;
179 { redex
= DEBUG__T_5co_X1(b
,redex
,_T_5co_X1_file_name
,8,"f (a, b): ...");
180 r__
= 1; goto replacement__
; }
185 { redex
= DEBUG__T_5co_X1(c
,redex
,_T_5co_X1_file_name
,9,"f (a, c): ...");
186 r__
= 1; goto replacement__
; }
202 labeler(_g(redex
)->_1
, s0__
, r__
);
203 labeler(_g(redex
)->_2
, s1__
, r__
);
208 labeler(_f(redex
)->_1
, s0__
, r__
);
209 labeler(_f(redex
)->_2
, s1__
, r__
);
213 switch(((int)redex
)) {
214 case ((int)a
): { s__
= 0;} break;
215 case ((int)b
): { s__
= 0;} break;
216 default: { s__
= 0;} break;
224 ------------------------------- Statistics -------------------------------
225 Merge matching rules = yes
226 Number of DFA nodes merged = 15
227 Number of ifs generated = 4
228 Number of switches generated = 2
231 Adaptive matching = disabled
232 Fast string matching = disabled
233 Inline downcasts = disabled
234 --------------------------------------------------------------------------