-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinput1.txt
323 lines (279 loc) · 8.77 KB
/
input1.txt
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
START lalr_state [0]: {
[$START ::= (*) StartState EOF , {EOF }]
[StartState ::= (*) START States , {EOF }]
}
transition on START to state [2]
transition on StartState to state [1]
-------------------
lalr_state [1]: {
[$START ::= StartState (*) EOF , {EOF }]
}
transition on EOF to state [43]
-------------------
lalr_state [2]: {
[State ::= (*) LALRWRD LSQ SNUM RSQ COLON LCUR Items RCUR SEP , {EOF LALRWRD }]
[States ::= (*) State States , {EOF }]
[State ::= (*) LALRWRD LSQ SNUM RSQ COLON LCUR Items RCUR Trans SEP , {EOF LALRWRD }]
[States ::= (*) State , {EOF }]
[StartState ::= START (*) States , {EOF }]
}
transition on LALRWRD to state [5]
transition on State to state [4]
transition on States to state [3]
-------------------
lalr_state [3]: {
[StartState ::= START States (*) , {EOF }]
}
-------------------
lalr_state [4]: {
[State ::= (*) LALRWRD LSQ SNUM RSQ COLON LCUR Items RCUR SEP , {EOF LALRWRD }]
[States ::= State (*) States , {EOF }]
[States ::= (*) State States , {EOF }]
[State ::= (*) LALRWRD LSQ SNUM RSQ COLON LCUR Items RCUR Trans SEP , {EOF LALRWRD }]
[States ::= State (*) , {EOF }]
[States ::= (*) State , {EOF }]
}
transition on LALRWRD to state [5]
transition on State to state [4]
transition on States to state [42]
-------------------
lalr_state [5]: {
[State ::= LALRWRD (*) LSQ SNUM RSQ COLON LCUR Items RCUR SEP , {EOF LALRWRD }]
[State ::= LALRWRD (*) LSQ SNUM RSQ COLON LCUR Items RCUR Trans SEP , {EOF LALRWRD }]
}
transition on LSQ to state [6]
-------------------
lalr_state [6]: {
[State ::= LALRWRD LSQ (*) SNUM RSQ COLON LCUR Items RCUR Trans SEP , {EOF LALRWRD }]
[State ::= LALRWRD LSQ (*) SNUM RSQ COLON LCUR Items RCUR SEP , {EOF LALRWRD }]
}
transition on SNUM to state [7]
-------------------
lalr_state [7]: {
[State ::= LALRWRD LSQ SNUM (*) RSQ COLON LCUR Items RCUR Trans SEP , {EOF LALRWRD }]
[State ::= LALRWRD LSQ SNUM (*) RSQ COLON LCUR Items RCUR SEP , {EOF LALRWRD }]
}
transition on RSQ to state [8]
-------------------
lalr_state [8]: {
[State ::= LALRWRD LSQ SNUM RSQ (*) COLON LCUR Items RCUR Trans SEP , {EOF LALRWRD }]
[State ::= LALRWRD LSQ SNUM RSQ (*) COLON LCUR Items RCUR SEP , {EOF LALRWRD }]
}
transition on COLON to state [9]
-------------------
lalr_state [9]: {
[State ::= LALRWRD LSQ SNUM RSQ COLON (*) LCUR Items RCUR Trans SEP , {EOF LALRWRD }]
[State ::= LALRWRD LSQ SNUM RSQ COLON (*) LCUR Items RCUR SEP , {EOF LALRWRD }]
}
transition on LCUR to state [10]
-------------------
lalr_state [10]: {
[Item ::= (*) LSQ ID DERSYM SentForm COMMA LCUR Ids RCUR RSQ , {LSQ RCUR }]
[Items ::= (*) Item , {RCUR }]
[State ::= LALRWRD LSQ SNUM RSQ COLON LCUR (*) Items RCUR SEP , {EOF LALRWRD }]
[Items ::= (*) Item Items , {RCUR }]
[State ::= LALRWRD LSQ SNUM RSQ COLON LCUR (*) Items RCUR Trans SEP , {EOF LALRWRD }]
}
transition on Items to state [13]
transition on Item to state [12]
transition on LSQ to state [11]
-------------------
lalr_state [11]: {
[Item ::= LSQ (*) ID DERSYM SentForm COMMA LCUR Ids RCUR RSQ , {LSQ RCUR }]
}
transition on ID to state [27]
-------------------
lalr_state [12]: {
[Item ::= (*) LSQ ID DERSYM SentForm COMMA LCUR Ids RCUR RSQ , {LSQ RCUR }]
[Items ::= Item (*) , {RCUR }]
[Items ::= (*) Item , {RCUR }]
[Items ::= Item (*) Items , {RCUR }]
[Items ::= (*) Item Items , {RCUR }]
}
transition on Items to state [26]
transition on Item to state [12]
transition on LSQ to state [11]
-------------------
lalr_state [13]: {
[State ::= LALRWRD LSQ SNUM RSQ COLON LCUR Items (*) RCUR SEP , {EOF LALRWRD }]
[State ::= LALRWRD LSQ SNUM RSQ COLON LCUR Items (*) RCUR Trans SEP , {EOF LALRWRD }]
}
transition on RCUR to state [14]
-------------------
lalr_state [14]: {
[Trans ::= (*) Tran , {SEP }]
[State ::= LALRWRD LSQ SNUM RSQ COLON LCUR Items RCUR (*) SEP , {EOF LALRWRD }]
[Trans ::= (*) Tran Trans , {SEP }]
[Tran ::= (*) TRANWRD ID STATEWRD LSQ SNUM RSQ , {TRANWRD SEP }]
[State ::= LALRWRD LSQ SNUM RSQ COLON LCUR Items RCUR (*) Trans SEP , {EOF LALRWRD }]
}
transition on Trans to state [18]
transition on TRANWRD to state [17]
transition on Tran to state [16]
transition on SEP to state [15]
-------------------
lalr_state [15]: {
[State ::= LALRWRD LSQ SNUM RSQ COLON LCUR Items RCUR SEP (*) , {EOF LALRWRD }]
}
-------------------
lalr_state [16]: {
[Trans ::= Tran (*) , {SEP }]
[Trans ::= (*) Tran , {SEP }]
[Trans ::= Tran (*) Trans , {SEP }]
[Trans ::= (*) Tran Trans , {SEP }]
[Tran ::= (*) TRANWRD ID STATEWRD LSQ SNUM RSQ , {TRANWRD SEP }]
}
transition on Trans to state [25]
transition on TRANWRD to state [17]
transition on Tran to state [16]
-------------------
lalr_state [17]: {
[Tran ::= TRANWRD (*) ID STATEWRD LSQ SNUM RSQ , {TRANWRD SEP }]
}
transition on ID to state [20]
-------------------
lalr_state [18]: {
[State ::= LALRWRD LSQ SNUM RSQ COLON LCUR Items RCUR Trans (*) SEP , {EOF LALRWRD }]
}
transition on SEP to state [19]
-------------------
lalr_state [19]: {
[State ::= LALRWRD LSQ SNUM RSQ COLON LCUR Items RCUR Trans SEP (*) , {EOF LALRWRD }]
}
-------------------
lalr_state [20]: {
[Tran ::= TRANWRD ID (*) STATEWRD LSQ SNUM RSQ , {TRANWRD SEP }]
}
transition on STATEWRD to state [21]
-------------------
lalr_state [21]: {
[Tran ::= TRANWRD ID STATEWRD (*) LSQ SNUM RSQ , {TRANWRD SEP }]
}
transition on LSQ to state [22]
-------------------
lalr_state [22]: {
[Tran ::= TRANWRD ID STATEWRD LSQ (*) SNUM RSQ , {TRANWRD SEP }]
}
transition on SNUM to state [23]
-------------------
lalr_state [23]: {
[Tran ::= TRANWRD ID STATEWRD LSQ SNUM (*) RSQ , {TRANWRD SEP }]
}
transition on RSQ to state [24]
-------------------
lalr_state [24]: {
[Tran ::= TRANWRD ID STATEWRD LSQ SNUM RSQ (*) , {TRANWRD SEP }]
}
-------------------
lalr_state [25]: {
[Trans ::= Tran Trans (*) , {SEP }]
}
-------------------
lalr_state [26]: {
[Items ::= Item Items (*) , {RCUR }]
}
-------------------
lalr_state [27]: {
[Item ::= LSQ ID (*) DERSYM SentForm COMMA LCUR Ids RCUR RSQ , {LSQ RCUR }]
}
transition on DERSYM to state [28]
-------------------
lalr_state [28]: {
[Ids ::= (*) ID Ids , {DOTSYM }]
[SentForm ::= (*) Ids DOTSYM , {COMMA }]
[SentForm ::= (*) DOTSYM , {COMMA }]
[SentForm ::= (*) DOTSYM Ids , {COMMA }]
[Item ::= LSQ ID DERSYM (*) SentForm COMMA LCUR Ids RCUR RSQ , {LSQ RCUR }]
[Ids ::= (*) ID , {DOTSYM }]
[SentForm ::= (*) Ids DOTSYM Ids , {COMMA }]
}
transition on DOTSYM to state [32]
transition on SentForm to state [31]
transition on Ids to state [30]
transition on ID to state [29]
-------------------
lalr_state [29]: {
[Ids ::= ID (*) Ids , {RCUR COMMA DOTSYM }]
[Ids ::= (*) ID Ids , {RCUR COMMA DOTSYM }]
[Ids ::= ID (*) , {RCUR COMMA DOTSYM }]
[Ids ::= (*) ID , {RCUR COMMA DOTSYM }]
}
transition on Ids to state [41]
transition on ID to state [29]
-------------------
lalr_state [30]: {
[SentForm ::= Ids (*) DOTSYM , {COMMA }]
[SentForm ::= Ids (*) DOTSYM Ids , {COMMA }]
}
transition on DOTSYM to state [39]
-------------------
lalr_state [31]: {
[Item ::= LSQ ID DERSYM SentForm (*) COMMA LCUR Ids RCUR RSQ , {LSQ RCUR }]
}
transition on COMMA to state [34]
-------------------
lalr_state [32]: {
[Ids ::= (*) ID Ids , {COMMA }]
[SentForm ::= DOTSYM (*) , {COMMA }]
[SentForm ::= DOTSYM (*) Ids , {COMMA }]
[Ids ::= (*) ID , {COMMA }]
}
transition on Ids to state [33]
transition on ID to state [29]
-------------------
lalr_state [33]: {
[SentForm ::= DOTSYM Ids (*) , {COMMA }]
}
-------------------
lalr_state [34]: {
[Item ::= LSQ ID DERSYM SentForm COMMA (*) LCUR Ids RCUR RSQ , {LSQ RCUR }]
}
transition on LCUR to state [35]
-------------------
lalr_state [35]: {
[Ids ::= (*) ID Ids , {RCUR }]
[Item ::= LSQ ID DERSYM SentForm COMMA LCUR (*) Ids RCUR RSQ , {LSQ RCUR }]
[Ids ::= (*) ID , {RCUR }]
}
transition on Ids to state [36]
transition on ID to state [29]
-------------------
lalr_state [36]: {
[Item ::= LSQ ID DERSYM SentForm COMMA LCUR Ids (*) RCUR RSQ , {LSQ RCUR }]
}
transition on RCUR to state [37]
-------------------
lalr_state [37]: {
[Item ::= LSQ ID DERSYM SentForm COMMA LCUR Ids RCUR (*) RSQ , {LSQ RCUR }]
}
transition on RSQ to state [38]
-------------------
lalr_state [38]: {
[Item ::= LSQ ID DERSYM SentForm COMMA LCUR Ids RCUR RSQ (*) , {LSQ RCUR }]
}
-------------------
lalr_state [39]: {
[SentForm ::= Ids DOTSYM (*) , {COMMA }]
[Ids ::= (*) ID Ids , {COMMA }]
[SentForm ::= Ids DOTSYM (*) Ids , {COMMA }]
[Ids ::= (*) ID , {COMMA }]
}
transition on Ids to state [40]
transition on ID to state [29]
-------------------
lalr_state [40]: {
[SentForm ::= Ids DOTSYM Ids (*) , {COMMA }]
}
-------------------
lalr_state [41]: {
[Ids ::= ID Ids (*) , {RCUR COMMA DOTSYM }]
}
-------------------
lalr_state [42]: {
[States ::= State States (*) , {EOF }]
}
-------------------
lalr_state [43]: {
[$START ::= StartState EOF (*) , {EOF }]
}
-------------------