Mercurial > ~dholland > hg > ag > index.cgi
comparison tests/agcl/parsifal/pex2.syn @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 [ | |
2 case sensitive = off | |
3 disregard white space | |
4 lexeme {while body text} | |
5 ] | |
6 | |
7 space = ' ' + '\t' | |
8 eof = 0 | |
9 | |
10 white space | |
11 -> space | |
12 -> comment | |
13 | |
14 while loop $ | |
15 -> while head, while body text, false while condition | |
16 -> while head, while body text, while iteration..., false while condition | |
17 | |
18 while head | |
19 -> "!while" =save_loop_head << PCB.pointer; | |
20 | |
21 while body text // skips to find end of loop | |
22 -> [~eof - space, ~eof?...], while body terminator ={save_loop_tail << PCB.pointer; | |
23 save_loop_top >> PCB.pointer; // Restore top of loop | |
24 save_loop_top << PCB.pointer; // Save top of loop | |
25 } | |
26 while body terminator | |
27 -> "!endw" | "!endwhile" | |
28 | |
29 true while condition, false while condition | |
30 -> expression:x ={ | |
31 if (x.value.lval) return; | |
32 CHANGE_REDUCTION(false_while_condition); | |
33 save_loop_tail >> PCB.pointer; | |
34 save_loop_head >> junk; | |
35 } | |
36 | |
37 while iteration | |
38 -> true while condition, while body, while body terminator ={ | |
39 save_loop_top >> PCB.pointer; // Restore top of loop | |
40 save_loop_top << PCB.pointer; // Save top of loop | |
41 } | |
42 while body | |
43 -> [section | eol...]/..., while body terminator | |
44 |