diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Parser.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Parser.cs | 8914 |
1 files changed, 4457 insertions, 4457 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Parser.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Parser.cs index 7ef5c51..a21a471 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Parser.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Parser.cs | |||
@@ -1,4457 +1,4457 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2007-2008, Jeff Thompson | 2 | * Copyright (C) 2007-2008, Jeff Thompson |
3 | * | 3 | * |
4 | * All rights reserved. | 4 | * All rights reserved. |
5 | * | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions are met: | 7 | * modification, are permitted provided that the following conditions are met: |
8 | * | 8 | * |
9 | * * Redistributions of source code must retain the above copyright | 9 | * * Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. |
11 | * * Redistributions in binary form must reproduce the above copyright | 11 | * * Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. |
14 | * * Neither the name of the copyright holder nor the names of its contributors | 14 | * * Neither the name of the copyright holder nor the names of its contributors |
15 | * may be used to endorse or promote products derived from this software | 15 | * may be used to endorse or promote products derived from this software |
16 | * without specific prior written permission. | 16 | * without specific prior written permission. |
17 | * | 17 | * |
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
22 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 22 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
23 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 23 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
24 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 24 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
25 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | 25 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
26 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | 26 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
27 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 27 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | using System; | 31 | using System; |
32 | using System.Collections.Generic; | 32 | using System.Collections.Generic; |
33 | 33 | ||
34 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | 34 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog |
35 | { | 35 | { |
36 | public class Parser | 36 | public class Parser |
37 | { | 37 | { |
38 | public static IEnumerable<bool> formatError(object Output, object Format, object Arguments) | 38 | public static IEnumerable<bool> formatError(object Output, object Format, object Arguments) |
39 | { | 39 | { |
40 | // Debug: Simple implementation for now. | 40 | // Debug: Simple implementation for now. |
41 | YP.write(Format); | 41 | YP.write(Format); |
42 | YP.write(Arguments); | 42 | YP.write(Arguments); |
43 | YP.nl(); | 43 | YP.nl(); |
44 | yield return false; | 44 | yield return false; |
45 | } | 45 | } |
46 | 46 | ||
47 | // Debug: Hand-modify this central predicate to do tail recursion. | 47 | // Debug: Hand-modify this central predicate to do tail recursion. |
48 | public static IEnumerable<bool> read_tokens(object arg1, object arg2, object arg3) | 48 | public static IEnumerable<bool> read_tokens(object arg1, object arg2, object arg3) |
49 | { | 49 | { |
50 | bool repeat = true; | 50 | bool repeat = true; |
51 | while (repeat) | 51 | while (repeat) |
52 | { | 52 | { |
53 | repeat = false; | 53 | repeat = false; |
54 | { | 54 | { |
55 | object C1 = arg1; | 55 | object C1 = arg1; |
56 | object Dict = arg2; | 56 | object Dict = arg2; |
57 | object Tokens = arg3; | 57 | object Tokens = arg3; |
58 | Variable C2 = new Variable(); | 58 | Variable C2 = new Variable(); |
59 | if (YP.lessThanOrEqual(C1, new ListPair(32, Atom.NIL))) | 59 | if (YP.lessThanOrEqual(C1, new ListPair(32, Atom.NIL))) |
60 | { | 60 | { |
61 | if (YP.greaterThanOrEqual(C1, 0)) | 61 | if (YP.greaterThanOrEqual(C1, 0)) |
62 | { | 62 | { |
63 | foreach (bool l4 in YP.get_code(C2)) | 63 | foreach (bool l4 in YP.get_code(C2)) |
64 | { | 64 | { |
65 | #if false | 65 | #if false |
66 | foreach (bool l5 in read_tokens(C2, Dict, Tokens)) | 66 | foreach (bool l5 in read_tokens(C2, Dict, Tokens)) |
67 | { | 67 | { |
68 | yield return false; | 68 | yield return false; |
69 | } | 69 | } |
70 | #endif | 70 | #endif |
71 | arg1 = YP.getValue(C2); | 71 | arg1 = YP.getValue(C2); |
72 | arg2 = YP.getValue(Dict); | 72 | arg2 = YP.getValue(Dict); |
73 | arg3 = YP.getValue(Tokens); | 73 | arg3 = YP.getValue(Tokens); |
74 | repeat = true; | 74 | repeat = true; |
75 | } | 75 | } |
76 | } | 76 | } |
77 | goto cutIf1; | 77 | goto cutIf1; |
78 | } | 78 | } |
79 | if (YP.greaterThanOrEqual(C1, new ListPair(97, Atom.NIL))) | 79 | if (YP.greaterThanOrEqual(C1, new ListPair(97, Atom.NIL))) |
80 | { | 80 | { |
81 | if (YP.lessThanOrEqual(C1, new ListPair(122, Atom.NIL))) | 81 | if (YP.lessThanOrEqual(C1, new ListPair(122, Atom.NIL))) |
82 | { | 82 | { |
83 | foreach (bool l4 in read_identifier(C1, Dict, Tokens)) | 83 | foreach (bool l4 in read_identifier(C1, Dict, Tokens)) |
84 | { | 84 | { |
85 | yield return false; | 85 | yield return false; |
86 | } | 86 | } |
87 | goto cutIf2; | 87 | goto cutIf2; |
88 | } | 88 | } |
89 | } | 89 | } |
90 | if (YP.greaterThanOrEqual(C1, new ListPair(65, Atom.NIL))) | 90 | if (YP.greaterThanOrEqual(C1, new ListPair(65, Atom.NIL))) |
91 | { | 91 | { |
92 | if (YP.lessThanOrEqual(C1, new ListPair(90, Atom.NIL))) | 92 | if (YP.lessThanOrEqual(C1, new ListPair(90, Atom.NIL))) |
93 | { | 93 | { |
94 | foreach (bool l4 in read_variable(C1, Dict, Tokens)) | 94 | foreach (bool l4 in read_variable(C1, Dict, Tokens)) |
95 | { | 95 | { |
96 | yield return false; | 96 | yield return false; |
97 | } | 97 | } |
98 | goto cutIf3; | 98 | goto cutIf3; |
99 | } | 99 | } |
100 | } | 100 | } |
101 | if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL))) | 101 | if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL))) |
102 | { | 102 | { |
103 | if (YP.lessThanOrEqual(C1, new ListPair(57, Atom.NIL))) | 103 | if (YP.lessThanOrEqual(C1, new ListPair(57, Atom.NIL))) |
104 | { | 104 | { |
105 | foreach (bool l4 in read_number(C1, Dict, Tokens)) | 105 | foreach (bool l4 in read_number(C1, Dict, Tokens)) |
106 | { | 106 | { |
107 | yield return false; | 107 | yield return false; |
108 | } | 108 | } |
109 | goto cutIf4; | 109 | goto cutIf4; |
110 | } | 110 | } |
111 | } | 111 | } |
112 | if (YP.lessThan(C1, 127)) | 112 | if (YP.lessThan(C1, 127)) |
113 | { | 113 | { |
114 | foreach (bool l3 in read_special(C1, Dict, Tokens)) | 114 | foreach (bool l3 in read_special(C1, Dict, Tokens)) |
115 | { | 115 | { |
116 | yield return false; | 116 | yield return false; |
117 | } | 117 | } |
118 | goto cutIf5; | 118 | goto cutIf5; |
119 | } | 119 | } |
120 | if (YP.lessThanOrEqual(C1, 160)) | 120 | if (YP.lessThanOrEqual(C1, 160)) |
121 | { | 121 | { |
122 | foreach (bool l3 in YP.get_code(C2)) | 122 | foreach (bool l3 in YP.get_code(C2)) |
123 | { | 123 | { |
124 | #if false | 124 | #if false |
125 | foreach (bool l4 in read_tokens(C2, Dict, Tokens)) | 125 | foreach (bool l4 in read_tokens(C2, Dict, Tokens)) |
126 | { | 126 | { |
127 | yield return false; | 127 | yield return false; |
128 | } | 128 | } |
129 | #endif | 129 | #endif |
130 | arg1 = YP.getValue(C2); | 130 | arg1 = YP.getValue(C2); |
131 | arg2 = YP.getValue(Dict); | 131 | arg2 = YP.getValue(Dict); |
132 | arg3 = YP.getValue(Tokens); | 132 | arg3 = YP.getValue(Tokens); |
133 | repeat = true; | 133 | repeat = true; |
134 | } | 134 | } |
135 | goto cutIf6; | 135 | goto cutIf6; |
136 | } | 136 | } |
137 | if (YP.greaterThanOrEqual(C1, 223)) | 137 | if (YP.greaterThanOrEqual(C1, 223)) |
138 | { | 138 | { |
139 | if (YP.notEqual(C1, 247)) | 139 | if (YP.notEqual(C1, 247)) |
140 | { | 140 | { |
141 | foreach (bool l4 in read_identifier(C1, Dict, Tokens)) | 141 | foreach (bool l4 in read_identifier(C1, Dict, Tokens)) |
142 | { | 142 | { |
143 | yield return false; | 143 | yield return false; |
144 | } | 144 | } |
145 | goto cutIf7; | 145 | goto cutIf7; |
146 | } | 146 | } |
147 | } | 147 | } |
148 | if (YP.greaterThanOrEqual(C1, 192)) | 148 | if (YP.greaterThanOrEqual(C1, 192)) |
149 | { | 149 | { |
150 | if (YP.notEqual(C1, 215)) | 150 | if (YP.notEqual(C1, 215)) |
151 | { | 151 | { |
152 | foreach (bool l4 in read_variable(C1, Dict, Tokens)) | 152 | foreach (bool l4 in read_variable(C1, Dict, Tokens)) |
153 | { | 153 | { |
154 | yield return false; | 154 | yield return false; |
155 | } | 155 | } |
156 | goto cutIf8; | 156 | goto cutIf8; |
157 | } | 157 | } |
158 | } | 158 | } |
159 | if (YP.notEqual(C1, 170)) | 159 | if (YP.notEqual(C1, 170)) |
160 | { | 160 | { |
161 | if (YP.notEqual(C1, 186)) | 161 | if (YP.notEqual(C1, 186)) |
162 | { | 162 | { |
163 | foreach (bool l4 in read_symbol(C1, Dict, Tokens)) | 163 | foreach (bool l4 in read_symbol(C1, Dict, Tokens)) |
164 | { | 164 | { |
165 | yield return false; | 165 | yield return false; |
166 | } | 166 | } |
167 | goto cutIf9; | 167 | goto cutIf9; |
168 | } | 168 | } |
169 | } | 169 | } |
170 | foreach (bool l2 in read_identifier(C1, Dict, Tokens)) | 170 | foreach (bool l2 in read_identifier(C1, Dict, Tokens)) |
171 | { | 171 | { |
172 | yield return false; | 172 | yield return false; |
173 | } | 173 | } |
174 | cutIf9: | 174 | cutIf9: |
175 | cutIf8: | 175 | cutIf8: |
176 | cutIf7: | 176 | cutIf7: |
177 | cutIf6: | 177 | cutIf6: |
178 | cutIf5: | 178 | cutIf5: |
179 | cutIf4: | 179 | cutIf4: |
180 | cutIf3: | 180 | cutIf3: |
181 | cutIf2: | 181 | cutIf2: |
182 | cutIf1: | 182 | cutIf1: |
183 | { } | 183 | { } |
184 | } | 184 | } |
185 | } | 185 | } |
186 | } | 186 | } |
187 | 187 | ||
188 | // Compiler output follows. | 188 | // Compiler output follows. |
189 | 189 | ||
190 | class YPInnerClass { } | 190 | class YPInnerClass { } |
191 | static Type getDeclaringClass() { return typeof(YPInnerClass).DeclaringType; } | 191 | static Type getDeclaringClass() { return typeof(YPInnerClass).DeclaringType; } |
192 | 192 | ||
193 | public static IEnumerable<bool> parseInput(object TermList) | 193 | public static IEnumerable<bool> parseInput(object TermList) |
194 | { | 194 | { |
195 | { | 195 | { |
196 | Variable TermAndVariables = new Variable(); | 196 | Variable TermAndVariables = new Variable(); |
197 | FindallAnswers findallAnswers1 = new FindallAnswers(TermAndVariables); | 197 | FindallAnswers findallAnswers1 = new FindallAnswers(TermAndVariables); |
198 | foreach (bool l2 in parseInputHelper(TermAndVariables)) | 198 | foreach (bool l2 in parseInputHelper(TermAndVariables)) |
199 | { | 199 | { |
200 | findallAnswers1.add(); | 200 | findallAnswers1.add(); |
201 | } | 201 | } |
202 | foreach (bool l2 in findallAnswers1.result(TermList)) | 202 | foreach (bool l2 in findallAnswers1.result(TermList)) |
203 | { | 203 | { |
204 | yield return false; | 204 | yield return false; |
205 | } | 205 | } |
206 | } | 206 | } |
207 | } | 207 | } |
208 | 208 | ||
209 | public static IEnumerable<bool> parseInputHelper(object arg1) | 209 | public static IEnumerable<bool> parseInputHelper(object arg1) |
210 | { | 210 | { |
211 | { | 211 | { |
212 | Variable Term = new Variable(); | 212 | Variable Term = new Variable(); |
213 | Variable Variables = new Variable(); | 213 | Variable Variables = new Variable(); |
214 | Variable Answer = new Variable(); | 214 | Variable Answer = new Variable(); |
215 | Variable x4 = new Variable(); | 215 | Variable x4 = new Variable(); |
216 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"f", Term, Variables))) | 216 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"f", Term, Variables))) |
217 | { | 217 | { |
218 | foreach (bool l3 in YP.repeat()) | 218 | foreach (bool l3 in YP.repeat()) |
219 | { | 219 | { |
220 | foreach (bool l4 in portable_read3(Answer, Variables, x4)) | 220 | foreach (bool l4 in portable_read3(Answer, Variables, x4)) |
221 | { | 221 | { |
222 | foreach (bool l5 in remove_pos(Answer, Term)) | 222 | foreach (bool l5 in remove_pos(Answer, Term)) |
223 | { | 223 | { |
224 | if (YP.termEqual(Term, Atom.a(@"end_of_file"))) | 224 | if (YP.termEqual(Term, Atom.a(@"end_of_file"))) |
225 | { | 225 | { |
226 | yield break; | 226 | yield break; |
227 | goto cutIf1; | 227 | goto cutIf1; |
228 | } | 228 | } |
229 | yield return false; | 229 | yield return false; |
230 | cutIf1: | 230 | cutIf1: |
231 | { } | 231 | { } |
232 | } | 232 | } |
233 | } | 233 | } |
234 | } | 234 | } |
235 | } | 235 | } |
236 | } | 236 | } |
237 | } | 237 | } |
238 | 238 | ||
239 | public static IEnumerable<bool> clear_errors() | 239 | public static IEnumerable<bool> clear_errors() |
240 | { | 240 | { |
241 | { | 241 | { |
242 | yield return false; | 242 | yield return false; |
243 | } | 243 | } |
244 | } | 244 | } |
245 | 245 | ||
246 | public static IEnumerable<bool> remove_pos(object arg1, object arg2) | 246 | public static IEnumerable<bool> remove_pos(object arg1, object arg2) |
247 | { | 247 | { |
248 | { | 248 | { |
249 | Variable X = new Variable(); | 249 | Variable X = new Variable(); |
250 | foreach (bool l2 in YP.unify(arg1, X)) | 250 | foreach (bool l2 in YP.unify(arg1, X)) |
251 | { | 251 | { |
252 | foreach (bool l3 in YP.unify(arg2, X)) | 252 | foreach (bool l3 in YP.unify(arg2, X)) |
253 | { | 253 | { |
254 | if (YP.var(X)) | 254 | if (YP.var(X)) |
255 | { | 255 | { |
256 | yield return true; | 256 | yield return true; |
257 | yield break; | 257 | yield break; |
258 | } | 258 | } |
259 | } | 259 | } |
260 | } | 260 | } |
261 | } | 261 | } |
262 | { | 262 | { |
263 | object X = arg2; | 263 | object X = arg2; |
264 | Variable _Pos = new Variable(); | 264 | Variable _Pos = new Variable(); |
265 | Variable _Name = new Variable(); | 265 | Variable _Name = new Variable(); |
266 | foreach (bool l2 in YP.unify(arg1, new Functor3(@"$VAR", _Pos, _Name, X))) | 266 | foreach (bool l2 in YP.unify(arg1, new Functor3(@"$VAR", _Pos, _Name, X))) |
267 | { | 267 | { |
268 | if (YP.var(X)) | 268 | if (YP.var(X)) |
269 | { | 269 | { |
270 | yield return true; | 270 | yield return true; |
271 | yield break; | 271 | yield break; |
272 | } | 272 | } |
273 | } | 273 | } |
274 | } | 274 | } |
275 | { | 275 | { |
276 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 276 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
277 | { | 277 | { |
278 | foreach (bool l3 in YP.unify(arg2, Atom.NIL)) | 278 | foreach (bool l3 in YP.unify(arg2, Atom.NIL)) |
279 | { | 279 | { |
280 | yield return true; | 280 | yield return true; |
281 | yield break; | 281 | yield break; |
282 | } | 282 | } |
283 | } | 283 | } |
284 | } | 284 | } |
285 | { | 285 | { |
286 | Variable H = new Variable(); | 286 | Variable H = new Variable(); |
287 | Variable T = new Variable(); | 287 | Variable T = new Variable(); |
288 | Variable NH = new Variable(); | 288 | Variable NH = new Variable(); |
289 | Variable NT = new Variable(); | 289 | Variable NT = new Variable(); |
290 | foreach (bool l2 in YP.unify(arg1, new ListPair(H, T))) | 290 | foreach (bool l2 in YP.unify(arg1, new ListPair(H, T))) |
291 | { | 291 | { |
292 | foreach (bool l3 in YP.unify(arg2, new ListPair(NH, NT))) | 292 | foreach (bool l3 in YP.unify(arg2, new ListPair(NH, NT))) |
293 | { | 293 | { |
294 | foreach (bool l4 in remove_pos(H, NH)) | 294 | foreach (bool l4 in remove_pos(H, NH)) |
295 | { | 295 | { |
296 | foreach (bool l5 in remove_pos(T, NT)) | 296 | foreach (bool l5 in remove_pos(T, NT)) |
297 | { | 297 | { |
298 | yield return false; | 298 | yield return false; |
299 | } | 299 | } |
300 | } | 300 | } |
301 | yield break; | 301 | yield break; |
302 | } | 302 | } |
303 | } | 303 | } |
304 | } | 304 | } |
305 | { | 305 | { |
306 | Variable A = new Variable(); | 306 | Variable A = new Variable(); |
307 | Variable B = new Variable(); | 307 | Variable B = new Variable(); |
308 | Variable NA = new Variable(); | 308 | Variable NA = new Variable(); |
309 | Variable NB = new Variable(); | 309 | Variable NB = new Variable(); |
310 | foreach (bool l2 in YP.unify(arg1, new Functor2(@",", A, B))) | 310 | foreach (bool l2 in YP.unify(arg1, new Functor2(@",", A, B))) |
311 | { | 311 | { |
312 | foreach (bool l3 in YP.unify(arg2, new Functor2(@",", NA, NB))) | 312 | foreach (bool l3 in YP.unify(arg2, new Functor2(@",", NA, NB))) |
313 | { | 313 | { |
314 | foreach (bool l4 in remove_pos(A, NA)) | 314 | foreach (bool l4 in remove_pos(A, NA)) |
315 | { | 315 | { |
316 | foreach (bool l5 in remove_pos(B, NB)) | 316 | foreach (bool l5 in remove_pos(B, NB)) |
317 | { | 317 | { |
318 | yield return false; | 318 | yield return false; |
319 | } | 319 | } |
320 | } | 320 | } |
321 | yield break; | 321 | yield break; |
322 | } | 322 | } |
323 | } | 323 | } |
324 | } | 324 | } |
325 | { | 325 | { |
326 | Variable Atom_1 = new Variable(); | 326 | Variable Atom_1 = new Variable(); |
327 | Variable _F = new Variable(); | 327 | Variable _F = new Variable(); |
328 | foreach (bool l2 in YP.unify(arg1, Atom_1)) | 328 | foreach (bool l2 in YP.unify(arg1, Atom_1)) |
329 | { | 329 | { |
330 | foreach (bool l3 in YP.unify(arg2, Atom_1)) | 330 | foreach (bool l3 in YP.unify(arg2, Atom_1)) |
331 | { | 331 | { |
332 | foreach (bool l4 in YP.functor(Atom_1, _F, 0)) | 332 | foreach (bool l4 in YP.functor(Atom_1, _F, 0)) |
333 | { | 333 | { |
334 | yield return false; | 334 | yield return false; |
335 | } | 335 | } |
336 | } | 336 | } |
337 | } | 337 | } |
338 | } | 338 | } |
339 | { | 339 | { |
340 | object Term = arg1; | 340 | object Term = arg1; |
341 | object NewTerm = arg2; | 341 | object NewTerm = arg2; |
342 | Variable Func = new Variable(); | 342 | Variable Func = new Variable(); |
343 | Variable _Pos = new Variable(); | 343 | Variable _Pos = new Variable(); |
344 | Variable Args = new Variable(); | 344 | Variable Args = new Variable(); |
345 | Variable NArgs = new Variable(); | 345 | Variable NArgs = new Variable(); |
346 | if (YP.nonvar(Term)) | 346 | if (YP.nonvar(Term)) |
347 | { | 347 | { |
348 | foreach (bool l3 in YP.univ(Term, new ListPair(Func, new ListPair(_Pos, Args)))) | 348 | foreach (bool l3 in YP.univ(Term, new ListPair(Func, new ListPair(_Pos, Args)))) |
349 | { | 349 | { |
350 | foreach (bool l4 in remove_pos(Args, NArgs)) | 350 | foreach (bool l4 in remove_pos(Args, NArgs)) |
351 | { | 351 | { |
352 | foreach (bool l5 in YP.univ(NewTerm, new ListPair(Func, NArgs))) | 352 | foreach (bool l5 in YP.univ(NewTerm, new ListPair(Func, NArgs))) |
353 | { | 353 | { |
354 | yield return false; | 354 | yield return false; |
355 | } | 355 | } |
356 | } | 356 | } |
357 | } | 357 | } |
358 | } | 358 | } |
359 | } | 359 | } |
360 | } | 360 | } |
361 | 361 | ||
362 | public static IEnumerable<bool> portable_read_position(object Term, object PosTerm, object Syntax) | 362 | public static IEnumerable<bool> portable_read_position(object Term, object PosTerm, object Syntax) |
363 | { | 363 | { |
364 | { | 364 | { |
365 | foreach (bool l2 in portable_read(PosTerm, Syntax)) | 365 | foreach (bool l2 in portable_read(PosTerm, Syntax)) |
366 | { | 366 | { |
367 | foreach (bool l3 in remove_pos(PosTerm, Term)) | 367 | foreach (bool l3 in remove_pos(PosTerm, Term)) |
368 | { | 368 | { |
369 | yield return false; | 369 | yield return false; |
370 | } | 370 | } |
371 | } | 371 | } |
372 | } | 372 | } |
373 | } | 373 | } |
374 | 374 | ||
375 | public static IEnumerable<bool> portable_read(object Answer, object Syntax) | 375 | public static IEnumerable<bool> portable_read(object Answer, object Syntax) |
376 | { | 376 | { |
377 | { | 377 | { |
378 | Variable Tokens = new Variable(); | 378 | Variable Tokens = new Variable(); |
379 | Variable ParseTokens = new Variable(); | 379 | Variable ParseTokens = new Variable(); |
380 | foreach (bool l2 in read_tokens1(Tokens)) | 380 | foreach (bool l2 in read_tokens1(Tokens)) |
381 | { | 381 | { |
382 | foreach (bool l3 in remove_comments(Tokens, ParseTokens, Syntax)) | 382 | foreach (bool l3 in remove_comments(Tokens, ParseTokens, Syntax)) |
383 | { | 383 | { |
384 | foreach (bool l4 in parse2(ParseTokens, Answer)) | 384 | foreach (bool l4 in parse2(ParseTokens, Answer)) |
385 | { | 385 | { |
386 | yield return false; | 386 | yield return false; |
387 | } | 387 | } |
388 | } | 388 | } |
389 | } | 389 | } |
390 | } | 390 | } |
391 | } | 391 | } |
392 | 392 | ||
393 | public static IEnumerable<bool> portable_read3(object Answer, object Variables, object Syntax) | 393 | public static IEnumerable<bool> portable_read3(object Answer, object Variables, object Syntax) |
394 | { | 394 | { |
395 | { | 395 | { |
396 | Variable Tokens = new Variable(); | 396 | Variable Tokens = new Variable(); |
397 | Variable ParseTokens = new Variable(); | 397 | Variable ParseTokens = new Variable(); |
398 | foreach (bool l2 in read_tokens2(Tokens, Variables)) | 398 | foreach (bool l2 in read_tokens2(Tokens, Variables)) |
399 | { | 399 | { |
400 | foreach (bool l3 in remove_comments(Tokens, ParseTokens, Syntax)) | 400 | foreach (bool l3 in remove_comments(Tokens, ParseTokens, Syntax)) |
401 | { | 401 | { |
402 | foreach (bool l4 in parse2(ParseTokens, Answer)) | 402 | foreach (bool l4 in parse2(ParseTokens, Answer)) |
403 | { | 403 | { |
404 | yield return false; | 404 | yield return false; |
405 | } | 405 | } |
406 | } | 406 | } |
407 | } | 407 | } |
408 | } | 408 | } |
409 | } | 409 | } |
410 | 410 | ||
411 | public static IEnumerable<bool> remove_comments(object arg1, object arg2, object arg3) | 411 | public static IEnumerable<bool> remove_comments(object arg1, object arg2, object arg3) |
412 | { | 412 | { |
413 | { | 413 | { |
414 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 414 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
415 | { | 415 | { |
416 | foreach (bool l3 in YP.unify(arg2, Atom.NIL)) | 416 | foreach (bool l3 in YP.unify(arg2, Atom.NIL)) |
417 | { | 417 | { |
418 | foreach (bool l4 in YP.unify(arg3, Atom.NIL)) | 418 | foreach (bool l4 in YP.unify(arg3, Atom.NIL)) |
419 | { | 419 | { |
420 | yield return false; | 420 | yield return false; |
421 | } | 421 | } |
422 | } | 422 | } |
423 | } | 423 | } |
424 | } | 424 | } |
425 | { | 425 | { |
426 | object Ys = arg2; | 426 | object Ys = arg2; |
427 | Variable S = new Variable(); | 427 | Variable S = new Variable(); |
428 | Variable E = new Variable(); | 428 | Variable E = new Variable(); |
429 | Variable Xs = new Variable(); | 429 | Variable Xs = new Variable(); |
430 | Variable Zs = new Variable(); | 430 | Variable Zs = new Variable(); |
431 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"comment", S, E), Xs))) | 431 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"comment", S, E), Xs))) |
432 | { | 432 | { |
433 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"comment", S, E), Zs))) | 433 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"comment", S, E), Zs))) |
434 | { | 434 | { |
435 | foreach (bool l4 in remove_comments(Xs, Ys, Zs)) | 435 | foreach (bool l4 in remove_comments(Xs, Ys, Zs)) |
436 | { | 436 | { |
437 | yield return false; | 437 | yield return false; |
438 | } | 438 | } |
439 | yield break; | 439 | yield break; |
440 | } | 440 | } |
441 | } | 441 | } |
442 | } | 442 | } |
443 | { | 443 | { |
444 | Variable Pos = new Variable(); | 444 | Variable Pos = new Variable(); |
445 | Variable Xs = new Variable(); | 445 | Variable Xs = new Variable(); |
446 | Variable Ys = new Variable(); | 446 | Variable Ys = new Variable(); |
447 | Variable Pos2 = new Variable(); | 447 | Variable Pos2 = new Variable(); |
448 | Variable Zs = new Variable(); | 448 | Variable Zs = new Variable(); |
449 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"/", Atom.a(@"["), Pos), Xs))) | 449 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"/", Atom.a(@"["), Pos), Xs))) |
450 | { | 450 | { |
451 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"["), Ys))) | 451 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"["), Ys))) |
452 | { | 452 | { |
453 | foreach (bool l4 in YP.unify(arg3, new ListPair(new Functor2(@"list", Pos, Pos2), Zs))) | 453 | foreach (bool l4 in YP.unify(arg3, new ListPair(new Functor2(@"list", Pos, Pos2), Zs))) |
454 | { | 454 | { |
455 | foreach (bool l5 in YP.unify(Pos2, YP.add(Pos, 1))) | 455 | foreach (bool l5 in YP.unify(Pos2, YP.add(Pos, 1))) |
456 | { | 456 | { |
457 | foreach (bool l6 in remove_comments(Xs, Ys, Zs)) | 457 | foreach (bool l6 in remove_comments(Xs, Ys, Zs)) |
458 | { | 458 | { |
459 | yield return false; | 459 | yield return false; |
460 | } | 460 | } |
461 | } | 461 | } |
462 | yield break; | 462 | yield break; |
463 | } | 463 | } |
464 | } | 464 | } |
465 | } | 465 | } |
466 | } | 466 | } |
467 | { | 467 | { |
468 | Variable Pos = new Variable(); | 468 | Variable Pos = new Variable(); |
469 | Variable Xs = new Variable(); | 469 | Variable Xs = new Variable(); |
470 | Variable Ys = new Variable(); | 470 | Variable Ys = new Variable(); |
471 | Variable Pos2 = new Variable(); | 471 | Variable Pos2 = new Variable(); |
472 | Variable Zs = new Variable(); | 472 | Variable Zs = new Variable(); |
473 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"/", Atom.a(@"]"), Pos), Xs))) | 473 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"/", Atom.a(@"]"), Pos), Xs))) |
474 | { | 474 | { |
475 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"]"), Ys))) | 475 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"]"), Ys))) |
476 | { | 476 | { |
477 | foreach (bool l4 in YP.unify(arg3, new ListPair(new Functor2(@"list", Pos, Pos2), Zs))) | 477 | foreach (bool l4 in YP.unify(arg3, new ListPair(new Functor2(@"list", Pos, Pos2), Zs))) |
478 | { | 478 | { |
479 | foreach (bool l5 in YP.unify(Pos2, YP.add(Pos, 1))) | 479 | foreach (bool l5 in YP.unify(Pos2, YP.add(Pos, 1))) |
480 | { | 480 | { |
481 | foreach (bool l6 in remove_comments(Xs, Ys, Zs)) | 481 | foreach (bool l6 in remove_comments(Xs, Ys, Zs)) |
482 | { | 482 | { |
483 | yield return false; | 483 | yield return false; |
484 | } | 484 | } |
485 | } | 485 | } |
486 | yield break; | 486 | yield break; |
487 | } | 487 | } |
488 | } | 488 | } |
489 | } | 489 | } |
490 | } | 490 | } |
491 | { | 491 | { |
492 | object Zs = arg3; | 492 | object Zs = arg3; |
493 | Variable Token = new Variable(); | 493 | Variable Token = new Variable(); |
494 | Variable Xs = new Variable(); | 494 | Variable Xs = new Variable(); |
495 | Variable Ys = new Variable(); | 495 | Variable Ys = new Variable(); |
496 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, Xs))) | 496 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, Xs))) |
497 | { | 497 | { |
498 | foreach (bool l3 in YP.unify(arg2, new ListPair(Token, Ys))) | 498 | foreach (bool l3 in YP.unify(arg2, new ListPair(Token, Ys))) |
499 | { | 499 | { |
500 | foreach (bool l4 in remove_comments(Xs, Ys, Zs)) | 500 | foreach (bool l4 in remove_comments(Xs, Ys, Zs)) |
501 | { | 501 | { |
502 | yield return false; | 502 | yield return false; |
503 | } | 503 | } |
504 | } | 504 | } |
505 | } | 505 | } |
506 | } | 506 | } |
507 | } | 507 | } |
508 | 508 | ||
509 | public static IEnumerable<bool> expect(object Token, object arg2, object arg3) | 509 | public static IEnumerable<bool> expect(object Token, object arg2, object arg3) |
510 | { | 510 | { |
511 | { | 511 | { |
512 | object Rest = arg3; | 512 | object Rest = arg3; |
513 | foreach (bool l2 in YP.unify(arg2, new ListPair(Token, Rest))) | 513 | foreach (bool l2 in YP.unify(arg2, new ListPair(Token, Rest))) |
514 | { | 514 | { |
515 | yield return true; | 515 | yield return true; |
516 | yield break; | 516 | yield break; |
517 | } | 517 | } |
518 | } | 518 | } |
519 | { | 519 | { |
520 | object S0 = arg2; | 520 | object S0 = arg2; |
521 | object x3 = arg3; | 521 | object x3 = arg3; |
522 | foreach (bool l2 in syntax_error(new ListPair(Token, new ListPair(Atom.a(@"or"), new ListPair(Atom.a(@"operator"), new ListPair(Atom.a(@"expected"), Atom.NIL)))), S0)) | 522 | foreach (bool l2 in syntax_error(new ListPair(Token, new ListPair(Atom.a(@"or"), new ListPair(Atom.a(@"operator"), new ListPair(Atom.a(@"expected"), Atom.NIL)))), S0)) |
523 | { | 523 | { |
524 | yield return false; | 524 | yield return false; |
525 | } | 525 | } |
526 | } | 526 | } |
527 | } | 527 | } |
528 | 528 | ||
529 | public static IEnumerable<bool> parse2(object Tokens, object Answer) | 529 | public static IEnumerable<bool> parse2(object Tokens, object Answer) |
530 | { | 530 | { |
531 | { | 531 | { |
532 | Variable Term = new Variable(); | 532 | Variable Term = new Variable(); |
533 | Variable LeftOver = new Variable(); | 533 | Variable LeftOver = new Variable(); |
534 | foreach (bool l2 in clear_errors()) | 534 | foreach (bool l2 in clear_errors()) |
535 | { | 535 | { |
536 | foreach (bool l3 in parse(Tokens, 1200, Term, LeftOver)) | 536 | foreach (bool l3 in parse(Tokens, 1200, Term, LeftOver)) |
537 | { | 537 | { |
538 | foreach (bool l4 in all_read(LeftOver)) | 538 | foreach (bool l4 in all_read(LeftOver)) |
539 | { | 539 | { |
540 | foreach (bool l5 in YP.unify(Answer, Term)) | 540 | foreach (bool l5 in YP.unify(Answer, Term)) |
541 | { | 541 | { |
542 | yield return false; | 542 | yield return false; |
543 | } | 543 | } |
544 | yield break; | 544 | yield break; |
545 | } | 545 | } |
546 | } | 546 | } |
547 | foreach (bool l3 in syntax_error(Tokens)) | 547 | foreach (bool l3 in syntax_error(Tokens)) |
548 | { | 548 | { |
549 | yield return false; | 549 | yield return false; |
550 | } | 550 | } |
551 | } | 551 | } |
552 | } | 552 | } |
553 | } | 553 | } |
554 | 554 | ||
555 | public static IEnumerable<bool> all_read(object arg1) | 555 | public static IEnumerable<bool> all_read(object arg1) |
556 | { | 556 | { |
557 | { | 557 | { |
558 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 558 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
559 | { | 559 | { |
560 | yield return false; | 560 | yield return false; |
561 | } | 561 | } |
562 | } | 562 | } |
563 | { | 563 | { |
564 | Variable Token = new Variable(); | 564 | Variable Token = new Variable(); |
565 | Variable S = new Variable(); | 565 | Variable S = new Variable(); |
566 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S))) | 566 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S))) |
567 | { | 567 | { |
568 | foreach (bool l3 in syntax_error(new ListPair(Atom.a(@"operator"), new ListPair(Atom.a(@"expected"), new ListPair(Atom.a(@"after"), new ListPair(Atom.a(@"expression"), Atom.NIL)))), new ListPair(Token, S))) | 568 | foreach (bool l3 in syntax_error(new ListPair(Atom.a(@"operator"), new ListPair(Atom.a(@"expected"), new ListPair(Atom.a(@"after"), new ListPair(Atom.a(@"expression"), Atom.NIL)))), new ListPair(Token, S))) |
569 | { | 569 | { |
570 | yield return false; | 570 | yield return false; |
571 | } | 571 | } |
572 | } | 572 | } |
573 | } | 573 | } |
574 | } | 574 | } |
575 | 575 | ||
576 | public static IEnumerable<bool> parse(object arg1, object arg2, object arg3, object arg4) | 576 | public static IEnumerable<bool> parse(object arg1, object arg2, object arg3, object arg4) |
577 | { | 577 | { |
578 | { | 578 | { |
579 | object x1 = arg2; | 579 | object x1 = arg2; |
580 | object x2 = arg3; | 580 | object x2 = arg3; |
581 | object x3 = arg4; | 581 | object x3 = arg4; |
582 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 582 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
583 | { | 583 | { |
584 | foreach (bool l3 in syntax_error(new ListPair(Atom.a(@"expression"), new ListPair(Atom.a(@"expected"), Atom.NIL)), Atom.NIL)) | 584 | foreach (bool l3 in syntax_error(new ListPair(Atom.a(@"expression"), new ListPair(Atom.a(@"expected"), Atom.NIL)), Atom.NIL)) |
585 | { | 585 | { |
586 | yield return false; | 586 | yield return false; |
587 | } | 587 | } |
588 | } | 588 | } |
589 | } | 589 | } |
590 | { | 590 | { |
591 | object Precedence = arg2; | 591 | object Precedence = arg2; |
592 | object Term = arg3; | 592 | object Term = arg3; |
593 | object LeftOver = arg4; | 593 | object LeftOver = arg4; |
594 | Variable Token = new Variable(); | 594 | Variable Token = new Variable(); |
595 | Variable RestTokens = new Variable(); | 595 | Variable RestTokens = new Variable(); |
596 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, RestTokens))) | 596 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, RestTokens))) |
597 | { | 597 | { |
598 | foreach (bool l3 in parse5(Token, RestTokens, Precedence, Term, LeftOver)) | 598 | foreach (bool l3 in parse5(Token, RestTokens, Precedence, Term, LeftOver)) |
599 | { | 599 | { |
600 | yield return false; | 600 | yield return false; |
601 | } | 601 | } |
602 | } | 602 | } |
603 | } | 603 | } |
604 | } | 604 | } |
605 | 605 | ||
606 | public static IEnumerable<bool> parse5(object arg1, object arg2, object arg3, object arg4, object arg5) | 606 | public static IEnumerable<bool> parse5(object arg1, object arg2, object arg3, object arg4, object arg5) |
607 | { | 607 | { |
608 | { | 608 | { |
609 | object S0 = arg2; | 609 | object S0 = arg2; |
610 | object x2 = arg3; | 610 | object x2 = arg3; |
611 | object x3 = arg4; | 611 | object x3 = arg4; |
612 | object x4 = arg5; | 612 | object x4 = arg5; |
613 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"}"))) | 613 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"}"))) |
614 | { | 614 | { |
615 | foreach (bool l3 in cannot_start(Atom.a(@"}"), S0)) | 615 | foreach (bool l3 in cannot_start(Atom.a(@"}"), S0)) |
616 | { | 616 | { |
617 | yield return false; | 617 | yield return false; |
618 | } | 618 | } |
619 | } | 619 | } |
620 | } | 620 | } |
621 | { | 621 | { |
622 | object S0 = arg2; | 622 | object S0 = arg2; |
623 | object x2 = arg3; | 623 | object x2 = arg3; |
624 | object x3 = arg4; | 624 | object x3 = arg4; |
625 | object x4 = arg5; | 625 | object x4 = arg5; |
626 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"]"))) | 626 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"]"))) |
627 | { | 627 | { |
628 | foreach (bool l3 in cannot_start(Atom.a(@"]"), S0)) | 628 | foreach (bool l3 in cannot_start(Atom.a(@"]"), S0)) |
629 | { | 629 | { |
630 | yield return false; | 630 | yield return false; |
631 | } | 631 | } |
632 | } | 632 | } |
633 | } | 633 | } |
634 | { | 634 | { |
635 | object S0 = arg2; | 635 | object S0 = arg2; |
636 | object x2 = arg3; | 636 | object x2 = arg3; |
637 | object x3 = arg4; | 637 | object x3 = arg4; |
638 | object x4 = arg5; | 638 | object x4 = arg5; |
639 | foreach (bool l2 in YP.unify(arg1, Atom.a(@")"))) | 639 | foreach (bool l2 in YP.unify(arg1, Atom.a(@")"))) |
640 | { | 640 | { |
641 | foreach (bool l3 in cannot_start(Atom.a(@")"), S0)) | 641 | foreach (bool l3 in cannot_start(Atom.a(@")"), S0)) |
642 | { | 642 | { |
643 | yield return false; | 643 | yield return false; |
644 | } | 644 | } |
645 | } | 645 | } |
646 | } | 646 | } |
647 | { | 647 | { |
648 | object S0 = arg2; | 648 | object S0 = arg2; |
649 | object x2 = arg3; | 649 | object x2 = arg3; |
650 | object x3 = arg4; | 650 | object x3 = arg4; |
651 | object x4 = arg5; | 651 | object x4 = arg5; |
652 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) | 652 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) |
653 | { | 653 | { |
654 | foreach (bool l3 in cannot_start(Atom.a(@","), S0)) | 654 | foreach (bool l3 in cannot_start(Atom.a(@","), S0)) |
655 | { | 655 | { |
656 | yield return false; | 656 | yield return false; |
657 | } | 657 | } |
658 | } | 658 | } |
659 | } | 659 | } |
660 | { | 660 | { |
661 | object S0 = arg2; | 661 | object S0 = arg2; |
662 | object x2 = arg3; | 662 | object x2 = arg3; |
663 | object x3 = arg4; | 663 | object x3 = arg4; |
664 | object x4 = arg5; | 664 | object x4 = arg5; |
665 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) | 665 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) |
666 | { | 666 | { |
667 | foreach (bool l3 in cannot_start(Atom.a(@"|"), S0)) | 667 | foreach (bool l3 in cannot_start(Atom.a(@"|"), S0)) |
668 | { | 668 | { |
669 | yield return false; | 669 | yield return false; |
670 | } | 670 | } |
671 | } | 671 | } |
672 | } | 672 | } |
673 | { | 673 | { |
674 | object S0 = arg2; | 674 | object S0 = arg2; |
675 | object Precedence = arg3; | 675 | object Precedence = arg3; |
676 | object Answer = arg4; | 676 | object Answer = arg4; |
677 | object S = arg5; | 677 | object S = arg5; |
678 | Variable Chars = new Variable(); | 678 | Variable Chars = new Variable(); |
679 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"string", Chars))) | 679 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"string", Chars))) |
680 | { | 680 | { |
681 | foreach (bool l3 in exprtl0(S0, Chars, Precedence, Answer, S)) | 681 | foreach (bool l3 in exprtl0(S0, Chars, Precedence, Answer, S)) |
682 | { | 682 | { |
683 | yield return false; | 683 | yield return false; |
684 | } | 684 | } |
685 | } | 685 | } |
686 | } | 686 | } |
687 | { | 687 | { |
688 | object S0 = arg2; | 688 | object S0 = arg2; |
689 | object Precedence = arg3; | 689 | object Precedence = arg3; |
690 | object Answer = arg4; | 690 | object Answer = arg4; |
691 | object S = arg5; | 691 | object S = arg5; |
692 | Variable Number = new Variable(); | 692 | Variable Number = new Variable(); |
693 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"number", Number))) | 693 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"number", Number))) |
694 | { | 694 | { |
695 | foreach (bool l3 in exprtl0(S0, Number, Precedence, Answer, S)) | 695 | foreach (bool l3 in exprtl0(S0, Number, Precedence, Answer, S)) |
696 | { | 696 | { |
697 | yield return false; | 697 | yield return false; |
698 | } | 698 | } |
699 | } | 699 | } |
700 | } | 700 | } |
701 | { | 701 | { |
702 | object Precedence = arg3; | 702 | object Precedence = arg3; |
703 | object Answer = arg4; | 703 | object Answer = arg4; |
704 | object S = arg5; | 704 | object S = arg5; |
705 | Variable S1 = new Variable(); | 705 | Variable S1 = new Variable(); |
706 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) | 706 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) |
707 | { | 707 | { |
708 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"]"), S1))) | 708 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"]"), S1))) |
709 | { | 709 | { |
710 | foreach (bool l4 in read_atom(new Functor2(@"/", Atom.NIL, 0), S1, Precedence, Answer, S)) | 710 | foreach (bool l4 in read_atom(new Functor2(@"/", Atom.NIL, 0), S1, Precedence, Answer, S)) |
711 | { | 711 | { |
712 | yield return false; | 712 | yield return false; |
713 | } | 713 | } |
714 | yield break; | 714 | yield break; |
715 | } | 715 | } |
716 | } | 716 | } |
717 | } | 717 | } |
718 | { | 718 | { |
719 | object S1 = arg2; | 719 | object S1 = arg2; |
720 | object Precedence = arg3; | 720 | object Precedence = arg3; |
721 | object Answer = arg4; | 721 | object Answer = arg4; |
722 | object S = arg5; | 722 | object S = arg5; |
723 | Variable Arg1 = new Variable(); | 723 | Variable Arg1 = new Variable(); |
724 | Variable S2 = new Variable(); | 724 | Variable S2 = new Variable(); |
725 | Variable RestArgs = new Variable(); | 725 | Variable RestArgs = new Variable(); |
726 | Variable S3 = new Variable(); | 726 | Variable S3 = new Variable(); |
727 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) | 727 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) |
728 | { | 728 | { |
729 | foreach (bool l3 in parse(S1, 999, Arg1, S2)) | 729 | foreach (bool l3 in parse(S1, 999, Arg1, S2)) |
730 | { | 730 | { |
731 | foreach (bool l4 in read_list(S2, RestArgs, S3)) | 731 | foreach (bool l4 in read_list(S2, RestArgs, S3)) |
732 | { | 732 | { |
733 | foreach (bool l5 in exprtl0(S3, new ListPair(Arg1, RestArgs), Precedence, Answer, S)) | 733 | foreach (bool l5 in exprtl0(S3, new ListPair(Arg1, RestArgs), Precedence, Answer, S)) |
734 | { | 734 | { |
735 | yield return false; | 735 | yield return false; |
736 | } | 736 | } |
737 | yield break; | 737 | yield break; |
738 | } | 738 | } |
739 | } | 739 | } |
740 | } | 740 | } |
741 | } | 741 | } |
742 | { | 742 | { |
743 | object S1 = arg2; | 743 | object S1 = arg2; |
744 | object Precedence = arg3; | 744 | object Precedence = arg3; |
745 | object Answer = arg4; | 745 | object Answer = arg4; |
746 | object S = arg5; | 746 | object S = arg5; |
747 | Variable Term = new Variable(); | 747 | Variable Term = new Variable(); |
748 | Variable S2 = new Variable(); | 748 | Variable S2 = new Variable(); |
749 | Variable S3 = new Variable(); | 749 | Variable S3 = new Variable(); |
750 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"("))) | 750 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"("))) |
751 | { | 751 | { |
752 | foreach (bool l3 in parse(S1, 1200, Term, S2)) | 752 | foreach (bool l3 in parse(S1, 1200, Term, S2)) |
753 | { | 753 | { |
754 | foreach (bool l4 in expect(Atom.a(@")"), S2, S3)) | 754 | foreach (bool l4 in expect(Atom.a(@")"), S2, S3)) |
755 | { | 755 | { |
756 | foreach (bool l5 in exprtl0(S3, Term, Precedence, Answer, S)) | 756 | foreach (bool l5 in exprtl0(S3, Term, Precedence, Answer, S)) |
757 | { | 757 | { |
758 | yield return false; | 758 | yield return false; |
759 | } | 759 | } |
760 | yield break; | 760 | yield break; |
761 | } | 761 | } |
762 | } | 762 | } |
763 | } | 763 | } |
764 | } | 764 | } |
765 | { | 765 | { |
766 | object S1 = arg2; | 766 | object S1 = arg2; |
767 | object Precedence = arg3; | 767 | object Precedence = arg3; |
768 | object Answer = arg4; | 768 | object Answer = arg4; |
769 | object S = arg5; | 769 | object S = arg5; |
770 | Variable Term = new Variable(); | 770 | Variable Term = new Variable(); |
771 | Variable S2 = new Variable(); | 771 | Variable S2 = new Variable(); |
772 | Variable S3 = new Variable(); | 772 | Variable S3 = new Variable(); |
773 | foreach (bool l2 in YP.unify(arg1, Atom.a(@" ("))) | 773 | foreach (bool l2 in YP.unify(arg1, Atom.a(@" ("))) |
774 | { | 774 | { |
775 | foreach (bool l3 in parse(S1, 1200, Term, S2)) | 775 | foreach (bool l3 in parse(S1, 1200, Term, S2)) |
776 | { | 776 | { |
777 | foreach (bool l4 in expect(Atom.a(@")"), S2, S3)) | 777 | foreach (bool l4 in expect(Atom.a(@")"), S2, S3)) |
778 | { | 778 | { |
779 | foreach (bool l5 in exprtl0(S3, Term, Precedence, Answer, S)) | 779 | foreach (bool l5 in exprtl0(S3, Term, Precedence, Answer, S)) |
780 | { | 780 | { |
781 | yield return false; | 781 | yield return false; |
782 | } | 782 | } |
783 | yield break; | 783 | yield break; |
784 | } | 784 | } |
785 | } | 785 | } |
786 | } | 786 | } |
787 | } | 787 | } |
788 | { | 788 | { |
789 | object Precedence = arg3; | 789 | object Precedence = arg3; |
790 | object Answer = arg4; | 790 | object Answer = arg4; |
791 | object S = arg5; | 791 | object S = arg5; |
792 | Variable _Pos = new Variable(); | 792 | Variable _Pos = new Variable(); |
793 | Variable S1 = new Variable(); | 793 | Variable S1 = new Variable(); |
794 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Atom.a(@"{"), _Pos))) | 794 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Atom.a(@"{"), _Pos))) |
795 | { | 795 | { |
796 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"}"), S1))) | 796 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"}"), S1))) |
797 | { | 797 | { |
798 | foreach (bool l4 in read_atom(Atom.a(@"{}"), S1, Precedence, Answer, S)) | 798 | foreach (bool l4 in read_atom(Atom.a(@"{}"), S1, Precedence, Answer, S)) |
799 | { | 799 | { |
800 | yield return false; | 800 | yield return false; |
801 | } | 801 | } |
802 | yield break; | 802 | yield break; |
803 | } | 803 | } |
804 | } | 804 | } |
805 | } | 805 | } |
806 | { | 806 | { |
807 | object S1 = arg2; | 807 | object S1 = arg2; |
808 | object Precedence = arg3; | 808 | object Precedence = arg3; |
809 | object Answer = arg4; | 809 | object Answer = arg4; |
810 | object S = arg5; | 810 | object S = arg5; |
811 | Variable Pos = new Variable(); | 811 | Variable Pos = new Variable(); |
812 | Variable Term = new Variable(); | 812 | Variable Term = new Variable(); |
813 | Variable S2 = new Variable(); | 813 | Variable S2 = new Variable(); |
814 | Variable S3 = new Variable(); | 814 | Variable S3 = new Variable(); |
815 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Atom.a(@"{"), Pos))) | 815 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Atom.a(@"{"), Pos))) |
816 | { | 816 | { |
817 | foreach (bool l3 in parse(S1, 1200, Term, S2)) | 817 | foreach (bool l3 in parse(S1, 1200, Term, S2)) |
818 | { | 818 | { |
819 | foreach (bool l4 in expect(Atom.a(@"}"), S2, S3)) | 819 | foreach (bool l4 in expect(Atom.a(@"}"), S2, S3)) |
820 | { | 820 | { |
821 | foreach (bool l5 in exprtl0(S3, new Functor2(@"{}", Pos, Term), Precedence, Answer, S)) | 821 | foreach (bool l5 in exprtl0(S3, new Functor2(@"{}", Pos, Term), Precedence, Answer, S)) |
822 | { | 822 | { |
823 | yield return false; | 823 | yield return false; |
824 | } | 824 | } |
825 | yield break; | 825 | yield break; |
826 | } | 826 | } |
827 | } | 827 | } |
828 | } | 828 | } |
829 | } | 829 | } |
830 | { | 830 | { |
831 | object Precedence = arg3; | 831 | object Precedence = arg3; |
832 | object Answer = arg4; | 832 | object Answer = arg4; |
833 | object S = arg5; | 833 | object S = arg5; |
834 | Variable Variable_1 = new Variable(); | 834 | Variable Variable_1 = new Variable(); |
835 | Variable Name = new Variable(); | 835 | Variable Name = new Variable(); |
836 | Variable Pos = new Variable(); | 836 | Variable Pos = new Variable(); |
837 | Variable S1 = new Variable(); | 837 | Variable S1 = new Variable(); |
838 | Variable Arg1 = new Variable(); | 838 | Variable Arg1 = new Variable(); |
839 | Variable S2 = new Variable(); | 839 | Variable S2 = new Variable(); |
840 | Variable RestArgs = new Variable(); | 840 | Variable RestArgs = new Variable(); |
841 | Variable S3 = new Variable(); | 841 | Variable S3 = new Variable(); |
842 | Variable Term = new Variable(); | 842 | Variable Term = new Variable(); |
843 | foreach (bool l2 in YP.unify(arg1, new Functor3(@"var", Variable_1, Name, Pos))) | 843 | foreach (bool l2 in YP.unify(arg1, new Functor3(@"var", Variable_1, Name, Pos))) |
844 | { | 844 | { |
845 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"("), S1))) | 845 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"("), S1))) |
846 | { | 846 | { |
847 | foreach (bool l4 in parse(S1, 999, Arg1, S2)) | 847 | foreach (bool l4 in parse(S1, 999, Arg1, S2)) |
848 | { | 848 | { |
849 | foreach (bool l5 in read_args(S2, RestArgs, S3)) | 849 | foreach (bool l5 in read_args(S2, RestArgs, S3)) |
850 | { | 850 | { |
851 | foreach (bool l6 in YP.univ(Term, new ListPair(Atom.a(@"call"), new ListPair(new Functor3(@"$VAR", Pos, Name, Variable_1), new ListPair(Arg1, RestArgs))))) | 851 | foreach (bool l6 in YP.univ(Term, new ListPair(Atom.a(@"call"), new ListPair(new Functor3(@"$VAR", Pos, Name, Variable_1), new ListPair(Arg1, RestArgs))))) |
852 | { | 852 | { |
853 | foreach (bool l7 in exprtl0(S3, Term, Precedence, Answer, S)) | 853 | foreach (bool l7 in exprtl0(S3, Term, Precedence, Answer, S)) |
854 | { | 854 | { |
855 | yield return false; | 855 | yield return false; |
856 | } | 856 | } |
857 | } | 857 | } |
858 | yield break; | 858 | yield break; |
859 | } | 859 | } |
860 | } | 860 | } |
861 | yield break; | 861 | yield break; |
862 | } | 862 | } |
863 | } | 863 | } |
864 | } | 864 | } |
865 | { | 865 | { |
866 | object S0 = arg2; | 866 | object S0 = arg2; |
867 | object Precedence = arg3; | 867 | object Precedence = arg3; |
868 | object Answer = arg4; | 868 | object Answer = arg4; |
869 | object S = arg5; | 869 | object S = arg5; |
870 | Variable Variable_1 = new Variable(); | 870 | Variable Variable_1 = new Variable(); |
871 | Variable Name = new Variable(); | 871 | Variable Name = new Variable(); |
872 | Variable Pos = new Variable(); | 872 | Variable Pos = new Variable(); |
873 | foreach (bool l2 in YP.unify(arg1, new Functor3(@"var", Variable_1, Name, Pos))) | 873 | foreach (bool l2 in YP.unify(arg1, new Functor3(@"var", Variable_1, Name, Pos))) |
874 | { | 874 | { |
875 | foreach (bool l3 in exprtl0(S0, new Functor3(@"$VAR", Pos, Name, Variable_1), Precedence, Answer, S)) | 875 | foreach (bool l3 in exprtl0(S0, new Functor3(@"$VAR", Pos, Name, Variable_1), Precedence, Answer, S)) |
876 | { | 876 | { |
877 | yield return false; | 877 | yield return false; |
878 | } | 878 | } |
879 | } | 879 | } |
880 | } | 880 | } |
881 | { | 881 | { |
882 | object S0 = arg2; | 882 | object S0 = arg2; |
883 | object Precedence = arg3; | 883 | object Precedence = arg3; |
884 | object Answer = arg4; | 884 | object Answer = arg4; |
885 | object S = arg5; | 885 | object S = arg5; |
886 | Variable Atom_1 = new Variable(); | 886 | Variable Atom_1 = new Variable(); |
887 | Variable P = new Variable(); | 887 | Variable P = new Variable(); |
888 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"atom", Atom_1, P))) | 888 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"atom", Atom_1, P))) |
889 | { | 889 | { |
890 | foreach (bool l3 in read_atom(new Functor2(@"/", Atom_1, P), S0, Precedence, Answer, S)) | 890 | foreach (bool l3 in read_atom(new Functor2(@"/", Atom_1, P), S0, Precedence, Answer, S)) |
891 | { | 891 | { |
892 | yield return false; | 892 | yield return false; |
893 | } | 893 | } |
894 | } | 894 | } |
895 | } | 895 | } |
896 | } | 896 | } |
897 | 897 | ||
898 | public static IEnumerable<bool> read_atom(object arg1, object arg2, object Precedence, object Answer, object S) | 898 | public static IEnumerable<bool> read_atom(object arg1, object arg2, object Precedence, object Answer, object S) |
899 | { | 899 | { |
900 | { | 900 | { |
901 | Variable _Pos = new Variable(); | 901 | Variable _Pos = new Variable(); |
902 | Variable Number = new Variable(); | 902 | Variable Number = new Variable(); |
903 | Variable S1 = new Variable(); | 903 | Variable S1 = new Variable(); |
904 | Variable Negative = new Variable(); | 904 | Variable Negative = new Variable(); |
905 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Atom.a(@"-"), _Pos))) | 905 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Atom.a(@"-"), _Pos))) |
906 | { | 906 | { |
907 | foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor1(@"number", Number), S1))) | 907 | foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor1(@"number", Number), S1))) |
908 | { | 908 | { |
909 | foreach (bool l4 in YP.unify(Negative, YP.negate(Number))) | 909 | foreach (bool l4 in YP.unify(Negative, YP.negate(Number))) |
910 | { | 910 | { |
911 | foreach (bool l5 in exprtl0(S1, Negative, Precedence, Answer, S)) | 911 | foreach (bool l5 in exprtl0(S1, Negative, Precedence, Answer, S)) |
912 | { | 912 | { |
913 | yield return false; | 913 | yield return false; |
914 | } | 914 | } |
915 | } | 915 | } |
916 | yield break; | 916 | yield break; |
917 | } | 917 | } |
918 | } | 918 | } |
919 | } | 919 | } |
920 | { | 920 | { |
921 | Variable Functor_1 = new Variable(); | 921 | Variable Functor_1 = new Variable(); |
922 | Variable Pos = new Variable(); | 922 | Variable Pos = new Variable(); |
923 | Variable S1 = new Variable(); | 923 | Variable S1 = new Variable(); |
924 | Variable Arg1 = new Variable(); | 924 | Variable Arg1 = new Variable(); |
925 | Variable S2 = new Variable(); | 925 | Variable S2 = new Variable(); |
926 | Variable RestArgs = new Variable(); | 926 | Variable RestArgs = new Variable(); |
927 | Variable S3 = new Variable(); | 927 | Variable S3 = new Variable(); |
928 | Variable Term = new Variable(); | 928 | Variable Term = new Variable(); |
929 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Functor_1, Pos))) | 929 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Functor_1, Pos))) |
930 | { | 930 | { |
931 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"("), S1))) | 931 | foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a(@"("), S1))) |
932 | { | 932 | { |
933 | foreach (bool l4 in parse(S1, 999, Arg1, S2)) | 933 | foreach (bool l4 in parse(S1, 999, Arg1, S2)) |
934 | { | 934 | { |
935 | foreach (bool l5 in read_args(S2, RestArgs, S3)) | 935 | foreach (bool l5 in read_args(S2, RestArgs, S3)) |
936 | { | 936 | { |
937 | foreach (bool l6 in YP.univ(Term, new ListPair(Functor_1, new ListPair(Pos, new ListPair(Arg1, RestArgs))))) | 937 | foreach (bool l6 in YP.univ(Term, new ListPair(Functor_1, new ListPair(Pos, new ListPair(Arg1, RestArgs))))) |
938 | { | 938 | { |
939 | foreach (bool l7 in exprtl0(S3, Term, Precedence, Answer, S)) | 939 | foreach (bool l7 in exprtl0(S3, Term, Precedence, Answer, S)) |
940 | { | 940 | { |
941 | yield return false; | 941 | yield return false; |
942 | } | 942 | } |
943 | } | 943 | } |
944 | yield break; | 944 | yield break; |
945 | } | 945 | } |
946 | } | 946 | } |
947 | yield break; | 947 | yield break; |
948 | } | 948 | } |
949 | } | 949 | } |
950 | } | 950 | } |
951 | { | 951 | { |
952 | object S0 = arg2; | 952 | object S0 = arg2; |
953 | Variable Op = new Variable(); | 953 | Variable Op = new Variable(); |
954 | Variable Pos = new Variable(); | 954 | Variable Pos = new Variable(); |
955 | Variable Oprec = new Variable(); | 955 | Variable Oprec = new Variable(); |
956 | Variable Aprec = new Variable(); | 956 | Variable Aprec = new Variable(); |
957 | Variable Flag = new Variable(); | 957 | Variable Flag = new Variable(); |
958 | Variable Term = new Variable(); | 958 | Variable Term = new Variable(); |
959 | Variable Arg = new Variable(); | 959 | Variable Arg = new Variable(); |
960 | Variable S1 = new Variable(); | 960 | Variable S1 = new Variable(); |
961 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Op, Pos))) | 961 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Op, Pos))) |
962 | { | 962 | { |
963 | foreach (bool l3 in prefixop(Op, Oprec, Aprec)) | 963 | foreach (bool l3 in prefixop(Op, Oprec, Aprec)) |
964 | { | 964 | { |
965 | foreach (bool l4 in possible_right_operand(S0, Flag)) | 965 | foreach (bool l4 in possible_right_operand(S0, Flag)) |
966 | { | 966 | { |
967 | if (YP.lessThan(Flag, 0)) | 967 | if (YP.lessThan(Flag, 0)) |
968 | { | 968 | { |
969 | foreach (bool l6 in YP.univ(Term, new ListPair(Op, new ListPair(Pos, Atom.NIL)))) | 969 | foreach (bool l6 in YP.univ(Term, new ListPair(Op, new ListPair(Pos, Atom.NIL)))) |
970 | { | 970 | { |
971 | foreach (bool l7 in exprtl0(S0, Term, Precedence, Answer, S)) | 971 | foreach (bool l7 in exprtl0(S0, Term, Precedence, Answer, S)) |
972 | { | 972 | { |
973 | yield return false; | 973 | yield return false; |
974 | } | 974 | } |
975 | } | 975 | } |
976 | goto cutIf1; | 976 | goto cutIf1; |
977 | } | 977 | } |
978 | if (YP.greaterThan(Oprec, Precedence)) | 978 | if (YP.greaterThan(Oprec, Precedence)) |
979 | { | 979 | { |
980 | foreach (bool l6 in syntax_error(new ListPair(Atom.a(@"prefix"), new ListPair(Atom.a(@"operator"), new ListPair(Op, new ListPair(Atom.a(@"in"), new ListPair(Atom.a(@"context"), new ListPair(Atom.a(@"with"), new ListPair(Atom.a(@"precedence"), new ListPair(Precedence, Atom.NIL)))))))), S0)) | 980 | foreach (bool l6 in syntax_error(new ListPair(Atom.a(@"prefix"), new ListPair(Atom.a(@"operator"), new ListPair(Op, new ListPair(Atom.a(@"in"), new ListPair(Atom.a(@"context"), new ListPair(Atom.a(@"with"), new ListPair(Atom.a(@"precedence"), new ListPair(Precedence, Atom.NIL)))))))), S0)) |
981 | { | 981 | { |
982 | yield return false; | 982 | yield return false; |
983 | } | 983 | } |
984 | goto cutIf2; | 984 | goto cutIf2; |
985 | } | 985 | } |
986 | if (YP.greaterThan(Flag, 0)) | 986 | if (YP.greaterThan(Flag, 0)) |
987 | { | 987 | { |
988 | foreach (bool l6 in parse(S0, Aprec, Arg, S1)) | 988 | foreach (bool l6 in parse(S0, Aprec, Arg, S1)) |
989 | { | 989 | { |
990 | foreach (bool l7 in YP.univ(Term, new ListPair(Op, new ListPair(Pos, new ListPair(Arg, Atom.NIL))))) | 990 | foreach (bool l7 in YP.univ(Term, new ListPair(Op, new ListPair(Pos, new ListPair(Arg, Atom.NIL))))) |
991 | { | 991 | { |
992 | foreach (bool l8 in exprtl(S1, Oprec, Term, Precedence, Answer, S)) | 992 | foreach (bool l8 in exprtl(S1, Oprec, Term, Precedence, Answer, S)) |
993 | { | 993 | { |
994 | yield return false; | 994 | yield return false; |
995 | } | 995 | } |
996 | } | 996 | } |
997 | yield break; | 997 | yield break; |
998 | } | 998 | } |
999 | goto cutIf3; | 999 | goto cutIf3; |
1000 | } | 1000 | } |
1001 | foreach (bool l5 in peepop(S0, S1)) | 1001 | foreach (bool l5 in peepop(S0, S1)) |
1002 | { | 1002 | { |
1003 | foreach (bool l6 in prefix_is_atom(S1, Oprec)) | 1003 | foreach (bool l6 in prefix_is_atom(S1, Oprec)) |
1004 | { | 1004 | { |
1005 | foreach (bool l7 in exprtl(S1, Oprec, new Functor2(@"/", Op, Pos), Precedence, Answer, S)) | 1005 | foreach (bool l7 in exprtl(S1, Oprec, new Functor2(@"/", Op, Pos), Precedence, Answer, S)) |
1006 | { | 1006 | { |
1007 | yield return false; | 1007 | yield return false; |
1008 | } | 1008 | } |
1009 | } | 1009 | } |
1010 | } | 1010 | } |
1011 | foreach (bool l5 in parse(S0, Aprec, Arg, S1)) | 1011 | foreach (bool l5 in parse(S0, Aprec, Arg, S1)) |
1012 | { | 1012 | { |
1013 | foreach (bool l6 in YP.univ(Term, new ListPair(Op, new ListPair(Pos, new ListPair(Arg, Atom.NIL))))) | 1013 | foreach (bool l6 in YP.univ(Term, new ListPair(Op, new ListPair(Pos, new ListPair(Arg, Atom.NIL))))) |
1014 | { | 1014 | { |
1015 | foreach (bool l7 in exprtl(S1, Oprec, Term, Precedence, Answer, S)) | 1015 | foreach (bool l7 in exprtl(S1, Oprec, Term, Precedence, Answer, S)) |
1016 | { | 1016 | { |
1017 | yield return false; | 1017 | yield return false; |
1018 | } | 1018 | } |
1019 | } | 1019 | } |
1020 | yield break; | 1020 | yield break; |
1021 | } | 1021 | } |
1022 | cutIf3: | 1022 | cutIf3: |
1023 | cutIf2: | 1023 | cutIf2: |
1024 | cutIf1: | 1024 | cutIf1: |
1025 | { } | 1025 | { } |
1026 | } | 1026 | } |
1027 | yield break; | 1027 | yield break; |
1028 | } | 1028 | } |
1029 | } | 1029 | } |
1030 | } | 1030 | } |
1031 | { | 1031 | { |
1032 | object S0 = arg2; | 1032 | object S0 = arg2; |
1033 | Variable Atom_1 = new Variable(); | 1033 | Variable Atom_1 = new Variable(); |
1034 | Variable Pos = new Variable(); | 1034 | Variable Pos = new Variable(); |
1035 | Variable Term = new Variable(); | 1035 | Variable Term = new Variable(); |
1036 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Atom_1, Pos))) | 1036 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", Atom_1, Pos))) |
1037 | { | 1037 | { |
1038 | foreach (bool l3 in YP.univ(Term, new ListPair(Atom_1, new ListPair(Pos, Atom.NIL)))) | 1038 | foreach (bool l3 in YP.univ(Term, new ListPair(Atom_1, new ListPair(Pos, Atom.NIL)))) |
1039 | { | 1039 | { |
1040 | foreach (bool l4 in exprtl0(S0, Term, Precedence, Answer, S)) | 1040 | foreach (bool l4 in exprtl0(S0, Term, Precedence, Answer, S)) |
1041 | { | 1041 | { |
1042 | yield return false; | 1042 | yield return false; |
1043 | } | 1043 | } |
1044 | } | 1044 | } |
1045 | } | 1045 | } |
1046 | } | 1046 | } |
1047 | } | 1047 | } |
1048 | 1048 | ||
1049 | public static IEnumerable<bool> cannot_start(object Token, object S0) | 1049 | public static IEnumerable<bool> cannot_start(object Token, object S0) |
1050 | { | 1050 | { |
1051 | { | 1051 | { |
1052 | foreach (bool l2 in syntax_error(new ListPair(Token, new ListPair(Atom.a(@"cannot"), new ListPair(Atom.a(@"start"), new ListPair(Atom.a(@"an"), new ListPair(Atom.a(@"expression"), Atom.NIL))))), S0)) | 1052 | foreach (bool l2 in syntax_error(new ListPair(Token, new ListPair(Atom.a(@"cannot"), new ListPair(Atom.a(@"start"), new ListPair(Atom.a(@"an"), new ListPair(Atom.a(@"expression"), Atom.NIL))))), S0)) |
1053 | { | 1053 | { |
1054 | yield return false; | 1054 | yield return false; |
1055 | } | 1055 | } |
1056 | } | 1056 | } |
1057 | } | 1057 | } |
1058 | 1058 | ||
1059 | public static IEnumerable<bool> read_args(object arg1, object arg2, object arg3) | 1059 | public static IEnumerable<bool> read_args(object arg1, object arg2, object arg3) |
1060 | { | 1060 | { |
1061 | { | 1061 | { |
1062 | object S = arg3; | 1062 | object S = arg3; |
1063 | Variable S1 = new Variable(); | 1063 | Variable S1 = new Variable(); |
1064 | Variable Term = new Variable(); | 1064 | Variable Term = new Variable(); |
1065 | Variable Rest = new Variable(); | 1065 | Variable Rest = new Variable(); |
1066 | Variable S2 = new Variable(); | 1066 | Variable S2 = new Variable(); |
1067 | foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a(@","), S1))) | 1067 | foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a(@","), S1))) |
1068 | { | 1068 | { |
1069 | foreach (bool l3 in YP.unify(arg2, new ListPair(Term, Rest))) | 1069 | foreach (bool l3 in YP.unify(arg2, new ListPair(Term, Rest))) |
1070 | { | 1070 | { |
1071 | foreach (bool l4 in parse(S1, 999, Term, S2)) | 1071 | foreach (bool l4 in parse(S1, 999, Term, S2)) |
1072 | { | 1072 | { |
1073 | foreach (bool l5 in read_args(S2, Rest, S)) | 1073 | foreach (bool l5 in read_args(S2, Rest, S)) |
1074 | { | 1074 | { |
1075 | yield return false; | 1075 | yield return false; |
1076 | } | 1076 | } |
1077 | yield break; | 1077 | yield break; |
1078 | } | 1078 | } |
1079 | yield break; | 1079 | yield break; |
1080 | } | 1080 | } |
1081 | } | 1081 | } |
1082 | } | 1082 | } |
1083 | { | 1083 | { |
1084 | object S = arg3; | 1084 | object S = arg3; |
1085 | foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a(@")"), S))) | 1085 | foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a(@")"), S))) |
1086 | { | 1086 | { |
1087 | foreach (bool l3 in YP.unify(arg2, Atom.NIL)) | 1087 | foreach (bool l3 in YP.unify(arg2, Atom.NIL)) |
1088 | { | 1088 | { |
1089 | yield return true; | 1089 | yield return true; |
1090 | yield break; | 1090 | yield break; |
1091 | } | 1091 | } |
1092 | } | 1092 | } |
1093 | } | 1093 | } |
1094 | { | 1094 | { |
1095 | object S = arg1; | 1095 | object S = arg1; |
1096 | object x2 = arg2; | 1096 | object x2 = arg2; |
1097 | object x3 = arg3; | 1097 | object x3 = arg3; |
1098 | foreach (bool l2 in syntax_error(new ListPair(Atom.a(@", or )"), new ListPair(Atom.a(@"expected"), new ListPair(Atom.a(@"in"), new ListPair(Atom.a(@"arguments"), Atom.NIL)))), S)) | 1098 | foreach (bool l2 in syntax_error(new ListPair(Atom.a(@", or )"), new ListPair(Atom.a(@"expected"), new ListPair(Atom.a(@"in"), new ListPair(Atom.a(@"arguments"), Atom.NIL)))), S)) |
1099 | { | 1099 | { |
1100 | yield return false; | 1100 | yield return false; |
1101 | } | 1101 | } |
1102 | } | 1102 | } |
1103 | } | 1103 | } |
1104 | 1104 | ||
1105 | public static IEnumerable<bool> read_list(object arg1, object arg2, object arg3) | 1105 | public static IEnumerable<bool> read_list(object arg1, object arg2, object arg3) |
1106 | { | 1106 | { |
1107 | { | 1107 | { |
1108 | object x1 = arg2; | 1108 | object x1 = arg2; |
1109 | object x2 = arg3; | 1109 | object x2 = arg3; |
1110 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 1110 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
1111 | { | 1111 | { |
1112 | foreach (bool l3 in syntax_error(new ListPair(Atom.a(@", | or ]"), new ListPair(Atom.a(@"expected"), new ListPair(Atom.a(@"in"), new ListPair(Atom.a(@"list"), Atom.NIL)))), Atom.NIL)) | 1112 | foreach (bool l3 in syntax_error(new ListPair(Atom.a(@", | or ]"), new ListPair(Atom.a(@"expected"), new ListPair(Atom.a(@"in"), new ListPair(Atom.a(@"list"), Atom.NIL)))), Atom.NIL)) |
1113 | { | 1113 | { |
1114 | yield return false; | 1114 | yield return false; |
1115 | } | 1115 | } |
1116 | } | 1116 | } |
1117 | } | 1117 | } |
1118 | { | 1118 | { |
1119 | object Rest = arg2; | 1119 | object Rest = arg2; |
1120 | object S = arg3; | 1120 | object S = arg3; |
1121 | Variable Token = new Variable(); | 1121 | Variable Token = new Variable(); |
1122 | Variable S1 = new Variable(); | 1122 | Variable S1 = new Variable(); |
1123 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S1))) | 1123 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S1))) |
1124 | { | 1124 | { |
1125 | foreach (bool l3 in read_list4(Token, S1, Rest, S)) | 1125 | foreach (bool l3 in read_list4(Token, S1, Rest, S)) |
1126 | { | 1126 | { |
1127 | yield return false; | 1127 | yield return false; |
1128 | } | 1128 | } |
1129 | } | 1129 | } |
1130 | } | 1130 | } |
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | public static IEnumerable<bool> read_list4(object arg1, object arg2, object arg3, object arg4) | 1133 | public static IEnumerable<bool> read_list4(object arg1, object arg2, object arg3, object arg4) |
1134 | { | 1134 | { |
1135 | { | 1135 | { |
1136 | object S1 = arg2; | 1136 | object S1 = arg2; |
1137 | object S = arg4; | 1137 | object S = arg4; |
1138 | Variable Term = new Variable(); | 1138 | Variable Term = new Variable(); |
1139 | Variable Rest = new Variable(); | 1139 | Variable Rest = new Variable(); |
1140 | Variable S2 = new Variable(); | 1140 | Variable S2 = new Variable(); |
1141 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) | 1141 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) |
1142 | { | 1142 | { |
1143 | foreach (bool l3 in YP.unify(arg3, new ListPair(Term, Rest))) | 1143 | foreach (bool l3 in YP.unify(arg3, new ListPair(Term, Rest))) |
1144 | { | 1144 | { |
1145 | foreach (bool l4 in parse(S1, 999, Term, S2)) | 1145 | foreach (bool l4 in parse(S1, 999, Term, S2)) |
1146 | { | 1146 | { |
1147 | foreach (bool l5 in read_list(S2, Rest, S)) | 1147 | foreach (bool l5 in read_list(S2, Rest, S)) |
1148 | { | 1148 | { |
1149 | yield return false; | 1149 | yield return false; |
1150 | } | 1150 | } |
1151 | yield break; | 1151 | yield break; |
1152 | } | 1152 | } |
1153 | yield break; | 1153 | yield break; |
1154 | } | 1154 | } |
1155 | } | 1155 | } |
1156 | } | 1156 | } |
1157 | { | 1157 | { |
1158 | object S1 = arg2; | 1158 | object S1 = arg2; |
1159 | object Rest = arg3; | 1159 | object Rest = arg3; |
1160 | object S = arg4; | 1160 | object S = arg4; |
1161 | Variable S2 = new Variable(); | 1161 | Variable S2 = new Variable(); |
1162 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) | 1162 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) |
1163 | { | 1163 | { |
1164 | foreach (bool l3 in parse(S1, 999, Rest, S2)) | 1164 | foreach (bool l3 in parse(S1, 999, Rest, S2)) |
1165 | { | 1165 | { |
1166 | foreach (bool l4 in expect(Atom.a(@"]"), S2, S)) | 1166 | foreach (bool l4 in expect(Atom.a(@"]"), S2, S)) |
1167 | { | 1167 | { |
1168 | yield return false; | 1168 | yield return false; |
1169 | } | 1169 | } |
1170 | yield break; | 1170 | yield break; |
1171 | } | 1171 | } |
1172 | yield break; | 1172 | yield break; |
1173 | } | 1173 | } |
1174 | } | 1174 | } |
1175 | { | 1175 | { |
1176 | Variable S1 = new Variable(); | 1176 | Variable S1 = new Variable(); |
1177 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"]"))) | 1177 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"]"))) |
1178 | { | 1178 | { |
1179 | foreach (bool l3 in YP.unify(arg2, S1)) | 1179 | foreach (bool l3 in YP.unify(arg2, S1)) |
1180 | { | 1180 | { |
1181 | foreach (bool l4 in YP.unify(arg3, Atom.NIL)) | 1181 | foreach (bool l4 in YP.unify(arg3, Atom.NIL)) |
1182 | { | 1182 | { |
1183 | foreach (bool l5 in YP.unify(arg4, S1)) | 1183 | foreach (bool l5 in YP.unify(arg4, S1)) |
1184 | { | 1184 | { |
1185 | yield return true; | 1185 | yield return true; |
1186 | yield break; | 1186 | yield break; |
1187 | } | 1187 | } |
1188 | } | 1188 | } |
1189 | } | 1189 | } |
1190 | } | 1190 | } |
1191 | } | 1191 | } |
1192 | { | 1192 | { |
1193 | object Token = arg1; | 1193 | object Token = arg1; |
1194 | object S1 = arg2; | 1194 | object S1 = arg2; |
1195 | object x3 = arg3; | 1195 | object x3 = arg3; |
1196 | object x4 = arg4; | 1196 | object x4 = arg4; |
1197 | foreach (bool l2 in syntax_error(new ListPair(Atom.a(@", | or ]"), new ListPair(Atom.a(@"expected"), new ListPair(Atom.a(@"in"), new ListPair(Atom.a(@"list"), Atom.NIL)))), new ListPair(Token, S1))) | 1197 | foreach (bool l2 in syntax_error(new ListPair(Atom.a(@", | or ]"), new ListPair(Atom.a(@"expected"), new ListPair(Atom.a(@"in"), new ListPair(Atom.a(@"list"), Atom.NIL)))), new ListPair(Token, S1))) |
1198 | { | 1198 | { |
1199 | yield return false; | 1199 | yield return false; |
1200 | } | 1200 | } |
1201 | } | 1201 | } |
1202 | } | 1202 | } |
1203 | 1203 | ||
1204 | public static IEnumerable<bool> possible_right_operand(object arg1, object arg2) | 1204 | public static IEnumerable<bool> possible_right_operand(object arg1, object arg2) |
1205 | { | 1205 | { |
1206 | { | 1206 | { |
1207 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 1207 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
1208 | { | 1208 | { |
1209 | foreach (bool l3 in YP.unify(arg2, -1)) | 1209 | foreach (bool l3 in YP.unify(arg2, -1)) |
1210 | { | 1210 | { |
1211 | yield return false; | 1211 | yield return false; |
1212 | } | 1212 | } |
1213 | } | 1213 | } |
1214 | } | 1214 | } |
1215 | { | 1215 | { |
1216 | object Flag = arg2; | 1216 | object Flag = arg2; |
1217 | Variable H = new Variable(); | 1217 | Variable H = new Variable(); |
1218 | Variable T = new Variable(); | 1218 | Variable T = new Variable(); |
1219 | foreach (bool l2 in YP.unify(arg1, new ListPair(H, T))) | 1219 | foreach (bool l2 in YP.unify(arg1, new ListPair(H, T))) |
1220 | { | 1220 | { |
1221 | foreach (bool l3 in possible_right_operand3(H, Flag, T)) | 1221 | foreach (bool l3 in possible_right_operand3(H, Flag, T)) |
1222 | { | 1222 | { |
1223 | yield return false; | 1223 | yield return false; |
1224 | } | 1224 | } |
1225 | } | 1225 | } |
1226 | } | 1226 | } |
1227 | } | 1227 | } |
1228 | 1228 | ||
1229 | public static IEnumerable<bool> possible_right_operand3(object arg1, object arg2, object arg3) | 1229 | public static IEnumerable<bool> possible_right_operand3(object arg1, object arg2, object arg3) |
1230 | { | 1230 | { |
1231 | { | 1231 | { |
1232 | object x4 = arg3; | 1232 | object x4 = arg3; |
1233 | Variable x1 = new Variable(); | 1233 | Variable x1 = new Variable(); |
1234 | Variable x2 = new Variable(); | 1234 | Variable x2 = new Variable(); |
1235 | Variable x3 = new Variable(); | 1235 | Variable x3 = new Variable(); |
1236 | foreach (bool l2 in YP.unify(arg1, new Functor3(@"var", x1, x2, x3))) | 1236 | foreach (bool l2 in YP.unify(arg1, new Functor3(@"var", x1, x2, x3))) |
1237 | { | 1237 | { |
1238 | foreach (bool l3 in YP.unify(arg2, 1)) | 1238 | foreach (bool l3 in YP.unify(arg2, 1)) |
1239 | { | 1239 | { |
1240 | yield return false; | 1240 | yield return false; |
1241 | } | 1241 | } |
1242 | } | 1242 | } |
1243 | } | 1243 | } |
1244 | { | 1244 | { |
1245 | object x2 = arg3; | 1245 | object x2 = arg3; |
1246 | Variable x1 = new Variable(); | 1246 | Variable x1 = new Variable(); |
1247 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"number", x1))) | 1247 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"number", x1))) |
1248 | { | 1248 | { |
1249 | foreach (bool l3 in YP.unify(arg2, 1)) | 1249 | foreach (bool l3 in YP.unify(arg2, 1)) |
1250 | { | 1250 | { |
1251 | yield return false; | 1251 | yield return false; |
1252 | } | 1252 | } |
1253 | } | 1253 | } |
1254 | } | 1254 | } |
1255 | { | 1255 | { |
1256 | object x2 = arg3; | 1256 | object x2 = arg3; |
1257 | Variable x1 = new Variable(); | 1257 | Variable x1 = new Variable(); |
1258 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"string", x1))) | 1258 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"string", x1))) |
1259 | { | 1259 | { |
1260 | foreach (bool l3 in YP.unify(arg2, 1)) | 1260 | foreach (bool l3 in YP.unify(arg2, 1)) |
1261 | { | 1261 | { |
1262 | yield return false; | 1262 | yield return false; |
1263 | } | 1263 | } |
1264 | } | 1264 | } |
1265 | } | 1265 | } |
1266 | { | 1266 | { |
1267 | object x1 = arg3; | 1267 | object x1 = arg3; |
1268 | foreach (bool l2 in YP.unify(arg1, Atom.a(@" ("))) | 1268 | foreach (bool l2 in YP.unify(arg1, Atom.a(@" ("))) |
1269 | { | 1269 | { |
1270 | foreach (bool l3 in YP.unify(arg2, 1)) | 1270 | foreach (bool l3 in YP.unify(arg2, 1)) |
1271 | { | 1271 | { |
1272 | yield return false; | 1272 | yield return false; |
1273 | } | 1273 | } |
1274 | } | 1274 | } |
1275 | } | 1275 | } |
1276 | { | 1276 | { |
1277 | object x1 = arg3; | 1277 | object x1 = arg3; |
1278 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"("))) | 1278 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"("))) |
1279 | { | 1279 | { |
1280 | foreach (bool l3 in YP.unify(arg2, 0)) | 1280 | foreach (bool l3 in YP.unify(arg2, 0)) |
1281 | { | 1281 | { |
1282 | yield return false; | 1282 | yield return false; |
1283 | } | 1283 | } |
1284 | } | 1284 | } |
1285 | } | 1285 | } |
1286 | { | 1286 | { |
1287 | object x1 = arg3; | 1287 | object x1 = arg3; |
1288 | foreach (bool l2 in YP.unify(arg1, Atom.a(@")"))) | 1288 | foreach (bool l2 in YP.unify(arg1, Atom.a(@")"))) |
1289 | { | 1289 | { |
1290 | foreach (bool l3 in YP.unify(arg2, -1)) | 1290 | foreach (bool l3 in YP.unify(arg2, -1)) |
1291 | { | 1291 | { |
1292 | yield return false; | 1292 | yield return false; |
1293 | } | 1293 | } |
1294 | } | 1294 | } |
1295 | } | 1295 | } |
1296 | { | 1296 | { |
1297 | Variable x1 = new Variable(); | 1297 | Variable x1 = new Variable(); |
1298 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) | 1298 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) |
1299 | { | 1299 | { |
1300 | foreach (bool l3 in YP.unify(arg2, 0)) | 1300 | foreach (bool l3 in YP.unify(arg2, 0)) |
1301 | { | 1301 | { |
1302 | foreach (bool l4 in YP.unify(arg3, new ListPair(Atom.a(@"]"), x1))) | 1302 | foreach (bool l4 in YP.unify(arg3, new ListPair(Atom.a(@"]"), x1))) |
1303 | { | 1303 | { |
1304 | yield return true; | 1304 | yield return true; |
1305 | yield break; | 1305 | yield break; |
1306 | } | 1306 | } |
1307 | } | 1307 | } |
1308 | } | 1308 | } |
1309 | } | 1309 | } |
1310 | { | 1310 | { |
1311 | object x1 = arg3; | 1311 | object x1 = arg3; |
1312 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) | 1312 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) |
1313 | { | 1313 | { |
1314 | foreach (bool l3 in YP.unify(arg2, 1)) | 1314 | foreach (bool l3 in YP.unify(arg2, 1)) |
1315 | { | 1315 | { |
1316 | yield return false; | 1316 | yield return false; |
1317 | } | 1317 | } |
1318 | } | 1318 | } |
1319 | } | 1319 | } |
1320 | { | 1320 | { |
1321 | object x1 = arg3; | 1321 | object x1 = arg3; |
1322 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"]"))) | 1322 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"]"))) |
1323 | { | 1323 | { |
1324 | foreach (bool l3 in YP.unify(arg2, -1)) | 1324 | foreach (bool l3 in YP.unify(arg2, -1)) |
1325 | { | 1325 | { |
1326 | yield return false; | 1326 | yield return false; |
1327 | } | 1327 | } |
1328 | } | 1328 | } |
1329 | } | 1329 | } |
1330 | { | 1330 | { |
1331 | Variable x1 = new Variable(); | 1331 | Variable x1 = new Variable(); |
1332 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"{"))) | 1332 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"{"))) |
1333 | { | 1333 | { |
1334 | foreach (bool l3 in YP.unify(arg2, 0)) | 1334 | foreach (bool l3 in YP.unify(arg2, 0)) |
1335 | { | 1335 | { |
1336 | foreach (bool l4 in YP.unify(arg3, new ListPair(Atom.a(@"}"), x1))) | 1336 | foreach (bool l4 in YP.unify(arg3, new ListPair(Atom.a(@"}"), x1))) |
1337 | { | 1337 | { |
1338 | yield return true; | 1338 | yield return true; |
1339 | yield break; | 1339 | yield break; |
1340 | } | 1340 | } |
1341 | } | 1341 | } |
1342 | } | 1342 | } |
1343 | } | 1343 | } |
1344 | { | 1344 | { |
1345 | object x1 = arg3; | 1345 | object x1 = arg3; |
1346 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"{"))) | 1346 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"{"))) |
1347 | { | 1347 | { |
1348 | foreach (bool l3 in YP.unify(arg2, 1)) | 1348 | foreach (bool l3 in YP.unify(arg2, 1)) |
1349 | { | 1349 | { |
1350 | yield return false; | 1350 | yield return false; |
1351 | } | 1351 | } |
1352 | } | 1352 | } |
1353 | } | 1353 | } |
1354 | { | 1354 | { |
1355 | object x1 = arg3; | 1355 | object x1 = arg3; |
1356 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"}"))) | 1356 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"}"))) |
1357 | { | 1357 | { |
1358 | foreach (bool l3 in YP.unify(arg2, -1)) | 1358 | foreach (bool l3 in YP.unify(arg2, -1)) |
1359 | { | 1359 | { |
1360 | yield return false; | 1360 | yield return false; |
1361 | } | 1361 | } |
1362 | } | 1362 | } |
1363 | } | 1363 | } |
1364 | { | 1364 | { |
1365 | object x1 = arg3; | 1365 | object x1 = arg3; |
1366 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) | 1366 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) |
1367 | { | 1367 | { |
1368 | foreach (bool l3 in YP.unify(arg2, -1)) | 1368 | foreach (bool l3 in YP.unify(arg2, -1)) |
1369 | { | 1369 | { |
1370 | yield return false; | 1370 | yield return false; |
1371 | } | 1371 | } |
1372 | } | 1372 | } |
1373 | } | 1373 | } |
1374 | { | 1374 | { |
1375 | object x1 = arg3; | 1375 | object x1 = arg3; |
1376 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) | 1376 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) |
1377 | { | 1377 | { |
1378 | foreach (bool l3 in YP.unify(arg2, -1)) | 1378 | foreach (bool l3 in YP.unify(arg2, -1)) |
1379 | { | 1379 | { |
1380 | yield return false; | 1380 | yield return false; |
1381 | } | 1381 | } |
1382 | } | 1382 | } |
1383 | } | 1383 | } |
1384 | { | 1384 | { |
1385 | object x3 = arg3; | 1385 | object x3 = arg3; |
1386 | Variable x1 = new Variable(); | 1386 | Variable x1 = new Variable(); |
1387 | Variable x2 = new Variable(); | 1387 | Variable x2 = new Variable(); |
1388 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"atom", x1, x2))) | 1388 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"atom", x1, x2))) |
1389 | { | 1389 | { |
1390 | foreach (bool l3 in YP.unify(arg2, 0)) | 1390 | foreach (bool l3 in YP.unify(arg2, 0)) |
1391 | { | 1391 | { |
1392 | yield return false; | 1392 | yield return false; |
1393 | } | 1393 | } |
1394 | } | 1394 | } |
1395 | } | 1395 | } |
1396 | } | 1396 | } |
1397 | 1397 | ||
1398 | public static IEnumerable<bool> peepop(object arg1, object arg2) | 1398 | public static IEnumerable<bool> peepop(object arg1, object arg2) |
1399 | { | 1399 | { |
1400 | { | 1400 | { |
1401 | Variable F = new Variable(); | 1401 | Variable F = new Variable(); |
1402 | Variable Pos = new Variable(); | 1402 | Variable Pos = new Variable(); |
1403 | Variable S1 = new Variable(); | 1403 | Variable S1 = new Variable(); |
1404 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"atom", F, Pos), new ListPair(Atom.a(@"("), S1)))) | 1404 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"atom", F, Pos), new ListPair(Atom.a(@"("), S1)))) |
1405 | { | 1405 | { |
1406 | foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor2(@"atom", F, Pos), new ListPair(Atom.a(@"("), S1)))) | 1406 | foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor2(@"atom", F, Pos), new ListPair(Atom.a(@"("), S1)))) |
1407 | { | 1407 | { |
1408 | yield return true; | 1408 | yield return true; |
1409 | yield break; | 1409 | yield break; |
1410 | } | 1410 | } |
1411 | } | 1411 | } |
1412 | } | 1412 | } |
1413 | { | 1413 | { |
1414 | Variable F = new Variable(); | 1414 | Variable F = new Variable(); |
1415 | Variable Pos = new Variable(); | 1415 | Variable Pos = new Variable(); |
1416 | Variable S1 = new Variable(); | 1416 | Variable S1 = new Variable(); |
1417 | Variable L = new Variable(); | 1417 | Variable L = new Variable(); |
1418 | Variable P = new Variable(); | 1418 | Variable P = new Variable(); |
1419 | Variable R = new Variable(); | 1419 | Variable R = new Variable(); |
1420 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"atom", F, Pos), S1))) | 1420 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"atom", F, Pos), S1))) |
1421 | { | 1421 | { |
1422 | foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor(Atom.a(@"infixop", Atom.a(@"")), new object[] { new Functor2(@"/", F, Pos), L, P, R }), S1))) | 1422 | foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor(Atom.a(@"infixop", Atom.a(@"")), new object[] { new Functor2(@"/", F, Pos), L, P, R }), S1))) |
1423 | { | 1423 | { |
1424 | foreach (bool l4 in infixop(F, L, P, R)) | 1424 | foreach (bool l4 in infixop(F, L, P, R)) |
1425 | { | 1425 | { |
1426 | yield return false; | 1426 | yield return false; |
1427 | } | 1427 | } |
1428 | } | 1428 | } |
1429 | } | 1429 | } |
1430 | } | 1430 | } |
1431 | { | 1431 | { |
1432 | Variable F = new Variable(); | 1432 | Variable F = new Variable(); |
1433 | Variable Pos = new Variable(); | 1433 | Variable Pos = new Variable(); |
1434 | Variable S1 = new Variable(); | 1434 | Variable S1 = new Variable(); |
1435 | Variable L = new Variable(); | 1435 | Variable L = new Variable(); |
1436 | Variable P = new Variable(); | 1436 | Variable P = new Variable(); |
1437 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"atom", F, Pos), S1))) | 1437 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"atom", F, Pos), S1))) |
1438 | { | 1438 | { |
1439 | foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor3(Atom.a(@"postfixop", Atom.a(@"")), new Functor2(@"/", F, Pos), L, P), S1))) | 1439 | foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor3(Atom.a(@"postfixop", Atom.a(@"")), new Functor2(@"/", F, Pos), L, P), S1))) |
1440 | { | 1440 | { |
1441 | foreach (bool l4 in postfixop(F, L, P)) | 1441 | foreach (bool l4 in postfixop(F, L, P)) |
1442 | { | 1442 | { |
1443 | yield return false; | 1443 | yield return false; |
1444 | } | 1444 | } |
1445 | } | 1445 | } |
1446 | } | 1446 | } |
1447 | } | 1447 | } |
1448 | { | 1448 | { |
1449 | Variable S0 = new Variable(); | 1449 | Variable S0 = new Variable(); |
1450 | foreach (bool l2 in YP.unify(arg1, S0)) | 1450 | foreach (bool l2 in YP.unify(arg1, S0)) |
1451 | { | 1451 | { |
1452 | foreach (bool l3 in YP.unify(arg2, S0)) | 1452 | foreach (bool l3 in YP.unify(arg2, S0)) |
1453 | { | 1453 | { |
1454 | yield return false; | 1454 | yield return false; |
1455 | } | 1455 | } |
1456 | } | 1456 | } |
1457 | } | 1457 | } |
1458 | } | 1458 | } |
1459 | 1459 | ||
1460 | public static IEnumerable<bool> prefix_is_atom(object arg1, object arg2) | 1460 | public static IEnumerable<bool> prefix_is_atom(object arg1, object arg2) |
1461 | { | 1461 | { |
1462 | { | 1462 | { |
1463 | object Precedence = arg2; | 1463 | object Precedence = arg2; |
1464 | Variable Token = new Variable(); | 1464 | Variable Token = new Variable(); |
1465 | Variable x2 = new Variable(); | 1465 | Variable x2 = new Variable(); |
1466 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, x2))) | 1466 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, x2))) |
1467 | { | 1467 | { |
1468 | foreach (bool l3 in prefix_is_atom(Token, Precedence)) | 1468 | foreach (bool l3 in prefix_is_atom(Token, Precedence)) |
1469 | { | 1469 | { |
1470 | yield return false; | 1470 | yield return false; |
1471 | } | 1471 | } |
1472 | } | 1472 | } |
1473 | } | 1473 | } |
1474 | { | 1474 | { |
1475 | object P = arg2; | 1475 | object P = arg2; |
1476 | Variable x1 = new Variable(); | 1476 | Variable x1 = new Variable(); |
1477 | Variable L = new Variable(); | 1477 | Variable L = new Variable(); |
1478 | Variable x3 = new Variable(); | 1478 | Variable x3 = new Variable(); |
1479 | Variable x4 = new Variable(); | 1479 | Variable x4 = new Variable(); |
1480 | foreach (bool l2 in YP.unify(arg1, new Functor(Atom.a(@"infixop", Atom.a(@"")), new object[] { x1, L, x3, x4 }))) | 1480 | foreach (bool l2 in YP.unify(arg1, new Functor(Atom.a(@"infixop", Atom.a(@"")), new object[] { x1, L, x3, x4 }))) |
1481 | { | 1481 | { |
1482 | if (YP.greaterThanOrEqual(L, P)) | 1482 | if (YP.greaterThanOrEqual(L, P)) |
1483 | { | 1483 | { |
1484 | yield return false; | 1484 | yield return false; |
1485 | } | 1485 | } |
1486 | } | 1486 | } |
1487 | } | 1487 | } |
1488 | { | 1488 | { |
1489 | object P = arg2; | 1489 | object P = arg2; |
1490 | Variable x1 = new Variable(); | 1490 | Variable x1 = new Variable(); |
1491 | Variable L = new Variable(); | 1491 | Variable L = new Variable(); |
1492 | Variable x3 = new Variable(); | 1492 | Variable x3 = new Variable(); |
1493 | foreach (bool l2 in YP.unify(arg1, new Functor3(Atom.a(@"postfixop", Atom.a(@"")), x1, L, x3))) | 1493 | foreach (bool l2 in YP.unify(arg1, new Functor3(Atom.a(@"postfixop", Atom.a(@"")), x1, L, x3))) |
1494 | { | 1494 | { |
1495 | if (YP.greaterThanOrEqual(L, P)) | 1495 | if (YP.greaterThanOrEqual(L, P)) |
1496 | { | 1496 | { |
1497 | yield return false; | 1497 | yield return false; |
1498 | } | 1498 | } |
1499 | } | 1499 | } |
1500 | } | 1500 | } |
1501 | { | 1501 | { |
1502 | object x1 = arg2; | 1502 | object x1 = arg2; |
1503 | foreach (bool l2 in YP.unify(arg1, Atom.a(@")"))) | 1503 | foreach (bool l2 in YP.unify(arg1, Atom.a(@")"))) |
1504 | { | 1504 | { |
1505 | yield return false; | 1505 | yield return false; |
1506 | } | 1506 | } |
1507 | } | 1507 | } |
1508 | { | 1508 | { |
1509 | object x1 = arg2; | 1509 | object x1 = arg2; |
1510 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"]"))) | 1510 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"]"))) |
1511 | { | 1511 | { |
1512 | yield return false; | 1512 | yield return false; |
1513 | } | 1513 | } |
1514 | } | 1514 | } |
1515 | { | 1515 | { |
1516 | object x1 = arg2; | 1516 | object x1 = arg2; |
1517 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"}"))) | 1517 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"}"))) |
1518 | { | 1518 | { |
1519 | yield return false; | 1519 | yield return false; |
1520 | } | 1520 | } |
1521 | } | 1521 | } |
1522 | { | 1522 | { |
1523 | object P = arg2; | 1523 | object P = arg2; |
1524 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) | 1524 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) |
1525 | { | 1525 | { |
1526 | if (YP.greaterThanOrEqual(1100, P)) | 1526 | if (YP.greaterThanOrEqual(1100, P)) |
1527 | { | 1527 | { |
1528 | yield return false; | 1528 | yield return false; |
1529 | } | 1529 | } |
1530 | } | 1530 | } |
1531 | } | 1531 | } |
1532 | { | 1532 | { |
1533 | object P = arg2; | 1533 | object P = arg2; |
1534 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) | 1534 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) |
1535 | { | 1535 | { |
1536 | if (YP.greaterThanOrEqual(1000, P)) | 1536 | if (YP.greaterThanOrEqual(1000, P)) |
1537 | { | 1537 | { |
1538 | yield return false; | 1538 | yield return false; |
1539 | } | 1539 | } |
1540 | } | 1540 | } |
1541 | } | 1541 | } |
1542 | { | 1542 | { |
1543 | object x1 = arg2; | 1543 | object x1 = arg2; |
1544 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 1544 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
1545 | { | 1545 | { |
1546 | yield return false; | 1546 | yield return false; |
1547 | } | 1547 | } |
1548 | } | 1548 | } |
1549 | } | 1549 | } |
1550 | 1550 | ||
1551 | public static IEnumerable<bool> exprtl0(object arg1, object arg2, object arg3, object arg4, object arg5) | 1551 | public static IEnumerable<bool> exprtl0(object arg1, object arg2, object arg3, object arg4, object arg5) |
1552 | { | 1552 | { |
1553 | { | 1553 | { |
1554 | object x2 = arg3; | 1554 | object x2 = arg3; |
1555 | Variable Term = new Variable(); | 1555 | Variable Term = new Variable(); |
1556 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 1556 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
1557 | { | 1557 | { |
1558 | foreach (bool l3 in YP.unify(arg2, Term)) | 1558 | foreach (bool l3 in YP.unify(arg2, Term)) |
1559 | { | 1559 | { |
1560 | foreach (bool l4 in YP.unify(arg4, Term)) | 1560 | foreach (bool l4 in YP.unify(arg4, Term)) |
1561 | { | 1561 | { |
1562 | foreach (bool l5 in YP.unify(arg5, Atom.NIL)) | 1562 | foreach (bool l5 in YP.unify(arg5, Atom.NIL)) |
1563 | { | 1563 | { |
1564 | yield return false; | 1564 | yield return false; |
1565 | } | 1565 | } |
1566 | } | 1566 | } |
1567 | } | 1567 | } |
1568 | } | 1568 | } |
1569 | } | 1569 | } |
1570 | { | 1570 | { |
1571 | object Term = arg2; | 1571 | object Term = arg2; |
1572 | object Precedence = arg3; | 1572 | object Precedence = arg3; |
1573 | object Answer = arg4; | 1573 | object Answer = arg4; |
1574 | object S = arg5; | 1574 | object S = arg5; |
1575 | Variable Token = new Variable(); | 1575 | Variable Token = new Variable(); |
1576 | Variable S1 = new Variable(); | 1576 | Variable S1 = new Variable(); |
1577 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S1))) | 1577 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S1))) |
1578 | { | 1578 | { |
1579 | foreach (bool l3 in exprtl0_6(Token, Term, Precedence, Answer, S, S1)) | 1579 | foreach (bool l3 in exprtl0_6(Token, Term, Precedence, Answer, S, S1)) |
1580 | { | 1580 | { |
1581 | yield return false; | 1581 | yield return false; |
1582 | } | 1582 | } |
1583 | } | 1583 | } |
1584 | } | 1584 | } |
1585 | } | 1585 | } |
1586 | 1586 | ||
1587 | public static IEnumerable<bool> exprtl0_6(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) | 1587 | public static IEnumerable<bool> exprtl0_6(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) |
1588 | { | 1588 | { |
1589 | { | 1589 | { |
1590 | object x2 = arg3; | 1590 | object x2 = arg3; |
1591 | object S1 = arg6; | 1591 | object S1 = arg6; |
1592 | Variable Term = new Variable(); | 1592 | Variable Term = new Variable(); |
1593 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"}"))) | 1593 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"}"))) |
1594 | { | 1594 | { |
1595 | foreach (bool l3 in YP.unify(arg2, Term)) | 1595 | foreach (bool l3 in YP.unify(arg2, Term)) |
1596 | { | 1596 | { |
1597 | foreach (bool l4 in YP.unify(arg4, Term)) | 1597 | foreach (bool l4 in YP.unify(arg4, Term)) |
1598 | { | 1598 | { |
1599 | foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a(@"}"), S1))) | 1599 | foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a(@"}"), S1))) |
1600 | { | 1600 | { |
1601 | yield return false; | 1601 | yield return false; |
1602 | } | 1602 | } |
1603 | } | 1603 | } |
1604 | } | 1604 | } |
1605 | } | 1605 | } |
1606 | } | 1606 | } |
1607 | { | 1607 | { |
1608 | object x2 = arg3; | 1608 | object x2 = arg3; |
1609 | object S1 = arg6; | 1609 | object S1 = arg6; |
1610 | Variable Term = new Variable(); | 1610 | Variable Term = new Variable(); |
1611 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"]"))) | 1611 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"]"))) |
1612 | { | 1612 | { |
1613 | foreach (bool l3 in YP.unify(arg2, Term)) | 1613 | foreach (bool l3 in YP.unify(arg2, Term)) |
1614 | { | 1614 | { |
1615 | foreach (bool l4 in YP.unify(arg4, Term)) | 1615 | foreach (bool l4 in YP.unify(arg4, Term)) |
1616 | { | 1616 | { |
1617 | foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a(@"]"), S1))) | 1617 | foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a(@"]"), S1))) |
1618 | { | 1618 | { |
1619 | yield return false; | 1619 | yield return false; |
1620 | } | 1620 | } |
1621 | } | 1621 | } |
1622 | } | 1622 | } |
1623 | } | 1623 | } |
1624 | } | 1624 | } |
1625 | { | 1625 | { |
1626 | object x2 = arg3; | 1626 | object x2 = arg3; |
1627 | object S1 = arg6; | 1627 | object S1 = arg6; |
1628 | Variable Term = new Variable(); | 1628 | Variable Term = new Variable(); |
1629 | foreach (bool l2 in YP.unify(arg1, Atom.a(@")"))) | 1629 | foreach (bool l2 in YP.unify(arg1, Atom.a(@")"))) |
1630 | { | 1630 | { |
1631 | foreach (bool l3 in YP.unify(arg2, Term)) | 1631 | foreach (bool l3 in YP.unify(arg2, Term)) |
1632 | { | 1632 | { |
1633 | foreach (bool l4 in YP.unify(arg4, Term)) | 1633 | foreach (bool l4 in YP.unify(arg4, Term)) |
1634 | { | 1634 | { |
1635 | foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a(@")"), S1))) | 1635 | foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a(@")"), S1))) |
1636 | { | 1636 | { |
1637 | yield return false; | 1637 | yield return false; |
1638 | } | 1638 | } |
1639 | } | 1639 | } |
1640 | } | 1640 | } |
1641 | } | 1641 | } |
1642 | } | 1642 | } |
1643 | { | 1643 | { |
1644 | object Term = arg2; | 1644 | object Term = arg2; |
1645 | object Precedence = arg3; | 1645 | object Precedence = arg3; |
1646 | object Answer = arg4; | 1646 | object Answer = arg4; |
1647 | object S = arg5; | 1647 | object S = arg5; |
1648 | object S1 = arg6; | 1648 | object S1 = arg6; |
1649 | Variable Next = new Variable(); | 1649 | Variable Next = new Variable(); |
1650 | Variable S2 = new Variable(); | 1650 | Variable S2 = new Variable(); |
1651 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) | 1651 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) |
1652 | { | 1652 | { |
1653 | if (YP.greaterThanOrEqual(Precedence, 1000)) | 1653 | if (YP.greaterThanOrEqual(Precedence, 1000)) |
1654 | { | 1654 | { |
1655 | foreach (bool l4 in parse(S1, 1000, Next, S2)) | 1655 | foreach (bool l4 in parse(S1, 1000, Next, S2)) |
1656 | { | 1656 | { |
1657 | foreach (bool l5 in exprtl(S2, 1000, new Functor2(@",", Term, Next), Precedence, Answer, S)) | 1657 | foreach (bool l5 in exprtl(S2, 1000, new Functor2(@",", Term, Next), Precedence, Answer, S)) |
1658 | { | 1658 | { |
1659 | yield return false; | 1659 | yield return false; |
1660 | } | 1660 | } |
1661 | yield break; | 1661 | yield break; |
1662 | } | 1662 | } |
1663 | goto cutIf1; | 1663 | goto cutIf1; |
1664 | } | 1664 | } |
1665 | foreach (bool l3 in YP.unify(Answer, Term)) | 1665 | foreach (bool l3 in YP.unify(Answer, Term)) |
1666 | { | 1666 | { |
1667 | foreach (bool l4 in YP.unify(S, new ListPair(Atom.a(@","), S1))) | 1667 | foreach (bool l4 in YP.unify(S, new ListPair(Atom.a(@","), S1))) |
1668 | { | 1668 | { |
1669 | yield return false; | 1669 | yield return false; |
1670 | } | 1670 | } |
1671 | } | 1671 | } |
1672 | cutIf1: | 1672 | cutIf1: |
1673 | { } | 1673 | { } |
1674 | } | 1674 | } |
1675 | } | 1675 | } |
1676 | { | 1676 | { |
1677 | object Term = arg2; | 1677 | object Term = arg2; |
1678 | object Precedence = arg3; | 1678 | object Precedence = arg3; |
1679 | object Answer = arg4; | 1679 | object Answer = arg4; |
1680 | object S = arg5; | 1680 | object S = arg5; |
1681 | object S1 = arg6; | 1681 | object S1 = arg6; |
1682 | Variable Next = new Variable(); | 1682 | Variable Next = new Variable(); |
1683 | Variable S2 = new Variable(); | 1683 | Variable S2 = new Variable(); |
1684 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) | 1684 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) |
1685 | { | 1685 | { |
1686 | if (YP.greaterThanOrEqual(Precedence, 1100)) | 1686 | if (YP.greaterThanOrEqual(Precedence, 1100)) |
1687 | { | 1687 | { |
1688 | foreach (bool l4 in parse(S1, 1100, Next, S2)) | 1688 | foreach (bool l4 in parse(S1, 1100, Next, S2)) |
1689 | { | 1689 | { |
1690 | foreach (bool l5 in exprtl(S2, 1100, new Functor2(@";", Term, Next), Precedence, Answer, S)) | 1690 | foreach (bool l5 in exprtl(S2, 1100, new Functor2(@";", Term, Next), Precedence, Answer, S)) |
1691 | { | 1691 | { |
1692 | yield return false; | 1692 | yield return false; |
1693 | } | 1693 | } |
1694 | yield break; | 1694 | yield break; |
1695 | } | 1695 | } |
1696 | goto cutIf2; | 1696 | goto cutIf2; |
1697 | } | 1697 | } |
1698 | foreach (bool l3 in YP.unify(Answer, Term)) | 1698 | foreach (bool l3 in YP.unify(Answer, Term)) |
1699 | { | 1699 | { |
1700 | foreach (bool l4 in YP.unify(S, new ListPair(Atom.a(@"|"), S1))) | 1700 | foreach (bool l4 in YP.unify(S, new ListPair(Atom.a(@"|"), S1))) |
1701 | { | 1701 | { |
1702 | yield return false; | 1702 | yield return false; |
1703 | } | 1703 | } |
1704 | } | 1704 | } |
1705 | cutIf2: | 1705 | cutIf2: |
1706 | { } | 1706 | { } |
1707 | } | 1707 | } |
1708 | } | 1708 | } |
1709 | { | 1709 | { |
1710 | object x2 = arg2; | 1710 | object x2 = arg2; |
1711 | object x3 = arg3; | 1711 | object x3 = arg3; |
1712 | object x4 = arg4; | 1712 | object x4 = arg4; |
1713 | object x5 = arg5; | 1713 | object x5 = arg5; |
1714 | object S1 = arg6; | 1714 | object S1 = arg6; |
1715 | Variable S = new Variable(); | 1715 | Variable S = new Variable(); |
1716 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"string", S))) | 1716 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"string", S))) |
1717 | { | 1717 | { |
1718 | foreach (bool l3 in cannot_follow(Atom.a(@"chars"), new Functor1(@"string", S), S1)) | 1718 | foreach (bool l3 in cannot_follow(Atom.a(@"chars"), new Functor1(@"string", S), S1)) |
1719 | { | 1719 | { |
1720 | yield return false; | 1720 | yield return false; |
1721 | } | 1721 | } |
1722 | } | 1722 | } |
1723 | } | 1723 | } |
1724 | { | 1724 | { |
1725 | object x2 = arg2; | 1725 | object x2 = arg2; |
1726 | object x3 = arg3; | 1726 | object x3 = arg3; |
1727 | object x4 = arg4; | 1727 | object x4 = arg4; |
1728 | object x5 = arg5; | 1728 | object x5 = arg5; |
1729 | object S1 = arg6; | 1729 | object S1 = arg6; |
1730 | Variable N = new Variable(); | 1730 | Variable N = new Variable(); |
1731 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"number", N))) | 1731 | foreach (bool l2 in YP.unify(arg1, new Functor1(@"number", N))) |
1732 | { | 1732 | { |
1733 | foreach (bool l3 in cannot_follow(Atom.a(@"number"), new Functor1(@"number", N), S1)) | 1733 | foreach (bool l3 in cannot_follow(Atom.a(@"number"), new Functor1(@"number", N), S1)) |
1734 | { | 1734 | { |
1735 | yield return false; | 1735 | yield return false; |
1736 | } | 1736 | } |
1737 | } | 1737 | } |
1738 | } | 1738 | } |
1739 | { | 1739 | { |
1740 | object Term = arg2; | 1740 | object Term = arg2; |
1741 | object Precedence = arg3; | 1741 | object Precedence = arg3; |
1742 | object Answer = arg4; | 1742 | object Answer = arg4; |
1743 | object S = arg5; | 1743 | object S = arg5; |
1744 | Variable S1 = new Variable(); | 1744 | Variable S1 = new Variable(); |
1745 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"{"))) | 1745 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"{"))) |
1746 | { | 1746 | { |
1747 | foreach (bool l3 in YP.unify(arg6, new ListPair(Atom.a(@"}"), S1))) | 1747 | foreach (bool l3 in YP.unify(arg6, new ListPair(Atom.a(@"}"), S1))) |
1748 | { | 1748 | { |
1749 | foreach (bool l4 in exprtl0_atom(Atom.a(@"{}"), Term, Precedence, Answer, S, S1)) | 1749 | foreach (bool l4 in exprtl0_atom(Atom.a(@"{}"), Term, Precedence, Answer, S, S1)) |
1750 | { | 1750 | { |
1751 | yield return false; | 1751 | yield return false; |
1752 | } | 1752 | } |
1753 | yield break; | 1753 | yield break; |
1754 | } | 1754 | } |
1755 | } | 1755 | } |
1756 | } | 1756 | } |
1757 | { | 1757 | { |
1758 | object x1 = arg2; | 1758 | object x1 = arg2; |
1759 | object x2 = arg3; | 1759 | object x2 = arg3; |
1760 | object x3 = arg4; | 1760 | object x3 = arg4; |
1761 | object x4 = arg5; | 1761 | object x4 = arg5; |
1762 | object S1 = arg6; | 1762 | object S1 = arg6; |
1763 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"{"))) | 1763 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"{"))) |
1764 | { | 1764 | { |
1765 | foreach (bool l3 in cannot_follow(Atom.a(@"brace"), Atom.a(@"{"), S1)) | 1765 | foreach (bool l3 in cannot_follow(Atom.a(@"brace"), Atom.a(@"{"), S1)) |
1766 | { | 1766 | { |
1767 | yield return false; | 1767 | yield return false; |
1768 | } | 1768 | } |
1769 | } | 1769 | } |
1770 | } | 1770 | } |
1771 | { | 1771 | { |
1772 | object Term = arg2; | 1772 | object Term = arg2; |
1773 | object Precedence = arg3; | 1773 | object Precedence = arg3; |
1774 | object Answer = arg4; | 1774 | object Answer = arg4; |
1775 | object S = arg5; | 1775 | object S = arg5; |
1776 | Variable S1 = new Variable(); | 1776 | Variable S1 = new Variable(); |
1777 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) | 1777 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) |
1778 | { | 1778 | { |
1779 | foreach (bool l3 in YP.unify(arg6, new ListPair(Atom.a(@"]"), S1))) | 1779 | foreach (bool l3 in YP.unify(arg6, new ListPair(Atom.a(@"]"), S1))) |
1780 | { | 1780 | { |
1781 | foreach (bool l4 in exprtl0_atom(Atom.NIL, Term, Precedence, Answer, S, S1)) | 1781 | foreach (bool l4 in exprtl0_atom(Atom.NIL, Term, Precedence, Answer, S, S1)) |
1782 | { | 1782 | { |
1783 | yield return false; | 1783 | yield return false; |
1784 | } | 1784 | } |
1785 | yield break; | 1785 | yield break; |
1786 | } | 1786 | } |
1787 | } | 1787 | } |
1788 | } | 1788 | } |
1789 | { | 1789 | { |
1790 | object x1 = arg2; | 1790 | object x1 = arg2; |
1791 | object x2 = arg3; | 1791 | object x2 = arg3; |
1792 | object x3 = arg4; | 1792 | object x3 = arg4; |
1793 | object x4 = arg5; | 1793 | object x4 = arg5; |
1794 | object S1 = arg6; | 1794 | object S1 = arg6; |
1795 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) | 1795 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"["))) |
1796 | { | 1796 | { |
1797 | foreach (bool l3 in cannot_follow(Atom.a(@"bracket"), Atom.a(@"["), S1)) | 1797 | foreach (bool l3 in cannot_follow(Atom.a(@"bracket"), Atom.a(@"["), S1)) |
1798 | { | 1798 | { |
1799 | yield return false; | 1799 | yield return false; |
1800 | } | 1800 | } |
1801 | } | 1801 | } |
1802 | } | 1802 | } |
1803 | { | 1803 | { |
1804 | object x1 = arg2; | 1804 | object x1 = arg2; |
1805 | object x2 = arg3; | 1805 | object x2 = arg3; |
1806 | object x3 = arg4; | 1806 | object x3 = arg4; |
1807 | object x4 = arg5; | 1807 | object x4 = arg5; |
1808 | object S1 = arg6; | 1808 | object S1 = arg6; |
1809 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"("))) | 1809 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"("))) |
1810 | { | 1810 | { |
1811 | foreach (bool l3 in cannot_follow(Atom.a(@"parenthesis"), Atom.a(@"("), S1)) | 1811 | foreach (bool l3 in cannot_follow(Atom.a(@"parenthesis"), Atom.a(@"("), S1)) |
1812 | { | 1812 | { |
1813 | yield return false; | 1813 | yield return false; |
1814 | } | 1814 | } |
1815 | } | 1815 | } |
1816 | } | 1816 | } |
1817 | { | 1817 | { |
1818 | object x1 = arg2; | 1818 | object x1 = arg2; |
1819 | object x2 = arg3; | 1819 | object x2 = arg3; |
1820 | object x3 = arg4; | 1820 | object x3 = arg4; |
1821 | object x4 = arg5; | 1821 | object x4 = arg5; |
1822 | object S1 = arg6; | 1822 | object S1 = arg6; |
1823 | foreach (bool l2 in YP.unify(arg1, Atom.a(@" ("))) | 1823 | foreach (bool l2 in YP.unify(arg1, Atom.a(@" ("))) |
1824 | { | 1824 | { |
1825 | foreach (bool l3 in cannot_follow(Atom.a(@"parenthesis"), Atom.a(@"("), S1)) | 1825 | foreach (bool l3 in cannot_follow(Atom.a(@"parenthesis"), Atom.a(@"("), S1)) |
1826 | { | 1826 | { |
1827 | yield return false; | 1827 | yield return false; |
1828 | } | 1828 | } |
1829 | } | 1829 | } |
1830 | } | 1830 | } |
1831 | { | 1831 | { |
1832 | object x4 = arg2; | 1832 | object x4 = arg2; |
1833 | object x5 = arg3; | 1833 | object x5 = arg3; |
1834 | object x6 = arg4; | 1834 | object x6 = arg4; |
1835 | object x7 = arg5; | 1835 | object x7 = arg5; |
1836 | object S1 = arg6; | 1836 | object S1 = arg6; |
1837 | Variable A = new Variable(); | 1837 | Variable A = new Variable(); |
1838 | Variable B = new Variable(); | 1838 | Variable B = new Variable(); |
1839 | Variable P = new Variable(); | 1839 | Variable P = new Variable(); |
1840 | foreach (bool l2 in YP.unify(arg1, new Functor3(@"var", A, B, P))) | 1840 | foreach (bool l2 in YP.unify(arg1, new Functor3(@"var", A, B, P))) |
1841 | { | 1841 | { |
1842 | foreach (bool l3 in cannot_follow(Atom.a(@"variable"), new Functor3(@"var", A, B, P), S1)) | 1842 | foreach (bool l3 in cannot_follow(Atom.a(@"variable"), new Functor3(@"var", A, B, P), S1)) |
1843 | { | 1843 | { |
1844 | yield return false; | 1844 | yield return false; |
1845 | } | 1845 | } |
1846 | } | 1846 | } |
1847 | } | 1847 | } |
1848 | { | 1848 | { |
1849 | object Term = arg2; | 1849 | object Term = arg2; |
1850 | object Precedence = arg3; | 1850 | object Precedence = arg3; |
1851 | object Answer = arg4; | 1851 | object Answer = arg4; |
1852 | object S = arg5; | 1852 | object S = arg5; |
1853 | object S1 = arg6; | 1853 | object S1 = arg6; |
1854 | Variable F = new Variable(); | 1854 | Variable F = new Variable(); |
1855 | Variable P = new Variable(); | 1855 | Variable P = new Variable(); |
1856 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"atom", F, P))) | 1856 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"atom", F, P))) |
1857 | { | 1857 | { |
1858 | foreach (bool l3 in exprtl0_atom(new Functor2(@"/", F, P), Term, Precedence, Answer, S, S1)) | 1858 | foreach (bool l3 in exprtl0_atom(new Functor2(@"/", F, P), Term, Precedence, Answer, S, S1)) |
1859 | { | 1859 | { |
1860 | yield return false; | 1860 | yield return false; |
1861 | } | 1861 | } |
1862 | } | 1862 | } |
1863 | } | 1863 | } |
1864 | } | 1864 | } |
1865 | 1865 | ||
1866 | public static IEnumerable<bool> exprtl0_atom(object arg1, object arg2, object arg3, object arg4, object arg5, object S1) | 1866 | public static IEnumerable<bool> exprtl0_atom(object arg1, object arg2, object arg3, object arg4, object arg5, object S1) |
1867 | { | 1867 | { |
1868 | { | 1868 | { |
1869 | object Term = arg2; | 1869 | object Term = arg2; |
1870 | object Precedence = arg3; | 1870 | object Precedence = arg3; |
1871 | object Answer = arg4; | 1871 | object Answer = arg4; |
1872 | object S = arg5; | 1872 | object S = arg5; |
1873 | Variable F = new Variable(); | 1873 | Variable F = new Variable(); |
1874 | Variable Pos = new Variable(); | 1874 | Variable Pos = new Variable(); |
1875 | Variable L1 = new Variable(); | 1875 | Variable L1 = new Variable(); |
1876 | Variable O1 = new Variable(); | 1876 | Variable O1 = new Variable(); |
1877 | Variable R1 = new Variable(); | 1877 | Variable R1 = new Variable(); |
1878 | Variable L2 = new Variable(); | 1878 | Variable L2 = new Variable(); |
1879 | Variable O2 = new Variable(); | 1879 | Variable O2 = new Variable(); |
1880 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", F, Pos))) | 1880 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", F, Pos))) |
1881 | { | 1881 | { |
1882 | foreach (bool l3 in ambigop(F, Precedence, L1, O1, R1, L2, O2)) | 1882 | foreach (bool l3 in ambigop(F, Precedence, L1, O1, R1, L2, O2)) |
1883 | { | 1883 | { |
1884 | foreach (bool l4 in prefix_is_atom(S1, Precedence)) | 1884 | foreach (bool l4 in prefix_is_atom(S1, Precedence)) |
1885 | { | 1885 | { |
1886 | foreach (bool l5 in exprtl(new ListPair(new Functor3(Atom.a(@"postfixop", Atom.a(@"")), new Functor2(@"/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S)) | 1886 | foreach (bool l5 in exprtl(new ListPair(new Functor3(Atom.a(@"postfixop", Atom.a(@"")), new Functor2(@"/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S)) |
1887 | { | 1887 | { |
1888 | yield return false; | 1888 | yield return false; |
1889 | } | 1889 | } |
1890 | yield break; | 1890 | yield break; |
1891 | } | 1891 | } |
1892 | foreach (bool l4 in exprtl(new ListPair(new Functor(Atom.a(@"infixop", Atom.a(@"")), new object[] { new Functor2(@"/", F, Pos), L1, O1, R1 }), S1), 0, Term, Precedence, Answer, S)) | 1892 | foreach (bool l4 in exprtl(new ListPair(new Functor(Atom.a(@"infixop", Atom.a(@"")), new object[] { new Functor2(@"/", F, Pos), L1, O1, R1 }), S1), 0, Term, Precedence, Answer, S)) |
1893 | { | 1893 | { |
1894 | yield return false; | 1894 | yield return false; |
1895 | } | 1895 | } |
1896 | foreach (bool l4 in exprtl(new ListPair(new Functor3(Atom.a(@"postfixop", Atom.a(@"")), new Functor2(@"/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S)) | 1896 | foreach (bool l4 in exprtl(new ListPair(new Functor3(Atom.a(@"postfixop", Atom.a(@"")), new Functor2(@"/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S)) |
1897 | { | 1897 | { |
1898 | yield return false; | 1898 | yield return false; |
1899 | } | 1899 | } |
1900 | yield break; | 1900 | yield break; |
1901 | } | 1901 | } |
1902 | } | 1902 | } |
1903 | } | 1903 | } |
1904 | { | 1904 | { |
1905 | object Term = arg2; | 1905 | object Term = arg2; |
1906 | object Precedence = arg3; | 1906 | object Precedence = arg3; |
1907 | object Answer = arg4; | 1907 | object Answer = arg4; |
1908 | object S = arg5; | 1908 | object S = arg5; |
1909 | Variable F = new Variable(); | 1909 | Variable F = new Variable(); |
1910 | Variable Pos = new Variable(); | 1910 | Variable Pos = new Variable(); |
1911 | Variable L1 = new Variable(); | 1911 | Variable L1 = new Variable(); |
1912 | Variable O1 = new Variable(); | 1912 | Variable O1 = new Variable(); |
1913 | Variable R1 = new Variable(); | 1913 | Variable R1 = new Variable(); |
1914 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", F, Pos))) | 1914 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", F, Pos))) |
1915 | { | 1915 | { |
1916 | foreach (bool l3 in infixop(F, L1, O1, R1)) | 1916 | foreach (bool l3 in infixop(F, L1, O1, R1)) |
1917 | { | 1917 | { |
1918 | foreach (bool l4 in exprtl(new ListPair(new Functor(Atom.a(@"infixop", Atom.a(@"")), new object[] { new Functor2(@"/", F, Pos), L1, O1, R1 }), S1), 0, Term, Precedence, Answer, S)) | 1918 | foreach (bool l4 in exprtl(new ListPair(new Functor(Atom.a(@"infixop", Atom.a(@"")), new object[] { new Functor2(@"/", F, Pos), L1, O1, R1 }), S1), 0, Term, Precedence, Answer, S)) |
1919 | { | 1919 | { |
1920 | yield return false; | 1920 | yield return false; |
1921 | } | 1921 | } |
1922 | yield break; | 1922 | yield break; |
1923 | } | 1923 | } |
1924 | } | 1924 | } |
1925 | } | 1925 | } |
1926 | { | 1926 | { |
1927 | object Term = arg2; | 1927 | object Term = arg2; |
1928 | object Precedence = arg3; | 1928 | object Precedence = arg3; |
1929 | object Answer = arg4; | 1929 | object Answer = arg4; |
1930 | object S = arg5; | 1930 | object S = arg5; |
1931 | Variable F = new Variable(); | 1931 | Variable F = new Variable(); |
1932 | Variable Pos = new Variable(); | 1932 | Variable Pos = new Variable(); |
1933 | Variable L2 = new Variable(); | 1933 | Variable L2 = new Variable(); |
1934 | Variable O2 = new Variable(); | 1934 | Variable O2 = new Variable(); |
1935 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", F, Pos))) | 1935 | foreach (bool l2 in YP.unify(arg1, new Functor2(@"/", F, Pos))) |
1936 | { | 1936 | { |
1937 | foreach (bool l3 in postfixop(F, L2, O2)) | 1937 | foreach (bool l3 in postfixop(F, L2, O2)) |
1938 | { | 1938 | { |
1939 | foreach (bool l4 in exprtl(new ListPair(new Functor3(Atom.a(@"postfixop", Atom.a(@"")), new Functor2(@"/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S)) | 1939 | foreach (bool l4 in exprtl(new ListPair(new Functor3(Atom.a(@"postfixop", Atom.a(@"")), new Functor2(@"/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S)) |
1940 | { | 1940 | { |
1941 | yield return false; | 1941 | yield return false; |
1942 | } | 1942 | } |
1943 | yield break; | 1943 | yield break; |
1944 | } | 1944 | } |
1945 | } | 1945 | } |
1946 | } | 1946 | } |
1947 | { | 1947 | { |
1948 | object X = arg1; | 1948 | object X = arg1; |
1949 | object x2 = arg2; | 1949 | object x2 = arg2; |
1950 | object x3 = arg3; | 1950 | object x3 = arg3; |
1951 | object x4 = arg4; | 1951 | object x4 = arg4; |
1952 | object x5 = arg5; | 1952 | object x5 = arg5; |
1953 | Variable x7 = new Variable(); | 1953 | Variable x7 = new Variable(); |
1954 | foreach (bool l2 in syntax_error(new ListPair(new Functor2(@"-", Atom.a(@"non"), Atom.a(@"operator")), new ListPair(X, new ListPair(Atom.a(@"follows"), new ListPair(Atom.a(@"expression"), Atom.NIL)))), new ListPair(new Functor2(@"atom", X, x7), S1))) | 1954 | foreach (bool l2 in syntax_error(new ListPair(new Functor2(@"-", Atom.a(@"non"), Atom.a(@"operator")), new ListPair(X, new ListPair(Atom.a(@"follows"), new ListPair(Atom.a(@"expression"), Atom.NIL)))), new ListPair(new Functor2(@"atom", X, x7), S1))) |
1955 | { | 1955 | { |
1956 | yield return false; | 1956 | yield return false; |
1957 | } | 1957 | } |
1958 | yield break; | 1958 | yield break; |
1959 | } | 1959 | } |
1960 | } | 1960 | } |
1961 | 1961 | ||
1962 | public static IEnumerable<bool> cannot_follow(object Type, object Token, object Tokens) | 1962 | public static IEnumerable<bool> cannot_follow(object Type, object Token, object Tokens) |
1963 | { | 1963 | { |
1964 | { | 1964 | { |
1965 | foreach (bool l2 in syntax_error(new ListPair(Type, new ListPair(Atom.a(@"follows"), new ListPair(Atom.a(@"expression"), Atom.NIL))), new ListPair(Token, Tokens))) | 1965 | foreach (bool l2 in syntax_error(new ListPair(Type, new ListPair(Atom.a(@"follows"), new ListPair(Atom.a(@"expression"), Atom.NIL))), new ListPair(Token, Tokens))) |
1966 | { | 1966 | { |
1967 | yield return false; | 1967 | yield return false; |
1968 | } | 1968 | } |
1969 | } | 1969 | } |
1970 | } | 1970 | } |
1971 | 1971 | ||
1972 | public static IEnumerable<bool> exprtl(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) | 1972 | public static IEnumerable<bool> exprtl(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) |
1973 | { | 1973 | { |
1974 | { | 1974 | { |
1975 | object x1 = arg2; | 1975 | object x1 = arg2; |
1976 | object x3 = arg4; | 1976 | object x3 = arg4; |
1977 | Variable Term = new Variable(); | 1977 | Variable Term = new Variable(); |
1978 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 1978 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
1979 | { | 1979 | { |
1980 | foreach (bool l3 in YP.unify(arg3, Term)) | 1980 | foreach (bool l3 in YP.unify(arg3, Term)) |
1981 | { | 1981 | { |
1982 | foreach (bool l4 in YP.unify(arg5, Term)) | 1982 | foreach (bool l4 in YP.unify(arg5, Term)) |
1983 | { | 1983 | { |
1984 | foreach (bool l5 in YP.unify(arg6, Atom.NIL)) | 1984 | foreach (bool l5 in YP.unify(arg6, Atom.NIL)) |
1985 | { | 1985 | { |
1986 | yield return false; | 1986 | yield return false; |
1987 | } | 1987 | } |
1988 | } | 1988 | } |
1989 | } | 1989 | } |
1990 | } | 1990 | } |
1991 | } | 1991 | } |
1992 | { | 1992 | { |
1993 | object C = arg2; | 1993 | object C = arg2; |
1994 | object Term = arg3; | 1994 | object Term = arg3; |
1995 | object Precedence = arg4; | 1995 | object Precedence = arg4; |
1996 | object Answer = arg5; | 1996 | object Answer = arg5; |
1997 | object S = arg6; | 1997 | object S = arg6; |
1998 | Variable Token = new Variable(); | 1998 | Variable Token = new Variable(); |
1999 | Variable Tokens = new Variable(); | 1999 | Variable Tokens = new Variable(); |
2000 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, Tokens))) | 2000 | foreach (bool l2 in YP.unify(arg1, new ListPair(Token, Tokens))) |
2001 | { | 2001 | { |
2002 | foreach (bool l3 in exprtl_7(Token, C, Term, Precedence, Answer, S, Tokens)) | 2002 | foreach (bool l3 in exprtl_7(Token, C, Term, Precedence, Answer, S, Tokens)) |
2003 | { | 2003 | { |
2004 | yield return false; | 2004 | yield return false; |
2005 | } | 2005 | } |
2006 | } | 2006 | } |
2007 | } | 2007 | } |
2008 | } | 2008 | } |
2009 | 2009 | ||
2010 | public static IEnumerable<bool> exprtl_7(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7) | 2010 | public static IEnumerable<bool> exprtl_7(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7) |
2011 | { | 2011 | { |
2012 | { | 2012 | { |
2013 | object C = arg2; | 2013 | object C = arg2; |
2014 | object Term = arg3; | 2014 | object Term = arg3; |
2015 | object Precedence = arg4; | 2015 | object Precedence = arg4; |
2016 | object Answer = arg5; | 2016 | object Answer = arg5; |
2017 | object S = arg6; | 2017 | object S = arg6; |
2018 | object S1 = arg7; | 2018 | object S1 = arg7; |
2019 | Variable F = new Variable(); | 2019 | Variable F = new Variable(); |
2020 | Variable Pos = new Variable(); | 2020 | Variable Pos = new Variable(); |
2021 | Variable L = new Variable(); | 2021 | Variable L = new Variable(); |
2022 | Variable O = new Variable(); | 2022 | Variable O = new Variable(); |
2023 | Variable R = new Variable(); | 2023 | Variable R = new Variable(); |
2024 | Variable Other = new Variable(); | 2024 | Variable Other = new Variable(); |
2025 | Variable S2 = new Variable(); | 2025 | Variable S2 = new Variable(); |
2026 | Variable Expr = new Variable(); | 2026 | Variable Expr = new Variable(); |
2027 | foreach (bool l2 in YP.unify(arg1, new Functor(Atom.a(@"infixop", Atom.a(@"")), new object[] { new Functor2(@"/", F, Pos), L, O, R }))) | 2027 | foreach (bool l2 in YP.unify(arg1, new Functor(Atom.a(@"infixop", Atom.a(@"")), new object[] { new Functor2(@"/", F, Pos), L, O, R }))) |
2028 | { | 2028 | { |
2029 | if (YP.greaterThanOrEqual(Precedence, O)) | 2029 | if (YP.greaterThanOrEqual(Precedence, O)) |
2030 | { | 2030 | { |
2031 | if (YP.lessThanOrEqual(C, L)) | 2031 | if (YP.lessThanOrEqual(C, L)) |
2032 | { | 2032 | { |
2033 | foreach (bool l5 in parse(S1, R, Other, S2)) | 2033 | foreach (bool l5 in parse(S1, R, Other, S2)) |
2034 | { | 2034 | { |
2035 | foreach (bool l6 in YP.univ(Expr, new ListPair(F, new ListPair(Pos, new ListPair(Term, new ListPair(Other, Atom.NIL)))))) | 2035 | foreach (bool l6 in YP.univ(Expr, new ListPair(F, new ListPair(Pos, new ListPair(Term, new ListPair(Other, Atom.NIL)))))) |
2036 | { | 2036 | { |
2037 | foreach (bool l7 in exprtl(S2, O, Expr, Precedence, Answer, S)) | 2037 | foreach (bool l7 in exprtl(S2, O, Expr, Precedence, Answer, S)) |
2038 | { | 2038 | { |
2039 | yield return false; | 2039 | yield return false; |
2040 | } | 2040 | } |
2041 | } | 2041 | } |
2042 | } | 2042 | } |
2043 | yield break; | 2043 | yield break; |
2044 | } | 2044 | } |
2045 | } | 2045 | } |
2046 | } | 2046 | } |
2047 | } | 2047 | } |
2048 | { | 2048 | { |
2049 | object C = arg2; | 2049 | object C = arg2; |
2050 | object Term = arg3; | 2050 | object Term = arg3; |
2051 | object Precedence = arg4; | 2051 | object Precedence = arg4; |
2052 | object Answer = arg5; | 2052 | object Answer = arg5; |
2053 | object S = arg6; | 2053 | object S = arg6; |
2054 | object S1 = arg7; | 2054 | object S1 = arg7; |
2055 | Variable F = new Variable(); | 2055 | Variable F = new Variable(); |
2056 | Variable Pos = new Variable(); | 2056 | Variable Pos = new Variable(); |
2057 | Variable L = new Variable(); | 2057 | Variable L = new Variable(); |
2058 | Variable O = new Variable(); | 2058 | Variable O = new Variable(); |
2059 | Variable Expr = new Variable(); | 2059 | Variable Expr = new Variable(); |
2060 | Variable S2 = new Variable(); | 2060 | Variable S2 = new Variable(); |
2061 | foreach (bool l2 in YP.unify(arg1, new Functor3(Atom.a(@"postfixop", Atom.a(@"")), new Functor2(@"/", F, Pos), L, O))) | 2061 | foreach (bool l2 in YP.unify(arg1, new Functor3(Atom.a(@"postfixop", Atom.a(@"")), new Functor2(@"/", F, Pos), L, O))) |
2062 | { | 2062 | { |
2063 | if (YP.greaterThanOrEqual(Precedence, O)) | 2063 | if (YP.greaterThanOrEqual(Precedence, O)) |
2064 | { | 2064 | { |
2065 | if (YP.lessThanOrEqual(C, L)) | 2065 | if (YP.lessThanOrEqual(C, L)) |
2066 | { | 2066 | { |
2067 | foreach (bool l5 in YP.univ(Expr, new ListPair(F, new ListPair(Pos, new ListPair(Term, Atom.NIL))))) | 2067 | foreach (bool l5 in YP.univ(Expr, new ListPair(F, new ListPair(Pos, new ListPair(Term, Atom.NIL))))) |
2068 | { | 2068 | { |
2069 | foreach (bool l6 in peepop(S1, S2)) | 2069 | foreach (bool l6 in peepop(S1, S2)) |
2070 | { | 2070 | { |
2071 | foreach (bool l7 in exprtl(S2, O, Expr, Precedence, Answer, S)) | 2071 | foreach (bool l7 in exprtl(S2, O, Expr, Precedence, Answer, S)) |
2072 | { | 2072 | { |
2073 | yield return false; | 2073 | yield return false; |
2074 | } | 2074 | } |
2075 | } | 2075 | } |
2076 | } | 2076 | } |
2077 | yield break; | 2077 | yield break; |
2078 | } | 2078 | } |
2079 | } | 2079 | } |
2080 | } | 2080 | } |
2081 | } | 2081 | } |
2082 | { | 2082 | { |
2083 | object C = arg2; | 2083 | object C = arg2; |
2084 | object Term = arg3; | 2084 | object Term = arg3; |
2085 | object Precedence = arg4; | 2085 | object Precedence = arg4; |
2086 | object Answer = arg5; | 2086 | object Answer = arg5; |
2087 | object S = arg6; | 2087 | object S = arg6; |
2088 | object S1 = arg7; | 2088 | object S1 = arg7; |
2089 | Variable Next = new Variable(); | 2089 | Variable Next = new Variable(); |
2090 | Variable S2 = new Variable(); | 2090 | Variable S2 = new Variable(); |
2091 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) | 2091 | foreach (bool l2 in YP.unify(arg1, Atom.a(@","))) |
2092 | { | 2092 | { |
2093 | if (YP.greaterThanOrEqual(Precedence, 1000)) | 2093 | if (YP.greaterThanOrEqual(Precedence, 1000)) |
2094 | { | 2094 | { |
2095 | if (YP.lessThan(C, 1000)) | 2095 | if (YP.lessThan(C, 1000)) |
2096 | { | 2096 | { |
2097 | foreach (bool l5 in parse(S1, 1000, Next, S2)) | 2097 | foreach (bool l5 in parse(S1, 1000, Next, S2)) |
2098 | { | 2098 | { |
2099 | foreach (bool l6 in exprtl(S2, 1000, new Functor2(@",", Term, Next), Precedence, Answer, S)) | 2099 | foreach (bool l6 in exprtl(S2, 1000, new Functor2(@",", Term, Next), Precedence, Answer, S)) |
2100 | { | 2100 | { |
2101 | yield return false; | 2101 | yield return false; |
2102 | } | 2102 | } |
2103 | } | 2103 | } |
2104 | yield break; | 2104 | yield break; |
2105 | } | 2105 | } |
2106 | } | 2106 | } |
2107 | } | 2107 | } |
2108 | } | 2108 | } |
2109 | { | 2109 | { |
2110 | object C = arg2; | 2110 | object C = arg2; |
2111 | object Term = arg3; | 2111 | object Term = arg3; |
2112 | object Precedence = arg4; | 2112 | object Precedence = arg4; |
2113 | object Answer = arg5; | 2113 | object Answer = arg5; |
2114 | object S = arg6; | 2114 | object S = arg6; |
2115 | object S1 = arg7; | 2115 | object S1 = arg7; |
2116 | Variable Next = new Variable(); | 2116 | Variable Next = new Variable(); |
2117 | Variable S2 = new Variable(); | 2117 | Variable S2 = new Variable(); |
2118 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) | 2118 | foreach (bool l2 in YP.unify(arg1, Atom.a(@"|"))) |
2119 | { | 2119 | { |
2120 | if (YP.greaterThanOrEqual(Precedence, 1100)) | 2120 | if (YP.greaterThanOrEqual(Precedence, 1100)) |
2121 | { | 2121 | { |
2122 | if (YP.lessThan(C, 1100)) | 2122 | if (YP.lessThan(C, 1100)) |
2123 | { | 2123 | { |
2124 | foreach (bool l5 in parse(S1, 1100, Next, S2)) | 2124 | foreach (bool l5 in parse(S1, 1100, Next, S2)) |
2125 | { | 2125 | { |
2126 | foreach (bool l6 in exprtl(S2, 1100, new Functor2(@";", Term, Next), Precedence, Answer, S)) | 2126 | foreach (bool l6 in exprtl(S2, 1100, new Functor2(@";", Term, Next), Precedence, Answer, S)) |
2127 | { | 2127 | { |
2128 | yield return false; | 2128 | yield return false; |
2129 | } | 2129 | } |
2130 | } | 2130 | } |
2131 | yield break; | 2131 | yield break; |
2132 | } | 2132 | } |
2133 | } | 2133 | } |
2134 | } | 2134 | } |
2135 | } | 2135 | } |
2136 | { | 2136 | { |
2137 | object Token = arg1; | 2137 | object Token = arg1; |
2138 | object x2 = arg2; | 2138 | object x2 = arg2; |
2139 | object x4 = arg4; | 2139 | object x4 = arg4; |
2140 | object Tokens = arg7; | 2140 | object Tokens = arg7; |
2141 | Variable Term = new Variable(); | 2141 | Variable Term = new Variable(); |
2142 | foreach (bool l2 in YP.unify(arg3, Term)) | 2142 | foreach (bool l2 in YP.unify(arg3, Term)) |
2143 | { | 2143 | { |
2144 | foreach (bool l3 in YP.unify(arg5, Term)) | 2144 | foreach (bool l3 in YP.unify(arg5, Term)) |
2145 | { | 2145 | { |
2146 | foreach (bool l4 in YP.unify(arg6, new ListPair(Token, Tokens))) | 2146 | foreach (bool l4 in YP.unify(arg6, new ListPair(Token, Tokens))) |
2147 | { | 2147 | { |
2148 | yield return false; | 2148 | yield return false; |
2149 | } | 2149 | } |
2150 | } | 2150 | } |
2151 | } | 2151 | } |
2152 | } | 2152 | } |
2153 | } | 2153 | } |
2154 | 2154 | ||
2155 | public static IEnumerable<bool> syntax_error(object _Message, object _List) | 2155 | public static IEnumerable<bool> syntax_error(object _Message, object _List) |
2156 | { | 2156 | { |
2157 | { | 2157 | { |
2158 | yield break; | 2158 | yield break; |
2159 | } | 2159 | } |
2160 | } | 2160 | } |
2161 | 2161 | ||
2162 | public static IEnumerable<bool> syntax_error(object _List) | 2162 | public static IEnumerable<bool> syntax_error(object _List) |
2163 | { | 2163 | { |
2164 | { | 2164 | { |
2165 | yield break; | 2165 | yield break; |
2166 | } | 2166 | } |
2167 | } | 2167 | } |
2168 | 2168 | ||
2169 | public static IEnumerable<bool> prefixop(object F, object O, object Q) | 2169 | public static IEnumerable<bool> prefixop(object F, object O, object Q) |
2170 | { | 2170 | { |
2171 | { | 2171 | { |
2172 | foreach (bool l2 in YP.current_op(O, Atom.a(@"fx"), F)) | 2172 | foreach (bool l2 in YP.current_op(O, Atom.a(@"fx"), F)) |
2173 | { | 2173 | { |
2174 | foreach (bool l3 in YP.unify(Q, YP.subtract(O, 1))) | 2174 | foreach (bool l3 in YP.unify(Q, YP.subtract(O, 1))) |
2175 | { | 2175 | { |
2176 | yield return false; | 2176 | yield return false; |
2177 | } | 2177 | } |
2178 | goto cutIf1; | 2178 | goto cutIf1; |
2179 | } | 2179 | } |
2180 | foreach (bool l2 in YP.current_op(O, Atom.a(@"fy"), F)) | 2180 | foreach (bool l2 in YP.current_op(O, Atom.a(@"fy"), F)) |
2181 | { | 2181 | { |
2182 | foreach (bool l3 in YP.unify(Q, O)) | 2182 | foreach (bool l3 in YP.unify(Q, O)) |
2183 | { | 2183 | { |
2184 | yield return false; | 2184 | yield return false; |
2185 | } | 2185 | } |
2186 | goto cutIf2; | 2186 | goto cutIf2; |
2187 | } | 2187 | } |
2188 | cutIf2: | 2188 | cutIf2: |
2189 | cutIf1: | 2189 | cutIf1: |
2190 | { } | 2190 | { } |
2191 | } | 2191 | } |
2192 | } | 2192 | } |
2193 | 2193 | ||
2194 | public static IEnumerable<bool> postfixop(object F, object P, object O) | 2194 | public static IEnumerable<bool> postfixop(object F, object P, object O) |
2195 | { | 2195 | { |
2196 | { | 2196 | { |
2197 | foreach (bool l2 in YP.current_op(O, Atom.a(@"xf"), F)) | 2197 | foreach (bool l2 in YP.current_op(O, Atom.a(@"xf"), F)) |
2198 | { | 2198 | { |
2199 | foreach (bool l3 in YP.unify(P, YP.subtract(O, 1))) | 2199 | foreach (bool l3 in YP.unify(P, YP.subtract(O, 1))) |
2200 | { | 2200 | { |
2201 | yield return false; | 2201 | yield return false; |
2202 | } | 2202 | } |
2203 | goto cutIf1; | 2203 | goto cutIf1; |
2204 | } | 2204 | } |
2205 | foreach (bool l2 in YP.current_op(O, Atom.a(@"yf"), F)) | 2205 | foreach (bool l2 in YP.current_op(O, Atom.a(@"yf"), F)) |
2206 | { | 2206 | { |
2207 | foreach (bool l3 in YP.unify(P, O)) | 2207 | foreach (bool l3 in YP.unify(P, O)) |
2208 | { | 2208 | { |
2209 | yield return false; | 2209 | yield return false; |
2210 | } | 2210 | } |
2211 | goto cutIf2; | 2211 | goto cutIf2; |
2212 | } | 2212 | } |
2213 | cutIf2: | 2213 | cutIf2: |
2214 | cutIf1: | 2214 | cutIf1: |
2215 | { } | 2215 | { } |
2216 | } | 2216 | } |
2217 | } | 2217 | } |
2218 | 2218 | ||
2219 | public static IEnumerable<bool> infixop(object F, object P, object O, object Q) | 2219 | public static IEnumerable<bool> infixop(object F, object P, object O, object Q) |
2220 | { | 2220 | { |
2221 | { | 2221 | { |
2222 | foreach (bool l2 in YP.current_op(O, Atom.a(@"xfy"), F)) | 2222 | foreach (bool l2 in YP.current_op(O, Atom.a(@"xfy"), F)) |
2223 | { | 2223 | { |
2224 | foreach (bool l3 in YP.unify(P, YP.subtract(O, 1))) | 2224 | foreach (bool l3 in YP.unify(P, YP.subtract(O, 1))) |
2225 | { | 2225 | { |
2226 | foreach (bool l4 in YP.unify(Q, O)) | 2226 | foreach (bool l4 in YP.unify(Q, O)) |
2227 | { | 2227 | { |
2228 | yield return false; | 2228 | yield return false; |
2229 | } | 2229 | } |
2230 | } | 2230 | } |
2231 | goto cutIf1; | 2231 | goto cutIf1; |
2232 | } | 2232 | } |
2233 | foreach (bool l2 in YP.current_op(O, Atom.a(@"xfx"), F)) | 2233 | foreach (bool l2 in YP.current_op(O, Atom.a(@"xfx"), F)) |
2234 | { | 2234 | { |
2235 | foreach (bool l3 in YP.unify(P, YP.subtract(O, 1))) | 2235 | foreach (bool l3 in YP.unify(P, YP.subtract(O, 1))) |
2236 | { | 2236 | { |
2237 | foreach (bool l4 in YP.unify(Q, P)) | 2237 | foreach (bool l4 in YP.unify(Q, P)) |
2238 | { | 2238 | { |
2239 | yield return false; | 2239 | yield return false; |
2240 | } | 2240 | } |
2241 | } | 2241 | } |
2242 | goto cutIf2; | 2242 | goto cutIf2; |
2243 | } | 2243 | } |
2244 | foreach (bool l2 in YP.current_op(O, Atom.a(@"yfx"), F)) | 2244 | foreach (bool l2 in YP.current_op(O, Atom.a(@"yfx"), F)) |
2245 | { | 2245 | { |
2246 | foreach (bool l3 in YP.unify(Q, YP.subtract(O, 1))) | 2246 | foreach (bool l3 in YP.unify(Q, YP.subtract(O, 1))) |
2247 | { | 2247 | { |
2248 | foreach (bool l4 in YP.unify(P, O)) | 2248 | foreach (bool l4 in YP.unify(P, O)) |
2249 | { | 2249 | { |
2250 | yield return false; | 2250 | yield return false; |
2251 | } | 2251 | } |
2252 | } | 2252 | } |
2253 | goto cutIf3; | 2253 | goto cutIf3; |
2254 | } | 2254 | } |
2255 | cutIf3: | 2255 | cutIf3: |
2256 | cutIf2: | 2256 | cutIf2: |
2257 | cutIf1: | 2257 | cutIf1: |
2258 | { } | 2258 | { } |
2259 | } | 2259 | } |
2260 | } | 2260 | } |
2261 | 2261 | ||
2262 | public static IEnumerable<bool> ambigop(object F, object Precedence, object L1, object O1, object R1, object L2, object O2) | 2262 | public static IEnumerable<bool> ambigop(object F, object Precedence, object L1, object O1, object R1, object L2, object O2) |
2263 | { | 2263 | { |
2264 | { | 2264 | { |
2265 | foreach (bool l2 in postfixop(F, L2, O2)) | 2265 | foreach (bool l2 in postfixop(F, L2, O2)) |
2266 | { | 2266 | { |
2267 | if (YP.lessThanOrEqual(O2, Precedence)) | 2267 | if (YP.lessThanOrEqual(O2, Precedence)) |
2268 | { | 2268 | { |
2269 | foreach (bool l4 in infixop(F, L1, O1, R1)) | 2269 | foreach (bool l4 in infixop(F, L1, O1, R1)) |
2270 | { | 2270 | { |
2271 | if (YP.lessThanOrEqual(O1, Precedence)) | 2271 | if (YP.lessThanOrEqual(O1, Precedence)) |
2272 | { | 2272 | { |
2273 | yield return false; | 2273 | yield return false; |
2274 | } | 2274 | } |
2275 | } | 2275 | } |
2276 | } | 2276 | } |
2277 | } | 2277 | } |
2278 | } | 2278 | } |
2279 | } | 2279 | } |
2280 | 2280 | ||
2281 | public static IEnumerable<bool> read_tokens1(object arg1) | 2281 | public static IEnumerable<bool> read_tokens1(object arg1) |
2282 | { | 2282 | { |
2283 | { | 2283 | { |
2284 | object TokenList = arg1; | 2284 | object TokenList = arg1; |
2285 | Variable C1 = new Variable(); | 2285 | Variable C1 = new Variable(); |
2286 | Variable _X = new Variable(); | 2286 | Variable _X = new Variable(); |
2287 | Variable ListOfTokens = new Variable(); | 2287 | Variable ListOfTokens = new Variable(); |
2288 | foreach (bool l2 in YP.get_code(C1)) | 2288 | foreach (bool l2 in YP.get_code(C1)) |
2289 | { | 2289 | { |
2290 | foreach (bool l3 in read_tokens(C1, _X, ListOfTokens)) | 2290 | foreach (bool l3 in read_tokens(C1, _X, ListOfTokens)) |
2291 | { | 2291 | { |
2292 | foreach (bool l4 in YP.unify(TokenList, ListOfTokens)) | 2292 | foreach (bool l4 in YP.unify(TokenList, ListOfTokens)) |
2293 | { | 2293 | { |
2294 | yield return false; | 2294 | yield return false; |
2295 | } | 2295 | } |
2296 | yield break; | 2296 | yield break; |
2297 | } | 2297 | } |
2298 | } | 2298 | } |
2299 | } | 2299 | } |
2300 | { | 2300 | { |
2301 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"atom", Atom.a(@"end_of_file"), 0), Atom.NIL))) | 2301 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"atom", Atom.a(@"end_of_file"), 0), Atom.NIL))) |
2302 | { | 2302 | { |
2303 | yield return false; | 2303 | yield return false; |
2304 | } | 2304 | } |
2305 | } | 2305 | } |
2306 | } | 2306 | } |
2307 | 2307 | ||
2308 | public static IEnumerable<bool> read_tokens2(object arg1, object arg2) | 2308 | public static IEnumerable<bool> read_tokens2(object arg1, object arg2) |
2309 | { | 2309 | { |
2310 | { | 2310 | { |
2311 | object TokenList = arg1; | 2311 | object TokenList = arg1; |
2312 | object Dictionary = arg2; | 2312 | object Dictionary = arg2; |
2313 | Variable C1 = new Variable(); | 2313 | Variable C1 = new Variable(); |
2314 | Variable Dict = new Variable(); | 2314 | Variable Dict = new Variable(); |
2315 | Variable ListOfTokens = new Variable(); | 2315 | Variable ListOfTokens = new Variable(); |
2316 | foreach (bool l2 in YP.get_code(C1)) | 2316 | foreach (bool l2 in YP.get_code(C1)) |
2317 | { | 2317 | { |
2318 | foreach (bool l3 in read_tokens(C1, Dict, ListOfTokens)) | 2318 | foreach (bool l3 in read_tokens(C1, Dict, ListOfTokens)) |
2319 | { | 2319 | { |
2320 | foreach (bool l4 in terminate_list(Dict)) | 2320 | foreach (bool l4 in terminate_list(Dict)) |
2321 | { | 2321 | { |
2322 | foreach (bool l5 in YP.unify(Dictionary, Dict)) | 2322 | foreach (bool l5 in YP.unify(Dictionary, Dict)) |
2323 | { | 2323 | { |
2324 | foreach (bool l6 in YP.unify(TokenList, ListOfTokens)) | 2324 | foreach (bool l6 in YP.unify(TokenList, ListOfTokens)) |
2325 | { | 2325 | { |
2326 | yield return false; | 2326 | yield return false; |
2327 | } | 2327 | } |
2328 | } | 2328 | } |
2329 | yield break; | 2329 | yield break; |
2330 | } | 2330 | } |
2331 | } | 2331 | } |
2332 | } | 2332 | } |
2333 | } | 2333 | } |
2334 | { | 2334 | { |
2335 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"atom", Atom.a(@"end_of_file"), 0), Atom.NIL))) | 2335 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"atom", Atom.a(@"end_of_file"), 0), Atom.NIL))) |
2336 | { | 2336 | { |
2337 | foreach (bool l3 in YP.unify(arg2, Atom.NIL)) | 2337 | foreach (bool l3 in YP.unify(arg2, Atom.NIL)) |
2338 | { | 2338 | { |
2339 | yield return false; | 2339 | yield return false; |
2340 | } | 2340 | } |
2341 | } | 2341 | } |
2342 | } | 2342 | } |
2343 | } | 2343 | } |
2344 | 2344 | ||
2345 | public static IEnumerable<bool> terminate_list(object arg1) | 2345 | public static IEnumerable<bool> terminate_list(object arg1) |
2346 | { | 2346 | { |
2347 | { | 2347 | { |
2348 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 2348 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
2349 | { | 2349 | { |
2350 | yield return false; | 2350 | yield return false; |
2351 | } | 2351 | } |
2352 | } | 2352 | } |
2353 | { | 2353 | { |
2354 | Variable x1 = new Variable(); | 2354 | Variable x1 = new Variable(); |
2355 | Variable Tail = new Variable(); | 2355 | Variable Tail = new Variable(); |
2356 | foreach (bool l2 in YP.unify(arg1, new ListPair(x1, Tail))) | 2356 | foreach (bool l2 in YP.unify(arg1, new ListPair(x1, Tail))) |
2357 | { | 2357 | { |
2358 | foreach (bool l3 in terminate_list(Tail)) | 2358 | foreach (bool l3 in terminate_list(Tail)) |
2359 | { | 2359 | { |
2360 | yield return false; | 2360 | yield return false; |
2361 | } | 2361 | } |
2362 | } | 2362 | } |
2363 | } | 2363 | } |
2364 | } | 2364 | } |
2365 | 2365 | ||
2366 | public static IEnumerable<bool> read_special(object arg1, object Dict, object arg3) | 2366 | public static IEnumerable<bool> read_special(object arg1, object Dict, object arg3) |
2367 | { | 2367 | { |
2368 | { | 2368 | { |
2369 | object Tokens = arg3; | 2369 | object Tokens = arg3; |
2370 | foreach (bool l2 in YP.unify(arg1, 95)) | 2370 | foreach (bool l2 in YP.unify(arg1, 95)) |
2371 | { | 2371 | { |
2372 | foreach (bool l3 in read_variable(95, Dict, Tokens)) | 2372 | foreach (bool l3 in read_variable(95, Dict, Tokens)) |
2373 | { | 2373 | { |
2374 | yield return false; | 2374 | yield return false; |
2375 | } | 2375 | } |
2376 | } | 2376 | } |
2377 | } | 2377 | } |
2378 | { | 2378 | { |
2379 | object Tokens = arg3; | 2379 | object Tokens = arg3; |
2380 | foreach (bool l2 in YP.unify(arg1, 247)) | 2380 | foreach (bool l2 in YP.unify(arg1, 247)) |
2381 | { | 2381 | { |
2382 | foreach (bool l3 in read_symbol(247, Dict, Tokens)) | 2382 | foreach (bool l3 in read_symbol(247, Dict, Tokens)) |
2383 | { | 2383 | { |
2384 | yield return false; | 2384 | yield return false; |
2385 | } | 2385 | } |
2386 | } | 2386 | } |
2387 | } | 2387 | } |
2388 | { | 2388 | { |
2389 | object Tokens = arg3; | 2389 | object Tokens = arg3; |
2390 | foreach (bool l2 in YP.unify(arg1, 215)) | 2390 | foreach (bool l2 in YP.unify(arg1, 215)) |
2391 | { | 2391 | { |
2392 | foreach (bool l3 in read_symbol(215, Dict, Tokens)) | 2392 | foreach (bool l3 in read_symbol(215, Dict, Tokens)) |
2393 | { | 2393 | { |
2394 | yield return false; | 2394 | yield return false; |
2395 | } | 2395 | } |
2396 | } | 2396 | } |
2397 | } | 2397 | } |
2398 | { | 2398 | { |
2399 | Variable StartPos = new Variable(); | 2399 | Variable StartPos = new Variable(); |
2400 | Variable EndPos = new Variable(); | 2400 | Variable EndPos = new Variable(); |
2401 | Variable Tokens = new Variable(); | 2401 | Variable Tokens = new Variable(); |
2402 | Variable Ch = new Variable(); | 2402 | Variable Ch = new Variable(); |
2403 | Variable NextCh = new Variable(); | 2403 | Variable NextCh = new Variable(); |
2404 | foreach (bool l2 in YP.unify(arg1, 37)) | 2404 | foreach (bool l2 in YP.unify(arg1, 37)) |
2405 | { | 2405 | { |
2406 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"comment", StartPos, EndPos), Tokens))) | 2406 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"comment", StartPos, EndPos), Tokens))) |
2407 | { | 2407 | { |
2408 | foreach (bool l4 in get_current_position(StartPos)) | 2408 | foreach (bool l4 in get_current_position(StartPos)) |
2409 | { | 2409 | { |
2410 | foreach (bool l5 in YP.repeat()) | 2410 | foreach (bool l5 in YP.repeat()) |
2411 | { | 2411 | { |
2412 | foreach (bool l6 in YP.get_code(Ch)) | 2412 | foreach (bool l6 in YP.get_code(Ch)) |
2413 | { | 2413 | { |
2414 | if (YP.lessThan(Ch, new ListPair(32, Atom.NIL))) | 2414 | if (YP.lessThan(Ch, new ListPair(32, Atom.NIL))) |
2415 | { | 2415 | { |
2416 | if (YP.notEqual(Ch, 9)) | 2416 | if (YP.notEqual(Ch, 9)) |
2417 | { | 2417 | { |
2418 | if (YP.termNotEqual(Ch, -1)) | 2418 | if (YP.termNotEqual(Ch, -1)) |
2419 | { | 2419 | { |
2420 | foreach (bool l10 in get_current_position(EndPos)) | 2420 | foreach (bool l10 in get_current_position(EndPos)) |
2421 | { | 2421 | { |
2422 | foreach (bool l11 in YP.get_code(NextCh)) | 2422 | foreach (bool l11 in YP.get_code(NextCh)) |
2423 | { | 2423 | { |
2424 | foreach (bool l12 in read_tokens(NextCh, Dict, Tokens)) | 2424 | foreach (bool l12 in read_tokens(NextCh, Dict, Tokens)) |
2425 | { | 2425 | { |
2426 | yield return false; | 2426 | yield return false; |
2427 | } | 2427 | } |
2428 | } | 2428 | } |
2429 | } | 2429 | } |
2430 | } | 2430 | } |
2431 | yield break; | 2431 | yield break; |
2432 | } | 2432 | } |
2433 | } | 2433 | } |
2434 | } | 2434 | } |
2435 | } | 2435 | } |
2436 | } | 2436 | } |
2437 | } | 2437 | } |
2438 | } | 2438 | } |
2439 | } | 2439 | } |
2440 | { | 2440 | { |
2441 | object T = arg3; | 2441 | object T = arg3; |
2442 | Variable C2 = new Variable(); | 2442 | Variable C2 = new Variable(); |
2443 | Variable StartPos = new Variable(); | 2443 | Variable StartPos = new Variable(); |
2444 | Variable EndPos = new Variable(); | 2444 | Variable EndPos = new Variable(); |
2445 | Variable Tokens = new Variable(); | 2445 | Variable Tokens = new Variable(); |
2446 | Variable StartPos1 = new Variable(); | 2446 | Variable StartPos1 = new Variable(); |
2447 | Variable NextCh = new Variable(); | 2447 | Variable NextCh = new Variable(); |
2448 | Variable Chars = new Variable(); | 2448 | Variable Chars = new Variable(); |
2449 | foreach (bool l2 in YP.unify(arg1, 47)) | 2449 | foreach (bool l2 in YP.unify(arg1, 47)) |
2450 | { | 2450 | { |
2451 | foreach (bool l3 in YP.get_code(C2)) | 2451 | foreach (bool l3 in YP.get_code(C2)) |
2452 | { | 2452 | { |
2453 | if (YP.equal(C2, new ListPair(42, Atom.NIL))) | 2453 | if (YP.equal(C2, new ListPair(42, Atom.NIL))) |
2454 | { | 2454 | { |
2455 | foreach (bool l5 in YP.unify(T, new ListPair(new Functor2(@"comment", StartPos, EndPos), Tokens))) | 2455 | foreach (bool l5 in YP.unify(T, new ListPair(new Functor2(@"comment", StartPos, EndPos), Tokens))) |
2456 | { | 2456 | { |
2457 | foreach (bool l6 in get_current_position(StartPos1)) | 2457 | foreach (bool l6 in get_current_position(StartPos1)) |
2458 | { | 2458 | { |
2459 | foreach (bool l7 in YP.unify(StartPos, YP.subtract(StartPos1, 1))) | 2459 | foreach (bool l7 in YP.unify(StartPos, YP.subtract(StartPos1, 1))) |
2460 | { | 2460 | { |
2461 | foreach (bool l8 in read_solidus(32, NextCh)) | 2461 | foreach (bool l8 in read_solidus(32, NextCh)) |
2462 | { | 2462 | { |
2463 | foreach (bool l9 in get_current_position(EndPos)) | 2463 | foreach (bool l9 in get_current_position(EndPos)) |
2464 | { | 2464 | { |
2465 | foreach (bool l10 in read_tokens(NextCh, Dict, Tokens)) | 2465 | foreach (bool l10 in read_tokens(NextCh, Dict, Tokens)) |
2466 | { | 2466 | { |
2467 | yield return false; | 2467 | yield return false; |
2468 | } | 2468 | } |
2469 | } | 2469 | } |
2470 | } | 2470 | } |
2471 | } | 2471 | } |
2472 | } | 2472 | } |
2473 | } | 2473 | } |
2474 | goto cutIf1; | 2474 | goto cutIf1; |
2475 | } | 2475 | } |
2476 | foreach (bool l4 in YP.unify(T, Tokens)) | 2476 | foreach (bool l4 in YP.unify(T, Tokens)) |
2477 | { | 2477 | { |
2478 | foreach (bool l5 in rest_symbol(C2, Chars, NextCh)) | 2478 | foreach (bool l5 in rest_symbol(C2, Chars, NextCh)) |
2479 | { | 2479 | { |
2480 | foreach (bool l6 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(47, Chars))) | 2480 | foreach (bool l6 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(47, Chars))) |
2481 | { | 2481 | { |
2482 | yield return false; | 2482 | yield return false; |
2483 | } | 2483 | } |
2484 | } | 2484 | } |
2485 | } | 2485 | } |
2486 | cutIf1: | 2486 | cutIf1: |
2487 | { } | 2487 | { } |
2488 | } | 2488 | } |
2489 | } | 2489 | } |
2490 | } | 2490 | } |
2491 | { | 2491 | { |
2492 | Variable Pos = new Variable(); | 2492 | Variable Pos = new Variable(); |
2493 | Variable Tokens = new Variable(); | 2493 | Variable Tokens = new Variable(); |
2494 | Variable NextCh = new Variable(); | 2494 | Variable NextCh = new Variable(); |
2495 | foreach (bool l2 in YP.unify(arg1, 33)) | 2495 | foreach (bool l2 in YP.unify(arg1, 33)) |
2496 | { | 2496 | { |
2497 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"atom", Atom.a(@"!"), Pos), Tokens))) | 2497 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"atom", Atom.a(@"!"), Pos), Tokens))) |
2498 | { | 2498 | { |
2499 | foreach (bool l4 in get_current_position(Pos)) | 2499 | foreach (bool l4 in get_current_position(Pos)) |
2500 | { | 2500 | { |
2501 | foreach (bool l5 in YP.get_code(NextCh)) | 2501 | foreach (bool l5 in YP.get_code(NextCh)) |
2502 | { | 2502 | { |
2503 | foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens)) | 2503 | foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens)) |
2504 | { | 2504 | { |
2505 | yield return false; | 2505 | yield return false; |
2506 | } | 2506 | } |
2507 | } | 2507 | } |
2508 | } | 2508 | } |
2509 | } | 2509 | } |
2510 | } | 2510 | } |
2511 | } | 2511 | } |
2512 | { | 2512 | { |
2513 | Variable Tokens = new Variable(); | 2513 | Variable Tokens = new Variable(); |
2514 | Variable NextCh = new Variable(); | 2514 | Variable NextCh = new Variable(); |
2515 | foreach (bool l2 in YP.unify(arg1, 40)) | 2515 | foreach (bool l2 in YP.unify(arg1, 40)) |
2516 | { | 2516 | { |
2517 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@" ("), Tokens))) | 2517 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@" ("), Tokens))) |
2518 | { | 2518 | { |
2519 | foreach (bool l4 in YP.get_code(NextCh)) | 2519 | foreach (bool l4 in YP.get_code(NextCh)) |
2520 | { | 2520 | { |
2521 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) | 2521 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) |
2522 | { | 2522 | { |
2523 | yield return false; | 2523 | yield return false; |
2524 | } | 2524 | } |
2525 | } | 2525 | } |
2526 | } | 2526 | } |
2527 | } | 2527 | } |
2528 | } | 2528 | } |
2529 | { | 2529 | { |
2530 | Variable Tokens = new Variable(); | 2530 | Variable Tokens = new Variable(); |
2531 | Variable NextCh = new Variable(); | 2531 | Variable NextCh = new Variable(); |
2532 | foreach (bool l2 in YP.unify(arg1, 41)) | 2532 | foreach (bool l2 in YP.unify(arg1, 41)) |
2533 | { | 2533 | { |
2534 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@")"), Tokens))) | 2534 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@")"), Tokens))) |
2535 | { | 2535 | { |
2536 | foreach (bool l4 in YP.get_code(NextCh)) | 2536 | foreach (bool l4 in YP.get_code(NextCh)) |
2537 | { | 2537 | { |
2538 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) | 2538 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) |
2539 | { | 2539 | { |
2540 | yield return false; | 2540 | yield return false; |
2541 | } | 2541 | } |
2542 | } | 2542 | } |
2543 | } | 2543 | } |
2544 | } | 2544 | } |
2545 | } | 2545 | } |
2546 | { | 2546 | { |
2547 | Variable Tokens = new Variable(); | 2547 | Variable Tokens = new Variable(); |
2548 | Variable NextCh = new Variable(); | 2548 | Variable NextCh = new Variable(); |
2549 | foreach (bool l2 in YP.unify(arg1, 44)) | 2549 | foreach (bool l2 in YP.unify(arg1, 44)) |
2550 | { | 2550 | { |
2551 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@","), Tokens))) | 2551 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@","), Tokens))) |
2552 | { | 2552 | { |
2553 | foreach (bool l4 in YP.get_code(NextCh)) | 2553 | foreach (bool l4 in YP.get_code(NextCh)) |
2554 | { | 2554 | { |
2555 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) | 2555 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) |
2556 | { | 2556 | { |
2557 | yield return false; | 2557 | yield return false; |
2558 | } | 2558 | } |
2559 | } | 2559 | } |
2560 | } | 2560 | } |
2561 | } | 2561 | } |
2562 | } | 2562 | } |
2563 | { | 2563 | { |
2564 | Variable Pos = new Variable(); | 2564 | Variable Pos = new Variable(); |
2565 | Variable Tokens = new Variable(); | 2565 | Variable Tokens = new Variable(); |
2566 | Variable NextCh = new Variable(); | 2566 | Variable NextCh = new Variable(); |
2567 | foreach (bool l2 in YP.unify(arg1, 59)) | 2567 | foreach (bool l2 in YP.unify(arg1, 59)) |
2568 | { | 2568 | { |
2569 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"atom", Atom.a(@";"), Pos), Tokens))) | 2569 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"atom", Atom.a(@";"), Pos), Tokens))) |
2570 | { | 2570 | { |
2571 | foreach (bool l4 in get_current_position(Pos)) | 2571 | foreach (bool l4 in get_current_position(Pos)) |
2572 | { | 2572 | { |
2573 | foreach (bool l5 in YP.get_code(NextCh)) | 2573 | foreach (bool l5 in YP.get_code(NextCh)) |
2574 | { | 2574 | { |
2575 | foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens)) | 2575 | foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens)) |
2576 | { | 2576 | { |
2577 | yield return false; | 2577 | yield return false; |
2578 | } | 2578 | } |
2579 | } | 2579 | } |
2580 | } | 2580 | } |
2581 | } | 2581 | } |
2582 | } | 2582 | } |
2583 | } | 2583 | } |
2584 | { | 2584 | { |
2585 | Variable Pos = new Variable(); | 2585 | Variable Pos = new Variable(); |
2586 | Variable Tokens = new Variable(); | 2586 | Variable Tokens = new Variable(); |
2587 | Variable NextCh = new Variable(); | 2587 | Variable NextCh = new Variable(); |
2588 | foreach (bool l2 in YP.unify(arg1, 91)) | 2588 | foreach (bool l2 in YP.unify(arg1, 91)) |
2589 | { | 2589 | { |
2590 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"/", Atom.a(@"["), Pos), Tokens))) | 2590 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"/", Atom.a(@"["), Pos), Tokens))) |
2591 | { | 2591 | { |
2592 | foreach (bool l4 in get_current_position(Pos)) | 2592 | foreach (bool l4 in get_current_position(Pos)) |
2593 | { | 2593 | { |
2594 | foreach (bool l5 in YP.get_code(NextCh)) | 2594 | foreach (bool l5 in YP.get_code(NextCh)) |
2595 | { | 2595 | { |
2596 | foreach (bool l6 in read_tokens(NextCh, Dict, Tokens)) | 2596 | foreach (bool l6 in read_tokens(NextCh, Dict, Tokens)) |
2597 | { | 2597 | { |
2598 | yield return false; | 2598 | yield return false; |
2599 | } | 2599 | } |
2600 | } | 2600 | } |
2601 | } | 2601 | } |
2602 | } | 2602 | } |
2603 | } | 2603 | } |
2604 | } | 2604 | } |
2605 | { | 2605 | { |
2606 | Variable Pos = new Variable(); | 2606 | Variable Pos = new Variable(); |
2607 | Variable Tokens = new Variable(); | 2607 | Variable Tokens = new Variable(); |
2608 | Variable NextCh = new Variable(); | 2608 | Variable NextCh = new Variable(); |
2609 | foreach (bool l2 in YP.unify(arg1, 93)) | 2609 | foreach (bool l2 in YP.unify(arg1, 93)) |
2610 | { | 2610 | { |
2611 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"/", Atom.a(@"]"), Pos), Tokens))) | 2611 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"/", Atom.a(@"]"), Pos), Tokens))) |
2612 | { | 2612 | { |
2613 | foreach (bool l4 in get_current_position(Pos)) | 2613 | foreach (bool l4 in get_current_position(Pos)) |
2614 | { | 2614 | { |
2615 | foreach (bool l5 in YP.get_code(NextCh)) | 2615 | foreach (bool l5 in YP.get_code(NextCh)) |
2616 | { | 2616 | { |
2617 | foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens)) | 2617 | foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens)) |
2618 | { | 2618 | { |
2619 | yield return false; | 2619 | yield return false; |
2620 | } | 2620 | } |
2621 | } | 2621 | } |
2622 | } | 2622 | } |
2623 | } | 2623 | } |
2624 | } | 2624 | } |
2625 | } | 2625 | } |
2626 | { | 2626 | { |
2627 | Variable Pos = new Variable(); | 2627 | Variable Pos = new Variable(); |
2628 | Variable Tokens = new Variable(); | 2628 | Variable Tokens = new Variable(); |
2629 | Variable NextCh = new Variable(); | 2629 | Variable NextCh = new Variable(); |
2630 | foreach (bool l2 in YP.unify(arg1, 123)) | 2630 | foreach (bool l2 in YP.unify(arg1, 123)) |
2631 | { | 2631 | { |
2632 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"/", Atom.a(@"{"), Pos), Tokens))) | 2632 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2(@"/", Atom.a(@"{"), Pos), Tokens))) |
2633 | { | 2633 | { |
2634 | foreach (bool l4 in get_current_position(Pos)) | 2634 | foreach (bool l4 in get_current_position(Pos)) |
2635 | { | 2635 | { |
2636 | foreach (bool l5 in YP.get_code(NextCh)) | 2636 | foreach (bool l5 in YP.get_code(NextCh)) |
2637 | { | 2637 | { |
2638 | foreach (bool l6 in read_tokens(NextCh, Dict, Tokens)) | 2638 | foreach (bool l6 in read_tokens(NextCh, Dict, Tokens)) |
2639 | { | 2639 | { |
2640 | yield return false; | 2640 | yield return false; |
2641 | } | 2641 | } |
2642 | } | 2642 | } |
2643 | } | 2643 | } |
2644 | } | 2644 | } |
2645 | } | 2645 | } |
2646 | } | 2646 | } |
2647 | { | 2647 | { |
2648 | Variable Tokens = new Variable(); | 2648 | Variable Tokens = new Variable(); |
2649 | Variable NextCh = new Variable(); | 2649 | Variable NextCh = new Variable(); |
2650 | foreach (bool l2 in YP.unify(arg1, 124)) | 2650 | foreach (bool l2 in YP.unify(arg1, 124)) |
2651 | { | 2651 | { |
2652 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@"|"), Tokens))) | 2652 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@"|"), Tokens))) |
2653 | { | 2653 | { |
2654 | foreach (bool l4 in YP.get_code(NextCh)) | 2654 | foreach (bool l4 in YP.get_code(NextCh)) |
2655 | { | 2655 | { |
2656 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) | 2656 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) |
2657 | { | 2657 | { |
2658 | yield return false; | 2658 | yield return false; |
2659 | } | 2659 | } |
2660 | } | 2660 | } |
2661 | } | 2661 | } |
2662 | } | 2662 | } |
2663 | } | 2663 | } |
2664 | { | 2664 | { |
2665 | Variable Tokens = new Variable(); | 2665 | Variable Tokens = new Variable(); |
2666 | Variable NextCh = new Variable(); | 2666 | Variable NextCh = new Variable(); |
2667 | foreach (bool l2 in YP.unify(arg1, 125)) | 2667 | foreach (bool l2 in YP.unify(arg1, 125)) |
2668 | { | 2668 | { |
2669 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@"}"), Tokens))) | 2669 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@"}"), Tokens))) |
2670 | { | 2670 | { |
2671 | foreach (bool l4 in YP.get_code(NextCh)) | 2671 | foreach (bool l4 in YP.get_code(NextCh)) |
2672 | { | 2672 | { |
2673 | foreach (bool l5 in read_after_atom(NextCh, Dict, Tokens)) | 2673 | foreach (bool l5 in read_after_atom(NextCh, Dict, Tokens)) |
2674 | { | 2674 | { |
2675 | yield return false; | 2675 | yield return false; |
2676 | } | 2676 | } |
2677 | } | 2677 | } |
2678 | } | 2678 | } |
2679 | } | 2679 | } |
2680 | } | 2680 | } |
2681 | { | 2681 | { |
2682 | object Tokens = arg3; | 2682 | object Tokens = arg3; |
2683 | Variable NextCh = new Variable(); | 2683 | Variable NextCh = new Variable(); |
2684 | foreach (bool l2 in YP.unify(arg1, 46)) | 2684 | foreach (bool l2 in YP.unify(arg1, 46)) |
2685 | { | 2685 | { |
2686 | foreach (bool l3 in YP.get_code(NextCh)) | 2686 | foreach (bool l3 in YP.get_code(NextCh)) |
2687 | { | 2687 | { |
2688 | foreach (bool l4 in read_fullstop(NextCh, Dict, Tokens)) | 2688 | foreach (bool l4 in read_fullstop(NextCh, Dict, Tokens)) |
2689 | { | 2689 | { |
2690 | yield return false; | 2690 | yield return false; |
2691 | } | 2691 | } |
2692 | } | 2692 | } |
2693 | } | 2693 | } |
2694 | } | 2694 | } |
2695 | { | 2695 | { |
2696 | Variable Chars = new Variable(); | 2696 | Variable Chars = new Variable(); |
2697 | Variable Tokens = new Variable(); | 2697 | Variable Tokens = new Variable(); |
2698 | Variable NextCh = new Variable(); | 2698 | Variable NextCh = new Variable(); |
2699 | foreach (bool l2 in YP.unify(arg1, 34)) | 2699 | foreach (bool l2 in YP.unify(arg1, 34)) |
2700 | { | 2700 | { |
2701 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor1(@"string", Chars), Tokens))) | 2701 | foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor1(@"string", Chars), Tokens))) |
2702 | { | 2702 | { |
2703 | foreach (bool l4 in read_string(Chars, 34, NextCh)) | 2703 | foreach (bool l4 in read_string(Chars, 34, NextCh)) |
2704 | { | 2704 | { |
2705 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) | 2705 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) |
2706 | { | 2706 | { |
2707 | yield return false; | 2707 | yield return false; |
2708 | } | 2708 | } |
2709 | } | 2709 | } |
2710 | } | 2710 | } |
2711 | } | 2711 | } |
2712 | } | 2712 | } |
2713 | { | 2713 | { |
2714 | object Tokens = arg3; | 2714 | object Tokens = arg3; |
2715 | Variable Chars = new Variable(); | 2715 | Variable Chars = new Variable(); |
2716 | Variable NextCh = new Variable(); | 2716 | Variable NextCh = new Variable(); |
2717 | foreach (bool l2 in YP.unify(arg1, 39)) | 2717 | foreach (bool l2 in YP.unify(arg1, 39)) |
2718 | { | 2718 | { |
2719 | foreach (bool l3 in read_string(Chars, 39, NextCh)) | 2719 | foreach (bool l3 in read_string(Chars, 39, NextCh)) |
2720 | { | 2720 | { |
2721 | foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, Chars)) | 2721 | foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, Chars)) |
2722 | { | 2722 | { |
2723 | yield return false; | 2723 | yield return false; |
2724 | } | 2724 | } |
2725 | } | 2725 | } |
2726 | } | 2726 | } |
2727 | } | 2727 | } |
2728 | { | 2728 | { |
2729 | object Tokens = arg3; | 2729 | object Tokens = arg3; |
2730 | foreach (bool l2 in YP.unify(arg1, 35)) | 2730 | foreach (bool l2 in YP.unify(arg1, 35)) |
2731 | { | 2731 | { |
2732 | foreach (bool l3 in read_symbol(35, Dict, Tokens)) | 2732 | foreach (bool l3 in read_symbol(35, Dict, Tokens)) |
2733 | { | 2733 | { |
2734 | yield return false; | 2734 | yield return false; |
2735 | } | 2735 | } |
2736 | } | 2736 | } |
2737 | } | 2737 | } |
2738 | { | 2738 | { |
2739 | object Tokens = arg3; | 2739 | object Tokens = arg3; |
2740 | foreach (bool l2 in YP.unify(arg1, 36)) | 2740 | foreach (bool l2 in YP.unify(arg1, 36)) |
2741 | { | 2741 | { |
2742 | foreach (bool l3 in read_symbol(36, Dict, Tokens)) | 2742 | foreach (bool l3 in read_symbol(36, Dict, Tokens)) |
2743 | { | 2743 | { |
2744 | yield return false; | 2744 | yield return false; |
2745 | } | 2745 | } |
2746 | } | 2746 | } |
2747 | } | 2747 | } |
2748 | { | 2748 | { |
2749 | object Tokens = arg3; | 2749 | object Tokens = arg3; |
2750 | foreach (bool l2 in YP.unify(arg1, 38)) | 2750 | foreach (bool l2 in YP.unify(arg1, 38)) |
2751 | { | 2751 | { |
2752 | foreach (bool l3 in read_symbol(38, Dict, Tokens)) | 2752 | foreach (bool l3 in read_symbol(38, Dict, Tokens)) |
2753 | { | 2753 | { |
2754 | yield return false; | 2754 | yield return false; |
2755 | } | 2755 | } |
2756 | } | 2756 | } |
2757 | } | 2757 | } |
2758 | { | 2758 | { |
2759 | object Tokens = arg3; | 2759 | object Tokens = arg3; |
2760 | foreach (bool l2 in YP.unify(arg1, 42)) | 2760 | foreach (bool l2 in YP.unify(arg1, 42)) |
2761 | { | 2761 | { |
2762 | foreach (bool l3 in read_symbol(42, Dict, Tokens)) | 2762 | foreach (bool l3 in read_symbol(42, Dict, Tokens)) |
2763 | { | 2763 | { |
2764 | yield return false; | 2764 | yield return false; |
2765 | } | 2765 | } |
2766 | } | 2766 | } |
2767 | } | 2767 | } |
2768 | { | 2768 | { |
2769 | object Tokens = arg3; | 2769 | object Tokens = arg3; |
2770 | foreach (bool l2 in YP.unify(arg1, 43)) | 2770 | foreach (bool l2 in YP.unify(arg1, 43)) |
2771 | { | 2771 | { |
2772 | foreach (bool l3 in read_symbol(43, Dict, Tokens)) | 2772 | foreach (bool l3 in read_symbol(43, Dict, Tokens)) |
2773 | { | 2773 | { |
2774 | yield return false; | 2774 | yield return false; |
2775 | } | 2775 | } |
2776 | } | 2776 | } |
2777 | } | 2777 | } |
2778 | { | 2778 | { |
2779 | object Tokens = arg3; | 2779 | object Tokens = arg3; |
2780 | foreach (bool l2 in YP.unify(arg1, 45)) | 2780 | foreach (bool l2 in YP.unify(arg1, 45)) |
2781 | { | 2781 | { |
2782 | foreach (bool l3 in read_symbol(45, Dict, Tokens)) | 2782 | foreach (bool l3 in read_symbol(45, Dict, Tokens)) |
2783 | { | 2783 | { |
2784 | yield return false; | 2784 | yield return false; |
2785 | } | 2785 | } |
2786 | } | 2786 | } |
2787 | } | 2787 | } |
2788 | { | 2788 | { |
2789 | object Tokens = arg3; | 2789 | object Tokens = arg3; |
2790 | foreach (bool l2 in YP.unify(arg1, 58)) | 2790 | foreach (bool l2 in YP.unify(arg1, 58)) |
2791 | { | 2791 | { |
2792 | foreach (bool l3 in read_symbol(58, Dict, Tokens)) | 2792 | foreach (bool l3 in read_symbol(58, Dict, Tokens)) |
2793 | { | 2793 | { |
2794 | yield return false; | 2794 | yield return false; |
2795 | } | 2795 | } |
2796 | } | 2796 | } |
2797 | } | 2797 | } |
2798 | { | 2798 | { |
2799 | object Tokens = arg3; | 2799 | object Tokens = arg3; |
2800 | foreach (bool l2 in YP.unify(arg1, 60)) | 2800 | foreach (bool l2 in YP.unify(arg1, 60)) |
2801 | { | 2801 | { |
2802 | foreach (bool l3 in read_symbol(60, Dict, Tokens)) | 2802 | foreach (bool l3 in read_symbol(60, Dict, Tokens)) |
2803 | { | 2803 | { |
2804 | yield return false; | 2804 | yield return false; |
2805 | } | 2805 | } |
2806 | } | 2806 | } |
2807 | } | 2807 | } |
2808 | { | 2808 | { |
2809 | object Tokens = arg3; | 2809 | object Tokens = arg3; |
2810 | foreach (bool l2 in YP.unify(arg1, 61)) | 2810 | foreach (bool l2 in YP.unify(arg1, 61)) |
2811 | { | 2811 | { |
2812 | foreach (bool l3 in read_symbol(61, Dict, Tokens)) | 2812 | foreach (bool l3 in read_symbol(61, Dict, Tokens)) |
2813 | { | 2813 | { |
2814 | yield return false; | 2814 | yield return false; |
2815 | } | 2815 | } |
2816 | } | 2816 | } |
2817 | } | 2817 | } |
2818 | { | 2818 | { |
2819 | object Tokens = arg3; | 2819 | object Tokens = arg3; |
2820 | foreach (bool l2 in YP.unify(arg1, 62)) | 2820 | foreach (bool l2 in YP.unify(arg1, 62)) |
2821 | { | 2821 | { |
2822 | foreach (bool l3 in read_symbol(62, Dict, Tokens)) | 2822 | foreach (bool l3 in read_symbol(62, Dict, Tokens)) |
2823 | { | 2823 | { |
2824 | yield return false; | 2824 | yield return false; |
2825 | } | 2825 | } |
2826 | } | 2826 | } |
2827 | } | 2827 | } |
2828 | { | 2828 | { |
2829 | object Tokens = arg3; | 2829 | object Tokens = arg3; |
2830 | foreach (bool l2 in YP.unify(arg1, 63)) | 2830 | foreach (bool l2 in YP.unify(arg1, 63)) |
2831 | { | 2831 | { |
2832 | foreach (bool l3 in read_symbol(63, Dict, Tokens)) | 2832 | foreach (bool l3 in read_symbol(63, Dict, Tokens)) |
2833 | { | 2833 | { |
2834 | yield return false; | 2834 | yield return false; |
2835 | } | 2835 | } |
2836 | } | 2836 | } |
2837 | } | 2837 | } |
2838 | { | 2838 | { |
2839 | object Tokens = arg3; | 2839 | object Tokens = arg3; |
2840 | foreach (bool l2 in YP.unify(arg1, 64)) | 2840 | foreach (bool l2 in YP.unify(arg1, 64)) |
2841 | { | 2841 | { |
2842 | foreach (bool l3 in read_symbol(64, Dict, Tokens)) | 2842 | foreach (bool l3 in read_symbol(64, Dict, Tokens)) |
2843 | { | 2843 | { |
2844 | yield return false; | 2844 | yield return false; |
2845 | } | 2845 | } |
2846 | } | 2846 | } |
2847 | } | 2847 | } |
2848 | { | 2848 | { |
2849 | object Tokens = arg3; | 2849 | object Tokens = arg3; |
2850 | foreach (bool l2 in YP.unify(arg1, 92)) | 2850 | foreach (bool l2 in YP.unify(arg1, 92)) |
2851 | { | 2851 | { |
2852 | foreach (bool l3 in read_symbol(92, Dict, Tokens)) | 2852 | foreach (bool l3 in read_symbol(92, Dict, Tokens)) |
2853 | { | 2853 | { |
2854 | yield return false; | 2854 | yield return false; |
2855 | } | 2855 | } |
2856 | } | 2856 | } |
2857 | } | 2857 | } |
2858 | { | 2858 | { |
2859 | object Tokens = arg3; | 2859 | object Tokens = arg3; |
2860 | foreach (bool l2 in YP.unify(arg1, 94)) | 2860 | foreach (bool l2 in YP.unify(arg1, 94)) |
2861 | { | 2861 | { |
2862 | foreach (bool l3 in read_symbol(94, Dict, Tokens)) | 2862 | foreach (bool l3 in read_symbol(94, Dict, Tokens)) |
2863 | { | 2863 | { |
2864 | yield return false; | 2864 | yield return false; |
2865 | } | 2865 | } |
2866 | } | 2866 | } |
2867 | } | 2867 | } |
2868 | { | 2868 | { |
2869 | object Tokens = arg3; | 2869 | object Tokens = arg3; |
2870 | foreach (bool l2 in YP.unify(arg1, 96)) | 2870 | foreach (bool l2 in YP.unify(arg1, 96)) |
2871 | { | 2871 | { |
2872 | foreach (bool l3 in read_symbol(96, Dict, Tokens)) | 2872 | foreach (bool l3 in read_symbol(96, Dict, Tokens)) |
2873 | { | 2873 | { |
2874 | yield return false; | 2874 | yield return false; |
2875 | } | 2875 | } |
2876 | } | 2876 | } |
2877 | } | 2877 | } |
2878 | { | 2878 | { |
2879 | object Tokens = arg3; | 2879 | object Tokens = arg3; |
2880 | foreach (bool l2 in YP.unify(arg1, 126)) | 2880 | foreach (bool l2 in YP.unify(arg1, 126)) |
2881 | { | 2881 | { |
2882 | foreach (bool l3 in read_symbol(126, Dict, Tokens)) | 2882 | foreach (bool l3 in read_symbol(126, Dict, Tokens)) |
2883 | { | 2883 | { |
2884 | yield return false; | 2884 | yield return false; |
2885 | } | 2885 | } |
2886 | } | 2886 | } |
2887 | } | 2887 | } |
2888 | } | 2888 | } |
2889 | 2889 | ||
2890 | public static IEnumerable<bool> read_symbol(object C1, object Dict, object Tokens) | 2890 | public static IEnumerable<bool> read_symbol(object C1, object Dict, object Tokens) |
2891 | { | 2891 | { |
2892 | { | 2892 | { |
2893 | Variable C2 = new Variable(); | 2893 | Variable C2 = new Variable(); |
2894 | Variable Chars = new Variable(); | 2894 | Variable Chars = new Variable(); |
2895 | Variable NextCh = new Variable(); | 2895 | Variable NextCh = new Variable(); |
2896 | foreach (bool l2 in YP.get_code(C2)) | 2896 | foreach (bool l2 in YP.get_code(C2)) |
2897 | { | 2897 | { |
2898 | foreach (bool l3 in rest_symbol(C2, Chars, NextCh)) | 2898 | foreach (bool l3 in rest_symbol(C2, Chars, NextCh)) |
2899 | { | 2899 | { |
2900 | foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(C1, Chars))) | 2900 | foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(C1, Chars))) |
2901 | { | 2901 | { |
2902 | yield return false; | 2902 | yield return false; |
2903 | } | 2903 | } |
2904 | } | 2904 | } |
2905 | } | 2905 | } |
2906 | } | 2906 | } |
2907 | } | 2907 | } |
2908 | 2908 | ||
2909 | public static IEnumerable<bool> rest_symbol(object arg1, object arg2, object arg3) | 2909 | public static IEnumerable<bool> rest_symbol(object arg1, object arg2, object arg3) |
2910 | { | 2910 | { |
2911 | { | 2911 | { |
2912 | object C2 = arg1; | 2912 | object C2 = arg1; |
2913 | object LastCh = arg3; | 2913 | object LastCh = arg3; |
2914 | Variable Chars = new Variable(); | 2914 | Variable Chars = new Variable(); |
2915 | Variable NextCh = new Variable(); | 2915 | Variable NextCh = new Variable(); |
2916 | foreach (bool l2 in YP.unify(arg2, new ListPair(C2, Chars))) | 2916 | foreach (bool l2 in YP.unify(arg2, new ListPair(C2, Chars))) |
2917 | { | 2917 | { |
2918 | if (YP.greaterThan(C2, 160)) | 2918 | if (YP.greaterThan(C2, 160)) |
2919 | { | 2919 | { |
2920 | if (YP.lessThan(C2, 192)) | 2920 | if (YP.lessThan(C2, 192)) |
2921 | { | 2921 | { |
2922 | if (YP.notEqual(C2, 186)) | 2922 | if (YP.notEqual(C2, 186)) |
2923 | { | 2923 | { |
2924 | if (YP.notEqual(C2, 170)) | 2924 | if (YP.notEqual(C2, 170)) |
2925 | { | 2925 | { |
2926 | foreach (bool l7 in YP.get_code(NextCh)) | 2926 | foreach (bool l7 in YP.get_code(NextCh)) |
2927 | { | 2927 | { |
2928 | foreach (bool l8 in rest_symbol(NextCh, Chars, LastCh)) | 2928 | foreach (bool l8 in rest_symbol(NextCh, Chars, LastCh)) |
2929 | { | 2929 | { |
2930 | yield return false; | 2930 | yield return false; |
2931 | } | 2931 | } |
2932 | } | 2932 | } |
2933 | yield break; | 2933 | yield break; |
2934 | } | 2934 | } |
2935 | } | 2935 | } |
2936 | } | 2936 | } |
2937 | goto cutIf1; | 2937 | goto cutIf1; |
2938 | } | 2938 | } |
2939 | foreach (bool l3 in symbol_char(C2)) | 2939 | foreach (bool l3 in symbol_char(C2)) |
2940 | { | 2940 | { |
2941 | foreach (bool l4 in YP.get_code(NextCh)) | 2941 | foreach (bool l4 in YP.get_code(NextCh)) |
2942 | { | 2942 | { |
2943 | foreach (bool l5 in rest_symbol(NextCh, Chars, LastCh)) | 2943 | foreach (bool l5 in rest_symbol(NextCh, Chars, LastCh)) |
2944 | { | 2944 | { |
2945 | yield return false; | 2945 | yield return false; |
2946 | } | 2946 | } |
2947 | } | 2947 | } |
2948 | yield break; | 2948 | yield break; |
2949 | } | 2949 | } |
2950 | cutIf1: | 2950 | cutIf1: |
2951 | { } | 2951 | { } |
2952 | } | 2952 | } |
2953 | } | 2953 | } |
2954 | { | 2954 | { |
2955 | Variable C2 = new Variable(); | 2955 | Variable C2 = new Variable(); |
2956 | foreach (bool l2 in YP.unify(arg1, C2)) | 2956 | foreach (bool l2 in YP.unify(arg1, C2)) |
2957 | { | 2957 | { |
2958 | foreach (bool l3 in YP.unify(arg2, Atom.NIL)) | 2958 | foreach (bool l3 in YP.unify(arg2, Atom.NIL)) |
2959 | { | 2959 | { |
2960 | foreach (bool l4 in YP.unify(arg3, C2)) | 2960 | foreach (bool l4 in YP.unify(arg3, C2)) |
2961 | { | 2961 | { |
2962 | yield return false; | 2962 | yield return false; |
2963 | } | 2963 | } |
2964 | } | 2964 | } |
2965 | } | 2965 | } |
2966 | } | 2966 | } |
2967 | } | 2967 | } |
2968 | 2968 | ||
2969 | public static IEnumerable<bool> symbol_char(object arg1) | 2969 | public static IEnumerable<bool> symbol_char(object arg1) |
2970 | { | 2970 | { |
2971 | { | 2971 | { |
2972 | foreach (bool l2 in YP.unify(arg1, 35)) | 2972 | foreach (bool l2 in YP.unify(arg1, 35)) |
2973 | { | 2973 | { |
2974 | yield return false; | 2974 | yield return false; |
2975 | } | 2975 | } |
2976 | } | 2976 | } |
2977 | { | 2977 | { |
2978 | foreach (bool l2 in YP.unify(arg1, 36)) | 2978 | foreach (bool l2 in YP.unify(arg1, 36)) |
2979 | { | 2979 | { |
2980 | yield return false; | 2980 | yield return false; |
2981 | } | 2981 | } |
2982 | } | 2982 | } |
2983 | { | 2983 | { |
2984 | foreach (bool l2 in YP.unify(arg1, 38)) | 2984 | foreach (bool l2 in YP.unify(arg1, 38)) |
2985 | { | 2985 | { |
2986 | yield return false; | 2986 | yield return false; |
2987 | } | 2987 | } |
2988 | } | 2988 | } |
2989 | { | 2989 | { |
2990 | foreach (bool l2 in YP.unify(arg1, 42)) | 2990 | foreach (bool l2 in YP.unify(arg1, 42)) |
2991 | { | 2991 | { |
2992 | yield return false; | 2992 | yield return false; |
2993 | } | 2993 | } |
2994 | } | 2994 | } |
2995 | { | 2995 | { |
2996 | foreach (bool l2 in YP.unify(arg1, 43)) | 2996 | foreach (bool l2 in YP.unify(arg1, 43)) |
2997 | { | 2997 | { |
2998 | yield return false; | 2998 | yield return false; |
2999 | } | 2999 | } |
3000 | } | 3000 | } |
3001 | { | 3001 | { |
3002 | foreach (bool l2 in YP.unify(arg1, 45)) | 3002 | foreach (bool l2 in YP.unify(arg1, 45)) |
3003 | { | 3003 | { |
3004 | yield return false; | 3004 | yield return false; |
3005 | } | 3005 | } |
3006 | } | 3006 | } |
3007 | { | 3007 | { |
3008 | foreach (bool l2 in YP.unify(arg1, 46)) | 3008 | foreach (bool l2 in YP.unify(arg1, 46)) |
3009 | { | 3009 | { |
3010 | yield return false; | 3010 | yield return false; |
3011 | } | 3011 | } |
3012 | } | 3012 | } |
3013 | { | 3013 | { |
3014 | foreach (bool l2 in YP.unify(arg1, 47)) | 3014 | foreach (bool l2 in YP.unify(arg1, 47)) |
3015 | { | 3015 | { |
3016 | yield return false; | 3016 | yield return false; |
3017 | } | 3017 | } |
3018 | } | 3018 | } |
3019 | { | 3019 | { |
3020 | foreach (bool l2 in YP.unify(arg1, 58)) | 3020 | foreach (bool l2 in YP.unify(arg1, 58)) |
3021 | { | 3021 | { |
3022 | yield return false; | 3022 | yield return false; |
3023 | } | 3023 | } |
3024 | } | 3024 | } |
3025 | { | 3025 | { |
3026 | foreach (bool l2 in YP.unify(arg1, 60)) | 3026 | foreach (bool l2 in YP.unify(arg1, 60)) |
3027 | { | 3027 | { |
3028 | yield return false; | 3028 | yield return false; |
3029 | } | 3029 | } |
3030 | } | 3030 | } |
3031 | { | 3031 | { |
3032 | foreach (bool l2 in YP.unify(arg1, 61)) | 3032 | foreach (bool l2 in YP.unify(arg1, 61)) |
3033 | { | 3033 | { |
3034 | yield return false; | 3034 | yield return false; |
3035 | } | 3035 | } |
3036 | } | 3036 | } |
3037 | { | 3037 | { |
3038 | foreach (bool l2 in YP.unify(arg1, 62)) | 3038 | foreach (bool l2 in YP.unify(arg1, 62)) |
3039 | { | 3039 | { |
3040 | yield return false; | 3040 | yield return false; |
3041 | } | 3041 | } |
3042 | } | 3042 | } |
3043 | { | 3043 | { |
3044 | foreach (bool l2 in YP.unify(arg1, 63)) | 3044 | foreach (bool l2 in YP.unify(arg1, 63)) |
3045 | { | 3045 | { |
3046 | yield return false; | 3046 | yield return false; |
3047 | } | 3047 | } |
3048 | } | 3048 | } |
3049 | { | 3049 | { |
3050 | foreach (bool l2 in YP.unify(arg1, 64)) | 3050 | foreach (bool l2 in YP.unify(arg1, 64)) |
3051 | { | 3051 | { |
3052 | yield return false; | 3052 | yield return false; |
3053 | } | 3053 | } |
3054 | } | 3054 | } |
3055 | { | 3055 | { |
3056 | foreach (bool l2 in YP.unify(arg1, 92)) | 3056 | foreach (bool l2 in YP.unify(arg1, 92)) |
3057 | { | 3057 | { |
3058 | yield return false; | 3058 | yield return false; |
3059 | } | 3059 | } |
3060 | } | 3060 | } |
3061 | { | 3061 | { |
3062 | foreach (bool l2 in YP.unify(arg1, 94)) | 3062 | foreach (bool l2 in YP.unify(arg1, 94)) |
3063 | { | 3063 | { |
3064 | yield return false; | 3064 | yield return false; |
3065 | } | 3065 | } |
3066 | } | 3066 | } |
3067 | { | 3067 | { |
3068 | foreach (bool l2 in YP.unify(arg1, 96)) | 3068 | foreach (bool l2 in YP.unify(arg1, 96)) |
3069 | { | 3069 | { |
3070 | yield return false; | 3070 | yield return false; |
3071 | } | 3071 | } |
3072 | } | 3072 | } |
3073 | { | 3073 | { |
3074 | foreach (bool l2 in YP.unify(arg1, 126)) | 3074 | foreach (bool l2 in YP.unify(arg1, 126)) |
3075 | { | 3075 | { |
3076 | yield return false; | 3076 | yield return false; |
3077 | } | 3077 | } |
3078 | } | 3078 | } |
3079 | } | 3079 | } |
3080 | 3080 | ||
3081 | public static IEnumerable<bool> get_current_position(object Pos) | 3081 | public static IEnumerable<bool> get_current_position(object Pos) |
3082 | { | 3082 | { |
3083 | { | 3083 | { |
3084 | foreach (bool l2 in YP.unify(Pos, 0)) | 3084 | foreach (bool l2 in YP.unify(Pos, 0)) |
3085 | { | 3085 | { |
3086 | yield return false; | 3086 | yield return false; |
3087 | } | 3087 | } |
3088 | } | 3088 | } |
3089 | } | 3089 | } |
3090 | 3090 | ||
3091 | public static IEnumerable<bool> read_after_atom4(object Ch, object Dict, object arg3, object Chars) | 3091 | public static IEnumerable<bool> read_after_atom4(object Ch, object Dict, object arg3, object Chars) |
3092 | { | 3092 | { |
3093 | { | 3093 | { |
3094 | Variable Atom_1 = new Variable(); | 3094 | Variable Atom_1 = new Variable(); |
3095 | Variable Pos = new Variable(); | 3095 | Variable Pos = new Variable(); |
3096 | Variable Tokens = new Variable(); | 3096 | Variable Tokens = new Variable(); |
3097 | foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor2(@"atom", Atom_1, Pos), Tokens))) | 3097 | foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor2(@"atom", Atom_1, Pos), Tokens))) |
3098 | { | 3098 | { |
3099 | foreach (bool l3 in YP.unify(Pos, 0)) | 3099 | foreach (bool l3 in YP.unify(Pos, 0)) |
3100 | { | 3100 | { |
3101 | foreach (bool l4 in YP.atom_codes(Atom_1, Chars)) | 3101 | foreach (bool l4 in YP.atom_codes(Atom_1, Chars)) |
3102 | { | 3102 | { |
3103 | foreach (bool l5 in read_after_atom(Ch, Dict, Tokens)) | 3103 | foreach (bool l5 in read_after_atom(Ch, Dict, Tokens)) |
3104 | { | 3104 | { |
3105 | yield return false; | 3105 | yield return false; |
3106 | } | 3106 | } |
3107 | } | 3107 | } |
3108 | } | 3108 | } |
3109 | } | 3109 | } |
3110 | } | 3110 | } |
3111 | } | 3111 | } |
3112 | 3112 | ||
3113 | public static IEnumerable<bool> read_after_atom(object arg1, object Dict, object arg3) | 3113 | public static IEnumerable<bool> read_after_atom(object arg1, object Dict, object arg3) |
3114 | { | 3114 | { |
3115 | { | 3115 | { |
3116 | Variable Tokens = new Variable(); | 3116 | Variable Tokens = new Variable(); |
3117 | Variable NextCh = new Variable(); | 3117 | Variable NextCh = new Variable(); |
3118 | foreach (bool l2 in YP.unify(arg1, 40)) | 3118 | foreach (bool l2 in YP.unify(arg1, 40)) |
3119 | { | 3119 | { |
3120 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@"("), Tokens))) | 3120 | foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(@"("), Tokens))) |
3121 | { | 3121 | { |
3122 | foreach (bool l4 in YP.get_code(NextCh)) | 3122 | foreach (bool l4 in YP.get_code(NextCh)) |
3123 | { | 3123 | { |
3124 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) | 3124 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) |
3125 | { | 3125 | { |
3126 | yield return false; | 3126 | yield return false; |
3127 | } | 3127 | } |
3128 | } | 3128 | } |
3129 | yield break; | 3129 | yield break; |
3130 | } | 3130 | } |
3131 | } | 3131 | } |
3132 | } | 3132 | } |
3133 | { | 3133 | { |
3134 | object Ch = arg1; | 3134 | object Ch = arg1; |
3135 | object Tokens = arg3; | 3135 | object Tokens = arg3; |
3136 | foreach (bool l2 in read_tokens(Ch, Dict, Tokens)) | 3136 | foreach (bool l2 in read_tokens(Ch, Dict, Tokens)) |
3137 | { | 3137 | { |
3138 | yield return false; | 3138 | yield return false; |
3139 | } | 3139 | } |
3140 | } | 3140 | } |
3141 | } | 3141 | } |
3142 | 3142 | ||
3143 | public static IEnumerable<bool> read_string(object Chars, object Quote, object NextCh) | 3143 | public static IEnumerable<bool> read_string(object Chars, object Quote, object NextCh) |
3144 | { | 3144 | { |
3145 | { | 3145 | { |
3146 | Variable Ch = new Variable(); | 3146 | Variable Ch = new Variable(); |
3147 | Variable Char = new Variable(); | 3147 | Variable Char = new Variable(); |
3148 | Variable Next = new Variable(); | 3148 | Variable Next = new Variable(); |
3149 | foreach (bool l2 in YP.get_code(Ch)) | 3149 | foreach (bool l2 in YP.get_code(Ch)) |
3150 | { | 3150 | { |
3151 | foreach (bool l3 in read_char(Ch, Quote, Char, Next)) | 3151 | foreach (bool l3 in read_char(Ch, Quote, Char, Next)) |
3152 | { | 3152 | { |
3153 | foreach (bool l4 in rest_string5(Char, Next, Chars, Quote, NextCh)) | 3153 | foreach (bool l4 in rest_string5(Char, Next, Chars, Quote, NextCh)) |
3154 | { | 3154 | { |
3155 | yield return false; | 3155 | yield return false; |
3156 | } | 3156 | } |
3157 | } | 3157 | } |
3158 | } | 3158 | } |
3159 | } | 3159 | } |
3160 | } | 3160 | } |
3161 | 3161 | ||
3162 | public static IEnumerable<bool> rest_string5(object arg1, object arg2, object arg3, object arg4, object arg5) | 3162 | public static IEnumerable<bool> rest_string5(object arg1, object arg2, object arg3, object arg4, object arg5) |
3163 | { | 3163 | { |
3164 | { | 3164 | { |
3165 | object _X = arg4; | 3165 | object _X = arg4; |
3166 | Variable NextCh = new Variable(); | 3166 | Variable NextCh = new Variable(); |
3167 | foreach (bool l2 in YP.unify(arg1, -1)) | 3167 | foreach (bool l2 in YP.unify(arg1, -1)) |
3168 | { | 3168 | { |
3169 | foreach (bool l3 in YP.unify(arg2, NextCh)) | 3169 | foreach (bool l3 in YP.unify(arg2, NextCh)) |
3170 | { | 3170 | { |
3171 | foreach (bool l4 in YP.unify(arg3, Atom.NIL)) | 3171 | foreach (bool l4 in YP.unify(arg3, Atom.NIL)) |
3172 | { | 3172 | { |
3173 | foreach (bool l5 in YP.unify(arg5, NextCh)) | 3173 | foreach (bool l5 in YP.unify(arg5, NextCh)) |
3174 | { | 3174 | { |
3175 | yield return true; | 3175 | yield return true; |
3176 | yield break; | 3176 | yield break; |
3177 | } | 3177 | } |
3178 | } | 3178 | } |
3179 | } | 3179 | } |
3180 | } | 3180 | } |
3181 | } | 3181 | } |
3182 | { | 3182 | { |
3183 | object Char = arg1; | 3183 | object Char = arg1; |
3184 | object Next = arg2; | 3184 | object Next = arg2; |
3185 | object Quote = arg4; | 3185 | object Quote = arg4; |
3186 | object NextCh = arg5; | 3186 | object NextCh = arg5; |
3187 | Variable Chars = new Variable(); | 3187 | Variable Chars = new Variable(); |
3188 | Variable Char2 = new Variable(); | 3188 | Variable Char2 = new Variable(); |
3189 | Variable Next2 = new Variable(); | 3189 | Variable Next2 = new Variable(); |
3190 | foreach (bool l2 in YP.unify(arg3, new ListPair(Char, Chars))) | 3190 | foreach (bool l2 in YP.unify(arg3, new ListPair(Char, Chars))) |
3191 | { | 3191 | { |
3192 | foreach (bool l3 in read_char(Next, Quote, Char2, Next2)) | 3192 | foreach (bool l3 in read_char(Next, Quote, Char2, Next2)) |
3193 | { | 3193 | { |
3194 | foreach (bool l4 in rest_string5(Char2, Next2, Chars, Quote, NextCh)) | 3194 | foreach (bool l4 in rest_string5(Char2, Next2, Chars, Quote, NextCh)) |
3195 | { | 3195 | { |
3196 | yield return false; | 3196 | yield return false; |
3197 | } | 3197 | } |
3198 | } | 3198 | } |
3199 | } | 3199 | } |
3200 | } | 3200 | } |
3201 | } | 3201 | } |
3202 | 3202 | ||
3203 | public static IEnumerable<bool> escape_char(object arg1, object arg2) | 3203 | public static IEnumerable<bool> escape_char(object arg1, object arg2) |
3204 | { | 3204 | { |
3205 | { | 3205 | { |
3206 | foreach (bool l2 in YP.unify(arg1, 110)) | 3206 | foreach (bool l2 in YP.unify(arg1, 110)) |
3207 | { | 3207 | { |
3208 | foreach (bool l3 in YP.unify(arg2, 10)) | 3208 | foreach (bool l3 in YP.unify(arg2, 10)) |
3209 | { | 3209 | { |
3210 | yield return false; | 3210 | yield return false; |
3211 | } | 3211 | } |
3212 | } | 3212 | } |
3213 | } | 3213 | } |
3214 | { | 3214 | { |
3215 | foreach (bool l2 in YP.unify(arg1, 78)) | 3215 | foreach (bool l2 in YP.unify(arg1, 78)) |
3216 | { | 3216 | { |
3217 | foreach (bool l3 in YP.unify(arg2, 10)) | 3217 | foreach (bool l3 in YP.unify(arg2, 10)) |
3218 | { | 3218 | { |
3219 | yield return false; | 3219 | yield return false; |
3220 | } | 3220 | } |
3221 | } | 3221 | } |
3222 | } | 3222 | } |
3223 | { | 3223 | { |
3224 | foreach (bool l2 in YP.unify(arg1, 116)) | 3224 | foreach (bool l2 in YP.unify(arg1, 116)) |
3225 | { | 3225 | { |
3226 | foreach (bool l3 in YP.unify(arg2, 9)) | 3226 | foreach (bool l3 in YP.unify(arg2, 9)) |
3227 | { | 3227 | { |
3228 | yield return false; | 3228 | yield return false; |
3229 | } | 3229 | } |
3230 | } | 3230 | } |
3231 | } | 3231 | } |
3232 | { | 3232 | { |
3233 | foreach (bool l2 in YP.unify(arg1, 84)) | 3233 | foreach (bool l2 in YP.unify(arg1, 84)) |
3234 | { | 3234 | { |
3235 | foreach (bool l3 in YP.unify(arg2, 9)) | 3235 | foreach (bool l3 in YP.unify(arg2, 9)) |
3236 | { | 3236 | { |
3237 | yield return false; | 3237 | yield return false; |
3238 | } | 3238 | } |
3239 | } | 3239 | } |
3240 | } | 3240 | } |
3241 | { | 3241 | { |
3242 | foreach (bool l2 in YP.unify(arg1, 114)) | 3242 | foreach (bool l2 in YP.unify(arg1, 114)) |
3243 | { | 3243 | { |
3244 | foreach (bool l3 in YP.unify(arg2, 13)) | 3244 | foreach (bool l3 in YP.unify(arg2, 13)) |
3245 | { | 3245 | { |
3246 | yield return false; | 3246 | yield return false; |
3247 | } | 3247 | } |
3248 | } | 3248 | } |
3249 | } | 3249 | } |
3250 | { | 3250 | { |
3251 | foreach (bool l2 in YP.unify(arg1, 82)) | 3251 | foreach (bool l2 in YP.unify(arg1, 82)) |
3252 | { | 3252 | { |
3253 | foreach (bool l3 in YP.unify(arg2, 13)) | 3253 | foreach (bool l3 in YP.unify(arg2, 13)) |
3254 | { | 3254 | { |
3255 | yield return false; | 3255 | yield return false; |
3256 | } | 3256 | } |
3257 | } | 3257 | } |
3258 | } | 3258 | } |
3259 | { | 3259 | { |
3260 | foreach (bool l2 in YP.unify(arg1, 118)) | 3260 | foreach (bool l2 in YP.unify(arg1, 118)) |
3261 | { | 3261 | { |
3262 | foreach (bool l3 in YP.unify(arg2, 11)) | 3262 | foreach (bool l3 in YP.unify(arg2, 11)) |
3263 | { | 3263 | { |
3264 | yield return false; | 3264 | yield return false; |
3265 | } | 3265 | } |
3266 | } | 3266 | } |
3267 | } | 3267 | } |
3268 | { | 3268 | { |
3269 | foreach (bool l2 in YP.unify(arg1, 86)) | 3269 | foreach (bool l2 in YP.unify(arg1, 86)) |
3270 | { | 3270 | { |
3271 | foreach (bool l3 in YP.unify(arg2, 11)) | 3271 | foreach (bool l3 in YP.unify(arg2, 11)) |
3272 | { | 3272 | { |
3273 | yield return false; | 3273 | yield return false; |
3274 | } | 3274 | } |
3275 | } | 3275 | } |
3276 | } | 3276 | } |
3277 | { | 3277 | { |
3278 | foreach (bool l2 in YP.unify(arg1, 98)) | 3278 | foreach (bool l2 in YP.unify(arg1, 98)) |
3279 | { | 3279 | { |
3280 | foreach (bool l3 in YP.unify(arg2, 8)) | 3280 | foreach (bool l3 in YP.unify(arg2, 8)) |
3281 | { | 3281 | { |
3282 | yield return false; | 3282 | yield return false; |
3283 | } | 3283 | } |
3284 | } | 3284 | } |
3285 | } | 3285 | } |
3286 | { | 3286 | { |
3287 | foreach (bool l2 in YP.unify(arg1, 66)) | 3287 | foreach (bool l2 in YP.unify(arg1, 66)) |
3288 | { | 3288 | { |
3289 | foreach (bool l3 in YP.unify(arg2, 8)) | 3289 | foreach (bool l3 in YP.unify(arg2, 8)) |
3290 | { | 3290 | { |
3291 | yield return false; | 3291 | yield return false; |
3292 | } | 3292 | } |
3293 | } | 3293 | } |
3294 | } | 3294 | } |
3295 | { | 3295 | { |
3296 | foreach (bool l2 in YP.unify(arg1, 102)) | 3296 | foreach (bool l2 in YP.unify(arg1, 102)) |
3297 | { | 3297 | { |
3298 | foreach (bool l3 in YP.unify(arg2, 12)) | 3298 | foreach (bool l3 in YP.unify(arg2, 12)) |
3299 | { | 3299 | { |
3300 | yield return false; | 3300 | yield return false; |
3301 | } | 3301 | } |
3302 | } | 3302 | } |
3303 | } | 3303 | } |
3304 | { | 3304 | { |
3305 | foreach (bool l2 in YP.unify(arg1, 70)) | 3305 | foreach (bool l2 in YP.unify(arg1, 70)) |
3306 | { | 3306 | { |
3307 | foreach (bool l3 in YP.unify(arg2, 12)) | 3307 | foreach (bool l3 in YP.unify(arg2, 12)) |
3308 | { | 3308 | { |
3309 | yield return false; | 3309 | yield return false; |
3310 | } | 3310 | } |
3311 | } | 3311 | } |
3312 | } | 3312 | } |
3313 | { | 3313 | { |
3314 | foreach (bool l2 in YP.unify(arg1, 101)) | 3314 | foreach (bool l2 in YP.unify(arg1, 101)) |
3315 | { | 3315 | { |
3316 | foreach (bool l3 in YP.unify(arg2, 27)) | 3316 | foreach (bool l3 in YP.unify(arg2, 27)) |
3317 | { | 3317 | { |
3318 | yield return false; | 3318 | yield return false; |
3319 | } | 3319 | } |
3320 | } | 3320 | } |
3321 | } | 3321 | } |
3322 | { | 3322 | { |
3323 | foreach (bool l2 in YP.unify(arg1, 69)) | 3323 | foreach (bool l2 in YP.unify(arg1, 69)) |
3324 | { | 3324 | { |
3325 | foreach (bool l3 in YP.unify(arg2, 27)) | 3325 | foreach (bool l3 in YP.unify(arg2, 27)) |
3326 | { | 3326 | { |
3327 | yield return false; | 3327 | yield return false; |
3328 | } | 3328 | } |
3329 | } | 3329 | } |
3330 | } | 3330 | } |
3331 | { | 3331 | { |
3332 | foreach (bool l2 in YP.unify(arg1, 100)) | 3332 | foreach (bool l2 in YP.unify(arg1, 100)) |
3333 | { | 3333 | { |
3334 | foreach (bool l3 in YP.unify(arg2, 127)) | 3334 | foreach (bool l3 in YP.unify(arg2, 127)) |
3335 | { | 3335 | { |
3336 | yield return false; | 3336 | yield return false; |
3337 | } | 3337 | } |
3338 | } | 3338 | } |
3339 | } | 3339 | } |
3340 | { | 3340 | { |
3341 | foreach (bool l2 in YP.unify(arg1, 68)) | 3341 | foreach (bool l2 in YP.unify(arg1, 68)) |
3342 | { | 3342 | { |
3343 | foreach (bool l3 in YP.unify(arg2, 127)) | 3343 | foreach (bool l3 in YP.unify(arg2, 127)) |
3344 | { | 3344 | { |
3345 | yield return false; | 3345 | yield return false; |
3346 | } | 3346 | } |
3347 | } | 3347 | } |
3348 | } | 3348 | } |
3349 | { | 3349 | { |
3350 | foreach (bool l2 in YP.unify(arg1, 115)) | 3350 | foreach (bool l2 in YP.unify(arg1, 115)) |
3351 | { | 3351 | { |
3352 | foreach (bool l3 in YP.unify(arg2, 32)) | 3352 | foreach (bool l3 in YP.unify(arg2, 32)) |
3353 | { | 3353 | { |
3354 | yield return false; | 3354 | yield return false; |
3355 | } | 3355 | } |
3356 | } | 3356 | } |
3357 | } | 3357 | } |
3358 | { | 3358 | { |
3359 | foreach (bool l2 in YP.unify(arg1, 83)) | 3359 | foreach (bool l2 in YP.unify(arg1, 83)) |
3360 | { | 3360 | { |
3361 | foreach (bool l3 in YP.unify(arg2, 32)) | 3361 | foreach (bool l3 in YP.unify(arg2, 32)) |
3362 | { | 3362 | { |
3363 | yield return false; | 3363 | yield return false; |
3364 | } | 3364 | } |
3365 | } | 3365 | } |
3366 | } | 3366 | } |
3367 | { | 3367 | { |
3368 | foreach (bool l2 in YP.unify(arg1, 122)) | 3368 | foreach (bool l2 in YP.unify(arg1, 122)) |
3369 | { | 3369 | { |
3370 | foreach (bool l3 in YP.unify(arg2, -1)) | 3370 | foreach (bool l3 in YP.unify(arg2, -1)) |
3371 | { | 3371 | { |
3372 | yield return false; | 3372 | yield return false; |
3373 | } | 3373 | } |
3374 | } | 3374 | } |
3375 | } | 3375 | } |
3376 | { | 3376 | { |
3377 | foreach (bool l2 in YP.unify(arg1, 90)) | 3377 | foreach (bool l2 in YP.unify(arg1, 90)) |
3378 | { | 3378 | { |
3379 | foreach (bool l3 in YP.unify(arg2, -1)) | 3379 | foreach (bool l3 in YP.unify(arg2, -1)) |
3380 | { | 3380 | { |
3381 | yield return false; | 3381 | yield return false; |
3382 | } | 3382 | } |
3383 | } | 3383 | } |
3384 | } | 3384 | } |
3385 | } | 3385 | } |
3386 | 3386 | ||
3387 | public static IEnumerable<bool> read_variable(object C1, object Dict, object arg3) | 3387 | public static IEnumerable<bool> read_variable(object C1, object Dict, object arg3) |
3388 | { | 3388 | { |
3389 | { | 3389 | { |
3390 | Variable Var = new Variable(); | 3390 | Variable Var = new Variable(); |
3391 | Variable Name = new Variable(); | 3391 | Variable Name = new Variable(); |
3392 | Variable StartPos = new Variable(); | 3392 | Variable StartPos = new Variable(); |
3393 | Variable Tokens = new Variable(); | 3393 | Variable Tokens = new Variable(); |
3394 | Variable Chars = new Variable(); | 3394 | Variable Chars = new Variable(); |
3395 | Variable NextCh = new Variable(); | 3395 | Variable NextCh = new Variable(); |
3396 | foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor3(@"var", Var, Name, StartPos), Tokens))) | 3396 | foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor3(@"var", Var, Name, StartPos), Tokens))) |
3397 | { | 3397 | { |
3398 | foreach (bool l3 in get_current_position(StartPos)) | 3398 | foreach (bool l3 in get_current_position(StartPos)) |
3399 | { | 3399 | { |
3400 | foreach (bool l4 in read_name(C1, Chars, NextCh)) | 3400 | foreach (bool l4 in read_name(C1, Chars, NextCh)) |
3401 | { | 3401 | { |
3402 | foreach (bool l5 in YP.atom_codes(Name, Chars)) | 3402 | foreach (bool l5 in YP.atom_codes(Name, Chars)) |
3403 | { | 3403 | { |
3404 | if (YP.termEqual(Name, Atom.a(@"_"))) | 3404 | if (YP.termEqual(Name, Atom.a(@"_"))) |
3405 | { | 3405 | { |
3406 | foreach (bool l7 in read_after_atom(NextCh, Dict, Tokens)) | 3406 | foreach (bool l7 in read_after_atom(NextCh, Dict, Tokens)) |
3407 | { | 3407 | { |
3408 | yield return false; | 3408 | yield return false; |
3409 | } | 3409 | } |
3410 | goto cutIf1; | 3410 | goto cutIf1; |
3411 | } | 3411 | } |
3412 | foreach (bool l6 in read_lookup(Dict, Name, Var)) | 3412 | foreach (bool l6 in read_lookup(Dict, Name, Var)) |
3413 | { | 3413 | { |
3414 | foreach (bool l7 in read_after_atom(NextCh, Dict, Tokens)) | 3414 | foreach (bool l7 in read_after_atom(NextCh, Dict, Tokens)) |
3415 | { | 3415 | { |
3416 | yield return false; | 3416 | yield return false; |
3417 | } | 3417 | } |
3418 | } | 3418 | } |
3419 | cutIf1: | 3419 | cutIf1: |
3420 | { } | 3420 | { } |
3421 | } | 3421 | } |
3422 | } | 3422 | } |
3423 | } | 3423 | } |
3424 | } | 3424 | } |
3425 | } | 3425 | } |
3426 | } | 3426 | } |
3427 | 3427 | ||
3428 | public static IEnumerable<bool> read_lookup(object arg1, object Name, object Var) | 3428 | public static IEnumerable<bool> read_lookup(object arg1, object Name, object Var) |
3429 | { | 3429 | { |
3430 | { | 3430 | { |
3431 | Variable N = new Variable(); | 3431 | Variable N = new Variable(); |
3432 | Variable V = new Variable(); | 3432 | Variable V = new Variable(); |
3433 | Variable L = new Variable(); | 3433 | Variable L = new Variable(); |
3434 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"=", N, V), L))) | 3434 | foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2(@"=", N, V), L))) |
3435 | { | 3435 | { |
3436 | foreach (bool l3 in YP.unify(N, Name)) | 3436 | foreach (bool l3 in YP.unify(N, Name)) |
3437 | { | 3437 | { |
3438 | foreach (bool l4 in YP.unify(V, Var)) | 3438 | foreach (bool l4 in YP.unify(V, Var)) |
3439 | { | 3439 | { |
3440 | yield return false; | 3440 | yield return false; |
3441 | } | 3441 | } |
3442 | goto cutIf1; | 3442 | goto cutIf1; |
3443 | } | 3443 | } |
3444 | foreach (bool l3 in read_lookup(L, Name, Var)) | 3444 | foreach (bool l3 in read_lookup(L, Name, Var)) |
3445 | { | 3445 | { |
3446 | yield return false; | 3446 | yield return false; |
3447 | } | 3447 | } |
3448 | cutIf1: | 3448 | cutIf1: |
3449 | { } | 3449 | { } |
3450 | } | 3450 | } |
3451 | } | 3451 | } |
3452 | } | 3452 | } |
3453 | 3453 | ||
3454 | public static IEnumerable<bool> read_solidus(object Ch, object LastCh) | 3454 | public static IEnumerable<bool> read_solidus(object Ch, object LastCh) |
3455 | { | 3455 | { |
3456 | { | 3456 | { |
3457 | Variable NextCh = new Variable(); | 3457 | Variable NextCh = new Variable(); |
3458 | if (YP.equal(Ch, 42)) | 3458 | if (YP.equal(Ch, 42)) |
3459 | { | 3459 | { |
3460 | foreach (bool l3 in YP.get_code(NextCh)) | 3460 | foreach (bool l3 in YP.get_code(NextCh)) |
3461 | { | 3461 | { |
3462 | if (YP.equal(NextCh, 47)) | 3462 | if (YP.equal(NextCh, 47)) |
3463 | { | 3463 | { |
3464 | foreach (bool l5 in YP.get_code(LastCh)) | 3464 | foreach (bool l5 in YP.get_code(LastCh)) |
3465 | { | 3465 | { |
3466 | yield return false; | 3466 | yield return false; |
3467 | } | 3467 | } |
3468 | goto cutIf2; | 3468 | goto cutIf2; |
3469 | } | 3469 | } |
3470 | foreach (bool l4 in read_solidus(NextCh, LastCh)) | 3470 | foreach (bool l4 in read_solidus(NextCh, LastCh)) |
3471 | { | 3471 | { |
3472 | yield return false; | 3472 | yield return false; |
3473 | } | 3473 | } |
3474 | cutIf2: | 3474 | cutIf2: |
3475 | { } | 3475 | { } |
3476 | } | 3476 | } |
3477 | goto cutIf1; | 3477 | goto cutIf1; |
3478 | } | 3478 | } |
3479 | if (YP.notEqual(Ch, -1)) | 3479 | if (YP.notEqual(Ch, -1)) |
3480 | { | 3480 | { |
3481 | foreach (bool l3 in YP.get_code(NextCh)) | 3481 | foreach (bool l3 in YP.get_code(NextCh)) |
3482 | { | 3482 | { |
3483 | foreach (bool l4 in read_solidus(NextCh, LastCh)) | 3483 | foreach (bool l4 in read_solidus(NextCh, LastCh)) |
3484 | { | 3484 | { |
3485 | yield return false; | 3485 | yield return false; |
3486 | } | 3486 | } |
3487 | } | 3487 | } |
3488 | goto cutIf3; | 3488 | goto cutIf3; |
3489 | } | 3489 | } |
3490 | foreach (bool l2 in YP.unify(LastCh, Ch)) | 3490 | foreach (bool l2 in YP.unify(LastCh, Ch)) |
3491 | { | 3491 | { |
3492 | foreach (bool l3 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** end of file in /*comment~n"), Atom.NIL)) | 3492 | foreach (bool l3 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** end of file in /*comment~n"), Atom.NIL)) |
3493 | { | 3493 | { |
3494 | yield return false; | 3494 | yield return false; |
3495 | } | 3495 | } |
3496 | } | 3496 | } |
3497 | cutIf3: | 3497 | cutIf3: |
3498 | cutIf1: | 3498 | cutIf1: |
3499 | { } | 3499 | { } |
3500 | } | 3500 | } |
3501 | } | 3501 | } |
3502 | 3502 | ||
3503 | public static IEnumerable<bool> read_identifier(object C1, object Dict, object Tokens) | 3503 | public static IEnumerable<bool> read_identifier(object C1, object Dict, object Tokens) |
3504 | { | 3504 | { |
3505 | { | 3505 | { |
3506 | Variable Chars = new Variable(); | 3506 | Variable Chars = new Variable(); |
3507 | Variable NextCh = new Variable(); | 3507 | Variable NextCh = new Variable(); |
3508 | foreach (bool l2 in read_name(C1, Chars, NextCh)) | 3508 | foreach (bool l2 in read_name(C1, Chars, NextCh)) |
3509 | { | 3509 | { |
3510 | foreach (bool l3 in read_after_atom4(NextCh, Dict, Tokens, Chars)) | 3510 | foreach (bool l3 in read_after_atom4(NextCh, Dict, Tokens, Chars)) |
3511 | { | 3511 | { |
3512 | yield return false; | 3512 | yield return false; |
3513 | } | 3513 | } |
3514 | } | 3514 | } |
3515 | } | 3515 | } |
3516 | } | 3516 | } |
3517 | 3517 | ||
3518 | public static IEnumerable<bool> read_name(object C1, object arg2, object LastCh) | 3518 | public static IEnumerable<bool> read_name(object C1, object arg2, object LastCh) |
3519 | { | 3519 | { |
3520 | { | 3520 | { |
3521 | Variable Chars = new Variable(); | 3521 | Variable Chars = new Variable(); |
3522 | Variable C2 = new Variable(); | 3522 | Variable C2 = new Variable(); |
3523 | foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars))) | 3523 | foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars))) |
3524 | { | 3524 | { |
3525 | foreach (bool l3 in YP.get_code(C2)) | 3525 | foreach (bool l3 in YP.get_code(C2)) |
3526 | { | 3526 | { |
3527 | if (YP.greaterThanOrEqual(C2, new ListPair(97, Atom.NIL))) | 3527 | if (YP.greaterThanOrEqual(C2, new ListPair(97, Atom.NIL))) |
3528 | { | 3528 | { |
3529 | if (YP.lessThanOrEqual(C2, new ListPair(122, Atom.NIL))) | 3529 | if (YP.lessThanOrEqual(C2, new ListPair(122, Atom.NIL))) |
3530 | { | 3530 | { |
3531 | foreach (bool l6 in read_name(C2, Chars, LastCh)) | 3531 | foreach (bool l6 in read_name(C2, Chars, LastCh)) |
3532 | { | 3532 | { |
3533 | yield return false; | 3533 | yield return false; |
3534 | } | 3534 | } |
3535 | goto cutIf2; | 3535 | goto cutIf2; |
3536 | } | 3536 | } |
3537 | if (YP.lessThan(C2, 192)) | 3537 | if (YP.lessThan(C2, 192)) |
3538 | { | 3538 | { |
3539 | if (YP.notEqual(YP.bitwiseOr(C2, 16), 186)) | 3539 | if (YP.notEqual(YP.bitwiseOr(C2, 16), 186)) |
3540 | { | 3540 | { |
3541 | foreach (bool l7 in YP.unify(Chars, Atom.NIL)) | 3541 | foreach (bool l7 in YP.unify(Chars, Atom.NIL)) |
3542 | { | 3542 | { |
3543 | foreach (bool l8 in YP.unify(LastCh, C2)) | 3543 | foreach (bool l8 in YP.unify(LastCh, C2)) |
3544 | { | 3544 | { |
3545 | yield return false; | 3545 | yield return false; |
3546 | } | 3546 | } |
3547 | } | 3547 | } |
3548 | goto cutIf3; | 3548 | goto cutIf3; |
3549 | } | 3549 | } |
3550 | } | 3550 | } |
3551 | if (YP.equal(YP.bitwiseOr(C2, 32), 247)) | 3551 | if (YP.equal(YP.bitwiseOr(C2, 32), 247)) |
3552 | { | 3552 | { |
3553 | foreach (bool l6 in YP.unify(Chars, Atom.NIL)) | 3553 | foreach (bool l6 in YP.unify(Chars, Atom.NIL)) |
3554 | { | 3554 | { |
3555 | foreach (bool l7 in YP.unify(LastCh, C2)) | 3555 | foreach (bool l7 in YP.unify(LastCh, C2)) |
3556 | { | 3556 | { |
3557 | yield return false; | 3557 | yield return false; |
3558 | } | 3558 | } |
3559 | } | 3559 | } |
3560 | goto cutIf4; | 3560 | goto cutIf4; |
3561 | } | 3561 | } |
3562 | foreach (bool l5 in read_name(C2, Chars, LastCh)) | 3562 | foreach (bool l5 in read_name(C2, Chars, LastCh)) |
3563 | { | 3563 | { |
3564 | yield return false; | 3564 | yield return false; |
3565 | } | 3565 | } |
3566 | cutIf4: | 3566 | cutIf4: |
3567 | cutIf3: | 3567 | cutIf3: |
3568 | cutIf2: | 3568 | cutIf2: |
3569 | goto cutIf1; | 3569 | goto cutIf1; |
3570 | } | 3570 | } |
3571 | if (YP.greaterThanOrEqual(C2, new ListPair(65, Atom.NIL))) | 3571 | if (YP.greaterThanOrEqual(C2, new ListPair(65, Atom.NIL))) |
3572 | { | 3572 | { |
3573 | if (YP.greaterThan(C2, new ListPair(90, Atom.NIL))) | 3573 | if (YP.greaterThan(C2, new ListPair(90, Atom.NIL))) |
3574 | { | 3574 | { |
3575 | if (YP.notEqual(C2, new ListPair(95, Atom.NIL))) | 3575 | if (YP.notEqual(C2, new ListPair(95, Atom.NIL))) |
3576 | { | 3576 | { |
3577 | foreach (bool l7 in YP.unify(Chars, Atom.NIL)) | 3577 | foreach (bool l7 in YP.unify(Chars, Atom.NIL)) |
3578 | { | 3578 | { |
3579 | foreach (bool l8 in YP.unify(LastCh, C2)) | 3579 | foreach (bool l8 in YP.unify(LastCh, C2)) |
3580 | { | 3580 | { |
3581 | yield return false; | 3581 | yield return false; |
3582 | } | 3582 | } |
3583 | } | 3583 | } |
3584 | goto cutIf6; | 3584 | goto cutIf6; |
3585 | } | 3585 | } |
3586 | } | 3586 | } |
3587 | foreach (bool l5 in read_name(C2, Chars, LastCh)) | 3587 | foreach (bool l5 in read_name(C2, Chars, LastCh)) |
3588 | { | 3588 | { |
3589 | yield return false; | 3589 | yield return false; |
3590 | } | 3590 | } |
3591 | cutIf6: | 3591 | cutIf6: |
3592 | goto cutIf5; | 3592 | goto cutIf5; |
3593 | } | 3593 | } |
3594 | if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) | 3594 | if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) |
3595 | { | 3595 | { |
3596 | if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL))) | 3596 | if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL))) |
3597 | { | 3597 | { |
3598 | foreach (bool l6 in read_name(C2, Chars, LastCh)) | 3598 | foreach (bool l6 in read_name(C2, Chars, LastCh)) |
3599 | { | 3599 | { |
3600 | yield return false; | 3600 | yield return false; |
3601 | } | 3601 | } |
3602 | goto cutIf7; | 3602 | goto cutIf7; |
3603 | } | 3603 | } |
3604 | } | 3604 | } |
3605 | foreach (bool l4 in YP.unify(Chars, Atom.NIL)) | 3605 | foreach (bool l4 in YP.unify(Chars, Atom.NIL)) |
3606 | { | 3606 | { |
3607 | foreach (bool l5 in YP.unify(LastCh, C2)) | 3607 | foreach (bool l5 in YP.unify(LastCh, C2)) |
3608 | { | 3608 | { |
3609 | yield return false; | 3609 | yield return false; |
3610 | } | 3610 | } |
3611 | } | 3611 | } |
3612 | cutIf7: | 3612 | cutIf7: |
3613 | cutIf5: | 3613 | cutIf5: |
3614 | cutIf1: | 3614 | cutIf1: |
3615 | { } | 3615 | { } |
3616 | } | 3616 | } |
3617 | } | 3617 | } |
3618 | } | 3618 | } |
3619 | } | 3619 | } |
3620 | 3620 | ||
3621 | public static IEnumerable<bool> read_fullstop(object Ch, object Dict, object Tokens) | 3621 | public static IEnumerable<bool> read_fullstop(object Ch, object Dict, object Tokens) |
3622 | { | 3622 | { |
3623 | { | 3623 | { |
3624 | Variable Number = new Variable(); | 3624 | Variable Number = new Variable(); |
3625 | Variable Tokens1 = new Variable(); | 3625 | Variable Tokens1 = new Variable(); |
3626 | Variable Chars = new Variable(); | 3626 | Variable Chars = new Variable(); |
3627 | Variable NextCh = new Variable(); | 3627 | Variable NextCh = new Variable(); |
3628 | if (YP.lessThanOrEqual(Ch, new ListPair(57, Atom.NIL))) | 3628 | if (YP.lessThanOrEqual(Ch, new ListPair(57, Atom.NIL))) |
3629 | { | 3629 | { |
3630 | if (YP.greaterThanOrEqual(Ch, new ListPair(48, Atom.NIL))) | 3630 | if (YP.greaterThanOrEqual(Ch, new ListPair(48, Atom.NIL))) |
3631 | { | 3631 | { |
3632 | foreach (bool l4 in YP.unify(Tokens, new ListPair(new Functor1(@"number", Number), Tokens1))) | 3632 | foreach (bool l4 in YP.unify(Tokens, new ListPair(new Functor1(@"number", Number), Tokens1))) |
3633 | { | 3633 | { |
3634 | foreach (bool l5 in read_float(Number, Dict, Tokens1, new ListPair(48, Atom.NIL), Ch)) | 3634 | foreach (bool l5 in read_float(Number, Dict, Tokens1, new ListPair(48, Atom.NIL), Ch)) |
3635 | { | 3635 | { |
3636 | yield return false; | 3636 | yield return false; |
3637 | } | 3637 | } |
3638 | } | 3638 | } |
3639 | goto cutIf1; | 3639 | goto cutIf1; |
3640 | } | 3640 | } |
3641 | } | 3641 | } |
3642 | if (YP.greaterThan(Ch, new ListPair(32, Atom.NIL))) | 3642 | if (YP.greaterThan(Ch, new ListPair(32, Atom.NIL))) |
3643 | { | 3643 | { |
3644 | foreach (bool l3 in rest_symbol(Ch, Chars, NextCh)) | 3644 | foreach (bool l3 in rest_symbol(Ch, Chars, NextCh)) |
3645 | { | 3645 | { |
3646 | foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(46, Chars))) | 3646 | foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(46, Chars))) |
3647 | { | 3647 | { |
3648 | yield return false; | 3648 | yield return false; |
3649 | } | 3649 | } |
3650 | } | 3650 | } |
3651 | goto cutIf2; | 3651 | goto cutIf2; |
3652 | } | 3652 | } |
3653 | if (YP.greaterThanOrEqual(Ch, 0)) | 3653 | if (YP.greaterThanOrEqual(Ch, 0)) |
3654 | { | 3654 | { |
3655 | foreach (bool l3 in YP.unify(Tokens, Atom.NIL)) | 3655 | foreach (bool l3 in YP.unify(Tokens, Atom.NIL)) |
3656 | { | 3656 | { |
3657 | yield return false; | 3657 | yield return false; |
3658 | } | 3658 | } |
3659 | goto cutIf3; | 3659 | goto cutIf3; |
3660 | } | 3660 | } |
3661 | foreach (bool l2 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** end of file just after full stop~n"), Atom.NIL)) | 3661 | foreach (bool l2 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** end of file just after full stop~n"), Atom.NIL)) |
3662 | { | 3662 | { |
3663 | } | 3663 | } |
3664 | cutIf3: | 3664 | cutIf3: |
3665 | cutIf2: | 3665 | cutIf2: |
3666 | cutIf1: | 3666 | cutIf1: |
3667 | { } | 3667 | { } |
3668 | } | 3668 | } |
3669 | } | 3669 | } |
3670 | 3670 | ||
3671 | public static IEnumerable<bool> read_float(object Number, object Dict, object Tokens, object Digits, object Digit) | 3671 | public static IEnumerable<bool> read_float(object Number, object Dict, object Tokens, object Digits, object Digit) |
3672 | { | 3672 | { |
3673 | { | 3673 | { |
3674 | Variable Chars = new Variable(); | 3674 | Variable Chars = new Variable(); |
3675 | Variable Rest = new Variable(); | 3675 | Variable Rest = new Variable(); |
3676 | Variable NextCh = new Variable(); | 3676 | Variable NextCh = new Variable(); |
3677 | foreach (bool l2 in prepend(Digits, Chars, Rest)) | 3677 | foreach (bool l2 in prepend(Digits, Chars, Rest)) |
3678 | { | 3678 | { |
3679 | foreach (bool l3 in read_float(Digit, Rest, NextCh, Chars)) | 3679 | foreach (bool l3 in read_float(Digit, Rest, NextCh, Chars)) |
3680 | { | 3680 | { |
3681 | foreach (bool l4 in YP.number_codes(Number, Chars)) | 3681 | foreach (bool l4 in YP.number_codes(Number, Chars)) |
3682 | { | 3682 | { |
3683 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) | 3683 | foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) |
3684 | { | 3684 | { |
3685 | yield return false; | 3685 | yield return false; |
3686 | } | 3686 | } |
3687 | } | 3687 | } |
3688 | } | 3688 | } |
3689 | } | 3689 | } |
3690 | } | 3690 | } |
3691 | } | 3691 | } |
3692 | 3692 | ||
3693 | public static IEnumerable<bool> prepend(object arg1, object arg2, object arg3) | 3693 | public static IEnumerable<bool> prepend(object arg1, object arg2, object arg3) |
3694 | { | 3694 | { |
3695 | { | 3695 | { |
3696 | object X = arg3; | 3696 | object X = arg3; |
3697 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 3697 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
3698 | { | 3698 | { |
3699 | foreach (bool l3 in YP.unify(arg2, new ListPair(46, X))) | 3699 | foreach (bool l3 in YP.unify(arg2, new ListPair(46, X))) |
3700 | { | 3700 | { |
3701 | yield return false; | 3701 | yield return false; |
3702 | } | 3702 | } |
3703 | } | 3703 | } |
3704 | } | 3704 | } |
3705 | { | 3705 | { |
3706 | object Y = arg3; | 3706 | object Y = arg3; |
3707 | Variable C = new Variable(); | 3707 | Variable C = new Variable(); |
3708 | Variable Cs = new Variable(); | 3708 | Variable Cs = new Variable(); |
3709 | Variable X = new Variable(); | 3709 | Variable X = new Variable(); |
3710 | foreach (bool l2 in YP.unify(arg1, new ListPair(C, Cs))) | 3710 | foreach (bool l2 in YP.unify(arg1, new ListPair(C, Cs))) |
3711 | { | 3711 | { |
3712 | foreach (bool l3 in YP.unify(arg2, new ListPair(C, X))) | 3712 | foreach (bool l3 in YP.unify(arg2, new ListPair(C, X))) |
3713 | { | 3713 | { |
3714 | foreach (bool l4 in prepend(Cs, X, Y)) | 3714 | foreach (bool l4 in prepend(Cs, X, Y)) |
3715 | { | 3715 | { |
3716 | yield return false; | 3716 | yield return false; |
3717 | } | 3717 | } |
3718 | } | 3718 | } |
3719 | } | 3719 | } |
3720 | } | 3720 | } |
3721 | } | 3721 | } |
3722 | 3722 | ||
3723 | public static IEnumerable<bool> read_float(object C1, object arg2, object NextCh, object Total) | 3723 | public static IEnumerable<bool> read_float(object C1, object arg2, object NextCh, object Total) |
3724 | { | 3724 | { |
3725 | { | 3725 | { |
3726 | Variable Chars = new Variable(); | 3726 | Variable Chars = new Variable(); |
3727 | Variable C2 = new Variable(); | 3727 | Variable C2 = new Variable(); |
3728 | Variable C3 = new Variable(); | 3728 | Variable C3 = new Variable(); |
3729 | Variable C4 = new Variable(); | 3729 | Variable C4 = new Variable(); |
3730 | Variable More = new Variable(); | 3730 | Variable More = new Variable(); |
3731 | foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars))) | 3731 | foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars))) |
3732 | { | 3732 | { |
3733 | foreach (bool l3 in YP.get_code(C2)) | 3733 | foreach (bool l3 in YP.get_code(C2)) |
3734 | { | 3734 | { |
3735 | if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) | 3735 | if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) |
3736 | { | 3736 | { |
3737 | if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL))) | 3737 | if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL))) |
3738 | { | 3738 | { |
3739 | foreach (bool l6 in read_float(C2, Chars, NextCh, Total)) | 3739 | foreach (bool l6 in read_float(C2, Chars, NextCh, Total)) |
3740 | { | 3740 | { |
3741 | yield return false; | 3741 | yield return false; |
3742 | } | 3742 | } |
3743 | goto cutIf1; | 3743 | goto cutIf1; |
3744 | } | 3744 | } |
3745 | } | 3745 | } |
3746 | if (YP.equal(YP.bitwiseOr(C2, 32), new ListPair(101, Atom.NIL))) | 3746 | if (YP.equal(YP.bitwiseOr(C2, 32), new ListPair(101, Atom.NIL))) |
3747 | { | 3747 | { |
3748 | foreach (bool l5 in YP.get_code(C3)) | 3748 | foreach (bool l5 in YP.get_code(C3)) |
3749 | { | 3749 | { |
3750 | if (YP.equal(C3, new ListPair(45, Atom.NIL))) | 3750 | if (YP.equal(C3, new ListPair(45, Atom.NIL))) |
3751 | { | 3751 | { |
3752 | foreach (bool l7 in YP.get_code(C4)) | 3752 | foreach (bool l7 in YP.get_code(C4)) |
3753 | { | 3753 | { |
3754 | foreach (bool l8 in YP.unify(Chars, new ListPair(C2, new ListPair(45, More)))) | 3754 | foreach (bool l8 in YP.unify(Chars, new ListPair(C2, new ListPair(45, More)))) |
3755 | { | 3755 | { |
3756 | if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL))) | 3756 | if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL))) |
3757 | { | 3757 | { |
3758 | if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL))) | 3758 | if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL))) |
3759 | { | 3759 | { |
3760 | foreach (bool l11 in read_exponent(C4, More, NextCh)) | 3760 | foreach (bool l11 in read_exponent(C4, More, NextCh)) |
3761 | { | 3761 | { |
3762 | yield return false; | 3762 | yield return false; |
3763 | } | 3763 | } |
3764 | goto cutIf4; | 3764 | goto cutIf4; |
3765 | } | 3765 | } |
3766 | } | 3766 | } |
3767 | foreach (bool l9 in YP.unify(More, Atom.NIL)) | 3767 | foreach (bool l9 in YP.unify(More, Atom.NIL)) |
3768 | { | 3768 | { |
3769 | foreach (bool l10 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL))) | 3769 | foreach (bool l10 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL))) |
3770 | { | 3770 | { |
3771 | } | 3771 | } |
3772 | } | 3772 | } |
3773 | foreach (bool l9 in YP.unify(More, new ListPair(48, Atom.NIL))) | 3773 | foreach (bool l9 in YP.unify(More, new ListPair(48, Atom.NIL))) |
3774 | { | 3774 | { |
3775 | foreach (bool l10 in YP.unify(NextCh, C4)) | 3775 | foreach (bool l10 in YP.unify(NextCh, C4)) |
3776 | { | 3776 | { |
3777 | yield return false; | 3777 | yield return false; |
3778 | } | 3778 | } |
3779 | } | 3779 | } |
3780 | cutIf4: | 3780 | cutIf4: |
3781 | { } | 3781 | { } |
3782 | } | 3782 | } |
3783 | } | 3783 | } |
3784 | goto cutIf3; | 3784 | goto cutIf3; |
3785 | } | 3785 | } |
3786 | if (YP.equal(C3, new ListPair(43, Atom.NIL))) | 3786 | if (YP.equal(C3, new ListPair(43, Atom.NIL))) |
3787 | { | 3787 | { |
3788 | foreach (bool l7 in YP.get_code(C4)) | 3788 | foreach (bool l7 in YP.get_code(C4)) |
3789 | { | 3789 | { |
3790 | foreach (bool l8 in YP.unify(Chars, new ListPair(C2, More))) | 3790 | foreach (bool l8 in YP.unify(Chars, new ListPair(C2, More))) |
3791 | { | 3791 | { |
3792 | if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL))) | 3792 | if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL))) |
3793 | { | 3793 | { |
3794 | if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL))) | 3794 | if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL))) |
3795 | { | 3795 | { |
3796 | foreach (bool l11 in read_exponent(C4, More, NextCh)) | 3796 | foreach (bool l11 in read_exponent(C4, More, NextCh)) |
3797 | { | 3797 | { |
3798 | yield return false; | 3798 | yield return false; |
3799 | } | 3799 | } |
3800 | goto cutIf6; | 3800 | goto cutIf6; |
3801 | } | 3801 | } |
3802 | } | 3802 | } |
3803 | foreach (bool l9 in YP.unify(More, Atom.NIL)) | 3803 | foreach (bool l9 in YP.unify(More, Atom.NIL)) |
3804 | { | 3804 | { |
3805 | foreach (bool l10 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL))) | 3805 | foreach (bool l10 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL))) |
3806 | { | 3806 | { |
3807 | } | 3807 | } |
3808 | } | 3808 | } |
3809 | foreach (bool l9 in YP.unify(More, new ListPair(48, Atom.NIL))) | 3809 | foreach (bool l9 in YP.unify(More, new ListPair(48, Atom.NIL))) |
3810 | { | 3810 | { |
3811 | foreach (bool l10 in YP.unify(NextCh, C4)) | 3811 | foreach (bool l10 in YP.unify(NextCh, C4)) |
3812 | { | 3812 | { |
3813 | yield return false; | 3813 | yield return false; |
3814 | } | 3814 | } |
3815 | } | 3815 | } |
3816 | cutIf6: | 3816 | cutIf6: |
3817 | { } | 3817 | { } |
3818 | } | 3818 | } |
3819 | } | 3819 | } |
3820 | goto cutIf5; | 3820 | goto cutIf5; |
3821 | } | 3821 | } |
3822 | foreach (bool l6 in YP.unify(C4, C3)) | 3822 | foreach (bool l6 in YP.unify(C4, C3)) |
3823 | { | 3823 | { |
3824 | foreach (bool l7 in YP.unify(Chars, new ListPair(C2, More))) | 3824 | foreach (bool l7 in YP.unify(Chars, new ListPair(C2, More))) |
3825 | { | 3825 | { |
3826 | if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL))) | 3826 | if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL))) |
3827 | { | 3827 | { |
3828 | if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL))) | 3828 | if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL))) |
3829 | { | 3829 | { |
3830 | foreach (bool l10 in read_exponent(C4, More, NextCh)) | 3830 | foreach (bool l10 in read_exponent(C4, More, NextCh)) |
3831 | { | 3831 | { |
3832 | yield return false; | 3832 | yield return false; |
3833 | } | 3833 | } |
3834 | goto cutIf7; | 3834 | goto cutIf7; |
3835 | } | 3835 | } |
3836 | } | 3836 | } |
3837 | foreach (bool l8 in YP.unify(More, Atom.NIL)) | 3837 | foreach (bool l8 in YP.unify(More, Atom.NIL)) |
3838 | { | 3838 | { |
3839 | foreach (bool l9 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL))) | 3839 | foreach (bool l9 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL))) |
3840 | { | 3840 | { |
3841 | } | 3841 | } |
3842 | } | 3842 | } |
3843 | foreach (bool l8 in YP.unify(More, new ListPair(48, Atom.NIL))) | 3843 | foreach (bool l8 in YP.unify(More, new ListPair(48, Atom.NIL))) |
3844 | { | 3844 | { |
3845 | foreach (bool l9 in YP.unify(NextCh, C4)) | 3845 | foreach (bool l9 in YP.unify(NextCh, C4)) |
3846 | { | 3846 | { |
3847 | yield return false; | 3847 | yield return false; |
3848 | } | 3848 | } |
3849 | } | 3849 | } |
3850 | cutIf7: | 3850 | cutIf7: |
3851 | { } | 3851 | { } |
3852 | } | 3852 | } |
3853 | } | 3853 | } |
3854 | cutIf5: | 3854 | cutIf5: |
3855 | cutIf3: | 3855 | cutIf3: |
3856 | { } | 3856 | { } |
3857 | } | 3857 | } |
3858 | goto cutIf2; | 3858 | goto cutIf2; |
3859 | } | 3859 | } |
3860 | foreach (bool l4 in YP.unify(Chars, Atom.NIL)) | 3860 | foreach (bool l4 in YP.unify(Chars, Atom.NIL)) |
3861 | { | 3861 | { |
3862 | foreach (bool l5 in YP.unify(NextCh, C2)) | 3862 | foreach (bool l5 in YP.unify(NextCh, C2)) |
3863 | { | 3863 | { |
3864 | yield return false; | 3864 | yield return false; |
3865 | } | 3865 | } |
3866 | } | 3866 | } |
3867 | cutIf2: | 3867 | cutIf2: |
3868 | cutIf1: | 3868 | cutIf1: |
3869 | { } | 3869 | { } |
3870 | } | 3870 | } |
3871 | } | 3871 | } |
3872 | } | 3872 | } |
3873 | } | 3873 | } |
3874 | 3874 | ||
3875 | public static IEnumerable<bool> read_exponent(object C1, object arg2, object NextCh) | 3875 | public static IEnumerable<bool> read_exponent(object C1, object arg2, object NextCh) |
3876 | { | 3876 | { |
3877 | { | 3877 | { |
3878 | Variable Chars = new Variable(); | 3878 | Variable Chars = new Variable(); |
3879 | Variable C2 = new Variable(); | 3879 | Variable C2 = new Variable(); |
3880 | foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars))) | 3880 | foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars))) |
3881 | { | 3881 | { |
3882 | foreach (bool l3 in YP.get_code(C2)) | 3882 | foreach (bool l3 in YP.get_code(C2)) |
3883 | { | 3883 | { |
3884 | if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) | 3884 | if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) |
3885 | { | 3885 | { |
3886 | if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL))) | 3886 | if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL))) |
3887 | { | 3887 | { |
3888 | foreach (bool l6 in read_exponent(C2, Chars, NextCh)) | 3888 | foreach (bool l6 in read_exponent(C2, Chars, NextCh)) |
3889 | { | 3889 | { |
3890 | yield return false; | 3890 | yield return false; |
3891 | } | 3891 | } |
3892 | goto cutIf1; | 3892 | goto cutIf1; |
3893 | } | 3893 | } |
3894 | } | 3894 | } |
3895 | foreach (bool l4 in YP.unify(Chars, Atom.NIL)) | 3895 | foreach (bool l4 in YP.unify(Chars, Atom.NIL)) |
3896 | { | 3896 | { |
3897 | foreach (bool l5 in YP.unify(NextCh, C2)) | 3897 | foreach (bool l5 in YP.unify(NextCh, C2)) |
3898 | { | 3898 | { |
3899 | yield return false; | 3899 | yield return false; |
3900 | } | 3900 | } |
3901 | } | 3901 | } |
3902 | cutIf1: | 3902 | cutIf1: |
3903 | { } | 3903 | { } |
3904 | } | 3904 | } |
3905 | } | 3905 | } |
3906 | } | 3906 | } |
3907 | } | 3907 | } |
3908 | 3908 | ||
3909 | public static IEnumerable<bool> read_number(object C1, object Dict, object arg3) | 3909 | public static IEnumerable<bool> read_number(object C1, object Dict, object arg3) |
3910 | { | 3910 | { |
3911 | { | 3911 | { |
3912 | Variable Number = new Variable(); | 3912 | Variable Number = new Variable(); |
3913 | Variable Tokens = new Variable(); | 3913 | Variable Tokens = new Variable(); |
3914 | Variable C2 = new Variable(); | 3914 | Variable C2 = new Variable(); |
3915 | Variable N = new Variable(); | 3915 | Variable N = new Variable(); |
3916 | Variable C = new Variable(); | 3916 | Variable C = new Variable(); |
3917 | Variable C3 = new Variable(); | 3917 | Variable C3 = new Variable(); |
3918 | Variable Digits = new Variable(); | 3918 | Variable Digits = new Variable(); |
3919 | foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor1(@"number", Number), Tokens))) | 3919 | foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor1(@"number", Number), Tokens))) |
3920 | { | 3920 | { |
3921 | foreach (bool l3 in read_number4(C1, C2, 0, N)) | 3921 | foreach (bool l3 in read_number4(C1, C2, 0, N)) |
3922 | { | 3922 | { |
3923 | if (YP.equal(C2, 39)) | 3923 | if (YP.equal(C2, 39)) |
3924 | { | 3924 | { |
3925 | if (YP.greaterThanOrEqual(N, 2)) | 3925 | if (YP.greaterThanOrEqual(N, 2)) |
3926 | { | 3926 | { |
3927 | if (YP.lessThanOrEqual(N, 36)) | 3927 | if (YP.lessThanOrEqual(N, 36)) |
3928 | { | 3928 | { |
3929 | foreach (bool l7 in read_based(N, 0, Number, C)) | 3929 | foreach (bool l7 in read_based(N, 0, Number, C)) |
3930 | { | 3930 | { |
3931 | foreach (bool l8 in read_tokens(C, Dict, Tokens)) | 3931 | foreach (bool l8 in read_tokens(C, Dict, Tokens)) |
3932 | { | 3932 | { |
3933 | yield return false; | 3933 | yield return false; |
3934 | } | 3934 | } |
3935 | } | 3935 | } |
3936 | goto cutIf2; | 3936 | goto cutIf2; |
3937 | } | 3937 | } |
3938 | } | 3938 | } |
3939 | if (YP.equal(N, 0)) | 3939 | if (YP.equal(N, 0)) |
3940 | { | 3940 | { |
3941 | foreach (bool l6 in YP.get_code(C3)) | 3941 | foreach (bool l6 in YP.get_code(C3)) |
3942 | { | 3942 | { |
3943 | foreach (bool l7 in read_char(C3, -1, Number, C)) | 3943 | foreach (bool l7 in read_char(C3, -1, Number, C)) |
3944 | { | 3944 | { |
3945 | foreach (bool l8 in read_tokens(C, Dict, Tokens)) | 3945 | foreach (bool l8 in read_tokens(C, Dict, Tokens)) |
3946 | { | 3946 | { |
3947 | yield return false; | 3947 | yield return false; |
3948 | } | 3948 | } |
3949 | } | 3949 | } |
3950 | } | 3950 | } |
3951 | goto cutIf3; | 3951 | goto cutIf3; |
3952 | } | 3952 | } |
3953 | foreach (bool l5 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** ~d' read as ~d '~n"), new ListPair(N, new ListPair(N, Atom.NIL)))) | 3953 | foreach (bool l5 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** ~d' read as ~d '~n"), new ListPair(N, new ListPair(N, Atom.NIL)))) |
3954 | { | 3954 | { |
3955 | foreach (bool l6 in YP.unify(Number, N)) | 3955 | foreach (bool l6 in YP.unify(Number, N)) |
3956 | { | 3956 | { |
3957 | foreach (bool l7 in YP.unify(C, C2)) | 3957 | foreach (bool l7 in YP.unify(C, C2)) |
3958 | { | 3958 | { |
3959 | foreach (bool l8 in read_tokens(C, Dict, Tokens)) | 3959 | foreach (bool l8 in read_tokens(C, Dict, Tokens)) |
3960 | { | 3960 | { |
3961 | yield return false; | 3961 | yield return false; |
3962 | } | 3962 | } |
3963 | } | 3963 | } |
3964 | } | 3964 | } |
3965 | } | 3965 | } |
3966 | cutIf3: | 3966 | cutIf3: |
3967 | cutIf2: | 3967 | cutIf2: |
3968 | goto cutIf1; | 3968 | goto cutIf1; |
3969 | } | 3969 | } |
3970 | if (YP.equal(C2, 46)) | 3970 | if (YP.equal(C2, 46)) |
3971 | { | 3971 | { |
3972 | foreach (bool l5 in YP.get_code(C3)) | 3972 | foreach (bool l5 in YP.get_code(C3)) |
3973 | { | 3973 | { |
3974 | if (YP.greaterThanOrEqual(C3, new ListPair(48, Atom.NIL))) | 3974 | if (YP.greaterThanOrEqual(C3, new ListPair(48, Atom.NIL))) |
3975 | { | 3975 | { |
3976 | if (YP.lessThanOrEqual(C3, new ListPair(57, Atom.NIL))) | 3976 | if (YP.lessThanOrEqual(C3, new ListPair(57, Atom.NIL))) |
3977 | { | 3977 | { |
3978 | foreach (bool l8 in YP.number_codes(N, Digits)) | 3978 | foreach (bool l8 in YP.number_codes(N, Digits)) |
3979 | { | 3979 | { |
3980 | foreach (bool l9 in read_float(Number, Dict, Tokens, Digits, C3)) | 3980 | foreach (bool l9 in read_float(Number, Dict, Tokens, Digits, C3)) |
3981 | { | 3981 | { |
3982 | yield return false; | 3982 | yield return false; |
3983 | } | 3983 | } |
3984 | } | 3984 | } |
3985 | goto cutIf5; | 3985 | goto cutIf5; |
3986 | } | 3986 | } |
3987 | } | 3987 | } |
3988 | foreach (bool l6 in YP.unify(Number, N)) | 3988 | foreach (bool l6 in YP.unify(Number, N)) |
3989 | { | 3989 | { |
3990 | foreach (bool l7 in read_fullstop(C3, Dict, Tokens)) | 3990 | foreach (bool l7 in read_fullstop(C3, Dict, Tokens)) |
3991 | { | 3991 | { |
3992 | yield return false; | 3992 | yield return false; |
3993 | } | 3993 | } |
3994 | } | 3994 | } |
3995 | cutIf5: | 3995 | cutIf5: |
3996 | { } | 3996 | { } |
3997 | } | 3997 | } |
3998 | goto cutIf4; | 3998 | goto cutIf4; |
3999 | } | 3999 | } |
4000 | foreach (bool l4 in YP.unify(Number, N)) | 4000 | foreach (bool l4 in YP.unify(Number, N)) |
4001 | { | 4001 | { |
4002 | foreach (bool l5 in read_tokens(C2, Dict, Tokens)) | 4002 | foreach (bool l5 in read_tokens(C2, Dict, Tokens)) |
4003 | { | 4003 | { |
4004 | yield return false; | 4004 | yield return false; |
4005 | } | 4005 | } |
4006 | } | 4006 | } |
4007 | cutIf4: | 4007 | cutIf4: |
4008 | cutIf1: | 4008 | cutIf1: |
4009 | { } | 4009 | { } |
4010 | } | 4010 | } |
4011 | } | 4011 | } |
4012 | } | 4012 | } |
4013 | } | 4013 | } |
4014 | 4014 | ||
4015 | public static IEnumerable<bool> read_number4(object C0, object C, object N0, object N) | 4015 | public static IEnumerable<bool> read_number4(object C0, object C, object N0, object N) |
4016 | { | 4016 | { |
4017 | { | 4017 | { |
4018 | Variable N1 = new Variable(); | 4018 | Variable N1 = new Variable(); |
4019 | Variable C1 = new Variable(); | 4019 | Variable C1 = new Variable(); |
4020 | if (YP.greaterThanOrEqual(C0, new ListPair(48, Atom.NIL))) | 4020 | if (YP.greaterThanOrEqual(C0, new ListPair(48, Atom.NIL))) |
4021 | { | 4021 | { |
4022 | if (YP.lessThanOrEqual(C0, new ListPair(57, Atom.NIL))) | 4022 | if (YP.lessThanOrEqual(C0, new ListPair(57, Atom.NIL))) |
4023 | { | 4023 | { |
4024 | foreach (bool l4 in YP.unify(N1, YP.add(YP.subtract(YP.multiply(N0, 10), new ListPair(48, Atom.NIL)), C0))) | 4024 | foreach (bool l4 in YP.unify(N1, YP.add(YP.subtract(YP.multiply(N0, 10), new ListPair(48, Atom.NIL)), C0))) |
4025 | { | 4025 | { |
4026 | foreach (bool l5 in YP.get_code(C1)) | 4026 | foreach (bool l5 in YP.get_code(C1)) |
4027 | { | 4027 | { |
4028 | foreach (bool l6 in read_number4(C1, C, N1, N)) | 4028 | foreach (bool l6 in read_number4(C1, C, N1, N)) |
4029 | { | 4029 | { |
4030 | yield return false; | 4030 | yield return false; |
4031 | } | 4031 | } |
4032 | } | 4032 | } |
4033 | } | 4033 | } |
4034 | goto cutIf1; | 4034 | goto cutIf1; |
4035 | } | 4035 | } |
4036 | } | 4036 | } |
4037 | if (YP.equal(C0, 95)) | 4037 | if (YP.equal(C0, 95)) |
4038 | { | 4038 | { |
4039 | foreach (bool l3 in YP.get_code(C1)) | 4039 | foreach (bool l3 in YP.get_code(C1)) |
4040 | { | 4040 | { |
4041 | foreach (bool l4 in read_number4(C1, C, N0, N)) | 4041 | foreach (bool l4 in read_number4(C1, C, N0, N)) |
4042 | { | 4042 | { |
4043 | yield return false; | 4043 | yield return false; |
4044 | } | 4044 | } |
4045 | } | 4045 | } |
4046 | goto cutIf2; | 4046 | goto cutIf2; |
4047 | } | 4047 | } |
4048 | foreach (bool l2 in YP.unify(C, C0)) | 4048 | foreach (bool l2 in YP.unify(C, C0)) |
4049 | { | 4049 | { |
4050 | foreach (bool l3 in YP.unify(N, N0)) | 4050 | foreach (bool l3 in YP.unify(N, N0)) |
4051 | { | 4051 | { |
4052 | yield return false; | 4052 | yield return false; |
4053 | } | 4053 | } |
4054 | } | 4054 | } |
4055 | cutIf2: | 4055 | cutIf2: |
4056 | cutIf1: | 4056 | cutIf1: |
4057 | { } | 4057 | { } |
4058 | } | 4058 | } |
4059 | } | 4059 | } |
4060 | 4060 | ||
4061 | public static IEnumerable<bool> read_based(object Base, object N0, object N, object C) | 4061 | public static IEnumerable<bool> read_based(object Base, object N0, object N, object C) |
4062 | { | 4062 | { |
4063 | { | 4063 | { |
4064 | Variable C1 = new Variable(); | 4064 | Variable C1 = new Variable(); |
4065 | Variable Digit = new Variable(); | 4065 | Variable Digit = new Variable(); |
4066 | Variable N1 = new Variable(); | 4066 | Variable N1 = new Variable(); |
4067 | foreach (bool l2 in YP.get_code(C1)) | 4067 | foreach (bool l2 in YP.get_code(C1)) |
4068 | { | 4068 | { |
4069 | if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL))) | 4069 | if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL))) |
4070 | { | 4070 | { |
4071 | if (YP.lessThanOrEqual(C1, new ListPair(57, Atom.NIL))) | 4071 | if (YP.lessThanOrEqual(C1, new ListPair(57, Atom.NIL))) |
4072 | { | 4072 | { |
4073 | foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, new ListPair(48, Atom.NIL)))) | 4073 | foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, new ListPair(48, Atom.NIL)))) |
4074 | { | 4074 | { |
4075 | if (YP.lessThan(Digit, Base)) | 4075 | if (YP.lessThan(Digit, Base)) |
4076 | { | 4076 | { |
4077 | foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) | 4077 | foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) |
4078 | { | 4078 | { |
4079 | foreach (bool l8 in read_based(Base, N1, N, C)) | 4079 | foreach (bool l8 in read_based(Base, N1, N, C)) |
4080 | { | 4080 | { |
4081 | yield return false; | 4081 | yield return false; |
4082 | } | 4082 | } |
4083 | } | 4083 | } |
4084 | goto cutIf2; | 4084 | goto cutIf2; |
4085 | } | 4085 | } |
4086 | if (YP.equal(C1, new ListPair(95, Atom.NIL))) | 4086 | if (YP.equal(C1, new ListPair(95, Atom.NIL))) |
4087 | { | 4087 | { |
4088 | foreach (bool l7 in read_based(Base, N0, N, C)) | 4088 | foreach (bool l7 in read_based(Base, N0, N, C)) |
4089 | { | 4089 | { |
4090 | yield return false; | 4090 | yield return false; |
4091 | } | 4091 | } |
4092 | goto cutIf3; | 4092 | goto cutIf3; |
4093 | } | 4093 | } |
4094 | foreach (bool l6 in YP.unify(N, N0)) | 4094 | foreach (bool l6 in YP.unify(N, N0)) |
4095 | { | 4095 | { |
4096 | foreach (bool l7 in YP.unify(C, C1)) | 4096 | foreach (bool l7 in YP.unify(C, C1)) |
4097 | { | 4097 | { |
4098 | yield return false; | 4098 | yield return false; |
4099 | } | 4099 | } |
4100 | } | 4100 | } |
4101 | cutIf3: | 4101 | cutIf3: |
4102 | cutIf2: | 4102 | cutIf2: |
4103 | { } | 4103 | { } |
4104 | } | 4104 | } |
4105 | goto cutIf1; | 4105 | goto cutIf1; |
4106 | } | 4106 | } |
4107 | } | 4107 | } |
4108 | if (YP.greaterThanOrEqual(C1, new ListPair(65, Atom.NIL))) | 4108 | if (YP.greaterThanOrEqual(C1, new ListPair(65, Atom.NIL))) |
4109 | { | 4109 | { |
4110 | if (YP.lessThanOrEqual(C1, new ListPair(90, Atom.NIL))) | 4110 | if (YP.lessThanOrEqual(C1, new ListPair(90, Atom.NIL))) |
4111 | { | 4111 | { |
4112 | foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, YP.subtract(new ListPair(65, Atom.NIL), 10)))) | 4112 | foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, YP.subtract(new ListPair(65, Atom.NIL), 10)))) |
4113 | { | 4113 | { |
4114 | if (YP.lessThan(Digit, Base)) | 4114 | if (YP.lessThan(Digit, Base)) |
4115 | { | 4115 | { |
4116 | foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) | 4116 | foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) |
4117 | { | 4117 | { |
4118 | foreach (bool l8 in read_based(Base, N1, N, C)) | 4118 | foreach (bool l8 in read_based(Base, N1, N, C)) |
4119 | { | 4119 | { |
4120 | yield return false; | 4120 | yield return false; |
4121 | } | 4121 | } |
4122 | } | 4122 | } |
4123 | goto cutIf5; | 4123 | goto cutIf5; |
4124 | } | 4124 | } |
4125 | if (YP.equal(C1, new ListPair(95, Atom.NIL))) | 4125 | if (YP.equal(C1, new ListPair(95, Atom.NIL))) |
4126 | { | 4126 | { |
4127 | foreach (bool l7 in read_based(Base, N0, N, C)) | 4127 | foreach (bool l7 in read_based(Base, N0, N, C)) |
4128 | { | 4128 | { |
4129 | yield return false; | 4129 | yield return false; |
4130 | } | 4130 | } |
4131 | goto cutIf6; | 4131 | goto cutIf6; |
4132 | } | 4132 | } |
4133 | foreach (bool l6 in YP.unify(N, N0)) | 4133 | foreach (bool l6 in YP.unify(N, N0)) |
4134 | { | 4134 | { |
4135 | foreach (bool l7 in YP.unify(C, C1)) | 4135 | foreach (bool l7 in YP.unify(C, C1)) |
4136 | { | 4136 | { |
4137 | yield return false; | 4137 | yield return false; |
4138 | } | 4138 | } |
4139 | } | 4139 | } |
4140 | cutIf6: | 4140 | cutIf6: |
4141 | cutIf5: | 4141 | cutIf5: |
4142 | { } | 4142 | { } |
4143 | } | 4143 | } |
4144 | goto cutIf4; | 4144 | goto cutIf4; |
4145 | } | 4145 | } |
4146 | } | 4146 | } |
4147 | if (YP.greaterThanOrEqual(C1, new ListPair(97, Atom.NIL))) | 4147 | if (YP.greaterThanOrEqual(C1, new ListPair(97, Atom.NIL))) |
4148 | { | 4148 | { |
4149 | if (YP.lessThanOrEqual(C1, new ListPair(122, Atom.NIL))) | 4149 | if (YP.lessThanOrEqual(C1, new ListPair(122, Atom.NIL))) |
4150 | { | 4150 | { |
4151 | foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, YP.subtract(new ListPair(97, Atom.NIL), 10)))) | 4151 | foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, YP.subtract(new ListPair(97, Atom.NIL), 10)))) |
4152 | { | 4152 | { |
4153 | if (YP.lessThan(Digit, Base)) | 4153 | if (YP.lessThan(Digit, Base)) |
4154 | { | 4154 | { |
4155 | foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) | 4155 | foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) |
4156 | { | 4156 | { |
4157 | foreach (bool l8 in read_based(Base, N1, N, C)) | 4157 | foreach (bool l8 in read_based(Base, N1, N, C)) |
4158 | { | 4158 | { |
4159 | yield return false; | 4159 | yield return false; |
4160 | } | 4160 | } |
4161 | } | 4161 | } |
4162 | goto cutIf8; | 4162 | goto cutIf8; |
4163 | } | 4163 | } |
4164 | if (YP.equal(C1, new ListPair(95, Atom.NIL))) | 4164 | if (YP.equal(C1, new ListPair(95, Atom.NIL))) |
4165 | { | 4165 | { |
4166 | foreach (bool l7 in read_based(Base, N0, N, C)) | 4166 | foreach (bool l7 in read_based(Base, N0, N, C)) |
4167 | { | 4167 | { |
4168 | yield return false; | 4168 | yield return false; |
4169 | } | 4169 | } |
4170 | goto cutIf9; | 4170 | goto cutIf9; |
4171 | } | 4171 | } |
4172 | foreach (bool l6 in YP.unify(N, N0)) | 4172 | foreach (bool l6 in YP.unify(N, N0)) |
4173 | { | 4173 | { |
4174 | foreach (bool l7 in YP.unify(C, C1)) | 4174 | foreach (bool l7 in YP.unify(C, C1)) |
4175 | { | 4175 | { |
4176 | yield return false; | 4176 | yield return false; |
4177 | } | 4177 | } |
4178 | } | 4178 | } |
4179 | cutIf9: | 4179 | cutIf9: |
4180 | cutIf8: | 4180 | cutIf8: |
4181 | { } | 4181 | { } |
4182 | } | 4182 | } |
4183 | goto cutIf7; | 4183 | goto cutIf7; |
4184 | } | 4184 | } |
4185 | } | 4185 | } |
4186 | foreach (bool l3 in YP.unify(Digit, 99)) | 4186 | foreach (bool l3 in YP.unify(Digit, 99)) |
4187 | { | 4187 | { |
4188 | if (YP.lessThan(Digit, Base)) | 4188 | if (YP.lessThan(Digit, Base)) |
4189 | { | 4189 | { |
4190 | foreach (bool l5 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) | 4190 | foreach (bool l5 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) |
4191 | { | 4191 | { |
4192 | foreach (bool l6 in read_based(Base, N1, N, C)) | 4192 | foreach (bool l6 in read_based(Base, N1, N, C)) |
4193 | { | 4193 | { |
4194 | yield return false; | 4194 | yield return false; |
4195 | } | 4195 | } |
4196 | } | 4196 | } |
4197 | goto cutIf10; | 4197 | goto cutIf10; |
4198 | } | 4198 | } |
4199 | if (YP.equal(C1, new ListPair(95, Atom.NIL))) | 4199 | if (YP.equal(C1, new ListPair(95, Atom.NIL))) |
4200 | { | 4200 | { |
4201 | foreach (bool l5 in read_based(Base, N0, N, C)) | 4201 | foreach (bool l5 in read_based(Base, N0, N, C)) |
4202 | { | 4202 | { |
4203 | yield return false; | 4203 | yield return false; |
4204 | } | 4204 | } |
4205 | goto cutIf11; | 4205 | goto cutIf11; |
4206 | } | 4206 | } |
4207 | foreach (bool l4 in YP.unify(N, N0)) | 4207 | foreach (bool l4 in YP.unify(N, N0)) |
4208 | { | 4208 | { |
4209 | foreach (bool l5 in YP.unify(C, C1)) | 4209 | foreach (bool l5 in YP.unify(C, C1)) |
4210 | { | 4210 | { |
4211 | yield return false; | 4211 | yield return false; |
4212 | } | 4212 | } |
4213 | } | 4213 | } |
4214 | cutIf11: | 4214 | cutIf11: |
4215 | cutIf10: | 4215 | cutIf10: |
4216 | { } | 4216 | { } |
4217 | } | 4217 | } |
4218 | cutIf7: | 4218 | cutIf7: |
4219 | cutIf4: | 4219 | cutIf4: |
4220 | cutIf1: | 4220 | cutIf1: |
4221 | { } | 4221 | { } |
4222 | } | 4222 | } |
4223 | } | 4223 | } |
4224 | } | 4224 | } |
4225 | 4225 | ||
4226 | public static IEnumerable<bool> read_char(object Char, object Quote, object Result, object Next) | 4226 | public static IEnumerable<bool> read_char(object Char, object Quote, object Result, object Next) |
4227 | { | 4227 | { |
4228 | { | 4228 | { |
4229 | Variable C1 = new Variable(); | 4229 | Variable C1 = new Variable(); |
4230 | Variable C2 = new Variable(); | 4230 | Variable C2 = new Variable(); |
4231 | Variable C3 = new Variable(); | 4231 | Variable C3 = new Variable(); |
4232 | Variable Ch = new Variable(); | 4232 | Variable Ch = new Variable(); |
4233 | if (YP.equal(Char, 92)) | 4233 | if (YP.equal(Char, 92)) |
4234 | { | 4234 | { |
4235 | foreach (bool l3 in YP.get_code(C1)) | 4235 | foreach (bool l3 in YP.get_code(C1)) |
4236 | { | 4236 | { |
4237 | if (YP.lessThan(C1, 0)) | 4237 | if (YP.lessThan(C1, 0)) |
4238 | { | 4238 | { |
4239 | foreach (bool l5 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** end of file in ~cquoted~c~n"), new ListPair(Quote, new ListPair(Quote, Atom.NIL)))) | 4239 | foreach (bool l5 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** end of file in ~cquoted~c~n"), new ListPair(Quote, new ListPair(Quote, Atom.NIL)))) |
4240 | { | 4240 | { |
4241 | foreach (bool l6 in YP.unify(Result, -1)) | 4241 | foreach (bool l6 in YP.unify(Result, -1)) |
4242 | { | 4242 | { |
4243 | foreach (bool l7 in YP.unify(Next, C1)) | 4243 | foreach (bool l7 in YP.unify(Next, C1)) |
4244 | { | 4244 | { |
4245 | yield return false; | 4245 | yield return false; |
4246 | } | 4246 | } |
4247 | } | 4247 | } |
4248 | } | 4248 | } |
4249 | goto cutIf2; | 4249 | goto cutIf2; |
4250 | } | 4250 | } |
4251 | if (YP.lessThanOrEqual(C1, new ListPair(32, Atom.NIL))) | 4251 | if (YP.lessThanOrEqual(C1, new ListPair(32, Atom.NIL))) |
4252 | { | 4252 | { |
4253 | foreach (bool l5 in YP.get_code(C2)) | 4253 | foreach (bool l5 in YP.get_code(C2)) |
4254 | { | 4254 | { |
4255 | foreach (bool l6 in read_char(C2, Quote, Result, Next)) | 4255 | foreach (bool l6 in read_char(C2, Quote, Result, Next)) |
4256 | { | 4256 | { |
4257 | yield return false; | 4257 | yield return false; |
4258 | } | 4258 | } |
4259 | } | 4259 | } |
4260 | goto cutIf3; | 4260 | goto cutIf3; |
4261 | } | 4261 | } |
4262 | if (YP.equal(YP.bitwiseOr(C1, 32), new ListPair(99, Atom.NIL))) | 4262 | if (YP.equal(YP.bitwiseOr(C1, 32), new ListPair(99, Atom.NIL))) |
4263 | { | 4263 | { |
4264 | foreach (bool l5 in YP.get_code(C2)) | 4264 | foreach (bool l5 in YP.get_code(C2)) |
4265 | { | 4265 | { |
4266 | foreach (bool l6 in read_char(C2, Quote, Result, Next)) | 4266 | foreach (bool l6 in read_char(C2, Quote, Result, Next)) |
4267 | { | 4267 | { |
4268 | yield return false; | 4268 | yield return false; |
4269 | } | 4269 | } |
4270 | } | 4270 | } |
4271 | goto cutIf4; | 4271 | goto cutIf4; |
4272 | } | 4272 | } |
4273 | if (YP.lessThanOrEqual(C1, new ListPair(55, Atom.NIL))) | 4273 | if (YP.lessThanOrEqual(C1, new ListPair(55, Atom.NIL))) |
4274 | { | 4274 | { |
4275 | if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL))) | 4275 | if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL))) |
4276 | { | 4276 | { |
4277 | foreach (bool l6 in YP.get_code(C2)) | 4277 | foreach (bool l6 in YP.get_code(C2)) |
4278 | { | 4278 | { |
4279 | if (YP.lessThanOrEqual(C2, new ListPair(55, Atom.NIL))) | 4279 | if (YP.lessThanOrEqual(C2, new ListPair(55, Atom.NIL))) |
4280 | { | 4280 | { |
4281 | if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) | 4281 | if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) |
4282 | { | 4282 | { |
4283 | foreach (bool l9 in YP.get_code(C3)) | 4283 | foreach (bool l9 in YP.get_code(C3)) |
4284 | { | 4284 | { |
4285 | if (YP.lessThanOrEqual(C3, new ListPair(55, Atom.NIL))) | 4285 | if (YP.lessThanOrEqual(C3, new ListPair(55, Atom.NIL))) |
4286 | { | 4286 | { |
4287 | if (YP.greaterThanOrEqual(C3, new ListPair(48, Atom.NIL))) | 4287 | if (YP.greaterThanOrEqual(C3, new ListPair(48, Atom.NIL))) |
4288 | { | 4288 | { |
4289 | foreach (bool l12 in YP.get_code(Next)) | 4289 | foreach (bool l12 in YP.get_code(Next)) |
4290 | { | 4290 | { |
4291 | foreach (bool l13 in YP.unify(Result, YP.subtract(YP.add(YP.multiply(YP.add(YP.multiply(C1, 8), C2), 8), C3), YP.multiply(73, new ListPair(48, Atom.NIL))))) | 4291 | foreach (bool l13 in YP.unify(Result, YP.subtract(YP.add(YP.multiply(YP.add(YP.multiply(C1, 8), C2), 8), C3), YP.multiply(73, new ListPair(48, Atom.NIL))))) |
4292 | { | 4292 | { |
4293 | yield return false; | 4293 | yield return false; |
4294 | } | 4294 | } |
4295 | } | 4295 | } |
4296 | goto cutIf7; | 4296 | goto cutIf7; |
4297 | } | 4297 | } |
4298 | } | 4298 | } |
4299 | foreach (bool l10 in YP.unify(Next, C3)) | 4299 | foreach (bool l10 in YP.unify(Next, C3)) |
4300 | { | 4300 | { |
4301 | foreach (bool l11 in YP.unify(Result, YP.subtract(YP.add(YP.multiply(C1, 8), C2), YP.multiply(9, new ListPair(48, Atom.NIL))))) | 4301 | foreach (bool l11 in YP.unify(Result, YP.subtract(YP.add(YP.multiply(C1, 8), C2), YP.multiply(9, new ListPair(48, Atom.NIL))))) |
4302 | { | 4302 | { |
4303 | yield return false; | 4303 | yield return false; |
4304 | } | 4304 | } |
4305 | } | 4305 | } |
4306 | cutIf7: | 4306 | cutIf7: |
4307 | { } | 4307 | { } |
4308 | } | 4308 | } |
4309 | goto cutIf6; | 4309 | goto cutIf6; |
4310 | } | 4310 | } |
4311 | } | 4311 | } |
4312 | foreach (bool l7 in YP.unify(Next, C2)) | 4312 | foreach (bool l7 in YP.unify(Next, C2)) |
4313 | { | 4313 | { |
4314 | foreach (bool l8 in YP.unify(Result, YP.subtract(C1, new ListPair(48, Atom.NIL)))) | 4314 | foreach (bool l8 in YP.unify(Result, YP.subtract(C1, new ListPair(48, Atom.NIL)))) |
4315 | { | 4315 | { |
4316 | yield return false; | 4316 | yield return false; |
4317 | } | 4317 | } |
4318 | } | 4318 | } |
4319 | cutIf6: | 4319 | cutIf6: |
4320 | { } | 4320 | { } |
4321 | } | 4321 | } |
4322 | goto cutIf5; | 4322 | goto cutIf5; |
4323 | } | 4323 | } |
4324 | } | 4324 | } |
4325 | if (YP.equal(C1, new ListPair(94, Atom.NIL))) | 4325 | if (YP.equal(C1, new ListPair(94, Atom.NIL))) |
4326 | { | 4326 | { |
4327 | foreach (bool l5 in YP.get_code(C2)) | 4327 | foreach (bool l5 in YP.get_code(C2)) |
4328 | { | 4328 | { |
4329 | if (YP.lessThan(C2, 0)) | 4329 | if (YP.lessThan(C2, 0)) |
4330 | { | 4330 | { |
4331 | foreach (bool l7 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** end of file in ~c..~c^..~c~n"), new ListPair(Quote, new ListPair(92, new ListPair(Quote, Atom.NIL))))) | 4331 | foreach (bool l7 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** end of file in ~c..~c^..~c~n"), new ListPair(Quote, new ListPair(92, new ListPair(Quote, Atom.NIL))))) |
4332 | { | 4332 | { |
4333 | foreach (bool l8 in YP.unify(Result, -1)) | 4333 | foreach (bool l8 in YP.unify(Result, -1)) |
4334 | { | 4334 | { |
4335 | foreach (bool l9 in YP.unify(Next, C2)) | 4335 | foreach (bool l9 in YP.unify(Next, C2)) |
4336 | { | 4336 | { |
4337 | yield return false; | 4337 | yield return false; |
4338 | } | 4338 | } |
4339 | } | 4339 | } |
4340 | } | 4340 | } |
4341 | goto cutIf9; | 4341 | goto cutIf9; |
4342 | } | 4342 | } |
4343 | if (YP.equal(C2, new ListPair(63, Atom.NIL))) | 4343 | if (YP.equal(C2, new ListPair(63, Atom.NIL))) |
4344 | { | 4344 | { |
4345 | foreach (bool l7 in YP.unify(Result, 127)) | 4345 | foreach (bool l7 in YP.unify(Result, 127)) |
4346 | { | 4346 | { |
4347 | foreach (bool l8 in YP.get_code(Next)) | 4347 | foreach (bool l8 in YP.get_code(Next)) |
4348 | { | 4348 | { |
4349 | yield return false; | 4349 | yield return false; |
4350 | } | 4350 | } |
4351 | } | 4351 | } |
4352 | goto cutIf10; | 4352 | goto cutIf10; |
4353 | } | 4353 | } |
4354 | foreach (bool l6 in YP.unify(Result, YP.bitwiseAnd(C2, 31))) | 4354 | foreach (bool l6 in YP.unify(Result, YP.bitwiseAnd(C2, 31))) |
4355 | { | 4355 | { |
4356 | foreach (bool l7 in YP.get_code(Next)) | 4356 | foreach (bool l7 in YP.get_code(Next)) |
4357 | { | 4357 | { |
4358 | yield return false; | 4358 | yield return false; |
4359 | } | 4359 | } |
4360 | } | 4360 | } |
4361 | cutIf10: | 4361 | cutIf10: |
4362 | cutIf9: | 4362 | cutIf9: |
4363 | { } | 4363 | { } |
4364 | } | 4364 | } |
4365 | goto cutIf8; | 4365 | goto cutIf8; |
4366 | } | 4366 | } |
4367 | foreach (bool l4 in escape_char(C1, Result)) | 4367 | foreach (bool l4 in escape_char(C1, Result)) |
4368 | { | 4368 | { |
4369 | foreach (bool l5 in YP.get_code(Next)) | 4369 | foreach (bool l5 in YP.get_code(Next)) |
4370 | { | 4370 | { |
4371 | yield return false; | 4371 | yield return false; |
4372 | } | 4372 | } |
4373 | goto cutIf11; | 4373 | goto cutIf11; |
4374 | } | 4374 | } |
4375 | foreach (bool l4 in YP.unify(Result, C1)) | 4375 | foreach (bool l4 in YP.unify(Result, C1)) |
4376 | { | 4376 | { |
4377 | foreach (bool l5 in YP.get_code(Next)) | 4377 | foreach (bool l5 in YP.get_code(Next)) |
4378 | { | 4378 | { |
4379 | yield return false; | 4379 | yield return false; |
4380 | } | 4380 | } |
4381 | } | 4381 | } |
4382 | cutIf11: | 4382 | cutIf11: |
4383 | cutIf8: | 4383 | cutIf8: |
4384 | cutIf5: | 4384 | cutIf5: |
4385 | cutIf4: | 4385 | cutIf4: |
4386 | cutIf3: | 4386 | cutIf3: |
4387 | cutIf2: | 4387 | cutIf2: |
4388 | { } | 4388 | { } |
4389 | } | 4389 | } |
4390 | goto cutIf1; | 4390 | goto cutIf1; |
4391 | } | 4391 | } |
4392 | if (YP.equal(Char, Quote)) | 4392 | if (YP.equal(Char, Quote)) |
4393 | { | 4393 | { |
4394 | foreach (bool l3 in YP.get_code(Ch)) | 4394 | foreach (bool l3 in YP.get_code(Ch)) |
4395 | { | 4395 | { |
4396 | if (YP.equal(Ch, Quote)) | 4396 | if (YP.equal(Ch, Quote)) |
4397 | { | 4397 | { |
4398 | foreach (bool l5 in YP.unify(Result, Quote)) | 4398 | foreach (bool l5 in YP.unify(Result, Quote)) |
4399 | { | 4399 | { |
4400 | foreach (bool l6 in YP.get_code(Next)) | 4400 | foreach (bool l6 in YP.get_code(Next)) |
4401 | { | 4401 | { |
4402 | yield return false; | 4402 | yield return false; |
4403 | } | 4403 | } |
4404 | } | 4404 | } |
4405 | goto cutIf13; | 4405 | goto cutIf13; |
4406 | } | 4406 | } |
4407 | foreach (bool l4 in YP.unify(Result, -1)) | 4407 | foreach (bool l4 in YP.unify(Result, -1)) |
4408 | { | 4408 | { |
4409 | foreach (bool l5 in YP.unify(Next, Ch)) | 4409 | foreach (bool l5 in YP.unify(Next, Ch)) |
4410 | { | 4410 | { |
4411 | yield return false; | 4411 | yield return false; |
4412 | } | 4412 | } |
4413 | } | 4413 | } |
4414 | cutIf13: | 4414 | cutIf13: |
4415 | { } | 4415 | { } |
4416 | } | 4416 | } |
4417 | goto cutIf12; | 4417 | goto cutIf12; |
4418 | } | 4418 | } |
4419 | if (YP.lessThan(Char, new ListPair(32, Atom.NIL))) | 4419 | if (YP.lessThan(Char, new ListPair(32, Atom.NIL))) |
4420 | { | 4420 | { |
4421 | if (YP.notEqual(Char, 9)) | 4421 | if (YP.notEqual(Char, 9)) |
4422 | { | 4422 | { |
4423 | if (YP.notEqual(Char, 10)) | 4423 | if (YP.notEqual(Char, 10)) |
4424 | { | 4424 | { |
4425 | if (YP.notEqual(Char, 13)) | 4425 | if (YP.notEqual(Char, 13)) |
4426 | { | 4426 | { |
4427 | foreach (bool l6 in YP.unify(Result, -1)) | 4427 | foreach (bool l6 in YP.unify(Result, -1)) |
4428 | { | 4428 | { |
4429 | foreach (bool l7 in YP.unify(Next, Char)) | 4429 | foreach (bool l7 in YP.unify(Next, Char)) |
4430 | { | 4430 | { |
4431 | foreach (bool l8 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** Strange character ~d ends ~ctoken~c~n"), new ListPair(Char, new ListPair(Quote, new ListPair(Quote, Atom.NIL))))) | 4431 | foreach (bool l8 in formatError(Atom.a(@"user_error"), Atom.a(@"~N** Strange character ~d ends ~ctoken~c~n"), new ListPair(Char, new ListPair(Quote, new ListPair(Quote, Atom.NIL))))) |
4432 | { | 4432 | { |
4433 | yield return false; | 4433 | yield return false; |
4434 | } | 4434 | } |
4435 | } | 4435 | } |
4436 | } | 4436 | } |
4437 | goto cutIf14; | 4437 | goto cutIf14; |
4438 | } | 4438 | } |
4439 | } | 4439 | } |
4440 | } | 4440 | } |
4441 | } | 4441 | } |
4442 | foreach (bool l2 in YP.unify(Result, Char)) | 4442 | foreach (bool l2 in YP.unify(Result, Char)) |
4443 | { | 4443 | { |
4444 | foreach (bool l3 in YP.get_code(Next)) | 4444 | foreach (bool l3 in YP.get_code(Next)) |
4445 | { | 4445 | { |
4446 | yield return false; | 4446 | yield return false; |
4447 | } | 4447 | } |
4448 | } | 4448 | } |
4449 | cutIf14: | 4449 | cutIf14: |
4450 | cutIf12: | 4450 | cutIf12: |
4451 | cutIf1: | 4451 | cutIf1: |
4452 | { } | 4452 | { } |
4453 | } | 4453 | } |
4454 | } | 4454 | } |
4455 | 4455 | ||
4456 | } | 4456 | } |
4457 | } | 4457 | } |