-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparser.out
3044 lines (2469 loc) · 124 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 -> commandLoop
Rule 2 commandLoop -> command commandLoop
Rule 3 commandLoop -> empty
Rule 4 block -> OPENBRACK command CLOSEBRACK
Rule 5 block -> OPENBRACK CLOSEBRACK
Rule 6 command -> function SEMICOL
Rule 7 command -> RETURN relexpr SEMICOL
Rule 8 command -> print SEMICOL
Rule 9 command -> assignment SEMICOL
Rule 10 command -> empty SEMICOL
Rule 11 command -> block
Rule 12 command -> while
Rule 13 command -> if
Rule 14 command -> INT FUNCTION function block
Rule 15 command -> STRING FUNCTION function block
Rule 16 command -> BOOL FUNCTION function block
Rule 17 command -> VOID FUNCTION function block
Rule 18 function -> ID OPENPAR INT ID CLOSEPAR
Rule 19 function -> ID OPENPAR INT ID moreArg CLOSEPAR
Rule 20 function -> ID OPENPAR STRING ID CLOSEPAR
Rule 21 function -> ID OPENPAR STRING ID moreArg CLOSEPAR
Rule 22 function -> ID OPENPAR BOOL ID CLOSEPAR
Rule 23 function -> ID OPENPAR BOOL ID moreArg CLOSEPAR
Rule 24 function -> ID OPENPAR relexpr CLOSEPAR
Rule 25 function -> ID OPENPAR relexpr moreArg CLOSEPAR
Rule 26 function -> ID OPENPAR CLOSEPAR
Rule 27 moreArg -> COMMA relexpr
Rule 28 moreArg -> COMMA relexpr moreArg
Rule 29 moreArg -> COMMA INT ID
Rule 30 moreArg -> COMMA INT ID moreArg
Rule 31 moreArg -> COMMA STRING ID
Rule 32 moreArg -> COMMA STRING ID moreArg
Rule 33 moreArg -> COMMA BOOL ID
Rule 34 moreArg -> COMMA BOOL ID moreArg
Rule 35 assignment -> ID EQUALS expression
Rule 36 assignment -> INT ID EQUALS expression
Rule 37 assignment -> STRING ID EQUALS expression
Rule 38 while -> LOOP WHILE OPENPAR relexpr CLOSEPAR block
Rule 39 if -> IF OPENPAR relexpr CLOSEPAR block
Rule 40 if -> IF OPENPAR relexpr CLOSEPAR block ELSE block
Rule 41 print -> PRINT OPENPAR expression CLOSEPAR
Rule 42 expression -> term
Rule 43 expression -> term OR term
Rule 44 expression -> term PLUS term
Rule 45 expression -> term MINUS term
Rule 46 relexpr -> expression
Rule 47 relexpr -> expression COMPEQUALS expression
Rule 48 relexpr -> expression LESSTHAN expression
Rule 49 relexpr -> expression GREATERTHAN expression
Rule 50 relexpr -> expression GREATERTHANOREQUALS expression
Rule 51 relexpr -> expression LESSTHANOREQUALS expression
Rule 52 relexpr -> expression NOTEQUALS expression
Rule 53 term -> factor
Rule 54 term -> factor MULTIPLY factor
Rule 55 term -> factor DIVIDE factor
Rule 56 term -> factor AND factor
Rule 57 factor -> PLUS factor
Rule 58 factor -> MINUS factor
Rule 59 factor -> NOT factor
Rule 60 factor -> NUMBER
Rule 61 factor -> TRUE
Rule 62 factor -> FALSE
Rule 63 factor -> OPENPAR relexpr CLOSEPAR
Rule 64 factor -> ID
Rule 65 factor -> NORMSTRING
Rule 66 factor -> function
Rule 67 empty -> <empty>
Terminals, with rules where they appear
AND : 56
BOOL : 16 22 23 33 34
CLOSEBRACK : 4 5
CLOSEPAR : 18 19 20 21 22 23 24 25 26 38 39 40 41 63
COMMA : 27 28 29 30 31 32 33 34
COMPEQUALS : 47
DIVIDE : 55
ELSE : 40
EQUALS : 35 36 37
FALSE : 62
FUNCTION : 14 15 16 17
GREATERTHAN : 49
GREATERTHANOREQUALS : 50
ID : 18 18 19 19 20 20 21 21 22 22 23 23 24 25 26 29 30 31 32 33 34 35 36 37 64
IF : 39 40
INT : 14 18 19 29 30 36
LESSTHAN : 48
LESSTHANOREQUALS : 51
LOOP : 38
MINUS : 45 58
MULTIPLY : 54
NORMSTRING : 65
NOT : 59
NOTEQUALS : 52
NUMBER : 60
OPENBRACK : 4 5
OPENPAR : 18 19 20 21 22 23 24 25 26 38 39 40 41 63
OR : 43
PLUS : 44 57
PRINT : 41
RETURN : 7
SEMICOL : 6 7 8 9 10
STRING : 15 20 21 31 32 37
TRUE : 61
VOID : 17
WHILE : 38
error :
Nonterminals, with rules where they appear
assignment : 9
block : 11 14 15 16 17 38 39 40 40
command : 2 4
commandLoop : 1 2
empty : 3 10
expression : 35 36 37 41 46 47 47 48 48 49 49 50 50 51 51 52 52
factor : 53 54 54 55 55 56 56 57 58 59
function : 6 14 15 16 17 66
if : 13
moreArg : 19 21 23 25 28 30 32 34
print : 8
program : 0
relexpr : 7 24 25 27 28 38 39 40 63
term : 42 43 43 44 44 45 45
while : 12
Parsing method: LALR
state 0
(0) S' -> . program
(1) program -> . commandLoop
(2) commandLoop -> . command commandLoop
(3) commandLoop -> . empty
(6) command -> . function SEMICOL
(7) command -> . RETURN relexpr SEMICOL
(8) command -> . print SEMICOL
(9) command -> . assignment SEMICOL
(10) command -> . empty SEMICOL
(11) command -> . block
(12) command -> . while
(13) command -> . if
(14) command -> . INT FUNCTION function block
(15) command -> . STRING FUNCTION function block
(16) command -> . BOOL FUNCTION function block
(17) command -> . VOID FUNCTION function block
(67) empty -> .
(18) function -> . ID OPENPAR INT ID CLOSEPAR
(19) function -> . ID OPENPAR INT ID moreArg CLOSEPAR
(20) function -> . ID OPENPAR STRING ID CLOSEPAR
(21) function -> . ID OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> . ID OPENPAR BOOL ID CLOSEPAR
(23) function -> . ID OPENPAR BOOL ID moreArg CLOSEPAR
(24) function -> . ID OPENPAR relexpr CLOSEPAR
(25) function -> . ID OPENPAR relexpr moreArg CLOSEPAR
(26) function -> . ID OPENPAR CLOSEPAR
(41) print -> . PRINT OPENPAR expression CLOSEPAR
(35) assignment -> . ID EQUALS expression
(36) assignment -> . INT ID EQUALS expression
(37) assignment -> . STRING ID EQUALS expression
(4) block -> . OPENBRACK command CLOSEBRACK
(5) block -> . OPENBRACK CLOSEBRACK
(38) while -> . LOOP WHILE OPENPAR relexpr CLOSEPAR block
(39) if -> . IF OPENPAR relexpr CLOSEPAR block
(40) if -> . IF OPENPAR relexpr CLOSEPAR block ELSE block
RETURN shift and go to state 6
INT shift and go to state 12
STRING shift and go to state 13
BOOL shift and go to state 14
VOID shift and go to state 15
SEMICOL reduce using rule 67 (empty -> .)
$end reduce using rule 67 (empty -> .)
ID shift and go to state 16
PRINT shift and go to state 17
OPENBRACK shift and go to state 18
LOOP shift and go to state 19
IF shift and go to state 20
program shift and go to state 1
commandLoop shift and go to state 2
command shift and go to state 3
empty shift and go to state 4
function shift and go to state 5
print shift and go to state 7
assignment shift and go to state 8
block shift and go to state 9
while shift and go to state 10
if shift and go to state 11
state 1
(0) S' -> program .
state 2
(1) program -> commandLoop .
$end reduce using rule 1 (program -> commandLoop .)
state 3
(2) commandLoop -> command . commandLoop
(2) commandLoop -> . command commandLoop
(3) commandLoop -> . empty
(6) command -> . function SEMICOL
(7) command -> . RETURN relexpr SEMICOL
(8) command -> . print SEMICOL
(9) command -> . assignment SEMICOL
(10) command -> . empty SEMICOL
(11) command -> . block
(12) command -> . while
(13) command -> . if
(14) command -> . INT FUNCTION function block
(15) command -> . STRING FUNCTION function block
(16) command -> . BOOL FUNCTION function block
(17) command -> . VOID FUNCTION function block
(67) empty -> .
(18) function -> . ID OPENPAR INT ID CLOSEPAR
(19) function -> . ID OPENPAR INT ID moreArg CLOSEPAR
(20) function -> . ID OPENPAR STRING ID CLOSEPAR
(21) function -> . ID OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> . ID OPENPAR BOOL ID CLOSEPAR
(23) function -> . ID OPENPAR BOOL ID moreArg CLOSEPAR
(24) function -> . ID OPENPAR relexpr CLOSEPAR
(25) function -> . ID OPENPAR relexpr moreArg CLOSEPAR
(26) function -> . ID OPENPAR CLOSEPAR
(41) print -> . PRINT OPENPAR expression CLOSEPAR
(35) assignment -> . ID EQUALS expression
(36) assignment -> . INT ID EQUALS expression
(37) assignment -> . STRING ID EQUALS expression
(4) block -> . OPENBRACK command CLOSEBRACK
(5) block -> . OPENBRACK CLOSEBRACK
(38) while -> . LOOP WHILE OPENPAR relexpr CLOSEPAR block
(39) if -> . IF OPENPAR relexpr CLOSEPAR block
(40) if -> . IF OPENPAR relexpr CLOSEPAR block ELSE block
RETURN shift and go to state 6
INT shift and go to state 12
STRING shift and go to state 13
BOOL shift and go to state 14
VOID shift and go to state 15
SEMICOL reduce using rule 67 (empty -> .)
$end reduce using rule 67 (empty -> .)
ID shift and go to state 16
PRINT shift and go to state 17
OPENBRACK shift and go to state 18
LOOP shift and go to state 19
IF shift and go to state 20
command shift and go to state 3
commandLoop shift and go to state 21
empty shift and go to state 4
function shift and go to state 5
print shift and go to state 7
assignment shift and go to state 8
block shift and go to state 9
while shift and go to state 10
if shift and go to state 11
state 4
(3) commandLoop -> empty .
(10) command -> empty . SEMICOL
$end reduce using rule 3 (commandLoop -> empty .)
SEMICOL shift and go to state 22
state 5
(6) command -> function . SEMICOL
SEMICOL shift and go to state 23
state 6
(7) command -> RETURN . relexpr SEMICOL
(46) relexpr -> . expression
(47) relexpr -> . expression COMPEQUALS expression
(48) relexpr -> . expression LESSTHAN expression
(49) relexpr -> . expression GREATERTHAN expression
(50) relexpr -> . expression GREATERTHANOREQUALS expression
(51) relexpr -> . expression LESSTHANOREQUALS expression
(52) relexpr -> . expression NOTEQUALS expression
(42) expression -> . term
(43) expression -> . term OR term
(44) expression -> . term PLUS term
(45) expression -> . term MINUS term
(53) term -> . factor
(54) term -> . factor MULTIPLY factor
(55) term -> . factor DIVIDE factor
(56) term -> . factor AND factor
(57) factor -> . PLUS factor
(58) factor -> . MINUS factor
(59) factor -> . NOT factor
(60) factor -> . NUMBER
(61) factor -> . TRUE
(62) factor -> . FALSE
(63) factor -> . OPENPAR relexpr CLOSEPAR
(64) factor -> . ID
(65) factor -> . NORMSTRING
(66) factor -> . function
(18) function -> . ID OPENPAR INT ID CLOSEPAR
(19) function -> . ID OPENPAR INT ID moreArg CLOSEPAR
(20) function -> . ID OPENPAR STRING ID CLOSEPAR
(21) function -> . ID OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> . ID OPENPAR BOOL ID CLOSEPAR
(23) function -> . ID OPENPAR BOOL ID moreArg CLOSEPAR
(24) function -> . ID OPENPAR relexpr CLOSEPAR
(25) function -> . ID OPENPAR relexpr moreArg CLOSEPAR
(26) function -> . ID OPENPAR CLOSEPAR
PLUS shift and go to state 27
MINUS shift and go to state 28
NOT shift and go to state 30
NUMBER shift and go to state 31
TRUE shift and go to state 32
FALSE shift and go to state 33
OPENPAR shift and go to state 34
ID shift and go to state 35
NORMSTRING shift and go to state 36
relexpr shift and go to state 24
expression shift and go to state 25
term shift and go to state 26
factor shift and go to state 29
function shift and go to state 37
state 7
(8) command -> print . SEMICOL
SEMICOL shift and go to state 38
state 8
(9) command -> assignment . SEMICOL
SEMICOL shift and go to state 39
state 9
(11) command -> block .
RETURN reduce using rule 11 (command -> block .)
INT reduce using rule 11 (command -> block .)
STRING reduce using rule 11 (command -> block .)
BOOL reduce using rule 11 (command -> block .)
VOID reduce using rule 11 (command -> block .)
ID reduce using rule 11 (command -> block .)
PRINT reduce using rule 11 (command -> block .)
OPENBRACK reduce using rule 11 (command -> block .)
LOOP reduce using rule 11 (command -> block .)
IF reduce using rule 11 (command -> block .)
SEMICOL reduce using rule 11 (command -> block .)
$end reduce using rule 11 (command -> block .)
CLOSEBRACK reduce using rule 11 (command -> block .)
state 10
(12) command -> while .
RETURN reduce using rule 12 (command -> while .)
INT reduce using rule 12 (command -> while .)
STRING reduce using rule 12 (command -> while .)
BOOL reduce using rule 12 (command -> while .)
VOID reduce using rule 12 (command -> while .)
ID reduce using rule 12 (command -> while .)
PRINT reduce using rule 12 (command -> while .)
OPENBRACK reduce using rule 12 (command -> while .)
LOOP reduce using rule 12 (command -> while .)
IF reduce using rule 12 (command -> while .)
SEMICOL reduce using rule 12 (command -> while .)
$end reduce using rule 12 (command -> while .)
CLOSEBRACK reduce using rule 12 (command -> while .)
state 11
(13) command -> if .
RETURN reduce using rule 13 (command -> if .)
INT reduce using rule 13 (command -> if .)
STRING reduce using rule 13 (command -> if .)
BOOL reduce using rule 13 (command -> if .)
VOID reduce using rule 13 (command -> if .)
ID reduce using rule 13 (command -> if .)
PRINT reduce using rule 13 (command -> if .)
OPENBRACK reduce using rule 13 (command -> if .)
LOOP reduce using rule 13 (command -> if .)
IF reduce using rule 13 (command -> if .)
SEMICOL reduce using rule 13 (command -> if .)
$end reduce using rule 13 (command -> if .)
CLOSEBRACK reduce using rule 13 (command -> if .)
state 12
(14) command -> INT . FUNCTION function block
(36) assignment -> INT . ID EQUALS expression
FUNCTION shift and go to state 40
ID shift and go to state 41
state 13
(15) command -> STRING . FUNCTION function block
(37) assignment -> STRING . ID EQUALS expression
FUNCTION shift and go to state 42
ID shift and go to state 43
state 14
(16) command -> BOOL . FUNCTION function block
FUNCTION shift and go to state 44
state 15
(17) command -> VOID . FUNCTION function block
FUNCTION shift and go to state 45
state 16
(18) function -> ID . OPENPAR INT ID CLOSEPAR
(19) function -> ID . OPENPAR INT ID moreArg CLOSEPAR
(20) function -> ID . OPENPAR STRING ID CLOSEPAR
(21) function -> ID . OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> ID . OPENPAR BOOL ID CLOSEPAR
(23) function -> ID . OPENPAR BOOL ID moreArg CLOSEPAR
(24) function -> ID . OPENPAR relexpr CLOSEPAR
(25) function -> ID . OPENPAR relexpr moreArg CLOSEPAR
(26) function -> ID . OPENPAR CLOSEPAR
(35) assignment -> ID . EQUALS expression
OPENPAR shift and go to state 46
EQUALS shift and go to state 47
state 17
(41) print -> PRINT . OPENPAR expression CLOSEPAR
OPENPAR shift and go to state 48
state 18
(4) block -> OPENBRACK . command CLOSEBRACK
(5) block -> OPENBRACK . CLOSEBRACK
(6) command -> . function SEMICOL
(7) command -> . RETURN relexpr SEMICOL
(8) command -> . print SEMICOL
(9) command -> . assignment SEMICOL
(10) command -> . empty SEMICOL
(11) command -> . block
(12) command -> . while
(13) command -> . if
(14) command -> . INT FUNCTION function block
(15) command -> . STRING FUNCTION function block
(16) command -> . BOOL FUNCTION function block
(17) command -> . VOID FUNCTION function block
(18) function -> . ID OPENPAR INT ID CLOSEPAR
(19) function -> . ID OPENPAR INT ID moreArg CLOSEPAR
(20) function -> . ID OPENPAR STRING ID CLOSEPAR
(21) function -> . ID OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> . ID OPENPAR BOOL ID CLOSEPAR
(23) function -> . ID OPENPAR BOOL ID moreArg CLOSEPAR
(24) function -> . ID OPENPAR relexpr CLOSEPAR
(25) function -> . ID OPENPAR relexpr moreArg CLOSEPAR
(26) function -> . ID OPENPAR CLOSEPAR
(41) print -> . PRINT OPENPAR expression CLOSEPAR
(35) assignment -> . ID EQUALS expression
(36) assignment -> . INT ID EQUALS expression
(37) assignment -> . STRING ID EQUALS expression
(67) empty -> .
(4) block -> . OPENBRACK command CLOSEBRACK
(5) block -> . OPENBRACK CLOSEBRACK
(38) while -> . LOOP WHILE OPENPAR relexpr CLOSEPAR block
(39) if -> . IF OPENPAR relexpr CLOSEPAR block
(40) if -> . IF OPENPAR relexpr CLOSEPAR block ELSE block
CLOSEBRACK shift and go to state 50
RETURN shift and go to state 6
INT shift and go to state 12
STRING shift and go to state 13
BOOL shift and go to state 14
VOID shift and go to state 15
ID shift and go to state 16
PRINT shift and go to state 17
SEMICOL reduce using rule 67 (empty -> .)
OPENBRACK shift and go to state 18
LOOP shift and go to state 19
IF shift and go to state 20
command shift and go to state 49
function shift and go to state 5
print shift and go to state 7
assignment shift and go to state 8
empty shift and go to state 51
block shift and go to state 9
while shift and go to state 10
if shift and go to state 11
state 19
(38) while -> LOOP . WHILE OPENPAR relexpr CLOSEPAR block
WHILE shift and go to state 52
state 20
(39) if -> IF . OPENPAR relexpr CLOSEPAR block
(40) if -> IF . OPENPAR relexpr CLOSEPAR block ELSE block
OPENPAR shift and go to state 53
state 21
(2) commandLoop -> command commandLoop .
$end reduce using rule 2 (commandLoop -> command commandLoop .)
state 22
(10) command -> empty SEMICOL .
RETURN reduce using rule 10 (command -> empty SEMICOL .)
INT reduce using rule 10 (command -> empty SEMICOL .)
STRING reduce using rule 10 (command -> empty SEMICOL .)
BOOL reduce using rule 10 (command -> empty SEMICOL .)
VOID reduce using rule 10 (command -> empty SEMICOL .)
ID reduce using rule 10 (command -> empty SEMICOL .)
PRINT reduce using rule 10 (command -> empty SEMICOL .)
OPENBRACK reduce using rule 10 (command -> empty SEMICOL .)
LOOP reduce using rule 10 (command -> empty SEMICOL .)
IF reduce using rule 10 (command -> empty SEMICOL .)
SEMICOL reduce using rule 10 (command -> empty SEMICOL .)
$end reduce using rule 10 (command -> empty SEMICOL .)
CLOSEBRACK reduce using rule 10 (command -> empty SEMICOL .)
state 23
(6) command -> function SEMICOL .
RETURN reduce using rule 6 (command -> function SEMICOL .)
INT reduce using rule 6 (command -> function SEMICOL .)
STRING reduce using rule 6 (command -> function SEMICOL .)
BOOL reduce using rule 6 (command -> function SEMICOL .)
VOID reduce using rule 6 (command -> function SEMICOL .)
ID reduce using rule 6 (command -> function SEMICOL .)
PRINT reduce using rule 6 (command -> function SEMICOL .)
OPENBRACK reduce using rule 6 (command -> function SEMICOL .)
LOOP reduce using rule 6 (command -> function SEMICOL .)
IF reduce using rule 6 (command -> function SEMICOL .)
SEMICOL reduce using rule 6 (command -> function SEMICOL .)
$end reduce using rule 6 (command -> function SEMICOL .)
CLOSEBRACK reduce using rule 6 (command -> function SEMICOL .)
state 24
(7) command -> RETURN relexpr . SEMICOL
SEMICOL shift and go to state 54
state 25
(46) relexpr -> expression .
(47) relexpr -> expression . COMPEQUALS expression
(48) relexpr -> expression . LESSTHAN expression
(49) relexpr -> expression . GREATERTHAN expression
(50) relexpr -> expression . GREATERTHANOREQUALS expression
(51) relexpr -> expression . LESSTHANOREQUALS expression
(52) relexpr -> expression . NOTEQUALS expression
SEMICOL reduce using rule 46 (relexpr -> expression .)
CLOSEPAR reduce using rule 46 (relexpr -> expression .)
COMMA reduce using rule 46 (relexpr -> expression .)
COMPEQUALS shift and go to state 55
LESSTHAN shift and go to state 56
GREATERTHAN shift and go to state 57
GREATERTHANOREQUALS shift and go to state 58
LESSTHANOREQUALS shift and go to state 59
NOTEQUALS shift and go to state 60
state 26
(42) expression -> term .
(43) expression -> term . OR term
(44) expression -> term . PLUS term
(45) expression -> term . MINUS term
COMPEQUALS reduce using rule 42 (expression -> term .)
LESSTHAN reduce using rule 42 (expression -> term .)
GREATERTHAN reduce using rule 42 (expression -> term .)
GREATERTHANOREQUALS reduce using rule 42 (expression -> term .)
LESSTHANOREQUALS reduce using rule 42 (expression -> term .)
NOTEQUALS reduce using rule 42 (expression -> term .)
SEMICOL reduce using rule 42 (expression -> term .)
CLOSEPAR reduce using rule 42 (expression -> term .)
COMMA reduce using rule 42 (expression -> term .)
OR shift and go to state 61
PLUS shift and go to state 62
MINUS shift and go to state 63
state 27
(57) factor -> PLUS . factor
(57) factor -> . PLUS factor
(58) factor -> . MINUS factor
(59) factor -> . NOT factor
(60) factor -> . NUMBER
(61) factor -> . TRUE
(62) factor -> . FALSE
(63) factor -> . OPENPAR relexpr CLOSEPAR
(64) factor -> . ID
(65) factor -> . NORMSTRING
(66) factor -> . function
(18) function -> . ID OPENPAR INT ID CLOSEPAR
(19) function -> . ID OPENPAR INT ID moreArg CLOSEPAR
(20) function -> . ID OPENPAR STRING ID CLOSEPAR
(21) function -> . ID OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> . ID OPENPAR BOOL ID CLOSEPAR
(23) function -> . ID OPENPAR BOOL ID moreArg CLOSEPAR
(24) function -> . ID OPENPAR relexpr CLOSEPAR
(25) function -> . ID OPENPAR relexpr moreArg CLOSEPAR
(26) function -> . ID OPENPAR CLOSEPAR
PLUS shift and go to state 27
MINUS shift and go to state 28
NOT shift and go to state 30
NUMBER shift and go to state 31
TRUE shift and go to state 32
FALSE shift and go to state 33
OPENPAR shift and go to state 34
ID shift and go to state 35
NORMSTRING shift and go to state 36
factor shift and go to state 64
function shift and go to state 37
state 28
(58) factor -> MINUS . factor
(57) factor -> . PLUS factor
(58) factor -> . MINUS factor
(59) factor -> . NOT factor
(60) factor -> . NUMBER
(61) factor -> . TRUE
(62) factor -> . FALSE
(63) factor -> . OPENPAR relexpr CLOSEPAR
(64) factor -> . ID
(65) factor -> . NORMSTRING
(66) factor -> . function
(18) function -> . ID OPENPAR INT ID CLOSEPAR
(19) function -> . ID OPENPAR INT ID moreArg CLOSEPAR
(20) function -> . ID OPENPAR STRING ID CLOSEPAR
(21) function -> . ID OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> . ID OPENPAR BOOL ID CLOSEPAR
(23) function -> . ID OPENPAR BOOL ID moreArg CLOSEPAR
(24) function -> . ID OPENPAR relexpr CLOSEPAR
(25) function -> . ID OPENPAR relexpr moreArg CLOSEPAR
(26) function -> . ID OPENPAR CLOSEPAR
PLUS shift and go to state 27
MINUS shift and go to state 28
NOT shift and go to state 30
NUMBER shift and go to state 31
TRUE shift and go to state 32
FALSE shift and go to state 33
OPENPAR shift and go to state 34
ID shift and go to state 35
NORMSTRING shift and go to state 36
factor shift and go to state 65
function shift and go to state 37
state 29
(53) term -> factor .
(54) term -> factor . MULTIPLY factor
(55) term -> factor . DIVIDE factor
(56) term -> factor . AND factor
OR reduce using rule 53 (term -> factor .)
PLUS reduce using rule 53 (term -> factor .)
MINUS reduce using rule 53 (term -> factor .)
COMPEQUALS reduce using rule 53 (term -> factor .)
LESSTHAN reduce using rule 53 (term -> factor .)
GREATERTHAN reduce using rule 53 (term -> factor .)
GREATERTHANOREQUALS reduce using rule 53 (term -> factor .)
LESSTHANOREQUALS reduce using rule 53 (term -> factor .)
NOTEQUALS reduce using rule 53 (term -> factor .)
SEMICOL reduce using rule 53 (term -> factor .)
CLOSEPAR reduce using rule 53 (term -> factor .)
COMMA reduce using rule 53 (term -> factor .)
MULTIPLY shift and go to state 66
DIVIDE shift and go to state 67
AND shift and go to state 68
state 30
(59) factor -> NOT . factor
(57) factor -> . PLUS factor
(58) factor -> . MINUS factor
(59) factor -> . NOT factor
(60) factor -> . NUMBER
(61) factor -> . TRUE
(62) factor -> . FALSE
(63) factor -> . OPENPAR relexpr CLOSEPAR
(64) factor -> . ID
(65) factor -> . NORMSTRING
(66) factor -> . function
(18) function -> . ID OPENPAR INT ID CLOSEPAR
(19) function -> . ID OPENPAR INT ID moreArg CLOSEPAR
(20) function -> . ID OPENPAR STRING ID CLOSEPAR
(21) function -> . ID OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> . ID OPENPAR BOOL ID CLOSEPAR
(23) function -> . ID OPENPAR BOOL ID moreArg CLOSEPAR
(24) function -> . ID OPENPAR relexpr CLOSEPAR
(25) function -> . ID OPENPAR relexpr moreArg CLOSEPAR
(26) function -> . ID OPENPAR CLOSEPAR
PLUS shift and go to state 27
MINUS shift and go to state 28
NOT shift and go to state 30
NUMBER shift and go to state 31
TRUE shift and go to state 32
FALSE shift and go to state 33
OPENPAR shift and go to state 34
ID shift and go to state 35
NORMSTRING shift and go to state 36
factor shift and go to state 69
function shift and go to state 37
state 31
(60) factor -> NUMBER .
MULTIPLY reduce using rule 60 (factor -> NUMBER .)
DIVIDE reduce using rule 60 (factor -> NUMBER .)
AND reduce using rule 60 (factor -> NUMBER .)
OR reduce using rule 60 (factor -> NUMBER .)
PLUS reduce using rule 60 (factor -> NUMBER .)
MINUS reduce using rule 60 (factor -> NUMBER .)
COMPEQUALS reduce using rule 60 (factor -> NUMBER .)
LESSTHAN reduce using rule 60 (factor -> NUMBER .)
GREATERTHAN reduce using rule 60 (factor -> NUMBER .)
GREATERTHANOREQUALS reduce using rule 60 (factor -> NUMBER .)
LESSTHANOREQUALS reduce using rule 60 (factor -> NUMBER .)
NOTEQUALS reduce using rule 60 (factor -> NUMBER .)
SEMICOL reduce using rule 60 (factor -> NUMBER .)
CLOSEPAR reduce using rule 60 (factor -> NUMBER .)
COMMA reduce using rule 60 (factor -> NUMBER .)
state 32
(61) factor -> TRUE .
MULTIPLY reduce using rule 61 (factor -> TRUE .)
DIVIDE reduce using rule 61 (factor -> TRUE .)
AND reduce using rule 61 (factor -> TRUE .)
OR reduce using rule 61 (factor -> TRUE .)
PLUS reduce using rule 61 (factor -> TRUE .)
MINUS reduce using rule 61 (factor -> TRUE .)
COMPEQUALS reduce using rule 61 (factor -> TRUE .)
LESSTHAN reduce using rule 61 (factor -> TRUE .)
GREATERTHAN reduce using rule 61 (factor -> TRUE .)
GREATERTHANOREQUALS reduce using rule 61 (factor -> TRUE .)
LESSTHANOREQUALS reduce using rule 61 (factor -> TRUE .)
NOTEQUALS reduce using rule 61 (factor -> TRUE .)
SEMICOL reduce using rule 61 (factor -> TRUE .)
CLOSEPAR reduce using rule 61 (factor -> TRUE .)
COMMA reduce using rule 61 (factor -> TRUE .)
state 33
(62) factor -> FALSE .
MULTIPLY reduce using rule 62 (factor -> FALSE .)
DIVIDE reduce using rule 62 (factor -> FALSE .)
AND reduce using rule 62 (factor -> FALSE .)
OR reduce using rule 62 (factor -> FALSE .)
PLUS reduce using rule 62 (factor -> FALSE .)
MINUS reduce using rule 62 (factor -> FALSE .)
COMPEQUALS reduce using rule 62 (factor -> FALSE .)
LESSTHAN reduce using rule 62 (factor -> FALSE .)
GREATERTHAN reduce using rule 62 (factor -> FALSE .)
GREATERTHANOREQUALS reduce using rule 62 (factor -> FALSE .)
LESSTHANOREQUALS reduce using rule 62 (factor -> FALSE .)
NOTEQUALS reduce using rule 62 (factor -> FALSE .)
SEMICOL reduce using rule 62 (factor -> FALSE .)
CLOSEPAR reduce using rule 62 (factor -> FALSE .)
COMMA reduce using rule 62 (factor -> FALSE .)
state 34
(63) factor -> OPENPAR . relexpr CLOSEPAR
(46) relexpr -> . expression
(47) relexpr -> . expression COMPEQUALS expression
(48) relexpr -> . expression LESSTHAN expression
(49) relexpr -> . expression GREATERTHAN expression
(50) relexpr -> . expression GREATERTHANOREQUALS expression
(51) relexpr -> . expression LESSTHANOREQUALS expression
(52) relexpr -> . expression NOTEQUALS expression
(42) expression -> . term
(43) expression -> . term OR term
(44) expression -> . term PLUS term
(45) expression -> . term MINUS term
(53) term -> . factor
(54) term -> . factor MULTIPLY factor
(55) term -> . factor DIVIDE factor
(56) term -> . factor AND factor
(57) factor -> . PLUS factor
(58) factor -> . MINUS factor
(59) factor -> . NOT factor
(60) factor -> . NUMBER
(61) factor -> . TRUE
(62) factor -> . FALSE
(63) factor -> . OPENPAR relexpr CLOSEPAR
(64) factor -> . ID
(65) factor -> . NORMSTRING
(66) factor -> . function
(18) function -> . ID OPENPAR INT ID CLOSEPAR
(19) function -> . ID OPENPAR INT ID moreArg CLOSEPAR
(20) function -> . ID OPENPAR STRING ID CLOSEPAR
(21) function -> . ID OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> . ID OPENPAR BOOL ID CLOSEPAR
(23) function -> . ID OPENPAR BOOL ID moreArg CLOSEPAR
(24) function -> . ID OPENPAR relexpr CLOSEPAR
(25) function -> . ID OPENPAR relexpr moreArg CLOSEPAR
(26) function -> . ID OPENPAR CLOSEPAR
PLUS shift and go to state 27
MINUS shift and go to state 28
NOT shift and go to state 30
NUMBER shift and go to state 31
TRUE shift and go to state 32
FALSE shift and go to state 33
OPENPAR shift and go to state 34
ID shift and go to state 35
NORMSTRING shift and go to state 36
relexpr shift and go to state 70
expression shift and go to state 25
term shift and go to state 26
factor shift and go to state 29
function shift and go to state 37
state 35
(64) factor -> ID .
(18) function -> ID . OPENPAR INT ID CLOSEPAR
(19) function -> ID . OPENPAR INT ID moreArg CLOSEPAR
(20) function -> ID . OPENPAR STRING ID CLOSEPAR
(21) function -> ID . OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> ID . OPENPAR BOOL ID CLOSEPAR
(23) function -> ID . OPENPAR BOOL ID moreArg CLOSEPAR
(24) function -> ID . OPENPAR relexpr CLOSEPAR
(25) function -> ID . OPENPAR relexpr moreArg CLOSEPAR
(26) function -> ID . OPENPAR CLOSEPAR
MULTIPLY reduce using rule 64 (factor -> ID .)
DIVIDE reduce using rule 64 (factor -> ID .)
AND reduce using rule 64 (factor -> ID .)
OR reduce using rule 64 (factor -> ID .)
PLUS reduce using rule 64 (factor -> ID .)
MINUS reduce using rule 64 (factor -> ID .)
COMPEQUALS reduce using rule 64 (factor -> ID .)
LESSTHAN reduce using rule 64 (factor -> ID .)
GREATERTHAN reduce using rule 64 (factor -> ID .)
GREATERTHANOREQUALS reduce using rule 64 (factor -> ID .)
LESSTHANOREQUALS reduce using rule 64 (factor -> ID .)
NOTEQUALS reduce using rule 64 (factor -> ID .)
SEMICOL reduce using rule 64 (factor -> ID .)
CLOSEPAR reduce using rule 64 (factor -> ID .)
COMMA reduce using rule 64 (factor -> ID .)
OPENPAR shift and go to state 46
state 36
(65) factor -> NORMSTRING .
MULTIPLY reduce using rule 65 (factor -> NORMSTRING .)
DIVIDE reduce using rule 65 (factor -> NORMSTRING .)
AND reduce using rule 65 (factor -> NORMSTRING .)
OR reduce using rule 65 (factor -> NORMSTRING .)
PLUS reduce using rule 65 (factor -> NORMSTRING .)
MINUS reduce using rule 65 (factor -> NORMSTRING .)
COMPEQUALS reduce using rule 65 (factor -> NORMSTRING .)
LESSTHAN reduce using rule 65 (factor -> NORMSTRING .)
GREATERTHAN reduce using rule 65 (factor -> NORMSTRING .)
GREATERTHANOREQUALS reduce using rule 65 (factor -> NORMSTRING .)
LESSTHANOREQUALS reduce using rule 65 (factor -> NORMSTRING .)
NOTEQUALS reduce using rule 65 (factor -> NORMSTRING .)
SEMICOL reduce using rule 65 (factor -> NORMSTRING .)
CLOSEPAR reduce using rule 65 (factor -> NORMSTRING .)
COMMA reduce using rule 65 (factor -> NORMSTRING .)
state 37
(66) factor -> function .
MULTIPLY reduce using rule 66 (factor -> function .)
DIVIDE reduce using rule 66 (factor -> function .)
AND reduce using rule 66 (factor -> function .)
OR reduce using rule 66 (factor -> function .)
PLUS reduce using rule 66 (factor -> function .)
MINUS reduce using rule 66 (factor -> function .)
COMPEQUALS reduce using rule 66 (factor -> function .)
LESSTHAN reduce using rule 66 (factor -> function .)
GREATERTHAN reduce using rule 66 (factor -> function .)
GREATERTHANOREQUALS reduce using rule 66 (factor -> function .)
LESSTHANOREQUALS reduce using rule 66 (factor -> function .)
NOTEQUALS reduce using rule 66 (factor -> function .)
SEMICOL reduce using rule 66 (factor -> function .)
CLOSEPAR reduce using rule 66 (factor -> function .)
COMMA reduce using rule 66 (factor -> function .)
state 38
(8) command -> print SEMICOL .
RETURN reduce using rule 8 (command -> print SEMICOL .)
INT reduce using rule 8 (command -> print SEMICOL .)
STRING reduce using rule 8 (command -> print SEMICOL .)
BOOL reduce using rule 8 (command -> print SEMICOL .)
VOID reduce using rule 8 (command -> print SEMICOL .)
ID reduce using rule 8 (command -> print SEMICOL .)
PRINT reduce using rule 8 (command -> print SEMICOL .)
OPENBRACK reduce using rule 8 (command -> print SEMICOL .)
LOOP reduce using rule 8 (command -> print SEMICOL .)
IF reduce using rule 8 (command -> print SEMICOL .)
SEMICOL reduce using rule 8 (command -> print SEMICOL .)
$end reduce using rule 8 (command -> print SEMICOL .)
CLOSEBRACK reduce using rule 8 (command -> print SEMICOL .)
state 39
(9) command -> assignment SEMICOL .
RETURN reduce using rule 9 (command -> assignment SEMICOL .)
INT reduce using rule 9 (command -> assignment SEMICOL .)
STRING reduce using rule 9 (command -> assignment SEMICOL .)
BOOL reduce using rule 9 (command -> assignment SEMICOL .)
VOID reduce using rule 9 (command -> assignment SEMICOL .)
ID reduce using rule 9 (command -> assignment SEMICOL .)
PRINT reduce using rule 9 (command -> assignment SEMICOL .)
OPENBRACK reduce using rule 9 (command -> assignment SEMICOL .)
LOOP reduce using rule 9 (command -> assignment SEMICOL .)
IF reduce using rule 9 (command -> assignment SEMICOL .)
SEMICOL reduce using rule 9 (command -> assignment SEMICOL .)
$end reduce using rule 9 (command -> assignment SEMICOL .)
CLOSEBRACK reduce using rule 9 (command -> assignment SEMICOL .)
state 40
(14) command -> INT FUNCTION . function block
(18) function -> . ID OPENPAR INT ID CLOSEPAR
(19) function -> . ID OPENPAR INT ID moreArg CLOSEPAR
(20) function -> . ID OPENPAR STRING ID CLOSEPAR
(21) function -> . ID OPENPAR STRING ID moreArg CLOSEPAR
(22) function -> . ID OPENPAR BOOL ID CLOSEPAR