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
|
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 scale {
variable yylval {}
variable table
variable rules
variable token {}
variable yycnt 0
variable yyerr 0
variable save_state 0
namespace export yylex
}
proc scale::YYABORT {} {
return -code return 1
}
proc scale::YYACCEPT {} {
return -code return 0
}
proc scale::YYERROR {} {
variable yyerr
set yyerr 1
}
proc scale::yyclearin {} {
variable token
variable yycnt
set token {}
incr yycnt -1
}
proc scale::yyerror {s} {
puts stderr $s
}
proc scale::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 scale::unsetupvalues {numsyms} {
for {set i 1} {$i <= $numsyms} {incr i} {
upvar 1 $i y
unset y
}
}
array set scale::table {
34:265,target 3
47:265 reduce
27:0 accept
15:278,target 14
39:264,target 2
48:0 reduce
23:265,target 44
17:265 reduce
56:265 reduce
2:263,target 9
0:275,target 11
6:0,target 46
11:282,target 41
2:0 reduce
6:265 reduce
12:265,target 27
26:265 reduce
56:0,target 21
24:0 reduce
11:261,target 36
48:0,target 23
41:0,target 1
45:0 reduce
40:262,target 37
33:0,target 5
46:265,target 36
25:0,target 42
0:294,target 28
17:0,target 28
3:265,target 31
10:0,target 45
35:265 reduce
0:273,target 9
8:264,target 2
35:265,target 6
44:263 shift
21:0 reduce
44:264 shift
11:258,target 33
42:0 reduce
24:265,target 43
40:260,target 35
40:259,target 34
0:292,target 27
14:265 reduce
13:265,target 34
53:265 reduce
0:271,target 7
18:264,target 2
3:265 reduce
17:0 reduce
41:262,target 37
23:265 reduce
47:265,target 15
38:0 reduce
4:265,target 14
40:257,target 32
0:289,target 25
3:0,target 31
36:265,target 4
32:265 reduce
53:0,target 38
41:257 shift
0:268,target 5
45:0,target 35
44:291 goto
41:258 shift
41:260 shift
41:259 shift
37:0,target 7
14:0 reduce
15:291,target 26
41:261 shift
30:0,target 22
29:0,target 17
41:262 shift
25:265,target 42
22:0,target 30
41:260,target 35
41:259,target 34
35:0 reduce
11:257 shift
14:0,target 41
11:258 shift
41:265 reduce
11:259 shift
11:260 shift
56:0 reduce
11:261 shift
13:282,target 46
49:291,target 56
0:287,target 23
11:262 shift
14:265,target 41
11:265 reduce
49:263 shift
49:264 shift
0:266,target 3
9:0 reduce
50:265 reduce
11:0 reduce
0:263 shift
15:288,target 24
48:265,target 23
0:264 shift
32:0 reduce
5:265,target 1
11:272 shift
41:257,target 32
0:266 shift
20:265 reduce
0:267 shift
53:0 reduce
0:268 shift
0:270 shift
37:265,target 7
0:271 shift
0:285,target 21
19:270 shift
0:272 shift
8:263 shift
0:273 shift
8:264 shift
0:274 shift
0:275 shift
6:0 reduce
11:282 shift
28:265 reduce
19:274 shift
0:276 shift
0:264,target 2
41:290 goto
26:265,target 40
0:277 shift
0:278 shift
28:0 reduce
0:279 shift
0:280 shift
7:0,target 33
28:293,target 51
0:281 shift
0:282 shift
50:0 reduce
0:283 shift
11:290 goto
0:284 shift
57:0,target 12
37:265 reduce
0:285 shift
50:0,target 25
0:286 shift
0:283,target 19
11:290,target 42
49:291 goto
42:0,target 37
0:287 shift
34:0,target 3
0:288 shift
39:291,target 52
26:0,target 40
0:289 shift
3:0 reduce
0:291 goto
11:297 goto
50:265,target 25
0:292 goto
11:0,target 1
6:265,target 46
46:265 reduce
25:0 reduce
0:294 goto
0:295 goto
13:296,target 47
19:299,target 50
5:261,target 36
46:0 reduce
38:265,target 19
0:298 goto
5:257 shift
0:299 goto
5:258 shift
8:291 goto
15:263,target 1
16:265 reduce
5:259 shift
5:260 shift
19:299 goto
0:281,target 17
5:261 shift
55:265 reduce
44:264,target 2
5:262 shift
28:293 goto
1:264,target 8
5:265 reduce
49:263,target 1
25:265 reduce
22:0 reduce
43:0 reduce
0:299,target 31
5:258,target 33
8:291,target 39
16:265,target 13
34:265 reduce
0:278,target 14
51:265,target 57
4:0,target 14
7:265,target 33
54:0,target 39
43:265 reduce
40:265,target 1
40:0 reduce
46:0,target 36
38:0,target 19
31:0,target 24
23:0,target 44
18:291,target 49
5:290 goto
2:264,target 9
13:265 reduce
28:265,target 11
19:274,target 10
0:276,target 12
52:265 reduce
15:298,target 48
2:263 reduce
2:264 reduce
2:265 reduce
11:262,target 37
13:272 shift
17:265,target 28
36:0 reduce
22:265 reduce
39:263,target 1
0:295,target 29
57:0 reduce
52:265,target 20
0:274,target 10
13:282 shift
31:265 reduce
40:257 shift
40:258 shift
12:0 reduce
40:260 shift
40:259 shift
41:265,target 1
40:261 shift
11:259,target 34
11:260,target 35
40:262 shift
33:0 reduce
39:263 shift
40:261,target 36
39:264 shift
54:0 reduce
40:265 reduce
30:265,target 22
29:265,target 17
1:0,target 8
13:296 goto
19:270,target 6
0:272,target 8
8:263,target 1
10:265 reduce
7:0 reduce
48:265 reduce
43:0,target 16
35:0,target 6
30:0 reduce
29:0 reduce
11:257,target 32
27:0,target 0
18:263 shift
20:0,target 32
18:264 shift
40:258,target 33
12:0,target 27
0:291,target 26
11:297,target 43
53:265,target 38
9:265,target 26
5:290,target 38
0:270,target 6
4:0 reduce
7:265 reduce
42:265,target 37
40:290 goto
18:263,target 1
39:291 goto
26:0 reduce
41:261,target 36
47:0 reduce
31:265,target 24
0:288,target 24
36:265 reduce
1:0 reduce
20:265,target 32
0:267,target 4
15:289,target 25
23:0 reduce
18:291 goto
45:265 reduce
44:291,target 55
41:258,target 33
5:0,target 1
54:265,target 39
15:263 shift
15:264 shift
0:286,target 22
55:0,target 18
54:265 reduce
47:0,target 15
43:265,target 16
40:0,target 1
32:0,target 2
11:272,target 40
24:0,target 43
4:265 reduce
20:0 reduce
15:287,target 23
16:0,target 13
24:265 reduce
41:0 reduce
32:265,target 2
15:278 shift
0:284,target 20
33:265 reduce
21:265,target 29
0:263,target 1
15:287 shift
16:0 reduce
15:288 shift
10:265,target 45
15:289 shift
55:265,target 18
37:0 reduce
5:262,target 37
15:291 goto
42:265 reduce
15:264,target 2
0:282,target 18
12:265 reduce
1:265,target 8
15:298 goto
40:290,target 53
51:265 shift
49:264,target 2
1:263 reduce
9:0,target 26
12:269 shift
13:0 reduce
1:264 reduce
2:0,target 9
33:265,target 5
1:265 reduce
34:0 reduce
21:265 reduce
5:259,target 34
5:260,target 35
55:0 reduce
52:0,target 20
36:0,target 4
22:265,target 30
28:0,target 10
0:279,target 15
0:280,target 16
44:263,target 1
21:0,target 29
9:265 reduce
1:263,target 8
12:269,target 44
13:0,target 34
30:265 reduce
29:265 reduce
10:0 reduce
11:265,target 1
56:265,target 21
31:0 reduce
0:298,target 30
5:257,target 32
52:0 reduce
38:265 reduce
45:265,target 35
2:265,target 9
13:272,target 45
41:290,target 54
0:277,target 13
5:0 reduce
}
array set scale::rules {
9,l 291
11,l 293
32,l 295
6,l 290
28,l 295
3,l 290
25,l 294
46,l 299
0,l 300
22,l 294
43,l 298
18,l 294
40,l 298
39,l 297
15,l 294
36,l 296
12,l 292
33,l 295
7,l 290
29,l 295
30,l 295
4,l 290
26,l 295
1,l 290
23,l 294
44,l 298
19,l 294
20,l 294
41,l 298
16,l 294
37,l 297
13,l 294
34,l 296
8,l 291
10,l 292
31,l 295
5,l 290
27,l 295
2,l 290
24,l 294
45,l 299
21,l 294
42,l 298
17,l 294
38,l 297
14,l 294
35,l 296
}
array set scale::rules {
12,dc 3
26,dc 1
3,dc 1
41,dc 1
18,dc 3
33,dc 1
9,dc 1
11,dc 0
25,dc 2
2,dc 1
40,dc 1
39,dc 2
17,dc 1
32,dc 1
8,dc 1
46,dc 1
10,dc 1
24,dc 1
1,dc 0
38,dc 2
16,dc 2
31,dc 1
7,dc 1
45,dc 1
23,dc 2
0,dc 1
37,dc 1
15,dc 2
29,dc 1
30,dc 1
6,dc 1
44,dc 1
22,dc 1
36,dc 1
14,dc 1
28,dc 1
5,dc 1
43,dc 1
21,dc 3
35,dc 1
13,dc 1
27,dc 1
4,dc 1
42,dc 1
19,dc 2
20,dc 3
34,dc 0
}
array set scale::rules {
41,line 113
7,line 66
37,line 107
4,line 63
34,line 102
1,line 60
31,line 97
27,line 93
24,line 88
21,line 85
17,line 80
14,line 77
11,line 72
46,line 120
43,line 115
9,line 69
40,line 112
39,line 109
6,line 65
36,line 104
3,line 62
33,line 99
29,line 95
30,line 96
26,line 92
23,line 87
19,line 82
20,line 84
16,line 79
13,line 76
10,line 72
45,line 119
42,line 114
8,line 68
38,line 108
5,line 64
35,line 103
2,line 61
32,line 98
28,line 94
25,line 89
22,line 86
18,line 81
15,line 78
12,line 73
11,e 1
44,line 116
}
array set scale::lr1_table {
35 {{6 {0 265} 1}}
14,trans {}
36 {{4 {0 265} 1}}
33,trans {}
37 {{7 {0 265} 1}}
52,trans {}
38 {{19 {0 265} 2}}
40 {{9 {263 264} 1}}
39 {{8 {263 264} 1}}
18,trans {{263 39} {264 40} {291 51}}
41 {{20 {0 265} 2} {8 {0 265} 0} {9 {0 265} 0}}
1,trans {}
37,trans {}
42 {{38 {0 265} 1} {1 {0 265} 0} {2 {0 265} 0} {3 {0 265} 0} {4 {0 265} 0} {5 {0 265} 0} {6 {0 265} 0} {7 {0 265} 0}}
56,trans {}
43 {{39 {0 265} 1} {1 {0 265} 0} {2 {0 265} 0} {3 {0 265} 0} {4 {0 265} 0} {5 {0 265} 0} {6 {0 265} 0} {7 {0 265} 0}}
44 {{37 {0 265} 1}}
23,trans {}
45 {{16 {0 265} 2}}
5,trans {{257 32} {258 33} {259 34} {260 35} {261 36} {262 37} {290 38}}
42,trans {{257 32} {258 33} {259 34} {260 35} {261 36} {262 37} {290 55}}
46 {{18 {0 265} 2} {8 {0 265} 0} {9 {0 265} 0}}
47 {{35 {0 265} 1}}
48 {{36 {0 265} 1}}
27,trans {}
50 {{23 {0 265} 2}}
49 {{15 {0 265} 2}}
9,trans {}
46,trans {{263 1} {264 2} {291 57}}
51 {{21 {0 265} 2} {8 {0 265} 0} {9 {0 265} 0}}
52 {{25 {0 265} 2}}
53 {{12 0 2}}
13,trans {{272 47} {282 48} {296 49}}
54 {{20 {0 265} 3}}
32,trans {}
51,trans {{263 1} {264 2} {291 58}}
55 {{38 {0 265} 2}}
56 {{39 {0 265} 2}}
57 {{18 {0 265} 3}}
17,trans {}
0,trans {{263 1} {264 2} {266 3} {267 4} {268 5} {270 6} {271 7} {272 8} {273 9} {274 10} {275 11} {276 12} {277 13} {278 14} {279 15} {280 16} {281 17} {282 18} {283 19} {284 20} {285 21} {286 22} {287 23} {288 24} {289 25} {291 26} {292 27} {294 28} {295 29} {298 30} {299 31}}
58 {{21 {0 265} 3}}
36,trans {}
55,trans {}
59 {{12 0 3}}
22,trans {}
4,trans {}
41,trans {{263 1} {264 2} {291 54}}
59,trans {}
26,trans {}
8,trans {{263 39} {264 40} {291 41}}
45,trans {}
12,trans {{269 46}}
31,trans {}
50,trans {}
49,trans {}
16,trans {}
35,trans {}
54,trans {}
21,trans {}
3,trans {}
40,trans {}
39,trans {}
58,trans {}
10 {{45 {0 265} 1}}
11 {{16 {0 265} 1} {37 {0 265} 0} {38 {0 265} 0} {39 {0 265} 0} {1 {0 265} 0} {2 {0 265} 0} {3 {0 265} 0} {4 {0 265} 0} {5 {0 265} 0} {6 {0 265} 0} {7 {0 265} 0}}
25,trans {}
12 {{18 {0 265} 1} {27 {0 265} 1}}
7,trans {}
44,trans {}
13 {{15 {0 265} 1} {34 {0 265} 0} {35 {0 265} 0} {36 {0 265} 0}}
14 {{41 {0 265} 1}}
11,trans {{257 32} {258 33} {259 34} {260 35} {261 36} {262 37} {272 42} {282 43} {290 44} {297 45}}
15 {{23 {0 265} 1} {40 {0 265} 0} {41 {0 265} 0} {42 {0 265} 0} {43 {0 265} 0} {44 {0 265} 0} {8 {0 265} 0} {9 {0 265} 0}}
30,trans {}
29,trans {}
16 {{13 {0 265} 1}}
48,trans {}
0 {{0 0 0} {10 0 0} {12 0 0} {13 {0 265} 0} {14 {0 265} 0} {15 {0 265} 0} {16 {0 265} 0} {17 {0 265} 0} {18 {0 265} 0} {19 {0 265} 0} {20 {0 265} 0} {21 {0 265} 0} {22 {0 265} 0} {23 {0 265} 0} {24 {0 265} 0} {25 {0 265} 0} {26 {0 265} 0} {27 {0 265} 0} {28 {0 265} 0} {29 {0 265} 0} {30 {0 265} 0} {31 {0 265} 0} {32 {0 265} 0} {33 {0 265} 0} {40 {0 265} 0} {41 {0 265} 0} {42 {0 265} 0} {43 {0 265} 0} {44 {0 265} 0} {45 {0 265} 0} {46 {0 265} 0} {8 {0 265} 0} {9 {0 265} 0}}
17 {{28 {0 265} 1}}
1 {{8 {0 265} 1}}
18 {{21 {0 265} 1} {8 {263 264} 0} {9 {263 264} 0}}
15,trans {{263 1} {264 2} {278 14} {287 23} {288 24} {289 25} {291 26} {298 50}}
2 {{9 {0 265} 1}}
19 {{25 {0 265} 1} {45 {0 265} 0} {46 {0 265} 0}}
20 {{32 {0 265} 1}}
34,trans {}
3 {{31 {0 265} 1}}
21 {{29 {0 265} 1}}
53,trans {{265 59}}
4 {{14 {0 265} 1}}
22 {{30 {0 265} 1}}
5 {{19 {0 265} 1} {1 {0 265} 0} {2 {0 265} 0} {3 {0 265} 0} {4 {0 265} 0} {5 {0 265} 0} {6 {0 265} 0} {7 {0 265} 0}}
23 {{44 {0 265} 1}}
20,trans {}
19,trans {{270 6} {274 10} {299 52}}
6 {{46 {0 265} 1}}
24 {{43 {0 265} 1}}
2,trans {}
38,trans {}
7 {{33 {0 265} 1}}
25 {{42 {0 265} 1}}
57,trans {}
8 {{20 {0 265} 1} {8 {263 264} 0} {9 {263 264} 0}}
26 {{40 {0 265} 1}}
9 {{26 {0 265} 1}}
27 {{0 0 1}}
24,trans {}
28 {{10 0 1} {12 0 1} {11 265 0}}
6,trans {}
43,trans {{257 32} {258 33} {259 34} {260 35} {261 36} {262 37} {290 56}}
29 {{17 {0 265} 1}}
30 {{22 {0 265} 1}}
31 {{24 {0 265} 1}}
10,trans {}
32 {{2 {0 265} 1}}
28,trans {{293 53}}
33 {{5 {0 265} 1}}
47,trans {}
34 {{3 {0 265} 1}}
}
array set scale::token_id_table {
286,t 0
286 SQUARED_
280,title OPEN
279,title MODE
264,line 15
298,title {}
292,line 71
287 USER_
270,t 0
269,t 0
288 ZMAX_
300 start'
290 yesno
289 ZSCALE_
276,line 31
265,title string
291,t 1
291 numeric
284,title SINH
292 command
274,t 0
261,line 11
293 @PSEUDO1
288,line 43
257,t 0
294 scale
270,title GLOBAL
269,title EXP
295,t 1
295 scales
288,title ZMAX
273,line 28
296 match
278,t 0
297 lock
257,line 7
262,t 0
298 mode
285,line 40
274,title LOCAL
299,t 1
299 scope
293,title {}
283,t 0
270,line 25
269,line 24
297,line 106
259,title ON
260,title OFF
266,t 0
278,title MINMAX
297,title {}
282,line 37
287,t 0
error error
271,t 0
264,title float
266,line 21
294,line 75
283,title SCOPE
292,t 1
278,line 33
error,line 58
275,t 0
268,title DATASEC
287,title USER
258,t 0
263,line 14
291,line 67
error,title {}
296,t 1
280,t 0
279,t 0
275,line 30
273,title LINEAR
292,title {}
263,t 0
259,line 9
260,line 10
287,line 42
258,title NO
284,t 0
277,title MATCH
296,title {}
272,line 27
267,t 0
299,line 118
263,title integer
288,t 0
284,line 39
282,title SCALELIMITS
272,t 0
268,line 23
296,line 101
267,title CLOSE
293,t 1
286,title SQUARED
257 YES_
281,line 36
276,t 0
258 NO_
259,t 0
259 ON_
260 OFF_
260,t 0
272,title LIMITS
261 TRUE_
265,line 17
297,t 1
293,line 72
291,title {}
262 FALSE_
281,t 0
263 INT_
277,line 32
257,title YES
264 REAL_
264,t 0
276,title LOG
265 STRING_
295,title {}
262,line 12
266 ASINH_
300,line 121
290,line 59
289,line 44
285,t 0
267 CLOSE_
0,t 0
0 {$}
262,title FALSE
268 DATASEC_
268,t 0
281,title POW
274,line 29
270 GLOBAL_
269 EXP_
299,title {}
error,t 0
271 HISTEQU_
300,t 1
290,t 1
289,t 0
272 LIMITS_
258,line 8
286,line 41
273,t 0
273 LINEAR_
266,title ASINH
285,title SQRT
274 LOCAL_
275 LOCK_
271,line 26
298,line 111
294,t 1
276 LOG_
277,t 0
277 MATCH_
271,title HISTEQU
300,title {}
290,title {}
289,title ZSCALE
283,line 38
278 MINMAX_
261,t 0
280 OPEN_
279 MODE_
298,t 1
281 POW_
267,line 22
295,line 91
282,t 0
282 SCALELIMITS_
275,title LOCK
294,title {}
283 SCOPE_
265,t 0
284 SINH_
280,line 35
279,line 34
285 SQRT_
261,title TRUE
}
proc scale::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 }
3 { set _ 1 }
4 { set _ 1 }
5 { set _ 0 }
6 { set _ 0 }
7 { set _ 0 }
8 { set _ $1 }
9 { set _ $1 }
11 { global ds9; if {!$ds9(init)} {YYERROR} else {yyclearin; YYACCEPT} }
13 { ScaleDialog }
14 { ScaleDestroyDialog }
17 { ProcessCmdSet scale type $1 ChangeScale }
18 { ProcessCmdSet scale log $3 ChangeScale }
19 { ProcessCmdSet scale datasec $2 ChangeDATASEC }
20 { ProcessCmdSet scale min $2 {}; ProcessCmdSet scale max $3 ChangeScaleLimit }
21 { ProcessCmdSet scale min $2 {}; ProcessCmdSet scale max $3 ChangeScaleLimit }
22 { ProcessCmdSet scale mode $1 ChangeScaleMode }
23 { ProcessCmdSet scale mode $2 ChangeScaleMode }
24 { ProcessCmdSet scale scope $1 ChangeScaleScope }
25 { ProcessCmdSet scale scope $2 ChangeScaleScope }
26 { set _ linear }
27 { set _ log }
28 { set _ pow }
29 { set _ sqrt }
30 { set _ squared }
31 { set _ asinh }
32 { set _ sinh }
33 { set _ histequ }
34 { MatchScaleCurrent }
35 { MatchScaleLimitsCurrent }
36 { MatchScaleLimitsCurrent }
37 { ProcessCmdSet scale lock $1 LockScaleCurrent }
38 { ProcessCmdSet scale lock,limits $2 LockScaleLimitsCurrent }
39 { ProcessCmdSet scale lock,limits $2 LockScaleLimitsCurrent }
40 { set _ $1 }
41 { set _ minmax }
42 { set _ zscale }
43 { set _ zmax }
44 { set _ user }
45 { set _ local }
46 { set _ global }
}
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 scale::yyerror {msg} {
variable yycnt
variable yy_current_buffer
variable index_
ParserError $msg $yycnt $yy_current_buffer $index_
}
|