-
Notifications
You must be signed in to change notification settings - Fork 3
/
GPRINT.lisp
1247 lines (1200 loc) · 66.1 KB
/
GPRINT.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;-*-LISP-*-
(DECLARE (FIXNUM I J K N LENGTH END RINDEX MAX DEFAULT-BCODE BCODE SPACE LEVEL
FLAGS)
(SPECIAL GCHECKRECURSION PRINLEVEL PRINLENGTH PRINMODE PRINENDLINE
PRINSTARTLINE ^R ^W OUTFILES GRINDEF GRINDPROPERTIES
GFN-GRIND-PROPERTIES G1DEFAULT-SYMBOL-CAR-GRIND-TEMPLATE
G1DEFAULT-NON-SYMBOL-CAR-GRIND-TEMPLATE TYO
G1FORMAT-DISPATCH G1FORMAT-LIST G1FORMAT-ATOM G1FORMAT-HUNK
GRIND-MACROEXPANDED)
(SPECIAL G1PRINLEVEL G1PRINLENGTH G1PRINENDLINE G1PRINSTARTLINE
G1CP G1LINELEN G1MAXINDENTLEN G1CLINE G1FREELEN
G1PENDING G1TABSIZE G1TABOFFSET G1INPTR G1PP
G1SUPPTR G1INDPTR G1SIZE G1SUPSIZE G1RSIZE
G1PRINMODE G1CHECKRECURSION G1MAINFILE G1TRUNCATED G1FILES
G1ATSTART? G1WENTUP? G1PRINTING? G1OBJ G1FLAG
G1LENGTH G1SUPSTACK G1INDSTACK G1PARENTS G1NOWPRINTING
G1FCODE G1BCODE G1BCODESTACK G1LEVEL G1RINDEX
G1OPEN-DEL G1CLOSE-DEL G1PRINC-ATOMS G1PRINT-LIKE G1EXPLODING
G1EXPLODE-RESULT)
(SPECIAL G1MISER-TEMPLATE G1BLOCK-TEMPLATE
G1CRUSH-TEMPLATE G1FN-TEMPLATE G11LEVEL-BLOCK-TEMPLATE
G1DEFUN1-TEMPLATE G1DEFUN2-TEMPLATE G11LEVEL-TBLOCK-TEMPLATE
G1APPLY-TEMPLATE G11LEVEL-MISER-TEMPLATE G1TBLOCK-TEMPLATE)
(*LEXPR GPRIN1 GPRINT PRINL PRINL1))
(DEFUN (G1ENTER-FORMAT MACRO) (U1_BODY)
((LAMBDA (F B)
((LAMBDA (U1_ITEM)
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ F (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ B (CAR U1_ITEM)))
U1_BODY)
((LAMBDA (X Y) (RPLACA X (CAR Y)) (RPLACD X (CDR Y)))
U1_BODY (LIST 'SETQ 'G1FCODE F 'G1BCODE B)))
NIL NIL))
(DEFUN (G1ENTER-FORMAT&OBJ MACRO) (U1_BODY)
((LAMBDA (F B O P L)
((LAMBDA (U1_ITEM)
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ F (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ B (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ O (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ P (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ L (CAR U1_ITEM)))
U1_BODY)
((LAMBDA (X Y) (RPLACA X (CAR Y)) (RPLACD X (CDR Y))) U1_BODY
(LIST 'PROGN (LIST 'G1ENTER-FORMAT F B) (LIST 'G1ENTER-OBJ O P L))))
NIL NIL NIL NIL NIL)))
(DEFUN GMAKE-TEMPLATE (PATTERN) (GMAKE-TEMPLATE1 PATTERN NIL NIL))
(DEFUN GMAKE-TEMPLATE1 (PATTERN OLDBACKLIST NEWBACKLIST)
(COND ((ATOM PATTERN) PATTERN)
((MEMQ PATTERN OLDBACKLIST)
((LAMBDA (OVERVAROLD OLD OVERVARNEW NEW)
(PROGN (SETQ OVERVAROLD OLDBACKLIST) (SETQ OVERVARNEW NEWBACKLIST))
(PROG NIL
U1_L (PROGN (SETQ OLD (CAR OVERVAROLD)) (SETQ NEW (CAR OVERVARNEW)))
(COND ((EQ OLD PATTERN) (RETURN NEW)))
(PROGN (SETQ OVERVAROLD (CDR OVERVAROLD)) (SETQ OVERVARNEW (CDR OVERVARNEW)))
(GO U1_L)))
NIL NIL NIL NIL))
((EQ (CAR PATTERN) '^)
((LAMBDA (OVERVARNEW NEW ICOUNT)
(PROGN (SETQ OVERVARNEW NEWBACKLIST) (SETQ ICOUNT (1- (CDR PATTERN))))
(PROG NIL
U1_L (SETQ NEW (CAR OVERVARNEW))
(COND ((ZEROP ICOUNT) (RETURN NEW)))
(PROGN (SETQ OVERVARNEW (CDR OVERVARNEW)) (SETQ ICOUNT (1- ICOUNT)))
(GO U1_L)))
NIL NIL NIL))
(((LAMBDA (NEWCONS)
(SETQ OLDBACKLIST (LIST* PATTERN OLDBACKLIST))
(SETQ NEWBACKLIST (LIST* NEWCONS NEWBACKLIST))
(RPLACA NEWCONS (GMAKE-TEMPLATE1 (CAR PATTERN) OLDBACKLIST NEWBACKLIST))
(RPLACD NEWCONS (GMAKE-TEMPLATE1 (CDR PATTERN) OLDBACKLIST NEWBACKLIST))
NEWCONS)
(NCONS NIL)))))
(DEFUN G1SET-UP-TEMPLATES NIL
(PROGN (SETQ G1MISER-TEMPLATE (GMAKE-TEMPLATE '(1. (NEVER ^ . 3.) (NORMAL ^ . 4.) ^ . 1.)))
(SETQ G1CRUSH-TEMPLATE (GMAKE-TEMPLATE '(-900. (NEVER ^ . 3.) ^ . 1.)))
(SETQ G1BLOCK-TEMPLATE (GMAKE-TEMPLATE '(1. (NEVER ^ . 3.) (BLOCK ^ . 4.) ^ . 1.)))
(SETQ G1TBLOCK-TEMPLATE (GMAKE-TEMPLATE '(1. (NEVER ^ . 3.) (TBLOCK ^ . 4.) ^ . 1.)))
(SETQ G1FN-TEMPLATE (GMAKE-TEMPLATE '(NIL (NEVER) (NEVER) (NORMAL) ^ . 1.)))
(SETQ G11LEVEL-MISER-TEMPLATE (GMAKE-TEMPLATE '(1. (NEVER) (NORMAL) ^ . 1.)))
(SETQ G11LEVEL-BLOCK-TEMPLATE (GMAKE-TEMPLATE '(1. (BLOCK) ^ . 1.)))
(SETQ G11LEVEL-TBLOCK-TEMPLATE (GMAKE-TEMPLATE '(1. (TBLOCK) ^ . 1.)))
(SETQ G1DEFAULT-SYMBOL-CAR-GRIND-TEMPLATE G1FN-TEMPLATE)
(SETQ G1DEFAULT-NON-SYMBOL-CAR-GRIND-TEMPLATE G11LEVEL-MISER-TEMPLATE)
(PUTPROP 'LAMBDA
(GMAKE-TEMPLATE '(2. (NEVER) (NEVER 1. (BLOCK) ^ . 1.) (NORMAL) ^ . 1.))
'GGRIND-TEMPLATE)
(PUTPROP 'PROG (GET 'LAMBDA 'GGRIND-TEMPLATE) 'GGRIND-TEMPLATE)
(PUTPROP 'DO (GET 'LAMBDA 'GGRIND-TEMPLATE) 'GGRIND-TEMPLATE)
(SETQ G1APPLY-TEMPLATE (GMAKE-TEMPLATE '(1. (NEVER) (BLOCK) ^ . 1.)))
(PUTPROP 'SETQ (GMAKE-TEMPLATE '(NIL (NEVER) (NEVER) (BLOCK) (ALWAYS) (BLOCK) ^ . 2.)) 'GGRIND-TEMPLATE)
(PUTPROP 'COND
(GMAKE-TEMPLATE '(NIL
(NEVER)
(NEVER 1. (NEVER) (NORMAL) ^ . 1.)
(ALWAYS 1. (NEVER) (NORMAL) ^ . 1.)
^
. 1.))
'GGRIND-TEMPLATE)
(SETQ G1DEFUN1-TEMPLATE
(GMAKE-TEMPLATE '(2. (NEVER) (NEVER 1. (NEVER) (NORMAL) ^ . 1.) (NEVER) (NORMAL) ^ . 1.)))
(SETQ G1DEFUN2-TEMPLATE (GMAKE-TEMPLATE '(2. (NEVER) (NEVER) (NEVER) (NEVER) (NORMAL) ^ . 1.)))))
(G1SET-UP-TEMPLATES)
(DEFUN G1SET-UP-GLOBALS NIL
(SETQ G1TRUNCATED NIL)
((LAMBDA (|OVERVAR([ ATOM VAL)| VAL ATOM)
(SETQ |OVERVAR([ ATOM VAL)|
'((PRINLEVEL NIL)
(PRINLENGTH NIL)
(PRINMODE GRIND)
(PRINSTARTLINE NIL)
(PRINENDLINE NIL)
(GCHECKRECURSION NIL)
(GFN-GRIND-PROPERTIES (EXPR FEXPR MACRO SUBR LSUBR FSUBR ARRAY AUTOLOAD))
(GRINDPROPERTIES (EXPR FEXPR MACRO))
(GRINDEF NIL)
(G1FORMAT-DISPATCH NIL)
(G1FORMAT-LIST NIL)
(G1FORMAT-HUNK NIL)
(G1FORMAT-ATOM NIL)
(G1NOWPRINTING NIL)
(G1SIZE NIL)))
(PROG NIL
U1_L (COND ((NULL |OVERVAR([ ATOM VAL)|) (RETURN NIL)))
((LAMBDA (U1_ITEM) (SETQ ATOM (CAR U1_ITEM)) (SETQ U1_ITEM (CDR U1_ITEM)) (SETQ VAL (CAR U1_ITEM)))
(CAR |OVERVAR([ ATOM VAL)|))
(COND ((NOT (BOUNDP ATOM)) (SET ATOM VAL)))
(SETQ |OVERVAR([ ATOM VAL)| (CDR |OVERVAR([ ATOM VAL)|))
(GO U1_L)))
NIL NIL NIL))
(G1SET-UP-GLOBALS)
(DEFUN G1SET-UP-PRINTER NIL
(SSTATUS TTYINT 19. 'GPRINTABORT)
(SSTATUS TTYINT 3. 'GCONTINUE)
(ENDPAGEFN TYO 'G1ENDPAGEFN)
(SETQ PRIN1 'GPRIN1))
(DEFUN GPRIN1 NARGS (G1PRINTER 0. (ARG 1.) (LISTIFY (- 1. NARGS))))
(DEFUN GPRINC NARGS (G1PRINTER 1. (ARG 1.) (LISTIFY (- 1. NARGS))))
(DEFUN GPRINT NARGS (G1PRINTER 2. (ARG 1.) (LISTIFY (- 1. NARGS))))
(DEFUN PRINL1 NARGS (G1PRINTER 4. (ARG 1.) (LISTIFY (- 1. NARGS))))
(DEFUN PRINLC NARGS (G1PRINTER 5. (ARG 1.) (LISTIFY (- 1. NARGS))))
(DEFUN PRINL NARGS (G1PRINTER 6. (ARG 1.) (LISTIFY (- 1. NARGS))))
(DEFUN GEXPLODE (OBJ) (G1PRINTER 8. OBJ NIL))
(DEFUN GEXPLODEC (OBJ) (G1PRINTER 9. OBJ NIL))
(DEFUN GEXPLODEL NARGS (G1PRINTER 14. (ARG 1.) (LISTIFY (- 1. NARGS))))
(DEFUN GRINDEF FEXPR (ARG)
((LAMBDA (ATOMS PROPS SELECTEDPROPS)
(PROGN ((LAMBDA (U1_ITEM)
(OR (AND (NOT (ATOM U1_ITEM))
(NOT (ATOM (CAR U1_ITEM)))
(PROGN (SETQ PROPS (CAR U1_ITEM)) (SETQ U1_ITEM (CDR U1_ITEM)) T))
T)
(SETQ ATOMS U1_ITEM))
(COND (ARG (SETQ GRINDEF ARG))
(GRINDEF)))
(SETQ SELECTEDPROPS (APPEND PROPS GRINDPROPERTIES)))
((LAMBDA (OVERVARATOM ATOM TRACED)
(SETQ OVERVARATOM ATOMS)
(PROG NIL
U1_L (COND ((NULL OVERVARATOM) (RETURN NIL)))
(PROGN (SETQ ATOM (CAR OVERVARATOM)) (SETQ TRACED (AND (STATUS FEATURE TRACE) (MEMQ ATOM (TRACE)))))
((LAMBDA (REST PROP IND)
((LAMBDA (U1_ITEM)
(SETQ IND (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ PROP (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ REST U1_ITEM))
(PLIST ATOM))
(PROG NIL
U1_L (COND ((NULL IND) (RETURN NIL)))
(COND ((AND (COND ((AND TRACED (MEMQ IND '(EXPR FEXPR MACRO)))
(SETQ TRACED NIL)
(COND ((MEMQ IND SELECTEDPROPS) (TERPRI) (PRINC '|;traced|)))
NIL)
(T))
(MEMQ IND SELECTEDPROPS))
(COND ((AND (NOT (ATOM PROP)) (EQ (CAR PROP) 'LAMBDA))
(PRINL (LIST* 'DEFUN
(NCONC (COND ((EQ IND 'EXPR) (LIST ATOM))
((MEMQ IND '(FEXPR MACRO)) (LIST ATOM IND))
((LIST (LIST ATOM IND))))
(CDR PROP)))
'GRIND))
((PRINL (LIST 'DEFPROP ATOM PROP IND) 'GRIND)))))
((LAMBDA (U1_ITEM)
(SETQ IND (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ PROP (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ REST U1_ITEM))
REST)
(GO U1_L)))
NIL NIL NIL)
(SETQ OVERVARATOM (CDR OVERVARATOM))
(GO U1_L)))
NIL NIL NIL))
NIL NIL NIL)
'||)
(DEFUN GPRINTABORT (UNUSED-F UNUSED-CH)
(NOINTERRUPT NIL)
(TYI TYI)
(COND (G1NOWPRINTING (ERRSET (*THROW 'G1PRINTABORT '|aborted|)))))
(DECLARE ((LAMBDA (OBARRAY) (REMPROP (INTERN 'CURSORPOS) (INTERN 'ACS))) SOBARRAY))
(DEFUN GCONTINUE (UNUSED-F UNUSED-CH)
(NOINTERRUPT NIL)
(TYI TYI)
(COND (G1TRUNCATED
((LAMBDA (C1PARAMS C1FILES C1OBJ C1CODE C1MAINFILE C1CP C1TRUNCATEPOS ON-SAME-LINE)
(PROGN ((LAMBDA (U1_ITEM)
(SETQ C1TRUNCATEPOS (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ C1CP (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ C1MAINFILE (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ C1CODE (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ C1OBJ (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
((LAMBDA (U1_ITEM)
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ C1FILES (CAR U1_ITEM)))
(CAR U1_ITEM))
(SETQ C1PARAMS (CAR U1_ITEM)))
G1TRUNCATED)
(SETQ ON-SAME-LINE (= (CAR C1TRUNCATEPOS) (CAR (CURSORPOS C1MAINFILE)))))
(CURSORPOS (CAR C1TRUNCATEPOS) (CDR C1TRUNCATEPOS) C1MAINFILE)
(CURSORPOS 'L C1MAINFILE)
(COND (ON-SAME-LINE (TERPRI C1FILES))
((TERPRI C1MAINFILE)))
((LAMBDA (I)
(SETQ I C1CP)
(PROG NIL
U1_L (COND ((ZEROP I) (RETURN NIL)))
(TYO 32. C1MAINFILE)
(SETQ I (1- I))
(GO U1_L)))
0.)
(G1PRINTER C1CODE ((LAMBDA (FOO) (MUNKAM (+ FOO 0.))) C1OBJ) C1PARAMS)
(COND ((NOT ON-SAME-LINE) (TERPRI G1FILES))))
NIL NIL NIL NIL NIL NIL NIL NIL)))
'||)
(DEFUN G1ENDPAGEFN (TTY)
(NOINTERRUPT NIL)
(CURSORPOS 'Z TTY)
(CURSORPOS 'L TTY)
(PRINC '|**more**| TTY)
((LAMBDA (ECHOFILES) (TYI)) NIL)
(CURSORPOS 'Z TTY)
(CURSORPOS 'L TTY)
(CURSORPOS 'TOP TTY)
(CURSORPOS 'L TTY))
(DEFUN G1PRINTER (CODE OBJ INITS)
(COND (G1NOWPRINTING
((LAMBDA (G1NOWPRINTING G1OBJ G1FLAG G1LENGTH G1SUPSTACK G1INDSTACK G1PARENTS G1SIZE G1SUPSIZE G1RSIZE
G1PRINLEVEL G1PRINLENGTH G1PRINENDLINE G1PRINSTARTLINE G1CP G1LINELEN G1MAXINDENTLEN G1CLINE
G1FREELEN G1PENDING G1TABSIZE G1TABOFFSET G1INPTR G1PP G1SUPPTR G1INDPTR G1PRINMODE
G1CHECKRECURSION G1MAINFILE G1FILES G1ATSTART? G1WENTUP? G1PRINTING? G1FCODE G1BCODE
G1BCODESTACK G1OPEN-DEL G1CLOSE-DEL G1LEVEL G1RINDEX G1PRINC-ATOMS G1PRINT-LIKE G1EXPLODING
G1EXPLODE-RESULT)
(G1PRINTER CODE OBJ INITS))
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL))
(((LAMBDA (G1NOWPRINTING)
(SETQ G1NOWPRINTING T)
(PROGN (SETQ G1PRINC-ATOMS (NOT (ZEROP (BOOLE 1. 1. CODE))))
(SETQ G1PRINT-LIKE (NOT (ZEROP (BOOLE 1. 2. CODE))))
(SETQ G1EXPLODING (NOT (ZEROP (BOOLE 1. 8. CODE))))
(SETQ G1CHECKRECURSION GCHECKRECURSION))
(COND ((ZEROP (BOOLE 1. 4. CODE))
(PROGN (SETQ G1PRINLEVEL (OR PRINLEVEL 64000.))
(SETQ G1PRINLENGTH (OR PRINLENGTH 64000.))
(SETQ G1PRINENDLINE (OR PRINENDLINE 64000.))
(SETQ G1PRINSTARTLINE (OR PRINSTARTLINE 0.))
(SETQ G1PRINMODE PRINMODE)))
(T
(PROGN (SETQ G1PRINLEVEL 64000.)
(SETQ G1PRINLENGTH 64000.)
(SETQ G1PRINENDLINE 64000.)
(SETQ G1PRINSTARTLINE 0.)
(SETQ G1PRINMODE NIL))
((LAMBDA (U1_ITEM)
(AND (OR (AND (NOT (ATOM U1_ITEM))
(COND ((NUMBERP (CAR U1_ITEM)) (SETQ G1PRINLEVEL (CAR U1_ITEM)))
((NULL (CAR U1_ITEM))))
(PROGN (SETQ U1_ITEM (CDR U1_ITEM)) T))
T)
(OR (AND (NOT (ATOM U1_ITEM))
(COND ((NUMBERP (CAR U1_ITEM)) (SETQ G1PRINLENGTH (CAR U1_ITEM)))
((NULL (CAR U1_ITEM))))
(PROGN (SETQ U1_ITEM (CDR U1_ITEM)) T))
T)
(OR (AND (NOT (ATOM U1_ITEM))
(COND ((NUMBERP (CAR U1_ITEM)) (SETQ G1PRINENDLINE (CAR U1_ITEM)))
((NULL (CAR U1_ITEM))))
(PROGN (SETQ U1_ITEM (CDR U1_ITEM)) T))
T)
(OR (AND (NOT (ATOM U1_ITEM))
(COND ((NUMBERP (CAR U1_ITEM)) (SETQ G1PRINSTARTLINE (CAR U1_ITEM)))
((NULL (CAR U1_ITEM))))
(PROGN (SETQ U1_ITEM (CDR U1_ITEM)) T))
T)
(OR (AND (NOT (ATOM U1_ITEM))
(OR (MEMQ (CAR U1_ITEM) '(GRIND BLOCK TBLOCK MISER CRUSH))
(NULL (CAR U1_ITEM))
(AND (NOT (ATOM (CAR U1_ITEM)))
(NOT (ATOM (CDR (CAR U1_ITEM))))
(NOT (ATOM (CADR (CAR U1_ITEM))))))
(PROGN (SETQ G1PRINMODE (CAR U1_ITEM)) (SETQ U1_ITEM (CDR U1_ITEM)) T))
T)
(PROGN (SETQ INITS U1_ITEM) T)))
INITS)))
(PROGN (SETQ G1PRINMODE
(COND ((EQ G1PRINMODE 'GRIND) NIL)
((EQ G1PRINMODE 'CRUSH) G1CRUSH-TEMPLATE)
((EQ G1PRINMODE 'TBLOCK) G1TBLOCK-TEMPLATE)
((EQ G1PRINMODE 'BLOCK) G1BLOCK-TEMPLATE)
((EQ G1PRINMODE 'MISER) G1MISER-TEMPLATE)
(G1PRINMODE)))
(SETQ G1FILES
(COND ((OR (NOT (ATOM (CAR INITS))) (NULL (CAR INITS))) (CAR INITS))
(INITS))))
(COND ((AND (NOT G1EXPLODING) G1PRINT-LIKE (NOT (> G1PRINSTARTLINE 0.))) (TERPRI G1FILES)))
(COND ((AND (ATOM OBJ) (NULL G1FORMAT-DISPATCH) (NULL G1FORMAT-ATOM) (NOT G1EXPLODING))
(COND (G1PRINC-ATOMS (PRINC OBJ G1FILES))
((NOT (EQ OBJ '||)) (PRIN1 OBJ G1FILES))))
(T
(G1FORMAT-INIT)
(COND ((NULL (ERRSET (COND ((*CATCH 'G1PRINTABORT
(COND (G1FORMAT-DISPATCH
(FUNCALL G1FORMAT-DISPATCH G1PRINMODE OBJ))
((G1FORMAT-DISPATCH G1PRINMODE OBJ))))
(COND ((NOT G1EXPLODING)
(SETQ G1TRUNCATED
(LIST (CURSORPOS G1MAINFILE)
G1CP
G1MAINFILE
(BOOLE 7. CODE 4.)
(MAKNUM OBJ)
(LIST G1PRINLEVEL
G1PRINLENGTH
NIL
G1CLINE
G1PRINMODE
G1FILES)))
(COND ((AND G1PRINTING? (PLUSP G1FREELEN))
(PRINC '| ---| G1FILES)))))))))
(COND ((NULL (ERRSET ((LAMBDA (PRIN1) (PRINT '|error while GPRINTing:|) (PRINT OBJ)) NIL)))
((LAMBDA (PRIN1) (PRINT '|error while PRINTing MUNKAM of |) (PRINC (MAKNUM OBJ)))
NIL)))))))
(COND ((AND (NOT G1EXPLODING) G1PRINT-LIKE (NULL G1TRUNCATED) G1PRINTING?) (TYO 32. G1FILES)))
(COND (G1EXPLODING (PROG2 NIL (NREVERSE G1EXPLODE-RESULT) (SETQ G1EXPLODE-RESULT NIL)))
(T)))
NIL))))
(DEFUN G1FORMAT-INIT NIL
(COND ((NULL G1SIZE)
(PROGN (SETQ G1OBJ (ARRAY NIL NIL 100.))
(SETQ G1FLAG (ARRAY NIL FIXNUM 100.))
(SETQ G1LENGTH (ARRAY NIL FIXNUM 100.))
(SETQ G1SUPSTACK (ARRAY NIL FIXNUM 50.))
(SETQ G1BCODESTACK (ARRAY NIL FIXNUM 50.))
(SETQ G1INDSTACK (ARRAY NIL FIXNUM 50.))
(SETQ G1PARENTS (ARRAY NIL NIL 50.))
(SETQ G1SIZE 100.)
(SETQ G1SUPSIZE 50.)
(SETQ G1RSIZE 50.))))
(PROGN (SETQ G1MAINFILE
(COND (G1FILES (CAR G1FILES))
((AND ^R ^W (CAR OUTFILES)))
(TYO)))
(SETQ G1CP (CHARPOS G1MAINFILE))
(SETQ G1LINELEN (- (LINEL G1MAINFILE) 5.))
(SETQ G1MAXINDENTLEN (+ G1CP (* 4. (// (- G1LINELEN G1CP) 5.))))
(SETQ G1CLINE 0.)
(SETQ G1ATSTART? T)
(SETQ G1FREELEN (- G1LINELEN G1CP))
(SETQ G1PENDING 0.)
(SETQ G1WENTUP? NIL)
(SETQ G1PRINTING? (NOT (> G1PRINSTARTLINE 0.)))
(SETQ G1TABSIZE 1.)
(SETQ G1TABOFFSET 0.)
(SETQ G1INPTR -1.)
(SETQ G1PP 0.)
(SETQ G1SUPPTR 0.)
(STORE (ARRAYCALL FIXNUM G1SUPSTACK 0.) 0.)
(SETQ G1INDPTR 0.)
(STORE (ARRAYCALL FIXNUM G1INDSTACK 0.) G1CP)
(SETQ G1OPEN-DEL NIL)
(SETQ G1CLOSE-DEL NIL)
(SETQ G1FCODE 'NEVER)
(SETQ G1BCODE 0.)
(SETQ G1LEVEL G1PRINLEVEL)
(SETQ G1RINDEX 0.)
(SETQ G1EXPLODE-RESULT NIL)))
(DEFUN G1FORMAT-DISPATCH (TEMPLATE ITEM)
(COND ((HUNKP ITEM)
(COND (G1FORMAT-HUNK
(FUNCALL G1FORMAT-HUNK
(COND (TEMPLATE)
(G11LEVEL-BLOCK-TEMPLATE))
ITEM))
((G1FORMAT-HUNK (COND (TEMPLATE)
(G11LEVEL-BLOCK-TEMPLATE))
ITEM))))
((EQ (TYPEP ITEM) 'LIST)
(COND (TEMPLATE
(COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMPLATE ITEM))
((G1FORMAT-LIST TEMPLATE ITEM))))
(((LAMBDA (HEAD SYMBOL? GRIND-FN TEMPLATE)
(PROGN (SETQ HEAD (CAR ITEM))
(SETQ SYMBOL? (EQ (TYPEP HEAD) 'SYMBOL))
(SETQ GRIND-FN (COND (SYMBOL? (GET HEAD 'GGRIND-FN))))
(SETQ TEMPLATE
(COND (SYMBOL?
(COND ((GET HEAD 'GGRIND-TEMPLATE))
((GETL HEAD GFN-GRIND-PROPERTIES) G1FN-TEMPLATE)
(G1DEFAULT-SYMBOL-CAR-GRIND-TEMPLATE)))
((AND (EQ (TYPEP HEAD) 'LIST) (EQ (CAR HEAD) 'LAMBDA)) G1APPLY-TEMPLATE)
(G1DEFAULT-NON-SYMBOL-CAR-GRIND-TEMPLATE))))
(COND (GRIND-FN (FUNCALL GRIND-FN TEMPLATE ITEM))
((COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMPLATE ITEM))
((G1FORMAT-LIST TEMPLATE ITEM))))))
NIL NIL NIL NIL))))
((COND (G1FORMAT-ATOM (FUNCALL G1FORMAT-ATOM TEMPLATE ITEM))
((G1ENTER-OBJ ITEM
(COND (G1PRINC-ATOMS 'PRINC)
('PRIN1))
NIL)))))
NIL)
(DEFUN G1RCHECK (ITEM)
(COND ((OR (ATOM ITEM) (NOT G1CHECKRECURSION)) ITEM)
(T
(COND ((NOT (< G1RINDEX G1RSIZE))
(SETQ G1RSIZE (+ G1RINDEX 25.))
(*REARRAY G1PARENTS (CAR (ARRAYDIMS G1PARENTS)) G1RSIZE)))
((LAMBDA (I)
(SETQ I 0.)
(PROG NIL
U1_L (PROGN (COND ((= I G1RINDEX)
(STORE (ARRAYCALL NIL G1PARENTS I) ITEM)
(SETQ G1RINDEX (1+ G1RINDEX))
(RETURN ITEM)))
(COND ((EQ ITEM (ARRAYCALL NIL G1PARENTS I))
(RETURN (IMPLODE (APPEND '(^) (EXPLODEN (- G1RINDEX I))))))))
(SETQ I (1+ I))
(GO U1_L)))
0.))))
(DEFUN G1FORMAT-LIST (|U1_ARG1.| LIST)
((LAMBDA (ICODE TEMP)
((LAMBDA (U1_ITEM) (SETQ ICODE (CAR U1_ITEM)) (SETQ U1_ITEM (CDR U1_ITEM)) (SETQ TEMP U1_ITEM)) |U1_ARG1.|)
((LAMBDA (ORINDEX OLEVEL CLOSE-DEL OPEN-DEL)
(PROGN (SETQ G1OPEN-DEL NIL) (SETQ G1CLOSE-DEL NIL))
(COND ((ZEROP G1LEVEL) (G1ENTER-OBJ '/# 'PRINC NIL))
((ATOM (SETQ LIST (G1RCHECK LIST))) (G1ENTER-OBJ LIST 'PRINC NIL))
(T
(SETQ G1LEVEL (1- G1LEVEL))
(COND ((NULL ICODE)
(COND ((NULL OPEN-DEL) (SETQ ICODE 1.))
((SETQ ICODE (FLATC OPEN-DEL))))
(COND ((ATOM (CAR LIST))
(COND (G1PRINC-ATOMS (SETQ ICODE (+ ICODE 1. (FLATC (CAR LIST)))))
((SETQ ICODE (+ ICODE 1. (FLATSIZE (CAR LIST))))))))))
(G1ENTER-OBJ ICODE NIL 'START)
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ (OR OPEN-DEL '|(|) 'PRINC NIL))
((LAMBDA (I REST HEAD RTEMP SUBTEMP FCODE)
(PROGN (SETQ I
(COND ((ZEROP G1LEVEL) 2.)
(G1PRINLENGTH)))
((LAMBDA (U1_ITEM)
(SETQ HEAD (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ REST U1_ITEM))
LIST)
((LAMBDA (U1_ITEM)
((LAMBDA (U1_ITEM)
(SETQ FCODE (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ SUBTEMP U1_ITEM))
(CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ RTEMP U1_ITEM))
TEMP))
(PROG NIL
U1_L (PROGN (COND ((OR (MINUSP I) (AND (ZEROP I) (OR REST (NOT (ATOM HEAD)))))
(PROGN (SETQ G1FCODE FCODE
G1BCODE 0.)
(G1ENTER-OBJ '|...| 'PRINC NIL))
(RETURN NIL)))
(SETQ G1FCODE FCODE
G1BCODE
(COND ((NULL REST) 0.)
(1.)))
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH SUBTEMP HEAD))
((G1FORMAT-DISPATCH SUBTEMP HEAD)))
(COND ((NULL REST) (RETURN NIL)))
(COND ((NOT (EQ (TYPEP (SETQ REST (G1RCHECK REST))) 'LIST))
(PROGN (SETQ G1FCODE (CAAR RTEMP)
G1BCODE 1.)
(G1ENTER-OBJ '|.| 'PRINC NIL))
(SETQ G1FCODE 'NEVER
G1BCODE 0.)
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH (CDAR RTEMP) REST))
((G1FORMAT-DISPATCH (CDAR RTEMP) REST)))
(RETURN NIL))))
(PROGN (SETQ I (1- I))
((LAMBDA (U1_ITEM)
(SETQ HEAD (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ REST U1_ITEM))
REST)
((LAMBDA (U1_ITEM)
((LAMBDA (U1_ITEM)
(SETQ FCODE (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ SUBTEMP U1_ITEM))
(CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ RTEMP U1_ITEM))
RTEMP))
(GO U1_L)))
0. NIL NIL NIL NIL NIL)
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ (OR CLOSE-DEL '|)|) 'PRINC 'END))
(PROGN (SETQ G1RINDEX ORINDEX) (SETQ G1LEVEL OLEVEL)))))
G1RINDEX G1LEVEL G1CLOSE-DEL G1OPEN-DEL))
NIL NIL))
(DEFUN G1FORMAT-LSUBR NARGS
((LAMBDA (TEMP ICODE OLEVEL CLOSE-DEL OPEN-DEL)
(PROGN ((LAMBDA (U1_ITEM) (SETQ ICODE (CAR U1_ITEM)) (SETQ U1_ITEM (CDR U1_ITEM)) (SETQ TEMP U1_ITEM))
(ARG 1.))
(SETQ OLEVEL G1LEVEL)
(SETQ CLOSE-DEL G1CLOSE-DEL)
(SETQ OPEN-DEL G1OPEN-DEL))
(PROGN (SETQ G1OPEN-DEL NIL) (SETQ G1CLOSE-DEL NIL))
(COND ((ZEROP G1LEVEL) (G1ENTER-OBJ '/# 'PRINC NIL))
(T
(SETQ G1LEVEL (1- G1LEVEL))
(COND ((NULL ICODE)
(COND ((NULL OPEN-DEL) (SETQ ICODE 1.))
((SETQ ICODE (FLATC OPEN-DEL))))
(COND ((ATOM (ARG 2.))
(COND (G1PRINC-ATOMS (SETQ ICODE (+ ICODE 1. (FLATC (ARG 2.)))))
((SETQ ICODE (+ ICODE 1. (FLATSIZE (ARG 2.))))))))))
(G1ENTER-OBJ ICODE NIL 'START)
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ (OR OPEN-DEL '|(|) 'PRINC NIL))
((LAMBDA (I J HEAD RTEMP SUBTEMP FCODE)
(PROGN (SETQ I
(COND ((ZEROP G1LEVEL) 2.)
(G1PRINLENGTH)))
(SETQ J 2.)
((LAMBDA (U1_ITEM)
((LAMBDA (U1_ITEM)
(SETQ FCODE (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ SUBTEMP U1_ITEM))
(CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ RTEMP U1_ITEM))
TEMP))
(PROG NIL
U1_L (COND ((> J NARGS) (RETURN NIL)))
(SETQ HEAD (ARG J))
(PROGN (COND ((OR (MINUSP I) (AND (ZEROP I) (OR (< J NARGS) (NOT (ATOM HEAD)))))
(PROGN (SETQ G1FCODE FCODE
G1BCODE 0.)
(G1ENTER-OBJ '|...| 'PRINC NIL))
(RETURN NIL)))
(SETQ G1FCODE FCODE
G1BCODE
(COND ((= J NARGS) 0.)
(1.)))
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH SUBTEMP HEAD))
((G1FORMAT-DISPATCH SUBTEMP HEAD))))
(PROGN (SETQ I (1- I))
(SETQ J (1+ J))
((LAMBDA (U1_ITEM)
((LAMBDA (U1_ITEM)
(SETQ FCODE (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ SUBTEMP U1_ITEM))
(CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ RTEMP U1_ITEM))
RTEMP))
(GO U1_L)))
0. 0. NIL NIL NIL NIL)
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ (OR CLOSE-DEL '|)|) 'PRINC 'END))
(SETQ G1LEVEL OLEVEL))))
NIL NIL NIL NIL NIL))
(DEFUN G1FORMAT-HUNK (|U1_ARG1.| HUNK)
((LAMBDA (ICODE TEMP)
((LAMBDA (U1_ITEM) (SETQ ICODE (CAR U1_ITEM)) (SETQ U1_ITEM (CDR U1_ITEM)) (SETQ TEMP U1_ITEM)) |U1_ARG1.|)
((LAMBDA (ORINDEX OLEVEL CLOSE-DEL OPEN-DEL END)
(PROGN (SETQ ORINDEX G1RINDEX)
(SETQ OLEVEL G1LEVEL)
(SETQ CLOSE-DEL G1CLOSE-DEL)
(SETQ OPEN-DEL G1OPEN-DEL)
(SETQ END (1- (HUNKSIZE HUNK))))
(PROGN (SETQ G1OPEN-DEL NIL) (SETQ G1CLOSE-DEL NIL))
(COND ((ZEROP G1LEVEL) (G1ENTER-OBJ '/# 'PRINC NIL))
((ATOM (SETQ HUNK (G1RCHECK HUNK))) (G1ENTER-OBJ HUNK 'PRINC NIL))
(T
(SETQ G1LEVEL (1- G1LEVEL))
(COND ((NULL ICODE)
(COND ((NULL OPEN-DEL) (SETQ ICODE 1.))
((SETQ ICODE (FLATC OPEN-DEL))))
(COND ((ATOM (CXR 1. HUNK))
(COND (G1PRINC-ATOMS (SETQ ICODE (+ ICODE 1. (FLATC (CXR 1. HUNK)))))
((SETQ ICODE (+ ICODE 1. (FLATSIZE (CXR 1. HUNK))))))))))
(G1ENTER-OBJ ICODE NIL 'START)
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ (OR OPEN-DEL '{) 'PRINC NIL))
((LAMBDA (I J HEAD RTEMP SUBTEMP FCODE)
(PROGN (SETQ I
(COND ((ZEROP G1LEVEL) 2.)
(G1PRINLENGTH)))
(SETQ J 1.)
((LAMBDA (U1_ITEM)
((LAMBDA (U1_ITEM)
(SETQ FCODE (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ SUBTEMP U1_ITEM))
(CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ RTEMP U1_ITEM))
TEMP))
(PROG NIL
U1_L (COND ((> J END) (RETURN NIL)))
(SETQ HEAD (CXR J HUNK))
(PROGN (SETQ TEMP RTEMP)
(COND ((OR (MINUSP I) (AND (ZEROP I) (OR (< J END) (NOT (ATOM HEAD)))))
(PROGN (SETQ G1FCODE FCODE
G1BCODE 0.)
(G1ENTER-OBJ '|...| 'PRINC NIL))
(RETURN NIL)))
(SETQ G1FCODE FCODE
G1BCODE 1.)
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH SUBTEMP HEAD))
((G1FORMAT-DISPATCH SUBTEMP HEAD))))
(PROGN (SETQ I (1- I))
(SETQ J (1+ J))
((LAMBDA (U1_ITEM)
((LAMBDA (U1_ITEM)
(SETQ FCODE (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ SUBTEMP U1_ITEM))
(CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ RTEMP U1_ITEM))
RTEMP))
(GO U1_L)))
0. 0. NIL NIL NIL NIL)
(SETQ G1FCODE (CAAR TEMP)
G1BCODE 0.)
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH (CDAR TEMP) (CXR 0. HUNK)))
((G1FORMAT-DISPATCH (CDAR TEMP) (CXR 0. HUNK))))
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ (OR CLOSE-DEL '}) 'PRINC 'END))
(PROGN (SETQ G1RINDEX ORINDEX) (SETQ G1LEVEL OLEVEL)))))
NIL NIL NIL NIL 0.))
NIL NIL))
(PROGN 'COMPILE
(DECLARE (DEFUN GMAKE-INVERT-QUOTE-FN MACRO (U1_BODY)
((LAMBDA (ATOM OPEN-DEL CLOSE-DEL)
(COND ((NOT ((LAMBDA (U1_ITEM)
(AND (NOT (ATOM U1_ITEM))
(PROGN (SETQ U1_ITEM (CDR U1_ITEM)) (NOT (ATOM U1_ITEM)))
(PROGN (SETQ ATOM (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(NOT (ATOM U1_ITEM)))
(PROGN (SETQ OPEN-DEL (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(OR (AND (NOT (ATOM U1_ITEM))
(PROGN (SETQ CLOSE-DEL (CAR U1_ITEM))
(NULL (CDR U1_ITEM))))
T))))
U1_BODY))
(ERROR 'BAD-ARGS-TO-GMAKE-INVERT-QUOTE-FN (LIST U1_BODY))))
((LAMBDA (X Y) (RPLACA X (CAR Y)) (RPLACD X (CDR Y))) U1_BODY
(COND (CLOSE-DEL
(LIST 'DEFUN
(LIST* ATOM '(GGRIND-FN))
'(TEMP ITEM)
(LIST* 'COND
(LIST '(NULL (CDR ITEM))
(LIST* 'G1ENTER-OBJ
(LIST 'QUOTE
(IMPLODE (NCONC (EXPLODEC OPEN-DEL)
(EXPLODEC CLOSE-DEL))))
'('PRINC NIL)))
(LIST* '(NOT (ATOM (CDR ITEM)))
(LIST 'SETQ
'G1OPEN-DEL
(LIST 'QUOTE OPEN-DEL)
'G1CLOSE-DEL
(LIST 'QUOTE CLOSE-DEL))
'((COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP (CDR ITEM)))
((G1FORMAT-LIST TEMP (CDR ITEM))))))
'(((COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP ITEM))
((G1FORMAT-LIST TEMP ITEM))))))))
((LIST 'DEFUN
(LIST* ATOM '(GGRIND-FN))
'(TEMP ITEM)
(LIST* 'COND
(LIST* '(AND (NOT (ATOM (CDR ITEM))) (NULL (CDDR ITEM)))
(LIST* 'SETQ
'G1OPEN-DEL
(LIST 'QUOTE OPEN-DEL)
'(G1CLOSE-DEL '|| G1LEVEL (1+ G1LEVEL)))
'((COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP (CDR ITEM)))
((G1FORMAT-LIST TEMP (CDR ITEM))))
(SETQ G1LEVEL (1- G1LEVEL))))
'(((COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP ITEM))
((G1FORMAT-LIST TEMP ITEM)))))))))))
NIL NIL NIL)))
(DEFUN (GMAKE-INVERT-QUOTE-FN MACRO) (U1_BODY)
((LAMBDA (ATOM OPEN-DEL CLOSE-DEL)
(COND ((NOT ((LAMBDA (U1_ITEM)
(AND (NOT (ATOM U1_ITEM))
(PROGN (SETQ U1_ITEM (CDR U1_ITEM)) (NOT (ATOM U1_ITEM)))
(PROGN (SETQ ATOM (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(NOT (ATOM U1_ITEM)))
(PROGN (SETQ OPEN-DEL (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(OR (AND (NOT (ATOM U1_ITEM))
(PROGN (SETQ CLOSE-DEL (CAR U1_ITEM)) (NULL (CDR U1_ITEM))))
T))))
U1_BODY))
(ERROR 'BAD-ARGS-TO-GMAKE-INVERT-QUOTE-FN (LIST U1_BODY))))
((LAMBDA (X Y) (RPLACA X (CAR Y)) (RPLACD X (CDR Y))) U1_BODY
(COND (CLOSE-DEL
(LIST 'DEFUN
(LIST* ATOM '(GGRIND-FN))
'(TEMP ITEM)
(LIST* 'COND
(LIST '(NULL (CDR ITEM))
(LIST* 'G1ENTER-OBJ
(LIST 'QUOTE
(IMPLODE (NCONC (EXPLODEC OPEN-DEL) (EXPLODEC CLOSE-DEL))))
'('PRINC NIL)))
(LIST* '(NOT (ATOM (CDR ITEM)))
(LIST 'SETQ
'G1OPEN-DEL
(LIST 'QUOTE OPEN-DEL)
'G1CLOSE-DEL
(LIST 'QUOTE CLOSE-DEL))
'((COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP (CDR ITEM)))
((G1FORMAT-LIST TEMP (CDR ITEM))))))
'(((COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP ITEM))
((G1FORMAT-LIST TEMP ITEM))))))))
((LIST 'DEFUN
(LIST* ATOM '(GGRIND-FN))
'(TEMP ITEM)
(LIST* 'COND
(LIST* '(AND (NOT (ATOM (CDR ITEM))) (NULL (CDDR ITEM)))
(LIST* 'SETQ
'G1OPEN-DEL
(LIST 'QUOTE OPEN-DEL)
'(G1CLOSE-DEL '|| G1LEVEL (1+ G1LEVEL)))
'((COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP (CDR ITEM)))
((G1FORMAT-LIST TEMP (CDR ITEM))))
(SETQ G1LEVEL (1- G1LEVEL))))
'(((COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP ITEM))
((G1FORMAT-LIST TEMP ITEM)))))))))))
NIL NIL NIL)))
(DEFUN (QUOTE GGRIND-FN) (TEMP ITEM)
(COND ((AND (NOT (ATOM (CDR ITEM))) (NULL (CDDR ITEM)))
(SETQ G1OPEN-DEL '/'
G1CLOSE-DEL '||
G1LEVEL (1+ G1LEVEL))
(COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP (CDR ITEM)))
((G1FORMAT-LIST TEMP (CDR ITEM))))
(SETQ G1LEVEL (1- G1LEVEL)))
((COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP ITEM))
((G1FORMAT-LIST TEMP ITEM))))))
(PROGN 'COMPILE
(DECLARE (DEFUN GMAKE-INVERT-QUOTE-FN2 MACRO (U1_BODY)
((LAMBDA (INTERNAL-ATOM EXTERNAL-ATOM)
(COND ((NOT ((LAMBDA (U1_ITEM)
(AND (NOT (ATOM U1_ITEM))
(PROGN (SETQ U1_ITEM (CDR U1_ITEM)) (NOT (ATOM U1_ITEM)))
(PROGN (SETQ INTERNAL-ATOM (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(NOT (ATOM U1_ITEM)))
(PROGN (SETQ EXTERNAL-ATOM (CAR U1_ITEM)) (NULL (CDR U1_ITEM)))))
U1_BODY))
(ERROR 'BAD-ARGS-TO-GMAKE-INVERT-QUOTE-FN2 (LIST U1_BODY))))
((LAMBDA (X Y) (RPLACA X (CAR Y)) (RPLACD X (CDR Y))) U1_BODY
(LIST* 'DEFUN
(LIST* INTERNAL-ATOM '(GGRIND-FN))
'(TEMP ITEM)
'(G1ENTER-OBJ 0. NIL 'START)
(LIST* 'G1ENTER-FORMAT&OBJ ''NEVER '0. (LIST 'QUOTE EXTERNAL-ATOM) '('PRINC NIL))
'((G1ENTER-FORMAT 'NEVER 0.)
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH TEMP (CDR ITEM)))
((G1FORMAT-DISPATCH TEMP (CDR ITEM))))
(G1ENTER-OBJ '|| 'PRINC 'END)))))
NIL NIL)))
(DEFUN (GMAKE-INVERT-QUOTE-FN2 MACRO) (U1_BODY)
((LAMBDA (INTERNAL-ATOM EXTERNAL-ATOM)
(COND ((NOT ((LAMBDA (U1_ITEM)
(AND (NOT (ATOM U1_ITEM))
(PROGN (SETQ U1_ITEM (CDR U1_ITEM)) (NOT (ATOM U1_ITEM)))
(PROGN (SETQ INTERNAL-ATOM (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(NOT (ATOM U1_ITEM)))
(PROGN (SETQ EXTERNAL-ATOM (CAR U1_ITEM)) (NULL (CDR U1_ITEM)))))
U1_BODY))
(ERROR 'BAD-ARGS-TO-GMAKE-INVERT-QUOTE-FN2 (LIST U1_BODY))))
((LAMBDA (X Y) (RPLACA X (CAR Y)) (RPLACD X (CDR Y))) U1_BODY
(LIST* 'DEFUN
(LIST* INTERNAL-ATOM '(GGRIND-FN))
'(TEMP ITEM)
'(G1ENTER-OBJ 0. NIL 'START)
(LIST* 'G1ENTER-FORMAT&OBJ ''NEVER '0. (LIST 'QUOTE EXTERNAL-ATOM) '('PRINC NIL))
'((G1ENTER-FORMAT 'NEVER 0.)
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH TEMP (CDR ITEM)))
((G1FORMAT-DISPATCH TEMP (CDR ITEM))))
(G1ENTER-OBJ '|| 'PRINC 'END)))))
NIL NIL)))
(DEFUN (|`-expander/|| GGRIND-FN) (TEMP ITEM)
(G1ENTER-OBJ 0. NIL 'START)
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ '/` 'PRINC NIL))
(SETQ G1FCODE 'NEVER
G1BCODE 0.)
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH TEMP (CDR ITEM)))
((G1FORMAT-DISPATCH TEMP (CDR ITEM))))
(G1ENTER-OBJ '|| 'PRINC 'END))
(DEFUN (|`,/|| GGRIND-FN) (TEMP ITEM)
(G1ENTER-OBJ 0. NIL 'START)
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ '/, 'PRINC NIL))
(SETQ G1FCODE 'NEVER
G1BCODE 0.)
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH TEMP (CDR ITEM)))
((G1FORMAT-DISPATCH TEMP (CDR ITEM))))
(G1ENTER-OBJ '|| 'PRINC 'END))
(DEFUN (|`,@/|| GGRIND-FN) (TEMP ITEM)
(G1ENTER-OBJ 0. NIL 'START)
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ '/,@ 'PRINC NIL))
(SETQ G1FCODE 'NEVER
G1BCODE 0.)
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH TEMP (CDR ITEM)))
((G1FORMAT-DISPATCH TEMP (CDR ITEM))))
(G1ENTER-OBJ '|| 'PRINC 'END))
(DEFUN (|`,./|| GGRIND-FN) (TEMP ITEM)
(G1ENTER-OBJ 0. NIL 'START)
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ '|,.| 'PRINC NIL))
(SETQ G1FCODE 'NEVER
G1BCODE 0.)
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH TEMP (CDR ITEM)))
((G1FORMAT-DISPATCH TEMP (CDR ITEM))))
(G1ENTER-OBJ '|| 'PRINC 'END))
(DEFUN (DEFUN GGRIND-FN) (TEMP ITEM)
(SETQ TEMP
(COND ((AND ((LAMBDA (U1_ITEM)
(AND (NOT (ATOM U1_ITEM))
(PROGN (SETQ U1_ITEM (CDR U1_ITEM)) (NOT (ATOM U1_ITEM)))
(PROGN (SETQ U1_ITEM (CDR U1_ITEM)) (NOT (ATOM U1_ITEM)))))
ITEM)
(OR (MEMQ (CADR ITEM) '(EXPR FEXPR MACRO)) (MEMQ (CADDR ITEM) '(EXPR FEXPR MACRO))))
G1DEFUN2-TEMPLATE)
(G1DEFUN1-TEMPLATE)))
(COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMP ITEM))
((G1FORMAT-LIST TEMP ITEM))))
(DEFUN (MACROEXPANDED GGRIND-FN) (TEMP ITEM)
(SETQ ITEM
(COND (GRIND-MACROEXPANDED (CADDDR (CDR ITEM)))
(T (CADDDR ITEM))))
(SETQ G1LEVEL (1+ G1LEVEL))
(COND (G1FORMAT-DISPATCH (FUNCALL G1FORMAT-DISPATCH TEMP ITEM))
((G1FORMAT-DISPATCH TEMP ITEM)))
(SETQ G1LEVEL (1- G1LEVEL)))
(DEFUN (PROG GGRIND-FN) (TEMPLATE LIST)
(COND (((LAMBDA (OVERVAR_ _ I OVER-ACC)
(PROGN (SETQ OVERVAR_ (CDDR LIST)) (SETQ I 0.) (SETQ OVER-ACC T))
(PROG NIL
U1_L (COND ((ATOM OVERVAR_) (RETURN OVER-ACC)))
(SETQ _ (CAR OVERVAR_))
(SETQ OVER-ACC (OR (AND (< I 50.) (NOT (ATOM _))) (RETURN NIL)))
(PROGN (SETQ OVERVAR_ (CDR OVERVAR_)) (SETQ I (1+ I)))
(GO U1_L)))
NIL NIL 0. NIL)
(COND (G1FORMAT-LIST (FUNCALL G1FORMAT-LIST TEMPLATE LIST))
((G1FORMAT-LIST TEMPLATE LIST))))
(((LAMBDA (ORINDEX OLEVEL DEFAULT-BCODE BCODE ANY-LABS-YET?)
(PROGN (SETQ ORINDEX G1RINDEX) (SETQ OLEVEL G1LEVEL) (SETQ ANY-LABS-YET? NIL))
(COND (G1PRINC-ATOMS (SETQ DEFAULT-BCODE (1+ (FLATC (CAR LIST)))))
((SETQ DEFAULT-BCODE (1+ (FLATSIZE (CAR LIST))))))
(SETQ BCODE DEFAULT-BCODE)
(COND ((ZEROP G1LEVEL) (G1ENTER-OBJ '/# 'PRINC NIL))
((ATOM (SETQ LIST (G1RCHECK LIST))) (G1ENTER-OBJ LIST 'PRINC NIL))
(T
(SETQ G1LEVEL (1- G1LEVEL))
(G1ENTER-OBJ 1. NIL 'START)
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ '|(| 'PRINC NIL))
((LAMBDA (I REST HEAD K)
(PROGN (SETQ I
(COND ((ZEROP G1LEVEL) 2.)
(G1PRINLENGTH)))
((LAMBDA (U1_ITEM)
(SETQ HEAD (CAR U1_ITEM))
(SETQ U1_ITEM (CDR U1_ITEM))
(SETQ REST U1_ITEM))
LIST)
(SETQ K 1.))
(PROG NIL
U1_L (PROGN (COND ((OR (MINUSP I) (AND (ZEROP I) (OR REST (NOT (ATOM HEAD)))))
(PROGN (SETQ G1FCODE 'NEVER
G1BCODE 0.)
(G1ENTER-OBJ '|...| 'PRINC NIL))
(RETURN NIL)))
(COND ((MINUSP K)
(COND ((AND (ATOM HEAD) HEAD)
(COND (G1PRINC-ATOMS (SETQ BCODE (- BCODE 1. (FLATC HEAD))))
((SETQ BCODE (- BCODE 1. (FLATSIZE HEAD)))))
(PROGN (SETQ G1FCODE
(COND (ANY-LABS-YET? 'NEVER)
('ALWAYS))
G1BCODE 1.)
(G1ENTER-OBJ HEAD
(COND (G1PRINC-ATOMS 'PRINC)
('PRIN1))
NIL))
(SETQ ANY-LABS-YET? T))
(T