-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparser.cs
1871 lines (1482 loc) · 88.4 KB
/
parser.cs
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
//----------------------------------------------------
// The following code was generated by CUP v0.10k
// Sun Jul 25 13:35:26 EDT 1999
//----------------------------------------------------
namespace CUP
{
using System;
using CUP.runtime;
/// <summary>CUP v0.10k generated parser.
/// </summary>
/// <version> Sun Jul 25 13:35:26 EDT 1999
///
/// </version>
public class parser:lr_parser
{
private void InitBlock()
{
_production_table = unpackFromStrings(new string[]{"\x0000\x006B\x0000\x0002\x0002\x0004\x0000\x0002\x002D\x0002\x0000\x0002\x0003" + "\x000A\x0000\x0002\x0003\x0007\x0000\x0002\x002E\x0002\x0000\x0002\x0004\x0006" + "\x0000\x0002\x0004\x0003\x0000\x0002\x0005\x0004\x0000\x0002\x0005\x0003\x0000" + "\x0002\x002F\x0002\x0000\x0002\x0010\x0006\x0000\x0002\x0008\x0003\x0000\x0002" + "\x0008\x0003\x0000\x0002\x0008\x0003\x0000\x0002\x0008\x0003\x0000\x0002\x0007" + "\x0002\x0000\x0002\x0007\x0004\x0000\x0002\x0006\x0006\x0000\x0002\x000B\x0006" + "\x0000\x0002\x0012\x0006\x0000\x0002\x0013\x0006\x0000\x0002\x000C\x0004\x0000" + "\x0002\x000C\x0003\x0000\x0002\x0014\x0005\x0000\x0002\x0014\x0004\x0000\x0002" + "\x0014\x0005\x0000\x0002\x0014\x0004\x0000\x0002\x0030\x0002\x0000\x0002\x0014" + "\x0006\x0000\x0002\x0031\x0002\x0000\x0002\x0014\x0006\x0000\x0002\x0032\x0002" + "\x0000\x0002\x0024\x0005\x0000\x0002\x0033\x0002\x0000\x0002\x0025\x0005\x0000" + "\x0002\x0016\x0005\x0000\x0002\x0016\x0003\x0000\x0002\x0017\x0005\x0000\x0002" + "\x0017\x0003\x0000\x0002\x0020\x0003\x0000\x0002\x0020\x0003\x0000\x0002\x0023" + "\x0004\x0000\x0002\x0023\x0003\x0000\x0002\x0034\x0002\x0000\x0002\x0021\x0007" + "\x0000\x0002\x0035\x0002\x0000\x0002\x0021\x0007\x0000\x0002\x0036\x0002\x0000" + "\x0002\x0021\x0007\x0000\x0002\x0022\x0005\x0000\x0002\x0022\x0003\x0000\x0002" + "\x002A\x0003\x0000\x0002\x002B\x0003\x0000\x0002\x0037\x0002\x0000\x0002\x000D" + "\x0007\x0000\x0002\x000D\x0003\x0000\x0002\x000E\x0004\x0000\x0002\x000E\x0003" + "\x0000\x0002\x0038\x0002\x0000\x0002\x0039\x0002\x0000\x0002\x0018\x0008\x0000" + "\x0002\x003A\x0002\x0000\x0002\x0018\x0005\x0000\x0002\x001D\x0005\x0000\x0002" + "\x001D\x0003\x0000\x0002\x001E\x0005\x0000\x0002\x001E\x0003\x0000\x0002\x0019" + "\x0004\x0000\x0002\x0019\x0003\x0000\x0002\x001A\x0004\x0000\x0002\x001A\x0003" + "\x0000\x0002\x0029\x0004\x0000\x0002\x0029\x0003\x0000\x0002\x000F\x0005\x0000" +
"\x0002\x000F\x0003\x0000\x0002\x0011\x0005\x0000\x0002\x0011\x0003\x0000\x0002" + "\x0015\x0003\x0000\x0002\x0015\x0005\x0000\x0002\x001B\x0003\x0000\x0002\x001C" + "\x0003\x0000\x0002\x0026\x0003\x0000\x0002\x0026\x0003\x0000\x0002\x0027\x0003" + "\x0000\x0002\x0027\x0003\x0000\x0002\x0028\x0003\x0000\x0002\x002C\x0003\x0000" + "\x0002\x002C\x0003\x0000\x0002\x002C\x0003\x0000\x0002\x002C\x0003\x0000\x0002" + "\x002C\x0003\x0000\x0002\x002C\x0003\x0000\x0002\x002C\x0003\x0000\x0002\x002C" + "\x0003\x0000\x0002\x002C\x0003\x0000\x0002\x002C\x0003\x0000\x0002\x002C\x0003" + "\x0000\x0002\x002C\x0003\x0000\x0002\x002C\x0003\x0000\x0002\x002C\x0003\x0000" + "\x0002\x002C\x0003\x0000\x0002\x002C\x0003\x0000\x0002\x000A\x0004\x0000\x0002" + "\x000A\x0003\x0000\x0002\x0009\x0002\x0000\x0002\x0009\x0003\x0000\x0002\x001F" + "\x0002"});
_action_table = unpackFromStrings(new string[]{"\x0000\x00A7\x0000\x0016\x0003\x0006\x0004\x0000\x0005\x0000\x0007\x0000\x0008" + "\x0000\x0009\x0000\x000A\x0000\x000B\x0000\x000C\x0000\x001D\x0000\x0001\x0002" + "\x0000\x0004\x0002\x00A9\x0001\x0002\x0000\x0014\x0004\x0080\x0005\uff97\x0007" + "\uff97\x0008\uff97\x0009\uff97\x000A\uff97\x000B\uff97\x000C\uff97\x001D\uff97" + "\x0001\x0002\x0000\x0008\x0009\x0007\x000A\x000A\x001D\x000C\x0001\x0002\x0000" + "\x0022\x0003\x0073\x0006\x0016\x0007\x0017\x0008\x0020\x0009\x001E\x000A\x0012" + "\x000B\x0022\x000C\x0018\x000D\x000F\x000E\x000D\x0016\x001B\x0017\x0013\x0018" + "\x001D\x0019\x0021\x001D\x0015\x001E\x0070\x0001\x0002\x0000\x0010\x0003\uffeb" + "\x0009\uffeb\x000A\uffeb\x000E\uffeb\x0016\uffeb\x001D\uffeb\x001E\uffeb\x0001" + "\x0002\x0000\x0010\x0003\uff97\x0009\x0007\x000A\x000A\x000E\uff97\x0016\x0035" + "\x001D\x000C\x001E\uff97\x0001\x0002\x0000\x0004\x0009\x0031\x0001\x0002\x0000" + "\x0022\x0003\x001C\x0006\x0016\x0007\x0017\x0008\x0020\x0009\x001E\x000A\x0012" + "\x000B\x0022\x000C\x0018\x000D\x000F\x000E\x000D\x0016\x001B\x0017\x0013\x0018" + "\x001D\x0019\x0021\x001D\x0015\x001E\x000E\x0001\x0002\x0000\x0022\x0003\uff9a" + "\x0006\uff9a\x0007\uff9a\x0008\uff9a\x0009\uff9a\x000A\uff9a\x000B\uff9a\x000C" + "\uff9a\x000D\uff9a\x000E\uff9a\x0016\uff9a\x0017\uff9a\x0018\uff9a\x0019\uff9a" + "\x001D\uff9a\x001E\uff9a\x0001\x0002\x0000\x0012\x0003\uffa1\x000F\uffa1\x0012" + "\uffa1\x0015\uffa1\x001A\uffa1\x001B\uffa1\x001E\uffa1\x001F\uffa1\x0001\x0002" + "\x0000\x000C\x000F\uffb1\x0010\uffb1\x0012\uffab\x001B\uffab\x001E\uffab\x0001" + "\x0002\x0000\x0012\x0003\uffa2\x000F\uffa2\x0012\uffa2\x0015\uffa2\x001A\uffa2" + "\x001B\uffa2\x001E\uffa2\x001F\uffa2\x0001\x0002\x0000\x0006\x000F\uffe0\x0010" + "\x002D\x0001\x0002\x0000\x0008\x0012\x0029\x001B\uffb4\x001E\uffb4\x0001\x0002" + "\x0000\x0012\x0003\uffa6\x000F\uffa6\x0012\uffa6\x0015\uffa6\x001A\uffa6\x001B" +
"\uffa6\x001E\uffa6\x001F\uffa6\x0001\x0002\x0000\x0012\x0003\uff9f\x000F\uff9f" + "\x0012\uff9f\x0015\uff9f\x001A\uff9f\x001B\uff9f\x001E\uff9f\x001F\uff9f\x0001" + "\x0002\x0000\x0006\x001B\x0027\x001E\x0025\x0001\x0002\x0000\x0012\x0003\uffa5" + "\x000F\uffa5\x0012\uffa5\x0015\uffa5\x001A\uffa5\x001B\uffa5\x001E\uffa5\x001F" + "\uffa5\x0001\x0002\x0000\x0012\x0003\uffaa\x000F\uffaa\x0012\uffaa\x0015\uffaa" + "\x001A\uffaa\x001B\uffaa\x001E\uffaa\x001F\uffaa\x0001\x0002\x0000\x0012\x0003" + "\uffa9\x000F\uffa9\x0012\uffa9\x0015\uffa9\x001A\uffa9\x001B\uffa9\x001E\uffa9" + "\x001F\uffa9\x0001\x0002\x0000\x0012\x0003\uffa3\x000F\uffa3\x0012\uffa3\x0015" + "\uffa3\x001A\uffa3\x001B\uffa3\x001E\uffa3\x001F\uffa3\x0001\x0002\x0000\x000A" + "\x000F\uffb7\x0012\uffb7\x001B\uffb7\x001E\uffb7\x0001\x0002\x0000\x0010\x0003" + "\uffe7\x0009\uffe7\x000A\uffe7\x000E\uffe7\x0016\uffe7\x001D\uffe7\x001E\uffe7" + "\x0001\x0002\x0000\x0012\x0003\uffa0\x000F\uffa0\x0012\uffa0\x0015\uffa0\x001A" + "\uffa0\x001B\uffa0\x001E\uffa0\x001F\uffa0\x0001\x0002\x0000\x000A\x000F\uffe4" + "\x0012\uff9c\x001B\uff9c\x001E\uff9c\x0001\x0002\x0000\x0012\x0003\uff9e\x000F" + "\uff9e\x0012\uff9e\x0015\uff9e\x001A\uff9e\x001B\uff9e\x001E\uff9e\x001F\uff9e" + "\x0001\x0002\x0000\x0012\x0003\uffa7\x000F\uffa7\x0012\uffa7\x0015\uffa7\x001A" + "\uffa7\x001B\uffa7\x001E\uffa7\x001F\uffa7\x0001\x0002\x0000\x0006\x000F\uffdb" + "\x0010\uffdb\x0001\x0002\x0000\x0012\x0003\uffa8\x000F\uffa8\x0012\uffa8\x0015" + "\uffa8\x001A\uffa8\x001B\uffa8\x001E\uffa8\x001F\uffa8\x0001\x0002\x0000\x0012" + "\x0003\uff9d\x000F\uff9d\x0012\uff9d\x0015\uff9d\x001A\uff9d\x001B\uff9d\x001E" + "\uff9d\x001F\uff9d\x0001\x0002\x0000\x0012\x0003\uffa4\x000F\uffa4\x0012\uffa4" + "\x0015\uffa4\x001A\uffa4\x001B\uffa4\x001E\uffa4\x001F\uffa4\x0001\x0002\x0000" + "\x0004\x000F\x0024\x0001\x0002\x0000\x0010\x0003\uffe3\x0009\uffe3\x000A\uffe3" + "\x000E\uffe3\x0016\uffe3\x001D\uffe3\x001E\uffe3\x0001\x0002\x0000\x0006\x000F" +
"\uffb1\x0010\uffb1\x0001\x0002\x0000\x0010\x0003\uffe8\x0009\uffe8\x000A\uffe8" + "\x000E\uffe8\x0016\uffe8\x001D\uffe8\x001E\uffe8\x0001\x0002\x0000\x0004\x001C" + "\x0028\x0001\x0002\x0000\x0006\x001B\uffb3\x001E\uffb3\x0001\x0002\x0000\x0022" + "\x0003\x002C\x0006\x0016\x0007\x0017\x0008\x0020\x0009\x001E\x000A\x0012\x000B" + "\x0022\x000C\x0018\x000D\x000F\x000E\x000D\x0016\x001B\x0017\x0013\x0018\x001D" + "\x0019\x0021\x001D\x0015\x001E\x002B\x0001\x0002\x0000\x000A\x000F\uffb8\x0012" + "\uffb8\x001B\uffb8\x001E\uffb8\x0001\x0002\x0000\x0012\x0003\uffab\x000F\uffab" + "\x0012\uffab\x0015\uffab\x001A\uffab\x001B\uffab\x001E\uffab\x001F\uffab\x0001" + "\x0002\x0000\x0012\x0003\uff9c\x000F\uff9c\x0012\uff9c\x0015\uff9c\x001A\uff9c" + "\x001B\uff9c\x001E\uff9c\x001F\uff9c\x0001\x0002\x0000\x0004\x001E\x0025\x0001" + "\x0002\x0000\x0004\x000F\x002F\x0001\x0002\x0000\x0010\x0003\uffdf\x0009\uffdf" + "\x000A\uffdf\x000E\uffdf\x0016\uffdf\x001D\uffdf\x001E\uffdf\x0001\x0002\x0000" + "\x0006\x000F\uffdc\x0010\uffdc\x0001\x0002\x0000\x0022\x0003\uff9b\x0006\uff9b" + "\x0007\uff9b\x0008\uff9b\x0009\uff9b\x000A\uff9b\x000B\uff9b\x000C\uff9b\x000D" + "\uff9b\x000E\uff9b\x0016\uff9b\x0017\uff9b\x0018\uff9b\x0019\uff9b\x001D\uff9b" + "\x001E\uff9b\x0001\x0002\x0000\x0008\x0003\uff97\x000E\x004E\x001E\uff97\x0001" + "\x0002\x0000\x000A\x0003\uffda\x000E\uffda\x0016\x0035\x001E\uffda\x0001\x0002" + "\x0000\x0008\x0003\uffd9\x000E\uffd9\x001E\uffd9\x0001\x0002\x0000\x0008\x0017" + "\x0039\x0018\x003A\x0019\x0038\x0001\x0002\x0000\x0010\x0003\uffec\x0009\uffec" + "\x000A\uffec\x000E\uffec\x0016\uffec\x001D\uffec\x001E\uffec\x0001\x0002\x0000" + "\x000A\x0003\uffd7\x000E\uffd7\x0016\uffd7\x001E\uffd7\x0001\x0002\x0000\x0006" + "\x0003\uffd2\x001E\uffd2\x0001\x0002\x0000\x0006\x0003\uffd6\x001E\uffd6\x0001" + "\x0002\x0000\x0006\x0003\uffd4\x001E\uffd4\x0001\x0002\x0000\x0006\x0003\x003F" + "\x001E\x003C\x0001\x0002\x0000\x0012\x0003\uffae\x000F\uffae\x0010\uffae\x0013" +
"\uffae\x0015\uffae\x001A\uffae\x001E\uffae\x001F\uffae\x0001\x0002\x0000\x0008" + "\x000F\uffcd\x0010\uffcd\x0015\uffcd\x0001\x0002\x0000\x0006\x000F\uffce\x0010" + "\uffce\x0001\x0002\x0000\x0012\x0003\uffad\x000F\uffad\x0010\uffad\x0013\uffad" + "\x0015\uffad\x001A\uffad\x001E\uffad\x001F\uffad\x0001\x0002\x0000\x0006\x000F" + "\x0042\x0010\x0043\x0001\x0002\x0000\x0006\x000F\uffcf\x0010\uffcf\x0001\x0002" + "\x0000\x000A\x0003\uffd3\x000E\uffd3\x0016\uffd3\x001E\uffd3\x0001\x0002\x0000" + "\x0006\x0003\x003F\x001E\x003C\x0001\x0002\x0000\x0006\x000F\uffd0\x0010\uffd0" + "\x0001\x0002\x0000\x0006\x0003\x003F\x001E\x003C\x0001\x0002\x0000\x0006\x000F" + "\x0047\x0010\x0043\x0001\x0002\x0000\x000A\x0003\uffd5\x000E\uffd5\x0016\uffd5" + "\x001E\uffd5\x0001\x0002\x0000\x0006\x0003\x003F\x001E\x003C\x0001\x0002\x0000" + "\x0006\x000F\x004A\x0010\x0043\x0001\x0002\x0000\x000A\x0003\uffd1\x000E\uffd1" + "\x0016\uffd1\x001E\uffd1\x0001\x0002\x0000\x000A\x0003\uffd8\x000E\uffd8\x0016" + "\uffd8\x001E\uffd8\x0001\x0002\x0000\x0006\x0003\uffca\x001E\uffca\x0001\x0002" + "\x0000\x0006\x0003\x0056\x001E\x0050\x0001\x0002\x0000\x0004\x000D\x004F\x0001" + "\x0002\x0000\x0006\x0003\x0052\x001E\x0050\x0001\x0002\x0000\x0006\x000F\uffb0" + "\x0014\uffb0\x0001\x0002\x0000\x0004\x000F\uffcc\x0001\x0002\x0000\x0004\x000F" + "\uffaf\x0001\x0002\x0000\x0004\x000F\x0054\x0001\x0002\x0000\x0006\x0003\uffcb" + "\x001E\uffcb\x0001\x0002\x0000\x0004\x0014\uffc7\x0001\x0002\x0000\x0006\x000F" + "\uffc4\x0014\uffaf\x0001\x0002\x0000\x0008\x0002\ufffe\x0003\x0056\x001E\x0050" + "\x0001\x0002\x0000\x0008\x0002\uffc8\x0003\uffc8\x001E\uffc8\x0001\x0002\x0000" + "\x0008\x0002\uffc9\x0003\uffc9\x001E\uffc9\x0001\x0002\x0000\x0004\x000F\x005B" + "\x0001\x0002\x0000\x0008\x0002\uffc3\x0003\uffc3\x001E\uffc3\x0001\x0002\x0000" + "\x0004\x0014\x005D\x0001\x0002\x0000\x000E\x0003\uffc6\x000F\uffc6\x0015\uffc6" + "\x001A\uffc6\x001E\uffc6\x001F\uffc6\x0001\x0002\x0000\x000E\x0003\uff97\x000F" +
"\uff97\x0015\uff97\x001A\uff97\x001E\uff97\x001F\uff97\x0001\x0002\x0000\x000E" + "\x0003\uffbd\x000F\uffbd\x0015\uffbd\x001A\uffbd\x001E\uffbd\x001F\uffbd\x0001" + "\x0002\x0000\x000E\x0003\x003F\x000F\uffbf\x0015\uffbf\x001A\x0067\x001E\x003C" + "\x001F\x0066\x0001\x0002\x0000\x0006\x000F\uffc1\x0015\uffc1\x0001\x0002\x0000" + "\x0006\x000F\x0063\x0015\x0064\x0001\x0002\x0000\x0008\x0002\uffc5\x0003\uffc5" + "\x001E\uffc5\x0001\x0002\x0000\x000E\x0003\uff97\x000F\uff97\x0015\uff97\x001A" + "\uff97\x001E\uff97\x001F\uff97\x0001\x0002\x0000\x0006\x000F\uffc2\x0015\uffc2" + "\x0001\x0002\x0000\x000E\x0003\uffbb\x000F\uffbb\x0015\uffbb\x001A\uffbb\x001E" + "\uffbb\x001F\uffbb\x0001\x0002\x0000\x0006\x0003\x003F\x001E\x003C\x0001\x0002" + "\x0000\x0010\x0003\uff97\x000F\uff97\x0013\x006C\x0015\uff97\x001A\uff97\x001E" + "\uff97\x001F\uff97\x0001\x0002\x0000\x000E\x0003\uffbe\x000F\uffbe\x0015\uffbe" + "\x001A\uffbe\x001E\uffbe\x001F\uffbe\x0001\x0002\x0000\x000E\x0003\uffb9\x000F" + "\uffb9\x0015\uffb9\x001A\uffb9\x001E\uffb9\x001F\uffb9\x0001\x0002\x0000\x000E" + "\x0003\uffbc\x000F\uffbc\x0015\uffbc\x001A\uffbc\x001E\uffbc\x001F\uffbc\x0001" + "\x0002\x0000\x0022\x0003\x002C\x0006\x0016\x0007\x0017\x0008\x0020\x0009\x001E" + "\x000A\x0012\x000B\x0022\x000C\x0018\x000D\x000F\x000E\x000D\x0016\x001B\x0017" + "\x0013\x0018\x001D\x0019\x0021\x001D\x0015\x001E\x002B\x0001\x0002\x0000\x000E" + "\x0003\uffba\x000F\uffba\x0015\uffba\x001A\uffba\x001E\uffba\x001F\uffba\x0001" + "\x0002\x0000\x000E\x0003\uffac\x000F\uffac\x0015\uffac\x001A\uffac\x001E\uffac" + "\x001F\uffac\x0001\x0002\x0000\x0006\x000F\uffc0\x0015\uffc0\x0001\x0002\x0000" + "\x000C\x000F\uffb2\x0010\uffb2\x0012\uffab\x001B\uffab\x001E\uffab\x0001\x0002" + "\x0000\x0006\x001B\x0027\x001E\x0078\x0001\x0002\x0000\x0006\x000F\uffdd\x0010" + "\uffdd\x0001\x0002\x0000\x000A\x000F\uffe6\x0012\uff9c\x001B\uff9c\x001E\uff9c" + "\x0001\x0002\x0000\x0010\x0003\uffe9\x0009\uffe9\x000A\uffe9\x000E\uffe9\x0016" +
"\uffe9\x001D\uffe9\x001E\uffe9\x0001\x0002\x0000\x0006\x000F\uffe2\x0010\x0077" + "\x0001\x0002\x0000\x0004\x000F\x007A\x0001\x0002\x0000\x0004\x001E\x0078\x0001" + "\x0002\x0000\x0006\x000F\uffb2\x0010\uffb2\x0001\x0002\x0000\x0006\x000F\uffde" + "\x0010\uffde\x0001\x0002\x0000\x0010\x0003\uffe1\x0009\uffe1\x000A\uffe1\x000E" + "\uffe1\x0016\uffe1\x001D\uffe1\x001E\uffe1\x0001\x0002\x0000\x0004\x000F\x007C" + "\x0001\x0002\x0000\x0010\x0003\uffe5\x0009\uffe5\x000A\uffe5\x000E\uffe5\x0016" + "\uffe5\x001D\uffe5\x001E\uffe5\x0001\x0002\x0000\x0010\x0003\uffea\x0009\uffea" + "\x000A\uffea\x000E\uffea\x0016\uffea\x001D\uffea\x001E\uffea\x0001\x0002\x0000" + "\x0012\x0005\ufffb\x0007\ufffb\x0008\ufffb\x0009\ufffb\x000A\ufffb\x000B\ufffb" + "\x000C\ufffb\x001D\ufffb\x0001\x0002\x0000\x0012\x0005\uff97\x0007\uff97\x0008" + "\uff97\x0009\uff97\x000A\uff97\x000B\uff97\x000C\uff97\x001D\uff97\x0001\x0002" + "\x0000\x0022\x0003\x002C\x0006\x0016\x0007\x0017\x0008\x0020\x0009\x001E\x000A" + "\x0012\x000B\x0022\x000C\x0018\x000D\x000F\x000E\x000D\x0016\x001B\x0017\x0013" + "\x0018\x001D\x0019\x0021\x001D\x0015\x001E\x002B\x0001\x0002\x0000\x0006\x000F" + "\ufffd\x0012\x0029\x0001\x0002\x0000\x0004\x000F\x0083\x0001\x0002\x0000\x0012" + "\x0005\ufffc\x0007\ufffc\x0008\ufffc\x0009\ufffc\x000A\ufffc\x000B\ufffc\x000C" + "\ufffc\x001D\ufffc\x0001\x0002\x0000\x0012\x0005\x0088\x0007\ufff2\x0008\ufff2" + "\x0009\ufff2\x000A\ufff2\x000B\ufff2\x000C\ufff2\x001D\ufff2\x0001\x0002\x0000" + "\x0012\x0005\ufff9\x0007\ufff9\x0008\ufff9\x0009\ufff9\x000A\ufff9\x000B\ufff9" + "\x000C\ufff9\x001D\ufff9\x0001\x0002\x0000\x0010\x0007\x0093\x0008\x0094\x0009" + "\x0007\x000A\x000A\x000B\x0097\x000C\x0095\x001D\x000C\x0001\x0002\x0000\x0012" + "\x0005\ufffa\x0007\ufffa\x0008\ufffa\x0009\ufffa\x000A\ufffa\x000B\ufffa\x000C" + "\ufffa\x001D\ufffa\x0001\x0002\x0000\x0022\x0003\x002C\x0006\x0016\x0007\x0017" + "\x0008\x0020\x0009\x001E\x000A\x0012\x000B\x0022\x000C\x0018\x000D\x000F\x000E" +
"\x000D\x0016\x001B\x0017\x0013\x0018\x001D\x0019\x0021\x001D\x0015\x001E\x002B" + "\x0001\x0002\x0000\x0006\x000F\uffb5\x0012\x008D\x0001\x0002\x0000\x0004\x000F" + "\ufff8\x0001\x0002\x0000\x0004\x000F\x008C\x0001\x0002\x0000\x0012\x0005\ufff7" + "\x0007\ufff7\x0008\ufff7\x0009\ufff7\x000A\ufff7\x000B\ufff7\x000C\ufff7\x001D" + "\ufff7\x0001\x0002\x0000\x0024\x0003\x002C\x0006\x0016\x0007\x0017\x0008\x0020" + "\x0009\x001E\x000A\x0012\x000B\x0022\x000C\x0018\x000D\x000F\x000E\x000D\x0011" + "\x008E\x0016\x001B\x0017\x0013\x0018\x001D\x0019\x0021\x001D\x0015\x001E\x002B" + "\x0001\x0002\x0000\x0004\x000F\uffb6\x0001\x0002\x0000\x0010\x0007\ufff3\x0008" + "\ufff3\x0009\ufff3\x000A\ufff3\x000B\ufff3\x000C\ufff3\x001D\ufff3\x0001\x0002" + "\x0000\x0010\x0007\ufff5\x0008\ufff5\x0009\ufff5\x000A\ufff5\x000B\ufff5\x000C" + "\ufff5\x001D\ufff5\x0001\x0002\x0000\x0010\x0007\ufff1\x0008\ufff1\x0009\ufff1" + "\x000A\ufff1\x000B\ufff1\x000C\ufff1\x001D\ufff1\x0001\x0002\x0000\x0010\x0007" + "\ufff4\x0008\ufff4\x0009\ufff4\x000A\ufff4\x000B\ufff4\x000C\ufff4\x001D\ufff4" + "\x0001\x0002\x0000\x0004\x0006\x00A6\x0001\x0002\x0000\x0004\x0006\x00A3\x0001" + "\x0002\x0000\x0004\x000D\x00A0\x0001\x0002\x0000\x0010\x0007\ufff6\x0008\ufff6" + "\x0009\ufff6\x000A\ufff6\x000B\ufff6\x000C\ufff6\x001D\ufff6\x0001\x0002\x0000" + "\x0004\x000D\x009C\x0001\x0002\x0000\x0010\x0003\uff97\x0009\x0007\x000A\x000A" + "\x000E\uff97\x0016\x0035\x001D\x000C\x001E\uff97\x0001\x0002\x0000\x0008\x0003" + "\uff97\x000E\x004E\x001E\uff97\x0001\x0002\x0000\x0006\x0003\x0056\x001E\x0050" + "\x0001\x0002\x0000\x0008\x0002\uffff\x0003\x0056\x001E\x0050\x0001\x0002\x0000" + "\x0004\x001F\x009D\x0001\x0002\x0000\x0012\x0007\uff99\x0008\uff99\x0009\uff99" + "\x000A\uff99\x000B\uff99\x000C\uff99\x000F\x009E\x001D\uff99\x0001\x0002\x0000" + "\x0010\x0007\uff98\x0008\uff98\x0009\uff98\x000A\uff98\x000B\uff98\x000C\uff98" + "\x001D\uff98\x0001\x0002\x0000\x0010\x0007\uffee\x0008\uffee\x0009\uffee\x000A" +
"\uffee\x000B\uffee\x000C\uffee\x001D\uffee\x0001\x0002\x0000\x0004\x001F\x00A1" + "\x0001\x0002\x0000\x0012\x0007\uff99\x0008\uff99\x0009\uff99\x000A\uff99\x000B" + "\uff99\x000C\uff99\x000F\x009E\x001D\uff99\x0001\x0002\x0000\x0010\x0007\uffed" + "\x0008\uffed\x0009\uffed\x000A\uffed\x000B\uffed\x000C\uffed\x001D\uffed\x0001" + "\x0002\x0000\x0004\x001F\x00A4\x0001\x0002\x0000\x0012\x0007\uff99\x0008\uff99" + "\x0009\uff99\x000A\uff99\x000B\uff99\x000C\uff99\x000F\x009E\x001D\uff99\x0001" + "\x0002\x0000\x0010\x0007\uffef\x0008\uffef\x0009\uffef\x000A\uffef\x000B\uffef" + "\x000C\uffef\x001D\uffef\x0001\x0002\x0000\x0004\x001F\x00A7\x0001\x0002\x0000" + "\x0012\x0007\uff99\x0008\uff99\x0009\uff99\x000A\uff99\x000B\uff99\x000C\uff99" + "\x000F\x009E\x001D\uff99\x0001\x0002\x0000\x0010\x0007\ufff0\x0008\ufff0\x0009" + "\ufff0\x000A\ufff0\x000B\ufff0\x000C\ufff0\x001D\ufff0\x0001\x0002\x0000\x0004" + "\x0002\x0001\x0001\x0002"});
_reduce_table = unpackFromStrings(new string[]{"\x0000\x00A7\x0000\x0006\x0003\x0003\x002D\x0004\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0006\x0004\x007E\x001F\x007D\x0001\x0001\x0000\x0008\x000A\x000A" + "\x000C\x0008\x0014\x0007\x0001\x0001\x0000\x000E\x000F\x0010\x0015\x0070\x0016" + "\x0074\x001B\x0071\x0024\x0073\x002C\x0018\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x000E\x000A\x000A\x0014\x0035\x001F\x0033\x0020\x0031\x0021\x0036\x0023" + "\x0032\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x000E\x000F\x0010\x0015\x0013" + "\x0017\x000F\x001C\x001E\x0025\x0019\x002C\x0018\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x0004\x0033\x002D\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x0008\x0017\x000F\x001C\x001E\x0025\x0025" + "\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x0002\x0001\x0001\x0000\x0004\x0031\x0022\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000" + "\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002" + "\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0004\x002C\x0029\x0001\x0001\x0000" + "\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0004" + "\x001C\x002F\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000" + "\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0006\x000D\x004C\x001F\x004B" + "\x0001\x0001\x0000\x0004\x0021\x004A\x0001\x0001\x0000\x0002\x0001\x0001\x0000" + "\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0004" + "\x0036\x0047\x0001\x0001\x0000\x0004\x0034\x0044\x0001\x0001\x0000\x0004\x0035" +
"\x003A\x0001\x0001\x0000\x000A\x0022\x003F\x0027\x003C\x002A\x0040\x002B\x003D" + "\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x0002\x0001\x0001\x0000\x0008\x0027\x003C\x002A\x0043\x002B\x003D\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x000A\x0022\x0045\x0027\x003C\x002A\x0040" + "\x002B\x003D\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000" + "\x000A\x0022\x0048\x0027\x003C\x002A\x0040\x002B\x003D\x0001\x0001\x0000\x0002" + "\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0008\x000E\x0056\x0018\x0057\x0026\x0054\x0001\x0001\x0000\x0002" + "\x0001\x0001\x0000\x0004\x0026\x0050\x0001\x0001\x0000\x0002\x0001\x0001\x0000" + "\x0004\x0037\x0052\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x0002\x0001\x0001\x0000\x0004\x0038\x005B\x0001\x0001\x0000\x0004\x003A" + "\x0059\x0001\x0001\x0000\x0006\x0018\x0058\x0026\x0054\x0001\x0001\x0000\x0002" + "\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x0004\x0039\x005D\x0001\x0001\x0000\x000A" + "\x0019\x005F\x001D\x0061\x001E\x0060\x001F\x005E\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0006\x001A\x0068\x0027\x0067\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0008\x0019\x005F\x001E" + "\x0064\x001F\x005E\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x0006\x0027\x003C\x002B\x006E\x0001\x0001\x0000\x0006\x001F\x0069\x0029" + "\x006A\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002" + "\x0001\x0001\x0000\x0006\x0028\x006C\x002C\x006D\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x0008\x0016\x0074\x001B\x0071\x0024\x007C\x0001\x0001\x0000\x0002\x0001" +
"\x0001\x0000\x0004\x0030\x007A\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0004" + "\x0032\x0075\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0004\x001B\x0078\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000" + "\x0002\x0001\x0001\x0000\x0006\x0005\x0083\x001F\x0084\x0001\x0001\x0000\x0006" + "\x000F\x0080\x002C\x0018\x0001\x0001\x0000\x0004\x002E\x0081\x0001\x0001\x0000" + "\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0006\x0007\x0085\x0010\x0086" + "\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0012\x0006\x0095\x0008\x0090\x000A" + "\x000A\x000B\x008F\x000C\x0097\x0012\x0091\x0013\x008E\x0014\x0007\x0001\x0001" + "\x0000\x0002\x0001\x0001\x0000\x0008\x000F\x0088\x0011\x0089\x002C\x0018\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x0004\x002F\x008A\x0001\x0001\x0000\x0002" + "\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0004\x002C\x0029\x0001\x0001\x0000" + "\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002" + "\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x000E\x000A\x000A\x0014\x0035\x001F\x0033\x0020\x0098\x0021\x0036\x0023" + "\x0032\x0001\x0001\x0000\x0006\x000D\x0099\x001F\x004B\x0001\x0001\x0000\x0008" + "\x000E\x009A\x0018\x0057\x0026\x0054\x0001\x0001\x0000\x0006\x0018\x0058\x0026" + "\x0054\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0004\x0009\x009E\x0001\x0001" + "\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001\x0000" + "\x0004\x0009\x00A1\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001\x0001" + "\x0000\x0004\x0009\x00A4\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002\x0001" + "\x0001\x0000\x0004\x0009\x00A7\x0001\x0001\x0000\x0002\x0001\x0001\x0000\x0002" + "\x0001\x0001"});
}
/// <summary>Default constructor.
/// </summary>
public parser():base()
{
InitBlock();
}
/// <summary>Constructor which sets the default scanner.
/// </summary>
public parser(Scanner s):base(s)
{
InitBlock();
}
/// <summary>Production table.
/// </summary>
//UPGRADE_NOTE: Final was removed from the declaration of '_production_table '. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1003"'
//UPGRADE_NOTE: The initialization of '_production_table' was moved to method 'InitBlock'. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1005"'
protected static short[][] _production_table;
/// <summary>Access to production table.
/// </summary>
public override short[][] production_table()
{
return _production_table;
}
/// <summary>Parse-action table.
/// </summary>
//UPGRADE_NOTE: Final was removed from the declaration of '_action_table '. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1003"'
//UPGRADE_NOTE: The initialization of '_action_table' was moved to method 'InitBlock'. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1005"'
protected static short[][] _action_table;
/// <summary>Access to parse-action table.
/// </summary>
public override short[][] action_table()
{
return _action_table;
}
/// <summary><code>reduce_goto</code> table.
/// </summary>
//UPGRADE_NOTE: Final was removed from the declaration of '_reduce_table '. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1003"'
//UPGRADE_NOTE: The initialization of '_reduce_table' was moved to method 'InitBlock'. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1005"'
protected static short[][] _reduce_table;
/// <summary>Access to <code>reduce_goto</code> table.
/// </summary>
public override short[][] reduce_table()
{
return _reduce_table;
}
/// <summary>Instance of action encapsulation class.
/// </summary>
protected CUP_parser_actions action_obj;
/// <summary>Action encapsulation object initializer.
/// </summary>
protected override void init_actions()
{
action_obj = new CUP_parser_actions(this);
}
/// <summary>Invoke a user supplied parse action.
/// </summary>
public override Symbol do_action(int act_num, lr_parser parser, CUP.runtime.SymbolStack stack, int top)
{
/* call code in generated class */
return action_obj.CUP_parser_do_action(act_num, parser, stack, top);
}
/// <summary>Indicates start state.
/// </summary>
public override int start_state()
{
return 0;
}
/// <summary>Indicates start production.
/// </summary>
public override int start_production()
{
return 0;
}
/// <summary><code>EOF</code> Symbol index.
/// </summary>
public override int EOF_sym()
{
return 0;
}
/// <summary><code>error</code> Symbol index.
/// </summary>
public override int error_sym()
{
return 1;
}
/// <summary>User initialization code.
/// </summary>
public override void user_init()
{
lexer.init();
}
/// <summary>Scan to get the next Symbol.
/// </summary>
public override Symbol scan()
{
return lexer.next_token();
}
/* override error routines */
public override void report_fatal_error(string message, object info)
{
done_parsing();
lexer.emit_error(message);
System.Console.Error.WriteLine("Can't recover from previous error(s), giving up.");
System.Environment.Exit(1);
}
public override void report_error(string message, object info)
{
lexer.emit_error(message);
}
}
/// <summary>Cup generated class to encapsulate user supplied action code.
/// </summary>
public class CUP_parser_actions
{
private void InitBlock()
{
rhs_parts = new production_part[MAX_RHS];
multipart_name = new string("".ToCharArray());
symbols = new System.Collections.Hashtable();
non_terms = new System.Collections.Hashtable();
_cur_side = assoc.no_prec;
}
/// <summary>helper routine to clone a new production part adding a given label
/// </summary>
protected virtual production_part add_lab(production_part part, string lab)
{
/* if there is no label, or this is an action, just return the original */
if (lab == null || part.is_action())
return part;
/* otherwise build a new one with the given label attached */
return new symbol_part(((symbol_part) part).the_symbol(), lab);
}
/// <summary>max size of right hand side we will support
/// </summary>
protected const int MAX_RHS = 200;
/// <summary>array for accumulating right hand side parts
/// </summary>
//UPGRADE_NOTE: The initialization of 'rhs_parts' was moved to method 'InitBlock'. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1005"'
protected production_part[] rhs_parts;
/// <summary>where we are currently in building a right hand side
/// </summary>
protected int rhs_pos = 0;
/// <summary>start a new right hand side
/// </summary>
protected virtual void new_rhs()
{
rhs_pos = 0;
}
/// <summary>add a new right hand side part
/// </summary>
protected virtual void add_rhs_part(production_part part)
{
if (rhs_pos >= MAX_RHS)
throw new System.Exception("Internal Error: Productions limited to " + MAX_RHS + " symbols and actions");
rhs_parts[rhs_pos] = part;
rhs_pos++;
}
/// <summary>string to build up multiple part names
/// </summary>
//UPGRADE_NOTE: The initialization of 'multipart_name' was moved to method 'InitBlock'. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1005"'
protected string multipart_name;
/// <summary>append a new name segment to the accumulated multipart name
/// </summary>
protected virtual void append_multipart(string name)
{
System.String dot = "";
/* if we aren't just starting out, put on a dot */
if (multipart_name.Length != 0)
dot = ".";
multipart_name = string.Concat(multipart_name, dot + name);
}
/// <summary>table of declared symbols -- contains production parts indexed by name
/// </summary>
//UPGRADE_NOTE: The initialization of 'symbols' was moved to method 'InitBlock'. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1005"'
protected System.Collections.Hashtable symbols;
/// <summary>table of just non terminals -- contains non_terminals indexed by name
/// </summary>
//UPGRADE_NOTE: The initialization of 'non_terms' was moved to method 'InitBlock'. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1005"'
protected System.Collections.Hashtable non_terms;
/// <summary>declared start non_terminal
/// </summary>
protected non_terminal start_nt = null;
/// <summary>left hand side non terminal of the current production
/// </summary>
protected non_terminal lhs_nt;
/// <summary>Current precedence number
/// </summary>
internal int _cur_prec = 0;
/// <summary>Current precedence side
/// </summary>
//UPGRADE_NOTE: The initialization of '_cur_side' was moved to method 'InitBlock'. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1005"'
internal int _cur_side;
/// <summary>update the precedences we are declaring
/// </summary>
protected virtual void update_precedence(int p)
{
_cur_side = p;
_cur_prec++;
}
/// <summary>add relevant data to terminals
/// </summary>
protected virtual void add_precedence(string term)
{
if (term == null)
{
System.Console.Error.WriteLine("Unable to add precedence to nonexistent terminal");
}
else
{
symbol_part sp = (symbol_part) symbols[term];
if (sp == null)
{
System.Console.Error.WriteLine("Could find terminal " + term + " while declaring precedence");
}
else
{
CUP.symbol sym = sp.the_symbol();
if (sym is terminal)
((terminal) sym).set_precedence(_cur_side, _cur_prec);
else
System.Console.Error.WriteLine("Precedence declaration: Can't find terminal " + term);
}
}
}
//UPGRADE_NOTE: Final was removed from the declaration of 'parser '. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1003"'
private parser parser;
/// <summary>Constructor
/// </summary>
internal CUP_parser_actions(parser parser)
{
InitBlock();
this.parser = parser;
}
/// <summary>Method with the actual generated action code.
/// </summary>
public Symbol CUP_parser_do_action(int CUP_parser_act_num, lr_parser CUP_parser_parser, CUP.runtime.SymbolStack CUP_parser_stack, int CUP_parser_top)
{
/* Symbol object for return from actions */
Symbol CUP_parser_result;
/* select the action based on the action number */
switch (CUP_parser_act_num)
{
case 106:
// empty ::=
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(29, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 105:
// opt_semi ::= SEMI
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(7, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 104:
// opt_semi ::=
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(7, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 103:
// non_terminal ::= NONTERMINAL
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(8, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 102:
// non_terminal ::= NON TERMINAL
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(8, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 1)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 101:
// robust_id ::= error
{
System.String RESULT = null;
lexer.emit_error("Illegal use of reserved word");
RESULT = "ILLEGAL";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 100:
// robust_id ::= NONASSOC
{
System.String RESULT = null;
RESULT = "nonassoc";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 99:
// robust_id ::= RIGHT
{
System.String RESULT = null;
RESULT = "right";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 98:
// robust_id ::= LEFT
{
System.String RESULT = null;
RESULT = "left";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 97:
// robust_id ::= PRECEDENCE
{
System.String RESULT = null;
RESULT = "precedence";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 96:
// robust_id ::= START
{
System.String RESULT = null;
RESULT = "start";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 95:
// robust_id ::= WITH
{
System.String RESULT = null;
RESULT = "with";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 94:
// robust_id ::= SCAN
{
System.String RESULT = null;
RESULT = "scan";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 93:
// robust_id ::= INIT
{
System.String RESULT = null;
RESULT = "init";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 92:
// robust_id ::= NONTERMINAL
{
System.String RESULT = null;
RESULT = "nonterminal";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 91:
// robust_id ::= NON
{
System.String RESULT = null;
RESULT = "non";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 90:
// robust_id ::= TERMINAL
{
System.String RESULT = null;
RESULT = "terminal";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 89:
// robust_id ::= PARSER
{
System.String RESULT = null;
RESULT = "parser";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 88:
// robust_id ::= ACTION
{
System.String RESULT = null;
RESULT = "action";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 87:
// robust_id ::= CODE
{
System.String RESULT = null;
RESULT = "code";
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 86:
// robust_id ::= ID
{
System.String RESULT = null;
int the_idleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int the_idright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String the_id = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
RESULT = the_id;
CUP_parser_result = new Symbol(42, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 85:
// label_id ::= robust_id
{
System.String RESULT = null;
int the_idleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int the_idright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String the_id = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
RESULT = the_id;
CUP_parser_result = new Symbol(38, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 84:
// symbol_id ::= error
{
System.String RESULT = null;
lexer.emit_error("Illegal use of reserved word");
RESULT = "ILLEGAL";
CUP_parser_result = new Symbol(37, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 83:
// symbol_id ::= ID
{
System.String RESULT = null;
int the_idleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int the_idright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String the_id = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
RESULT = the_id;
CUP_parser_result = new Symbol(37, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 82:
// nt_id ::= error
{
System.String RESULT = null;
lexer.emit_error("Illegal use of reserved word");
RESULT = "ILLEGAL";
CUP_parser_result = new Symbol(36, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 81:
// nt_id ::= ID
{
System.String RESULT = null;
int the_idleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int the_idright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String the_id = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
RESULT = the_id;
CUP_parser_result = new Symbol(36, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 80:
// new_non_term_id ::= ID
{
System.Object RESULT = null;
int non_term_idleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int non_term_idright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String non_term_id = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
/* see if this non terminal has been declared before */
if (symbols[non_term_id] != null)
{
/* issue a message */
lexer.emit_error("CUP.runtime.Symbol \"" + non_term_id + "\" has already been declared");
}
else
{
if (multipart_name.Equals(""))
{
append_multipart("Object");
}
/* build the non terminal object */
non_terminal this_nt = new non_terminal(non_term_id, multipart_name);
/* put it in the non_terms table */
SupportClass.PutElement(non_terms, non_term_id, this_nt);
/* build a production_part and put it in the symbols table */
SupportClass.PutElement(symbols, non_term_id, new symbol_part(this_nt));
}
CUP_parser_result = new Symbol(26, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 79:
// new_term_id ::= ID
{
System.Object RESULT = null;
int term_idleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int term_idright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String term_id = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
/* see if this terminal has been declared before */
if (symbols[term_id] != null)
{
/* issue a message */
lexer.emit_error("CUP.runtime.Symbol \"" + term_id + "\" has already been declared");
}
else
{
/* if no type declared, declare one */
if (multipart_name.Equals(""))
{
append_multipart("Object");
}
/* build a production_part and put it in the table */
SupportClass.PutElement(symbols, term_id, new symbol_part(new terminal(term_id, multipart_name)));
}
CUP_parser_result = new Symbol(25, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 78:
// type_id ::= type_id LBRACK RBRACK
{
System.Object RESULT = null;
multipart_name = string.Concat(multipart_name, "[]");
CUP_parser_result = new Symbol(19, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 2)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 77:
// type_id ::= multipart_id
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(19, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 76:
// import_id ::= multipart_id
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(15, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 75:
// import_id ::= multipart_id DOT STAR
{
System.Object RESULT = null;
append_multipart("*");
CUP_parser_result = new Symbol(15, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 2)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 74:
// multipart_id ::= robust_id
{
System.Object RESULT = null;
int an_idleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int an_idright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String an_id = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
append_multipart(an_id);
CUP_parser_result = new Symbol(13, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 73:
// multipart_id ::= multipart_id DOT robust_id
{
System.Object RESULT = null;
int another_idleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int another_idright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String another_id = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
append_multipart(another_id);
CUP_parser_result = new Symbol(13, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 2)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 72:
// opt_label ::= empty
{
System.String RESULT = null;
RESULT = null;
CUP_parser_result = new Symbol(39, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 71:
// opt_label ::= COLON label_id
{
System.String RESULT = null;
int labidleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int labidright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String labid = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
RESULT = labid;
CUP_parser_result = new Symbol(39, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 1)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 70:
// prod_part ::= CODE_STRING
{
System.Object RESULT = null;
int code_strleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int code_strright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String code_str = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
/* add a new production part */
add_rhs_part(new action_part(code_str));
CUP_parser_result = new Symbol(24, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 69:
// prod_part ::= symbol_id opt_label
{
System.Object RESULT = null;
int symidleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 1)).left;
int symidright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 1)).right;
System.String symid = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 1)).Value;
int labidleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int labidright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String labid = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
/* try to look up the id */
production_part symb = (production_part) symbols[symid];
/* if that fails, symbol is undeclared */
if (symb == null)
{
if (lexer.error_count == 0)
lexer.emit_error("CUP.runtime.Symbol \"" + symid + "\" has not been declared");
}
else
{
/* add a labeled production part */
add_rhs_part(add_lab(symb, labid));
}
CUP_parser_result = new Symbol(24, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 1)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 68:
// prod_part_list ::= empty
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(23, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 67:
// prod_part_list ::= prod_part_list prod_part
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(23, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 1)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 66:
// rhs ::= prod_part_list
{
System.Object RESULT = null;
if (lhs_nt != null)
{
/* build the production */
production p = new production(lhs_nt, rhs_parts, rhs_pos);
/* if we have no start non-terminal declared and this is
the first production, make its lhs nt the start_nt
and build a special start production for it. */
if (start_nt == null)
{
start_nt = lhs_nt;
/* build a special start production */
new_rhs();
add_rhs_part(add_lab(new symbol_part(start_nt), "start_val"));
add_rhs_part(new symbol_part(terminal.EOF));
add_rhs_part(new action_part("RESULT = start_val;"));
emit.start_production = new production(non_terminal.START_nt, rhs_parts, rhs_pos);
new_rhs();
}
}
/* reset the rhs accumulation in any case */
new_rhs();
CUP_parser_result = new Symbol(28, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 65:
// rhs ::= prod_part_list PERCENT_PREC term_id
{
System.Object RESULT = null;
int term_nameleft = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left;
int term_nameright = ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right;
System.String term_name = (string) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).Value;
CUP.symbol sym = null;
if (lhs_nt != null)
{
/* Find the precedence symbol */
if (term_name == null)
{
System.Console.Error.WriteLine("No terminal for contextual precedence");
sym = null;
}
else
{
sym = ((symbol_part) symbols[term_name]).the_symbol();
}
/* build the production */
production p;
if ((sym != null) && (sym is terminal))
{
p = new production(lhs_nt, rhs_parts, rhs_pos, ((terminal) sym).precedence_num(), ((terminal) sym).precedence_side());
((symbol_part) symbols[term_name]).the_symbol().note_use();
}
else
{
System.Console.Error.WriteLine("Invalid terminal " + term_name + " for contextual precedence assignment");
p = new production(lhs_nt, rhs_parts, rhs_pos);
}
/* if we have no start non-terminal declared and this is
the first production, make its lhs nt the start_nt
and build a special start production for it. */
if (start_nt == null)
{
start_nt = lhs_nt;
/* build a special start production */
new_rhs();
add_rhs_part(add_lab(new symbol_part(start_nt), "start_val"));
add_rhs_part(new symbol_part(terminal.EOF));
add_rhs_part(new action_part("RESULT = start_val;"));
if ((sym != null) && (sym is terminal))
{
emit.start_production = new production(non_terminal.START_nt, rhs_parts, rhs_pos, ((terminal) sym).precedence_num(), ((terminal) sym).precedence_side());
}
else
{
emit.start_production = new production(non_terminal.START_nt, rhs_parts, rhs_pos);
}
new_rhs();
}
}
/* reset the rhs accumulation in any case */
new_rhs();
CUP_parser_result = new Symbol(28, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 2)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 64:
// rhs_list ::= rhs
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(27, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 63:
// rhs_list ::= rhs_list BAR rhs
{
System.Object RESULT = null;
CUP_parser_result = new Symbol(27, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 2)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 62:
// production ::= error NT_13 SEMI
{
System.Object RESULT = null;
// propagate RESULT from NT_13
if (((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 1)).Value != null)
RESULT = (object) ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 1)).Value;
CUP_parser_result = new Symbol(22, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 2)).left, ((Symbol) CUP_parser_stack.Peek(CUP_parser_top - 0)).right, RESULT);
}
return CUP_parser_result;