-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathparser.out
More file actions
2370 lines (2012 loc) · 110 KB
/
parser.out
File metadata and controls
2370 lines (2012 loc) · 110 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.10 (http://www.dabeaz.com/ply)
Unused terminals:
CHAR
NEWLINE
LINE_COMMENT
FOR
SHABANG
RBRACE
AMPERSAND
IN
EQ
NEQ
LBRACE
Grammar
Rule 0 S' -> program
Rule 1 program -> instructions
Rule 2 instructions -> instruction instructions
Rule 3 instructions -> instruction
Rule 4 instruction -> identifier ASSIGNMENT expression
Rule 5 instruction -> identifier ASSIGNMENT double_paren_dollar_prefix_expression
Rule 6 instruction -> IF condition SEMICOLON THEN instructions SEMICOLON FI
Rule 7 instruction -> IF condition SEMICOLON THEN instructions SEMICOLON ELSE instructions SEMICOLON FI
Rule 8 instruction -> WHILE condition SEMICOLON DO instructions DONE
Rule 9 instruction -> ECHO expression
Rule 10 instruction -> BREAK
Rule 11 instruction -> CONTINUE
Rule 12 double_paren_dollar_prefix_expression -> DOLLAR DOUBLE_LPAREN expression DOUBLE_RPAREN
Rule 13 instruction -> DOUBLE_LPAREN expression DOUBLE_RPAREN
Rule 14 identifier -> IDENTIFIER
Rule 15 comparators -> TEST_EQ
Rule 16 comparators -> TEST_NEQ
Rule 17 comparators -> TEST_LT
Rule 18 comparators -> TEST_GT
Rule 19 comparators -> EQUALS
Rule 20 comparators -> GT
Rule 21 comparators -> GTE
Rule 22 comparators -> LT
Rule 23 comparators -> LTE
Rule 24 condition -> expression
Rule 25 condition -> DOUBLE_LBRACKET expression DOUBLE_RBRACKET
Rule 26 condition -> LBRACKET expression RBRACKET
Rule 27 expression -> identifier
Rule 28 expression -> identifier DECREMENT
Rule 29 expression -> identifier INCREMENT
Rule 30 expression -> const
Rule 31 expression -> expression PLUS expression
Rule 32 expression -> expression MINUS expression
Rule 33 expression -> expression TIMES expression
Rule 34 expression -> expression DIVIDE expression
Rule 35 expression -> expression comparators expression
Rule 36 expression -> LPAREN expression RPAREN
Rule 37 const -> NUMBER
Rule 38 const -> STRING
Rule 39 const -> VARIABLE
Rule 40 const -> BOOLEAN
Rule 41 instruction -> command switch_list argument_list
Rule 42 instruction -> command argument_list
Rule 43 instruction -> command switch_list
Rule 44 instruction -> command
Rule 45 command -> identifier
Rule 46 switch -> MINUS identifier
Rule 47 switch_list -> switch switch_list
Rule 48 switch_list -> switch
Rule 49 argument -> const
Rule 50 argument_list -> argument argument_list
Rule 51 argument_list -> argument
Terminals, with rules where they appear
AMPERSAND :
ASSIGNMENT : 4 5
BOOLEAN : 40
BREAK : 10
CHAR :
CONTINUE : 11
DECREMENT : 28
DIVIDE : 34
DO : 8
DOLLAR : 12
DONE : 8
DOUBLE_LBRACKET : 25
DOUBLE_LPAREN : 12 13
DOUBLE_RBRACKET : 25
DOUBLE_RPAREN : 12 13
ECHO : 9
ELSE : 7
EQ :
EQUALS : 19
FI : 6 7
FOR :
GT : 20
GTE : 21
IDENTIFIER : 14
IF : 6 7
IN :
INCREMENT : 29
LBRACE :
LBRACKET : 26
LINE_COMMENT :
LPAREN : 36
LT : 22
LTE : 23
MINUS : 32 46
NEQ :
NEWLINE :
NUMBER : 37
PLUS : 31
RBRACE :
RBRACKET : 26
RPAREN : 36
SEMICOLON : 6 6 7 7 7 8
SHABANG :
STRING : 38
TEST_EQ : 15
TEST_GT : 18
TEST_LT : 17
TEST_NEQ : 16
THEN : 6 7
TIMES : 33
VARIABLE : 39
WHILE : 8
error :
Nonterminals, with rules where they appear
argument : 50 51
argument_list : 41 42 50
command : 41 42 43 44
comparators : 35
condition : 6 7 8
const : 30 49
double_paren_dollar_prefix_expression : 5
expression : 4 9 12 13 24 25 26 31 31 32 32 33 33 34 34 35 35 36
identifier : 4 5 27 28 29 45 46
instruction : 2 3
instructions : 1 2 6 7 7 8
program : 0
switch : 47 48
switch_list : 41 43 47
Parsing method: LALR
state 0
(0) S' -> . program
(1) program -> . instructions
(2) instructions -> . instruction instructions
(3) instructions -> . instruction
(4) instruction -> . identifier ASSIGNMENT expression
(5) instruction -> . identifier ASSIGNMENT double_paren_dollar_prefix_expression
(6) instruction -> . IF condition SEMICOLON THEN instructions SEMICOLON FI
(7) instruction -> . IF condition SEMICOLON THEN instructions SEMICOLON ELSE instructions SEMICOLON FI
(8) instruction -> . WHILE condition SEMICOLON DO instructions DONE
(9) instruction -> . ECHO expression
(10) instruction -> . BREAK
(11) instruction -> . CONTINUE
(13) instruction -> . DOUBLE_LPAREN expression DOUBLE_RPAREN
(41) instruction -> . command switch_list argument_list
(42) instruction -> . command argument_list
(43) instruction -> . command switch_list
(44) instruction -> . command
(14) identifier -> . IDENTIFIER
(45) command -> . identifier
IF shift and go to state 6
WHILE shift and go to state 1
ECHO shift and go to state 5
BREAK shift and go to state 9
CONTINUE shift and go to state 10
DOUBLE_LPAREN shift and go to state 2
IDENTIFIER shift and go to state 7
instruction shift and go to state 8
program shift and go to state 3
command shift and go to state 11
identifier shift and go to state 12
instructions shift and go to state 4
state 1
(8) instruction -> WHILE . condition SEMICOLON DO instructions DONE
(24) condition -> . expression
(25) condition -> . DOUBLE_LBRACKET expression DOUBLE_RBRACKET
(26) condition -> . LBRACKET expression RBRACKET
(27) expression -> . identifier
(28) expression -> . identifier DECREMENT
(29) expression -> . identifier INCREMENT
(30) expression -> . const
(31) expression -> . expression PLUS expression
(32) expression -> . expression MINUS expression
(33) expression -> . expression TIMES expression
(34) expression -> . expression DIVIDE expression
(35) expression -> . expression comparators expression
(36) expression -> . LPAREN expression RPAREN
(14) identifier -> . IDENTIFIER
(37) const -> . NUMBER
(38) const -> . STRING
(39) const -> . VARIABLE
(40) const -> . BOOLEAN
DOUBLE_LBRACKET shift and go to state 17
LBRACKET shift and go to state 14
LPAREN shift and go to state 18
IDENTIFIER shift and go to state 7
NUMBER shift and go to state 13
STRING shift and go to state 15
VARIABLE shift and go to state 19
BOOLEAN shift and go to state 21
const shift and go to state 16
expression shift and go to state 23
identifier shift and go to state 22
condition shift and go to state 20
state 2
(13) instruction -> DOUBLE_LPAREN . expression DOUBLE_RPAREN
(27) expression -> . identifier
(28) expression -> . identifier DECREMENT
(29) expression -> . identifier INCREMENT
(30) expression -> . const
(31) expression -> . expression PLUS expression
(32) expression -> . expression MINUS expression
(33) expression -> . expression TIMES expression
(34) expression -> . expression DIVIDE expression
(35) expression -> . expression comparators expression
(36) expression -> . LPAREN expression RPAREN
(14) identifier -> . IDENTIFIER
(37) const -> . NUMBER
(38) const -> . STRING
(39) const -> . VARIABLE
(40) const -> . BOOLEAN
LPAREN shift and go to state 18
IDENTIFIER shift and go to state 7
NUMBER shift and go to state 13
STRING shift and go to state 15
VARIABLE shift and go to state 19
BOOLEAN shift and go to state 21
const shift and go to state 16
identifier shift and go to state 22
expression shift and go to state 24
state 3
(0) S' -> program .
state 4
(1) program -> instructions .
$end reduce using rule 1 (program -> instructions .)
state 5
(9) instruction -> ECHO . expression
(27) expression -> . identifier
(28) expression -> . identifier DECREMENT
(29) expression -> . identifier INCREMENT
(30) expression -> . const
(31) expression -> . expression PLUS expression
(32) expression -> . expression MINUS expression
(33) expression -> . expression TIMES expression
(34) expression -> . expression DIVIDE expression
(35) expression -> . expression comparators expression
(36) expression -> . LPAREN expression RPAREN
(14) identifier -> . IDENTIFIER
(37) const -> . NUMBER
(38) const -> . STRING
(39) const -> . VARIABLE
(40) const -> . BOOLEAN
LPAREN shift and go to state 18
IDENTIFIER shift and go to state 7
NUMBER shift and go to state 13
STRING shift and go to state 15
VARIABLE shift and go to state 19
BOOLEAN shift and go to state 21
const shift and go to state 16
identifier shift and go to state 22
expression shift and go to state 25
state 6
(6) instruction -> IF . condition SEMICOLON THEN instructions SEMICOLON FI
(7) instruction -> IF . condition SEMICOLON THEN instructions SEMICOLON ELSE instructions SEMICOLON FI
(24) condition -> . expression
(25) condition -> . DOUBLE_LBRACKET expression DOUBLE_RBRACKET
(26) condition -> . LBRACKET expression RBRACKET
(27) expression -> . identifier
(28) expression -> . identifier DECREMENT
(29) expression -> . identifier INCREMENT
(30) expression -> . const
(31) expression -> . expression PLUS expression
(32) expression -> . expression MINUS expression
(33) expression -> . expression TIMES expression
(34) expression -> . expression DIVIDE expression
(35) expression -> . expression comparators expression
(36) expression -> . LPAREN expression RPAREN
(14) identifier -> . IDENTIFIER
(37) const -> . NUMBER
(38) const -> . STRING
(39) const -> . VARIABLE
(40) const -> . BOOLEAN
DOUBLE_LBRACKET shift and go to state 17
LBRACKET shift and go to state 14
LPAREN shift and go to state 18
IDENTIFIER shift and go to state 7
NUMBER shift and go to state 13
STRING shift and go to state 15
VARIABLE shift and go to state 19
BOOLEAN shift and go to state 21
const shift and go to state 16
expression shift and go to state 23
identifier shift and go to state 22
condition shift and go to state 26
state 7
(14) identifier -> IDENTIFIER .
ASSIGNMENT reduce using rule 14 (identifier -> IDENTIFIER .)
MINUS reduce using rule 14 (identifier -> IDENTIFIER .)
NUMBER reduce using rule 14 (identifier -> IDENTIFIER .)
STRING reduce using rule 14 (identifier -> IDENTIFIER .)
VARIABLE reduce using rule 14 (identifier -> IDENTIFIER .)
BOOLEAN reduce using rule 14 (identifier -> IDENTIFIER .)
IF reduce using rule 14 (identifier -> IDENTIFIER .)
WHILE reduce using rule 14 (identifier -> IDENTIFIER .)
ECHO reduce using rule 14 (identifier -> IDENTIFIER .)
BREAK reduce using rule 14 (identifier -> IDENTIFIER .)
CONTINUE reduce using rule 14 (identifier -> IDENTIFIER .)
DOUBLE_LPAREN reduce using rule 14 (identifier -> IDENTIFIER .)
IDENTIFIER reduce using rule 14 (identifier -> IDENTIFIER .)
SEMICOLON reduce using rule 14 (identifier -> IDENTIFIER .)
DECREMENT reduce using rule 14 (identifier -> IDENTIFIER .)
INCREMENT reduce using rule 14 (identifier -> IDENTIFIER .)
PLUS reduce using rule 14 (identifier -> IDENTIFIER .)
TIMES reduce using rule 14 (identifier -> IDENTIFIER .)
DIVIDE reduce using rule 14 (identifier -> IDENTIFIER .)
TEST_EQ reduce using rule 14 (identifier -> IDENTIFIER .)
TEST_NEQ reduce using rule 14 (identifier -> IDENTIFIER .)
TEST_LT reduce using rule 14 (identifier -> IDENTIFIER .)
TEST_GT reduce using rule 14 (identifier -> IDENTIFIER .)
EQUALS reduce using rule 14 (identifier -> IDENTIFIER .)
GT reduce using rule 14 (identifier -> IDENTIFIER .)
GTE reduce using rule 14 (identifier -> IDENTIFIER .)
LT reduce using rule 14 (identifier -> IDENTIFIER .)
LTE reduce using rule 14 (identifier -> IDENTIFIER .)
$end reduce using rule 14 (identifier -> IDENTIFIER .)
DONE reduce using rule 14 (identifier -> IDENTIFIER .)
RPAREN reduce using rule 14 (identifier -> IDENTIFIER .)
RBRACKET reduce using rule 14 (identifier -> IDENTIFIER .)
DOUBLE_RPAREN reduce using rule 14 (identifier -> IDENTIFIER .)
DOUBLE_RBRACKET reduce using rule 14 (identifier -> IDENTIFIER .)
state 8
(2) instructions -> instruction . instructions
(3) instructions -> instruction .
(2) instructions -> . instruction instructions
(3) instructions -> . instruction
(4) instruction -> . identifier ASSIGNMENT expression
(5) instruction -> . identifier ASSIGNMENT double_paren_dollar_prefix_expression
(6) instruction -> . IF condition SEMICOLON THEN instructions SEMICOLON FI
(7) instruction -> . IF condition SEMICOLON THEN instructions SEMICOLON ELSE instructions SEMICOLON FI
(8) instruction -> . WHILE condition SEMICOLON DO instructions DONE
(9) instruction -> . ECHO expression
(10) instruction -> . BREAK
(11) instruction -> . CONTINUE
(13) instruction -> . DOUBLE_LPAREN expression DOUBLE_RPAREN
(41) instruction -> . command switch_list argument_list
(42) instruction -> . command argument_list
(43) instruction -> . command switch_list
(44) instruction -> . command
(14) identifier -> . IDENTIFIER
(45) command -> . identifier
DONE reduce using rule 3 (instructions -> instruction .)
SEMICOLON reduce using rule 3 (instructions -> instruction .)
$end reduce using rule 3 (instructions -> instruction .)
IF shift and go to state 6
WHILE shift and go to state 1
ECHO shift and go to state 5
BREAK shift and go to state 9
CONTINUE shift and go to state 10
DOUBLE_LPAREN shift and go to state 2
IDENTIFIER shift and go to state 7
instruction shift and go to state 8
command shift and go to state 11
identifier shift and go to state 12
instructions shift and go to state 27
state 9
(10) instruction -> BREAK .
IF reduce using rule 10 (instruction -> BREAK .)
WHILE reduce using rule 10 (instruction -> BREAK .)
ECHO reduce using rule 10 (instruction -> BREAK .)
BREAK reduce using rule 10 (instruction -> BREAK .)
CONTINUE reduce using rule 10 (instruction -> BREAK .)
DOUBLE_LPAREN reduce using rule 10 (instruction -> BREAK .)
IDENTIFIER reduce using rule 10 (instruction -> BREAK .)
$end reduce using rule 10 (instruction -> BREAK .)
SEMICOLON reduce using rule 10 (instruction -> BREAK .)
DONE reduce using rule 10 (instruction -> BREAK .)
state 10
(11) instruction -> CONTINUE .
IF reduce using rule 11 (instruction -> CONTINUE .)
WHILE reduce using rule 11 (instruction -> CONTINUE .)
ECHO reduce using rule 11 (instruction -> CONTINUE .)
BREAK reduce using rule 11 (instruction -> CONTINUE .)
CONTINUE reduce using rule 11 (instruction -> CONTINUE .)
DOUBLE_LPAREN reduce using rule 11 (instruction -> CONTINUE .)
IDENTIFIER reduce using rule 11 (instruction -> CONTINUE .)
$end reduce using rule 11 (instruction -> CONTINUE .)
SEMICOLON reduce using rule 11 (instruction -> CONTINUE .)
DONE reduce using rule 11 (instruction -> CONTINUE .)
state 11
(41) instruction -> command . switch_list argument_list
(42) instruction -> command . argument_list
(43) instruction -> command . switch_list
(44) instruction -> command .
(47) switch_list -> . switch switch_list
(48) switch_list -> . switch
(50) argument_list -> . argument argument_list
(51) argument_list -> . argument
(46) switch -> . MINUS identifier
(49) argument -> . const
(37) const -> . NUMBER
(38) const -> . STRING
(39) const -> . VARIABLE
(40) const -> . BOOLEAN
IF reduce using rule 44 (instruction -> command .)
WHILE reduce using rule 44 (instruction -> command .)
ECHO reduce using rule 44 (instruction -> command .)
BREAK reduce using rule 44 (instruction -> command .)
CONTINUE reduce using rule 44 (instruction -> command .)
DOUBLE_LPAREN reduce using rule 44 (instruction -> command .)
IDENTIFIER reduce using rule 44 (instruction -> command .)
$end reduce using rule 44 (instruction -> command .)
SEMICOLON reduce using rule 44 (instruction -> command .)
DONE reduce using rule 44 (instruction -> command .)
MINUS shift and go to state 33
NUMBER shift and go to state 13
STRING shift and go to state 15
VARIABLE shift and go to state 19
BOOLEAN shift and go to state 21
const shift and go to state 28
argument shift and go to state 29
switch shift and go to state 30
argument_list shift and go to state 31
switch_list shift and go to state 32
state 12
(4) instruction -> identifier . ASSIGNMENT expression
(5) instruction -> identifier . ASSIGNMENT double_paren_dollar_prefix_expression
(45) command -> identifier .
ASSIGNMENT shift and go to state 34
MINUS reduce using rule 45 (command -> identifier .)
NUMBER reduce using rule 45 (command -> identifier .)
STRING reduce using rule 45 (command -> identifier .)
VARIABLE reduce using rule 45 (command -> identifier .)
BOOLEAN reduce using rule 45 (command -> identifier .)
IF reduce using rule 45 (command -> identifier .)
WHILE reduce using rule 45 (command -> identifier .)
ECHO reduce using rule 45 (command -> identifier .)
BREAK reduce using rule 45 (command -> identifier .)
CONTINUE reduce using rule 45 (command -> identifier .)
DOUBLE_LPAREN reduce using rule 45 (command -> identifier .)
IDENTIFIER reduce using rule 45 (command -> identifier .)
SEMICOLON reduce using rule 45 (command -> identifier .)
$end reduce using rule 45 (command -> identifier .)
DONE reduce using rule 45 (command -> identifier .)
state 13
(37) const -> NUMBER .
PLUS reduce using rule 37 (const -> NUMBER .)
MINUS reduce using rule 37 (const -> NUMBER .)
TIMES reduce using rule 37 (const -> NUMBER .)
DIVIDE reduce using rule 37 (const -> NUMBER .)
TEST_EQ reduce using rule 37 (const -> NUMBER .)
TEST_NEQ reduce using rule 37 (const -> NUMBER .)
TEST_LT reduce using rule 37 (const -> NUMBER .)
TEST_GT reduce using rule 37 (const -> NUMBER .)
EQUALS reduce using rule 37 (const -> NUMBER .)
GT reduce using rule 37 (const -> NUMBER .)
GTE reduce using rule 37 (const -> NUMBER .)
LT reduce using rule 37 (const -> NUMBER .)
LTE reduce using rule 37 (const -> NUMBER .)
IF reduce using rule 37 (const -> NUMBER .)
WHILE reduce using rule 37 (const -> NUMBER .)
ECHO reduce using rule 37 (const -> NUMBER .)
BREAK reduce using rule 37 (const -> NUMBER .)
CONTINUE reduce using rule 37 (const -> NUMBER .)
DOUBLE_LPAREN reduce using rule 37 (const -> NUMBER .)
IDENTIFIER reduce using rule 37 (const -> NUMBER .)
$end reduce using rule 37 (const -> NUMBER .)
DONE reduce using rule 37 (const -> NUMBER .)
SEMICOLON reduce using rule 37 (const -> NUMBER .)
DOUBLE_RBRACKET reduce using rule 37 (const -> NUMBER .)
DOUBLE_RPAREN reduce using rule 37 (const -> NUMBER .)
RBRACKET reduce using rule 37 (const -> NUMBER .)
RPAREN reduce using rule 37 (const -> NUMBER .)
NUMBER reduce using rule 37 (const -> NUMBER .)
STRING reduce using rule 37 (const -> NUMBER .)
VARIABLE reduce using rule 37 (const -> NUMBER .)
BOOLEAN reduce using rule 37 (const -> NUMBER .)
state 14
(26) condition -> LBRACKET . expression RBRACKET
(27) expression -> . identifier
(28) expression -> . identifier DECREMENT
(29) expression -> . identifier INCREMENT
(30) expression -> . const
(31) expression -> . expression PLUS expression
(32) expression -> . expression MINUS expression
(33) expression -> . expression TIMES expression
(34) expression -> . expression DIVIDE expression
(35) expression -> . expression comparators expression
(36) expression -> . LPAREN expression RPAREN
(14) identifier -> . IDENTIFIER
(37) const -> . NUMBER
(38) const -> . STRING
(39) const -> . VARIABLE
(40) const -> . BOOLEAN
LPAREN shift and go to state 18
IDENTIFIER shift and go to state 7
NUMBER shift and go to state 13
STRING shift and go to state 15
VARIABLE shift and go to state 19
BOOLEAN shift and go to state 21
const shift and go to state 16
identifier shift and go to state 22
expression shift and go to state 35
state 15
(38) const -> STRING .
PLUS reduce using rule 38 (const -> STRING .)
MINUS reduce using rule 38 (const -> STRING .)
TIMES reduce using rule 38 (const -> STRING .)
DIVIDE reduce using rule 38 (const -> STRING .)
TEST_EQ reduce using rule 38 (const -> STRING .)
TEST_NEQ reduce using rule 38 (const -> STRING .)
TEST_LT reduce using rule 38 (const -> STRING .)
TEST_GT reduce using rule 38 (const -> STRING .)
EQUALS reduce using rule 38 (const -> STRING .)
GT reduce using rule 38 (const -> STRING .)
GTE reduce using rule 38 (const -> STRING .)
LT reduce using rule 38 (const -> STRING .)
LTE reduce using rule 38 (const -> STRING .)
IF reduce using rule 38 (const -> STRING .)
WHILE reduce using rule 38 (const -> STRING .)
ECHO reduce using rule 38 (const -> STRING .)
BREAK reduce using rule 38 (const -> STRING .)
CONTINUE reduce using rule 38 (const -> STRING .)
DOUBLE_LPAREN reduce using rule 38 (const -> STRING .)
IDENTIFIER reduce using rule 38 (const -> STRING .)
$end reduce using rule 38 (const -> STRING .)
DONE reduce using rule 38 (const -> STRING .)
SEMICOLON reduce using rule 38 (const -> STRING .)
DOUBLE_RBRACKET reduce using rule 38 (const -> STRING .)
DOUBLE_RPAREN reduce using rule 38 (const -> STRING .)
RBRACKET reduce using rule 38 (const -> STRING .)
RPAREN reduce using rule 38 (const -> STRING .)
NUMBER reduce using rule 38 (const -> STRING .)
STRING reduce using rule 38 (const -> STRING .)
VARIABLE reduce using rule 38 (const -> STRING .)
BOOLEAN reduce using rule 38 (const -> STRING .)
state 16
(30) expression -> const .
PLUS reduce using rule 30 (expression -> const .)
MINUS reduce using rule 30 (expression -> const .)
TIMES reduce using rule 30 (expression -> const .)
DIVIDE reduce using rule 30 (expression -> const .)
TEST_EQ reduce using rule 30 (expression -> const .)
TEST_NEQ reduce using rule 30 (expression -> const .)
TEST_LT reduce using rule 30 (expression -> const .)
TEST_GT reduce using rule 30 (expression -> const .)
EQUALS reduce using rule 30 (expression -> const .)
GT reduce using rule 30 (expression -> const .)
GTE reduce using rule 30 (expression -> const .)
LT reduce using rule 30 (expression -> const .)
LTE reduce using rule 30 (expression -> const .)
SEMICOLON reduce using rule 30 (expression -> const .)
DOUBLE_RPAREN reduce using rule 30 (expression -> const .)
IF reduce using rule 30 (expression -> const .)
WHILE reduce using rule 30 (expression -> const .)
ECHO reduce using rule 30 (expression -> const .)
BREAK reduce using rule 30 (expression -> const .)
CONTINUE reduce using rule 30 (expression -> const .)
DOUBLE_LPAREN reduce using rule 30 (expression -> const .)
IDENTIFIER reduce using rule 30 (expression -> const .)
$end reduce using rule 30 (expression -> const .)
DONE reduce using rule 30 (expression -> const .)
RBRACKET reduce using rule 30 (expression -> const .)
DOUBLE_RBRACKET reduce using rule 30 (expression -> const .)
RPAREN reduce using rule 30 (expression -> const .)
state 17
(25) condition -> DOUBLE_LBRACKET . expression DOUBLE_RBRACKET
(27) expression -> . identifier
(28) expression -> . identifier DECREMENT
(29) expression -> . identifier INCREMENT
(30) expression -> . const
(31) expression -> . expression PLUS expression
(32) expression -> . expression MINUS expression
(33) expression -> . expression TIMES expression
(34) expression -> . expression DIVIDE expression
(35) expression -> . expression comparators expression
(36) expression -> . LPAREN expression RPAREN
(14) identifier -> . IDENTIFIER
(37) const -> . NUMBER
(38) const -> . STRING
(39) const -> . VARIABLE
(40) const -> . BOOLEAN
LPAREN shift and go to state 18
IDENTIFIER shift and go to state 7
NUMBER shift and go to state 13
STRING shift and go to state 15
VARIABLE shift and go to state 19
BOOLEAN shift and go to state 21
const shift and go to state 16
identifier shift and go to state 22
expression shift and go to state 36
state 18
(36) expression -> LPAREN . expression RPAREN
(27) expression -> . identifier
(28) expression -> . identifier DECREMENT
(29) expression -> . identifier INCREMENT
(30) expression -> . const
(31) expression -> . expression PLUS expression
(32) expression -> . expression MINUS expression
(33) expression -> . expression TIMES expression
(34) expression -> . expression DIVIDE expression
(35) expression -> . expression comparators expression
(36) expression -> . LPAREN expression RPAREN
(14) identifier -> . IDENTIFIER
(37) const -> . NUMBER
(38) const -> . STRING
(39) const -> . VARIABLE
(40) const -> . BOOLEAN
LPAREN shift and go to state 18
IDENTIFIER shift and go to state 7
NUMBER shift and go to state 13
STRING shift and go to state 15
VARIABLE shift and go to state 19
BOOLEAN shift and go to state 21
const shift and go to state 16
identifier shift and go to state 22
expression shift and go to state 37
state 19
(39) const -> VARIABLE .
PLUS reduce using rule 39 (const -> VARIABLE .)
MINUS reduce using rule 39 (const -> VARIABLE .)
TIMES reduce using rule 39 (const -> VARIABLE .)
DIVIDE reduce using rule 39 (const -> VARIABLE .)
TEST_EQ reduce using rule 39 (const -> VARIABLE .)
TEST_NEQ reduce using rule 39 (const -> VARIABLE .)
TEST_LT reduce using rule 39 (const -> VARIABLE .)
TEST_GT reduce using rule 39 (const -> VARIABLE .)
EQUALS reduce using rule 39 (const -> VARIABLE .)
GT reduce using rule 39 (const -> VARIABLE .)
GTE reduce using rule 39 (const -> VARIABLE .)
LT reduce using rule 39 (const -> VARIABLE .)
LTE reduce using rule 39 (const -> VARIABLE .)
IF reduce using rule 39 (const -> VARIABLE .)
WHILE reduce using rule 39 (const -> VARIABLE .)
ECHO reduce using rule 39 (const -> VARIABLE .)
BREAK reduce using rule 39 (const -> VARIABLE .)
CONTINUE reduce using rule 39 (const -> VARIABLE .)
DOUBLE_LPAREN reduce using rule 39 (const -> VARIABLE .)
IDENTIFIER reduce using rule 39 (const -> VARIABLE .)
$end reduce using rule 39 (const -> VARIABLE .)
DONE reduce using rule 39 (const -> VARIABLE .)
SEMICOLON reduce using rule 39 (const -> VARIABLE .)
DOUBLE_RBRACKET reduce using rule 39 (const -> VARIABLE .)
DOUBLE_RPAREN reduce using rule 39 (const -> VARIABLE .)
RBRACKET reduce using rule 39 (const -> VARIABLE .)
RPAREN reduce using rule 39 (const -> VARIABLE .)
NUMBER reduce using rule 39 (const -> VARIABLE .)
STRING reduce using rule 39 (const -> VARIABLE .)
VARIABLE reduce using rule 39 (const -> VARIABLE .)
BOOLEAN reduce using rule 39 (const -> VARIABLE .)
state 20
(8) instruction -> WHILE condition . SEMICOLON DO instructions DONE
SEMICOLON shift and go to state 38
state 21
(40) const -> BOOLEAN .
PLUS reduce using rule 40 (const -> BOOLEAN .)
MINUS reduce using rule 40 (const -> BOOLEAN .)
TIMES reduce using rule 40 (const -> BOOLEAN .)
DIVIDE reduce using rule 40 (const -> BOOLEAN .)
TEST_EQ reduce using rule 40 (const -> BOOLEAN .)
TEST_NEQ reduce using rule 40 (const -> BOOLEAN .)
TEST_LT reduce using rule 40 (const -> BOOLEAN .)
TEST_GT reduce using rule 40 (const -> BOOLEAN .)
EQUALS reduce using rule 40 (const -> BOOLEAN .)
GT reduce using rule 40 (const -> BOOLEAN .)
GTE reduce using rule 40 (const -> BOOLEAN .)
LT reduce using rule 40 (const -> BOOLEAN .)
LTE reduce using rule 40 (const -> BOOLEAN .)
IF reduce using rule 40 (const -> BOOLEAN .)
WHILE reduce using rule 40 (const -> BOOLEAN .)
ECHO reduce using rule 40 (const -> BOOLEAN .)
BREAK reduce using rule 40 (const -> BOOLEAN .)
CONTINUE reduce using rule 40 (const -> BOOLEAN .)
DOUBLE_LPAREN reduce using rule 40 (const -> BOOLEAN .)
IDENTIFIER reduce using rule 40 (const -> BOOLEAN .)
$end reduce using rule 40 (const -> BOOLEAN .)
DONE reduce using rule 40 (const -> BOOLEAN .)
SEMICOLON reduce using rule 40 (const -> BOOLEAN .)
DOUBLE_RBRACKET reduce using rule 40 (const -> BOOLEAN .)
DOUBLE_RPAREN reduce using rule 40 (const -> BOOLEAN .)
RBRACKET reduce using rule 40 (const -> BOOLEAN .)
RPAREN reduce using rule 40 (const -> BOOLEAN .)
NUMBER reduce using rule 40 (const -> BOOLEAN .)
STRING reduce using rule 40 (const -> BOOLEAN .)
VARIABLE reduce using rule 40 (const -> BOOLEAN .)
BOOLEAN reduce using rule 40 (const -> BOOLEAN .)
state 22
(27) expression -> identifier .
(28) expression -> identifier . DECREMENT
(29) expression -> identifier . INCREMENT
PLUS reduce using rule 27 (expression -> identifier .)
MINUS reduce using rule 27 (expression -> identifier .)
TIMES reduce using rule 27 (expression -> identifier .)
DIVIDE reduce using rule 27 (expression -> identifier .)
TEST_EQ reduce using rule 27 (expression -> identifier .)
TEST_NEQ reduce using rule 27 (expression -> identifier .)
TEST_LT reduce using rule 27 (expression -> identifier .)
TEST_GT reduce using rule 27 (expression -> identifier .)
EQUALS reduce using rule 27 (expression -> identifier .)
GT reduce using rule 27 (expression -> identifier .)
GTE reduce using rule 27 (expression -> identifier .)
LT reduce using rule 27 (expression -> identifier .)
LTE reduce using rule 27 (expression -> identifier .)
SEMICOLON reduce using rule 27 (expression -> identifier .)
DOUBLE_RPAREN reduce using rule 27 (expression -> identifier .)
IF reduce using rule 27 (expression -> identifier .)
WHILE reduce using rule 27 (expression -> identifier .)
ECHO reduce using rule 27 (expression -> identifier .)
BREAK reduce using rule 27 (expression -> identifier .)
CONTINUE reduce using rule 27 (expression -> identifier .)
DOUBLE_LPAREN reduce using rule 27 (expression -> identifier .)
IDENTIFIER reduce using rule 27 (expression -> identifier .)
$end reduce using rule 27 (expression -> identifier .)
DONE reduce using rule 27 (expression -> identifier .)
RBRACKET reduce using rule 27 (expression -> identifier .)
DOUBLE_RBRACKET reduce using rule 27 (expression -> identifier .)
RPAREN reduce using rule 27 (expression -> identifier .)
DECREMENT shift and go to state 39
INCREMENT shift and go to state 40
state 23
(24) condition -> expression .
(31) expression -> expression . PLUS expression
(32) expression -> expression . MINUS expression
(33) expression -> expression . TIMES expression
(34) expression -> expression . DIVIDE expression
(35) expression -> expression . comparators expression
(15) comparators -> . TEST_EQ
(16) comparators -> . TEST_NEQ
(17) comparators -> . TEST_LT
(18) comparators -> . TEST_GT
(19) comparators -> . EQUALS
(20) comparators -> . GT
(21) comparators -> . GTE
(22) comparators -> . LT
(23) comparators -> . LTE
SEMICOLON reduce using rule 24 (condition -> expression .)
PLUS shift and go to state 48
MINUS shift and go to state 53
TIMES shift and go to state 46
DIVIDE shift and go to state 43
TEST_EQ shift and go to state 51
TEST_NEQ shift and go to state 41
TEST_LT shift and go to state 50
TEST_GT shift and go to state 44
EQUALS shift and go to state 45
GT shift and go to state 42
GTE shift and go to state 54
LT shift and go to state 47
LTE shift and go to state 49
comparators shift and go to state 52
state 24
(13) instruction -> DOUBLE_LPAREN expression . DOUBLE_RPAREN
(31) expression -> expression . PLUS expression
(32) expression -> expression . MINUS expression
(33) expression -> expression . TIMES expression
(34) expression -> expression . DIVIDE expression
(35) expression -> expression . comparators expression
(15) comparators -> . TEST_EQ
(16) comparators -> . TEST_NEQ
(17) comparators -> . TEST_LT
(18) comparators -> . TEST_GT
(19) comparators -> . EQUALS
(20) comparators -> . GT
(21) comparators -> . GTE
(22) comparators -> . LT
(23) comparators -> . LTE
DOUBLE_RPAREN shift and go to state 55
PLUS shift and go to state 48
MINUS shift and go to state 53
TIMES shift and go to state 46
DIVIDE shift and go to state 43
TEST_EQ shift and go to state 51
TEST_NEQ shift and go to state 41
TEST_LT shift and go to state 50
TEST_GT shift and go to state 44
EQUALS shift and go to state 45
GT shift and go to state 42
GTE shift and go to state 54
LT shift and go to state 47
LTE shift and go to state 49
comparators shift and go to state 52
state 25
(9) instruction -> ECHO expression .
(31) expression -> expression . PLUS expression
(32) expression -> expression . MINUS expression
(33) expression -> expression . TIMES expression
(34) expression -> expression . DIVIDE expression
(35) expression -> expression . comparators expression
(15) comparators -> . TEST_EQ
(16) comparators -> . TEST_NEQ
(17) comparators -> . TEST_LT
(18) comparators -> . TEST_GT
(19) comparators -> . EQUALS
(20) comparators -> . GT
(21) comparators -> . GTE
(22) comparators -> . LT
(23) comparators -> . LTE
IF reduce using rule 9 (instruction -> ECHO expression .)
WHILE reduce using rule 9 (instruction -> ECHO expression .)
ECHO reduce using rule 9 (instruction -> ECHO expression .)
BREAK reduce using rule 9 (instruction -> ECHO expression .)
CONTINUE reduce using rule 9 (instruction -> ECHO expression .)
DOUBLE_LPAREN reduce using rule 9 (instruction -> ECHO expression .)
IDENTIFIER reduce using rule 9 (instruction -> ECHO expression .)
$end reduce using rule 9 (instruction -> ECHO expression .)
SEMICOLON reduce using rule 9 (instruction -> ECHO expression .)
DONE reduce using rule 9 (instruction -> ECHO expression .)
PLUS shift and go to state 48
MINUS shift and go to state 53
TIMES shift and go to state 46
DIVIDE shift and go to state 43
TEST_EQ shift and go to state 51
TEST_NEQ shift and go to state 41
TEST_LT shift and go to state 50
TEST_GT shift and go to state 44
EQUALS shift and go to state 45
GT shift and go to state 42
GTE shift and go to state 54
LT shift and go to state 47
LTE shift and go to state 49
comparators shift and go to state 52
state 26
(6) instruction -> IF condition . SEMICOLON THEN instructions SEMICOLON FI
(7) instruction -> IF condition . SEMICOLON THEN instructions SEMICOLON ELSE instructions SEMICOLON FI
SEMICOLON shift and go to state 56
state 27
(2) instructions -> instruction instructions .
DONE reduce using rule 2 (instructions -> instruction instructions .)
SEMICOLON reduce using rule 2 (instructions -> instruction instructions .)
$end reduce using rule 2 (instructions -> instruction instructions .)
state 28
(49) argument -> const .
NUMBER reduce using rule 49 (argument -> const .)
STRING reduce using rule 49 (argument -> const .)
VARIABLE reduce using rule 49 (argument -> const .)
BOOLEAN reduce using rule 49 (argument -> const .)
IF reduce using rule 49 (argument -> const .)
WHILE reduce using rule 49 (argument -> const .)
ECHO reduce using rule 49 (argument -> const .)
BREAK reduce using rule 49 (argument -> const .)
CONTINUE reduce using rule 49 (argument -> const .)
DOUBLE_LPAREN reduce using rule 49 (argument -> const .)
IDENTIFIER reduce using rule 49 (argument -> const .)
$end reduce using rule 49 (argument -> const .)
DONE reduce using rule 49 (argument -> const .)
SEMICOLON reduce using rule 49 (argument -> const .)
state 29
(50) argument_list -> argument . argument_list
(51) argument_list -> argument .
(50) argument_list -> . argument argument_list
(51) argument_list -> . argument
(49) argument -> . const
(37) const -> . NUMBER
(38) const -> . STRING
(39) const -> . VARIABLE
(40) const -> . BOOLEAN
IF reduce using rule 51 (argument_list -> argument .)
WHILE reduce using rule 51 (argument_list -> argument .)
ECHO reduce using rule 51 (argument_list -> argument .)
BREAK reduce using rule 51 (argument_list -> argument .)
CONTINUE reduce using rule 51 (argument_list -> argument .)
DOUBLE_LPAREN reduce using rule 51 (argument_list -> argument .)
IDENTIFIER reduce using rule 51 (argument_list -> argument .)
$end reduce using rule 51 (argument_list -> argument .)
DONE reduce using rule 51 (argument_list -> argument .)
SEMICOLON reduce using rule 51 (argument_list -> argument .)
NUMBER shift and go to state 13
STRING shift and go to state 15
VARIABLE shift and go to state 19
BOOLEAN shift and go to state 21
const shift and go to state 28
argument shift and go to state 29
argument_list shift and go to state 57
state 30