forked from samuellimabraz/EmojiCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser.out
More file actions
3019 lines (2435 loc) · 120 KB
/
parser.out
File metadata and controls
3019 lines (2435 loc) · 120 KB
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)
Unused terminals:
DOT
ELSE
LBRACKET
RBRACKET
SQUOTE
Grammar
Rule 0 S' -> program
Rule 1 program -> INT MAIN LPAREN RPAREN bloco
Rule 2 sinal -> NOT PLUS
Rule 3 sinal -> NOT MINUS
Rule 4 sinal -> NOT
Rule 5 sinal -> PLUS
Rule 6 sinal -> MINUS
Rule 7 comando -> declaration
Rule 8 comando -> assignment SEMICOLON
Rule 9 comando -> if_statement
Rule 10 comando -> while_statement
Rule 11 comando -> for_statement
Rule 12 comando -> bloco
Rule 13 comando -> break_statement
Rule 14 comando -> continue_statement
Rule 15 comando -> return_statement
Rule 16 comando -> printf_statement
Rule 17 comando -> scanf_statement
Rule 18 comandos -> comando comandos
Rule 19 comandos -> comando
Rule 20 bloco -> LBRACE comandos RBRACE
Rule 21 bloco -> LBRACE RBRACE
Rule 22 parentheses -> LPAREN valor RPAREN
Rule 23 type -> INT
Rule 24 type -> FLOAT
Rule 25 type -> CHAR
Rule 26 type -> VOID
Rule 27 type -> BOOL
Rule 28 operador -> MULTIPLY
Rule 29 operador -> DIV
Rule 30 operador -> MOD
Rule 31 operador -> PLUS
Rule 32 operador -> MINUS
Rule 33 operador -> EQUAL
Rule 34 operador -> NEQUAL
Rule 35 operador -> GT
Rule 36 operador -> LT
Rule 37 operador -> GTE
Rule 38 operador -> LTE
Rule 39 operador -> AND
Rule 40 operador -> OR
Rule 41 boolean -> TRUE
Rule 42 boolean -> FALSE
Rule 43 valor -> NUMBER
Rule 44 valor -> NOME
Rule 45 valor -> CHARACTER
Rule 46 valor -> boolean
Rule 47 valor -> operation
Rule 48 valor -> parentheses
Rule 49 valor -> sinal valor
Rule 50 valores -> valor
Rule 51 valores -> valor COMMA valores
Rule 52 operation -> valor operador valor
Rule 53 assignment -> NOME ASSIGN valor
Rule 54 declaration_list -> NOME
Rule 55 declaration_list -> NOME declaration_list
Rule 56 declaration_list -> NOME ASSIGN valor
Rule 57 declaration_list -> NOME ASSIGN valor COMMA declaration_list
Rule 58 declaration -> type declaration_list SEMICOLON
Rule 59 if_statement -> IF LPAREN valor RPAREN bloco
Rule 60 while_statement -> WHILE LPAREN valor RPAREN bloco
Rule 61 for_statement -> FOR LPAREN for_init SEMICOLON for_condition SEMICOLON for_update RPAREN comando
Rule 62 for_init -> assignment
Rule 63 for_init -> declaration
Rule 64 for_init -> valor
Rule 65 for_init -> empty
Rule 66 for_init -> assignment for_comma
Rule 67 for_init -> valor for_comma
Rule 68 for_init -> declaration for_comma
Rule 69 for_comma -> COMMA assignment
Rule 70 for_comma -> COMMA valor SEMICOLON
Rule 71 for_comma -> COMMA assignment for_comma
Rule 72 for_condition -> assignment
Rule 73 for_condition -> valor
Rule 74 for_condition -> valor for_comma
Rule 75 for_condition -> assignment for_comma
Rule 76 for_condition -> empty
Rule 77 for_update -> assignment
Rule 78 for_update -> valor
Rule 79 for_update -> valor for_comma
Rule 80 for_update -> assignment for_comma
Rule 81 for_update -> empty
Rule 82 scanf_statement -> SCANF LPAREN CHARACTER COMMA NOME RPAREN SEMICOLON
Rule 83 printf_statement -> PRINTF LPAREN CHARACTER COMMA valores RPAREN SEMICOLON
Rule 84 printf_statement -> PRINTF LPAREN CHARACTER RPAREN SEMICOLON
Rule 85 break_statement -> BREAK SEMICOLON
Rule 86 continue_statement -> CONTINUE SEMICOLON
Rule 87 return_statement -> RETURN valor SEMICOLON
Rule 88 empty -> <empty>
Terminals, with rules where they appear
AND : 39
ASSIGN : 53 56 57
BOOL : 27
BREAK : 85
CHAR : 25
CHARACTER : 45 82 83 84
COMMA : 51 57 69 70 71 82 83
CONTINUE : 86
DIV : 29
DOT :
ELSE :
EQUAL : 33
FALSE : 42
FLOAT : 24
FOR : 61
GT : 35
GTE : 37
IF : 59
INT : 1 23
LBRACE : 20 21
LBRACKET :
LPAREN : 1 22 59 60 61 82 83 84
LT : 36
LTE : 38
MAIN : 1
MINUS : 3 6 32
MOD : 30
MULTIPLY : 28
NEQUAL : 34
NOME : 44 53 54 55 56 57 82
NOT : 2 3 4
NUMBER : 43
OR : 40
PLUS : 2 5 31
PRINTF : 83 84
RBRACE : 20 21
RBRACKET :
RETURN : 87
RPAREN : 1 22 59 60 61 82 83 84
SCANF : 82
SEMICOLON : 8 58 61 61 70 82 83 84 85 86 87
SQUOTE :
TRUE : 41
VOID : 26
WHILE : 60
error :
Nonterminals, with rules where they appear
assignment : 8 62 66 69 71 72 75 77 80
bloco : 1 12 59 60
boolean : 46
break_statement : 13
comando : 18 19 61
comandos : 18 20
continue_statement : 14
declaration : 7 63 68
declaration_list : 55 57 58
empty : 65 76 81
for_comma : 66 67 68 71 74 75 79 80
for_condition : 61
for_init : 61
for_statement : 11
for_update : 61
if_statement : 9
operador : 52
operation : 47
parentheses : 48
printf_statement : 16
program : 0
return_statement : 15
scanf_statement : 17
sinal : 49
type : 58
valor : 22 49 50 51 52 52 53 56 57 59 60 64 67 70 73 74 78 79 87
valores : 51 83
while_statement : 10
Parsing method: LALR
state 0
(0) S' -> . program
(1) program -> . INT MAIN LPAREN RPAREN bloco
INT shift and go to state 2
program shift and go to state 1
state 1
(0) S' -> program .
state 2
(1) program -> INT . MAIN LPAREN RPAREN bloco
MAIN shift and go to state 3
state 3
(1) program -> INT MAIN . LPAREN RPAREN bloco
LPAREN shift and go to state 4
state 4
(1) program -> INT MAIN LPAREN . RPAREN bloco
RPAREN shift and go to state 5
state 5
(1) program -> INT MAIN LPAREN RPAREN . bloco
(20) bloco -> . LBRACE comandos RBRACE
(21) bloco -> . LBRACE RBRACE
LBRACE shift and go to state 7
bloco shift and go to state 6
state 6
(1) program -> INT MAIN LPAREN RPAREN bloco .
$end reduce using rule 1 (program -> INT MAIN LPAREN RPAREN bloco .)
state 7
(20) bloco -> LBRACE . comandos RBRACE
(21) bloco -> LBRACE . RBRACE
(18) comandos -> . comando comandos
(19) comandos -> . comando
(7) comando -> . declaration
(8) comando -> . assignment SEMICOLON
(9) comando -> . if_statement
(10) comando -> . while_statement
(11) comando -> . for_statement
(12) comando -> . bloco
(13) comando -> . break_statement
(14) comando -> . continue_statement
(15) comando -> . return_statement
(16) comando -> . printf_statement
(17) comando -> . scanf_statement
(58) declaration -> . type declaration_list SEMICOLON
(53) assignment -> . NOME ASSIGN valor
(59) if_statement -> . IF LPAREN valor RPAREN bloco
(60) while_statement -> . WHILE LPAREN valor RPAREN bloco
(61) for_statement -> . FOR LPAREN for_init SEMICOLON for_condition SEMICOLON for_update RPAREN comando
(20) bloco -> . LBRACE comandos RBRACE
(21) bloco -> . LBRACE RBRACE
(85) break_statement -> . BREAK SEMICOLON
(86) continue_statement -> . CONTINUE SEMICOLON
(87) return_statement -> . RETURN valor SEMICOLON
(83) printf_statement -> . PRINTF LPAREN CHARACTER COMMA valores RPAREN SEMICOLON
(84) printf_statement -> . PRINTF LPAREN CHARACTER RPAREN SEMICOLON
(82) scanf_statement -> . SCANF LPAREN CHARACTER COMMA NOME RPAREN SEMICOLON
(23) type -> . INT
(24) type -> . FLOAT
(25) type -> . CHAR
(26) type -> . VOID
(27) type -> . BOOL
RBRACE shift and go to state 9
NOME shift and go to state 23
IF shift and go to state 24
WHILE shift and go to state 25
FOR shift and go to state 26
LBRACE shift and go to state 7
BREAK shift and go to state 27
CONTINUE shift and go to state 28
RETURN shift and go to state 29
PRINTF shift and go to state 30
SCANF shift and go to state 31
INT shift and go to state 32
FLOAT shift and go to state 33
CHAR shift and go to state 34
VOID shift and go to state 35
BOOL shift and go to state 36
comandos shift and go to state 8
comando shift and go to state 10
declaration shift and go to state 11
assignment shift and go to state 12
if_statement shift and go to state 13
while_statement shift and go to state 14
for_statement shift and go to state 15
bloco shift and go to state 16
break_statement shift and go to state 17
continue_statement shift and go to state 18
return_statement shift and go to state 19
printf_statement shift and go to state 20
scanf_statement shift and go to state 21
type shift and go to state 22
state 8
(20) bloco -> LBRACE comandos . RBRACE
RBRACE shift and go to state 37
state 9
(21) bloco -> LBRACE RBRACE .
$end reduce using rule 21 (bloco -> LBRACE RBRACE .)
NOME reduce using rule 21 (bloco -> LBRACE RBRACE .)
IF reduce using rule 21 (bloco -> LBRACE RBRACE .)
WHILE reduce using rule 21 (bloco -> LBRACE RBRACE .)
FOR reduce using rule 21 (bloco -> LBRACE RBRACE .)
LBRACE reduce using rule 21 (bloco -> LBRACE RBRACE .)
BREAK reduce using rule 21 (bloco -> LBRACE RBRACE .)
CONTINUE reduce using rule 21 (bloco -> LBRACE RBRACE .)
RETURN reduce using rule 21 (bloco -> LBRACE RBRACE .)
PRINTF reduce using rule 21 (bloco -> LBRACE RBRACE .)
SCANF reduce using rule 21 (bloco -> LBRACE RBRACE .)
INT reduce using rule 21 (bloco -> LBRACE RBRACE .)
FLOAT reduce using rule 21 (bloco -> LBRACE RBRACE .)
CHAR reduce using rule 21 (bloco -> LBRACE RBRACE .)
VOID reduce using rule 21 (bloco -> LBRACE RBRACE .)
BOOL reduce using rule 21 (bloco -> LBRACE RBRACE .)
RBRACE reduce using rule 21 (bloco -> LBRACE RBRACE .)
state 10
(18) comandos -> comando . comandos
(19) comandos -> comando .
(18) comandos -> . comando comandos
(19) comandos -> . comando
(7) comando -> . declaration
(8) comando -> . assignment SEMICOLON
(9) comando -> . if_statement
(10) comando -> . while_statement
(11) comando -> . for_statement
(12) comando -> . bloco
(13) comando -> . break_statement
(14) comando -> . continue_statement
(15) comando -> . return_statement
(16) comando -> . printf_statement
(17) comando -> . scanf_statement
(58) declaration -> . type declaration_list SEMICOLON
(53) assignment -> . NOME ASSIGN valor
(59) if_statement -> . IF LPAREN valor RPAREN bloco
(60) while_statement -> . WHILE LPAREN valor RPAREN bloco
(61) for_statement -> . FOR LPAREN for_init SEMICOLON for_condition SEMICOLON for_update RPAREN comando
(20) bloco -> . LBRACE comandos RBRACE
(21) bloco -> . LBRACE RBRACE
(85) break_statement -> . BREAK SEMICOLON
(86) continue_statement -> . CONTINUE SEMICOLON
(87) return_statement -> . RETURN valor SEMICOLON
(83) printf_statement -> . PRINTF LPAREN CHARACTER COMMA valores RPAREN SEMICOLON
(84) printf_statement -> . PRINTF LPAREN CHARACTER RPAREN SEMICOLON
(82) scanf_statement -> . SCANF LPAREN CHARACTER COMMA NOME RPAREN SEMICOLON
(23) type -> . INT
(24) type -> . FLOAT
(25) type -> . CHAR
(26) type -> . VOID
(27) type -> . BOOL
RBRACE reduce using rule 19 (comandos -> comando .)
NOME shift and go to state 23
IF shift and go to state 24
WHILE shift and go to state 25
FOR shift and go to state 26
LBRACE shift and go to state 7
BREAK shift and go to state 27
CONTINUE shift and go to state 28
RETURN shift and go to state 29
PRINTF shift and go to state 30
SCANF shift and go to state 31
INT shift and go to state 32
FLOAT shift and go to state 33
CHAR shift and go to state 34
VOID shift and go to state 35
BOOL shift and go to state 36
comando shift and go to state 10
comandos shift and go to state 38
declaration shift and go to state 11
assignment shift and go to state 12
if_statement shift and go to state 13
while_statement shift and go to state 14
for_statement shift and go to state 15
bloco shift and go to state 16
break_statement shift and go to state 17
continue_statement shift and go to state 18
return_statement shift and go to state 19
printf_statement shift and go to state 20
scanf_statement shift and go to state 21
type shift and go to state 22
state 11
(7) comando -> declaration .
NOME reduce using rule 7 (comando -> declaration .)
IF reduce using rule 7 (comando -> declaration .)
WHILE reduce using rule 7 (comando -> declaration .)
FOR reduce using rule 7 (comando -> declaration .)
LBRACE reduce using rule 7 (comando -> declaration .)
BREAK reduce using rule 7 (comando -> declaration .)
CONTINUE reduce using rule 7 (comando -> declaration .)
RETURN reduce using rule 7 (comando -> declaration .)
PRINTF reduce using rule 7 (comando -> declaration .)
SCANF reduce using rule 7 (comando -> declaration .)
INT reduce using rule 7 (comando -> declaration .)
FLOAT reduce using rule 7 (comando -> declaration .)
CHAR reduce using rule 7 (comando -> declaration .)
VOID reduce using rule 7 (comando -> declaration .)
BOOL reduce using rule 7 (comando -> declaration .)
RBRACE reduce using rule 7 (comando -> declaration .)
state 12
(8) comando -> assignment . SEMICOLON
SEMICOLON shift and go to state 39
state 13
(9) comando -> if_statement .
NOME reduce using rule 9 (comando -> if_statement .)
IF reduce using rule 9 (comando -> if_statement .)
WHILE reduce using rule 9 (comando -> if_statement .)
FOR reduce using rule 9 (comando -> if_statement .)
LBRACE reduce using rule 9 (comando -> if_statement .)
BREAK reduce using rule 9 (comando -> if_statement .)
CONTINUE reduce using rule 9 (comando -> if_statement .)
RETURN reduce using rule 9 (comando -> if_statement .)
PRINTF reduce using rule 9 (comando -> if_statement .)
SCANF reduce using rule 9 (comando -> if_statement .)
INT reduce using rule 9 (comando -> if_statement .)
FLOAT reduce using rule 9 (comando -> if_statement .)
CHAR reduce using rule 9 (comando -> if_statement .)
VOID reduce using rule 9 (comando -> if_statement .)
BOOL reduce using rule 9 (comando -> if_statement .)
RBRACE reduce using rule 9 (comando -> if_statement .)
state 14
(10) comando -> while_statement .
NOME reduce using rule 10 (comando -> while_statement .)
IF reduce using rule 10 (comando -> while_statement .)
WHILE reduce using rule 10 (comando -> while_statement .)
FOR reduce using rule 10 (comando -> while_statement .)
LBRACE reduce using rule 10 (comando -> while_statement .)
BREAK reduce using rule 10 (comando -> while_statement .)
CONTINUE reduce using rule 10 (comando -> while_statement .)
RETURN reduce using rule 10 (comando -> while_statement .)
PRINTF reduce using rule 10 (comando -> while_statement .)
SCANF reduce using rule 10 (comando -> while_statement .)
INT reduce using rule 10 (comando -> while_statement .)
FLOAT reduce using rule 10 (comando -> while_statement .)
CHAR reduce using rule 10 (comando -> while_statement .)
VOID reduce using rule 10 (comando -> while_statement .)
BOOL reduce using rule 10 (comando -> while_statement .)
RBRACE reduce using rule 10 (comando -> while_statement .)
state 15
(11) comando -> for_statement .
NOME reduce using rule 11 (comando -> for_statement .)
IF reduce using rule 11 (comando -> for_statement .)
WHILE reduce using rule 11 (comando -> for_statement .)
FOR reduce using rule 11 (comando -> for_statement .)
LBRACE reduce using rule 11 (comando -> for_statement .)
BREAK reduce using rule 11 (comando -> for_statement .)
CONTINUE reduce using rule 11 (comando -> for_statement .)
RETURN reduce using rule 11 (comando -> for_statement .)
PRINTF reduce using rule 11 (comando -> for_statement .)
SCANF reduce using rule 11 (comando -> for_statement .)
INT reduce using rule 11 (comando -> for_statement .)
FLOAT reduce using rule 11 (comando -> for_statement .)
CHAR reduce using rule 11 (comando -> for_statement .)
VOID reduce using rule 11 (comando -> for_statement .)
BOOL reduce using rule 11 (comando -> for_statement .)
RBRACE reduce using rule 11 (comando -> for_statement .)
state 16
(12) comando -> bloco .
NOME reduce using rule 12 (comando -> bloco .)
IF reduce using rule 12 (comando -> bloco .)
WHILE reduce using rule 12 (comando -> bloco .)
FOR reduce using rule 12 (comando -> bloco .)
LBRACE reduce using rule 12 (comando -> bloco .)
BREAK reduce using rule 12 (comando -> bloco .)
CONTINUE reduce using rule 12 (comando -> bloco .)
RETURN reduce using rule 12 (comando -> bloco .)
PRINTF reduce using rule 12 (comando -> bloco .)
SCANF reduce using rule 12 (comando -> bloco .)
INT reduce using rule 12 (comando -> bloco .)
FLOAT reduce using rule 12 (comando -> bloco .)
CHAR reduce using rule 12 (comando -> bloco .)
VOID reduce using rule 12 (comando -> bloco .)
BOOL reduce using rule 12 (comando -> bloco .)
RBRACE reduce using rule 12 (comando -> bloco .)
state 17
(13) comando -> break_statement .
NOME reduce using rule 13 (comando -> break_statement .)
IF reduce using rule 13 (comando -> break_statement .)
WHILE reduce using rule 13 (comando -> break_statement .)
FOR reduce using rule 13 (comando -> break_statement .)
LBRACE reduce using rule 13 (comando -> break_statement .)
BREAK reduce using rule 13 (comando -> break_statement .)
CONTINUE reduce using rule 13 (comando -> break_statement .)
RETURN reduce using rule 13 (comando -> break_statement .)
PRINTF reduce using rule 13 (comando -> break_statement .)
SCANF reduce using rule 13 (comando -> break_statement .)
INT reduce using rule 13 (comando -> break_statement .)
FLOAT reduce using rule 13 (comando -> break_statement .)
CHAR reduce using rule 13 (comando -> break_statement .)
VOID reduce using rule 13 (comando -> break_statement .)
BOOL reduce using rule 13 (comando -> break_statement .)
RBRACE reduce using rule 13 (comando -> break_statement .)
state 18
(14) comando -> continue_statement .
NOME reduce using rule 14 (comando -> continue_statement .)
IF reduce using rule 14 (comando -> continue_statement .)
WHILE reduce using rule 14 (comando -> continue_statement .)
FOR reduce using rule 14 (comando -> continue_statement .)
LBRACE reduce using rule 14 (comando -> continue_statement .)
BREAK reduce using rule 14 (comando -> continue_statement .)
CONTINUE reduce using rule 14 (comando -> continue_statement .)
RETURN reduce using rule 14 (comando -> continue_statement .)
PRINTF reduce using rule 14 (comando -> continue_statement .)
SCANF reduce using rule 14 (comando -> continue_statement .)
INT reduce using rule 14 (comando -> continue_statement .)
FLOAT reduce using rule 14 (comando -> continue_statement .)
CHAR reduce using rule 14 (comando -> continue_statement .)
VOID reduce using rule 14 (comando -> continue_statement .)
BOOL reduce using rule 14 (comando -> continue_statement .)
RBRACE reduce using rule 14 (comando -> continue_statement .)
state 19
(15) comando -> return_statement .
NOME reduce using rule 15 (comando -> return_statement .)
IF reduce using rule 15 (comando -> return_statement .)
WHILE reduce using rule 15 (comando -> return_statement .)
FOR reduce using rule 15 (comando -> return_statement .)
LBRACE reduce using rule 15 (comando -> return_statement .)
BREAK reduce using rule 15 (comando -> return_statement .)
CONTINUE reduce using rule 15 (comando -> return_statement .)
RETURN reduce using rule 15 (comando -> return_statement .)
PRINTF reduce using rule 15 (comando -> return_statement .)
SCANF reduce using rule 15 (comando -> return_statement .)
INT reduce using rule 15 (comando -> return_statement .)
FLOAT reduce using rule 15 (comando -> return_statement .)
CHAR reduce using rule 15 (comando -> return_statement .)
VOID reduce using rule 15 (comando -> return_statement .)
BOOL reduce using rule 15 (comando -> return_statement .)
RBRACE reduce using rule 15 (comando -> return_statement .)
state 20
(16) comando -> printf_statement .
NOME reduce using rule 16 (comando -> printf_statement .)
IF reduce using rule 16 (comando -> printf_statement .)
WHILE reduce using rule 16 (comando -> printf_statement .)
FOR reduce using rule 16 (comando -> printf_statement .)
LBRACE reduce using rule 16 (comando -> printf_statement .)
BREAK reduce using rule 16 (comando -> printf_statement .)
CONTINUE reduce using rule 16 (comando -> printf_statement .)
RETURN reduce using rule 16 (comando -> printf_statement .)
PRINTF reduce using rule 16 (comando -> printf_statement .)
SCANF reduce using rule 16 (comando -> printf_statement .)
INT reduce using rule 16 (comando -> printf_statement .)
FLOAT reduce using rule 16 (comando -> printf_statement .)
CHAR reduce using rule 16 (comando -> printf_statement .)
VOID reduce using rule 16 (comando -> printf_statement .)
BOOL reduce using rule 16 (comando -> printf_statement .)
RBRACE reduce using rule 16 (comando -> printf_statement .)
state 21
(17) comando -> scanf_statement .
NOME reduce using rule 17 (comando -> scanf_statement .)
IF reduce using rule 17 (comando -> scanf_statement .)
WHILE reduce using rule 17 (comando -> scanf_statement .)
FOR reduce using rule 17 (comando -> scanf_statement .)
LBRACE reduce using rule 17 (comando -> scanf_statement .)
BREAK reduce using rule 17 (comando -> scanf_statement .)
CONTINUE reduce using rule 17 (comando -> scanf_statement .)
RETURN reduce using rule 17 (comando -> scanf_statement .)
PRINTF reduce using rule 17 (comando -> scanf_statement .)
SCANF reduce using rule 17 (comando -> scanf_statement .)
INT reduce using rule 17 (comando -> scanf_statement .)
FLOAT reduce using rule 17 (comando -> scanf_statement .)
CHAR reduce using rule 17 (comando -> scanf_statement .)
VOID reduce using rule 17 (comando -> scanf_statement .)
BOOL reduce using rule 17 (comando -> scanf_statement .)
RBRACE reduce using rule 17 (comando -> scanf_statement .)
state 22
(58) declaration -> type . declaration_list SEMICOLON
(54) declaration_list -> . NOME
(55) declaration_list -> . NOME declaration_list
(56) declaration_list -> . NOME ASSIGN valor
(57) declaration_list -> . NOME ASSIGN valor COMMA declaration_list
NOME shift and go to state 41
declaration_list shift and go to state 40
state 23
(53) assignment -> NOME . ASSIGN valor
ASSIGN shift and go to state 42
state 24
(59) if_statement -> IF . LPAREN valor RPAREN bloco
LPAREN shift and go to state 43
state 25
(60) while_statement -> WHILE . LPAREN valor RPAREN bloco
LPAREN shift and go to state 44
state 26
(61) for_statement -> FOR . LPAREN for_init SEMICOLON for_condition SEMICOLON for_update RPAREN comando
LPAREN shift and go to state 45
state 27
(85) break_statement -> BREAK . SEMICOLON
SEMICOLON shift and go to state 46
state 28
(86) continue_statement -> CONTINUE . SEMICOLON
SEMICOLON shift and go to state 47
state 29
(87) return_statement -> RETURN . valor SEMICOLON
(43) valor -> . NUMBER
(44) valor -> . NOME
(45) valor -> . CHARACTER
(46) valor -> . boolean
(47) valor -> . operation
(48) valor -> . parentheses
(49) valor -> . sinal valor
(41) boolean -> . TRUE
(42) boolean -> . FALSE
(52) operation -> . valor operador valor
(22) parentheses -> . LPAREN valor RPAREN
(2) sinal -> . NOT PLUS
(3) sinal -> . NOT MINUS
(4) sinal -> . NOT
(5) sinal -> . PLUS
(6) sinal -> . MINUS
NUMBER shift and go to state 49
NOME shift and go to state 50
CHARACTER shift and go to state 51
TRUE shift and go to state 56
FALSE shift and go to state 57
LPAREN shift and go to state 58
NOT shift and go to state 59
PLUS shift and go to state 60
MINUS shift and go to state 61
valor shift and go to state 48
boolean shift and go to state 52
operation shift and go to state 53
parentheses shift and go to state 54
sinal shift and go to state 55
state 30
(83) printf_statement -> PRINTF . LPAREN CHARACTER COMMA valores RPAREN SEMICOLON
(84) printf_statement -> PRINTF . LPAREN CHARACTER RPAREN SEMICOLON
LPAREN shift and go to state 62
state 31
(82) scanf_statement -> SCANF . LPAREN CHARACTER COMMA NOME RPAREN SEMICOLON
LPAREN shift and go to state 63
state 32
(23) type -> INT .
NOME reduce using rule 23 (type -> INT .)
state 33
(24) type -> FLOAT .
NOME reduce using rule 24 (type -> FLOAT .)
state 34
(25) type -> CHAR .
NOME reduce using rule 25 (type -> CHAR .)
state 35
(26) type -> VOID .
NOME reduce using rule 26 (type -> VOID .)
state 36
(27) type -> BOOL .
NOME reduce using rule 27 (type -> BOOL .)
state 37
(20) bloco -> LBRACE comandos RBRACE .
$end reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
NOME reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
IF reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
WHILE reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
FOR reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
LBRACE reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
BREAK reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
CONTINUE reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
RETURN reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
PRINTF reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
SCANF reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
INT reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
FLOAT reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
CHAR reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
VOID reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
BOOL reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
RBRACE reduce using rule 20 (bloco -> LBRACE comandos RBRACE .)
state 38
(18) comandos -> comando comandos .
RBRACE reduce using rule 18 (comandos -> comando comandos .)
state 39
(8) comando -> assignment SEMICOLON .
NOME reduce using rule 8 (comando -> assignment SEMICOLON .)
IF reduce using rule 8 (comando -> assignment SEMICOLON .)
WHILE reduce using rule 8 (comando -> assignment SEMICOLON .)
FOR reduce using rule 8 (comando -> assignment SEMICOLON .)
LBRACE reduce using rule 8 (comando -> assignment SEMICOLON .)
BREAK reduce using rule 8 (comando -> assignment SEMICOLON .)
CONTINUE reduce using rule 8 (comando -> assignment SEMICOLON .)
RETURN reduce using rule 8 (comando -> assignment SEMICOLON .)
PRINTF reduce using rule 8 (comando -> assignment SEMICOLON .)
SCANF reduce using rule 8 (comando -> assignment SEMICOLON .)
INT reduce using rule 8 (comando -> assignment SEMICOLON .)
FLOAT reduce using rule 8 (comando -> assignment SEMICOLON .)
CHAR reduce using rule 8 (comando -> assignment SEMICOLON .)
VOID reduce using rule 8 (comando -> assignment SEMICOLON .)
BOOL reduce using rule 8 (comando -> assignment SEMICOLON .)
RBRACE reduce using rule 8 (comando -> assignment SEMICOLON .)
state 40
(58) declaration -> type declaration_list . SEMICOLON
SEMICOLON shift and go to state 64
state 41
(54) declaration_list -> NOME .
(55) declaration_list -> NOME . declaration_list
(56) declaration_list -> NOME . ASSIGN valor
(57) declaration_list -> NOME . ASSIGN valor COMMA declaration_list
(54) declaration_list -> . NOME
(55) declaration_list -> . NOME declaration_list
(56) declaration_list -> . NOME ASSIGN valor
(57) declaration_list -> . NOME ASSIGN valor COMMA declaration_list
SEMICOLON reduce using rule 54 (declaration_list -> NOME .)
ASSIGN shift and go to state 66
NOME shift and go to state 41
declaration_list shift and go to state 65
state 42
(53) assignment -> NOME ASSIGN . valor
(43) valor -> . NUMBER
(44) valor -> . NOME
(45) valor -> . CHARACTER
(46) valor -> . boolean
(47) valor -> . operation
(48) valor -> . parentheses
(49) valor -> . sinal valor
(41) boolean -> . TRUE
(42) boolean -> . FALSE
(52) operation -> . valor operador valor
(22) parentheses -> . LPAREN valor RPAREN
(2) sinal -> . NOT PLUS
(3) sinal -> . NOT MINUS
(4) sinal -> . NOT
(5) sinal -> . PLUS
(6) sinal -> . MINUS
NUMBER shift and go to state 49
NOME shift and go to state 50
CHARACTER shift and go to state 51
TRUE shift and go to state 56
FALSE shift and go to state 57
LPAREN shift and go to state 58
NOT shift and go to state 59
PLUS shift and go to state 60
MINUS shift and go to state 61
valor shift and go to state 67
boolean shift and go to state 52
operation shift and go to state 53
parentheses shift and go to state 54
sinal shift and go to state 55
state 43
(59) if_statement -> IF LPAREN . valor RPAREN bloco
(43) valor -> . NUMBER
(44) valor -> . NOME
(45) valor -> . CHARACTER
(46) valor -> . boolean
(47) valor -> . operation
(48) valor -> . parentheses
(49) valor -> . sinal valor
(41) boolean -> . TRUE
(42) boolean -> . FALSE
(52) operation -> . valor operador valor
(22) parentheses -> . LPAREN valor RPAREN
(2) sinal -> . NOT PLUS
(3) sinal -> . NOT MINUS
(4) sinal -> . NOT
(5) sinal -> . PLUS
(6) sinal -> . MINUS
NUMBER shift and go to state 49
NOME shift and go to state 50
CHARACTER shift and go to state 51
TRUE shift and go to state 56
FALSE shift and go to state 57
LPAREN shift and go to state 58
NOT shift and go to state 59
PLUS shift and go to state 60
MINUS shift and go to state 61
valor shift and go to state 68
boolean shift and go to state 52
operation shift and go to state 53
parentheses shift and go to state 54
sinal shift and go to state 55
state 44
(60) while_statement -> WHILE LPAREN . valor RPAREN bloco
(43) valor -> . NUMBER
(44) valor -> . NOME
(45) valor -> . CHARACTER
(46) valor -> . boolean
(47) valor -> . operation
(48) valor -> . parentheses
(49) valor -> . sinal valor
(41) boolean -> . TRUE
(42) boolean -> . FALSE
(52) operation -> . valor operador valor
(22) parentheses -> . LPAREN valor RPAREN
(2) sinal -> . NOT PLUS
(3) sinal -> . NOT MINUS
(4) sinal -> . NOT
(5) sinal -> . PLUS
(6) sinal -> . MINUS
NUMBER shift and go to state 49
NOME shift and go to state 50
CHARACTER shift and go to state 51
TRUE shift and go to state 56
FALSE shift and go to state 57
LPAREN shift and go to state 58
NOT shift and go to state 59
PLUS shift and go to state 60
MINUS shift and go to state 61
valor shift and go to state 69
boolean shift and go to state 52
operation shift and go to state 53
parentheses shift and go to state 54
sinal shift and go to state 55
state 45
(61) for_statement -> FOR LPAREN . for_init SEMICOLON for_condition SEMICOLON for_update RPAREN comando
(62) for_init -> . assignment
(63) for_init -> . declaration
(64) for_init -> . valor
(65) for_init -> . empty
(66) for_init -> . assignment for_comma
(67) for_init -> . valor for_comma
(68) for_init -> . declaration for_comma
(53) assignment -> . NOME ASSIGN valor
(58) declaration -> . type declaration_list SEMICOLON
(43) valor -> . NUMBER
(44) valor -> . NOME
(45) valor -> . CHARACTER
(46) valor -> . boolean
(47) valor -> . operation
(48) valor -> . parentheses
(49) valor -> . sinal valor
(88) empty -> .
(23) type -> . INT
(24) type -> . FLOAT
(25) type -> . CHAR
(26) type -> . VOID
(27) type -> . BOOL
(41) boolean -> . TRUE
(42) boolean -> . FALSE
(52) operation -> . valor operador valor
(22) parentheses -> . LPAREN valor RPAREN
(2) sinal -> . NOT PLUS
(3) sinal -> . NOT MINUS
(4) sinal -> . NOT
(5) sinal -> . PLUS
(6) sinal -> . MINUS
NOME shift and go to state 75
NUMBER shift and go to state 49
CHARACTER shift and go to state 51
SEMICOLON reduce using rule 88 (empty -> .)
INT shift and go to state 32
FLOAT shift and go to state 33
CHAR shift and go to state 34
VOID shift and go to state 35
BOOL shift and go to state 36
TRUE shift and go to state 56
FALSE shift and go to state 57