77062f52cc3ceb4f9668ef042bd98ebc5bdc7925
[elisp/flim.git] / ew-parse.el
1 ; *** Header ***
2 (provide 'ew-parse)
3 (require 'ew-data)
4 (require 'lr-driver)
5
6 ; *** Token Definitions ***
7 (defconst ew:*eoi*-tok  0)
8 (defconst ew:anchor-tok 1)
9 (defconst ew:tag-mailbox-tok    2)
10 (defconst ew:tag-mailbox*-tok   3)
11 (defconst ew:tag-mailbox+-tok   4)
12 (defconst ew:tag-address*-tok   5)
13 (defconst ew:tag-address+-tok   6)
14 (defconst ew:tag-phrase*-tok    7)
15 (defconst ew:tag-phrase-msg-id*-tok     8)
16 (defconst ew:lt-tok     9)
17 (defconst ew:gt-tok     10)
18 (defconst ew:at-tok     11)
19 (defconst ew:comma-tok  12)
20 (defconst ew:semicolon-tok      13)
21 (defconst ew:colon-tok  14)
22 (defconst ew:dot-tok    15)
23 (defconst ew:atom-tok   16)
24 (defconst ew:slash-tok  17)
25 (defconst ew:question-tok       18)
26 (defconst ew:equal-tok  19)
27 (defconst ew:token-tok  20)
28 (defconst ew:us-texts-tok       21)
29 (defconst ew:us-wsp-tok 22)
30 (defconst ew:us-fold-tok        23)
31 (defconst ew:wsp-tok    24)
32 (defconst ew:fold-tok   25)
33 (defconst ew:qs-begin-tok       26)
34 (defconst ew:qs-end-tok 27)
35 (defconst ew:qs-texts-tok       28)
36 (defconst ew:qs-wsp-tok 29)
37 (defconst ew:qs-fold-tok        30)
38 (defconst ew:qs-qfold-tok       31)
39 (defconst ew:qs-qpair-tok       32)
40 (defconst ew:dl-begin-tok       33)
41 (defconst ew:dl-end-tok 34)
42 (defconst ew:dl-texts-tok       35)
43 (defconst ew:dl-wsp-tok 36)
44 (defconst ew:dl-fold-tok        37)
45 (defconst ew:dl-qfold-tok       38)
46 (defconst ew:dl-qpair-tok       39)
47 (defconst ew:cm-begin-tok       40)
48 (defconst ew:cm-end-tok 41)
49 (defconst ew:cm-nested-begin-tok        42)
50 (defconst ew:cm-nested-end-tok  43)
51 (defconst ew:cm-texts-tok       44)
52 (defconst ew:cm-wsp-tok 45)
53 (defconst ew:cm-fold-tok        46)
54 (defconst ew:cm-qfold-tok       47)
55 (defconst ew:cm-qpair-tok       48)
56 (defconst ew:err-tok    49)
57
58 (defconst ew:token-defs
59   (list 
60    (cons 0 "*eoi*")
61    (cons 1 "anchor")
62    (cons 2 "tag-mailbox")
63    (cons 3 "tag-mailbox*")
64    (cons 4 "tag-mailbox+")
65    (cons 5 "tag-address*")
66    (cons 6 "tag-address+")
67    (cons 7 "tag-phrase*")
68    (cons 8 "tag-phrase-msg-id*")
69    (cons 9 "lt")
70    (cons 10 "gt")
71    (cons 11 "at")
72    (cons 12 "comma")
73    (cons 13 "semicolon")
74    (cons 14 "colon")
75    (cons 15 "dot")
76    (cons 16 "atom")
77    (cons 17 "slash")
78    (cons 18 "question")
79    (cons 19 "equal")
80    (cons 20 "token")
81    (cons 21 "us-texts")
82    (cons 22 "us-wsp")
83    (cons 23 "us-fold")
84    (cons 24 "wsp")
85    (cons 25 "fold")
86    (cons 26 "qs-begin")
87    (cons 27 "qs-end")
88    (cons 28 "qs-texts")
89    (cons 29 "qs-wsp")
90    (cons 30 "qs-fold")
91    (cons 31 "qs-qfold")
92    (cons 32 "qs-qpair")
93    (cons 33 "dl-begin")
94    (cons 34 "dl-end")
95    (cons 35 "dl-texts")
96    (cons 36 "dl-wsp")
97    (cons 37 "dl-fold")
98    (cons 38 "dl-qfold")
99    (cons 39 "dl-qpair")
100    (cons 40 "cm-begin")
101    (cons 41 "cm-end")
102    (cons 42 "cm-nested-begin")
103    (cons 43 "cm-nested-end")
104    (cons 44 "cm-texts")
105    (cons 45 "cm-wsp")
106    (cons 46 "cm-fold")
107    (cons 47 "cm-qfold")
108    (cons 48 "cm-qpair")
109    (cons 49 "err")
110   ))
111
112 ; *** Action Table ***
113 (defconst ew:action-table
114   [
115      ((default . *error*) (2 . 7) (3 . 6) (4 . 5) (5 . 4) (6 . 3) (7 . 2) (8 . 1))
116      ((default . -61))
117      ((default . -61))
118      ((default . -61))
119      ((default . -61))
120      ((default . -61))
121      ((default . -61))
122      ((default . -61))
123      ((default . *error*) (0 . 16))
124      ((default . -51) (16 . 21) (24 . 20) (25 . 19) (26 . 18) (40 . 17))
125      ((default . -53) (16 . 21) (24 . 20) (25 . 19) (26 . 18) (40 . 17))
126      ((default . *error*) (9 . 34) (16 . 21) (24 . 20) (25 . 19) (26 . 18) (40 . 17))
127      ((default . -9) (9 . 34) (16 . 21) (24 . 20) (25 . 19) (26 . 18) (40 . 17))
128      ((default . *error*) (9 . 34) (16 . 21) (24 . 20) (25 . 19) (26 . 18) (40 . 17))
129      ((default . -30) (9 . 34) (16 . 21) (24 . 20) (25 . 19) (26 . 18) (40 . 17))
130      ((default . *error*) (9 . 34) (16 . 21) (24 . 20) (25 . 19) (26 . 18) (40 . 17))
131      ((default . -1) (0 . accept))
132      ((default . -90))
133      ((default . -76))
134      ((default . -63))
135      ((default . -62))
136      ((default . -61))
137      ((default . -64))
138      ((default . -61))
139      ((default . -48))
140      ((default . -49))
141      ((default . -8) (9 . 34))
142      ((default . -57))
143      ((default . -37))
144      ((default . -36) (16 . 21) (26 . 18))
145      ((default . -52))
146      ((default . -54) (12 . 60))
147      ((default . -7))
148      ((default . -55))
149      ((default . -61))
150      ((default . -43) (11 . 63))
151      ((default . -37) (15 . -25) (11 . -25))
152      ((default . -29))
153      ((default . *error*) (9 . 34) (14 . 68))
154      ((default . -13))
155      ((default . *error*) (11 . 63) (15 . 71))
156      ((default . -14))
157      ((default . -27))
158      ((default . -11))
159      ((default . -6) (12 . 60))
160      ((default . -10) (12 . 60))
161      ((default . -5))
162      ((default . *error*) (9 . 34))
163      ((default . -4) (12 . 60))
164      ((default . -32))
165      ((default . -31) (12 . 60))
166      ((default . -3))
167      ((default . -2))
168      ((default . *error*) (41 . 83) (42 . 82) (43 . 81) (44 . 80) (45 . 79) (46 . 78) (47 . 77) (48 . 76))
169      ((default . *error*) (27 . 89) (28 . 88) (29 . 87) (30 . 86) (31 . 85) (32 . 84))
170      ((default . -74) (24 . 20) (25 . 19) (40 . 17))
171      ((default . -72) (24 . 20) (25 . 19) (40 . 17))
172      ((default . *error*) (16 . 21) (26 . 18))
173      ((default . -51) (16 . 21) (26 . 18))
174      ((default . -38))
175      ((default . -61))
176      ((default . *error*) (16 . 21) (26 . 18))
177      ((default . -65) (24 . 20) (25 . 19) (40 . 17))
178      ((default . -61))
179      ((default . *error*) (16 . 21) (33 . 96))
180      ((default . *error*) (16 . 21) (26 . 18))
181      ((default . *error*) (12 . 60) (14 . 68))
182      ((default . -44))
183      ((default . -61))
184      ((default . -30) (9 . 34) (16 . 21) (26 . 18))
185      ((default . -28))
186      ((default . -61))
187      ((default . *error*) (16 . 21) (26 . 18))
188      ((default . *error*) (16 . 21) (33 . 96))
189      ((default . *error*) (9 . 34) (16 . 21) (26 . 18))
190      ((default . *error*) (9 . 34) (16 . 21) (26 . 18))
191      ((default . -97))
192      ((default . -96))
193      ((default . -95))
194      ((default . -94))
195      ((default . -93))
196      ((default . -92))
197      ((default . -91))
198      ((default . -89))
199      ((default . -81))
200      ((default . -80))
201      ((default . -79))
202      ((default . -78))
203      ((default . -77))
204      ((default . -75))
205      ((default . -25))
206      ((default . *error*) (10 . 113))
207      ((default . -58))
208      ((default . -68) (24 . 20) (25 . 19) (40 . 17))
209      ((default . -56))
210      ((default . -67) (24 . 20) (25 . 19) (40 . 17))
211      ((default . -83))
212      ((default . -61))
213      ((default . -21))
214      ((default . -46))
215      ((default . -19))
216      ((default . -45))
217      ((default . -40) (15 . 71))
218      ((default . *error*) (10 . 113))
219      ((default . -39))
220      ((default . *error*) (11 . 63))
221      ((default . -70) (24 . 20) (25 . 19) (40 . 17))
222      ((default . *error*) (13 . 120))
223      ((default . -71) (24 . 20) (25 . 19) (40 . 17))
224      ((default . -26))
225      ((default . -15) (15 . 71))
226      ((default . -12))
227      ((default . -33))
228      ((default . -61))
229      ((default . -35))
230      ((default . *error*) (34 . 128) (35 . 127) (36 . 126) (37 . 125) (38 . 124) (39 . 123))
231      ((default . -73) (24 . 20) (25 . 19) (40 . 17))
232      ((default . *error*) (16 . 21) (33 . 96))
233      ((default . -42))
234      ((default . *error*) (16 . 21) (33 . 96))
235      ((default . -61))
236      ((default . -22))
237      ((default . -66) (24 . 20) (25 . 19) (40 . 17))
238      ((default . -88))
239      ((default . -87))
240      ((default . -86))
241      ((default . -85))
242      ((default . -84))
243      ((default . -82))
244      ((default . -20))
245      ((default . -41) (15 . 71))
246      ((default . -69) (24 . 20) (25 . 19) (40 . 17))
247     ])
248
249 ; *** Goto Table ***
250 (defconst ew:goto-table
251   [
252      ((1 . 8))
253      ((33 . 9))
254      ((33 . 10))
255      ((33 . 11))
256      ((33 . 12))
257      ((33 . 13))
258      ((33 . 14))
259      ((33 . 15))
260      ()
261      ((48 . 22)(44 . 23)(43 . 24)(41 . 25)(31 . 26)(28 . 27)(26 . 28)(19 . 29)(18 . 30))
262      ((48 . 22)(44 . 23)(43 . 24)(41 . 25)(30 . 31)(29 . 32)(26 . 28)(19 . 29)(18 . 33))
263      ((48 . 22)(44 . 23)(43 . 24)(41 . 25)(34 . 35)(26 . 36)(22 . 37)(19 . 29)(18 . 38)(13 . 39)(12 . 40)(10 . 41)(5 . 42)(4 . 43)(3 . 44))
264      ((48 . 22)(44 . 23)(43 . 24)(41 . 25)(34 . 35)(26 . 36)(22 . 37)(19 . 29)(18 . 38)(13 . 39)(12 . 40)(10 . 41)(5 . 42)(4 . 43)(3 . 45)(2 . 46))
265      ((48 . 22)(44 . 23)(43 . 24)(41 . 25)(34 . 35)(26 . 36)(22 . 37)(19 . 29)(18 . 47)(15 . 48)(13 . 49)(12 . 40)(5 . 42))
266      ((48 . 22)(44 . 23)(43 . 24)(41 . 25)(34 . 35)(26 . 36)(22 . 37)(19 . 29)(18 . 47)(15 . 50)(14 . 51)(13 . 49)(12 . 40)(5 . 42))
267      ((48 . 22)(44 . 23)(43 . 24)(41 . 25)(34 . 35)(26 . 36)(22 . 37)(19 . 29)(18 . 47)(13 . 52)(12 . 40)(5 . 42))
268      ()
269      ((49 . 53))
270      ((45 . 54))
271      ()
272      ()
273      ((33 . 55))
274      ()
275      ((33 . 56))
276      ()
277      ()
278      ((34 . 57)(17 . 58))
279      ()
280      ()
281      ((44 . 23)(43 . 24)(41 . 25)(26 . 59))
282      ()
283      ((37 . 61))
284      ()
285      ()
286      ((33 . 62))
287      ((36 . 64)(23 . 65)(21 . 66)(20 . 67))
288      ()
289      ()
290      ((39 . 69)(34 . 35)(22 . 70))
291      ()
292      ((40 . 72)(36 . 73))
293      ()
294      ()
295      ()
296      ((37 . 74))
297      ((37 . 74))
298      ()
299      ((34 . 35)(22 . 70))
300      ((37 . 75))
301      ()
302      ((37 . 75))
303      ()
304      ()
305      ()
306      ()
307      ((48 . 22))
308      ((48 . 22))
309      ((44 . 23)(43 . 24)(41 . 25)(26 . 90)(12 . 40)(5 . 91))
310      ((44 . 23)(43 . 24)(41 . 25)(28 . 92)(26 . 28)(19 . 29)(18 . 30))
311      ()
312      ((33 . 93))
313      ((44 . 23)(43 . 24)(41 . 25)(26 . 28)(19 . 29)(18 . 94))
314      ((48 . 22))
315      ((33 . 95))
316      ((46 . 97)(43 . 98)(42 . 99)(24 . 100)(9 . 101)(8 . 102))
317      ((44 . 23)(43 . 24)(41 . 25)(26 . 90)(12 . 40)(5 . 103))
318      ((39 . 104)(37 . 105))
319      ()
320      ((33 . 106))
321      ((44 . 23)(43 . 24)(41 . 25)(34 . 35)(26 . 36)(22 . 37)(19 . 29)(18 . 47)(15 . 50)(14 . 107)(13 . 49)(12 . 40)(5 . 42))
322      ()
323      ((33 . 108))
324      ((44 . 23)(43 . 24)(41 . 25)(26 . 109))
325      ((46 . 97)(43 . 98)(42 . 99)(24 . 100)(9 . 101)(8 . 110))
326      ((44 . 23)(43 . 24)(41 . 25)(34 . 35)(26 . 36)(22 . 37)(19 . 29)(18 . 38)(13 . 39)(12 . 40)(10 . 41)(5 . 42)(4 . 111))
327      ((44 . 23)(43 . 24)(41 . 25)(34 . 35)(26 . 36)(22 . 37)(19 . 29)(18 . 47)(13 . 112)(12 . 40)(5 . 42))
328      ()
329      ()
330      ()
331      ()
332      ()
333      ()
334      ()
335      ()
336      ()
337      ()
338      ()
339      ()
340      ()
341      ()
342      ()
343      ((35 . 114))
344      ()
345      ((48 . 22))
346      ()
347      ((48 . 22))
348      ((47 . 115))
349      ((33 . 116))
350      ()
351      ()
352      ()
353      ()
354      ((40 . 117))
355      ((35 . 118))
356      ()
357      ((36 . 119))
358      ((48 . 22))
359      ((38 . 121))
360      ((48 . 22))
361      ()
362      ((40 . 117))
363      ()
364      ()
365      ((33 . 122))
366      ()
367      ()
368      ((48 . 22))
369      ((46 . 97)(43 . 98)(42 . 99)(24 . 129)(9 . 101))
370      ()
371      ((46 . 97)(43 . 98)(42 . 99)(24 . 100)(9 . 101)(8 . 130))
372      ((33 . 131))
373      ()
374      ((48 . 22))
375      ()
376      ()
377      ()
378      ()
379      ()
380      ()
381      ()
382      ((40 . 117))
383      ((48 . 22))
384     ])
385
386 ; *** Reduction Table ***
387 (defconst ew:reduction-table
388   (vector
389     '()
390     (lambda (stack sp goto-table)
391       (let* (($2 (aref stack (- sp 1)))
392              ($1 (aref stack (- sp 3))))
393           (accept $1)))
394     (lambda (stack sp goto-table)
395       (let* (($3 (aref stack (- sp 1)))
396              ($2 (aref stack (- sp 3)))
397              ($1 (aref stack (- sp 5))))
398           (lr-push stack (- sp 6) 1 goto-table ())))
399     (lambda (stack sp goto-table)
400       (let* (($3 (aref stack (- sp 1)))
401              ($2 (aref stack (- sp 3)))
402              ($1 (aref stack (- sp 5))))
403           (lr-push stack (- sp 6) 1 goto-table ())))
404     (lambda (stack sp goto-table)
405       (let* (($3 (aref stack (- sp 1)))
406              ($2 (aref stack (- sp 3)))
407              ($1 (aref stack (- sp 5))))
408           (lr-push stack (- sp 6) 1 goto-table ())))
409     (lambda (stack sp goto-table)
410       (let* (($3 (aref stack (- sp 1)))
411              ($2 (aref stack (- sp 3)))
412              ($1 (aref stack (- sp 5))))
413           (lr-push stack (- sp 6) 1 goto-table ())))
414     (lambda (stack sp goto-table)
415       (let* (($3 (aref stack (- sp 1)))
416              ($2 (aref stack (- sp 3)))
417              ($1 (aref stack (- sp 5))))
418           (lr-push stack (- sp 6) 1 goto-table ())))
419     (lambda (stack sp goto-table)
420       (let* (($3 (aref stack (- sp 1)))
421              ($2 (aref stack (- sp 3)))
422              ($1 (aref stack (- sp 5))))
423           (lr-push stack (- sp 6) 1 goto-table ())))
424     (lambda (stack sp goto-table)
425       (let* (($3 (aref stack (- sp 1)))
426              ($2 (aref stack (- sp 3)))
427              ($1 (aref stack (- sp 5))))
428           (lr-push stack (- sp 6) 1 goto-table ())))
429     (lambda (stack sp goto-table)
430       (let* ()
431           (lr-push stack (- sp 0) 2 goto-table ())))
432     (lambda (stack sp goto-table)
433       (let* (($1 (aref stack (- sp 1))))
434           (lr-push stack (- sp 2) 2 goto-table ())))
435     (lambda (stack sp goto-table)
436       (let* (($1 (aref stack (- sp 1))))
437           (lr-push stack (- sp 2) 3 goto-table ())))
438     (lambda (stack sp goto-table)
439       (let* (($3 (aref stack (- sp 1)))
440              ($2 (aref stack (- sp 3)))
441              ($1 (aref stack (- sp 5))))
442           (lr-push stack (- sp 6) 3 goto-table ())))
443     (lambda (stack sp goto-table)
444       (let* (($1 (aref stack (- sp 1))))
445           (lr-push stack (- sp 2) 4 goto-table ())))
446     (lambda (stack sp goto-table)
447       (let* (($1 (aref stack (- sp 1))))
448           (lr-push stack (- sp 2) 4 goto-table ())))
449     (lambda (stack sp goto-table)
450       (let* (($3 (aref stack (- sp 1)))
451              ($2 (aref stack (- sp 3)))
452              ($1 (aref stack (- sp 5))))
453           (lr-push stack (- sp 6) 5 goto-table ())))
454     (lambda (stack sp goto-table)
455       (let* (($3 (aref stack (- sp 1)))
456              ($2 (aref stack (- sp 3)))
457              ($1 (aref stack (- sp 5))))
458           (lr-push stack (- sp 6) 6 goto-table ())))
459     (lambda (stack sp goto-table)
460       (let* (($4 (aref stack (- sp 1)))
461              ($3 (aref stack (- sp 3)))
462              ($2 (aref stack (- sp 5)))
463              ($1 (aref stack (- sp 7))))
464           (lr-push stack (- sp 8) 7 goto-table ())))
465     (lambda (stack sp goto-table)
466       (let* (($2 (aref stack (- sp 1)))
467              ($1 (aref stack (- sp 3))))
468           (lr-push stack (- sp 4) 7 goto-table ())))
469     (lambda (stack sp goto-table)
470       (let* (($1 (aref stack (- sp 1))))
471           (lr-push stack (- sp 2) 8 goto-table ())))
472     (lambda (stack sp goto-table)
473       (let* (($3 (aref stack (- sp 1)))
474              ($2 (aref stack (- sp 3)))
475              ($1 (aref stack (- sp 5))))
476           (lr-push stack (- sp 6) 8 goto-table ())))
477     (lambda (stack sp goto-table)
478       (let* (($1 (aref stack (- sp 1))))
479           (lr-push stack (- sp 2) 9 goto-table ())))
480     (lambda (stack sp goto-table)
481       (let* (($4 (aref stack (- sp 1)))
482              ($3 (aref stack (- sp 3)))
483              ($2 (aref stack (- sp 5)))
484              ($1 (aref stack (- sp 7))))
485           (lr-push stack (- sp 8) 10 goto-table ())))
486     (lambda (stack sp goto-table)
487       (let* (($3 (aref stack (- sp 1)))
488              ($2 (aref stack (- sp 3)))
489              ($1 (aref stack (- sp 5))))
490           (lr-push stack (- sp 6) 11 goto-table ())))
491     (lambda (stack sp goto-table)
492       (let* (($5 (aref stack (- sp 1)))
493              ($4 (aref stack (- sp 3)))
494              ($3 (aref stack (- sp 5)))
495              ($2 (aref stack (- sp 7)))
496              ($1 (aref stack (- sp 9))))
497           (lr-push stack (- sp 10) 11 goto-table ())))
498     (lambda (stack sp goto-table)
499       (let* (($1 (aref stack (- sp 1))))
500           (lr-push stack (- sp 2) 12 goto-table ())))
501     (lambda (stack sp goto-table)
502       (let* (($3 (aref stack (- sp 1)))
503              ($2 (aref stack (- sp 3)))
504              ($1 (aref stack (- sp 5))))
505           (lr-push stack (- sp 6) 12 goto-table ())))
506     (lambda (stack sp goto-table)
507       (let* (($1 (aref stack (- sp 1))))
508           (lr-push stack (- sp 2) 13 goto-table ())))
509     (lambda (stack sp goto-table)
510       (let* (($2 (aref stack (- sp 1)))
511              ($1 (aref stack (- sp 3))))
512           (lr-push stack (- sp 4) 13 goto-table ())))
513     (lambda (stack sp goto-table)
514       (let* (($1 (aref stack (- sp 1))))
515           (lr-push stack (- sp 2) 13 goto-table ())))
516     (lambda (stack sp goto-table)
517       (let* ()
518           (lr-push stack (- sp 0) 14 goto-table ())))
519     (lambda (stack sp goto-table)
520       (let* (($1 (aref stack (- sp 1))))
521           (lr-push stack (- sp 2) 14 goto-table ())))
522     (lambda (stack sp goto-table)
523       (let* (($1 (aref stack (- sp 1))))
524           (lr-push stack (- sp 2) 15 goto-table ())))
525     (lambda (stack sp goto-table)
526       (let* (($3 (aref stack (- sp 1)))
527              ($2 (aref stack (- sp 3)))
528              ($1 (aref stack (- sp 5))))
529           (lr-push stack (- sp 6) 15 goto-table ())))
530     (lambda (stack sp goto-table)
531       (let* (($1 (aref stack (- sp 1))))
532           (lr-push stack (- sp 2) 16 goto-table ())))
533     (lambda (stack sp goto-table)
534       (let* (($3 (aref stack (- sp 1)))
535              ($2 (aref stack (- sp 3)))
536              ($1 (aref stack (- sp 5))))
537           (lr-push stack (- sp 6) 17 goto-table ())))
538     (lambda (stack sp goto-table)
539       (let* (($1 (aref stack (- sp 1))))
540           (lr-push stack (- sp 2) 18 goto-table (ew-mark-phrase (car $1) (cdr $1)))))
541     (lambda (stack sp goto-table)
542       (let* (($1 (aref stack (- sp 1))))
543           (lr-push stack (- sp 2) 19 goto-table $1)))
544     (lambda (stack sp goto-table)
545       (let* (($2 (aref stack (- sp 1)))
546              ($1 (aref stack (- sp 3))))
547           (lr-push stack (- sp 4) 19 goto-table (cons (car $1) (cdr $2)))))
548     (lambda (stack sp goto-table)
549       (let* (($2 (aref stack (- sp 1)))
550              ($1 (aref stack (- sp 3))))
551           (lr-push stack (- sp 4) 20 goto-table ())))
552     (lambda (stack sp goto-table)
553       (let* (($2 (aref stack (- sp 1)))
554              ($1 (aref stack (- sp 3))))
555           (lr-push stack (- sp 4) 21 goto-table ())))
556     (lambda (stack sp goto-table)
557       (let* (($4 (aref stack (- sp 1)))
558              ($3 (aref stack (- sp 3)))
559              ($2 (aref stack (- sp 5)))
560              ($1 (aref stack (- sp 7))))
561           (lr-push stack (- sp 8) 21 goto-table ())))
562     (lambda (stack sp goto-table)
563       (let* (($4 (aref stack (- sp 1)))
564              ($3 (aref stack (- sp 3)))
565              ($2 (aref stack (- sp 5)))
566              ($1 (aref stack (- sp 7))))
567           (lr-push stack (- sp 8) 22 goto-table ())))
568     (lambda (stack sp goto-table)
569       (let* ()
570           (lr-push stack (- sp 0) 23 goto-table ())))
571     (lambda (stack sp goto-table)
572       (let* (($1 (aref stack (- sp 1))))
573           (lr-push stack (- sp 2) 23 goto-table ())))
574     (lambda (stack sp goto-table)
575       (let* (($1 (aref stack (- sp 1))))
576           (lr-push stack (- sp 2) 24 goto-table ())))
577     (lambda (stack sp goto-table)
578       (let* (($1 (aref stack (- sp 1))))
579           (lr-push stack (- sp 2) 24 goto-table ())))
580     (lambda (stack sp goto-table)
581       (let* (($2 (aref stack (- sp 1)))
582              ($1 (aref stack (- sp 3))))
583           (lr-push stack (- sp 4) 25 goto-table ())))
584     (lambda (stack sp goto-table)
585       (let* (($1 (aref stack (- sp 1))))
586           (lr-push stack (- sp 2) 26 goto-table $1)))
587     (lambda (stack sp goto-table)
588       (let* (($1 (aref stack (- sp 1))))
589           (lr-push stack (- sp 2) 26 goto-table $1)))
590     (lambda (stack sp goto-table)
591       (let* (($1 (aref stack (- sp 1))))
592           (lr-push stack (- sp 2) 27 goto-table ())))
593     (lambda (stack sp goto-table)
594       (let* ()
595           (lr-push stack (- sp 0) 28 goto-table ())))
596     (lambda (stack sp goto-table)
597       (let* (($1 (aref stack (- sp 1))))
598           (lr-push stack (- sp 2) 28 goto-table ())))
599     (lambda (stack sp goto-table)
600       (let* ()
601           (lr-push stack (- sp 0) 29 goto-table ())))
602     (lambda (stack sp goto-table)
603       (let* (($1 (aref stack (- sp 1))))
604           (lr-push stack (- sp 2) 29 goto-table ())))
605     (lambda (stack sp goto-table)
606       (let* (($1 (aref stack (- sp 1))))
607           (lr-push stack (- sp 2) 30 goto-table ())))
608     (lambda (stack sp goto-table)
609       (let* (($3 (aref stack (- sp 1)))
610              ($2 (aref stack (- sp 3)))
611              ($1 (aref stack (- sp 5))))
612           (lr-push stack (- sp 6) 30 goto-table ())))
613     (lambda (stack sp goto-table)
614       (let* (($1 (aref stack (- sp 1))))
615           (lr-push stack (- sp 2) 31 goto-table ())))
616     (lambda (stack sp goto-table)
617       (let* (($3 (aref stack (- sp 1)))
618              ($2 (aref stack (- sp 3)))
619              ($1 (aref stack (- sp 5))))
620           (lr-push stack (- sp 6) 31 goto-table ())))
621     (lambda (stack sp goto-table)
622       (let* (($1 (aref stack (- sp 1))))
623           (lr-push stack (- sp 2) 32 goto-table ())))
624     (lambda (stack sp goto-table)
625       (let* (($3 (aref stack (- sp 1)))
626              ($2 (aref stack (- sp 3)))
627              ($1 (aref stack (- sp 5))))
628           (lr-push stack (- sp 6) 32 goto-table ())))
629     (lambda (stack sp goto-table)
630       (let* ()
631           (lr-push stack (- sp 0) 33 goto-table nil)))
632     (lambda (stack sp goto-table)
633       (let* (($2 (aref stack (- sp 1)))
634              ($1 (aref stack (- sp 3))))
635           (lr-push stack (- sp 4) 33 goto-table (cons (if $1 (car $1) $2) $2))))
636     (lambda (stack sp goto-table)
637       (let* (($2 (aref stack (- sp 1)))
638              ($1 (aref stack (- sp 3))))
639           (lr-push stack (- sp 4) 33 goto-table (cons (if $1 (car $1) $2) $2))))
640     (lambda (stack sp goto-table)
641       (let* (($2 (aref stack (- sp 1)))
642              ($1 (aref stack (- sp 3))))
643           (lr-push stack (- sp 4) 33 goto-table (cons (if $1 (car $1) (car $2)) (cdr $2)))))
644     (lambda (stack sp goto-table)
645       (let* (($2 (aref stack (- sp 1)))
646              ($1 (aref stack (- sp 3))))
647           (lr-push stack (- sp 4) 34 goto-table ())))
648     (lambda (stack sp goto-table)
649       (let* (($2 (aref stack (- sp 1)))
650              ($1 (aref stack (- sp 3))))
651           (lr-push stack (- sp 4) 35 goto-table ())))
652     (lambda (stack sp goto-table)
653       (let* (($2 (aref stack (- sp 1)))
654              ($1 (aref stack (- sp 3))))
655           (lr-push stack (- sp 4) 36 goto-table ())))
656     (lambda (stack sp goto-table)
657       (let* (($2 (aref stack (- sp 1)))
658              ($1 (aref stack (- sp 3))))
659           (lr-push stack (- sp 4) 37 goto-table ())))
660     (lambda (stack sp goto-table)
661       (let* (($2 (aref stack (- sp 1)))
662              ($1 (aref stack (- sp 3))))
663           (lr-push stack (- sp 4) 38 goto-table ())))
664     (lambda (stack sp goto-table)
665       (let* (($2 (aref stack (- sp 1)))
666              ($1 (aref stack (- sp 3))))
667           (lr-push stack (- sp 4) 39 goto-table ())))
668     (lambda (stack sp goto-table)
669       (let* (($2 (aref stack (- sp 1)))
670              ($1 (aref stack (- sp 3))))
671           (lr-push stack (- sp 4) 40 goto-table ())))
672     (lambda (stack sp goto-table)
673       (let* (($2 (aref stack (- sp 1)))
674              ($1 (aref stack (- sp 3))))
675           (lr-push stack (- sp 4) 41 goto-table (cons (car $1) (if $2 (cdr $2) (cdr $1))))))
676     (lambda (stack sp goto-table)
677       (let* (($2 (aref stack (- sp 1)))
678              ($1 (aref stack (- sp 3))))
679           (lr-push stack (- sp 4) 42 goto-table ())))
680     (lambda (stack sp goto-table)
681       (let* (($2 (aref stack (- sp 1)))
682              ($1 (aref stack (- sp 3))))
683           (lr-push stack (- sp 4) 43 goto-table (cons $1 (if $2 (cdr $2) $1)))))
684     (lambda (stack sp goto-table)
685       (let* (($3 (aref stack (- sp 1)))
686              ($2 (aref stack (- sp 3)))
687              ($1 (aref stack (- sp 5))))
688           (lr-push stack (- sp 6) 44 goto-table (cons $1 $3))))
689     (lambda (stack sp goto-table)
690       (let* ()
691           (lr-push stack (- sp 0) 45 goto-table ())))
692     (lambda (stack sp goto-table)
693       (let* (($2 (aref stack (- sp 1)))
694              ($1 (aref stack (- sp 3))))
695           (lr-push stack (- sp 4) 45 goto-table ())))
696     (lambda (stack sp goto-table)
697       (let* (($2 (aref stack (- sp 1)))
698              ($1 (aref stack (- sp 3))))
699           (lr-push stack (- sp 4) 45 goto-table ())))
700     (lambda (stack sp goto-table)
701       (let* (($2 (aref stack (- sp 1)))
702              ($1 (aref stack (- sp 3))))
703           (lr-push stack (- sp 4) 45 goto-table ())))
704     (lambda (stack sp goto-table)
705       (let* (($2 (aref stack (- sp 1)))
706              ($1 (aref stack (- sp 3))))
707           (lr-push stack (- sp 4) 45 goto-table ())))
708     (lambda (stack sp goto-table)
709       (let* (($2 (aref stack (- sp 1)))
710              ($1 (aref stack (- sp 3))))
711           (lr-push stack (- sp 4) 45 goto-table ())))
712     (lambda (stack sp goto-table)
713       (let* (($3 (aref stack (- sp 1)))
714              ($2 (aref stack (- sp 3)))
715              ($1 (aref stack (- sp 5))))
716           (lr-push stack (- sp 6) 46 goto-table ())))
717     (lambda (stack sp goto-table)
718       (let* ()
719           (lr-push stack (- sp 0) 47 goto-table ())))
720     (lambda (stack sp goto-table)
721       (let* (($2 (aref stack (- sp 1)))
722              ($1 (aref stack (- sp 3))))
723           (lr-push stack (- sp 4) 47 goto-table ())))
724     (lambda (stack sp goto-table)
725       (let* (($2 (aref stack (- sp 1)))
726              ($1 (aref stack (- sp 3))))
727           (lr-push stack (- sp 4) 47 goto-table ())))
728     (lambda (stack sp goto-table)
729       (let* (($2 (aref stack (- sp 1)))
730              ($1 (aref stack (- sp 3))))
731           (lr-push stack (- sp 4) 47 goto-table ())))
732     (lambda (stack sp goto-table)
733       (let* (($2 (aref stack (- sp 1)))
734              ($1 (aref stack (- sp 3))))
735           (lr-push stack (- sp 4) 47 goto-table ())))
736     (lambda (stack sp goto-table)
737       (let* (($2 (aref stack (- sp 1)))
738              ($1 (aref stack (- sp 3))))
739           (lr-push stack (- sp 4) 47 goto-table ())))
740     (lambda (stack sp goto-table)
741       (let* (($3 (aref stack (- sp 1)))
742              ($2 (aref stack (- sp 3)))
743              ($1 (aref stack (- sp 5))))
744           (lr-push stack (- sp 6) 48 goto-table (cons $1 $3))))
745     (lambda (stack sp goto-table)
746       (let* ()
747           (lr-push stack (- sp 0) 49 goto-table ())))
748     (lambda (stack sp goto-table)
749       (let* (($2 (aref stack (- sp 1)))
750              ($1 (aref stack (- sp 3))))
751           (lr-push stack (- sp 4) 49 goto-table ())))
752     (lambda (stack sp goto-table)
753       (let* (($2 (aref stack (- sp 1)))
754              ($1 (aref stack (- sp 3))))
755           (lr-push stack (- sp 4) 49 goto-table ())))
756     (lambda (stack sp goto-table)
757       (let* (($2 (aref stack (- sp 1)))
758              ($1 (aref stack (- sp 3))))
759           (lr-push stack (- sp 4) 49 goto-table ())))
760     (lambda (stack sp goto-table)
761       (let* (($2 (aref stack (- sp 1)))
762              ($1 (aref stack (- sp 3))))
763           (lr-push stack (- sp 4) 49 goto-table ())))
764     (lambda (stack sp goto-table)
765       (let* (($2 (aref stack (- sp 1)))
766              ($1 (aref stack (- sp 3))))
767           (lr-push stack (- sp 4) 49 goto-table ())))
768     (lambda (stack sp goto-table)
769       (let* (($2 (aref stack (- sp 1)))
770              ($1 (aref stack (- sp 3))))
771           (lr-push stack (- sp 4) 49 goto-table ())))
772     (lambda (stack sp goto-table)
773       (let* (($2 (aref stack (- sp 1)))
774              ($1 (aref stack (- sp 3))))
775           (lr-push stack (- sp 4) 49 goto-table ())))
776   ))
777
778 ; *** Parser Definition ***
779 (defun ew-parse(scanner errorhandler)
780   (lr-parse scanner errorhandler 
781     ew:action-table
782     ew:goto-table
783     ew:reduction-table
784     ew:token-defs))
785
786 ; *** Footer ***
787 (put 'ew:cm-texts-tok 'decode 'ew-decode-comment)
788 (put 'ew:cm-wsp-tok 'decode 'ew-decode-comment)
789 (put 'ew:cm-fold-tok 'decode 'ew-decode-comment)
790 (put 'ew:cm-qfold-tok 'decode 'ew-decode-comment)
791 (put 'ew:cm-qpair-tok 'decode 'ew-decode-comment)
792 (put 'ew:us-texts-tok 'decode 'ew-decode-unstructured)
793 (put 'ew:us-wsp-tok 'decode 'ew-decode-unstructured)
794 (put 'ew:us-fold-tok 'decode 'ew-decode-unstructured)
795
796