-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest2_lexer_output.txt
371 lines (371 loc) · 6.99 KB
/
test2_lexer_output.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
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
1 KEYWORD class
1 IDENTIFIER test
1 LBRACE {
2 VARIABLE TYPE char
2 IDENTIFIER ch
2 ASSIGNMENT OPERATOR =
2 SINGLE CHARACTER 'c'
2 TERMINATING SYMBOL ;
3 VARIABLE TYPE int
3 IDENTIFIER cl
3 ASSIGNMENT OPERATOR =
3 IDENTIFIER a
3 ARITHMETIC OPERATOR +
3 IDENTIFIER b
3 TERMINATING SYMBOL ;
4 VARIABLE TYPE int
4 IDENTIFIER main
4 LPAREN (
4 VARIABLE TYPE int
4 IDENTIFIER num1
4 COMMA ,
4 VARIABLE TYPE String
4 IDENTIFIER str
4 RPAREN )
4 LBRACE {
5 VARIABLE TYPE int
5 IDENTIFIER _aa_a
5 ASSIGNMENT OPERATOR =
5 SIGNED INTEGER -1
5 TERMINATING SYMBOL ;
6 VARIABLE TYPE char
6 IDENTIFIER b_b123
6 ASSIGNMENT OPERATOR =
6 SINGLE CHARACTER 'c'
6 TERMINATING SYMBOL ;
7 VARIABLE TYPE boolean
7 IDENTIFIER __cc
7 ASSIGNMENT OPERATOR =
7 BOOLEAN STRING true
7 TERMINATING SYMBOL ;
8 VARIABLE TYPE String
8 IDENTIFIER d__d_0
8 ASSIGNMENT OPERATOR =
8 LITERAL STRING "Hello World"
8 TERMINATING SYMBOL ;
9 VARIABLE TYPE char
9 IDENTIFIER _123if
9 ASSIGNMENT OPERATOR =
9 SINGLE CHARACTER ' '
9 TERMINATING SYMBOL ;
10 VARIABLE TYPE int
10 IDENTIFIER _123if0
10 ASSIGNMENT OPERATOR =
10 SIGNED INTEGER -1
10 ARITHMETIC OPERATOR -
10 SIGNED INTEGER 0
10 TERMINATING SYMBOL ;
12 KEYWORD if
12 LPAREN (
12 BOOLEAN STRING true
12 RPAREN )
12 LBRACE {
13 IDENTIFIER _aa_a
13 ASSIGNMENT OPERATOR =
13 SIGNED INTEGER 3923
13 ARITHMETIC OPERATOR +
13 SIGNED INTEGER 41
13 ARITHMETIC OPERATOR -
13 SIGNED INTEGER -1
13 ARITHMETIC OPERATOR -
13 SIGNED INTEGER -1
13 ARITHMETIC OPERATOR -
13 SIGNED INTEGER 1
13 ARITHMETIC OPERATOR -
13 SIGNED INTEGER 1
13 TERMINATING SYMBOL ;
14 RBRACE }
14 KEYWORD else
14 LBRACE {
15 KEYWORD while
15 LPAREN (
15 BOOLEAN STRING true
15 RPAREN )
15 LBRACE {
16 IDENTIFIER _aa_a
16 ASSIGNMENT OPERATOR =
16 IDENTIFIER _aa_a
16 ARITHMETIC OPERATOR +
16 SIGNED INTEGER 1
16 TERMINATING SYMBOL ;
17 RBRACE }
18 IDENTIFIER b_b123
18 ASSIGNMENT OPERATOR =
18 SINGLE CHARACTER '3'
18 TERMINATING SYMBOL ;
19 RBRACE }
21 KEYWORD return
21 SIGNED INTEGER 0
21 TERMINATING SYMBOL ;
22 RBRACE }
24 VARIABLE TYPE int
24 IDENTIFIER function
24 LPAREN (
24 VARIABLE TYPE int
24 IDENTIFIER num
24 RPAREN )
24 LBRACE {
25 VARIABLE TYPE int
25 IDENTIFIER a
25 ASSIGNMENT OPERATOR =
25 SIGNED INTEGER 3
25 TERMINATING SYMBOL ;
26 VARIABLE TYPE int
26 IDENTIFIER b
26 ASSIGNMENT OPERATOR =
26 SIGNED INTEGER 4
26 TERMINATING SYMBOL ;
27 IDENTIFIER num
27 ASSIGNMENT OPERATOR =
27 IDENTIFIER a
27 ARITHMETIC OPERATOR +
27 IDENTIFIER b
27 TERMINATING SYMBOL ;
28 KEYWORD return
28 IDENTIFIER num
28 TERMINATING SYMBOL ;
30 RBRACE }
31 KEYWORD class
31 IDENTIFIER test2
31 LBRACE {
32 VARIABLE TYPE int
32 IDENTIFIER temp
32 LPAREN (
32 VARIABLE TYPE int
32 IDENTIFIER num1
32 COMMA ,
32 VARIABLE TYPE String
32 IDENTIFIER str
32 RPAREN )
32 LBRACE {
33 VARIABLE TYPE int
33 IDENTIFIER t
33 ASSIGNMENT OPERATOR =
33 SIGNED INTEGER -1
33 TERMINATING SYMBOL ;
34 VARIABLE TYPE char
34 IDENTIFIER b_b123
34 ASSIGNMENT OPERATOR =
34 SINGLE CHARACTER 'c'
34 TERMINATING SYMBOL ;
35 VARIABLE TYPE boolean
35 IDENTIFIER __cc
35 ASSIGNMENT OPERATOR =
35 BOOLEAN STRING true
35 TERMINATING SYMBOL ;
36 VARIABLE TYPE String
36 IDENTIFIER d__d_0
36 ASSIGNMENT OPERATOR =
36 LITERAL STRING "Hello World"
36 TERMINATING SYMBOL ;
37 VARIABLE TYPE char
37 IDENTIFIER _123if
37 ASSIGNMENT OPERATOR =
37 SINGLE CHARACTER ' '
37 TERMINATING SYMBOL ;
38 VARIABLE TYPE int
38 IDENTIFIER _123if0
38 ASSIGNMENT OPERATOR =
38 SIGNED INTEGER -1
38 ARITHMETIC OPERATOR -
38 SIGNED INTEGER 0
38 TERMINATING SYMBOL ;
40 KEYWORD if
40 LPAREN (
40 BOOLEAN STRING true
40 RPAREN )
40 LBRACE {
41 IDENTIFIER t
41 ASSIGNMENT OPERATOR =
41 SIGNED INTEGER 3923
41 ARITHMETIC OPERATOR +
41 SIGNED INTEGER 41
41 ARITHMETIC OPERATOR -
41 SIGNED INTEGER -1
41 ARITHMETIC OPERATOR -
41 SIGNED INTEGER -1
41 ARITHMETIC OPERATOR -
41 SIGNED INTEGER 1
41 ARITHMETIC OPERATOR -
41 SIGNED INTEGER 1
41 TERMINATING SYMBOL ;
42 KEYWORD if
42 LPAREN (
42 BOOLEAN STRING true
42 RPAREN )
42 LBRACE {
44 RBRACE }
44 KEYWORD else
44 LBRACE {
45 VARIABLE TYPE int
45 IDENTIFIER d
45 ASSIGNMENT OPERATOR =
45 SIGNED INTEGER 5
45 TERMINATING SYMBOL ;
46 RBRACE }
47 RBRACE }
47 KEYWORD else
47 LBRACE {
47 RBRACE }
47 KEYWORD if
47 LPAREN (
47 BOOLEAN STRING true
47 RPAREN )
47 LBRACE {
48 IDENTIFIER b_b123
48 ASSIGNMENT OPERATOR =
48 SINGLE CHARACTER '3'
48 TERMINATING SYMBOL ;
49 RBRACE }
49 KEYWORD else
49 LBRACE {
50 IDENTIFIER __cc
50 ASSIGNMENT OPERATOR =
50 BOOLEAN STRING false
50 TERMINATING SYMBOL ;
51 RBRACE }
52 KEYWORD return
52 SIGNED INTEGER 0
52 TERMINATING SYMBOL ;
53 RBRACE }
55 VARIABLE TYPE int
55 IDENTIFIER function1
55 LPAREN (
55 VARIABLE TYPE int
55 IDENTIFIER num
55 RPAREN )
55 LBRACE {
56 VARIABLE TYPE int
56 IDENTIFIER a
56 ASSIGNMENT OPERATOR =
56 SIGNED INTEGER 3
56 TERMINATING SYMBOL ;
57 VARIABLE TYPE int
57 IDENTIFIER b
57 ASSIGNMENT OPERATOR =
57 SIGNED INTEGER 4
57 TERMINATING SYMBOL ;
58 IDENTIFIER num
58 ASSIGNMENT OPERATOR =
58 LPAREN (
58 LPAREN (
58 IDENTIFIER a
58 ARITHMETIC OPERATOR +
58 IDENTIFIER b
58 RPAREN )
58 ARITHMETIC OPERATOR *
58 LPAREN (
58 IDENTIFIER a
58 ARITHMETIC OPERATOR -
58 IDENTIFIER b
58 RPAREN )
58 RPAREN )
58 ARITHMETIC OPERATOR +
58 IDENTIFIER b
58 TERMINATING SYMBOL ;
59 IDENTIFIER b
59 ASSIGNMENT OPERATOR =
59 IDENTIFIER b
59 ARITHMETIC OPERATOR *
59 LPAREN (
59 IDENTIFIER a
59 ARITHMETIC OPERATOR +
59 IDENTIFIER b
59 RPAREN )
59 TERMINATING SYMBOL ;
60 KEYWORD while
60 LPAREN (
60 BOOLEAN STRING true
60 COMPARISON OPERATOR !=
60 BOOLEAN STRING false
60 RPAREN )
60 LBRACE {
61 IDENTIFIER a
61 ASSIGNMENT OPERATOR =
61 IDENTIFIER a
61 ARITHMETIC OPERATOR +
61 SIGNED INTEGER 1
61 TERMINATING SYMBOL ;
62 KEYWORD while
62 LPAREN (
62 BOOLEAN STRING true
62 RPAREN )
62 LBRACE {
63 VARIABLE TYPE int
63 IDENTIFIER c
63 ASSIGNMENT OPERATOR =
63 SIGNED INTEGER 2
63 TERMINATING SYMBOL ;
64 RBRACE }
65 RBRACE }
66 VARIABLE TYPE String
66 IDENTIFIER str1
66 ASSIGNMENT OPERATOR =
66 LITERAL STRING "STR"
66 TERMINATING SYMBOL ;
67 KEYWORD return
67 IDENTIFIER num
67 ARITHMETIC OPERATOR +
67 IDENTIFIER a
67 ARITHMETIC OPERATOR *
67 IDENTIFIER b
67 TERMINATING SYMBOL ;
68 RBRACE }
70 VARIABLE TYPE String
70 IDENTIFIER function2
70 LPAREN (
70 VARIABLE TYPE String
70 IDENTIFIER str
70 COMMA ,
70 VARIABLE TYPE String
70 IDENTIFIER str1
70 COMMA ,
70 VARIABLE TYPE String
70 IDENTIFIER str2
70 COMMA ,
70 VARIABLE TYPE int
70 IDENTIFIER num1
70 COMMA ,
70 VARIABLE TYPE int
70 IDENTIFIER num2
70 COMMA ,
70 VARIABLE TYPE int
70 IDENTIFIER num3
70 RPAREN )
70 LBRACE {
71 KEYWORD return
71 IDENTIFIER str
71 TERMINATING SYMBOL ;
72 RBRACE }
74 VARIABLE TYPE int
74 IDENTIFIER function3
74 LPAREN (
74 RPAREN )
74 LBRACE {
75 KEYWORD return
75 SIGNED INTEGER 0
75 ARITHMETIC OPERATOR +
75 SIGNED INTEGER 1
75 ARITHMETIC OPERATOR *
75 SIGNED INTEGER -1
75 TERMINATING SYMBOL ;
76 RBRACE }
77 RBRACE }
78 KEYWORD class
78 IDENTIFIER test3
78 LBRACE {
79 VARIABLE TYPE int
79 IDENTIFIER function4
79 LPAREN (
79 RPAREN )
79 LBRACE {
80 KEYWORD return
80 SIGNED INTEGER 0
80 TERMINATING SYMBOL ;
81 RBRACE }
82 VARIABLE TYPE int
82 IDENTIFIER num
82 ASSIGNMENT OPERATOR =
82 SIGNED INTEGER -1231
82 TERMINATING SYMBOL ;
83 RBRACE }