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