summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/prismparser.tcl
blob: 20847ddf9931f3f9b3522141bf0238d83b49627e (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
package provide DS9 1.0

######
# Begin autogenerated taccle (version 1.3) routines.
# Although taccle itself is protected by the GNU Public License (GPL)
# all user-supplied functions are protected by their respective
# author's license.  See http://mini.net/tcl/taccle for other details.
######

namespace eval prism {
    variable yylval {}
    variable table
    variable rules
    variable token {}
    variable yycnt 0
    variable yyerr 0
    variable save_state 0

    namespace export yylex
}

proc prism::YYABORT {} {
    return -code return 1
}

proc prism::YYACCEPT {} {
    return -code return 0
}

proc prism::YYERROR {} {
    variable yyerr
    set yyerr 1
}

proc prism::yyclearin {} {
    variable token
    variable yycnt
    set token {}
    incr yycnt -1
}

proc prism::yyerror {s} {
    puts stderr $s
}

proc prism::setupvalues {stack pointer numsyms} {
    upvar 1 1 y
    set y {}
    for {set i 1} {$i <= $numsyms} {incr i} {
        upvar 1 $i y
        set y [lindex $stack $pointer]
        incr pointer
    }
}

proc prism::unsetupvalues {numsyms} {
    for {set i 1} {$i <= $numsyms} {incr i} {
        upvar 1 $i y
        unset y
    }
}

array set prism::table {
  38:272 reduce
  10:280,target 28
  17:257 reduce
  18:271,target 33
  38:273 reduce
  29:283 goto
  17:259 reduce
  29:284 goto
  27:0 reduce
  26:257,target 29
  23:y,target 28
  6:259,target 23
  31:273,target 35
  6:z,target 22
  23:x reduce
  26:257 reduce
  23:y reduce
  20:Y,target 30
  6:259 shift
  19:Y,target 35
  23:z reduce
  26:259 reduce
  0:275,target 11
  17:269 reduce
  17:270 reduce
  41:z,target 22
  2:0 reduce
  17:271 reduce
  27:259,target 9
  17:z,target 31
  24:0 reduce
  10:z,target 22
  35:259 reduce
  29:Z,target 19
  45:0 reduce
  33:0,target 5
  26:270 reduce
  26:269 reduce
  22:Z,target 34
  6:x,target 20
  26:271 reduce
  20:x reduce
  16:259,target 12
  19:x reduce
  20:y reduce
  19:y reduce
  20:z reduce
  19:z reduce
  41:x shift
  43:273,target 35
  41:y shift
  41:z shift
  20:271,target 30
  19:271,target 35
  41:x,target 20
  6:279 goto
  10:X shift
  7:259,target 13
  10:Y shift
  6:283 goto
  10:Z shift
  17:x,target 31
  6:284 goto
  10:x,target 20
  14:259 reduce
  42:0 reduce
  29:X,target 17
  22:X,target 34
  37:272,target 23
  44:270 shift
  44:269 shift
  44:271 shift
  23:257 reduce
  3:259 reduce
  41:283,target 44
  28:259,target 14
  23:259 reduce
  20:y,target 30
  19:y,target 35
  46:282,target 47
  32:Y,target 18
  32:271,target 39
  44:281 goto
  29:283,target 32
  17:259,target 31
  32:259 shift
  23:270 reduce
  23:269 reduce
  3:0,target 10
  23:271 reduce
  29:z,target 22
  21:271,target 32
  22:z,target 34
  41:281,target 43
  0:268,target 10
  8:259,target 27
  45:0,target 21
  26:270,target 29
  26:269,target 29
  41:259 shift
  26:Z,target 29
  14:0 reduce
  32:270 shift
  32:269 shift
  18:Z,target 33
  32:271 shift
  41:259,target 23
  35:0 reduce
  14:0,target 17
  38:272,target 24
  10:x shift
  17:257,target 31
  10:y shift
  10:z shift
  44:271,target 39
  41:270 shift
  41:269 shift
  30:259,target 33
  29:x,target 20
  29:259,target 23
  41:271 shift
  22:x,target 34
  32:281 goto
  0:260 shift
  0:259 shift
  19:257 reduce
  20:257 reduce
  0:261 shift
  0:266,target 8
  9:0 reduce
  32:283 goto
  0:262 shift
  11:0 accept
  19:259 reduce
  20:259 reduce
  32:284 goto
  26:X,target 29
  21:X reduce
  0:263 shift
  21:Y reduce
  0:264 shift
  18:259,target 33
  18:X,target 33
  21:Z reduce
  0:265 shift
  0:266 shift
  0:267 shift
  41:281 goto
  0:268 shift
  8:259 shift
  32:y,target 21
  22:271,target 34
  41:283 goto
  28:259 reduce
  41:284 goto
  20:270 reduce
  19:269 reduce
  19:270 reduce
  20:269 reduce
  20:271 reduce
  9:259,target 7
  19:271 reduce
  0:275 goto
  21:Y,target 32
  0:264,target 6
  0:277 goto
  17:X reduce
  42:259,target 20
  17:Y reduce
  40:272,target 34
  39:272,target 25
  28:0 reduce
  7:0,target 13
  17:Z reduce
  18:257,target 33
  0:0,target 6
  26:z,target 29
  18:z,target 33
  42:0,target 20
  34:0,target 26
  23:Z,target 28
  3:0 reduce
  37:272 reduce
  32:283,target 41
  0:262,target 4
  11:0,target 0
  19:259,target 35
  20:259,target 30
  37:273 reduce
  16:259 reduce
  46:273,target 35
  23:271,target 28
  26:x,target 29
  21:x reduce
  5:257 shift
  21:y reduce
  18:x,target 33
  46:272 shift
  25:257 shift
  21:z reduce
  5:259 shift
  46:273 shift
  6:284,target 26
  23:X,target 28
  0:0 reduce
  10:283,target 29
  6:Y,target 18
  32:281,target 40
  0:260,target 2
  0:259,target 1
  19:257,target 35
  20:257,target 30
  17:269,target 31
  17:270,target 31
  32:X shift
  46:282 goto
  32:Y shift
  34:259 reduce
  32:Z shift
  21:y,target 32
  32:259,target 23
  17:x reduce
  41:Y,target 18
  17:y reduce
  17:z reduce
  17:Y,target 31
  10:Y,target 18
  21:259,target 32
  5:278 goto
  6:X shift
  6:Y shift
  6:Z shift
  41:270,target 38
  41:269,target 37
  23:z,target 28
  10:259,target 23
  13:259 reduce
  44:281,target 46
  20:Z,target 30
  19:Z,target 35
  15:0,target 18
  43:272 shift
  22:257 reduce
  2:259 reduce
  43:273 shift
  6:279,target 24
  22:259 reduce
  21:257,target 32
  1:259,target 8
  18:269,target 33
  18:270,target 33
  15:0 reduce
  23:x,target 28
  36:0 reduce
  31:272,target 34
  6:y,target 21
  43:282 goto
  32:x shift
  22:270 reduce
  22:269 reduce
  20:X,target 30
  19:X,target 35
  32:y shift
  22:271 reduce
  32:z shift
  22:259,target 34
  41:y,target 21
  40:282,target 42
  12:0 reduce
  22:X reduce
  17:y,target 31
  22:Y reduce
  10:y,target 21
  33:0 reduce
  22:Z reduce
  6:x shift
  31:272 shift
  29:Y,target 18
  6:y shift
  31:273 shift
  22:Y,target 34
  6:z shift
  37:273,target 23
  10:259 shift
  45:259,target 21
  1:0,target 8
  43:272,target 34
  22:257,target 34
  2:259,target 11
  41:284,target 26
  20:270,target 30
  20:269,target 30
  19:269,target 35
  19:270,target 35
  40:272 shift
  39:272 reduce
  20:z,target 30
  7:0 reduce
  18:257 reduce
  19:z,target 35
  40:273 shift
  39:273 reduce
  31:282 goto
  18:259 reduce
  18:X reduce
  34:259,target 26
  32:Z,target 19
  18:Y reduce
  35:0,target 27
  18:Z reduce
  29:284,target 26
  27:0,target 9
  12:0,target 3
  7:259 reduce
  40:282 goto
  23:259,target 28
  27:259 reduce
  18:269 reduce
  18:270 reduce
  10:280 goto
  18:271 reduce
  26:271,target 29
  20:x,target 30
  19:x,target 35
  10:283 goto
  12:259,target 4
  10:284 goto
  32:X,target 17
  36:259 reduce
  32:270,target 38
  32:269,target 37
  38:273,target 24
  47:0 reduce
  22:x reduce
  22:y reduce
  23:257,target 28
  22:z reduce
  3:259,target 10
  29:y,target 21
  21:270,target 32
  21:269,target 32
  22:y,target 34
  45:259 reduce
  1:0 reduce
  0:267,target 9
  35:259,target 27
  26:Y,target 29
  18:Y,target 33
  15:259 reduce
  24:259,target 15
  18:x reduce
  32:z,target 22
  18:y reduce
  18:z reduce
  44:270,target 38
  44:269,target 37
  4:259 shift
  12:276,target 30
  47:0,target 22
  24:259 reduce
  13:259,target 16
  21:Z,target 32
  0:265,target 7
  24:0,target 15
  16:0,target 12
  40:273,target 35
  39:273,target 25
  31:282,target 36
  29:X shift
  29:Y shift
  29:Z shift
  47:259,target 22
  4:259,target 13
  32:x,target 20
  22:270,target 34
  22:269,target 34
  36:259,target 19
  42:259 reduce
  32:284,target 26
  21:X,target 32
  0:263,target 5
  16:0 reduce
  26:X reduce
  26:Y reduce
  26:Z reduce
  12:259 reduce
  26:y,target 29
  18:y,target 33
  43:282,target 45
  14:259,target 17
  23:Y,target 28
  21:257 reduce
  1:259 reduce
  10:284,target 26
  21:259 reduce
  6:Z,target 19
  0:261,target 3
  9:0,target 7
  13:0 reduce
  23:X reduce
  2:0,target 11
  17:271,target 31
  23:Y reduce
  34:0 reduce
  23:Z reduce
  46:272,target 34
  25:257,target 31
  21:z,target 32
  5:259,target 15
  23:270,target 28
  23:269,target 28
  9:259 reduce
  41:Z,target 19
  12:276 goto
  30:259 shift
  29:x shift
  29:259 shift
  36:0,target 19
  29:y shift
  21:270 reduce
  21:269 reduce
  29:z shift
  28:0,target 14
  21:271 reduce
  17:Z,target 31
  6:283,target 25
  10:Z,target 19
  13:0,target 16
  5:278,target 16
  6:X,target 17
  41:271,target 39
  20:X reduce
  19:X reduce
  26:259,target 29
  20:Y reduce
  19:Y reduce
  20:Z reduce
  19:Z reduce
  41:X shift
  41:Y shift
  21:x,target 32
  5:257,target 14
  41:Z shift
  41:X,target 17
  26:x reduce
  26:y reduce
  15:259,target 18
  26:z reduce
  47:259 reduce
  0:277,target 12
  17:X,target 31
  10:X,target 17
}

array set prism::rules {
  9,l 277
  11,l 277
  32,l 284
  6,l 277
  28,l 283
  3,l 275
  25,l 281
  0,l 285
  22,l 280
  18,l 278
  15,l 277
  12,l 277
  33,l 284
  7,l 277
  29,l 283
  30,l 284
  4,l 276
  26,l 282
  1,l 274
  23,l 281
  19,l 279
  20,l 280
  16,l 277
  13,l 277
  34,l 284
  8,l 277
  10,l 277
  31,l 284
  5,l 275
  27,l 282
  2,l 274
  24,l 281
  21,l 280
  17,l 278
  14,l 277
  35,l 284
}

array set prism::rules {
  12,dc 2
  26,dc 1
  3,dc 1
  18,dc 1
  33,dc 1
  9,dc 2
  11,dc 1
  25,dc 1
  2,dc 1
  17,dc 1
  32,dc 1
  8,dc 1
  10,dc 1
  24,dc 1
  1,dc 1
  16,dc 2
  31,dc 1
  7,dc 1
  23,dc 1
  0,dc 1
  15,dc 2
  29,dc 1
  30,dc 1
  6,dc 0
  22,dc 6
  14,dc 2
  28,dc 1
  5,dc 3
  21,dc 5
  35,dc 1
  13,dc 1
  27,dc 1
  4,dc 0
  19,dc 3
  20,dc 4
  34,dc 1
}

array set prism::rules {
  7,line 47
  4,line 41
  34,line 87
  1,line 37
  31,line 84
  27,line 76
  24,line 71
  21,line 67
  17,line 59
  14,line 54
  11,line 51
  9,line 49
  6,line 46
  3,line 41
  33,line 86
  4,e 1
  29,line 80
  30,line 83
  26,line 75
  23,line 70
  19,line 63
  20,line 66
  16,line 56
  13,line 53
  10,line 50
  8,line 48
  5,line 42
  35,line 88
  2,line 38
  32,line 85
  28,line 79
  25,line 72
  22,line 67
  18,line 60
  15,line 55
  12,line 52
}

array set prism::lr1_table {
  66,trans {{272 50} {273 51} {282 69}}
  35 {{14 {0 259} 2}}
  14,trans {}
  36 {{20 {0 259} 1} {21 {0 259} 1} {22 {0 259} 1} {28 {259 269 270 271 X Y Z x y z} 0} {29 {259 269 270 271 X Y Z x y z} 0} {30 {259 269 270 271 X Y Z x y z} 0} {31 {259 269 270 271 X Y Z x y z} 0} {32 {259 269 270 271 X Y Z x y z} 0} {33 {259 269 270 271 X Y Z x y z} 0} {34 {259 269 270 271 X Y Z x y z} 0} {35 {259 269 270 271 X Y Z x y z} 0}}
  33,trans {}
  37 {{29 {259 X Y Z x y z} 1}}
  52,trans {}
  38 {{5 0 2}}
  71,trans {}
  40 {{31 {259 269 270 271 X Y Z x y z} 1}}
  39 {{19 {0 259} 2} {26 {0 259} 0} {27 {0 259} 0}}
  41 {{33 {259 269 270 271 X Y Z x y z} 1}}
  18,trans {}
  1,trans {}
  37,trans {}
  42 {{35 {259 269 270 271 X Y Z x y z} 1}}
  56,trans {{272 50} {273 51} {282 58}}
  43 {{30 {259 269 270 271 X Y Z x y z} 1}}
  44 {{32 {259 269 270 271 X Y Z x y z} 1}}
  45 {{34 {259 269 270 271 X Y Z x y z} 1}}
  23,trans {}
  5,trans {{257 14} {259 15} {278 16}}
  42,trans {}
  46 {{28 {259 269 270 271 X Y Z x y z} 1}}
  61,trans {}
  47 {{20 {0 259} 2} {21 {0 259} 2} {22 {0 259} 2} {23 {272 273} 0} {24 {272 273} 0} {25 {272 273} 0} {28 {259 269 270 271 X Y Z x y z} 0} {29 {259 269 270 271 X Y Z x y z} 0} {30 {259 269 270 271 X Y Z x y z} 0} {31 {259 269 270 271 X Y Z x y z} 0} {32 {259 269 270 271 X Y Z x y z} 0} {33 {259 269 270 271 X Y Z x y z} 0} {34 {259 269 270 271 X Y Z x y z} 0} {35 {259 269 270 271 X Y Z x y z} 0}}
  48 {{29 {259 269 270 271 X Y Z x y z} 1}}
  50 {{26 {0 259} 1}}
  49 {{5 0 3}}
  27,trans {}
  9,trans {}
  46,trans {}
  51 {{27 {0 259} 1}}
  65,trans {}
  52 {{19 {0 259} 3}}
  53 {{23 {272 273} 1}}
  13,trans {}
  54 {{24 {272 273} 1}}
  32,trans {}
  51,trans {}
  55 {{25 {272 273} 1}}
  70,trans {{272 50} {273 51} {282 71}}
  69,trans {}
  56 {{20 {0 259} 3} {26 {0 259} 0} {27 {0 259} 0}}
  57 {{21 {0 259} 3} {22 {0 259} 3} {23 {272 273} 0} {24 {272 273} 0} {25 {272 273} 0} {28 {269 270 271} 0} {29 {269 270 271} 0} {30 {269 270 271} 0} {31 {269 270 271} 0} {32 {269 270 271} 0} {33 {269 270 271} 0} {34 {269 270 271} 0} {35 {269 270 271} 0}}
  17,trans {}
  0,trans {{259 1} {260 2} {261 3} {262 4} {263 5} {264 6} {265 7} {266 8} {267 9} {268 10} {275 11} {277 12}}
  58 {{20 {0 259} 4}}
  36,trans {{X 40} {Y 41} {Z 42} {x 43} {y 44} {z 45} {259 46} {283 47} {284 48}}
  60 {{33 {269 270 271} 1}}
  59 {{31 {269 270 271} 1}}
  55,trans {}
  61 {{35 {269 270 271} 1}}
  62 {{30 {269 270 271} 1}}
  22,trans {}
  4,trans {{259 13}}
  63 {{32 {269 270 271} 1}}
  41,trans {}
  60,trans {}
  59,trans {}
  64 {{34 {269 270 271} 1}}
  65 {{28 {269 270 271} 1}}
  66 {{21 {0 259} 4} {26 {0 259} 0} {27 {0 259} 0}}
  26,trans {}
  8,trans {{259 27}}
  67 {{22 {0 259} 4} {23 {272 273} 0} {24 {272 273} 0} {25 {272 273} 0}}
  45,trans {}
  64,trans {}
  68 {{29 {269 270 271} 1}}
  70 {{22 {0 259} 5} {26 {0 259} 0} {27 {0 259} 0}}
  69 {{21 {0 259} 5}}
  12,trans {{276 38}}
  71 {{22 {0 259} 6}}
  31,trans {}
  50,trans {}
  49,trans {}
  68,trans {}
  16,trans {}
  35,trans {}
  54,trans {}
  21,trans {}
  3,trans {}
  40,trans {}
  39,trans {{272 50} {273 51} {282 52}}
  58,trans {}
  10 {{14 {0 259} 1} {20 {0 259} 0} {21 {0 259} 0} {22 {0 259} 0} {28 {259 X Y Z x y z} 0} {29 {259 X Y Z x y z} 0} {30 {259 X Y Z x y z} 0} {31 {259 X Y Z x y z} 0} {32 {259 X Y Z x y z} 0} {33 {259 X Y Z x y z} 0} {34 {259 X Y Z x y z} 0} {35 {259 X Y Z x y z} 0}}
  11 {{0 0 1}}
  25,trans {{257 39}}
  12 {{3 0 1} {5 0 1} {4 259 0}}
  7,trans {}
  44,trans {}
  13 {{16 {0 259} 2}}
  63,trans {}
  14 {{17 {0 259} 1}}
  11,trans {}
  15 {{18 {0 259} 1}}
  30,trans {}
  29,trans {}
  16 {{12 {0 259} 2}}
  48,trans {}
  0 {{0 0 0} {3 0 0} {5 0 0} {6 {0 259} 0} {7 {0 259} 0} {8 {0 259} 0} {9 {0 259} 0} {10 {0 259} 0} {11 {0 259} 0} {12 {0 259} 0} {13 {0 259} 0} {14 {0 259} 0} {15 {0 259} 0} {16 {0 259} 0}}
  17 {{31 257 1}}
  67,trans {{269 53} {270 54} {271 55} {281 70}}
  1 {{8 {0 259} 1}}
  18 {{33 257 1}}
  15,trans {}
  2 {{11 {0 259} 1}}
  19 {{35 257 1}}
  20 {{30 257 1}}
  34,trans {}
  3 {{10 {0 259} 1}}
  21 {{32 257 1}}
  53,trans {}
  4 {{16 {0 259} 1}}
  22 {{34 257 1}}
  5 {{12 {0 259} 1} {17 {0 259} 0} {18 {0 259} 0}}
  23 {{28 257 1}}
  20,trans {}
  19,trans {}
  6 {{15 {0 259} 1} {19 {0 259} 0} {28 257 0} {29 257 0} {30 257 0} {31 257 0} {32 257 0} {33 257 0} {34 257 0} {35 257 0}}
  2,trans {}
  24 {{15 {0 259} 2}}
  38,trans {{259 49}}
  7 {{13 {0 259} 1}}
  25 {{19 {0 259} 1}}
  57,trans {{X 59} {Y 60} {Z 61} {x 62} {y 63} {z 64} {259 65} {269 53} {270 54} {271 55} {281 66} {283 67} {284 68}}
  8 {{9 {0 259} 1}}
  26 {{29 257 1}}
  9 {{7 {0 259} 1}}
  27 {{9 {0 259} 2}}
  24,trans {}
  6,trans {{X 17} {Y 18} {Z 19} {x 20} {y 21} {z 22} {259 23} {279 24} {283 25} {284 26}}
  28 {{31 {259 X Y Z x y z} 1}}
  43,trans {}
  29 {{33 {259 X Y Z x y z} 1}}
  30 {{35 {259 X Y Z x y z} 1}}
  62,trans {}
  31 {{30 {259 X Y Z x y z} 1}}
  10,trans {{X 28} {Y 29} {Z 30} {x 31} {y 32} {z 33} {259 34} {280 35} {283 36} {284 37}}
  32 {{32 {259 X Y Z x y z} 1}}
  28,trans {}
  33 {{34 {259 X Y Z x y z} 1}}
  47,trans {{X 40} {Y 41} {Z 42} {x 43} {y 44} {z 45} {259 46} {269 53} {270 54} {271 55} {281 56} {283 57} {284 48}}
  34 {{28 {259 X Y Z x y z} 1}}
}

array set prism::token_id_table {
  z,title {}
  280,title {}
  279,title {}
  264,line 18
  270,t 0
  269,t 0
  276,line 41
  265,title IMAGE
  284,title {}
  274,t 1
  261,line 15
  257,t 0
  270,title BAR
  269,title LINE
  273,line 29
  y,t 0
  278,t 1
  257,line 7
  262,t 0
  285,line 89
  274,title {}
  X,line 83
  283,t 1
  270,line 25
  269,line 24
  259,title string
  260,title CLEAR
  266,t 0
  y,title {}
  278,title {}
  282,line 74
  error error
  271,t 0
  264,title HISTOGRAM
  266,line 20
  283,title {}
  y,line 84
  278,line 58
  275,t 1
  error,line 35
  268,title PLOT
  258,t 0
  263,line 17
  X,t 0
  X X
  error,title {}
  Y Y
  Z Z
  z,t 0
  280,t 1
  279,t 1
  275,line 40
  273,title OVER
  263,t 0
  259,line 10
  260,line 14
  258,title float
  Z,line 87
  x,title {}
  284,t 1
  277,title {}
  272,line 28
  267,t 0
  Z,title {}
  263,title EXT
  284,line 82
  282,title {}
  272,t 0
  268,line 22
  267,title OPEN
  257 INT_
  281,line 69
  276,t 1
  258 REAL_
  259,t 0
  259 STRING_
  260 CLEAR_
  260,t 0
  Y,t 0
  272,title NEW
  261 CLOSE_
  265,line 19
  262 CURRENT_
  281,t 1
  263 EXT_
  x,line 82
  277,line 45
  257,title integer
  264 HISTOGRAM_
  264,t 0
  276,title {}
  265 IMAGE_
  262,line 16
  266 LOAD_
  285,t 1
  Y,title {}
  267 OPEN_
  0,t 0
  0 {$}
  262,title CURRENT
  268 PLOT_
  268,t 0
  281,title {}
  274,line 36
  270 BAR_
  269 LINE_
  error,t 0
  271 SCATTER_
  272 NEW_
  258,line 8
  273,t 0
  273 OVER_
  266,title LOAD
  285,title {}
  Y,line 85
  274 numeric
  275 command
  271,line 26
  276 @PSEUDO1
  x,t 0
  x x
  277,t 1
  277 prism
  271,title SCATTER
  y y
  283,line 78
  278 ext
  261,t 0
  Z,t 0
  z z
  280 plot
  279 histogram
  281 type
  267,line 21
  282,t 1
  282 mode
  275,title {}
  283 cols
  265,t 0
  z,line 86
  X,title {}
  284 colsxyz
  280,line 65
  279,line 62
  285 start'
  261,title CLOSE
}

proc prism::yyparse {} {
    variable yylval
    variable table
    variable rules
    variable token
    variable yycnt
    variable lr1_table
    variable token_id_table
    variable yyerr
    variable save_state

    set yycnt 0
    set state_stack {0}
    set value_stack {{}}
    set token ""
    set accepted 0
    set yyerr 0
    set save_state 0

    while {$accepted == 0} {
        set state [lindex $state_stack end]
        if {$token == ""} {
            set yylval ""
            set token [yylex]
            set buflval $yylval
	    if {$token>0} {
	        incr yycnt
            }
        }
        if {![info exists table($state:$token)] || $yyerr} {
	    if {!$yyerr} {
	        set save_state $state
	    }
            # pop off states until error token accepted
            while {[llength $state_stack] > 0 && \
                       ![info exists table($state:error)]} {
                set state_stack [lrange $state_stack 0 end-1]
                set value_stack [lrange $value_stack 0 \
                                       [expr {[llength $state_stack] - 1}]]
                set state [lindex $state_stack end]
            }
            if {[llength $state_stack] == 0} {
 
	        set rr { }
                if {[info exists lr1_table($save_state,trans)] && [llength $lr1_table($save_state,trans)] >= 1} {
                    foreach trans $lr1_table($save_state,trans) {
                        foreach {tok_id nextstate} $trans {
			    set ss $token_id_table($tok_id,title)
			    if {$ss != {}} {
			        append rr "$ss, "
                            }
                        }
                    }
                }
		set rr [string trimleft $rr { }]
		set rr [string trimright $rr {, }]
                yyerror "parse error, expecting: $rr"


                return 1
            }
            lappend state_stack [set state $table($state:error,target)]
            lappend value_stack {}
            # consume tokens until it finds an acceptable one
            while {![info exists table($state:$token)]} {
                if {$token == 0} {
                    yyerror "end of file while recovering from error"
                    return 1
                }
                set yylval {}
                set token [yylex]
                set buflval $yylval
            }
            continue
        }
        switch -- $table($state:$token) {
            shift {
                lappend state_stack $table($state:$token,target)
                lappend value_stack $buflval
                set token ""
            }
            reduce {
                set rule $table($state:$token,target)
                set ll $rules($rule,l)
                if {[info exists rules($rule,e)]} {
                    set dc $rules($rule,e)
                } else {
                    set dc $rules($rule,dc)
                }
                set stackpointer [expr {[llength $state_stack]-$dc}]
                setupvalues $value_stack $stackpointer $dc
                set _ $1
                set yylval [lindex $value_stack end]
                switch -- $rule {
                    1 { set _ $1 }
                    2 { set _ $1 }
                    4 { global ds9; if {!$ds9(init)} {YYERROR} else {yyclearin; YYACCEPT} }
                    6 { PrismDialog prism }
                    7 { PrismDialog prism }
                    8 { PrismCmdLoad $1 }
                    9 { PrismCmdLoad $2 }
                    10 { ProcessCmdCVAR0 PrismDestroy }
                    11 { ProcessCmdCVAR0 PrismClear }
                    13 { ProcessCmdCVAR0 PrismImage }
                    16 { PrismCmdRef $2 }
                    17 { PrismCmdExt $1 }
                    18 { PrismCmdExtName $1 }
                    19 { ProcessCmdCVAR3 bar,col $1 bar,num $2 plot,mode $3 PrismHistogramGenerate }
                    20 { ProcessCmdCVAR6 xx $1 yy $2 xerr {} yerr {} plot,type $3 plot,mode $4 PrismPlotGenerate }
                    21 { ProcessCmdCVAR6 xx $1 yy $2 xerr {} yerr $3 plot,type $4 plot,mode $5 PrismPlotGenerate }
                    22 { ProcessCmdCVAR6 xx $1 yy $2 xerr $3 yerr $4 plot,type $5 plot,mode $6 PrismPlotGenerate }
                    23 { set _ line }
                    24 { set _ bar }
                    25 { set _ scatter }
                    26 { set _ newplot }
                    27 { set _ overplot }
                    28 { set _ $1 }
                    29 { set _ $1 }
                    30 { set _ $1 }
                    31 { set _ $1 }
                    32 { set _ $1 }
                    33 { set _ $1 }
                    34 { set _ $1 }
                    35 { set _ $1 }
                }
                unsetupvalues $dc
                # pop off tokens from the stack if normal rule
                if {![info exists rules($rule,e)]} {
                    incr stackpointer -1
                    set state_stack [lrange $state_stack 0 $stackpointer]
                    set value_stack [lrange $value_stack 0 $stackpointer]
                }
                # now do the goto transition
                lappend state_stack $table([lindex $state_stack end]:$ll,target)
                lappend value_stack $_
            }
            accept {
                set accepted 1
            }
            goto -
            default {
                puts stderr "Internal parser error: illegal command $table($state:$token)"
                return 2
            }
        }
    }
    return 0
}

######
# end autogenerated taccle functions
######

proc prism::yyerror {msg} {
     variable yycnt
     variable yy_current_buffer
     variable index_

     ParserError $msg $yycnt $yy_current_buffer $index_
}