source: project/release/4/jbogenturfahi/trunk/samselpla.scm @ 27407

Last change on this file since 27407 was 27407, checked in by Alan Post, 7 years ago

jbogenturfa'i: added new ldcmz tests, fix code generation so they pass.

I'm still working out the top-level code for all the lower-level
terminals that pass into it, making sure that the variety of valid
parse trees produced consistent results.

File size: 72.9 KB
Line 
1;;;;
2;;;; jbogenturfahi - lo lojbo ke pe'a jajgau ratcu ke'e genturfa'i
3;;;;               `-> A Lojban grammar parser
4;;;;
5;;;; Copyright (c) 2010 ".alyn.post." <alyn.post@lodockikumazvati.org>
6;;;;
7;;;; Permission to use, copy, modify, and/or distribute this software for any
8;;;; purpose with or without fee is hereby granted, provided that the above
9;;;; copyright notice and this permission notice appear in all copies.
10;;;;
11;;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12;;;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13;;;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14;;;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15;;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16;;;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17;;;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18;;;;
19
20;;;
21;;; Helper routines
22;;;
23
24;; if an optional rule was not matched, return null.
25;; Otherwise return the rule.
26;;
27(define-syntax ?-null
28  (syntax-rules ()
29    ((_ jalge)
30     (if (and (string? jalge) (string=? "" jalge))
31         '()
32         `(,jalge)))))
33
34(define-syntax ?*-null
35  (syntax-rules ()
36    ((_ jalge)
37     (if (and (string? jalge) (string=? "" jalge))
38         '()
39         jalge))))
40
41(define-syntax ?+-null
42  (syntax-rules ()
43    ((_ jalge)
44     (if (and (string? jalge) (string=? "" jalge))
45         '()
46         jalge))))
47
48;; if a zero-or-more rule was not matched, return
49;; null.  Otherwise return the rule.
50;;
51(define-syntax *-null
52  (syntax-rules ()
53    ((_ jalge)
54     jalge)))
55
56;; if a one-or-more rule was matched.
57;;
58(define-syntax +-null
59  (syntax-rules ()
60    ((_ jalge)
61     jalge)))
62
63
64;;;
65;;; rafske
66;;;
67
68;;
69;; lerfu
70;;
71(define (a comma lerfu)
72  (string-append (apply string comma) (string lerfu)))
73
74(define (e comma lerfu)
75  (string-append (apply string comma) (string lerfu)))
76
77(define (i comma lerfu)
78  (string-append (apply string comma) (string lerfu)))
79
80(define (o comma lerfu)
81  (string-append (apply string comma) (string lerfu)))
82
83(define (u comma lerfu)
84  (string-append (apply string comma) (string lerfu)))
85
86(define (y comma lerfu)
87  (string-append (apply string comma) (string lerfu)))
88
89(define (l comma lerfu)
90  (string-append (apply string comma) (string lerfu)))
91
92(define (m comma lerfu)
93  (string-append (apply string comma) (string lerfu)))
94
95(define (n comma lerfu)
96  (string-append (apply string comma) (string lerfu)))
97
98(define (r comma lerfu)
99  (string-append (apply string comma) (string lerfu)))
100
101(define (b comma lerfu)
102  (string-append (apply string comma) (string lerfu)))
103
104(define (d comma lerfu)
105  (string-append (apply string comma) (string lerfu)))
106
107(define (g comma lerfu)
108  (string-append (apply string comma) (string lerfu)))
109
110(define (v comma lerfu)
111  (string-append (apply string comma) (string lerfu)))
112
113(define (j comma lerfu)
114  (string-append (apply string comma) (string lerfu)))
115
116(define (z comma lerfu)
117  (string-append (apply string comma) (string lerfu)))
118
119(define (s comma lerfu)
120  (string-append (apply string comma) (string lerfu)))
121
122(define (c comma lerfu)
123  (string-append (apply string comma) (string lerfu)))
124
125(define (x comma lerfu)
126  (string-append (apply string comma) (string lerfu)))
127
128(define (k comma lerfu)
129  (string-append (apply string comma) (string lerfu)))
130
131(define (f comma lerfu)
132  (string-append (apply string comma) (string lerfu)))
133
134(define (p comma lerfu)
135  (string-append (apply string comma) (string lerfu)))
136
137(define (t comma lerfu)
138  (string-append (apply string comma) (string lerfu)))
139
140(define (h comma lerfu)
141  (string-append (apply string comma) (string lerfu)))
142
143(define (digit comma digit)
144  (string-append (apply string comma) (string digit)))
145
146
147;;
148;; parts
149;;
150(define (final-syllable onset nucleus)
151  (string-append onset nucleus))
152
153(define (any-syllable onset nucleus coda)
154  (string-append onset nucleus coda))
155
156(define (syllable onset nucleus coda)
157  (string-append onset nucleus coda))
158
159(define (consonantal-syllable consonant0 syllabic consonant1)
160  (string-append consonant0 syllabic consonant1))
161
162(define (coda syllabic consonant)
163  (string-append syllabic consonant))
164
165(define (onset consonant glide)
166  (string-append consonant glide))
167
168
169(define (diphthong vowel0 vowel1)
170  (string-append vowel0 vowel1))
171
172
173(define (cluster cfari fanmo)
174  (apply string-append cfari fanmo))
175
176(define (initial-pair consonant0 consonant1)
177  (string-append consonant0 consonant1))
178
179(define (initial sibilant other liquid)
180  (string-append sibilant other liquid))
181
182(define (affricate stop fricative)
183  (string-append stop fricative))
184
185
186;; brivla
187;;
188(define (brivla-gismu gismu)
189  `(gismu ,gismu))
190
191(define (brivla-fuhivla fuhivla)
192  `(fuhivla ,fuhivla))
193
194(define (brivla-lujvo lujvo)
195  `(lujvo ,lujvo))
196
197
198;; cmene
199;;
200(define (zifcme nafanmo consonant)
201  `(cmene ,(string-append (apply string-append nafanmo) consonant)))
202
203(define (jbocme any-syllable-or-digit)
204  `(cmene ,(apply string-append any-syllable-or-digit)))
205
206
207;; cmavo
208;;
209(define (CVCy-lujvo-brivla-core CVC-rafsi
210                                y
211                                h
212                                initial-rafsi
213                                brivla-core)
214  (string-append CVC-rafsi
215                 y
216                 h
217                 (apply string-append initial-rafsi)
218                 brivla-core))
219
220(define (CVCy-lujvo-short-final-rafsi stressed-CVC-rafsi y short-final-rafsi)
221  (string-append stressed-CVC-rafsi y short-final-rafsi))
222
223(define (cmavo-form onset nucleus-h nucleus)
224  (string-append onset
225                 (apply string-append (map-apply string-append nucleus-h))
226                 nucleus))
227
228(define (cmavo-form-y y)
229  (apply string-append y))
230
231
232;; lujvo
233;;
234(define (lujvo initial-rafsi brivla-core)
235  (string-append (apply string-append initial-rafsi) brivla-core))
236
237(define (brivla-core stressed-initial-rafsi short-final-rafsi )
238  (string-append stressed-initial-rafsi short-final-rafsi))
239
240
241;; fu'ivla
242;;
243(define (fuhivla fuhivla-head
244                 stressed-syllable
245                 consonantal-syllable
246                 final-syllable)
247  (string-append fuhivla-head
248                 stressed-syllable
249                 (apply string-append consonantal-syllable)
250                 final-syllable))
251
252(define (stressed-brivla-rafsi brivla-head stressed-syllable h y)
253  (string-append brivla-head stressed-syllable h y))
254
255(define (brivla-rafsi brivla-head h0 y h1)
256  (string-append brivla-head h0 y h1))
257
258(define (stressed-fuhivla-rafsi fuhivla-head stressed-syllable onset y)
259  (string-append fuhivla-head stressed-syllable onset y))
260
261(define (fuhivla-rafsi fuhivla-head onset y h)
262  (string-append fuhivla-head onset y h))
263
264(define (brivla-head unstressed-syllable)
265  (apply string-append unstressed-syllable))
266
267(define (slinkuhi consonant rafsi-string)
268  (string-append consonant rafsi-string))
269
270(define (rafsi-string y-less-rafsi rest)
271  (string-append (apply string-append y-less-rafsi) rest))
272
273(define (rafsi-string-short-final stressed-y-less-rafsi short-final-rafsi)
274  (string-append stressed-y-less-rafsi short-final-rafsi))
275
276(define (rafsi-string-initial-pair stressed-y-less-rafsi
277                                   initial-pair
278                                   y)
279  (string-append stressed-y-less-rafsi initial-pair y))
280
281
282;; gismu
283;;
284(define (gismu . rodalerfu)
285  (apply string-append rodalerfu))
286
287(define (CVV-final-rafsi consonant stressed-vowel h vowel)
288  (string-append consonant stressed-vowel h vowel))
289
290(define (short-final-rafsi initial vowel)
291  (string-append initial vowel))
292
293(define (stressed-y-rafsi rafsi y)
294  (string-append rafsi y))
295
296(define (stressed-long-rafsi-CCVC initial-pair stressed-vowel consonant)
297  (string-append initial-pair stressed-vowel consonant))
298
299(define (stressed-long-rafsi-CVCC consonant0
300                                  stressed-vowel
301                                  consonant1
302                                  consonant2)
303  (string-append consonant0 stressed-vowel consonant1 consonant2))
304
305(define (stressed-CVC-rafsi consonant0 stressed-vowel consonant1)
306  (string-append consonant0 stressed-vowel consonant1))
307
308(define (stressed-CCV-rafsi initial-pair stressed-vowel)
309  (string-append initial-pair stressed-vowel))
310
311(define (stressed-CVV-rafsi consonant vowel r-hyphen)
312  (string-append consonant vowel r-hyphen))
313
314(define (stressed-CVV-rafsi-VhV unstressed-vowel h stressed-vowel)
315  (string-append unstressed-vowel h stressed-vowel))
316
317(define (y-rafsi rafsi y h)
318  (string-append rafsi y h))
319
320(define (long-rafsi-CCVC initial-pair unstressed-vowel consonant)
321  (string-append initial-pair unstressed-vowel consonant))
322
323(define (long-rafsi-CVCC consonant0 unstressed-vowel consonant1 consonant2)
324  (string-append consonant0 unstressed-vowel consonant1 consonant2))
325
326(define (CVC-rafsi consonant0 unstressed-vowel consonant1)
327  (string-append consonant0 unstressed-vowel consonant1))
328
329(define (CCV-rafsi initial-pair unstressed-vowel)
330  (string-append initial-pair unstressed-vowel))
331
332(define (CVV-rafsi consonant vowel r-hyphen)
333  (string-append consonant vowel r-hyphen))
334
335(define (CVV-rafsi-VhV unstressed-vowel0 h unstressed-vowel1)
336  (string-append unstressed-vowel0 h unstressed-vowel1))
337
338
339;; non-Lojban word
340;;
341(define (non-lojban-word rodalerfu)
342  `(non-lojban-word ,(apply string rodalerfu)))
343
344
345;; spaces
346;;
347(define (ybu y bu)
348  `(cmavo (BY ,(string-append (cadadr y) (cadadr bu)))))
349
350
351;;
352;; selma'o
353;;
354(define (cmavo cmavo-form)
355  `(cmavo ,cmavo-form))
356
357; ji is the only two-letter cmavo in A.  The rest are
358; a single letter.
359;
360(define (A . rodalerfu)
361  `(cmavo (A ,(apply string-append rodalerfu))))
362
363(define (BAI . rodalerfu)
364  `(cmavo (BAI ,(apply string-append rodalerfu))))
365
366(define (BAhE . rodalerfu)
367  `(cmavo (BAhE ,(apply string-append rodalerfu))))
368
369(define (BE . rodalerfu)
370  `(cmavo (BE ,(apply string-append rodalerfu))))
371
372(define (BEI . rodalerfu)
373  `(cmavo (BEI ,(apply string-append rodalerfu))))
374
375(define (BEhO . rodalerfu)
376  `(cmavo (BEhO ,(apply string-append rodalerfu))))
377
378(define (BIhE . rodalerfu)
379  `(cmavo (BIhE ,(apply string-append rodalerfu))))
380
381(define (BIhI . rodalerfu)
382  `(cmavo (BIhI ,(apply string-append rodalerfu))))
383
384(define (BO . rodalerfu)
385  `(cmavo (BO ,(apply string-append rodalerfu))))
386
387(define (BOI . rodalerfu)
388  `(cmavo (BOI ,(apply string-append rodalerfu))))
389
390(define (BU . rodalerfu)
391  `(cmavo (BU ,(apply string-append rodalerfu))))
392
393(define (BY . rodalerfu)
394  `(cmavo (BY ,(apply string-append rodalerfu))))
395
396(define (CAhA . rodalerfu)
397  `(cmavo (CAhA ,(apply string-append rodalerfu))))
398
399(define (CAI . rodalerfu)
400  `(cmavo (CAI ,(apply string-append rodalerfu))))
401
402(define (CEI . rodalerfu)
403  `(cmavo (CEI ,(apply string-append rodalerfu))))
404
405(define (CEhE . rodalerfu)
406  `(cmavo (CEhE ,(apply string-append rodalerfu))))
407
408(define (CO . rodalerfu)
409  `(cmavo (CO ,(apply string-append rodalerfu))))
410
411(define (COI . rodalerfu)
412  `(cmavo (COI ,(apply string-append rodalerfu))))
413
414(define (CU . rodalerfu)
415  `(cmavo (CU ,(apply string-append rodalerfu))))
416
417(define (CUhE . rodalerfu)
418  `(cmavo (CUhE ,(apply string-append rodalerfu))))
419
420(define (DAhO . rodalerfu)
421  `(cmavo (DAhO ,(apply string-append rodalerfu))))
422
423(define (DOI . rodalerfu)
424  `(cmavo (DOI ,(apply string-append rodalerfu))))
425
426(define (DOhU . rodalerfu)
427  `(cmavo (DOhU ,(apply string-append rodalerfu))))
428
429(define (FA . rodalerfu)
430  `(cmavo (FA ,(apply string-append rodalerfu))))
431
432(define (FAhA . rodalerfu)
433  `(cmavo (FAhA ,(apply string-append rodalerfu))))
434
435(define (FAhO . rodalerfu)
436  `(cmavo (FAhO ,(apply string-append rodalerfu))))
437
438(define (FEhE . rodalerfu)
439  `(cmavo (FEhE ,(apply string-append rodalerfu))))
440
441(define (FEhU . rodalerfu)
442  `(cmavo (FEhU ,(apply string-append rodalerfu))))
443
444(define (FIhO . rodalerfu)
445  `(cmavo (FIhO ,(apply string-append rodalerfu))))
446
447(define (FOI . rodalerfu)
448  `(cmavo (FOI ,(apply string-append rodalerfu))))
449
450(define (FUhA . rodalerfu)
451  `(cmavo (FUhA ,(apply string-append rodalerfu))))
452
453(define (FUhE . rodalerfu)
454  `(cmavo (FUhE ,(apply string-append rodalerfu))))
455
456(define (FUhO . rodalerfu)
457  `(cmavo (FUhO ,(apply string-append rodalerfu))))
458
459(define (GA . rodalerfu)
460  `(cmavo (GA ,(apply string-append rodalerfu))))
461
462(define (GAhO . rodalerfu)
463  `(cmavo (GAhO ,(apply string-append rodalerfu))))
464
465(define (GEhU . rodalerfu)
466  `(cmavo (GEhU ,(apply string-append rodalerfu))))
467
468(define (GI . rodalerfu)
469  `(cmavo (GI ,(apply string-append rodalerfu))))
470
471(define (GIhA . rodalerfu)
472  `(cmavo (GIhA ,(apply string-append rodalerfu))))
473
474(define (GOI . rodalerfu)
475  `(cmavo (GOI ,(apply string-append rodalerfu))))
476
477(define (GOhA . rodalerfu)
478  `(cmavo (GOhA ,(apply string-append rodalerfu))))
479
480(define (GUhA . rodalerfu)
481  `(cmavo (GUhA ,(apply string-append rodalerfu))))
482
483(define (I . rodalerfu)
484  `(cmavo (I ,(apply string-append rodalerfu))))
485
486(define (JA . rodalerfu)
487  `(cmavo (JA ,(apply string-append rodalerfu))))
488
489(define (JAI . rodalerfu)
490  `(cmavo (JAI ,(apply string-append rodalerfu))))
491
492(define (JOhI . rodalerfu)
493  `(cmavo (JOhI ,(apply string-append rodalerfu))))
494
495(define (JOI . rodalerfu)
496  `(cmavo (JOI ,(apply string-append rodalerfu))))
497
498(define (KE . rodalerfu)
499  `(cmavo (KE ,(apply string-append rodalerfu))))
500
501(define (KEhE . rodalerfu)
502  `(cmavo (KEhE ,(apply string-append rodalerfu))))
503
504(define (KEI . rodalerfu)
505  `(cmavo (KEI ,(apply string-append rodalerfu))))
506
507(define (KI . rodalerfu)
508  `(cmavo (KI ,(apply string-append rodalerfu))))
509
510(define (KOhA . rodalerfu)
511  `(cmavo (KOhA ,(apply string-append rodalerfu))))
512
513(define (KU . rodalerfu)
514  `(cmavo (KU ,(apply string-append rodalerfu))))
515
516(define (KUhE . rodalerfu)
517  `(cmavo (KUhE ,(apply string-append rodalerfu))))
518
519(define (KUhO . rodalerfu)
520  `(cmavo (KUhO ,(apply string-append rodalerfu))))
521
522(define (LA . rodalerfu)
523  `(cmavo (LA ,(apply string-append rodalerfu))))
524
525(define (LAU . rodalerfu)
526  `(cmavo (LAU ,(apply string-append rodalerfu))))
527
528(define (LAhE . rodalerfu)
529  `(cmavo (LAhE ,(apply string-append rodalerfu))))
530
531(define (LE . rodalerfu)
532  `(cmavo (LE ,(apply string-append rodalerfu))))
533
534(define (LEhU . rodalerfu)
535  `(cmavo (LEhU ,(apply string-append rodalerfu))))
536
537(define (LI . rodalerfu)
538  `(cmavo (LI ,(apply string-append rodalerfu))))
539
540(define (LIhU . rodalerfu)
541  `(cmavo (LIhU ,(apply string-append rodalerfu))))
542
543(define (LOhO . rodalerfu)
544  `(cmavo (LOhO ,(apply string-append rodalerfu))))
545
546(define (LOhU . rodalerfu)
547  `(cmavo (LOhU ,(apply string-append rodalerfu))))
548
549(define (LU . rodalerfu)
550  `(cmavo (LU ,(apply string-append rodalerfu))))
551
552(define (LUhU . rodalerfu)
553  `(cmavo (LUhU ,(apply string-append rodalerfu))))
554
555(define (MAhO . rodalerfu)
556  `(cmavo (MAhO ,(apply string-append rodalerfu))))
557
558(define (MAI . rodalerfu)
559  `(cmavo (MAI ,(apply string-append rodalerfu))))
560
561(define (ME . rodalerfu)
562  `(cmavo (ME ,(apply string-append rodalerfu))))
563
564(define (MEhU . rodalerfu)
565  `(cmavo (MEhU ,(apply string-append rodalerfu))))
566
567(define (MOhE . rodalerfu)
568  `(cmavo (MOhE ,(apply string-append rodalerfu))))
569
570(define (MOhI . rodalerfu)
571  `(cmavo (MOhI ,(apply string-append rodalerfu))))
572
573(define (MOI . rodalerfu)
574  `(cmavo (MOI ,(apply string-append rodalerfu))))
575
576(define (NA . rodalerfu)
577  `(cmavo (NA ,(apply string-append rodalerfu))))
578
579(define (NAI . rodalerfu)
580  `(cmavo (NAI ,(apply string-append rodalerfu))))
581
582(define (NAhE . rodalerfu)
583  `(cmavo (NAhE ,(apply string-append rodalerfu))))
584
585(define (NAhU . rodalerfu)
586  `(cmavo (NAhU ,(apply string-append rodalerfu))))
587
588(define (NIhE . rodalerfu)
589  `(cmavo (NIhE ,(apply string-append rodalerfu))))
590
591(define (NIhO . rodalerfu)
592  `(cmavo (NIhO ,(apply string-append rodalerfu))))
593
594(define (NOI . rodalerfu)
595  `(cmavo (NOI ,(apply string-append rodalerfu))))
596
597(define (NU . rodalerfu)
598  `(cmavo (NU ,(apply string-append rodalerfu))))
599
600(define (NUhA . rodalerfu)
601  `(cmavo (NUhA ,(apply string-append rodalerfu))))
602
603(define (NUhI . rodalerfu)
604  `(cmavo (NUhI ,(apply string-append rodalerfu))))
605
606(define (NUhU . rodalerfu)
607  `(cmavo (NUhU ,(apply string-append rodalerfu))))
608
609(define (PA . rodalerfu)
610  `(cmavo (PA ,(apply string-append rodalerfu))))
611
612(define (PEhE . rodalerfu)
613  `(cmavo (PEhE ,(apply string-append rodalerfu))))
614
615(define (PEhO . rodalerfu)
616  `(cmavo (PEhO ,(apply string-append rodalerfu))))
617
618(define (PU . rodalerfu)
619  `(cmavo (PU ,(apply string-append rodalerfu))))
620
621(define (RAhO . rodalerfu)
622  `(cmavo (RAhO ,(apply string-append rodalerfu))))
623
624(define (ROI . rodalerfu)
625  `(cmavo (ROI ,(apply string-append rodalerfu))))
626
627(define (SA . rodalerfu)
628  `(cmavo (SA ,(apply string-append rodalerfu))))
629
630(define (SE . rodalerfu)
631  `(cmavo (SE ,(apply string-append rodalerfu))))
632
633(define (SEI . rodalerfu)
634  `(cmavo (SEI ,(apply string-append rodalerfu))))
635
636(define (SEhU . rodalerfu)
637  `(cmavo (SEhU ,(apply string-append rodalerfu))))
638
639(define (SI . rodalerfu)
640  `(cmavo (SI ,(apply string-append rodalerfu))))
641
642(define (SOI . rodalerfu)
643  `(cmavo (SOI ,(apply string-append rodalerfu))))
644
645(define (SU . rodalerfu)
646  `(cmavo (SU ,(apply string-append rodalerfu))))
647
648(define (TAhE . rodalerfu)
649  `(cmavo (TAhE ,(apply string-append rodalerfu))))
650
651(define (TEhU . rodalerfu)
652  `(cmavo (TEhU ,(apply string-append rodalerfu))))
653
654(define (TEI . rodalerfu)
655  `(cmavo (TEI ,(apply string-append rodalerfu))))
656
657(define (TO . rodalerfu)
658  `(cmavo (TO ,(apply string-append rodalerfu))))
659
660(define (TOI . rodalerfu)
661  `(cmavo (TOI ,(apply string-append rodalerfu))))
662
663(define (TUhE . rodalerfu)
664  `(cmavo (TUhE ,(apply string-append rodalerfu))))
665
666(define (TUhU . rodalerfu)
667  `(cmavo (TUhU ,(apply string-append rodalerfu))))
668
669(define (UI . rodalerfu)
670  `(cmavo (UI ,(apply string-append rodalerfu))))
671
672(define (VA . rodalerfu)
673  `(cmavo (VA ,(apply string-append rodalerfu))))
674
675(define (VAU . rodalerfu)
676  `(cmavo (VAU ,(apply string-append rodalerfu))))
677
678(define (VEI . rodalerfu)
679  `(cmavo (VEI ,(apply string-append rodalerfu))))
680
681(define (VEhO . rodalerfu)
682  `(cmavo (VEhO ,(apply string-append rodalerfu))))
683
684(define (VEhA . rodalerfu)
685  `(cmavo (VEhA ,(apply string-append rodalerfu))))
686
687(define (VIhA . rodalerfu)
688  `(cmavo (VIhA ,(apply string-append rodalerfu))))
689
690(define (VUhO . rodalerfu)
691  `(cmavo (VUhO ,(apply string-append rodalerfu))))
692
693(define (VUhU . rodalerfu)
694  `(cmavo (VUhU ,(apply string-append rodalerfu))))
695
696(define (XI . rodalerfu)
697  `(cmavo (XI ,(apply string-append rodalerfu))))
698
699(define (Y rodalerfu)
700  `(cmavo (Y ,(apply string-append rodalerfu))))
701
702(define (ZAhO . rodalerfu)
703  `(cmavo (ZAhO ,(apply string-append rodalerfu))))
704
705(define (ZEhA . rodalerfu)
706  `(cmavo (ZEhA ,(apply string-append rodalerfu))))
707
708(define (ZEI . rodalerfu)
709  `(cmavo (ZEI ,(apply string-append rodalerfu))))
710
711(define (ZI . rodalerfu)
712  `(cmavo (ZI ,(apply string-append rodalerfu))))
713
714(define (ZIhE . rodalerfu)
715  `(cmavo (ZIhE ,(apply string-append rodalerfu))))
716
717(define (ZO . rodalerfu)
718  `(cmavo (ZO ,(apply string-append rodalerfu))))
719
720(define (ZOI . rodalerfu)
721  `(cmavo (ZOI ,(apply string-append rodalerfu))))
722
723(define (ZOhU . rodalerfu)
724  `(cmavo (ZOhU ,(apply string-append rodalerfu))))
725
726
727;;;
728;;; gerna
729;;;
730
731(define (text intro-null
732              NAI-clause*
733              text-part-2
734              joik-jek?
735              text-1?
736              faho-clause
737              EOF?)
738  `(text
739    ,@intro-null
740    ,@(*-null NAI-clause*)
741    ,@text-part-2
742    ,@(?-null joik-jek?)
743    ,@(?*-null text-1?)
744    ,@faho-clause
745    ,@(?*-null EOF?)))
746
747(define (intro-null su-clause* intro-si-clause)
748  `(,@(*-null su-clause*) ,@intro-si-clause))
749
750; |text-part| is either |CMENE-clause+| or |indicators?|
751; |?-null| handles |CMENE-clause+|
752;
753(define (text-part-2 text-part free*)
754  `(,@(?-null text-part) ,@(*-null free*)))
755
756(define (intro-si-clause si-clause? SI-clause*)
757  `(,@(?-null si-clause?) ,@(*-null SI-clause*)))
758
759(define (faho-clause FAhO-clause?)
760  (?-null FAhO-clause?))
761
762(define (text-1-I I-clause
763                  jek-or-joik?
764                  stag?
765                  BO-clause?
766                  free*
767                  text-1?)
768  `(,I-clause
769    ,@(?-null jek-or-joik?)
770    ,@(?-null stag?)
771    ,@(?-null BO-clause?)
772    ,@(*-null free*)
773    ,@(?*-null text-1?)))
774
775(define (text-1-NIhO NIhO-clause+ free* su-clause* paragraphs?)
776  `(,@(+-null NIhO-clause+)
777    ,@(*-null free*)
778    ,@(*-null su-clause*)
779    ,@(?*-null paragraphs?)))
780
781(define (text-1-paragraphs paragraphs)
782  `(,paragraphs))
783
784;; NIhO-clause? is: ( NIhO-clause+ free* su-clause* paragraphs )?
785;; ?-null handles + and *.
786;;
787(define (paragraphs paragraph NIhO-clause+ free* su-clause* paragraphs-0)
788  `(paragraphs
789    ,@paragraph
790    ,@(?*-null NIhO-clause+)
791    ,@(?*-null free*)
792    ,@(?*-null su-clause*)
793    ,@(?*-null paragraphs-0)))
794
795(define (paragraph statement-or-fragment I-clause*)
796  (define (I I-clause free* statement-or-fragment?)
797    ;
798    ; statement-or-fragment? uses ?*-null, rather than ?-null,
799    ; because an extra list is created in |statement|.  This
800    ; normalizes it to the same list structure everywhere it
801    ; is used.
802    ;
803    `(,@I-clause ,@(*-null free*) ,@(?*-null statement-or-fragment?)))
804
805  `((paragraph ,@statement-or-fragment ,@(map-apply I I-clause*))))
806
807(define (statement statement-1)
808  `(,statement-1))
809
810(define (statement-prenex prenex statement-1)
811  `(,prenex ,statement-1))
812
813(define (statement-1 statement-2 I-clause*)
814  (define (I I-clause joik-jek statement-2?)
815    `(,@I-clause ,@joik-jek ,@(?-null statement-2?)))
816
817  `(,@statement-2 ,@(map-apply I I-clause*)))
818
819(define (statement-2 statement-3
820                     I-clause?
821                     jek-or-joik?
822                     stag?
823                     BO-clause?
824                     free*
825                     statement-2?)
826  `(,@statement-3
827    ,@(?-null I-clause?)
828    ,@(?-null jek-or-joik?)
829    ,@(?-null stag?)
830    ,@(?-null BO-clause?)
831    ,@(?*-null free*)
832    ,@(?-null statement-2?)))
833
834(define (statement-3 sentence)
835  sentence)
836
837(define (statement-3-TUhE tag? TUhE-clause free* text-1 TUhU-clause? free*)
838  `(,@(?-null tag?)
839    ,@TUhE-clause
840    ,@(*-null free*)
841    ,@text-1
842    ,@(?-null TUhU-clause?)
843    ,@(*-null free*)))
844
845(define (fragment-prenex prenex)
846  prenex)
847
848(define (fragment-terms terms VAU-clause? free*)
849  `(,@(+-null terms) ,@(?-null VAU-clause?) ,@(*-null free*)))
850
851(define (fragment-ek ek free*)
852  `(,@ek ,@(*-null free*)))
853
854(define (fragment-gihek gihek free*)
855  `(,@gihek ,@(*-null free*)))
856
857(define (fragment-quantifier quantifier)
858  quantifier)
859
860(define (fragment-NA NA-clause free*)
861  `(,@NA-clause ,@(*-null free*)))
862
863(define (fragment-relative-clauses relative-clauses)
864  relative-clauses)
865
866(define (fragment-links links)
867  links)
868
869(define (fragment-linkargs linkargs)
870  linkargs)
871
872(define (prenex . rodasumti)
873  `(prenex ,@rodasumti))
874
875(define (sentence terms?
876                  bridi-tail-sa?*
877                  CU-clause?
878                  free?*
879                  bridi-tail-sa*
880                  bridi-tail)
881  `(sentence ,@(?+-null terms?)
882             ,@(?*-null bridi-tail-sa?*)
883             ,@(?-null CU-clause?)
884             ,@(?*-null free?*)
885             ,@(*-null bridi-tail-sa*)
886             ,@bridi-tail))
887
888
889(define (sentence-sa sentence-start sa-word* SA-clause)
890  `(sa-clause
891    ,@sentence-start
892    ,@(apply append (*-null sa-word*))
893    ,@SA-clause))
894
895(define (sentence-start-I I-pre)
896  I-pre)
897
898(define (sentence-start-NIhO NIhO-pre)
899  NIhO-pre)
900
901(define (subsentence sentence)
902  sentence)
903
904(define (subsentence-prenex prenex subsentence)
905  `(,@prenex ,@subsentence))
906
907(define (bridi-tail bridi-tail-1
908                    gihek?
909                    stag?
910                    KE-clause?
911                    free-0?*
912                    bridi-tail?
913                    KEhE-clause?
914                    free-1?*
915                    tail-terms?)
916  `(,@bridi-tail-1
917    ,@(?-null gihek?)
918    ,@(?-null stag?)
919    ,@(?-null KE-clause?)
920    ,@(?*-null free-0?*)
921    ,@(?-null bridi-tail?)
922    ,@(?-null KEhE-clause?)
923    ,@(?*-null free-1?*)
924    ,@(?-null tail-terms?)))
925
926
927(define (bridi-tail-sa . rodasumti)
928  `(bridi-tail-sa ,@rodasumti))
929
930
931(define (bridi-tail-start-ME ME-clause)
932  ME-clause)
933
934(define (bridi-tail-start-NUhA NUhA-clause)
935  NUhA-clause)
936
937(define (bridi-tail-start-NU NU-clause)
938  NU-clause)
939
940(define (bridi-tail-start-NA NA-clause)
941  NA-clause)
942
943(define (bridi-tail-start-NAhE NAhE-clause)
944  NAhE-clause)
945
946(define (bridi-tail-start-selbri selbri)
947  selbri)
948
949(define (bridi-tail-start-tag tag bridi-tail-start)
950  `(,@tag ,@bridi-tail-start))
951
952(define (bridi-tail-start-KE KE-clause bridi-tail-start)
953  `(,@KE-clause ,@bridi-tail-start))
954
955(define (bridi-tail-start bridi-tail)
956  bridi-tail)
957
958
959(define (bridi-tail-1 bridi-tail-2 rest*)
960  (define (rest gihek free* bridi-tail-2 tail-terms)
961    `(,@gihek ,@(*-null free*) ,@bridi-tail-2 ,@tail-terms))
962
963  `(,@bridi-tail-2 ,@(map-apply rest rest*)))
964
965(define (bridi-tail-2 bridi-tail-3
966                      gihek?
967                      stag?
968                      BO-clause?
969                      free?*
970                      bridi-tail-2?
971                      tail-terms?)
972  `(,@bridi-tail-3
973    ,@(?-null gihek?)
974    ,@(?-null stag?)
975    ,@(?-null BO-clause?)
976    ,@(?*-null free?*)
977    ,@(?-null bridi-tail-2?)
978    ,@(?-null tail-terms?)))
979
980
981(define (bridi-tail-3-selbri selbri tail-terms)
982  `(,@selbri ,@tail-terms))
983
984(define (bridi-tail-3-gek gek-sentence)
985  gek-sentence)
986
987
988(define (gek-sentence . rodasumti)
989  `(gek-sentence ,@rodasumti))
990
991(define (gek-sentence-KE . rodasumti)
992  `(gek-sentence-KE ,@rodasumti))
993
994(define (gek-sentence-NA . rodasumti)
995  `(gek-sentence-NA ,@rodasumti))
996
997
998(define (tail-terms terms? VAU-clause? free*)
999  `(,@(?+-null terms?) ,@(?-null VAU-clause?) ,@(*-null free*)))
1000
1001
1002(define (terms terms-1+)
1003  terms-1+)
1004
1005(define (terms-1 terms-2 rest*)
1006  (define (terms pehe-sa* PEhE-clause free* joik-jek terms-2)
1007    `(,@terms
1008      ,@(*-null pehe-sa*)
1009      ,@PEhE-clause
1010      ,@(*-null free*)
1011      ,@joik-jek
1012      ,@terms-2))
1013
1014  `(,@terms-2 ,@(map-apply terms rest*)))
1015
1016(define (terms-2 term rest*)
1017  (define (terms cehe-sa* CEhE-clause free* term )
1018    `(,@(*-null cehe-sa*) ,@CEhE-clause ,@(*-null free*) ,@term))
1019
1020  `(,@term ,@(map-apply terms rest*)))
1021
1022
1023(define (pehe-sa PEhE-clause sa-word* SA-clause)
1024  `(,@PEhE-clause ,@(*-null sa-word*) ,@SA-clause))
1025
1026(define (cehe-sa CEhE-clause sa-word* SA-clause)
1027  `(,@CEhE-clause ,@(*-null sa-word*) ,@SA-clause))
1028
1029
1030(define (term term-sa* term-1)
1031  `(term ,@(*-null term-sa*) ,@term-1))
1032
1033
1034(define (term-1-sumti sumti)
1035  sumti)
1036
1037(define (term-1-FA tag-or-FA sumti-or-KU)
1038  `(,@tag-or-FA ,@sumti-or-KU))
1039
1040(define (term-1-FA-tag tag)
1041  tag)
1042
1043(define (term-1-FA-clause FA-clause free*)
1044  `(,FA-clause ,@(*-null free*)))
1045
1046(define (term-1-FA-sumti sumti)
1047  sumti)
1048
1049(define (term-1-FA-KU KU-clause? free*)
1050  `(,@(?-null KU-clause?) ,@(*-null free*)))
1051
1052(define (term-1-termset termset)
1053  termset)
1054
1055(define (term-1-NA NA-clause KU-clause free*)
1056  `(,NA-clause ,KU-clause ,@(*-null free*)))
1057
1058
1059(define (term-sa term-start sa-word* SA-clause)
1060  `(sa-clause ,@term-start ,@(*-null sa-word*) ,@SA-clause))
1061
1062
1063(define (term-start term-1)
1064  term-1)
1065
1066(define (term-start-LA LA-clause)
1067  LA-clause)
1068
1069(define (term-start-LE LE-clause)
1070  LE-clause)
1071
1072(define (term-start-LI LI-clause)
1073  LI-clause)
1074
1075(define (term-start-LU LU-clause)
1076  LU-clause)
1077
1078(define (term-start-LAhE LAhE-clause)
1079  LAhE-clause)
1080
1081(define (term-start-quantifier quantifier term-start)
1082  `(,@quantifier ,@term-start))
1083
1084(define (term-start-gek gek sumti gik)
1085  `(,@gek ,@sumti ,@gik))
1086
1087(define (term-start-FA FA-clause)
1088  FA-clause)
1089
1090(define (term-start-tag tag term-start)
1091  `(,@tag ,@term-start))
1092
1093
1094(define (termset . rodasumti)
1095  `(termset ,@rodasumti))
1096
1097(define (termset-gek . rodasumti)
1098  `(termset-gek ,@rodasumti))
1099
1100
1101
1102(define (terms-gik-terms . rodasumti)
1103  `(terms-gik-terms ,@rodasumti))
1104
1105(define (gek-termset . rodasumti)
1106  `(gek-termset ,@rodasumti))
1107
1108(define (termset-terms . rodasumti)
1109  `(termset-terms ,@rodasumti))
1110
1111
1112(define (sumti sumti-1 VUhO-clause? free* relative-clauses?)
1113  `((sumti ,@sumti-1
1114           ,@(?-null VUhO-clause?)
1115           ,@(?*-null free*)
1116           ,@(?-null relative-clauses?))))
1117
1118(define (sumti-1 sumti-2
1119                 joik-ek?
1120                 stag?
1121                 KE-clause?
1122                 free-0*
1123                 sumti?
1124                 KEhE-clause?
1125                 free-1*)
1126  `(,@sumti-2
1127    ,@(?-null joik-ek?)
1128    ,@(?-null stag?)
1129    ,@(?-null KE-clause?)
1130    ,@(?*-null free-0*)
1131    ,@(?-null sumti?)
1132    ,@(?-null KEhE-clause?)
1133    ,@(?*-null free-1*)))
1134
1135(define (sumti-2 sumti-3 joik-ek-sumti-3*)
1136  (define (sumti joik-ek sumti-3)
1137    `(,@joik-ek ,@sumti-3))
1138
1139  `(,@sumti-3 ,@(map-apply sumti joik-ek-sumti-3*)))
1140
1141(define (sumti-3 sumti-4 joik-ek? stag? BO-clause? free* sumti-3?)
1142  `(,@sumti-4
1143    ,@(?-null joik-ek?)
1144    ,@(?-null stag?)
1145    ,@(?-null BO-clause?)
1146    ,@(?*-null free*)
1147    ,@(?-null sumti-3?)))
1148
1149(define (sumti-4 sumti-5)
1150  sumti-5)
1151
1152(define (sumti-4-gek . rodasumti)
1153  `(sumti-4-gek ,@rodasumti))
1154
1155(define (sumti-5 quantifier? sumti-6 relative-clauses?)
1156  `(,@(?-null quantifier?) ,sumti-6 ,@(?-null relative-clauses?)))
1157
1158(define (sumti-5-selbri quantifier selbri KU-clause? free* relative-clauses?)
1159  `(,@quantifier
1160    ,@selbri
1161    ,@(?-null KU-clause?)
1162    ,@(*-null free*)
1163    ,@(?-null relative-clauses?)))
1164
1165(define (sumti-6-ZO ZO-clause free*)
1166  `(,@ZO-clause ,@(*-null free*)))
1167
1168(define (sumti-6-ZOI ZOI-clause free*)
1169  `(,@ZOI-clause ,@(*-null free*)))
1170
1171(define (sumti-6-LOhU LOhU-clause free*)
1172  `(,@LOhU-clause ,@(*-null free*)))
1173
1174(define (sumti-6-BOI lerfu-string BOI-clause? free*)
1175  `(,@lerfu-string ,@(?-null BOI-clause?) ,@(*-null free*)))
1176
1177(define (sumti-6-LU LU-clause text LIhU-clause? free*)
1178  `(,@LU-clause ,text ,@(?-null LIhU-clause?) ,@(*-null free*)))
1179
1180(define (sumti-6-LAhE-clause LAhE-clause free*)
1181  `(,@LAhE-clause ,@(*-null free*)))
1182
1183(define (sumti-6-LAhE-NAhE NAhE-clause BO-clause free*)
1184  `(,@NAhE-clause ,@BO-clause ,@(*-null free*)))
1185
1186(define (sumti-6-LAhE clause relative-clauses? sumti LUhU-clause? free*)
1187  `(,@clause
1188    ,@(?-null relative-clauses?)
1189    ,@sumti
1190    ,@(?-null LUhU-clause?)
1191    ,@(*-null free*)))
1192
1193(define (sumti-6-KOhA KOhA-clause free*)
1194  `(,@KOhA-clause ,@(*-null free*)))
1195
1196(define (sumti-6-LA LA-clause
1197                    free-0*
1198                    relative-clauses?
1199                    CMENE-clause+
1200                    free-1*)
1201  `(,@LA-clause
1202    ,@(*-null free-0*)
1203    ,@(?-null relative-clauses?)
1204    ,@CMENE-clause+
1205    ,@(*-null free-1*)))
1206
1207(define (sumti-6-LE LA-or-LE-clause
1208                    free-0*
1209                    sumti-tail
1210                    KU-clause?
1211                    free-1*)
1212  `(,@LA-or-LE-clause
1213    ,@(*-null free-0*)
1214    ,@sumti-tail
1215    ,@(?-null KU-clause?)
1216    ,@(*-null free-1*)))
1217
1218(define (sumti-6-LI LI-clause
1219                    free-0*
1220                    mex
1221                    LOhO-clause?
1222                    free-1*)
1223  `(,@LI-clause
1224    ,@(*-null free-0*)
1225    ,@mex
1226    ,@(?-null LOhO-clause?)
1227    ,@(*-null free-1*)))
1228
1229(define (sumti-tail-sumti-6 sumti-6? relative-clauses? sumti-tail-1)
1230  `(,@(?-null sumti-6?) ,@(?-null relative-clauses?) ,@sumti-tail-1))
1231
1232(define (sumti-tail relative-clauses sumti-tail-1)
1233  `(,@relative-clauses ,@sumti-tail-1))
1234
1235(define (sumti-tail-1-selbri quantifier? selbri relative-clauses?)
1236  `(,@(?-null quantifier?) ,@selbri ,@(?-null relative-clauses?)))
1237
1238(define (sumti-tail-1-sumti quantifier sumti)
1239  `(,@quantifier ,@sumti))
1240
1241(define (relative-clauses relative-clause rest*)
1242  (define (relative-clause* ZIhE-clause free* relative-clause)
1243    `(,@ZIhE-clause ,@(*-null free*) ,@relative-clause))
1244
1245  `(,@relative-clause ,@(map-apply relative-clause* rest*)))
1246
1247(define (relative-clause relative-clause-sa* relative-clause-1)
1248  `(,@relative-clause-sa* ,@relative-clause-1))
1249
1250(define (relative-clause-sa relative-clause-start sa-word* SA-clause)
1251  `(sa-clause ,@relative-clause-start ,@(*-null sa-word*) ,@SA-clause))
1252
1253(define (relative-clause-1-GOI GOI-clause
1254                               free-0*
1255                               term
1256                               GEhU-clause?
1257                               free-1*)
1258  `(,@GOI-clause
1259    ,@(*-null free-0*)
1260    ,term
1261    ,@(?-null GEhU-clause?)
1262    ,@(*-null free-1*)))
1263
1264(define (relative-clause-1-NOI NOI-clause
1265                           free-0*
1266                           subsentence
1267                           KUhO-clause?
1268                           free-1*)
1269  `(,@NOI-clause
1270    ,@(*-null free-0*)
1271    ,subsentence
1272    ,@(?-null KUhO-clause?)
1273    ,@(*-null free-1*)))
1274
1275(define (relative-clause-start . rodasumti)
1276  `(relative-clause-start ,@rodasumti))
1277
1278
1279(define (selbri tag? selbri-1)
1280  `((selbri ,@(?-null tag?) ,@selbri-1)))
1281
1282(define (selbri-1 selbri-2)
1283  selbri-2)
1284
1285(define (selbri-1-NA NA-clause free* selbri)
1286  `((,@NA-clause ,@(*-null free*) ,@selbri)))
1287
1288(define (selbri-2 selbri-3 CO-clause? free?* selbri-2?)
1289  `(,@selbri-3
1290    ,@(?-null CO-clause?)
1291    ,@(?*-null free?*)
1292    ,@(?-null selbri-2?)))
1293
1294(define (selbri-3 selbri-4+)
1295  selbri-4+)
1296
1297(define (selbri-4 selbri-5 rest)
1298  `(,@selbri-5 ,@rest))
1299
1300(define (selbri-4-joik-jek joik-jek selbri-5)
1301  `(,@joik-jek ,@selbri-5))
1302
1303(define (selbri-4-joik joik
1304                       stag?
1305                       KE-clause
1306                       free-0*
1307                       selbri-3
1308                       KEhE-clause?
1309                       free-1*)
1310  `(,@joik
1311    ,@(?-null stag?)
1312    ,@KE-clause
1313    ,@(*-null free-0*)
1314    ,@selbri-3
1315    ,@(?-null KEhE-clause?)
1316    ,@(*-null free-1*)))
1317
1318
1319(define (selbri-5 selbri-6 jek-or-joik? stag? BO-clause? free?* selbri-5?)
1320  `(,@selbri-6
1321    ,@(?-null jek-or-joik?)
1322    ,@(?-null stag?)
1323    ,@(?-null BO-clause?)
1324    ,@(?*-null free?*)
1325    ,@(?-null selbri-5?)))
1326
1327(define (selbri-6 tanru-unit BO-clause? free?* selbri-6?)
1328  `(,@tanru-unit
1329    ,@(?-null BO-clause?)
1330    ,@(?*-null free?*)
1331    ,@(?-null selbri-6?)))
1332
1333(define (selbri-6-NAhE NAhE-clause? free* guhek selbri gik selbri-6)
1334  `(,@(?-null NAhE-clause?)
1335    ,@(*-null free*)
1336    ,@guhek
1337    ,@selbri
1338    ,@gik
1339    ,@selbri-6))
1340
1341
1342(define (tanru-unit tanru-unit-1 rest*)
1343  (define (rest CEI-clause free* tanru-unit-1)
1344    `(,@CEI-clause ,@(*-null free*) ,@tanru-unit-1))
1345
1346  `(,@tanru-unit-1 ,@(map-apply rest rest*)))
1347
1348(define (tanru-unit-1 tanru-unit-2 linkargs?)
1349  `(,@tanru-unit-2 ,@(?-null linkargs?)))
1350
1351
1352(define (tanru-unit-2-BRIVLA BRIVLA-clause free*)
1353  `(,@BRIVLA-clause ,@(*-null free*)))
1354
1355(define (tanru-unit-2-GOhA GOhA-clause RAhO-clause? free*)
1356  `(,@GOhA-clause ,@(?-null RAhO-clause?) ,@(*-null free*)))
1357
1358(define (tanru-unit-2-KE KE-clause
1359                         free-0*
1360                         selbri-3
1361                         KEhE-clause?
1362                         free-1*)
1363  `(,@KE-clause
1364    ,@(*-null free-0*)
1365    ,@selbri-3
1366    ,@(?-null KEhE-clause?)
1367    ,@(*-null free-1*)))
1368
1369(define (tanru-unit-2-ME ME-clause
1370                         free-0*
1371                         sumti-or-lerfu-string
1372                         MEhU-clause?
1373                         free-1*
1374                         MOI-clause?
1375                         free-2*)
1376  `(,@ME-clause
1377    ,@(*-null free-0*)
1378    ,@sumti-or-lerfu-string
1379    ,@(?-null MEhU-clause?)
1380    ,@(*-null free-1*)
1381    ,@(?-null MOI-clause?)
1382    ,@(*-null free-2*)))
1383
1384(define (tanru-unit-2-MOI number-or-lerfu-string MOI-clause free*)
1385  `(,@number-or-lerfu-string ,@MOI-clause ,@(*-null free*)))
1386
1387(define (tanru-unit-2-NUhA NUhA-clause free* mex-operator)
1388  `(,@NUhA-clause ,@(*-null free*) ,@mex-operator))
1389
1390(define (tanru-unit-2-SE SE-clause free* tanru-unit-2)
1391  `(,@SE-clause ,@(*-null free*) ,tanru-unit-2))
1392
1393(define (tanru-unit-2-JAI JAI-clause free* tag? tanru-unit-2)
1394  `(,@JAI-clause ,@(*-null free*) ,@(?-null tag?) ,tanru-unit-2))
1395
1396(define (tanru-unit-2-NAhE NAhE-clause free* tanru-unit-2)
1397  `(,@NAhE-clause ,@(*-null free*) ,tanru-unit-2))
1398
1399(define (tanru-unit-2-NU NU-clause
1400                         NAI-clause?
1401                         free-0*
1402                         joik-jek-NU*
1403                         subsentence
1404                         KEI-clause?
1405                         free-1*)
1406  (define (joik-jek-NU joik-jek NU-clause NAI-clause? free*)
1407    `(,@joik-jek ,@NU-clause ,@(?-null NAI-clause?) ,@(*-null free*)))
1408
1409  `(,@NU-clause
1410    ,@(?-null NAI-clause?)
1411    ,@(*-null free-0*)
1412    ,@(map-apply joik-jek-NU joik-jek-NU*)
1413    ,subsentence
1414    ,@(?-null KEI-clause?)
1415    ,@(*-null free-1*)))
1416
1417
1418(define (linkargs linkargs-sa* linkargs-1)
1419  `(,@(*-null linkargs-sa*) ,@linkargs-1))
1420
1421(define (linkargs-1 BE-clause free* term links? BEhO-clause? free*)
1422  `(,@BE-clause
1423    ,@(*-null free*)
1424    ,term
1425    ,@(?-null links?)
1426    ,@(?-null BEhO-clause?)
1427    ,@(*-null free*)))
1428
1429(define (linkargs-sa linkargs-start sa-word* SA-clause)
1430  `(sa-clause ,@linkargs-start ,@(*-null sa-word*) ,@SA-clause))
1431
1432(define (linkargs-start BE-clause)
1433  BE-clause)
1434
1435(define (links links-sa* links-1)
1436  `(,@(*-null links-sa*) ,@links-1))
1437
1438(define (links-sa links-start sa-word* SA-clause)
1439  `(sa-clause ,@links-start ,@(*-null sa-word*) ,@SA-clause))
1440
1441(define (links-1 BEI-clause free* term links?)
1442  `(,@BEI-clause ,@(*-null free*) ,@term ,@(?-null links?)))
1443
1444(define (links-start BEI-clause)
1445  BEI-clause)
1446
1447(define (quantifier-BOI number BOI-clause? free*)
1448  `(,number ,@(?-null BOI-clause?) ,@(*-null free*)))
1449
1450(define (quantifier-VEI VEI-clause free-0* mex VEhO-clause? free-1*)
1451  `(,@VEI-clause
1452    ,@(*-null free-0*)
1453    ,@mex
1454    ,@(?-null VEhO-clause?)
1455    ,@(*-null free-1*)))
1456
1457(define (mex . rodasumti)
1458  `(mex ,@rodasumti))
1459
1460(define (mex-sa . rodasumti)
1461  `(mex-sa ,@rodasumti))
1462
1463(define (mex-0 . rodasumti)
1464  `(mex-0 ,@rodasumti))
1465
1466(define (mex-0-rp . rodasumti)
1467  `(mex-0-rp ,@rodasumti))
1468
1469(define (mex-start-FUhA . rodasumti)
1470  `(mex-start-FUhA ,@rodasumti))
1471
1472(define (mex-start-PEhO . rodasumti)
1473  `(mex-start-PEhO ,@rodasumti))
1474
1475(define (mex-start . rodasumti)
1476  `(mex-start ,@rodasumti))
1477
1478(define (rp-clause . rodasumti)
1479  `(rp-clause ,@rodasumti))
1480
1481(define (mex-1 . rodasumti)
1482  `(mex-1 ,@rodasumti))
1483
1484(define (mex-2 . rodasumti)
1485  `(mex-2 ,@rodasumti))
1486
1487(define (mex-forethought . rodasumti)
1488  `(mex-forethought ,@rodasumti))
1489
1490(define (fore-operands . rodasumti)
1491  `(fore-operands ,@rodasumti))
1492
1493(define (rp-expression . rodasumti)
1494  `(rp-expression ,@rodasumti))
1495
1496(define (rp-expression-tail . rodasumti)
1497  `(rp-expression-tail ,@rodasumti))
1498
1499(define (operator . rodasumti)
1500  `(operator ,@rodasumti))
1501
1502(define (operator-0 . rodasumti)
1503  `(operator-0 ,@rodasumti))
1504
1505(define (operator-0-joik-jek . rodasumti)
1506  `(operator-0-joik-jek ,@rodasumti))
1507
1508(define (operator-0-joik . rodasumti)
1509  `(operator-0-joik ,@rodasumti))
1510
1511(define (operator-sa . rodasumti)
1512  `(operator-sa ,@rodasumti))
1513
1514(define (operator-start . rodasumti)
1515  `(operator-start ,@rodasumti))
1516
1517(define (operator-start-KE . rodasumti)
1518  `(operator-start-KE ,@rodasumti))
1519
1520(define (operator-start-NAhE . rodasumti)
1521  `(operator-start-NAhE ,@rodasumti))
1522
1523(define (operator-start-MAhO . rodasumti)
1524  `(operator-start-MAhO ,@rodasumti))
1525
1526(define (operator-start-VUhU . rodasumti)
1527  `(operator-start-VUhU ,@rodasumti))
1528
1529(define (operator-1 . rodasumti)
1530  `(operator-1 ,@rodasumti))
1531
1532(define (operator-gukek . rodasumti)
1533  `(operator-gukek ,@rodasumti))
1534
1535(define (operator-jek . rodasumti)
1536  `(operator-jek ,@rodasumti))
1537
1538(define (operator-2 . rodasumti)
1539  `(operator-2 ,@rodasumti))
1540
1541(define (operator-2-KE . rodasumti)
1542  `(operator-2-KE ,@rodasumti))
1543
1544(define (mex-operator . rodasumti)
1545  `(mex-operator ,@rodasumti))
1546
1547(define (mex-operator-NAhE . rodasumti)
1548  `(mex-operator-NAhE ,@rodasumti))
1549
1550(define (mex-operator-MAhO . rodasumti)
1551  `(mex-operator-MAhO ,@rodasumti))
1552
1553(define (mex-operator-NAhU . rodasumti)
1554  `(mex-operator-NAhU ,@rodasumti))
1555
1556(define (mex-operator-VUhU . rodasumti)
1557  `(mex-operator-VUhU ,@rodasumti))
1558
1559(define (operand . rodasumti)
1560  `(operand ,@rodasumti))
1561
1562(define (operand-sa . rodasumti)
1563  `(operand-sa ,@rodasumti))
1564
1565(define (operand-0 . rodasumti)
1566  `(operand-0 ,@rodasumti))
1567
1568(define (operand-start-quantifier . rodasumti)
1569  `(operand-start-quantifier ,@rodasumti))
1570
1571(define (operand-start-lerfu-word . rodasumti)
1572  `(operand-start-lerfu-word ,@rodasumti))
1573
1574(define (operand-start-NIhE . rodasumti)
1575  `(operand-start-NIhE ,@rodasumti))
1576
1577(define (operand-start-MOhE . rodasumti)
1578  `(operand-start-MOhE ,@rodasumti))
1579
1580(define (operand-start-JOhI . rodasumti)
1581  `(operand-start-JOhI ,@rodasumti))
1582
1583(define (operand-start-gek . rodasumti)
1584  `(operand-start-gek ,@rodasumti))
1585
1586(define (operand-start-LAhE . rodasumti)
1587  `(operand-start-LAhE ,@rodasumti))
1588
1589(define (operand-start-NAhE . rodasumti)
1590  `(operand-start-NAhE ,@rodasumti))
1591
1592(define (operand-1 . rodasumti)
1593  `(operand-1 ,@rodasumti))
1594
1595(define (operand-2 . rodasumti)
1596  `(operand-2 ,@rodasumti))
1597
1598(define (operand-3 . rodasumti)
1599  `(operand-3 ,@rodasumti))
1600
1601(define (operand-3-BOI . rodasumti)
1602  `(operand-3-BOI ,@rodasumti))
1603
1604(define (operand-3-NIhE . rodasumti)
1605  `(operand-3-NIhE ,@rodasumti))
1606
1607(define (operand-3-MOhE . rodasumti)
1608  `(operand-3-MOhE ,@rodasumti))
1609
1610(define (operand-3-JOhI . rodasumti)
1611  `(operand-3-JOhI ,@rodasumti))
1612
1613(define (operand-3-gek . rodasumti)
1614  `(operand-3-gek ,@rodasumti))
1615
1616(define (operand-3-LAhE . rodasumti)
1617  `(operand-3-LAhE ,@rodasumti))
1618
1619(define (operand-3-NAhE . rodasumti)
1620  `(operand-3-NAhE ,@rodasumti))
1621(define (operand-BOI . rodasumti)
1622  `(operand-BOI ,@rodasumti))
1623
1624(define (number PA-clause PA-clause-or-lerfu-word*)
1625  `(,@PA-clause ,@(*-null PA-clause-or-lerfu-word*)))
1626
1627(define (lerfu-string lerfu-word PA-clause-or-lerfu-word*)
1628  `(,@lerfu-word ,@(*-null PA-clause-or-lerfu-word*)))
1629
1630(define (lerfu-word-BY BY-clause)
1631  BY-clause)
1632
1633(define (lerfu-word-LAU LAU-clause lerfu-word)
1634  `(,@LAU-clause ,@lerfu-word))
1635
1636(define (lerfu-word-TEI TEI-clause lerfu-string FOI-clause)
1637  `(,@TEI-clause ,@lerfu-string ,@FOI-clause))
1638
1639(define (ek NA-clause? SE-clause? A-clause NAI-clause?)
1640  `(,@(?-null NA-clause?)
1641    ,@(?-null SE-clause?)
1642    ,@A-clause
1643    ,@(?-null NAI-clause?)))
1644
1645(define (gihek gihek-sa* gihek-1)
1646  `(gihek ,@(*-null gihek-sa*) ,gihek-1))
1647
1648(define (gihek-sa gihek-1 sa-word* SA-clause)
1649  `(sa-clause
1650    ,@gihek-1
1651    ,@(apply append (*-null sa-word*))
1652    ,@SA-clause))
1653
1654(define (gihek-1 NA-clause? SE-clause? GIhA-clause NAI-clause?)
1655  `(,@(?-null NA-clause?)
1656    ,@(?-null SE-clause?)
1657    ,@GIhA-clause
1658    ,@(?-null NAI-clause?)))
1659
1660(define (jek NA-clause? SE-clause? JA-clause NAI-clause?)
1661  `(jek ,@(?-null NA-clause?)
1662        ,@(?-null SE-clause?)
1663        ,@JA-clause
1664        ,@(?-null NAI-clause?)))
1665
1666(define (joik-JOI SE-clause? JOI-clause NAI-clause?)
1667  `(joik ,@(?-null SE-clause?)
1668         ,@JOI-clause
1669         ,@(?-null NAI-clause?)))
1670
1671(define (joik-interval interval)
1672  `(joik ,@interval))
1673
1674(define (joik-GAhO GAhO-clause interval GAhO-clause)
1675  `(joik ,@GAhO-clause
1676         ,@interval
1677         ,@GAhO-clause))
1678
1679(define (interval SE-clause? BIhI-clause NAI-clause?)
1680  `(,@(?-null SE-clause?)
1681    ,@BIhI-clause
1682    ,@(?-null NAI-clause?)))
1683
1684(define (joik-ek . rodasumti)
1685  `(joik-ek ,@rodasumti))
1686
1687(define (joik-ek-sa . rodasumti)
1688  `(joik-ek-sa ,@rodasumti))
1689
1690(define (joik-ek-1-joik . rodasumti)
1691  `(joik-ek-1-joik ,@rodasumti))
1692
1693(define (joik-ek-1-ek . rodasumti)
1694  `(joik-ek-1-ek ,@rodasumti))
1695
1696(define (joik-jek . rodasumti)
1697  `(joik-jek ,@rodasumti))
1698
1699(define (gek-GA . rodasumti)
1700  `(gek-GA ,@rodasumti))
1701
1702(define (gek-GI . rodasumti)
1703  `(gek-GI ,@rodasumti))
1704
1705(define (gek-gik . rodasumti)
1706  `(gek-gik ,@rodasumti))
1707
1708(define (guhek . rodasumti)
1709  `(guhek ,@rodasumti))
1710
1711(define (gik . rodasumti)
1712  `(gik ,@rodasumti))
1713
1714
1715(define (tag tense-modal tense*)
1716  (define (tense joik-jek tense-modal)
1717    `(,@joik-jek ,@tense-modal))
1718
1719  `(,@tense-modal ,@(map-apply tense tense*)))
1720
1721
1722(define (stag-tense simple-tense-modal sumti*)
1723  (define (tense joik-jek simple-tense-modal)
1724    `(,@joik-jek ,@simple-tense-modal))
1725
1726  `(,@simple-tense-modal ,@(map-apply tense sumti*)))
1727
1728(define (stag-simple-tense tense-modal sumti*)
1729  (define (tense joik-jek tense-modal)
1730    `(,@joik-jek ,@tense-modal))
1731
1732  `(,@tense-modal ,@(map-apply tense sumti*)))
1733
1734
1735(define (tense-modal-simple-tense simple-tense-modal free*)
1736  `(,@simple-tense-modal ,@(*-null free*)))
1737
1738(define (tense-modal-FIhO FIhO-clause free-0* selbri FEhU-clause? free-1*)
1739  `(,@FIhO-clause
1740    ,@(*-null free-0*)
1741    ,@selbri
1742    ,@(?-null FEhU-clause?)
1743    ,@(*-null free-1*)))
1744
1745
1746(define (simple-tense-modal-BAI NAhE-clause?
1747                                SE-clause?
1748                                BAI-clause
1749                                NAI-clause?
1750                                KI-clause?)
1751  `(,@(?-null NAhE-clause?)
1752    ,@(?-null SE-clause?)
1753    ,@BAI-clause
1754    ,@(?-null NAI-clause?)
1755    ,@(?-null KI-clause?)))
1756
1757(define (simple-tense-modal-time-space-CAhA time? space? CAhA-clause)
1758  `(,@(?-null time?) ,@(?-null space?) ,@CAhA-clause))
1759
1760(define (simple-tense-modal-time-space time? space?)
1761  `(,@(?-null time?) ,@(?-null space?)))
1762
1763(define (simple-tense-modal-CAhA CAhA-clause)
1764  CAhA-clause)
1765
1766(define (simple-tense-modal NAhE-clause? time-space-CAhA KI-clause?)
1767  `(,@(?-null NAhE-clause?)
1768    ,@time-space-CAhA
1769    ,@(?-null KI-clause?)))
1770
1771(define (simple-tense-modal-KI KI-clause)
1772  KI-clause)
1773
1774(define (simple-tense-modal-CUhE CUhE-clause)
1775  CUhE-clause)
1776
1777(define (time-ZI ZI-clause?
1778                 time-offset*
1779                 ZEhA-clause?
1780                 PU-clause?
1781                 NAI-clause?
1782                 interval-property*)
1783  `(,@(?-null ZI-clause?)
1784    ,@(*-null time-offset*)
1785    ,@(?-null ZEhA-clause?)
1786    ,@(?-null PU-clause?)
1787    ,@(?-null NAI-clause?)
1788    ,@(*-null interval-property*)))
1789
1790(define (time-offset PU-clause NAI-clause? ZI-clause?)
1791  `(,@PU-clause
1792    ,@(?-null NAI-clause?)
1793    ,@(?-null ZI-clause?)))
1794
1795(define (space VA-clause?
1796               space-offset*
1797               space-interval?
1798               MOhI-clause?
1799               space-offset?)
1800  `(,@(?-null VA-clause?)
1801    ,@(apply append space-offset*)
1802    ,@(?*-null space-interval?)
1803    ,@(?-null MOhI-clause?)
1804    ,@(?-null space-offset?)))
1805
1806(define (space-offset FAhA-clause NAI-clause? VA-clause?)
1807  `(,@FAhA-clause ,@(?-null NAI-clause?) ,@(?-null VA-clause?)))
1808
1809(define (space-interval-VEhA VEhA-clause VIhA-clause?)
1810  `(,@VEhA-clause ,@(?-null VIhA-clause)))
1811
1812(define (space-interval-VIhA VIhA-clause)
1813  VIhA-clause)
1814
1815(define (space-interval-VEhA-VIhA VEhA-clause
1816                                  FAhA-clause?
1817                                  NAI-clause?
1818                                  space-int-props?)
1819  `(,@VEhA-clause
1820    ,@(?-null FAhA-clause?)
1821    ,@(?-null NAI-clause?)
1822    ,@(?*-null space-int-props?)))
1823
1824(define (space-interval space-int-props)
1825  space-int-props)
1826
1827(define (space-int-props prop+)
1828  (define (prop FEhE-clause interval-property)
1829    `(,@FEhE-clause ,@interval-property))
1830
1831  (map-apply prop prop+))
1832
1833
1834(define (interval-property number ROI-clause NAI-clause?)
1835  `(,@number ,ROI-clause ,@(?-null NAI-clause?)))
1836
1837(define (interval-property-TAhE TAhE-clause NAI-clause?)
1838  `(,@TAhE-clause ,@(?-null NAI-clause?)))
1839
1840(define (interval-property-ZAhO ZAhO-clause NAI-clause?)
1841  `(,@ZAhO-clause ,@(?-null NAI-clause?)))
1842
1843
1844(define (free-SEI SEI-clause
1845                  free-0*
1846                  terms?
1847                  CU-terms?
1848                  free-1*
1849                  selbri
1850                  SEhU-clause?)
1851  `(,@SEI-clause
1852    ,@(*-null free-0*)
1853    ,@(?*-null terms?)
1854    ,@(?-null CU-terms?)
1855    ,@(?*-null free-1*)
1856    ,@selbri
1857    ,@(?-null SEhU-clause?)))
1858
1859(define (free-SOI SOI-clause free* sumti sumti? SEhU-clause?)
1860  `(,@SOI-clause
1861    ,@(*-null free*)
1862    ,@sumti
1863    ,@(?-null sumti?)
1864    ,@(?-null SEhU-clause?)))
1865
1866(define (free-vocative-selbri vocative
1867                              relative-clauses-0?
1868                              selbri
1869                              relative-clauses-1?
1870                              DOhU-clause?)
1871  `(,@vocative
1872    ,@(?-null relative-clauses-0?)
1873    ,@selbri
1874    ,@(?-null relative-clauses-1?)
1875    ,@(?-null DOhU-clause?)))
1876
1877(define (free-vocative-cmene vocative
1878                             relative-clauses-0?
1879                             CMENE-clause+
1880                             free*
1881                             relative-clauses-1?
1882                             DOhU-clause?)
1883  `(,@vocative
1884    ,@(?-null relative-clauses-0?)
1885    ,@CMENE-clause+
1886    ,@(*-null free*)
1887    ,@(?-null relative-clauses-1?)
1888    ,@(?-null DOhU-clause?)))
1889
1890(define (free-vocative-sumti vocative sumti? DOhU-clause?)
1891  `(,@vocative ,@(?-null sumti?) ,@(?-null DOhU-clause?)))
1892
1893(define (free-MAI number-or-lerfu-string MAI-clause)
1894  `(,@number-or-lerfu-string ,@MAI-clause))
1895
1896(define (free-TO TO-clause text TOI-clause?)
1897  `(,@TO-clause ,text ,@(?-null TOI-clause?)))
1898
1899
1900(define (xi-clause-BOI XI-clause free* number-or-lerfu-string BOI-clause?)
1901  `(,@XI-clause
1902    ,@(*-null free*)
1903    ,@number-or-lerfu-string
1904    ,@(?-null BOI-clause?)))
1905
1906(define (xi-clause-VEI XI-clause free-0* VEI-clause free-1* mex VEhO-clause?)
1907  `(,@XI-clause
1908    ,@(*-null free-0*)
1909    ,@VEI-clause
1910    ,@(*-null free-1*)
1911    ,@mex
1912    ,@(?-null VEhO-clause?)))
1913
1914;; XXX: I may want to flatten single-element * clauses, much
1915;;      like I do je rules.
1916;;
1917(define (vocative COI-NAI?-clause* #!optional (DOI-clause? ""))
1918  (define (COI-NAI? COI-clause NAI-clause?)
1919    `(,@COI-clause ,@(?-null NAI-clause?)))
1920
1921  `(,@(apply append (map-apply COI-NAI? COI-NAI?-clause*))
1922    ,@(?*-null DOI-clause?)))
1923
1924(define (indicators FUhE-clause? indicator+)
1925  `(,@(?-null FUhE-clause?) ,@(apply append indicator+)))
1926
1927(define (indicator clause #!optional (NAhE-clause? ""))
1928  `(,@clause ,@(?-null NAhE-clause?)))
1929
1930(define (zei-clause pre-clause zei-clause-no-pre)
1931  `(,@pre-clause ,@zei-clause-no-pre))
1932
1933(define (zei-clause-no-pre pre-zei-bu
1934                           zei-bu*
1935                           zei-tail
1936                           post-clause)
1937  (define (zei-bu zei-tail? bu-tail)
1938    `(,@(?-null zei-tail?) ,@bu-tail))
1939
1940  `(,@pre-zei-bu
1941    ,@(map-apply zei-bu zei-bu*)
1942    ,@(apply append zei-tail)
1943    ,@post-clause))
1944
1945
1946(define (bu-clause pre-clause bu-clause-no-pre)
1947  `(,@pre-clause ,@bu-clause-no-pre))
1948
1949(define (bu-clause-no-pre pre-zei-bu
1950                          bu-zei*
1951                          bu-tail
1952                          post-clause)
1953  (define (bu-zei bu-tail? zei-tail)
1954    `(,@(?-null bu-tail?) ,@zei-tail))
1955
1956  `(,@pre-zei-bu
1957    ,@(map-apply bu-zei bu-zei*)
1958    ,@bu-tail
1959    ,@post-clause))
1960
1961
1962(define (zei-tail zei+)
1963  (define (zei ZEI-clause any-word)
1964    `(,ZEI-clause ,any-word))
1965
1966  (map-apply zei zei+))
1967
1968
1969(define (bu-tail BU-clause+)
1970  BU-clause+)
1971
1972(define (pre-zei-bu any-word si-clause?)
1973  `(,any-word ,@(?-null si-clause?)))
1974
1975(define (post-clause si-clause? indicators*)
1976  `(,@(?-null si-clause?) ,@(*-null indicators*)))
1977
1978(define (pre-clause BAhE-clause?)
1979  (?-null BAhE-clause?))
1980
1981(define (any-word-SA-LOhU LOhU-pre)
1982  `(any-string ,@LOhU-pre))
1983
1984(define (any-word-SA-ZO ZO-pre)
1985  `(any-word ,@ZO-pre))
1986
1987(define (any-word-SA-ZOI ZOI-pre)
1988  `(any-string ,@ZOI-pre))
1989
1990(define (su-clause clause* SU-clause)
1991  `(su-clause ,@clause* ,SU-clause))
1992
1993(define (si-clause si+)
1994  (define (si clause si-clause? SI-clause)
1995    `(,@clause ,@(?*-null si-clause?) ,SI-clause))
1996
1997  `(si-clause ,@(apply append (map-apply si si+))))
1998
1999(define (erasable-clause-bu bu-clause-no-pre)
2000  bu-clause-no-pre)
2001
2002(define (erasable-clause-zei zei-clause-no-pre)
2003  `((brivla ,@zei-clause-no-pre)))
2004
2005(define (sa-word pre-zei-bu)
2006  pre-zei-bu)
2007
2008(define (si-word pre-zei-bu)
2009  pre-zei-bu)
2010
2011(define (su-word any-word-SA)
2012  any-word-SA)
2013
2014
2015(define (BRIVLA-clause BRIVLA-pre BRIVLA-post)
2016  `(BRIVLA-clause ,BRIVLA-pre ,@BRIVLA-post))
2017
2018(define (BRIVLA-clause-zei zei-clause)
2019  `(BRIVLA-clause ,@zei-clause))
2020
2021(define (BRIVLA-pre pre-clause BRIVLA)
2022  `(,@pre-clause ,@BRIVLA))
2023
2024(define (BRIVLA-post post-clause)
2025  post-clause)
2026
2027
2028(define (CMENE-clause CMENE-pre CMENE-post)
2029  `(CMENE-clause ,CMENE-pre ,@CMENE-post))
2030
2031(define (CMENE-pre pre-clause CMENE)
2032  `(,@pre-clause ,@CMENE))
2033
2034(define (CMENE-post post-clause)
2035  post-clause)
2036
2037
2038(define (CMAVO-clause pre-clause CMAVO)
2039  `(,@pre-clause ,@CMAVO))
2040
2041
2042(define (A-clause A-pre A-post)
2043  `((A-clause ,A-pre ,@A-post)))
2044
2045(define (A-pre pre-clause A)
2046  `(,@pre-clause ,@A))
2047
2048(define (A-post post-clause)
2049  post-clause)
2050
2051
2052(define (BAI-clause BAI-pre BAI-post)
2053  `(BAI-clause ,BAI-pre ,@BAI-post))
2054
2055(define (BAI-pre pre-clause BAI)
2056  `(,@pre-clause ,@BAI))
2057
2058(define (BAI-post post-clause)
2059  post-clause)
2060
2061
2062(define (BAhE-clause clause+)
2063  (define (BAhE BAhE-pre BAhE-post)
2064    `(,@BAhE-pre ,@BAhE-post))
2065
2066  `((BAhE-clause ,@(map-apply BAhE clause+))))
2067
2068(define (BAhE-pre BAhE)
2069  BAhE)
2070
2071(define (BAhE-post si-clause?)
2072  (?-null si-clause?))
2073
2074
2075(define (BE-clause BE-pre BE-post)
2076  `(BE-clause ,BE-pre ,@BE-post))
2077
2078(define (BE-pre pre-clause BE)
2079  `(,@pre-clause ,@BE))
2080
2081(define (BE-post post-clause)
2082  post-clause)
2083
2084
2085(define (BEI-clause BEI-pre BEI-post)
2086  `(BEI-clause ,BEI-pre ,@BEI-post))
2087
2088(define (BEI-pre pre-clause BEI)
2089  `(,@pre-clause ,@BEI))
2090
2091(define (BEI-post post-clause)
2092  post-clause)
2093
2094
2095(define (BEhO-clause BEhO-pre BEhO-post)
2096  `(BEhO-clause ,BEhO-pre ,@BEhO-post))
2097
2098(define (BEhO-pre pre-clause BEhO)
2099  `(,@pre-clause ,@BEhO))
2100
2101(define (BEhO-post post-clause)
2102  post-clause)
2103
2104
2105(define (BIhE-clause BIhE-pre BIhE-post)
2106  `(BIhE-clause ,BIhE-pre ,@BIhE-post))
2107
2108(define (BIhE-pre pre-clause BIhE)
2109  `(,@pre-clause ,@BIhE))
2110
2111(define (BIhE-post post-clause)
2112  post-clause)
2113
2114
2115(define (BIhI-clause BIhI-pre BIhI-post)
2116  `(BIhI-clause ,BIhI-pre ,@BIhI-post))
2117
2118(define (BIhI-pre pre-clause BIhI)
2119  `(,@pre-clause ,@BIhI))
2120
2121(define (BIhI-post post-clause)
2122  post-clause)
2123
2124
2125(define (BO-clause BO-pre BO-post)
2126  `(BO-clause ,BO-pre ,@BO-post))
2127
2128(define (BO-pre pre-clause BO)
2129  `(,@pre-clause ,@BO))
2130
2131(define (BO-post post-clause)
2132  post-clause)
2133
2134
2135(define (BOI-clause BOI-pre BOI-post)
2136  `(BOI-clause ,BOI-pre ,@BOI-post))
2137
2138(define (BOI-pre pre-clause bOI)
2139  `(,@pre-clause ,@bOI))
2140
2141(define (BOI-post post-clause)
2142  post-clause)
2143
2144
2145(define (BU-clause pre-clause BU)
2146  `(,@pre-clause ,@BU))
2147
2148
2149(define (BY-clause BY-pre BY-post)
2150  `(BY-clause ,BY-pre ,@BY-post))
2151
2152(define (BY-clause-bu bu-clause)
2153  `(BY-clause ,@bu-clause))
2154
2155(define (BY-pre pre-clause BY)
2156  `(,@pre-clause ,@BY))
2157
2158(define (BY-post post-clause)
2159  post-clause)
2160
2161
2162(define (CAhA-clause . rodasumti)
2163  `(CAhA-clause ,@rodasumti))
2164
2165(define (CAhA-pre pre-clause CAhA)
2166  `(,@pre-clause ,@CAhA))
2167
2168(define (CAhA-post post-clause)
2169  post-clause)
2170
2171
2172(define (CAI-clause . rodasumti)
2173  `(CAI-clause ,@rodasumti))
2174
2175(define (CAI-pre pre-clause CAI)
2176  `(,@pre-clause ,@CAI))
2177
2178(define (CAI-post post-clause)
2179  post-clause)
2180
2181
2182(define (CEI-clause . rodasumti)
2183  `(CEI-clause ,@rodasumti))
2184
2185(define (CEI-pre pre-clause CEI)
2186  `(,@pre-clause ,@CEI))
2187
2188(define (CEI-post post-clause)
2189  post-clause)
2190
2191
2192(define (CEhE-clause . rodasumti)
2193  `(CEhE-clause ,@rodasumti))
2194
2195(define (CEhE-pre pre-clause CEhE)
2196  `(,@pre-clause ,@CEhE))
2197
2198(define (CEhE-post post-clause)
2199  post-clause)
2200
2201
2202(define (CO-clause . rodasumti)
2203  `(CO-clause ,@rodasumti))
2204
2205(define (CO-pre pre-clause CO)
2206  `(,@pre-clause ,@CO))
2207
2208(define (CO-post post-clause)
2209  post-clause)
2210
2211
2212(define (COI-clause COI-pre COI-post)
2213  `((COI-clause ,COI-pre ,@COI-post)))
2214
2215(define (COI-pre pre-clause COI)
2216  `(,@pre-clause ,@COI))
2217
2218(define (COI-post post-clause)
2219  post-clause)
2220
2221
2222(define (CU-clause CU-pre CU-post)
2223  `(CU-clause ,CU-pre ,@CU-post))
2224
2225(define (CU-pre pre-clause CU)
2226  `(,@pre-clause ,@CU))
2227
2228(define (CU-post post-clause)
2229  post-clause)
2230
2231
2232(define (CUhE-clause . rodasumti)
2233  `(CUhE-clause ,@rodasumti))
2234
2235(define (CUhE-pre pre-clause CUhE)
2236  `(,@pre-clause ,@CUhE))
2237
2238(define (CUhE-post post-clause)
2239  post-clause)
2240
2241
2242(define (DAhO-clause . rodasumti)
2243  `(DAhO-clause ,@rodasumti))
2244
2245(define (DAhO-pre pre-clause DAhO)
2246  `(,@pre-clause ,@DAhO))
2247
2248(define (DAhO-post post-clause)
2249  post-clause)
2250
2251
2252(define (DOI-clause DOI-pre DOI-post)
2253  `(DOI-clause ,DOI-pre ,@DOI-post))
2254
2255(define (DOI-pre pre-clause DOI)
2256  `(,@pre-clause ,@DOI))
2257
2258(define (DOI-post post-clause)
2259  post-clause)
2260
2261
2262(define (DOhU-clause DOI-pre DOI-post)
2263  `(DOhU-clause ,DOI-pre ,@DOI-post))
2264
2265(define (DOhU-pre pre-clause DOhU)
2266  `(,@pre-clause ,@DOhU))
2267
2268(define (DOhU-post post-clause)
2269  post-clause)
2270
2271
2272(define (FA-clause FA-pre FA-post)
2273  `(FA-clause ,FA-pre ,@FA-post))
2274
2275(define (FA-pre pre-clause FA)
2276  `(,@pre-clause ,@FA))
2277
2278(define (FA-post post-clause)
2279  post-clause)
2280
2281
2282(define (FAhA-clause FAhA-pre FAhA-post)
2283  `(FAhA-clause ,FAhA-pre ,@FAhA-post))
2284
2285(define (FAhA-pre pre-clause FAhA)
2286  `(,@pre-clause ,@FAhA))
2287
2288(define (FAhA-post post-clause)
2289  post-clause)
2290
2291
2292(define (FAhO-clause pre-clause FAhO)
2293  `(FAhO-clause ,@pre-clause ,FAhO))
2294
2295
2296(define (FEhE-clause FEhE-pre FEhE-post)
2297  `(FEhE-clause ,FEhE-pre ,@FEhE-post))
2298
2299(define (FEhE-pre pre-clause FEhE)
2300  `(,@pre-clause ,@FEhE))
2301
2302(define (FEhE-post post-clause)
2303  post-clause)
2304
2305
2306(define (FEhU-clause FEhU-pre FEhU-post)
2307  `(FEhU-clause ,FEhU-pre ,@FEhU-post))
2308
2309(define (FEhU-pre pre-clause FEhU)
2310  `(,@pre-clause ,@FEhU))
2311
2312(define (FEhU-post post-clause)
2313  post-clause)
2314
2315
2316(define (FIhO-clause FIhO-pre FIhO-post)
2317  `(FIhO-clause ,FIhO-pre ,@FIhO-post))
2318
2319(define (FIhO-pre pre-clause FIhO)
2320  `(,@pre-clause ,@FIhO))
2321
2322(define (FIhO-post post-clause)
2323  post-clause)
2324
2325
2326(define (FOI-clause FOI-pre FOI-post)
2327  `(FOI-clause ,FOI-pre ,@FOI-post))
2328
2329(define (FOI-pre pre-clause FOI)
2330  `(,@pre-clause ,@FOI))
2331
2332(define (FOI-post post-clause)
2333  post-clause)
2334
2335
2336(define (FUhA-clause FUhA-pre FUhA-post)
2337  `(FUhA-clause ,FUhA-pre ,@FUhA-post))
2338
2339(define (FUhA-pre pre-clause FUhA)
2340  `(,@pre-clause ,@FUhA))
2341
2342(define (FUhA-post post-clause)
2343  post-clause)
2344
2345
2346(define (FUhE-clause FUhE-pre FUhE-post)
2347  `(FUhE-clause ,FUhO-pre ,@FUhE-post))
2348
2349(define (FUhE-pre pre-clause FUhE)
2350  `(,@pre-clause ,@FUhE))
2351
2352(define (FUhE-post post-clause)
2353  post-clause)
2354
2355
2356(define (FUhO-clause FUhO-pre FUhO-post)
2357  `(FUhO-clause ,FUhO-pre ,@FUhO-post))
2358
2359(define (FUhO-pre pre-clause FUhO)
2360  `(,@pre-clause ,@FUhO))
2361
2362(define (FUhO-post post-clause)
2363  post-clause)
2364
2365
2366(define (GA-clause . rodasumti)
2367  `(GA-clause ,@rodasumti))
2368
2369(define (GA-pre pre-clause GA)
2370  `(,@pre-clause ,@GA))
2371
2372(define (GA-post post-clause)
2373  post-clause)
2374
2375
2376(define (GAhO-clause GAhO-pre GAhO-post)
2377  `(GAhO-clause ,GAhO-pre ,@GAhO-post))
2378
2379(define (GAhO-pre pre-clause GAhO)
2380  `(,@pre-clause ,@GAhO))
2381
2382(define (GAhO-post post-clause)
2383  post-clause)
2384
2385
2386(define (GEhU-clause . rodasumti)
2387  `(GEhU-clause ,@rodasumti))
2388
2389(define (GEhU-pre pre-clause GEhU)
2390  `(,@pre-clause ,@GEhU))
2391
2392(define (GEhU-post post-clause)
2393  post-clause)
2394
2395
2396(define (GI-clause . rodasumti)
2397  `(GI-clause ,@rodasumti))
2398
2399(define (GI-pre pre-clause GI)
2400  `(,@pre-clause ,@GI))
2401
2402(define (GI-post post-clause)
2403  post-clause)
2404
2405
2406(define (GIhA-clause . rodasumti)
2407  `(GIhA-clause ,@rodasumti))
2408
2409(define (GIhA-pre pre-clause GIhA)
2410  `(,@pre-clause ,@GIhA))
2411
2412(define (GIhA-post post-clause)
2413  post-clause)
2414
2415
2416(define (GOI-clause GOI-pre GOI-post)
2417  `(GOI-clause ,GOI-pre ,@GOI-post))
2418
2419(define (GOI-pre pre-clause GOI)
2420  `(,@pre-clause ,@GOI))
2421
2422(define (GOI-post post-clause)
2423  post-clause)
2424
2425
2426(define (GOhA-clause GOhA-pre GOhA-post)
2427  `(GOhA-clause ,GOhA-pre ,@GOhA-post))
2428
2429(define (GOhA-pre pre-clause GOhA)
2430  `(,@pre-clause ,@GOhA))
2431
2432(define (GOhA-post post-clause)
2433  post-clause)
2434
2435
2436(define (GUhA-clause . rodasumti)
2437  `(GUhA-clause ,@rodasumti))
2438
2439(define (GUhA-pre pre-clause GUhA)
2440  `(,@pre-clause ,@GUhA))
2441
2442(define (GUhA-post post-clause)
2443  post-clause)
2444
2445
2446(define (I-clause sentence-sa* I-pre I-post)
2447  `(I-clause ,@(*-null sentence-sa*) ,I-pre ,@I-post))
2448
2449(define (I-pre pre-clause I)
2450  `(,@pre-clause ,@I))
2451
2452(define (I-post post-clause)
2453  post-clause)
2454
2455
2456(define (JA-clause . rodasumti)
2457  `(JA-clause ,@rodasumti))
2458
2459(define (JA-pre pre-clause JA)
2460  `(,@pre-clause ,@JA))
2461
2462(define (JA-post post-clause)
2463  post-clause)
2464
2465
2466(define (JAI-clause . rodasumti)
2467  `(JAI-clause ,@rodasumti))
2468
2469(define (JAI-pre pre-clause JAI)
2470  `(,@pre-clause ,@JAI))
2471
2472(define (JAI-post post-clause)
2473  post-clause)
2474
2475
2476(define (JOhI-clause . rodasumti)
2477  `(JOhI-clause ,@rodasumti))
2478
2479(define (JOhI-pre pre-clause JOhI)
2480  `(,@pre-clause ,@JOhI))
2481
2482(define (JOhI-post post-clause)
2483  post-clause)
2484
2485
2486(define (JOI-clause . rodasumti)
2487  `(JOI-clause ,@rodasumti))
2488
2489(define (JOI-pre pre-clause JOI)
2490  `(,@pre-clause ,@JOI))
2491
2492(define (JOI-post post-clause)
2493  post-clause)
2494
2495
2496(define (KE-clause . rodasumti)
2497  `(KE-clause ,@rodasumti))
2498
2499(define (KE-pre pre-clause KE)
2500  `(,@pre-clause ,@KE))
2501
2502(define (KE-post post-clause)
2503  post-clause)
2504
2505
2506(define (KEhE-clause . rodasumti)
2507  `(KEhE-clause ,@rodasumti))
2508
2509(define (KEhE-pre pre-clause KEhE)
2510  `(,@pre-clause ,@KEhE))
2511
2512(define (KEhE-post post-clause)
2513  post-clause)
2514
2515
2516(define (KEI-clause KEI-pre KEI-post)
2517  `(KEI-clause ,KEI-pre ,@KEI-post))
2518
2519(define (KEI-pre pre-clause KEI)
2520  `(,@pre-clause ,@KEI))
2521
2522(define (KEI-post post-clause)
2523  post-clause)
2524
2525
2526(define (KI-clause . rodasumti)
2527  `(KI-clause ,@rodasumti))
2528
2529(define (KI-pre pre-clause KI)
2530  `(,@pre-clause ,@KI))
2531
2532(define (KI-post post-clause)
2533  post-clause)
2534
2535
2536(define (KOhA-clause KOhA-pre KOhA-post)
2537  `(KOhA-clause ,KOhA-pre ,@KOhA-post))
2538
2539(define (KOhA-pre pre-clause KOhA)
2540  `(,@pre-clause ,@KOhA))
2541
2542(define (KOhA-post post-clause)
2543  post-clause)
2544
2545
2546(define (KU-clause KU-pre KU-post)
2547  `(KU-clause ,KU-pre ,@KU-post))
2548
2549(define (KU-pre pre-clause KU)
2550  `(,@pre-clause ,@KU))
2551
2552(define (KU-post post-clause)
2553  post-clause)
2554
2555
2556(define (KUhE-clause . rodasumti)
2557  `(KUhE-clause ,@rodasumti))
2558
2559(define (KUhE-pre pre-clause KUhE)
2560  `(,@pre-clause ,@KUhE))
2561
2562(define (KUhE-post post-clause)
2563  post-clause)
2564
2565
2566(define (KUhO-clause . rodasumti)
2567  `(KUhO-clause ,@rodasumti))
2568
2569(define (KUhO-pre pre-clause KUhO)
2570  `(,@pre-clause ,@KUhO))
2571
2572(define (KUhO-post post-clause)
2573  post-clause)
2574
2575
2576(define (LA-clause LA-pre LA-post)
2577  `(LA-clause ,LA-pre ,@LA-post))
2578
2579(define (LA-pre pre-clause LA)
2580  `(,@pre-clause ,@LA))
2581
2582(define (LA-post post-clause)
2583  post-clause)
2584
2585
2586(define (LAU-clause . rodasumti)
2587  `(LAU-clause ,@rodasumti))
2588
2589(define (LAU-pre pre-clause LAU)
2590  `(,@pre-clause ,@LAU))
2591
2592(define (LAU-post post-clause)
2593  post-clause)
2594
2595
2596(define (LAhE-clause LAhE-pre LAhE-post)
2597  `(LAhE-clause ,LAhE-pre ,@LAhE-post))
2598
2599(define (LAhE-pre pre-clause LAhE)
2600  `(,@pre-clause ,@LAhE))
2601
2602(define (LAhE-post post-clause)
2603  post-clause)
2604
2605
2606(define (LE-clause LE-pre LE-post)
2607  `(LE-clause ,LE-pre ,@LE-post))
2608
2609(define (LE-pre pre-clause LE)
2610  `(,@pre-clause ,@LE))
2611
2612(define (LE-post post-clause)
2613  post-clause)
2614
2615
2616(define (LEhU-clause LEhU-pre)
2617  `(LEhU-clause ,LEhU-pre))
2618
2619(define (LEhU-pre pre-clause LEhU)
2620  `(,@pre-clause ,@LEhU))
2621
2622
2623(define (LI-clause LI-pre LI-post)
2624  `(LI-clause ,LI-pre ,@LI-post))
2625
2626(define (LI-pre pre-clause LI)
2627  `(,@pre-clause ,@LI))
2628
2629(define (LI-post post-clause)
2630  post-clause)
2631
2632
2633(define (LIhU-clause LIhU-pre LIhU-post)
2634  `(LIhU-clause ,LIhU-pre ,@LIhU-post))
2635
2636(define (LIhU-pre pre-clause LIhU)
2637  `(,@pre-clause ,@LIhU))
2638
2639(define (LIhU-post post-clause)
2640  post-clause)
2641
2642
2643(define (LOhO-clause LOhO-pre LOhO-post)
2644  `(LOhO-clause ,LOhO-pre ,@LOhO-post))
2645
2646(define (LOhO-pre pre-clause LOhO)
2647  `(,@pre-clause ,@LOhO))
2648
2649(define (LOhO-post post-clause)
2650  post-clause)
2651
2652
2653(define (LOhU-clause LOhU-pre LOhU-post)
2654  `(LOhU-clause ,@LOhU-pre ,@LOhU-post))
2655
2656(define (LOhU-pre pre-clause LOhU any-word* LEhU-clause)
2657  `(,@pre-clause ,LOhU ,@(*-null any-word*) ,LEhU-clause))
2658
2659(define (LOhU-post post-clause)
2660  post-clause)
2661
2662
2663(define (LU-clause LU-pre LU-post)
2664  `(LU-clause ,LU-pre ,@LU-post))
2665
2666(define (LU-pre pre-clause LU)
2667  `(,@pre-clause ,@LU))
2668
2669(define (LU-post post-clause)
2670  post-clause)
2671
2672
2673(define (LUhU-clause LUhU-pre LUhU-post)
2674  `(LUhU-clause ,LUhU-pre ,@LUhU-post))
2675
2676(define (LUhU-pre pre-clause LUhU)
2677  `(,@pre-clause ,@LUhU))
2678
2679(define (LUhU-post post-clause)
2680  post-clause)
2681
2682
2683(define (MAhO-clause MAhO-pre MAhO-post)
2684  `(MAhO-clause ,MAhO-pre ,@MAhO-post))
2685
2686(define (MAhO-pre pre-clause MAhO)
2687  `(,@pre-clause ,@MAhO))
2688
2689(define (MAhO-post post-clause)
2690  post-clause)
2691
2692
2693(define (MAI-clause MAI-pre MAI-post)
2694  `(MAI-clause ,MAI-pre ,@MAI-post))
2695
2696(define (MAI-pre pre-clause MAI)
2697  `(,@pre-clause ,@MAI))
2698
2699(define (MAI-post post-clause)
2700  post-clause)
2701
2702
2703(define (ME-clause ME-pre ME-post)
2704  `(ME-clause ,ME-pre ,@ME-post))
2705
2706(define (ME-pre pre-clause ME)
2707  `(,@pre-clause ,@ME))
2708
2709(define (ME-post post-clause)
2710  post-clause)
2711
2712
2713(define (MEhU-clause MEhU-pre MEhU-post)
2714  `(MEhU-clause ,MEhU-pre ,@MEhU-post))
2715
2716(define (MEhU-pre pre-clause MEhU)
2717  `(,@pre-clause ,@MEhU))
2718
2719(define (MEhU-post post-clause)
2720  post-clause)
2721
2722
2723(define (MOhE-clause MOhE-pre MOhE-post)
2724  `(MOhE-clause ,MOhE-pre ,@MOhE-post))
2725
2726(define (MOhE-pre pre-clause MOhE)
2727  `(,@pre-clause ,@MOhE))
2728
2729(define (MOhE-post post-clause)
2730  post-clause)
2731
2732
2733(define (MOhI-clause MOhI-pre MOhI-post)
2734  `(MOhI-clause ,MOhI-pre ,@MOhI-post))
2735
2736(define (MOhI-pre pre-clause MOhI)
2737  `(,@pre-clause ,@MOhI))
2738
2739(define (MOhI-post post-clause)
2740  post-clause)
2741
2742
2743(define (MOI-clause MOI-pre MOI-post)
2744  `(MOI-clause ,MOI-pre ,@MOI-post))
2745
2746(define (MOI-pre pre-clause MOI)
2747  `(,@pre-clause ,@MOI))
2748
2749(define (MOI-post post-clause)
2750  post-clause)
2751
2752
2753(define (NA-clause NA-pre NA-post)
2754  `(NA-clause ,NA-pre ,@NA-post))
2755
2756(define (NA-pre pre-clause NA)
2757  `(,@pre-clause ,@NA))
2758
2759(define (NA-post post-clause)
2760  post-clause)
2761
2762
2763(define (NAI-clause NAI-pre NAI-post)
2764  `(NAI-clause ,NAI-pre ,@NAI-post))
2765
2766(define (NAI-pre pre-clause NAI)
2767  `(,@pre-clause ,@NAI))
2768
2769(define (NAI-post post-clause)
2770  post-clause)
2771
2772
2773(define (NAhE-clause NAhE-pre NAhE-post)
2774  `(NAhE-clause ,NAhE-pre ,@NAhE-post))
2775
2776(define (NAhE-pre pre-clause NAhE)
2777  `(,@pre-clause ,@NAhE))
2778
2779(define (NAhE-post post-clause)
2780  post-clause)
2781
2782
2783(define (NAhU-clause NAhU-pre NAhU-post)
2784  `(NAhU-clause ,NAhU-pre ,@NAhU-post))
2785
2786(define (NAhU-pre pre-clause NAhU)
2787  `(,@pre-clause ,@NAhU))
2788
2789(define (NAhU-post post-clause)
2790  post-clause)
2791
2792
2793(define (NIhE-clause NIhE-pre NIhE-post)
2794  `(NIhE-clause ,NIhE-pre ,@NIhE-post))
2795
2796(define (NIhE-pre pre-clause NIhE)
2797  `(,@pre-clause ,@NIhE))
2798
2799(define (NIhE-post post-clause)
2800  post-clause)
2801
2802
2803(define (NIhO-clause sentence-sa* NIhO-pre NIhO-post)
2804  `(NIhO-clause ,@(*-null sentence-sa*) ,@NIhO-pre ,@NIhO-post))
2805
2806(define (NIhO-pre pre-clause NIhO)
2807  `(,@pre-clause ,@NIhO))
2808
2809(define (NIhO-post su-clause* post-clause)
2810  `(,@(*-null su-clause*) ,@post-clause))
2811
2812
2813(define (NOI-clause NOI-pre NOI-post)
2814  `(NOI-clause ,NOI-pre ,@NOI-post))
2815
2816(define (NOI-pre pre-clause NOI)
2817  `(,@pre-clause ,@NOI))
2818
2819(define (NOI-post post-clause)
2820  post-clause)
2821
2822
2823(define (NU-clause NU-pre NU-post)
2824  `(NU-clause ,NU-pre ,@NU-post))
2825
2826(define (NU-pre pre-clause NU)
2827  `(,@pre-clause ,@NU))
2828
2829(define (NU-post post-clause)
2830  post-clause)
2831
2832
2833(define (NUhA-clause NUhA-pre NUhA-post)
2834  `(NUhA-clause ,NUhA-pre ,@NUhA-post))
2835
2836(define (NUhA-pre pre-clause NUhA)
2837  `(,@pre-clause ,@NUhA))
2838
2839(define (NUhA-post post-clause)
2840  post-clause)
2841
2842
2843(define (NUhI-clause NUhI-pre NUhI-post)
2844  `(NUhI-clause ,NUhI-pre ,@NUhI-post))
2845
2846(define (NUhI-pre pre-clause NUhI)
2847  `(,@pre-clause ,@NUhI))
2848
2849(define (NUhI-post post-clause)
2850  post-clause)
2851
2852
2853(define (NUhU-clause NUhU-pre NUhU-post)
2854  `(NUhU-clause ,NUhU-pre ,@NUhU-post))
2855
2856(define (NUhU-pre pre-clause NUhU)
2857  `(,@pre-clause ,@NUhU))
2858
2859(define (NUhU-post post-clause)
2860  post-clause)
2861
2862
2863(define (PA-clause PA-pre PA-post)
2864  `(PA-clause ,PA-pre ,@PA-post))
2865
2866(define (PA-pre pre-clause PA)
2867  `(,@pre-clause ,@PA))
2868
2869(define (PA-post post-clause)
2870  post-clause)
2871
2872
2873(define (PEhE-clause PEhE-pre PEhE-post)
2874  `(PEhE-clause ,PEhE-pre ,@PEhE-post))
2875
2876(define (PEhE-pre pre-clause PEhE)
2877  `(,@pre-clause ,@PEhE))
2878
2879(define (PEhE-post post-clause)
2880  post-clause)
2881
2882
2883(define (PEhO-clause PEhO-pre PEhO-post)
2884  `(PEhO-clause ,PEhO-pre ,@PEhO-post))
2885
2886(define (PEhO-pre pre-clause PEhO)
2887  `(,@pre-clause ,@PEhO))
2888
2889(define (PEhO-post post-clause)
2890  post-clause)
2891
2892
2893(define (PU-clause PU-pre PU-post)
2894  `(PU-clause ,PU-pre ,@PU-post))
2895
2896(define (PU-pre pre-clause PU)
2897  `(,@pre-clause ,@PU))
2898
2899(define (PU-post post-clause)
2900  post-clause)
2901
2902
2903(define (RAhO-clause RAhO-pre RAhO-post)
2904  `(RAhO-clause ,RAhO-pre ,@RAhO-post))
2905
2906(define (RAhO-pre pre-clause RAhO)
2907  `(,@pre-clause ,@RAhO))
2908
2909(define (RAhO-post post-clause)
2910  post-clause)
2911
2912
2913(define (ROI-clause ROI-pre ROI-post)
2914  `(ROI-clause ,ROI-pre ,@ROI-post))
2915
2916(define (ROI-pre pre-clause ROI)
2917  `(,@pre-clause ,@ROI))
2918
2919(define (ROI-post post-clause)
2920  post-clause)
2921
2922
2923(define (SA-clause SA-pre)
2924  `((SA-clause ,SA-pre)))
2925
2926(define (SA-pre pre-clause SA)
2927  `(,@pre-clause ,@SA))
2928
2929
2930(define (SE-clause SE-pre SE-post)
2931  `(SE-clause ,SE-pre ,@SE-post))
2932
2933(define (SE-pre pre-clause SE)
2934  `(,@pre-clause ,@SE))
2935
2936(define (SE-post post-clause)
2937  post-clause)
2938
2939
2940(define (SEI-clause SEI-pre SEI-post)
2941  `(SEI-clause ,SEI-pre ,@SEI-post))
2942
2943(define (SEI-pre pre-clause SEI)
2944  `(,@pre-clause ,@SEI))
2945
2946(define (SEI-post post-clause)
2947  post-clause)
2948
2949
2950(define (SEhU-clause SEhU-pre SEhU-post)
2951  `(SEhU-clause ,SEhU-pre ,@SEhU-post))
2952
2953(define (SEhU-pre pre-clause SEhU)
2954  `(,@pre-clause ,@SEhU))
2955
2956(define (SEhU-post post-clause)
2957  post-clause)
2958
2959
2960(define (SI-clause SI)
2961  `(SI-clause ,SI))
2962
2963(define (SI-pre pre-clause SI)
2964  `(,@pre-clause ,@SI))
2965
2966(define (SI-post post-clause)
2967  post-clause)
2968
2969
2970(define (SOI-clause SOI-pre SOI-post)
2971  `(SOI-clause ,SOI-pre ,@SOI-post))
2972
2973(define (SOI-pre pre-clause SOI)
2974  `(,@pre-clause ,@SOI))
2975
2976(define (SOI-post post-clause)
2977  post-clause)
2978
2979
2980(define (SU-clause SU-pre SU-post)
2981  `(SU-clause ,SU-pre ,@SU-post))
2982
2983(define (SU-pre pre-clause SU)
2984  `(,@pre-clause ,@SU))
2985
2986(define (SU-post post-clause)
2987  post-clause)
2988
2989
2990(define (TAhE-clause TAhE-pre TAhE-post)
2991  `(TAhE-clause ,TAhE-pre ,@TAhE-post))
2992
2993(define (TAhE-pre pre-clause TAhE)
2994  `(,@pre-clause ,@TAhE))
2995
2996(define (TAhE-post post-clause)
2997  post-clause)
2998
2999
3000(define (TEhU-clause TEhU-pre TEhU-post)
3001  `(TEhU-clause ,TEhU-pre ,@TEhU-post))
3002
3003(define (TEhU-pre pre-clause TEhU)
3004  `(,@pre-clause ,@TEhU))
3005
3006(define (TEhU-post post-clause)
3007  post-clause)
3008
3009
3010(define (TEI-clause TEI-pre TEI-post)
3011  `(TEI-clause ,TEI-pre ,@TEI-post))
3012
3013(define (TEI-pre pre-clause TEI)
3014  `(,@pre-clause ,@TEI))
3015
3016(define (TEI-post post-clause)
3017  post-clause)
3018
3019
3020(define (TO-clause TO-pre TO-post)
3021  `(TO-clause ,TO-pre ,@TO-post))
3022
3023(define (TO-pre pre-clause TO)
3024  `(,@pre-clause ,@TO))
3025
3026(define (TO-post post-clause)
3027  post-clause)
3028
3029
3030(define (TOI-clause TOI-pre TOI-post)
3031  `(TOI-clause ,TOI-pre ,@TOI-post))
3032
3033(define (TOI-pre pre-clause TOI)
3034  `(,@pre-clause ,@TOI))
3035
3036(define (TOI-post post-clause)
3037  post-clause)
3038
3039
3040(define (TUhE-clause TUhE-pre TUhE-post)
3041  `(TUhE-clause ,TUhE-pre ,@TUhE-post))
3042
3043(define (TUhE-pre pre-clause TUhE)
3044  `(,@pre-clause ,@TUhE))
3045
3046(define (TUhE-post su-clause* post-clause)
3047  `(,@(*-null su-clause*) ,@post-clause))
3048
3049
3050(define (TUhU-clause TUhU-pre TUhU-post)
3051  `(TUhU-clause ,TUhU-pre TUhU-post))
3052
3053(define (TUhU-pre pre-clause TUhU)
3054  `(,@pre-clause ,@TUhU))
3055
3056(define (TUhU-post post-clause)
3057  post-clause)
3058
3059
3060(define (UI-clause UI-pre UI-post)
3061  `(UI-clause ,UI-pre ,@UI-post))
3062
3063(define (UI-pre pre-clause UI)
3064  `(,@pre-clause ,@UI))
3065
3066(define (UI-post post-clause)
3067  post-clause)
3068
3069
3070(define (VA-clause VA-pre VA-post)
3071  `(VA-clause ,VA-pre ,@VA-post))
3072
3073(define (VA-pre pre-clause VA)
3074  `(,@pre-clause ,@VA))
3075
3076(define (VA-post post-clause)
3077  post-clause)
3078
3079
3080(define (VAU-clause VAU-pre VAU-post)
3081  `(VAU-clause ,VAU-pre ,@VAU-post))
3082
3083(define (VAU-pre pre-clause VAU)
3084  `(,@pre-clause ,@VAU))
3085
3086(define (VAU-post post-clause)
3087  post-clause)
3088
3089
3090(define (VEI-clause VEI-pre VEI-post)
3091  `(VEI-clause ,VEI-pre ,@VEI-post))
3092
3093(define (VEI-pre pre-clause VEI)
3094  `(,@pre-clause ,@VEI))
3095
3096(define (VEI-post post-clause)
3097  post-clause)
3098
3099
3100(define (VEhO-clause VEhO-pre VEhO-post)
3101  `(VEhO-clause ,VEhO-pre ,@VEhO-post))
3102
3103(define (VEhO-pre pre-clause VEhO)
3104  `(,@pre-clause ,@VEhO))
3105
3106(define (VEhO-post post-clause)
3107  post-clause)
3108
3109
3110(define (VUhU-clause VUhU-pre VUhU-post)
3111  `(VUhU-clause ,VUhU-pre ,@VUhU-post))
3112
3113(define (VUhU-pre pre-clause VUhU)
3114  `(,@pre-clause ,@VUhU))
3115
3116(define (VUhU-post post-clause)
3117  post-clause)
3118
3119
3120(define (VEhA-clause VEhA-pre VEhA-post)
3121  `(VEhA-clause ,VEhA-pre ,@VEhA-post))
3122
3123(define (VEhA-pre pre-clause VEhA)
3124  `(,@pre-clause ,@VEhA))
3125
3126(define (VEhA-post post-clause)
3127  post-clause)
3128
3129
3130(define (VIhA-clause VEhA-pre VEhA-post)
3131  `(VIhA-clause ,VEhA-pre ,@VEhA-post))
3132
3133(define (VIhA-pre pre-clause VIhA)
3134  `(,@pre-clause ,@VIhA))
3135
3136(define (VIhA-post post-clause)
3137  post-clause)
3138
3139
3140(define (VUhO-clause VUhO-pre VUhO-post)
3141  `(VUhO-clause ,VUhO-pre ,@VUhO-post))
3142
3143(define (VUhO-pre pre-clause VUhO)
3144  `(,@pre-clause ,@VUhO))
3145
3146(define (VUhO-post post-clause)
3147  post-clause)
3148
3149
3150(define (XI-clause XI-pre XI-post)
3151  `(XI-clause ,XI-pre ,@XI-post))
3152
3153(define (XI-pre pre-clause XI)
3154  `(,@pre-clause ,@XI))
3155
3156(define (XI-post post-clause)
3157  post-clause)
3158
3159
3160;(define (Y-clause Y)
3161;  `((Y-clause ,@Y)))
3162
3163
3164(define (ZAhO-clause ZAhO-pre ZAhO-post)
3165  `(ZAhO-clause ,ZAhO-pre ,@ZAhO-post))
3166
3167(define (ZAhO-pre pre-clause ZAhO)
3168  `(,@pre-clause ,@ZAhO))
3169
3170(define (ZAhO-post post-clause)
3171  post-clause)
3172
3173
3174(define (ZEhA-clause ZEhA-pre ZEhA-post)
3175  `(ZEhA-clause ,ZEhA-pre ,@ZEhA-post))
3176
3177(define (ZEhA-pre pre-clause ZEhA)
3178  `(,@pre-clause ,@ZEhA))
3179
3180(define (ZEhA-post post-clause)
3181  post-clause)
3182
3183
3184(define (ZEI-clause ZEI-pre)
3185  `(ZEI-clause ,ZEI-pre))
3186
3187(define (ZEI-pre pre-clause ZEI)
3188  `(,@pre-clause ,@ZEI))
3189
3190
3191(define (ZI-clause ZI-pre ZI-post)
3192  `(ZI-clause ,ZI-pre ,@ZI-post))
3193
3194(define (ZI-pre pre-clause ZI)
3195  `(,@pre-clause ,@ZI))
3196
3197(define (ZI-post post-clause)
3198  post-clause)
3199
3200
3201(define (ZIhE-clause ZIhE-pre ZIhE-post)
3202  `(ZIhE-clause ,ZIhE-pre ,@ZIhE-post))
3203
3204(define (ZIhE-pre pre-clause ZIhE)
3205  `(,@pre-clause ,@ZIhE))
3206
3207(define (ZIhE-post post-clause)
3208  post-clause)
3209
3210
3211(define (ZO-clause ZO-pre ZO-post)
3212  `(ZO-clause ,@ZO-pre ,@ZO-post))
3213
3214(define (ZO-pre pre-clause ZO any-word)
3215  `(,@pre-clause ,ZO ,any-word))
3216
3217(define (ZO-post post-clause)
3218  post-clause)
3219
3220
3221(define (ZOI-clause ZOI-pre ZOI-post)
3222  `(ZOI-clause ,@ZOI-pre ,@ZOI-post))
3223
3224(define (ZOI-pre pre-clause ZOI zoi-open zoi-word* zoi-close)
3225  `(,@pre-clause ,ZOI ,zoi-open ,@(*-null zoi-word*) ,zoi-close))
3226
3227(define (ZOI-post post-clause)
3228  post-clause)
3229
3230
3231(define (ZOhU-clause ZOhU-pre ZOhU-post)
3232  `(ZOhU-clause ,ZOhU-pre ,@ZOhU-post))
3233
3234(define (ZOhU-pre pre-clause ZOhU)
3235  `(,@pre-clause ,@ZOhU))
3236
3237(define (ZOhU-post post-clause)
3238  post-clause)
3239
3240
3241;; zoi
3242;;
3243(define-values (zoi-open zoi-word zoi-close)
3244  (let ((zoi '()))
3245    (values
3246      (lambda (any-word)
3247        (set! zoi any-word)
3248        any-word)
3249
3250      (lambda (any-word)
3251        (if (not (equal=? zoi any-word))
3252            any-word
3253            #f))
3254
3255      (lambda (any-word)
3256        (if (equal=? zoi any-word)
3257            any-word
3258            #f)))))
Note: See TracBrowser for help on using the repository browser.