1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.4),
3 // last updated on Apr 4, 1997.
4 // The original source file is "T4.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
25 ///////////////////////////////////////////////////////////////////////////////
27 // Class for datatype constructor T::f
29 ///////////////////////////////////////////////////////////////////////////////
30 class a_T
: public TermObj
{
34 inline a_T (T x_1
, T x_2
)
39 inline int boxed(const a_T
* x
) { return (unsigned long)x
>= 2; }
40 inline int untag(const a_T
* x
) { return boxed(x
) ? 3 : (int)x
; }
41 ///////////////////////////////////////////////////////////////////////////////
43 // Datatype constructor functions for T
45 ///////////////////////////////////////////////////////////////////////////////
46 inline a_T
* f (T x_1
, T x_2
)
48 return new a_T (x_1
, x_2
);
50 ///////////////////////////////////////////////////////////////////////////////
52 // Downcasting functions for T
54 ///////////////////////////////////////////////////////////////////////////////
66 extern void _T_4co_X1_rewrite(T
& );
73 class _T_4co_X1
: public BURS
{
75 _T_4co_X1(const _T_4co_X1
&); // no copy constructor
76 void operator = (const _T_4co_X1
&); // no assignment
78 struct _T_4co_X1_StateRec
* stack__
, * stack_top__
;
80 void labeler(const char *, int&, int);
81 void labeler(Quark
, int&, int);
82 void labeler(T
& redex
, int&, int);
83 inline virtual void operator () (T
& redex
) { int s
; labeler(redex
,s
,0); }
88 void _T_4co_X1_rewrite(T
& _x_
)
93 ///////////////////////////////////////////////////////////////////////////////
95 // This macro can be redefined by the user for debugging
97 ///////////////////////////////////////////////////////////////////////////////
98 #ifndef DEBUG__T_4co_X1
99 #define DEBUG__T_4co_X1(repl,redex,file,line,rule) repl
101 static const char * _T_4co_X1_file_name
= "T4.pcc";
104 static const TreeTables::ShortState _T_4co_X1_theta_2
[3][3] = {
111 static const TreeTables::ShortState _T_4co_X1_mu_2_0
[8] = {
112 0, 1, 2, 0, 0, 0, 0, 0
116 static const TreeTables::ShortState _T_4co_X1_mu_2_1
[8] = {
117 0, 1, 2, 0, 0, 0, 0, 0
121 inline void _T_4co_X1::labeler(char const * redex
,int& s__
,int)
128 inline void _T_4co_X1::labeler(Quark redex
,int& s__
,int)
135 void _T_4co_X1::labeler (T
& redex
, int& s__
, int r__
)
139 if (r__
&& boxed(redex
) && (cached__
= redex
->get_rewrite_state()) != BURS::undefined_state
)
140 { s__
= cached__
; return; }
144 labeler(redex
->_1
, s0__
, r__
);
145 labeler(redex
->_2
, s1__
, r__
);
146 s__
= _T_4co_X1_theta_2
[_T_4co_X1_mu_2_0
[s0__
]][_T_4co_X1_mu_2_1
[s1__
]];
148 if (((int)redex
)) {s__
= 2;
156 { redex
= DEBUG__T_4co_X1(repl__
,redex
,_T_4co_X1_file_name
,9,"f (X, a): ...");
157 r__
= 1; goto replacement__
; }
163 { redex
= DEBUG__T_4co_X1(repl__
,redex
,_T_4co_X1_file_name
,8,"f (a, a): ...");
164 r__
= 1; goto replacement__
; }
170 { redex
= DEBUG__T_4co_X1(redex
->_2
,redex
,_T_4co_X1_file_name
,7,"f (b, X): ...");
171 r__
= 1; goto replacement__
; }
176 { redex
= DEBUG__T_4co_X1(b
,redex
,_T_4co_X1_file_name
,6,"f (a, b): ...");
177 r__
= 1; goto replacement__
; }
182 redex
->set_rewrite_state(s__
);
188 ------------------------------- Statistics -------------------------------
189 Merge matching rules = yes
190 Number of DFA nodes merged = 0
191 Number of ifs generated = 0
192 Number of switches generated = 0
195 Adaptive matching = disabled
196 Fast string matching = disabled
197 Inline downcasts = disabled
198 --------------------------------------------------------------------------