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