-
Notifications
You must be signed in to change notification settings - Fork 0
/
parser.out
2945 lines (2230 loc) · 109 KB
/
parser.out
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
Created by PLY version 3.11 (http://www.dabeaz.com/ply)
Grammar
Rule 0 S' -> program
Rule 1 program -> statement
Rule 2 program -> funclist
Rule 3 program -> epsilon
Rule 4 funclist -> funcdef funclist2
Rule 5 funclist2 -> funclist
Rule 6 funclist2 -> epsilon
Rule 7 funcdef -> DEF IDENT LPAREN paramlist RPAREN LCHAVES statelist RCHAVES
Rule 8 paramlist -> INT IDENT paramlist2
Rule 9 paramlist -> FLOAT IDENT paramlist2
Rule 10 paramlist -> STRING IDENT paramlist2
Rule 11 paramlist -> epsilon
Rule 12 paramlist2 -> VIRGULA paramlist
Rule 13 paramlist2 -> epsilon
Rule 14 statement -> vardecl PONTO_VIRGULA
Rule 15 statement -> atribstat PONTO_VIRGULA
Rule 16 statement -> printstat PONTO_VIRGULA
Rule 17 statement -> readstat PONTO_VIRGULA
Rule 18 statement -> returnstat PONTO_VIRGULA
Rule 19 statement -> ifstat
Rule 20 statement -> forstat
Rule 21 statement -> LCHAVES statelist RCHAVES
Rule 22 statement -> BREAK PONTO_VIRGULA
Rule 23 statement -> PONTO_VIRGULA
Rule 24 vardecl -> INT IDENT a
Rule 25 vardecl -> FLOAT IDENT a
Rule 26 vardecl -> STRING IDENT a
Rule 27 a -> LCOLCHETES INT_CONSTANT RCOLCHETES a
Rule 28 a -> epsilon
Rule 29 atribstat -> lvalue ATRIBUICAO atribstat2
Rule 30 atribstat2 -> expression
Rule 31 atribstat2 -> allocexpression
Rule 32 atribstat2 -> funccall
Rule 33 funccall -> CALL IDENT LPAREN paramlistcall RPAREN
Rule 34 paramlistcall -> IDENT paramlistcall2
Rule 35 paramlistcall -> epsilon
Rule 36 paramlistcall2 -> VIRGULA paramlistcall
Rule 37 paramlistcall2 -> epsilon
Rule 38 printstat -> PRINT expression
Rule 39 readstat -> READ lvalue
Rule 40 returnstat -> RETURN
Rule 41 ifstat -> IF LPAREN expression RPAREN statement ifstat2
Rule 42 ifstat2 -> ELSE statement PONTO_VIRGULA
Rule 43 ifstat2 -> PONTO_VIRGULA
Rule 44 forstat -> FOR LPAREN atribstat PONTO_VIRGULA expression PONTO_VIRGULA atribstat RPAREN statement
Rule 45 statelist -> statement statelist2
Rule 46 statelist2 -> statelist
Rule 47 statelist2 -> epsilon
Rule 48 allocexpression -> NEW allocexpression2
Rule 49 allocexpression2 -> INT e
Rule 50 allocexpression2 -> FLOAT e
Rule 51 allocexpression2 -> STRING e
Rule 52 e -> LCOLCHETES numexpression RCOLCHETES e2
Rule 53 e2 -> e
Rule 54 e2 -> epsilon
Rule 55 expression -> numexpression expression2
Rule 56 expression2 -> MENOR numexpression
Rule 57 expression2 -> MAIOR numexpression
Rule 58 expression2 -> MENORIGUAL numexpression
Rule 59 expression2 -> MAIORIGUAL numexpression
Rule 60 expression2 -> IGUAL numexpression
Rule 61 expression2 -> DIFERENTE numexpression
Rule 62 expression2 -> epsilon
Rule 63 numexpression -> term d
Rule 64 d -> SOMA term d
Rule 65 d -> SUBTRACAO term d
Rule 66 d -> epsilon
Rule 67 term -> unaryexpr b
Rule 68 b -> MULTIPLICACAO unaryexpr b
Rule 69 b -> DIVISAO unaryexpr b
Rule 70 b -> RESTO unaryexpr b
Rule 71 b -> epsilon
Rule 72 unaryexpr -> SOMA factor
Rule 73 unaryexpr -> SUBTRACAO factor
Rule 74 unaryexpr -> factor
Rule 75 factor -> INT_CONSTANT
Rule 76 factor -> FLOAT_CONSTANT
Rule 77 factor -> STRING_CONSTANT
Rule 78 factor -> NULL
Rule 79 factor -> lvalue
Rule 80 factor -> LPAREN numexpression RPAREN
Rule 81 lvalue -> IDENT c
Rule 82 c -> LCOLCHETES numexpression RCOLCHETES c
Rule 83 c -> epsilon
Rule 84 epsilon -> <empty>
Terminals, with rules where they appear
ATRIBUICAO : 29
BREAK : 22
CALL : 33
DEF : 7
DIFERENTE : 61
DIVISAO : 69
ELSE : 42
FLOAT : 9 25 50
FLOAT_CONSTANT : 76
FOR : 44
IDENT : 7 8 9 10 24 25 26 33 34 81
IF : 41
IGUAL : 60
INT : 8 24 49
INT_CONSTANT : 27 75
LCHAVES : 7 21
LCOLCHETES : 27 52 82
LPAREN : 7 33 41 44 80
MAIOR : 57
MAIORIGUAL : 59
MENOR : 56
MENORIGUAL : 58
MULTIPLICACAO : 68
NEW : 48
NULL : 78
PONTO_VIRGULA : 14 15 16 17 18 22 23 42 43 44 44
PRINT : 38
RCHAVES : 7 21
RCOLCHETES : 27 52 82
READ : 39
RESTO : 70
RETURN : 40
RPAREN : 7 33 41 44 80
SOMA : 64 72
STRING : 10 26 51
STRING_CONSTANT : 77
SUBTRACAO : 65 73
VIRGULA : 12 36
error :
Nonterminals, with rules where they appear
a : 24 25 26 27
allocexpression : 31
allocexpression2 : 48
atribstat : 15 44 44
atribstat2 : 29
b : 67 68 69 70
c : 81 82
d : 63 64 65
e : 49 50 51 53
e2 : 52
epsilon : 3 6 11 13 28 35 37 47 54 62 66 71 83
expression : 30 38 41 44
expression2 : 55
factor : 72 73 74
forstat : 20
funccall : 32
funcdef : 4
funclist : 2 5
funclist2 : 4
ifstat : 19
ifstat2 : 41
lvalue : 29 39 79
numexpression : 52 55 56 57 58 59 60 61 80 82
paramlist : 7 12
paramlist2 : 8 9 10
paramlistcall : 33 36
paramlistcall2 : 34
printstat : 16
program : 0
readstat : 17
returnstat : 18
statelist : 7 21 46
statelist2 : 45
statement : 1 41 42 44 45
term : 63 64 65
unaryexpr : 67 68 69 70
vardecl : 14
Parsing method: LALR
state 0
(0) S' -> . program
(1) program -> . statement
(2) program -> . funclist
(3) program -> . epsilon
(14) statement -> . vardecl PONTO_VIRGULA
(15) statement -> . atribstat PONTO_VIRGULA
(16) statement -> . printstat PONTO_VIRGULA
(17) statement -> . readstat PONTO_VIRGULA
(18) statement -> . returnstat PONTO_VIRGULA
(19) statement -> . ifstat
(20) statement -> . forstat
(21) statement -> . LCHAVES statelist RCHAVES
(22) statement -> . BREAK PONTO_VIRGULA
(23) statement -> . PONTO_VIRGULA
(4) funclist -> . funcdef funclist2
(84) epsilon -> .
(24) vardecl -> . INT IDENT a
(25) vardecl -> . FLOAT IDENT a
(26) vardecl -> . STRING IDENT a
(29) atribstat -> . lvalue ATRIBUICAO atribstat2
(38) printstat -> . PRINT expression
(39) readstat -> . READ lvalue
(40) returnstat -> . RETURN
(41) ifstat -> . IF LPAREN expression RPAREN statement ifstat2
(44) forstat -> . FOR LPAREN atribstat PONTO_VIRGULA expression PONTO_VIRGULA atribstat RPAREN statement
(7) funcdef -> . DEF IDENT LPAREN paramlist RPAREN LCHAVES statelist RCHAVES
(81) lvalue -> . IDENT c
LCHAVES shift and go to state 13
BREAK shift and go to state 14
PONTO_VIRGULA shift and go to state 6
$end reduce using rule 84 (epsilon -> .)
INT shift and go to state 16
FLOAT shift and go to state 18
STRING shift and go to state 19
PRINT shift and go to state 21
READ shift and go to state 22
RETURN shift and go to state 23
IF shift and go to state 24
FOR shift and go to state 25
DEF shift and go to state 26
IDENT shift and go to state 17
program shift and go to state 1
statement shift and go to state 2
funclist shift and go to state 3
epsilon shift and go to state 4
vardecl shift and go to state 5
atribstat shift and go to state 7
printstat shift and go to state 8
readstat shift and go to state 9
returnstat shift and go to state 10
ifstat shift and go to state 11
forstat shift and go to state 12
funcdef shift and go to state 15
lvalue shift and go to state 20
state 1
(0) S' -> program .
state 2
(1) program -> statement .
$end reduce using rule 1 (program -> statement .)
state 3
(2) program -> funclist .
$end reduce using rule 2 (program -> funclist .)
state 4
(3) program -> epsilon .
$end reduce using rule 3 (program -> epsilon .)
state 5
(14) statement -> vardecl . PONTO_VIRGULA
PONTO_VIRGULA shift and go to state 27
state 6
(23) statement -> PONTO_VIRGULA .
$end reduce using rule 23 (statement -> PONTO_VIRGULA .)
LCHAVES reduce using rule 23 (statement -> PONTO_VIRGULA .)
BREAK reduce using rule 23 (statement -> PONTO_VIRGULA .)
PONTO_VIRGULA reduce using rule 23 (statement -> PONTO_VIRGULA .)
INT reduce using rule 23 (statement -> PONTO_VIRGULA .)
FLOAT reduce using rule 23 (statement -> PONTO_VIRGULA .)
STRING reduce using rule 23 (statement -> PONTO_VIRGULA .)
PRINT reduce using rule 23 (statement -> PONTO_VIRGULA .)
READ reduce using rule 23 (statement -> PONTO_VIRGULA .)
RETURN reduce using rule 23 (statement -> PONTO_VIRGULA .)
IF reduce using rule 23 (statement -> PONTO_VIRGULA .)
FOR reduce using rule 23 (statement -> PONTO_VIRGULA .)
IDENT reduce using rule 23 (statement -> PONTO_VIRGULA .)
RCHAVES reduce using rule 23 (statement -> PONTO_VIRGULA .)
ELSE reduce using rule 23 (statement -> PONTO_VIRGULA .)
state 7
(15) statement -> atribstat . PONTO_VIRGULA
PONTO_VIRGULA shift and go to state 28
state 8
(16) statement -> printstat . PONTO_VIRGULA
PONTO_VIRGULA shift and go to state 29
state 9
(17) statement -> readstat . PONTO_VIRGULA
PONTO_VIRGULA shift and go to state 30
state 10
(18) statement -> returnstat . PONTO_VIRGULA
PONTO_VIRGULA shift and go to state 31
state 11
(19) statement -> ifstat .
$end reduce using rule 19 (statement -> ifstat .)
LCHAVES reduce using rule 19 (statement -> ifstat .)
BREAK reduce using rule 19 (statement -> ifstat .)
PONTO_VIRGULA reduce using rule 19 (statement -> ifstat .)
INT reduce using rule 19 (statement -> ifstat .)
FLOAT reduce using rule 19 (statement -> ifstat .)
STRING reduce using rule 19 (statement -> ifstat .)
PRINT reduce using rule 19 (statement -> ifstat .)
READ reduce using rule 19 (statement -> ifstat .)
RETURN reduce using rule 19 (statement -> ifstat .)
IF reduce using rule 19 (statement -> ifstat .)
FOR reduce using rule 19 (statement -> ifstat .)
IDENT reduce using rule 19 (statement -> ifstat .)
RCHAVES reduce using rule 19 (statement -> ifstat .)
ELSE reduce using rule 19 (statement -> ifstat .)
state 12
(20) statement -> forstat .
$end reduce using rule 20 (statement -> forstat .)
LCHAVES reduce using rule 20 (statement -> forstat .)
BREAK reduce using rule 20 (statement -> forstat .)
PONTO_VIRGULA reduce using rule 20 (statement -> forstat .)
INT reduce using rule 20 (statement -> forstat .)
FLOAT reduce using rule 20 (statement -> forstat .)
STRING reduce using rule 20 (statement -> forstat .)
PRINT reduce using rule 20 (statement -> forstat .)
READ reduce using rule 20 (statement -> forstat .)
RETURN reduce using rule 20 (statement -> forstat .)
IF reduce using rule 20 (statement -> forstat .)
FOR reduce using rule 20 (statement -> forstat .)
IDENT reduce using rule 20 (statement -> forstat .)
RCHAVES reduce using rule 20 (statement -> forstat .)
ELSE reduce using rule 20 (statement -> forstat .)
state 13
(21) statement -> LCHAVES . statelist RCHAVES
(45) statelist -> . statement statelist2
(14) statement -> . vardecl PONTO_VIRGULA
(15) statement -> . atribstat PONTO_VIRGULA
(16) statement -> . printstat PONTO_VIRGULA
(17) statement -> . readstat PONTO_VIRGULA
(18) statement -> . returnstat PONTO_VIRGULA
(19) statement -> . ifstat
(20) statement -> . forstat
(21) statement -> . LCHAVES statelist RCHAVES
(22) statement -> . BREAK PONTO_VIRGULA
(23) statement -> . PONTO_VIRGULA
(24) vardecl -> . INT IDENT a
(25) vardecl -> . FLOAT IDENT a
(26) vardecl -> . STRING IDENT a
(29) atribstat -> . lvalue ATRIBUICAO atribstat2
(38) printstat -> . PRINT expression
(39) readstat -> . READ lvalue
(40) returnstat -> . RETURN
(41) ifstat -> . IF LPAREN expression RPAREN statement ifstat2
(44) forstat -> . FOR LPAREN atribstat PONTO_VIRGULA expression PONTO_VIRGULA atribstat RPAREN statement
(81) lvalue -> . IDENT c
LCHAVES shift and go to state 13
BREAK shift and go to state 14
PONTO_VIRGULA shift and go to state 6
INT shift and go to state 16
FLOAT shift and go to state 18
STRING shift and go to state 19
PRINT shift and go to state 21
READ shift and go to state 22
RETURN shift and go to state 23
IF shift and go to state 24
FOR shift and go to state 25
IDENT shift and go to state 17
statelist shift and go to state 32
statement shift and go to state 33
vardecl shift and go to state 5
atribstat shift and go to state 7
printstat shift and go to state 8
readstat shift and go to state 9
returnstat shift and go to state 10
ifstat shift and go to state 11
forstat shift and go to state 12
lvalue shift and go to state 20
state 14
(22) statement -> BREAK . PONTO_VIRGULA
PONTO_VIRGULA shift and go to state 34
state 15
(4) funclist -> funcdef . funclist2
(5) funclist2 -> . funclist
(6) funclist2 -> . epsilon
(4) funclist -> . funcdef funclist2
(84) epsilon -> .
(7) funcdef -> . DEF IDENT LPAREN paramlist RPAREN LCHAVES statelist RCHAVES
$end reduce using rule 84 (epsilon -> .)
DEF shift and go to state 26
funcdef shift and go to state 15
funclist2 shift and go to state 35
funclist shift and go to state 36
epsilon shift and go to state 37
state 16
(24) vardecl -> INT . IDENT a
IDENT shift and go to state 38
state 17
(81) lvalue -> IDENT . c
(82) c -> . LCOLCHETES numexpression RCOLCHETES c
(83) c -> . epsilon
(84) epsilon -> .
LCOLCHETES shift and go to state 40
ATRIBUICAO reduce using rule 84 (epsilon -> .)
MULTIPLICACAO reduce using rule 84 (epsilon -> .)
DIVISAO reduce using rule 84 (epsilon -> .)
RESTO reduce using rule 84 (epsilon -> .)
SOMA reduce using rule 84 (epsilon -> .)
SUBTRACAO reduce using rule 84 (epsilon -> .)
MENOR reduce using rule 84 (epsilon -> .)
MAIOR reduce using rule 84 (epsilon -> .)
MENORIGUAL reduce using rule 84 (epsilon -> .)
MAIORIGUAL reduce using rule 84 (epsilon -> .)
IGUAL reduce using rule 84 (epsilon -> .)
DIFERENTE reduce using rule 84 (epsilon -> .)
PONTO_VIRGULA reduce using rule 84 (epsilon -> .)
RCOLCHETES reduce using rule 84 (epsilon -> .)
RPAREN reduce using rule 84 (epsilon -> .)
c shift and go to state 39
epsilon shift and go to state 41
state 18
(25) vardecl -> FLOAT . IDENT a
IDENT shift and go to state 42
state 19
(26) vardecl -> STRING . IDENT a
IDENT shift and go to state 43
state 20
(29) atribstat -> lvalue . ATRIBUICAO atribstat2
ATRIBUICAO shift and go to state 44
state 21
(38) printstat -> PRINT . expression
(55) expression -> . numexpression expression2
(63) numexpression -> . term d
(67) term -> . unaryexpr b
(72) unaryexpr -> . SOMA factor
(73) unaryexpr -> . SUBTRACAO factor
(74) unaryexpr -> . factor
(75) factor -> . INT_CONSTANT
(76) factor -> . FLOAT_CONSTANT
(77) factor -> . STRING_CONSTANT
(78) factor -> . NULL
(79) factor -> . lvalue
(80) factor -> . LPAREN numexpression RPAREN
(81) lvalue -> . IDENT c
SOMA shift and go to state 49
SUBTRACAO shift and go to state 51
INT_CONSTANT shift and go to state 52
FLOAT_CONSTANT shift and go to state 53
STRING_CONSTANT shift and go to state 54
NULL shift and go to state 55
LPAREN shift and go to state 57
IDENT shift and go to state 17
expression shift and go to state 45
numexpression shift and go to state 46
term shift and go to state 47
unaryexpr shift and go to state 48
factor shift and go to state 50
lvalue shift and go to state 56
state 22
(39) readstat -> READ . lvalue
(81) lvalue -> . IDENT c
IDENT shift and go to state 17
lvalue shift and go to state 58
state 23
(40) returnstat -> RETURN .
PONTO_VIRGULA reduce using rule 40 (returnstat -> RETURN .)
state 24
(41) ifstat -> IF . LPAREN expression RPAREN statement ifstat2
LPAREN shift and go to state 59
state 25
(44) forstat -> FOR . LPAREN atribstat PONTO_VIRGULA expression PONTO_VIRGULA atribstat RPAREN statement
LPAREN shift and go to state 60
state 26
(7) funcdef -> DEF . IDENT LPAREN paramlist RPAREN LCHAVES statelist RCHAVES
IDENT shift and go to state 61
state 27
(14) statement -> vardecl PONTO_VIRGULA .
$end reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
LCHAVES reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
BREAK reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
PONTO_VIRGULA reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
INT reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
FLOAT reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
STRING reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
PRINT reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
READ reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
RETURN reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
IF reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
FOR reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
IDENT reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
RCHAVES reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
ELSE reduce using rule 14 (statement -> vardecl PONTO_VIRGULA .)
state 28
(15) statement -> atribstat PONTO_VIRGULA .
$end reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
LCHAVES reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
BREAK reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
PONTO_VIRGULA reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
INT reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
FLOAT reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
STRING reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
PRINT reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
READ reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
RETURN reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
IF reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
FOR reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
IDENT reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
RCHAVES reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
ELSE reduce using rule 15 (statement -> atribstat PONTO_VIRGULA .)
state 29
(16) statement -> printstat PONTO_VIRGULA .
$end reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
LCHAVES reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
BREAK reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
PONTO_VIRGULA reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
INT reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
FLOAT reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
STRING reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
PRINT reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
READ reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
RETURN reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
IF reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
FOR reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
IDENT reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
RCHAVES reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
ELSE reduce using rule 16 (statement -> printstat PONTO_VIRGULA .)
state 30
(17) statement -> readstat PONTO_VIRGULA .
$end reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
LCHAVES reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
BREAK reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
PONTO_VIRGULA reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
INT reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
FLOAT reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
STRING reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
PRINT reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
READ reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
RETURN reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
IF reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
FOR reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
IDENT reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
RCHAVES reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
ELSE reduce using rule 17 (statement -> readstat PONTO_VIRGULA .)
state 31
(18) statement -> returnstat PONTO_VIRGULA .
$end reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
LCHAVES reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
BREAK reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
PONTO_VIRGULA reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
INT reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
FLOAT reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
STRING reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
PRINT reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
READ reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
RETURN reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
IF reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
FOR reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
IDENT reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
RCHAVES reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
ELSE reduce using rule 18 (statement -> returnstat PONTO_VIRGULA .)
state 32
(21) statement -> LCHAVES statelist . RCHAVES
RCHAVES shift and go to state 62
state 33
(45) statelist -> statement . statelist2
(46) statelist2 -> . statelist
(47) statelist2 -> . epsilon
(45) statelist -> . statement statelist2
(84) epsilon -> .
(14) statement -> . vardecl PONTO_VIRGULA
(15) statement -> . atribstat PONTO_VIRGULA
(16) statement -> . printstat PONTO_VIRGULA
(17) statement -> . readstat PONTO_VIRGULA
(18) statement -> . returnstat PONTO_VIRGULA
(19) statement -> . ifstat
(20) statement -> . forstat
(21) statement -> . LCHAVES statelist RCHAVES
(22) statement -> . BREAK PONTO_VIRGULA
(23) statement -> . PONTO_VIRGULA
(24) vardecl -> . INT IDENT a
(25) vardecl -> . FLOAT IDENT a
(26) vardecl -> . STRING IDENT a
(29) atribstat -> . lvalue ATRIBUICAO atribstat2
(38) printstat -> . PRINT expression
(39) readstat -> . READ lvalue
(40) returnstat -> . RETURN
(41) ifstat -> . IF LPAREN expression RPAREN statement ifstat2
(44) forstat -> . FOR LPAREN atribstat PONTO_VIRGULA expression PONTO_VIRGULA atribstat RPAREN statement
(81) lvalue -> . IDENT c
RCHAVES reduce using rule 84 (epsilon -> .)
LCHAVES shift and go to state 13
BREAK shift and go to state 14
PONTO_VIRGULA shift and go to state 6
INT shift and go to state 16
FLOAT shift and go to state 18
STRING shift and go to state 19
PRINT shift and go to state 21
READ shift and go to state 22
RETURN shift and go to state 23
IF shift and go to state 24
FOR shift and go to state 25
IDENT shift and go to state 17
statement shift and go to state 33
statelist2 shift and go to state 63
statelist shift and go to state 64
epsilon shift and go to state 65
vardecl shift and go to state 5
atribstat shift and go to state 7
printstat shift and go to state 8
readstat shift and go to state 9
returnstat shift and go to state 10
ifstat shift and go to state 11
forstat shift and go to state 12
lvalue shift and go to state 20
state 34
(22) statement -> BREAK PONTO_VIRGULA .
$end reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
LCHAVES reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
BREAK reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
PONTO_VIRGULA reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
INT reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
FLOAT reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
STRING reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
PRINT reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
READ reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
RETURN reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
IF reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
FOR reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
IDENT reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
RCHAVES reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
ELSE reduce using rule 22 (statement -> BREAK PONTO_VIRGULA .)
state 35
(4) funclist -> funcdef funclist2 .
$end reduce using rule 4 (funclist -> funcdef funclist2 .)
state 36
(5) funclist2 -> funclist .
$end reduce using rule 5 (funclist2 -> funclist .)
state 37
(6) funclist2 -> epsilon .
$end reduce using rule 6 (funclist2 -> epsilon .)
state 38
(24) vardecl -> INT IDENT . a
(27) a -> . LCOLCHETES INT_CONSTANT RCOLCHETES a
(28) a -> . epsilon
(84) epsilon -> .
LCOLCHETES shift and go to state 67
PONTO_VIRGULA reduce using rule 84 (epsilon -> .)
a shift and go to state 66
epsilon shift and go to state 68
state 39
(81) lvalue -> IDENT c .
ATRIBUICAO reduce using rule 81 (lvalue -> IDENT c .)
MULTIPLICACAO reduce using rule 81 (lvalue -> IDENT c .)
DIVISAO reduce using rule 81 (lvalue -> IDENT c .)
RESTO reduce using rule 81 (lvalue -> IDENT c .)
SOMA reduce using rule 81 (lvalue -> IDENT c .)
SUBTRACAO reduce using rule 81 (lvalue -> IDENT c .)
MENOR reduce using rule 81 (lvalue -> IDENT c .)
MAIOR reduce using rule 81 (lvalue -> IDENT c .)
MENORIGUAL reduce using rule 81 (lvalue -> IDENT c .)
MAIORIGUAL reduce using rule 81 (lvalue -> IDENT c .)
IGUAL reduce using rule 81 (lvalue -> IDENT c .)
DIFERENTE reduce using rule 81 (lvalue -> IDENT c .)
PONTO_VIRGULA reduce using rule 81 (lvalue -> IDENT c .)
RCOLCHETES reduce using rule 81 (lvalue -> IDENT c .)
RPAREN reduce using rule 81 (lvalue -> IDENT c .)
state 40
(82) c -> LCOLCHETES . numexpression RCOLCHETES c
(63) numexpression -> . term d
(67) term -> . unaryexpr b
(72) unaryexpr -> . SOMA factor
(73) unaryexpr -> . SUBTRACAO factor
(74) unaryexpr -> . factor
(75) factor -> . INT_CONSTANT
(76) factor -> . FLOAT_CONSTANT
(77) factor -> . STRING_CONSTANT
(78) factor -> . NULL
(79) factor -> . lvalue
(80) factor -> . LPAREN numexpression RPAREN
(81) lvalue -> . IDENT c
SOMA shift and go to state 49
SUBTRACAO shift and go to state 51
INT_CONSTANT shift and go to state 52
FLOAT_CONSTANT shift and go to state 53
STRING_CONSTANT shift and go to state 54
NULL shift and go to state 55
LPAREN shift and go to state 57
IDENT shift and go to state 17
numexpression shift and go to state 69
term shift and go to state 47
unaryexpr shift and go to state 48
factor shift and go to state 50
lvalue shift and go to state 56
state 41
(83) c -> epsilon .
ATRIBUICAO reduce using rule 83 (c -> epsilon .)
MULTIPLICACAO reduce using rule 83 (c -> epsilon .)
DIVISAO reduce using rule 83 (c -> epsilon .)
RESTO reduce using rule 83 (c -> epsilon .)
SOMA reduce using rule 83 (c -> epsilon .)
SUBTRACAO reduce using rule 83 (c -> epsilon .)
MENOR reduce using rule 83 (c -> epsilon .)
MAIOR reduce using rule 83 (c -> epsilon .)
MENORIGUAL reduce using rule 83 (c -> epsilon .)
MAIORIGUAL reduce using rule 83 (c -> epsilon .)
IGUAL reduce using rule 83 (c -> epsilon .)
DIFERENTE reduce using rule 83 (c -> epsilon .)
PONTO_VIRGULA reduce using rule 83 (c -> epsilon .)
RCOLCHETES reduce using rule 83 (c -> epsilon .)
RPAREN reduce using rule 83 (c -> epsilon .)
state 42
(25) vardecl -> FLOAT IDENT . a
(27) a -> . LCOLCHETES INT_CONSTANT RCOLCHETES a
(28) a -> . epsilon
(84) epsilon -> .
LCOLCHETES shift and go to state 67
PONTO_VIRGULA reduce using rule 84 (epsilon -> .)
a shift and go to state 70
epsilon shift and go to state 68
state 43
(26) vardecl -> STRING IDENT . a
(27) a -> . LCOLCHETES INT_CONSTANT RCOLCHETES a
(28) a -> . epsilon
(84) epsilon -> .
LCOLCHETES shift and go to state 67
PONTO_VIRGULA reduce using rule 84 (epsilon -> .)
a shift and go to state 71
epsilon shift and go to state 68
state 44
(29) atribstat -> lvalue ATRIBUICAO . atribstat2
(30) atribstat2 -> . expression
(31) atribstat2 -> . allocexpression
(32) atribstat2 -> . funccall
(55) expression -> . numexpression expression2
(48) allocexpression -> . NEW allocexpression2
(33) funccall -> . CALL IDENT LPAREN paramlistcall RPAREN
(63) numexpression -> . term d
(67) term -> . unaryexpr b
(72) unaryexpr -> . SOMA factor
(73) unaryexpr -> . SUBTRACAO factor
(74) unaryexpr -> . factor
(75) factor -> . INT_CONSTANT
(76) factor -> . FLOAT_CONSTANT
(77) factor -> . STRING_CONSTANT
(78) factor -> . NULL
(79) factor -> . lvalue
(80) factor -> . LPAREN numexpression RPAREN
(81) lvalue -> . IDENT c
NEW shift and go to state 76
CALL shift and go to state 77
SOMA shift and go to state 49
SUBTRACAO shift and go to state 51
INT_CONSTANT shift and go to state 52
FLOAT_CONSTANT shift and go to state 53
STRING_CONSTANT shift and go to state 54
NULL shift and go to state 55
LPAREN shift and go to state 57
IDENT shift and go to state 17
lvalue shift and go to state 56
atribstat2 shift and go to state 72
expression shift and go to state 73
allocexpression shift and go to state 74
funccall shift and go to state 75
numexpression shift and go to state 46
term shift and go to state 47
unaryexpr shift and go to state 48
factor shift and go to state 50
state 45
(38) printstat -> PRINT expression .
PONTO_VIRGULA reduce using rule 38 (printstat -> PRINT expression .)
state 46
(55) expression -> numexpression . expression2
(56) expression2 -> . MENOR numexpression
(57) expression2 -> . MAIOR numexpression
(58) expression2 -> . MENORIGUAL numexpression
(59) expression2 -> . MAIORIGUAL numexpression
(60) expression2 -> . IGUAL numexpression
(61) expression2 -> . DIFERENTE numexpression
(62) expression2 -> . epsilon
(84) epsilon -> .
MENOR shift and go to state 79
MAIOR shift and go to state 80
MENORIGUAL shift and go to state 81
MAIORIGUAL shift and go to state 82
IGUAL shift and go to state 83
DIFERENTE shift and go to state 84
PONTO_VIRGULA reduce using rule 84 (epsilon -> .)
RPAREN reduce using rule 84 (epsilon -> .)
expression2 shift and go to state 78
epsilon shift and go to state 85
state 47
(63) numexpression -> term . d
(64) d -> . SOMA term d
(65) d -> . SUBTRACAO term d
(66) d -> . epsilon
(84) epsilon -> .
SOMA shift and go to state 87
SUBTRACAO shift and go to state 88
MENOR reduce using rule 84 (epsilon -> .)
MAIOR reduce using rule 84 (epsilon -> .)
MENORIGUAL reduce using rule 84 (epsilon -> .)
MAIORIGUAL reduce using rule 84 (epsilon -> .)
IGUAL reduce using rule 84 (epsilon -> .)
DIFERENTE reduce using rule 84 (epsilon -> .)
PONTO_VIRGULA reduce using rule 84 (epsilon -> .)
RCOLCHETES reduce using rule 84 (epsilon -> .)
RPAREN reduce using rule 84 (epsilon -> .)
d shift and go to state 86
epsilon shift and go to state 89
state 48
(67) term -> unaryexpr . b
(68) b -> . MULTIPLICACAO unaryexpr b
(69) b -> . DIVISAO unaryexpr b
(70) b -> . RESTO unaryexpr b
(71) b -> . epsilon
(84) epsilon -> .
MULTIPLICACAO shift and go to state 91
DIVISAO shift and go to state 92
RESTO shift and go to state 93
SOMA reduce using rule 84 (epsilon -> .)
SUBTRACAO reduce using rule 84 (epsilon -> .)
MENOR reduce using rule 84 (epsilon -> .)
MAIOR reduce using rule 84 (epsilon -> .)
MENORIGUAL reduce using rule 84 (epsilon -> .)
MAIORIGUAL reduce using rule 84 (epsilon -> .)
IGUAL reduce using rule 84 (epsilon -> .)
DIFERENTE reduce using rule 84 (epsilon -> .)
PONTO_VIRGULA reduce using rule 84 (epsilon -> .)
RCOLCHETES reduce using rule 84 (epsilon -> .)
RPAREN reduce using rule 84 (epsilon -> .)
b shift and go to state 90
epsilon shift and go to state 94