-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYASPL2Cup.java
1611 lines (1450 loc) · 99.4 KB
/
YASPL2Cup.java
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.11b 20160615 (GIT 4ac7450)
//----------------------------------------------------
import java_cup.Lexer;
import java_cup.runtime.*;
import java_cup.runtime.Scanner;
import com.scalified.tree.*;
import com.scalified.tree.multinode.*;
import java.util.*;
import Visitor.*;
import java_cup.runtime.XMLElement;
/** CUP v0.11b 20160615 (GIT 4ac7450) generated parser.
*/
@SuppressWarnings({"rawtypes"})
public class YASPL2Cup extends java_cup.runtime.lr_parser {
public final Class getSymbolContainer() {
return YASPL2Sym.class;
}
/** Default constructor. */
@Deprecated
public YASPL2Cup() {super();}
/** Constructor which sets the default scanner. */
@Deprecated
public YASPL2Cup(java_cup.runtime.Scanner s) {super(s);}
/** Constructor which sets the default scanner. */
public YASPL2Cup(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}
/** Production table. */
protected static final short _production_table[][] =
unpackFromStrings(new String[] {
"\000\077\000\002\002\006\000\002\002\004\000\002\013" +
"\004\000\002\013\004\000\002\013\002\000\002\014\004" +
"\000\002\014\003\000\002\003\005\000\002\022\003\000" +
"\002\022\003\000\002\022\003\000\002\026\005\000\002" +
"\026\003\000\002\027\005\000\002\027\003\000\002\004" +
"\012\000\002\015\004\000\002\015\002\000\002\016\004" +
"\000\002\016\003\000\002\005\007\000\002\006\006\000" +
"\002\017\003\000\002\017\003\000\002\007\006\000\002" +
"\007\005\000\002\007\006\000\002\007\006\000\002\007" +
"\011\000\002\007\013\000\002\007\011\000\002\007\011" +
"\000\002\007\021\000\002\020\005\000\002\020\005\000" +
"\002\020\003\000\002\020\003\000\002\021\005\000\002" +
"\021\003\000\002\010\003\000\002\010\003\000\002\010" +
"\005\000\002\010\003\000\002\010\004\000\002\010\005" +
"\000\002\023\003\000\002\023\003\000\002\023\003\000" +
"\002\023\003\000\002\011\005\000\002\011\004\000\002" +
"\011\005\000\002\011\005\000\002\011\003\000\002\024" +
"\003\000\002\024\003\000\002\012\003\000\002\012\003" +
"\000\002\025\003\000\002\025\003\000\002\025\003\000" +
"\002\025\003\000\002\025\003" });
/** Access to production table. */
public short[][] production_table() {return _production_table;}
/** Parse-action table. */
protected static final short[][] _action_table =
unpackFromStrings(new String[] {
"\000\217\000\004\004\005\001\002\000\004\002\221\001" +
"\002\000\014\005\ufffd\010\010\026\015\027\013\030\007" +
"\001\002\000\004\011\067\001\002\000\010\006\ufff7\007" +
"\ufff7\011\ufff7\001\002\000\004\011\201\001\002\000\014" +
"\005\ufffd\010\010\026\015\027\013\030\007\001\002\000" +
"\004\005\017\001\002\000\010\006\ufff8\007\ufff8\011\ufff8" +
"\001\002\000\014\005\ufffd\010\010\026\015\027\013\030" +
"\007\001\002\000\010\006\ufff9\007\ufff9\011\ufff9\001\002" +
"\000\004\005\uffff\001\002\000\026\011\037\012\030\015" +
"\022\017\024\020\040\021\027\023\020\036\031\040\021" +
"\043\023\001\002\000\014\011\050\012\030\017\024\020" +
"\040\023\020\001\002\000\004\012\171\001\002\000\034" +
"\011\ufff0\012\ufff0\015\ufff0\017\ufff0\020\ufff0\021\ufff0\023" +
"\ufff0\026\015\027\013\030\007\036\ufff0\040\ufff0\043\ufff0" +
"\001\002\000\004\012\146\001\002\000\042\006\uffda\007" +
"\uffda\013\uffda\014\uffda\022\uffda\023\uffda\024\uffda\025\uffda" +
"\032\uffda\044\uffda\045\uffda\046\uffda\047\uffda\050\uffda\052" +
"\uffda\053\uffda\001\002\000\016\007\144\022\053\023\055" +
"\024\057\025\056\032\uffde\001\002\000\032\002\uffea\011" +
"\uffea\012\uffea\015\uffea\016\uffea\017\uffea\020\uffea\021\uffea" +
"\023\uffea\036\uffea\040\uffea\043\uffea\001\002\000\006\007" +
"\142\032\uffdd\001\002\000\014\011\050\012\030\017\024" +
"\020\040\023\020\001\002\000\004\012\104\001\002\000" +
"\004\032\102\001\002\000\032\002\uffeb\011\uffeb\012\uffeb" +
"\015\uffeb\016\uffeb\017\uffeb\020\uffeb\021\uffeb\023\uffeb\036" +
"\uffeb\040\uffeb\043\uffeb\001\002\000\032\002\ufffb\011\037" +
"\012\030\015\022\016\ufffb\017\024\020\040\021\027\023" +
"\020\036\031\040\021\043\023\001\002\000\004\002\001" +
"\001\002\000\004\031\073\001\002\000\024\007\041\012" +
"\042\022\uffd7\023\uffd7\024\uffd7\025\uffd7\031\ufff5\032\uffd7" +
"\035\043\001\002\000\042\006\uffd9\007\uffd9\013\uffd9\014" +
"\uffd9\022\uffd9\023\uffd9\024\uffd9\025\uffd9\032\uffd9\044\uffd9" +
"\045\uffd9\046\uffd9\047\uffd9\050\uffd9\052\uffd9\053\uffd9\001" +
"\002\000\004\011\067\001\002\000\014\011\050\012\030" +
"\017\024\020\040\023\020\001\002\000\020\011\050\012" +
"\030\017\024\020\040\023\020\033\045\034\047\001\002" +
"\000\014\006\054\022\053\023\055\024\057\025\056\001" +
"\002\000\012\006\uffc9\013\uffc9\052\uffc9\053\uffc9\001\002" +
"\000\004\006\051\001\002\000\012\006\uffc8\013\uffc8\052" +
"\uffc8\053\uffc8\001\002\000\042\006\uffd7\007\uffd7\013\uffd7" +
"\014\uffd7\022\uffd7\023\uffd7\024\uffd7\025\uffd7\032\uffd7\044" +
"\uffd7\045\uffd7\046\uffd7\047\uffd7\050\uffd7\052\uffd7\053\uffd7" +
"\001\002\000\032\002\uffe6\011\uffe6\012\uffe6\015\uffe6\016" +
"\uffe6\017\uffe6\020\uffe6\021\uffe6\023\uffe6\036\uffe6\040\uffe6" +
"\043\uffe6\001\002\000\014\011\050\012\030\017\024\020" +
"\040\023\020\001\002\000\014\011\uffd4\012\uffd4\017\uffd4" +
"\020\uffd4\023\uffd4\001\002\000\032\002\uffe7\011\uffe7\012" +
"\uffe7\015\uffe7\016\uffe7\017\uffe7\020\uffe7\021\uffe7\023\uffe7" +
"\036\uffe7\040\uffe7\043\uffe7\001\002\000\014\011\uffd3\012" +
"\uffd3\017\uffd3\020\uffd3\023\uffd3\001\002\000\014\011\uffd1" +
"\012\uffd1\017\uffd1\020\uffd1\023\uffd1\001\002\000\014\011" +
"\uffd2\012\uffd2\017\uffd2\020\uffd2\023\uffd2\001\002\000\042" +
"\006\uffd8\007\uffd8\013\uffd8\014\uffd8\022\053\023\055\024" +
"\057\025\056\032\uffd8\044\uffd8\045\uffd8\046\uffd8\047\uffd8" +
"\050\uffd8\052\uffd8\053\uffd8\001\002\000\004\014\065\001" +
"\002\000\016\007\063\014\uffdb\022\053\023\055\024\057" +
"\025\056\001\002\000\014\011\050\012\030\017\024\020" +
"\040\023\020\001\002\000\004\014\uffdc\001\002\000\004" +
"\011\067\001\002\000\004\013\070\001\002\000\012\006" +
"\ufff5\007\041\013\ufff5\031\ufff5\001\002\000\004\006\071" +
"\001\002\000\032\002\uffe5\011\uffe5\012\uffe5\015\uffe5\016" +
"\uffe5\017\uffe5\020\uffe5\021\uffe5\023\uffe5\036\uffe5\040\uffe5" +
"\043\uffe5\001\002\000\010\006\ufff6\013\ufff6\031\ufff6\001" +
"\002\000\010\026\015\027\013\030\007\001\002\000\006" +
"\006\ufff3\007\077\001\002\000\004\006\076\001\002\000" +
"\032\002\uffe9\011\uffe9\012\uffe9\015\uffe9\016\uffe9\017\uffe9" +
"\020\uffe9\021\uffe9\023\uffe9\036\uffe9\040\uffe9\043\uffe9\001" +
"\002\000\010\026\015\027\013\030\007\001\002\000\004" +
"\006\ufff4\001\002\000\006\002\ufffc\016\ufffc\001\002\000" +
"\004\006\103\001\002\000\032\002\uffe8\011\uffe8\012\uffe8" +
"\015\uffe8\016\uffe8\017\uffe8\020\uffe8\021\uffe8\023\uffe8\036" +
"\uffe8\040\uffe8\043\uffe8\001\002\000\022\011\050\012\106" +
"\017\024\020\040\023\020\033\045\034\047\051\111\001" +
"\002\000\024\022\053\023\055\024\057\025\056\044\135" +
"\045\131\046\137\047\134\050\133\001\002\000\022\011" +
"\050\012\106\017\024\020\040\023\020\033\045\034\047" +
"\051\111\001\002\000\010\013\117\052\113\053\115\001" +
"\002\000\012\006\uffcc\013\uffcc\052\uffcc\053\uffcc\001\002" +
"\000\022\011\050\012\106\017\024\020\040\023\020\033" +
"\045\034\047\051\111\001\002\000\012\006\uffcf\013\uffcf" +
"\052\113\053\115\001\002\000\022\011\uffcb\012\uffcb\017" +
"\uffcb\020\uffcb\023\uffcb\033\uffcb\034\uffcb\051\uffcb\001\002" +
"\000\022\011\050\012\106\017\024\020\040\023\020\033" +
"\045\034\047\051\111\001\002\000\022\011\uffca\012\uffca" +
"\017\uffca\020\uffca\023\uffca\033\uffca\034\uffca\051\uffca\001" +
"\002\000\012\006\uffd0\013\uffd0\052\113\053\115\001\002" +
"\000\004\037\120\001\002\000\004\015\022\001\002\000" +
"\006\006\123\042\122\001\002\000\004\015\022\001\002" +
"\000\032\002\uffe3\011\uffe3\012\uffe3\015\uffe3\016\uffe3\017" +
"\uffe3\020\uffe3\021\uffe3\023\uffe3\036\uffe3\040\uffe3\043\uffe3" +
"\001\002\000\004\006\125\001\002\000\032\002\uffe4\011" +
"\uffe4\012\uffe4\015\uffe4\016\uffe4\017\uffe4\020\uffe4\021\uffe4" +
"\023\uffe4\036\uffe4\040\uffe4\043\uffe4\001\002\000\026\013" +
"\136\022\053\023\055\024\057\025\056\044\135\045\131" +
"\046\137\047\134\050\133\001\002\000\010\013\130\052" +
"\113\053\115\001\002\000\012\006\uffcd\013\uffcd\052\uffcd" +
"\053\uffcd\001\002\000\014\011\uffc6\012\uffc6\017\uffc6\020" +
"\uffc6\023\uffc6\001\002\000\014\011\050\012\030\017\024" +
"\020\040\023\020\001\002\000\014\011\uffc3\012\uffc3\017" +
"\uffc3\020\uffc3\023\uffc3\001\002\000\014\011\uffc4\012\uffc4" +
"\017\uffc4\020\uffc4\023\uffc4\001\002\000\014\011\uffc7\012" +
"\uffc7\017\uffc7\020\uffc7\023\uffc7\001\002\000\042\006\uffd5" +
"\007\uffd5\013\uffd5\014\uffd5\022\uffd5\023\uffd5\024\uffd5\025" +
"\uffd5\032\uffd5\044\uffd5\045\uffd5\046\uffd5\047\uffd5\050\uffd5" +
"\052\uffd5\053\uffd5\001\002\000\014\011\uffc5\012\uffc5\017" +
"\uffc5\020\uffc5\023\uffc5\001\002\000\022\006\uffce\013\uffce" +
"\022\053\023\055\024\057\025\056\052\uffce\053\uffce\001" +
"\002\000\014\013\136\022\053\023\055\024\057\025\056" +
"\001\002\000\016\011\050\012\030\017\024\020\040\021" +
"\027\023\020\001\002\000\004\032\uffdf\001\002\000\016" +
"\011\050\012\030\017\024\020\040\021\027\023\020\001" +
"\002\000\004\032\uffe0\001\002\000\004\011\147\001\002" +
"\000\004\035\150\001\002\000\014\011\050\012\030\017" +
"\024\020\040\023\020\001\002\000\014\006\152\022\053" +
"\023\055\024\057\025\056\001\002\000\022\011\050\012" +
"\106\017\024\020\040\023\020\033\045\034\047\051\111" +
"\001\002\000\010\006\154\052\113\053\115\001\002\000" +
"\004\011\155\001\002\000\004\035\156\001\002\000\014" +
"\011\050\012\030\017\024\020\040\023\020\001\002\000" +
"\014\006\160\022\053\023\055\024\057\025\056\001\002" +
"\000\004\013\161\001\002\000\004\015\022\001\002\000" +
"\004\006\163\001\002\000\032\002\uffe1\011\uffe1\012\uffe1" +
"\015\uffe1\016\uffe1\017\uffe1\020\uffe1\021\uffe1\023\uffe1\036" +
"\uffe1\040\uffe1\043\uffe1\001\002\000\026\011\037\012\030" +
"\015\022\017\024\020\040\021\027\023\020\036\031\040" +
"\021\043\023\001\002\000\036\011\ufff0\012\ufff0\013\ufff0" +
"\015\ufff0\017\ufff0\020\ufff0\021\ufff0\023\ufff0\026\015\027" +
"\013\030\007\036\ufff0\040\ufff0\043\ufff0\001\002\000\030" +
"\011\ufff1\012\ufff1\013\ufff1\015\ufff1\017\ufff1\020\ufff1\021" +
"\ufff1\023\ufff1\036\ufff1\040\ufff1\043\ufff1\001\002\000\004" +
"\016\170\001\002\000\036\002\uffec\006\uffec\011\uffec\012" +
"\uffec\015\uffec\016\uffec\017\uffec\020\uffec\021\uffec\023\uffec" +
"\036\uffec\040\uffec\042\uffec\043\uffec\001\002\000\022\011" +
"\050\012\106\017\024\020\040\023\020\033\045\034\047" +
"\051\111\001\002\000\010\013\173\052\113\053\115\001" +
"\002\000\004\041\174\001\002\000\004\015\022\001\002" +
"\000\004\006\176\001\002\000\032\002\uffe2\011\uffe2\012" +
"\uffe2\015\uffe2\016\uffe2\017\uffe2\020\uffe2\021\uffe2\023\uffe2" +
"\036\uffe2\040\uffe2\043\uffe2\001\002\000\042\006\uffd6\007" +
"\uffd6\013\uffd6\014\uffd6\022\uffd6\023\uffd6\024\uffd6\025\uffd6" +
"\032\uffd6\044\uffd6\045\uffd6\046\uffd6\047\uffd6\050\uffd6\052" +
"\uffd6\053\uffd6\001\002\000\004\005\ufffe\001\002\000\004" +
"\012\202\001\002\000\012\013\ufff0\026\015\027\013\030" +
"\007\001\002\000\004\013\204\001\002\000\004\014\205" +
"\001\002\000\010\026\015\027\013\030\007\001\002\000" +
"\004\015\211\001\002\000\012\015\uffee\026\015\027\013" +
"\030\007\001\002\000\004\015\uffef\001\002\000\034\011" +
"\ufff0\012\ufff0\015\ufff0\017\ufff0\020\ufff0\021\ufff0\023\ufff0" +
"\026\015\027\013\030\007\036\ufff0\040\ufff0\043\ufff0\001" +
"\002\000\014\005\ufff2\010\ufff2\026\ufff2\027\ufff2\030\ufff2" +
"\001\002\000\026\011\037\012\030\015\022\017\024\020" +
"\040\021\027\023\020\036\031\040\021\043\023\001\002" +
"\000\004\016\215\001\002\000\004\006\216\001\002\000" +
"\014\005\uffed\010\uffed\026\uffed\027\uffed\030\uffed\001\002" +
"\000\004\006\220\001\002\000\042\005\ufffa\010\ufffa\011" +
"\ufffa\012\ufffa\013\ufffa\015\ufffa\017\ufffa\020\ufffa\021\ufffa" +
"\023\ufffa\026\ufffa\027\ufffa\030\ufffa\036\ufffa\040\ufffa\043" +
"\ufffa\001\002\000\004\002\000\001\002" });
/** Access to parse-action table. */
public short[][] action_table() {return _action_table;}
/** <code>reduce_goto</code> table. */
protected static final short[][] _reduce_table =
unpackFromStrings(new String[] {
"\000\217\000\004\002\003\001\001\000\002\001\001\000" +
"\012\003\013\004\010\013\011\022\005\001\001\000\004" +
"\026\216\001\001\000\002\001\001\000\002\001\001\000" +
"\012\003\013\004\010\013\177\022\005\001\001\000\002" +
"\001\001\000\002\001\001\000\012\003\013\004\010\013" +
"\015\022\005\001\001\000\002\001\001\000\002\001\001" +
"\000\020\006\032\007\025\010\024\014\034\017\033\020" +
"\031\026\035\001\001\000\004\010\176\001\001\000\002" +
"\001\001\000\010\003\164\015\163\022\005\001\001\000" +
"\002\001\001\000\002\001\001\000\004\023\051\001\001" +
"\000\002\001\001\000\002\001\001\000\004\010\140\001" +
"\001\000\002\001\001\000\002\001\001\000\002\001\001" +
"\000\020\006\032\007\025\010\024\014\100\017\033\020" +
"\031\026\035\001\001\000\002\001\001\000\002\001\001" +
"\000\002\001\001\000\002\001\001\000\004\026\071\001" +
"\001\000\006\010\061\021\060\001\001\000\006\010\043" +
"\012\045\001\001\000\004\023\051\001\001\000\002\001" +
"\001\000\002\001\001\000\002\001\001\000\002\001\001" +
"\000\002\001\001\000\004\010\057\001\001\000\002\001" +
"\001\000\002\001\001\000\002\001\001\000\002\001\001" +
"\000\002\001\001\000\004\023\051\001\001\000\002\001" +
"\001\000\004\023\051\001\001\000\006\010\061\021\063" +
"\001\001\000\002\001\001\000\004\026\065\001\001\000" +
"\002\001\001\000\002\001\001\000\002\001\001\000\002" +
"\001\001\000\002\001\001\000\006\022\073\027\074\001" +
"\001\000\002\001\001\000\002\001\001\000\002\001\001" +
"\000\006\022\073\027\077\001\001\000\002\001\001\000" +
"\002\001\001\000\002\001\001\000\002\001\001\000\010" +
"\010\104\011\106\012\107\001\001\000\006\023\051\025" +
"\131\001\001\000\010\010\125\011\126\012\107\001\001" +
"\000\004\024\113\001\001\000\002\001\001\000\010\010" +
"\104\011\111\012\107\001\001\000\004\024\113\001\001" +
"\000\002\001\001\000\010\010\104\011\115\012\107\001" +
"\001\000\002\001\001\000\004\024\113\001\001\000\002" +
"\001\001\000\004\006\120\001\001\000\002\001\001\000" +
"\004\006\123\001\001\000\002\001\001\000\002\001\001" +
"\000\002\001\001\000\006\023\051\025\131\001\001\000" +
"\004\024\113\001\001\000\002\001\001\000\002\001\001" +
"\000\004\010\137\001\001\000\002\001\001\000\002\001" +
"\001\000\002\001\001\000\002\001\001\000\002\001\001" +
"\000\004\023\051\001\001\000\004\023\051\001\001\000" +
"\006\010\024\020\142\001\001\000\002\001\001\000\006" +
"\010\024\020\144\001\001\000\002\001\001\000\002\001" +
"\001\000\002\001\001\000\004\010\150\001\001\000\004" +
"\023\051\001\001\000\010\010\104\011\152\012\107\001" +
"\001\000\004\024\113\001\001\000\002\001\001\000\002" +
"\001\001\000\004\010\156\001\001\000\004\023\051\001" +
"\001\000\002\001\001\000\004\006\161\001\001\000\002" +
"\001\001\000\002\001\001\000\020\006\032\007\025\010" +
"\024\014\166\017\033\020\031\026\035\001\001\000\010" +
"\003\164\015\165\022\005\001\001\000\002\001\001\000" +
"\002\001\001\000\002\001\001\000\010\010\104\011\171" +
"\012\107\001\001\000\004\024\113\001\001\000\002\001" +
"\001\000\004\006\174\001\001\000\002\001\001\000\002" +
"\001\001\000\004\023\051\001\001\000\002\001\001\000" +
"\002\001\001\000\010\003\164\015\202\022\005\001\001" +
"\000\002\001\001\000\002\001\001\000\010\003\206\016" +
"\205\022\005\001\001\000\004\005\211\001\001\000\010" +
"\003\206\016\207\022\005\001\001\000\002\001\001\000" +
"\010\003\164\015\212\022\005\001\001\000\002\001\001" +
"\000\020\006\032\007\025\010\024\014\213\017\033\020" +
"\031\026\035\001\001\000\002\001\001\000\002\001\001" +
"\000\002\001\001\000\002\001\001\000\002\001\001\000" +
"\002\001\001" });
/** Access to <code>reduce_goto</code> table. */
public short[][] reduce_table() {return _reduce_table;}
/** Instance of action encapsulation class. */
protected CUP$YASPL2Cup$actions action_obj;
/** Action encapsulation object initializer. */
protected void init_actions()
{
action_obj = new CUP$YASPL2Cup$actions(this);
}
/** Invoke a user supplied parse action. */
public java_cup.runtime.Symbol do_action(
int act_num,
java_cup.runtime.lr_parser parser,
java.util.Stack stack,
int top)
throws java.lang.Exception
{
/* call code in generated class */
return action_obj.CUP$YASPL2Cup$do_action(act_num, parser, stack, top);
}
/** Indicates start state. */
public int start_state() {return 0;}
/** Indicates start production. */
public int start_production() {return 1;}
/** <code>EOF</code> Symbol index. */
public int EOF_sym() {return 0;}
/** <code>error</code> Symbol index. */
public int error_sym() {return 1;}
/** User initialization code. */
public void user_init() throws java.lang.Exception
{
}
/** Scan to get the next Symbol. */
public java_cup.runtime.Symbol scan()
throws java.lang.Exception
{
return s.next_token();
}
Scanner s;
YASPL2Cup(Scanner s, String k){ this.s=s; }
public VisitableNode<String> makeNode(String name, VisitableNode<String> ... childrens){
VisitableNode<String> toReturn = new VisitableNode<String>(name);
for(int i = 0; i < childrens.length; i ++){
toReturn.add(childrens[i]);
}
return toReturn;
}
public void print(String x){
System.out.println(x);
}
public VisitableNode<String> makeNode(String name, ArrayList<VisitableNode<String>> childrens){
VisitableNode<String> toReturn = new VisitableNode<String>(name);
for (VisitableNode<String> node : childrens)
toReturn.add(node);
return toReturn;
}
public void syntax_error(Symbol cur_token){
/*recupera riga e colonna dell'errore*/
int row = cur_token.left+1;
int col = cur_token.right;
String message = "L'errore si trova in riga "+ row +" e in colonna "+col+" su token: "+this.symbl_name_from_id(cur_token.sym)+"\nToken Expected: ";
//System.out.println("L'errore si trova in riga "+ row +" e in colonna "+col+" su token: "+this.symbl_name_from_id(cur_token.sym));
//System.out.println("Token expeted:");
for(int i=0;i<this.expected_token_ids().size();i++)
message+=this.symbl_name_from_id(this.expected_token_ids().get(i))+ " ";
//System.out.println(this.symbl_name_from_id(this.expected_token_ids().get(i)));
report_error(message, null);
this.done_parsing();
}
public void report_error(String message, Object info){
System.out.println("ERRORE: "+ message );
}
/** Cup generated class to encapsulate user supplied action code.*/
@SuppressWarnings({"rawtypes", "unchecked", "unused"})
class CUP$YASPL2Cup$actions {
private final YASPL2Cup parser;
/** Constructor */
CUP$YASPL2Cup$actions(YASPL2Cup parser) {
this.parser = parser;
}
/** Method 0 with the actual generated action code for actions 0 to 300. */
public final java_cup.runtime.Symbol CUP$YASPL2Cup$do_action_part00000000(
int CUP$YASPL2Cup$act_num,
java_cup.runtime.lr_parser CUP$YASPL2Cup$parser,
java.util.Stack CUP$YASPL2Cup$stack,
int CUP$YASPL2Cup$top)
throws java.lang.Exception
{
/* Symbol object for return from actions */
java_cup.runtime.Symbol CUP$YASPL2Cup$result;
/* select the action based on the action number */
switch (CUP$YASPL2Cup$act_num)
{
/*. . . . . . . . . . . . . . . . . . . .*/
case 0: // Programma ::= HEAD Decls START Statments
{
VisitableNode<String> RESULT =null;
int hleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).left;
int hright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).right;
Object h = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).value;
int dsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int dsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
ArrayList<VisitableNode<String>> ds = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int stsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int stsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
ArrayList<VisitableNode<String>> sts = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
VisitableNode<String> Program_node = new VisitableNode<String>("PROGRAM_NODE", ds, sts);
RESULT = Program_node;
NodeVisitor visitor = new NodeVisitor();
visitor.visit( RESULT);
System.out.println("INIZIO CONTROLLO SEMANTICO");
if(!visitor.SemanticAnalysis(RESULT)) System.out.println("Errore: " + visitor.Error);
else {
visitor.saveSource(visitor.getCode(RESULT));
visitor.saveFileXML();
System.out.println("Albero costruito correttamente, vedi file.xml");
}
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Programma",0, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 1: // $START ::= Programma EOF
{
Object RESULT =null;
int start_valleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int start_valright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
VisitableNode<String> start_val = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
RESULT = start_val;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("$START",0, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
/* ACCEPT */
CUP$YASPL2Cup$parser.done_parsing();
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 2: // Decls ::= Var_decl Decls
{
ArrayList<VisitableNode<String>> RESULT =null;
int vleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int vright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
VisitableNode<String> v = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int dsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int dsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
ArrayList<VisitableNode<String>> ds = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
ArrayList<VisitableNode<String>> decls_list = new ArrayList<VisitableNode<String>>();
decls_list.add( v);
decls_list.addAll( ds);
RESULT = decls_list;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Decls",9, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 3: // Decls ::= Def_decl Decls
{
ArrayList<VisitableNode<String>> RESULT =null;
int dleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int dright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
VisitableNode<String> d = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int dsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int dsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
ArrayList<VisitableNode<String>> ds = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
ArrayList<VisitableNode<String>> decls_list = new ArrayList<VisitableNode<String>>();
decls_list.add( d);
decls_list.addAll( ds);
RESULT = decls_list;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Decls",9, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 4: // Decls ::=
{
ArrayList<VisitableNode<String>> RESULT =null;
RESULT = new ArrayList<VisitableNode<String>>();
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Decls",9, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 5: // Statments ::= Stat Statments
{
ArrayList<VisitableNode<String>> RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int sright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
ArrayList<VisitableNode<String>> s = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int stsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int stsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
ArrayList<VisitableNode<String>> sts = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
( sts).addAll( s); RESULT = sts;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Statments",10, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 6: // Statments ::= Stat
{
ArrayList<VisitableNode<String>> RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
ArrayList<VisitableNode<String>> s = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
ArrayList<VisitableNode<String>> Stat_list = new ArrayList<VisitableNode<String>>();
Stat_list.addAll( s);
RESULT = Stat_list;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Statments",10, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 7: // Var_decl ::= Type Vars SEMI
{
VisitableNode<String> RESULT =null;
int tleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int tright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
String t = (String)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int vsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int vsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
Vector<String> vs = (Vector<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
ArrayList<VisitableNode<String>> childrens = new ArrayList<VisitableNode<String>>();
VisitableNode<String> root = makeNode("VAR_DECL_NODE", makeNode(t.toString()));
for (int i=0;i<vs.size(); i++) {
VisitableNode<String> tmp = new VisitableNode<String>("VAR_NODE");
VisitableNode<String> tmp2 = new VisitableNode<String>("ID_NODE", vs.get(i));
tmp.add(tmp2);
childrens.add(tmp);
}
for (int i=0;i<vs.size()-1;i++) {
childrens.get(i).add(childrens.get(i+1));
}
root.add(childrens.get(0));
root.setLexem(String.valueOf(vs.size()));
RESULT = root;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Var_decl",1, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 8: // Type ::= INT
{
String RESULT =null;
int ileft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int iright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object i = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
RESULT="Integer";
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Type",16, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 9: // Type ::= BOOL
{
String RESULT =null;
int bleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int bright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object b = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
RESULT="Boolean";
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Type",16, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 10: // Type ::= DOUBLE
{
String RESULT =null;
int dleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int dright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object d = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
RESULT="Double";
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Type",16, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 11: // Vars ::= NAME COMMA Vars
{
Vector<String> RESULT =null;
int nleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int nright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
Object n = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int vsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int vsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Vector<String> vs = (Vector<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
Vector<String> x = new Vector<String>(vs);
x.add(n.toString()); RESULT = x;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Vars",20, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 12: // Vars ::= NAME
{
Vector<String> RESULT =null;
int nleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int nright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object n = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
Vector<String> x = new Vector<String>(); x.add(n.toString()); RESULT = x;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Vars",20, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 13: // Types ::= Type COMMA Types
{
Vector<String> RESULT =null;
int tleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int tright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
String t = (String)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int cleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int cright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
Object c = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int tsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int tsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Vector<String> ts = (Vector<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
Vector<String> x = new Vector<String>(ts);
x.add(t.toString()); RESULT = x;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Types",21, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 14: // Types ::= Type
{
Vector<String> RESULT =null;
int tleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int tright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
String t = (String)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
Vector<String> x = new Vector<String>(); x.add(t.toString()); RESULT = x;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Types",21, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 15: // Def_decl ::= DEF NAME LPAR Var_decls RPAR COLON Par_decls Body
{
VisitableNode<String> RESULT =null;
int dleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-7)).left;
int dright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-7)).right;
Object d = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-7)).value;
int nleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-6)).left;
int nright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-6)).right;
Object n = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-6)).value;
int lpleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-5)).left;
int lpright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-5)).right;
Object lp = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-5)).value;
int vdsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-4)).left;
int vdsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-4)).right;
ArrayList<VisitableNode<String>> vds = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-4)).value;
int rpleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).left;
int rpright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).right;
Object rp = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).value;
int cleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int cright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
Object c = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int pdsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int pdsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
ArrayList<VisitableNode<String>> pds = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int bleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int bright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
VisitableNode<String> b = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
VisitableNode<String> ProcDecl_node = new VisitableNode<String>("PROC_DECL_NODE", vds, pds);
ProcDecl_node.setLexem(n.toString());
ProcDecl_node.add(new VisitableNode<String>("ID_NODE",n.toString()));
ProcDecl_node.add( b);
RESULT = ProcDecl_node;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Def_decl",2, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-7)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 16: // Var_decls ::= Var_decl Var_decls
{
ArrayList<VisitableNode<String>> RESULT =null;
int vdleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int vdright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
VisitableNode<String> vd = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int vdsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int vdsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
ArrayList<VisitableNode<String>> vds = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
ArrayList<VisitableNode<String>> var_decl_list = new ArrayList<VisitableNode<String>>();
var_decl_list.add( vd);
var_decl_list.addAll( vds);
RESULT = var_decl_list;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Var_decls",11, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 17: // Var_decls ::=
{
ArrayList<VisitableNode<String>> RESULT =null;
RESULT = new ArrayList<VisitableNode<String>>();
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Var_decls",11, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 18: // Par_decls ::= Var_decl Par_decls
{
ArrayList<VisitableNode<String>> RESULT =null;
int vdleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int vdright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
VisitableNode<String> vd = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int pdsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int pdsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
ArrayList<VisitableNode<String>> pds = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
ArrayList<VisitableNode<String>> var_decl_list = new ArrayList<VisitableNode<String>>();
(vd).setData("PAR_DECLS");
var_decl_list.add( vd);
var_decl_list.addAll( pds);
RESULT = var_decl_list;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Par_decls",12, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 19: // Par_decls ::= Var_decl
{
ArrayList<VisitableNode<String>> RESULT =null;
int vdleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int vdright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
VisitableNode<String> vd = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
ArrayList<VisitableNode<String>> par_decl_list = new ArrayList<VisitableNode<String>>();
(vd).setData("PAR_DECLS");
par_decl_list.add( vd);
RESULT = par_decl_list;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Par_decls",12, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 20: // Body ::= LGPAR Var_decls Statments RGPAR SEMI
{
VisitableNode<String> RESULT =null;
int lgpleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-4)).left;
int lgpright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-4)).right;
Object lgp = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-4)).value;
int vdsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).left;
int vdsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).right;
ArrayList<VisitableNode<String>> vds = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).value;
int stsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int stsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
ArrayList<VisitableNode<String>> sts = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int rgpleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int rgpright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
Object rgp = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int sleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object s = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
if(vds.isEmpty())
RESULT = new VisitableNode<String>("BODY_NODE", sts);
else
RESULT = new VisitableNode<String>("BODY_NODE", vds, sts);
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Body",3, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-4)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 21: // Comp_stat ::= LGPAR Var_decls Statments RGPAR
{
VisitableNode<String> RESULT =null;
int lgpleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).left;
int lgpright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).right;
Object lgp = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).value;
int vdsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int vdsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
ArrayList<VisitableNode<String>> vds = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int stsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int stsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
ArrayList<VisitableNode<String>> sts = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int rgpleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int rgpright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object rgp = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
if(vds.isEmpty())
RESULT = new VisitableNode<String>("COMP_STAT_NODE", sts);
else {
RESULT = new VisitableNode<String>("COMP_STAT_NODE", vds, sts);
}
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Comp_stat",4, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 22: // Stat ::= Comp_stat
{
ArrayList<VisitableNode<String>> RESULT =null;
int csleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int csright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
VisitableNode<String> cs = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
ArrayList<VisitableNode<String>> cs_list = new ArrayList<VisitableNode<String>>(); cs_list.add( cs); RESULT = cs_list ;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Stat",13, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 23: // Stat ::= Simple_stat
{
ArrayList<VisitableNode<String>> RESULT =null;
int ssleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int ssright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
VisitableNode<String> ss = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
ArrayList<VisitableNode<String>> ss_list = new ArrayList<VisitableNode<String>>(); ss_list.add( ss); RESULT = ss_list ;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Stat",13, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 24: // Simple_stat ::= Vars READ Types SEMI
{
VisitableNode<String> RESULT =null;
int vleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).left;
int vright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).right;
Vector<String> v = (Vector<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).value;
int rleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int rright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
Object r = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int tleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int tright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
Vector<String> t = (Vector<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int sleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object s = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
if(v.size() != t.size()) { report_fatal_error("Syntax Error-> Invalid READ operation before row "+ cur_token.left +" -> "+v.toString()+"READ"+t.toString(),null); }
ArrayList<VisitableNode<String>> id_list = new ArrayList<VisitableNode<String>>();
ArrayList<VisitableNode<String>> type_list = new ArrayList<VisitableNode<String>>();
for(int i = 0; i<v.size(); i++){
id_list.add( new VisitableNode("ID_NODE",v.get(i)));
type_list.add( makeNode(t.get(i)));
}
VisitableNode<String> Read_OP_node = new VisitableNode<String>("READ_OP_NODE",id_list,type_list);
RESULT = Read_OP_node;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Simple_stat",5, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 25: // Simple_stat ::= Out_values WRITE SEMI
{
VisitableNode<String> RESULT =null;
int ovleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int ovright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
ArrayList<VisitableNode<String>> ov = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int wleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int wright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
Object w = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int sleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object s = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
VisitableNode<String> Write_OP_node = new VisitableNode<String>("WRITE_OP_NODE", ov);
RESULT = Write_OP_node;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Simple_stat",5, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 26: // Simple_stat ::= NAME ASSIGN Expr SEMI
{
VisitableNode<String> RESULT =null;
int nleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).left;
int nright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).right;
Object n = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).value;
int aleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int aright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
Object a = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int eleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int eright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
VisitableNode<String> e = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int sleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object s = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
VisitableNode<String> id_node = new VisitableNode<String>("ID_NODE",n.toString());
VisitableNode<String> ee = e;
RESULT = makeNode("ASSIGN_NODE",id_node, ee);
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Simple_stat",5, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 27: // Simple_stat ::= NAME ASSIGN BOOL_CONST SEMI
{
VisitableNode<String> RESULT =null;
int nleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).left;
int nright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).right;
Object n = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).value;
int aleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int aright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
Object a = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int bcleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int bcright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
VisitableNode<String> bc = (VisitableNode<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int sleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object s = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
VisitableNode<String> id_node = new VisitableNode<String>("ID_NODE",n.toString());
RESULT = makeNode("ASSIGN_NODE",id_node, bc);
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Simple_stat",5, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 28: // Simple_stat ::= NAME LPAR Exprs COLON Vars RPAR SEMI
{
VisitableNode<String> RESULT =null;
int nleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-6)).left;
int nright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-6)).right;
Object n = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-6)).value;
int lpleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-5)).left;
int lpright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-5)).right;
Object lp = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-5)).value;
int esleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-4)).left;
int esright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-4)).right;
ArrayList<VisitableNode<String>> es = (ArrayList<VisitableNode<String>>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-4)).value;
int cleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).left;
int cright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).right;
Object c = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-3)).value;
int vsleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).left;
int vsright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).right;
Vector<String> vs = (Vector<String>)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-2)).value;
int rpleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).left;
int rpright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).right;
Object rp = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-1)).value;
int sleft = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()).right;
Object s = (Object)((java_cup.runtime.Symbol) CUP$YASPL2Cup$stack.peek()).value;
ArrayList<VisitableNode<String>> id_list = new ArrayList<VisitableNode<String>>();
for(int i = 0; i<vs.size(); i++){
id_list.add( new VisitableNode("ID_NODE",vs.get(i)));
}
VisitableNode<String> CALL_OP_node = new VisitableNode<String>("CALL_OP_NODE",id_list, es);
CALL_OP_node.add( new VisitableNode<String>("ID_NODE",n.toString()));
CALL_OP_node.setLexem(n.toString());
RESULT = CALL_OP_node;
CUP$YASPL2Cup$result = parser.getSymbolFactory().newSymbol("Simple_stat",5, ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.elementAt(CUP$YASPL2Cup$top-6)), ((java_cup.runtime.Symbol)CUP$YASPL2Cup$stack.peek()), RESULT);
}
return CUP$YASPL2Cup$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 29: // Simple_stat ::= IF LPAR Bool_expr RPAR THEN Comp_stat ELSE Comp_stat SEMI
{
VisitableNode<String> RESULT =null;