-
Notifications
You must be signed in to change notification settings - Fork 3
/
parser.out
8680 lines (7150 loc) · 347 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.2 (http://www.dabeaz.com/ply)
Grammar
Rule 0 S' -> file
Rule 1 file -> decls
Rule 2 empty -> <empty>
Rule 3 decls -> declsx
Rule 4 declsx -> decl declsx
Rule 5 declsx -> empty
Rule 6 decl -> PROTOCOL STRING SEMI
Rule 7 decl -> INCLUDE STRING SEMI
Rule 8 decl -> MACHINE ( idents ) : params { decls }
Rule 9 decl -> MACHINE ( idents pairs ) : params { decls }
Rule 10 decl -> ACTION ( ident pairs ) statements
Rule 11 decl -> IN_PORT ( ident , type , var pairs ) statements
Rule 12 decl -> OUT_PORT ( ident , type , var pairs ) SEMI
Rule 13 decl -> TRANS ( idents , idents , ident pairs ) idents
Rule 14 decl -> TRANS ( idents , idents pairs ) idents
Rule 15 decl -> TRANS ( idents , idents , ident pairs ) idents idents
Rule 16 decl -> TRANS ( idents , idents pairs ) idents idents
Rule 17 decl -> EXTERN_TYPE ( type pairs ) SEMI
Rule 18 decl -> GLOBAL ( type pairs ) { type_members }
Rule 19 decl -> STRUCT ( type pairs ) { type_members }
Rule 20 decl -> ENUM ( type pairs ) { type_enums }
Rule 21 decl -> STATE_DECL ( type pairs ) { type_states }
Rule 22 decl -> type ident pairs SEMI
Rule 23 decl -> func_decl
Rule 24 func_decl -> void ident ( params ) pairs SEMI
Rule 25 func_decl -> type ident ( params ) pairs SEMI
Rule 26 decl -> func_def
Rule 27 func_def -> void ident ( params ) pairs statements
Rule 28 func_def -> type ident ( params ) pairs statements
Rule 29 type_members -> type_member type_members
Rule 30 type_members -> empty
Rule 31 type_member -> type_or_void ident ( types ) pairs SEMI
Rule 32 type_member -> type_or_void ident ( params ) pairs statements
Rule 33 type_member -> type_or_void ident pairs SEMI
Rule 34 type_member -> type_or_void ident ASSIGN expr SEMI
Rule 35 type_enums -> type_enum type_enums
Rule 36 type_enums -> empty
Rule 37 type_enum -> ident pairs SEMI
Rule 38 type_states -> type_state type_states
Rule 39 type_states -> empty
Rule 40 type_state -> ident , enumeration pairs SEMI
Rule 41 types -> type , types
Rule 42 types -> type
Rule 43 types -> empty
Rule 44 typestr -> typestr DOUBLE_COLON ident
Rule 45 typestr -> ident
Rule 46 type -> typestr
Rule 47 void -> VOID
Rule 48 type_or_void -> type
Rule 49 type_or_void -> void
Rule 50 params -> param , params
Rule 51 params -> param
Rule 52 params -> empty
Rule 53 param -> type ident
Rule 54 param -> type STAR ident
Rule 55 param -> type STAR ident = STRING
Rule 56 param -> type ident = NUMBER
Rule 57 param -> type ident = LIT_BOOL
Rule 58 param -> type ident = STRING
Rule 59 idents -> { identx }
Rule 60 idents -> ident
Rule 61 identx -> ident SEMI identx
Rule 62 identx -> ident , identx
Rule 63 identx -> ident identx
Rule 64 identx -> empty
Rule 65 ident -> IDENT
Rule 66 pairs -> , pairsx
Rule 67 pairs -> empty
Rule 68 pairsx -> pair , pairsx
Rule 69 pairsx -> pair
Rule 70 pair -> ident = STRING
Rule 71 pair -> ident = ident
Rule 72 pair -> ident = NUMBER
Rule 73 pair -> STRING
Rule 74 statements -> { statements_inner }
Rule 75 statements -> { }
Rule 76 statements_inner -> statement statements_inner
Rule 77 statements_inner -> statement
Rule 78 exprs -> expr , exprs
Rule 79 exprs -> expr
Rule 80 exprs -> empty
Rule 81 statement -> expr SEMI
Rule 82 statement -> expr ASSIGN expr SEMI
Rule 83 statement -> ENQUEUE ( var , type pairs ) statements
Rule 84 statement -> STALL_AND_WAIT ( var , var ) SEMI
Rule 85 statement -> PEEK ( var , type pairs ) statements
Rule 86 statement -> COPY_HEAD ( var , var pairs ) SEMI
Rule 87 statement -> CHECK_ALLOCATE ( var ) SEMI
Rule 88 statement -> CHECK_STOP_SLOTS ( var , STRING , STRING ) SEMI
Rule 89 aexpr -> STATIC_CAST ( type , expr )
Rule 90 aexpr -> STATIC_CAST ( type , STRING , expr )
Rule 91 statement -> RETURN expr SEMI
Rule 92 statement -> if_statement
Rule 93 if_statement -> IF ( expr ) statements
Rule 94 if_statement -> IF ( expr ) statements ELSE statements
Rule 95 if_statement -> IF ( expr ) statements ELSE if_statement
Rule 96 aexpr -> var
Rule 97 aexpr -> type ident
Rule 98 aexpr -> literal
Rule 99 aexpr -> enumeration
Rule 100 aexpr -> ident ( exprs )
Rule 101 aexpr -> NEW type
Rule 102 aexpr -> OOD
Rule 103 aexpr -> aexpr DOT ident
Rule 104 aexpr -> aexpr DOT ident ( exprs )
Rule 105 aexpr -> aexpr [ exprs ]
Rule 106 aexpr -> type DOUBLE_COLON ident ( exprs )
Rule 107 expr -> aexpr
Rule 108 expr -> expr STAR expr
Rule 109 expr -> expr SLASH expr
Rule 110 expr -> expr PLUS expr
Rule 111 expr -> expr DASH expr
Rule 112 expr -> expr LT expr
Rule 113 expr -> expr GT expr
Rule 114 expr -> expr LE expr
Rule 115 expr -> expr GE expr
Rule 116 expr -> expr EQ expr
Rule 117 expr -> expr NE expr
Rule 118 expr -> expr AND expr
Rule 119 expr -> expr OR expr
Rule 120 expr -> expr RIGHTSHIFT expr
Rule 121 expr -> expr LEFTSHIFT expr
Rule 122 expr -> NOT expr
Rule 123 expr -> INCR expr
Rule 124 expr -> DECR expr
Rule 125 expr -> DASH expr
Rule 126 aexpr -> ( expr )
Rule 127 aexpr -> IS_VALID ( var )
Rule 128 aexpr -> IS_INVALID ( var )
Rule 129 literal -> STRING
Rule 130 literal -> NUMBER
Rule 131 literal -> FLOATNUMBER
Rule 132 literal -> LIT_BOOL
Rule 133 enumeration -> ident : ident
Rule 134 var -> ident
Terminals, with rules where they appear
( : 8 9 10 11 12 13 14 15 16 17 18 19 20 21 24 25 27 28 31 32 83 84 85 86 87 88 89 90 93 94 95 100 104 106 126 127 128
) : 8 9 10 11 12 13 14 15 16 17 18 19 20 21 24 25 27 28 31 32 83 84 85 86 87 88 89 90 93 94 95 100 104 106 126 127 128
, : 11 11 12 12 13 13 14 15 15 16 40 41 50 62 66 68 78 83 84 85 86 88 88 89 90 90
: : 8 9 133
= : 55 56 57 58 70 71 72
ACTION : 10
AND : 118
ASSIGN : 34 82
CHECK_ALLOCATE : 87
CHECK_STOP_SLOTS : 88
COPY_HEAD : 86
DASH : 111 125
DECR : 124
DOT : 103 104
DOUBLE_COLON : 44 106
ELSE : 94 95
ENQUEUE : 83
ENUM : 20
EQ : 116
EXTERN_TYPE : 17
FLOATNUMBER : 131
GE : 115
GLOBAL : 18
GT : 113
IDENT : 65
IF : 93 94 95
INCLUDE : 7
INCR : 123
IN_PORT : 11
IS_INVALID : 128
IS_VALID : 127
LE : 114
LEFTSHIFT : 121
LIT_BOOL : 57 132
LT : 112
MACHINE : 8 9
NE : 117
NEW : 101
NOT : 122
NUMBER : 56 72 130
OOD : 102
OR : 119
OUT_PORT : 12
PEEK : 85
PLUS : 110
PROTOCOL : 6
RETURN : 91
RIGHTSHIFT : 120
SEMI : 6 7 12 17 22 24 25 31 33 34 37 40 61 81 82 84 86 87 88 91
SLASH : 109
STALL_AND_WAIT : 84
STAR : 54 55 108
STATE_DECL : 21
STATIC_CAST : 89 90
STRING : 6 7 55 58 70 73 88 88 90 129
STRUCT : 19
TRANS : 13 14 15 16
VOID : 47
[ : 105
] : 105
error :
{ : 8 9 18 19 20 21 59 74 75
} : 8 9 18 19 20 21 59 74 75
Nonterminals, with rules where they appear
aexpr : 103 104 105 107
decl : 4
decls : 1 8 9
declsx : 3 4
empty : 5 30 36 39 43 52 64 67 80
enumeration : 40 99
expr : 34 78 79 81 82 82 89 90 91 93 94 95 108 108 109 109 110 110 111 111 112 112 113 113 114 114 115 115 116 116 117 117 118 118 119 119 120 120 121 121 122 123 124 125 126
exprs : 78 100 104 105 106
file : 0
func_decl : 23
func_def : 26
ident : 10 11 12 13 15 22 24 25 27 28 31 32 33 34 37 40 44 45 53 54 55 56 57 58 60 61 62 63 70 71 71 72 97 100 103 104 106 133 133 134
idents : 8 9 13 13 13 14 14 14 15 15 15 15 16 16 16 16
identx : 59 61 62 63
if_statement : 92 95
literal : 98
pair : 68 69
pairs : 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 27 28 31 32 33 37 40 83 85 86
pairsx : 66 68
param : 50 51
params : 8 9 24 25 27 28 32 50
statement : 76 77
statements : 10 11 27 28 32 83 85 93 94 94 95
statements_inner : 74 76
type : 11 12 17 18 19 20 21 22 25 28 41 42 48 53 54 55 56 57 58 83 85 89 90 97 101 106
type_enum : 35
type_enums : 20 35
type_member : 29
type_members : 18 19 29
type_or_void : 31 32 33 34
type_state : 38
type_states : 21 38
types : 31 41
typestr : 44 46
var : 11 12 83 84 84 85 86 86 87 88 96 127 128
void : 24 27 49
Parsing method: LALR
state 0
(0) S' -> . file
(1) file -> . decls
(3) decls -> . declsx
(4) declsx -> . decl declsx
(5) declsx -> . empty
(6) decl -> . PROTOCOL STRING SEMI
(7) decl -> . INCLUDE STRING SEMI
(8) decl -> . MACHINE ( idents ) : params { decls }
(9) decl -> . MACHINE ( idents pairs ) : params { decls }
(10) decl -> . ACTION ( ident pairs ) statements
(11) decl -> . IN_PORT ( ident , type , var pairs ) statements
(12) decl -> . OUT_PORT ( ident , type , var pairs ) SEMI
(13) decl -> . TRANS ( idents , idents , ident pairs ) idents
(14) decl -> . TRANS ( idents , idents pairs ) idents
(15) decl -> . TRANS ( idents , idents , ident pairs ) idents idents
(16) decl -> . TRANS ( idents , idents pairs ) idents idents
(17) decl -> . EXTERN_TYPE ( type pairs ) SEMI
(18) decl -> . GLOBAL ( type pairs ) { type_members }
(19) decl -> . STRUCT ( type pairs ) { type_members }
(20) decl -> . ENUM ( type pairs ) { type_enums }
(21) decl -> . STATE_DECL ( type pairs ) { type_states }
(22) decl -> . type ident pairs SEMI
(23) decl -> . func_decl
(26) decl -> . func_def
(2) empty -> .
(46) type -> . typestr
(24) func_decl -> . void ident ( params ) pairs SEMI
(25) func_decl -> . type ident ( params ) pairs SEMI
(27) func_def -> . void ident ( params ) pairs statements
(28) func_def -> . type ident ( params ) pairs statements
(44) typestr -> . typestr DOUBLE_COLON ident
(45) typestr -> . ident
(47) void -> . VOID
(65) ident -> . IDENT
PROTOCOL shift and go to state 13
INCLUDE shift and go to state 20
MACHINE shift and go to state 17
ACTION shift and go to state 9
IN_PORT shift and go to state 25
OUT_PORT shift and go to state 8
TRANS shift and go to state 7
EXTERN_TYPE shift and go to state 18
GLOBAL shift and go to state 3
STRUCT shift and go to state 22
ENUM shift and go to state 16
STATE_DECL shift and go to state 23
$end reduce using rule 2 (empty -> .)
VOID shift and go to state 2
IDENT shift and go to state 4
decl shift and go to state 1
declsx shift and go to state 12
func_def shift and go to state 14
void shift and go to state 15
ident shift and go to state 21
file shift and go to state 5
func_decl shift and go to state 6
decls shift and go to state 24
type shift and go to state 10
typestr shift and go to state 19
empty shift and go to state 11
state 1
(4) declsx -> decl . declsx
(4) declsx -> . decl declsx
(5) declsx -> . empty
(6) decl -> . PROTOCOL STRING SEMI
(7) decl -> . INCLUDE STRING SEMI
(8) decl -> . MACHINE ( idents ) : params { decls }
(9) decl -> . MACHINE ( idents pairs ) : params { decls }
(10) decl -> . ACTION ( ident pairs ) statements
(11) decl -> . IN_PORT ( ident , type , var pairs ) statements
(12) decl -> . OUT_PORT ( ident , type , var pairs ) SEMI
(13) decl -> . TRANS ( idents , idents , ident pairs ) idents
(14) decl -> . TRANS ( idents , idents pairs ) idents
(15) decl -> . TRANS ( idents , idents , ident pairs ) idents idents
(16) decl -> . TRANS ( idents , idents pairs ) idents idents
(17) decl -> . EXTERN_TYPE ( type pairs ) SEMI
(18) decl -> . GLOBAL ( type pairs ) { type_members }
(19) decl -> . STRUCT ( type pairs ) { type_members }
(20) decl -> . ENUM ( type pairs ) { type_enums }
(21) decl -> . STATE_DECL ( type pairs ) { type_states }
(22) decl -> . type ident pairs SEMI
(23) decl -> . func_decl
(26) decl -> . func_def
(2) empty -> .
(46) type -> . typestr
(24) func_decl -> . void ident ( params ) pairs SEMI
(25) func_decl -> . type ident ( params ) pairs SEMI
(27) func_def -> . void ident ( params ) pairs statements
(28) func_def -> . type ident ( params ) pairs statements
(44) typestr -> . typestr DOUBLE_COLON ident
(45) typestr -> . ident
(47) void -> . VOID
(65) ident -> . IDENT
PROTOCOL shift and go to state 13
INCLUDE shift and go to state 20
MACHINE shift and go to state 17
ACTION shift and go to state 9
IN_PORT shift and go to state 25
OUT_PORT shift and go to state 8
TRANS shift and go to state 7
EXTERN_TYPE shift and go to state 18
GLOBAL shift and go to state 3
STRUCT shift and go to state 22
ENUM shift and go to state 16
STATE_DECL shift and go to state 23
$end reduce using rule 2 (empty -> .)
} reduce using rule 2 (empty -> .)
VOID shift and go to state 2
IDENT shift and go to state 4
decl shift and go to state 1
declsx shift and go to state 26
func_def shift and go to state 14
void shift and go to state 15
ident shift and go to state 21
func_decl shift and go to state 6
type shift and go to state 10
typestr shift and go to state 19
empty shift and go to state 11
state 2
(47) void -> VOID .
IDENT reduce using rule 47 (void -> VOID .)
state 3
(18) decl -> GLOBAL . ( type pairs ) { type_members }
( shift and go to state 27
state 4
(65) ident -> IDENT .
PROTOCOL reduce using rule 65 (ident -> IDENT .)
INCLUDE reduce using rule 65 (ident -> IDENT .)
MACHINE reduce using rule 65 (ident -> IDENT .)
ACTION reduce using rule 65 (ident -> IDENT .)
IN_PORT reduce using rule 65 (ident -> IDENT .)
OUT_PORT reduce using rule 65 (ident -> IDENT .)
TRANS reduce using rule 65 (ident -> IDENT .)
EXTERN_TYPE reduce using rule 65 (ident -> IDENT .)
GLOBAL reduce using rule 65 (ident -> IDENT .)
STRUCT reduce using rule 65 (ident -> IDENT .)
ENUM reduce using rule 65 (ident -> IDENT .)
STATE_DECL reduce using rule 65 (ident -> IDENT .)
VOID reduce using rule 65 (ident -> IDENT .)
IDENT reduce using rule 65 (ident -> IDENT .)
$end reduce using rule 65 (ident -> IDENT .)
} reduce using rule 65 (ident -> IDENT .)
, reduce using rule 65 (ident -> IDENT .)
SEMI reduce using rule 65 (ident -> IDENT .)
) reduce using rule 65 (ident -> IDENT .)
{ reduce using rule 65 (ident -> IDENT .)
DOUBLE_COLON reduce using rule 65 (ident -> IDENT .)
STAR reduce using rule 65 (ident -> IDENT .)
( reduce using rule 65 (ident -> IDENT .)
: reduce using rule 65 (ident -> IDENT .)
DOT reduce using rule 65 (ident -> IDENT .)
[ reduce using rule 65 (ident -> IDENT .)
SLASH reduce using rule 65 (ident -> IDENT .)
PLUS reduce using rule 65 (ident -> IDENT .)
DASH reduce using rule 65 (ident -> IDENT .)
LT reduce using rule 65 (ident -> IDENT .)
GT reduce using rule 65 (ident -> IDENT .)
LE reduce using rule 65 (ident -> IDENT .)
GE reduce using rule 65 (ident -> IDENT .)
EQ reduce using rule 65 (ident -> IDENT .)
NE reduce using rule 65 (ident -> IDENT .)
AND reduce using rule 65 (ident -> IDENT .)
OR reduce using rule 65 (ident -> IDENT .)
RIGHTSHIFT reduce using rule 65 (ident -> IDENT .)
LEFTSHIFT reduce using rule 65 (ident -> IDENT .)
ASSIGN reduce using rule 65 (ident -> IDENT .)
] reduce using rule 65 (ident -> IDENT .)
= reduce using rule 65 (ident -> IDENT .)
state 5
(0) S' -> file .
state 6
(23) decl -> func_decl .
PROTOCOL reduce using rule 23 (decl -> func_decl .)
INCLUDE reduce using rule 23 (decl -> func_decl .)
MACHINE reduce using rule 23 (decl -> func_decl .)
ACTION reduce using rule 23 (decl -> func_decl .)
IN_PORT reduce using rule 23 (decl -> func_decl .)
OUT_PORT reduce using rule 23 (decl -> func_decl .)
TRANS reduce using rule 23 (decl -> func_decl .)
EXTERN_TYPE reduce using rule 23 (decl -> func_decl .)
GLOBAL reduce using rule 23 (decl -> func_decl .)
STRUCT reduce using rule 23 (decl -> func_decl .)
ENUM reduce using rule 23 (decl -> func_decl .)
STATE_DECL reduce using rule 23 (decl -> func_decl .)
VOID reduce using rule 23 (decl -> func_decl .)
IDENT reduce using rule 23 (decl -> func_decl .)
} reduce using rule 23 (decl -> func_decl .)
$end reduce using rule 23 (decl -> func_decl .)
state 7
(13) decl -> TRANS . ( idents , idents , ident pairs ) idents
(14) decl -> TRANS . ( idents , idents pairs ) idents
(15) decl -> TRANS . ( idents , idents , ident pairs ) idents idents
(16) decl -> TRANS . ( idents , idents pairs ) idents idents
( shift and go to state 28
state 8
(12) decl -> OUT_PORT . ( ident , type , var pairs ) SEMI
( shift and go to state 29
state 9
(10) decl -> ACTION . ( ident pairs ) statements
( shift and go to state 30
state 10
(22) decl -> type . ident pairs SEMI
(25) func_decl -> type . ident ( params ) pairs SEMI
(28) func_def -> type . ident ( params ) pairs statements
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 31
state 11
(5) declsx -> empty .
$end reduce using rule 5 (declsx -> empty .)
} reduce using rule 5 (declsx -> empty .)
state 12
(3) decls -> declsx .
} reduce using rule 3 (decls -> declsx .)
$end reduce using rule 3 (decls -> declsx .)
state 13
(6) decl -> PROTOCOL . STRING SEMI
STRING shift and go to state 32
state 14
(26) decl -> func_def .
PROTOCOL reduce using rule 26 (decl -> func_def .)
INCLUDE reduce using rule 26 (decl -> func_def .)
MACHINE reduce using rule 26 (decl -> func_def .)
ACTION reduce using rule 26 (decl -> func_def .)
IN_PORT reduce using rule 26 (decl -> func_def .)
OUT_PORT reduce using rule 26 (decl -> func_def .)
TRANS reduce using rule 26 (decl -> func_def .)
EXTERN_TYPE reduce using rule 26 (decl -> func_def .)
GLOBAL reduce using rule 26 (decl -> func_def .)
STRUCT reduce using rule 26 (decl -> func_def .)
ENUM reduce using rule 26 (decl -> func_def .)
STATE_DECL reduce using rule 26 (decl -> func_def .)
VOID reduce using rule 26 (decl -> func_def .)
IDENT reduce using rule 26 (decl -> func_def .)
} reduce using rule 26 (decl -> func_def .)
$end reduce using rule 26 (decl -> func_def .)
state 15
(24) func_decl -> void . ident ( params ) pairs SEMI
(27) func_def -> void . ident ( params ) pairs statements
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 33
state 16
(20) decl -> ENUM . ( type pairs ) { type_enums }
( shift and go to state 34
state 17
(8) decl -> MACHINE . ( idents ) : params { decls }
(9) decl -> MACHINE . ( idents pairs ) : params { decls }
( shift and go to state 35
state 18
(17) decl -> EXTERN_TYPE . ( type pairs ) SEMI
( shift and go to state 36
state 19
(46) type -> typestr .
(44) typestr -> typestr . DOUBLE_COLON ident
! shift/reduce conflict for DOUBLE_COLON resolved as shift
IDENT reduce using rule 46 (type -> typestr .)
DOT reduce using rule 46 (type -> typestr .)
[ reduce using rule 46 (type -> typestr .)
SEMI reduce using rule 46 (type -> typestr .)
ASSIGN reduce using rule 46 (type -> typestr .)
STAR reduce using rule 46 (type -> typestr .)
SLASH reduce using rule 46 (type -> typestr .)
PLUS reduce using rule 46 (type -> typestr .)
DASH reduce using rule 46 (type -> typestr .)
LT reduce using rule 46 (type -> typestr .)
GT reduce using rule 46 (type -> typestr .)
LE reduce using rule 46 (type -> typestr .)
GE reduce using rule 46 (type -> typestr .)
EQ reduce using rule 46 (type -> typestr .)
NE reduce using rule 46 (type -> typestr .)
AND reduce using rule 46 (type -> typestr .)
OR reduce using rule 46 (type -> typestr .)
RIGHTSHIFT reduce using rule 46 (type -> typestr .)
LEFTSHIFT reduce using rule 46 (type -> typestr .)
) reduce using rule 46 (type -> typestr .)
, reduce using rule 46 (type -> typestr .)
] reduce using rule 46 (type -> typestr .)
DOUBLE_COLON shift and go to state 37
! DOUBLE_COLON [ reduce using rule 46 (type -> typestr .) ]
state 20
(7) decl -> INCLUDE . STRING SEMI
STRING shift and go to state 38
state 21
(45) typestr -> ident .
DOUBLE_COLON reduce using rule 45 (typestr -> ident .)
STAR reduce using rule 45 (typestr -> ident .)
IDENT reduce using rule 45 (typestr -> ident .)
, reduce using rule 45 (typestr -> ident .)
) reduce using rule 45 (typestr -> ident .)
DOT reduce using rule 45 (typestr -> ident .)
[ reduce using rule 45 (typestr -> ident .)
SEMI reduce using rule 45 (typestr -> ident .)
ASSIGN reduce using rule 45 (typestr -> ident .)
SLASH reduce using rule 45 (typestr -> ident .)
PLUS reduce using rule 45 (typestr -> ident .)
DASH reduce using rule 45 (typestr -> ident .)
LT reduce using rule 45 (typestr -> ident .)
GT reduce using rule 45 (typestr -> ident .)
LE reduce using rule 45 (typestr -> ident .)
GE reduce using rule 45 (typestr -> ident .)
EQ reduce using rule 45 (typestr -> ident .)
NE reduce using rule 45 (typestr -> ident .)
AND reduce using rule 45 (typestr -> ident .)
OR reduce using rule 45 (typestr -> ident .)
RIGHTSHIFT reduce using rule 45 (typestr -> ident .)
LEFTSHIFT reduce using rule 45 (typestr -> ident .)
] reduce using rule 45 (typestr -> ident .)
state 22
(19) decl -> STRUCT . ( type pairs ) { type_members }
( shift and go to state 39
state 23
(21) decl -> STATE_DECL . ( type pairs ) { type_states }
( shift and go to state 40
state 24
(1) file -> decls .
$end reduce using rule 1 (file -> decls .)
state 25
(11) decl -> IN_PORT . ( ident , type , var pairs ) statements
( shift and go to state 41
state 26
(4) declsx -> decl declsx .
$end reduce using rule 4 (declsx -> decl declsx .)
} reduce using rule 4 (declsx -> decl declsx .)
state 27
(18) decl -> GLOBAL ( . type pairs ) { type_members }
(46) type -> . typestr
(44) typestr -> . typestr DOUBLE_COLON ident
(45) typestr -> . ident
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 21
type shift and go to state 42
typestr shift and go to state 19
state 28
(13) decl -> TRANS ( . idents , idents , ident pairs ) idents
(14) decl -> TRANS ( . idents , idents pairs ) idents
(15) decl -> TRANS ( . idents , idents , ident pairs ) idents idents
(16) decl -> TRANS ( . idents , idents pairs ) idents idents
(59) idents -> . { identx }
(60) idents -> . ident
(65) ident -> . IDENT
{ shift and go to state 45
IDENT shift and go to state 4
ident shift and go to state 43
idents shift and go to state 44
state 29
(12) decl -> OUT_PORT ( . ident , type , var pairs ) SEMI
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 46
state 30
(10) decl -> ACTION ( . ident pairs ) statements
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 47
state 31
(22) decl -> type ident . pairs SEMI
(25) func_decl -> type ident . ( params ) pairs SEMI
(28) func_def -> type ident . ( params ) pairs statements
(66) pairs -> . , pairsx
(67) pairs -> . empty
(2) empty -> .
( shift and go to state 49
, shift and go to state 50
SEMI reduce using rule 2 (empty -> .)
pairs shift and go to state 48
empty shift and go to state 51
state 32
(6) decl -> PROTOCOL STRING . SEMI
SEMI shift and go to state 52
state 33
(24) func_decl -> void ident . ( params ) pairs SEMI
(27) func_def -> void ident . ( params ) pairs statements
( shift and go to state 53
state 34
(20) decl -> ENUM ( . type pairs ) { type_enums }
(46) type -> . typestr
(44) typestr -> . typestr DOUBLE_COLON ident
(45) typestr -> . ident
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 21
type shift and go to state 54
typestr shift and go to state 19
state 35
(8) decl -> MACHINE ( . idents ) : params { decls }
(9) decl -> MACHINE ( . idents pairs ) : params { decls }
(59) idents -> . { identx }
(60) idents -> . ident
(65) ident -> . IDENT
{ shift and go to state 45
IDENT shift and go to state 4
ident shift and go to state 43
idents shift and go to state 55
state 36
(17) decl -> EXTERN_TYPE ( . type pairs ) SEMI
(46) type -> . typestr
(44) typestr -> . typestr DOUBLE_COLON ident
(45) typestr -> . ident
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 21
type shift and go to state 56
typestr shift and go to state 19
state 37
(44) typestr -> typestr DOUBLE_COLON . ident
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 57
state 38
(7) decl -> INCLUDE STRING . SEMI
SEMI shift and go to state 58
state 39
(19) decl -> STRUCT ( . type pairs ) { type_members }
(46) type -> . typestr
(44) typestr -> . typestr DOUBLE_COLON ident
(45) typestr -> . ident
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 21
type shift and go to state 59
typestr shift and go to state 19
state 40
(21) decl -> STATE_DECL ( . type pairs ) { type_states }
(46) type -> . typestr
(44) typestr -> . typestr DOUBLE_COLON ident
(45) typestr -> . ident
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 21
type shift and go to state 60
typestr shift and go to state 19
state 41
(11) decl -> IN_PORT ( . ident , type , var pairs ) statements
(65) ident -> . IDENT
IDENT shift and go to state 4
ident shift and go to state 61
state 42
(18) decl -> GLOBAL ( type . pairs ) { type_members }
(66) pairs -> . , pairsx
(67) pairs -> . empty
(2) empty -> .
, shift and go to state 50
) reduce using rule 2 (empty -> .)
pairs shift and go to state 62
empty shift and go to state 51
state 43
(60) idents -> ident .
{ reduce using rule 60 (idents -> ident .)
IDENT reduce using rule 60 (idents -> ident .)
PROTOCOL reduce using rule 60 (idents -> ident .)
INCLUDE reduce using rule 60 (idents -> ident .)
MACHINE reduce using rule 60 (idents -> ident .)
ACTION reduce using rule 60 (idents -> ident .)
IN_PORT reduce using rule 60 (idents -> ident .)
OUT_PORT reduce using rule 60 (idents -> ident .)
TRANS reduce using rule 60 (idents -> ident .)
EXTERN_TYPE reduce using rule 60 (idents -> ident .)
GLOBAL reduce using rule 60 (idents -> ident .)
STRUCT reduce using rule 60 (idents -> ident .)
ENUM reduce using rule 60 (idents -> ident .)
STATE_DECL reduce using rule 60 (idents -> ident .)
VOID reduce using rule 60 (idents -> ident .)
$end reduce using rule 60 (idents -> ident .)
} reduce using rule 60 (idents -> ident .)
, reduce using rule 60 (idents -> ident .)
) reduce using rule 60 (idents -> ident .)
state 44
(13) decl -> TRANS ( idents . , idents , ident pairs ) idents
(14) decl -> TRANS ( idents . , idents pairs ) idents
(15) decl -> TRANS ( idents . , idents , ident pairs ) idents idents
(16) decl -> TRANS ( idents . , idents pairs ) idents idents
, shift and go to state 63
state 45
(59) idents -> { . identx }
(61) identx -> . ident SEMI identx
(62) identx -> . ident , identx
(63) identx -> . ident identx
(64) identx -> . empty
(65) ident -> . IDENT
(2) empty -> .
IDENT shift and go to state 4
} reduce using rule 2 (empty -> .)
ident shift and go to state 64
identx shift and go to state 65
empty shift and go to state 66
state 46
(12) decl -> OUT_PORT ( ident . , type , var pairs ) SEMI
, shift and go to state 67
state 47
(10) decl -> ACTION ( ident . pairs ) statements
(66) pairs -> . , pairsx
(67) pairs -> . empty
(2) empty -> .
, shift and go to state 50
) reduce using rule 2 (empty -> .)
pairs shift and go to state 68
empty shift and go to state 51
state 48
(22) decl -> type ident pairs . SEMI
SEMI shift and go to state 69
state 49
(25) func_decl -> type ident ( . params ) pairs SEMI
(28) func_def -> type ident ( . params ) pairs statements
(50) params -> . param , params
(51) params -> . param
(52) params -> . empty
(53) param -> . type ident
(54) param -> . type STAR ident
(55) param -> . type STAR ident = STRING
(56) param -> . type ident = NUMBER
(57) param -> . type ident = LIT_BOOL
(58) param -> . type ident = STRING
(2) empty -> .
(46) type -> . typestr
(44) typestr -> . typestr DOUBLE_COLON ident
(45) typestr -> . ident
(65) ident -> . IDENT
) reduce using rule 2 (empty -> .)
IDENT shift and go to state 4
ident shift and go to state 21
param shift and go to state 70
params shift and go to state 71
typestr shift and go to state 19
type shift and go to state 72
empty shift and go to state 73
state 50
(66) pairs -> , . pairsx
(68) pairsx -> . pair , pairsx
(69) pairsx -> . pair
(70) pair -> . ident = STRING
(71) pair -> . ident = ident
(72) pair -> . ident = NUMBER
(73) pair -> . STRING
(65) ident -> . IDENT
STRING shift and go to state 75
IDENT shift and go to state 4
pair shift and go to state 77
ident shift and go to state 74
pairsx shift and go to state 76
state 51
(67) pairs -> empty .
) reduce using rule 67 (pairs -> empty .)
SEMI reduce using rule 67 (pairs -> empty .)