gcc config
[prop.git] / prop-src / T4.cc
blob4ac6d0b15835f8f47780c9d176680dc8fa8ddd5c
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
9 #include <propdefs.h>
10 #line 1 "T4.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
25 ///////////////////////////////////////////////////////////////////////////////
27 // Class for datatype constructor T::f
29 ///////////////////////////////////////////////////////////////////////////////
30 class a_T : public TermObj {
31 public:
32 #line 1 "T4.pcc"
33 T _1; T _2;
34 inline a_T (T x_1, T x_2)
35 : _1(x_1), _2(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 ///////////////////////////////////////////////////////////////////////////////
57 #line 1 "T4.pcc"
58 #line 1 "T4.pcc"
61 T foo(T e)
64 #line 5 "T4.pcc"
65 #line 10 "T4.pcc"
66 extern void _T_4co_X1_rewrite(T & );
67 _T_4co_X1_rewrite(e);
68 #line 10 "T4.pcc"
69 #line 10 "T4.pcc"
72 #line 12 "T4.pcc"
73 class _T_4co_X1 : public BURS {
74 private:
75 _T_4co_X1(const _T_4co_X1&); // no copy constructor
76 void operator = (const _T_4co_X1&); // no assignment
77 public:
78 struct _T_4co_X1_StateRec * stack__, * stack_top__;
79 public:
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); }
84 private:
85 public:
86 inline _T_4co_X1() {}
88 void _T_4co_X1_rewrite(T & _x_)
89 { _T_4co_X1 _r_;
90 _r_(_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
100 #else
101 static const char * _T_4co_X1_file_name = "T4.pcc";
102 #endif
104 static const TreeTables::ShortState _T_4co_X1_theta_2[3][3] = {
105 { 0, 3, 0 },
106 { 0, 4, 6 },
107 { 5, 7, 5 }
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)
124 s__ = 0;
128 inline void _T_4co_X1::labeler(Quark redex,int& s__,int)
131 s__ = 0;
135 void _T_4co_X1::labeler (T & redex, int& s__, int r__)
137 replacement__:
138 int cached__;
139 if (r__ && boxed(redex) && (cached__ = redex->get_rewrite_state()) != BURS::undefined_state)
140 { s__ = cached__; return; }
141 if (boxed(redex)) {
142 int s0__;
143 int s1__;
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__]];
147 } else {
148 if (((int)redex)) {s__ = 2;
149 } else {s__ = 1;
152 switch (s__) {
153 case 3: {
154 #line 9 "T4.pcc"
155 T repl__ = a;
156 { redex = DEBUG__T_4co_X1(repl__,redex,_T_4co_X1_file_name,9,"f (X, a): ...");
157 r__ = 1; goto replacement__; }
158 #line 10 "T4.pcc"
159 } break;
160 case 4: {
161 #line 8 "T4.pcc"
162 T repl__ = b;
163 { redex = DEBUG__T_4co_X1(repl__,redex,_T_4co_X1_file_name,8,"f (a, a): ...");
164 r__ = 1; goto replacement__; }
165 #line 9 "T4.pcc"
166 } break;
167 case 7:
168 case 5: {
169 #line 7 "T4.pcc"
170 { redex = DEBUG__T_4co_X1(redex->_2,redex,_T_4co_X1_file_name,7,"f (b, X): ...");
171 r__ = 1; goto replacement__; }
172 #line 8 "T4.pcc"
173 } break;
174 case 6: {
175 #line 6 "T4.pcc"
176 { redex = DEBUG__T_4co_X1(b,redex,_T_4co_X1_file_name,6,"f (a, b): ...");
177 r__ = 1; goto replacement__; }
178 #line 7 "T4.pcc"
179 } break;
181 if (boxed(redex)) {
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
193 Number of labels = 0
194 Number of gotos = 0
195 Adaptive matching = disabled
196 Fast string matching = disabled
197 Inline downcasts = disabled
198 --------------------------------------------------------------------------