-
Notifications
You must be signed in to change notification settings - Fork 0
/
out.txt
326 lines (326 loc) · 13 KB
/
out.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
declare 1 DECLARE ---- moduleDeclaration yes ----
---- ---- ---- ---- moduleDeclarations no moduleDeclaration
module 1 MODULE ---- moduleDeclaration yes ----
compute 1 ID ---- moduleDeclaration yes ----
; 1 SEMICOL ---- moduleDeclaration yes ----
---- ---- ---- ---- program no moduleDeclarations
---- ---- e ---- moduleDeclarations yes ----
---- ---- ---- ---- moduleDeclarations no moduleDeclarations
---- ---- ---- ---- ROOT no program
---- ---- e ---- otherModules yes ----
---- ---- ---- ---- program no otherModules
<<< 2 DRIVERDEF ---- driverModule yes ----
---- ---- ---- ---- program no driverModule
driver 2 DRIVER ---- driverModule yes ----
program 2 PROGRAM ---- driverModule yes ----
>>> 2 DRIVERENDDEF ---- driverModule yes ----
start 3 START ---- moduleDef yes ----
---- ---- ---- ---- driverModule no moduleDef
declare 4 DECLARE ---- declareStmt yes ----
---- ---- ---- ---- statement no declareStmt
var_1_ 4 ID ---- idList yes ----
---- ---- ---- ---- declareStmt no idList
, 4 COMMA ---- idList2 yes ----
---- ---- ---- ---- idList no idList2
var_2_ 4 ID ---- idList2 yes ----
, 4 COMMA ---- idList2 yes ----
---- ---- ---- ---- idList2 no idList2
var_3_ 4 ID ---- idList2 yes ----
---- ---- e ---- idList2 yes ----
---- ---- ---- ---- idList2 no idList2
: 4 COLON ---- declareStmt yes ----
integer 4 INTEGER ---- dataType yes ----
---- ---- ---- ---- declareStmt no dataType
; 4 SEMICOL ---- declareStmt yes ----
---- ---- ---- ---- statements no statement
---- ---- ---- ---- moduleDef no statements
declare 5 DECLARE ---- declareStmt yes ----
---- ---- ---- ---- statement no declareStmt
R1_abc 5 ID ---- idList yes ----
---- ---- ---- ---- declareStmt no idList
---- ---- e ---- idList2 yes ----
---- ---- ---- ---- idList no idList2
: 5 COLON ---- declareStmt yes ----
boolean 5 BOOLEAN ---- dataType yes ----
---- ---- ---- ---- declareStmt no dataType
; 5 SEMICOL ---- declareStmt yes ----
---- ---- ---- ---- statements no statement
---- ---- ---- ---- statements no statements
declare 6 DECLARE ---- declareStmt yes ----
---- ---- ---- ---- statement no declareStmt
r2_ABC 6 ID ---- idList yes ----
---- ---- ---- ---- declareStmt no idList
---- ---- e ---- idList2 yes ----
---- ---- ---- ---- idList no idList2
: 6 COLON ---- declareStmt yes ----
integer 6 INTEGER ---- dataType yes ----
---- ---- ---- ---- declareStmt no dataType
; 6 SEMICOL ---- declareStmt yes ----
---- ---- ---- ---- statements no statement
---- ---- ---- ---- statements no statements
declare 7 DECLARE ---- declareStmt yes ----
---- ---- ---- ---- statement no declareStmt
R3_abc 7 ID ---- idList yes ----
---- ---- ---- ---- declareStmt no idList
---- ---- e ---- idList2 yes ----
---- ---- ---- ---- idList no idList2
: 7 COLON ---- declareStmt yes ----
real 7 REAL ---- dataType yes ----
---- ---- ---- ---- declareStmt no dataType
; 7 SEMICOL ---- declareStmt yes ----
---- ---- ---- ---- statements no statement
---- ---- ---- ---- statements no statements
get_value 8 GET_VALUE ---- ioStmt yes ----
---- ---- ---- ---- statement no ioStmt
( 8 BO ---- ioStmt yes ----
var_1_ 8 ID ---- ioStmt yes ----
) 8 BC ---- ioStmt yes ----
; 8 SEMICOL ---- ioStmt yes ----
---- ---- ---- ---- statements no statement
---- ---- ---- ---- statements no statements
var_2_ 9 ID ---- assignmentStmt yes ----
---- ---- ---- ---- simpleStmt no assignmentStmt
:= 9 ASSIGNOP ---- lvalueIDStmt yes ----
---- ---- ---- ---- whichStmt no lvalueIDStmt
10 9 NUM 10 var yes ----
---- ---- ---- ---- factor no var
---- ---- ---- ---- term no factor
---- ---- ---- ---- arithmeticExpr no term
---- ---- e ---- term2 yes ----
---- ---- ---- ---- term no term2
---- ---- ---- ---- anyTerm no arithmeticExpr
---- ---- e ---- arithmeticExpr2 yes ----
---- ---- ---- ---- arithmeticExpr no arithmeticExpr2
---- ---- ---- ---- arithmeticOrBooleanExpr no anyTerm
---- ---- e ---- expressionWithRelOp yes ----
---- ---- ---- ---- anyTerm no expressionWithRelOp
---- ---- ---- ---- expression no arithmeticOrBooleanExpr
---- ---- e ---- expressionWithLogOp yes ----
---- ---- ---- ---- arithmeticOrBooleanExpr no expressionWithLogOp
---- ---- ---- ---- lvalueIDStmt no expression
; 9 SEMICOL ---- lvalueIDStmt yes ----
---- ---- ---- ---- assignmentStmt no whichStmt
---- ---- ---- ---- statement no simpleStmt
---- ---- ---- ---- statements no statement
---- ---- ---- ---- statements no statements
var_3_ 10 ID ---- assignmentStmt yes ----
---- ---- ---- ---- simpleStmt no assignmentStmt
:= 10 ASSIGNOP ---- lvalueIDStmt yes ----
---- ---- ---- ---- whichStmt no lvalueIDStmt
- 10 MINUS ---- expression yes ----
---- ---- ---- ---- lvalueIDStmt no expression
( 10 BO ---- booleanOrNonBooleanArithmeticExpr yes ----
---- ---- ---- ---- expression no booleanOrNonBooleanArithmeticExpr
6 10 NUM 6 var yes ----
---- ---- ---- ---- factor no var
---- ---- ---- ---- term no factor
---- ---- ---- ---- arithmeticExpr no term
---- ---- e ---- term2 yes ----
---- ---- ---- ---- term no term2
---- ---- ---- ---- booleanOrNonBooleanArithmeticExpr no arithmeticExpr
---- ---- e ---- arithmeticExpr2 yes ----
---- ---- ---- ---- arithmeticExpr no arithmeticExpr2
) 10 BC ---- booleanOrNonBooleanArithmeticExpr yes ----
; 10 SEMICOL ---- lvalueIDStmt yes ----
---- ---- ---- ---- assignmentStmt no whichStmt
---- ---- ---- ---- statement no simpleStmt
---- ---- ---- ---- statements no statement
---- ---- ---- ---- statements no statements
[ 11 SQBO ---- optional yes ----
---- ---- ---- ---- moduleReuseStmt no optional
R1_abc 11 ID ---- idList yes ----
---- ---- ---- ---- optional no idList
, 11 COMMA ---- idList2 yes ----
---- ---- ---- ---- idList no idList2
r2_ABC 11 ID ---- idList2 yes ----
, 11 COMMA ---- idList2 yes ----
---- ---- ---- ---- idList2 no idList2
R3_abc 11 ID ---- idList2 yes ----
---- ---- e ---- idList2 yes ----
---- ---- ---- ---- idList2 no idList2
] 11 SQBC ---- optional yes ----
:= 11 ASSIGNOP ---- optional yes ----
---- ---- ---- ---- simpleStmt no moduleReuseStmt
use 11 USE ---- moduleReuseStmt yes ----
module 11 MODULE ---- moduleReuseStmt yes ----
compute 11 ID ---- moduleReuseStmt yes ----
with 11 WITH ---- moduleReuseStmt yes ----
parameters 11 PARAMETERS ---- moduleReuseStmt yes ----
var_1_ 11 ID ---- idList yes ----
---- ---- ---- ---- moduleReuseStmt no idList
, 11 COMMA ---- idList2 yes ----
---- ---- ---- ---- idList no idList2
var_2_ 11 ID ---- idList2 yes ----
, 11 COMMA ---- idList2 yes ----
---- ---- ---- ---- idList2 no idList2
var_3_ 11 ID ---- idList2 yes ----
---- ---- e ---- idList2 yes ----
---- ---- ---- ---- idList2 no idList2
; 11 SEMICOL ---- moduleReuseStmt yes ----
---- ---- ---- ---- statement no simpleStmt
---- ---- ---- ---- statements no statement
---- ---- ---- ---- statements no statements
---- ---- e ---- statements yes ----
---- ---- ---- ---- statements no statements
end 13 END ---- moduleDef yes ----
<< 14 DEF ---- module yes ----
---- ---- ---- ---- otherModules no module
module 14 MODULE ---- module yes ----
compute 14 ID ---- module yes ----
>> 14 ENDDEF ---- module yes ----
takes 15 TAKES ---- module yes ----
input 15 INPUT ---- module yes ----
[ 15 SQBO ---- module yes ----
a 15 ID ---- input_plist yes ----
---- ---- ---- ---- module no input_plist
: 15 COLON ---- input_plist yes ----
integer 15 INTEGER ---- dataType yes ----
---- ---- ---- ---- input_plist no dataType
, 15 COMMA ---- input_plist2 yes ----
---- ---- ---- ---- input_plist no input_plist2
b 15 ID ---- input_plist2 yes ----
: 15 COLON ---- input_plist2 yes ----
integer 15 INTEGER ---- dataType yes ----
---- ---- ---- ---- input_plist2 no dataType
, 15 COMMA ---- input_plist2 yes ----
---- ---- ---- ---- input_plist2 no input_plist2
c 15 ID ---- input_plist2 yes ----
: 15 COLON ---- input_plist2 yes ----
integer 15 INTEGER ---- dataType yes ----
---- ---- ---- ---- input_plist2 no dataType
---- ---- e ---- input_plist2 yes ----
---- ---- ---- ---- input_plist2 no input_plist2
] 15 SQBC ---- module yes ----
; 15 SEMICOL ---- module yes ----
returns 16 RETURNS ---- ret yes ----
---- ---- ---- ---- module no ret
[ 16 SQBO ---- ret yes ----
res_1 16 ID ---- output_plist yes ----
---- ---- ---- ---- ret no output_plist
: 16 COLON ---- output_plist yes ----
boolean 16 BOOLEAN ---- type yes ----
---- ---- ---- ---- output_plist no type
, 16 COMMA ---- output_plist2 yes ----
---- ---- ---- ---- output_plist no output_plist2
res_2_a 16 ID ---- output_plist2 yes ----
: 16 COLON ---- output_plist2 yes ----
integer 16 INTEGER ---- type yes ----
---- ---- ---- ---- output_plist2 no type
, 16 COMMA ---- output_plist2 yes ----
---- ---- ---- ---- output_plist2 no output_plist2
res_2__b 16 ID ---- output_plist2 yes ----
: 16 COLON ---- output_plist2 yes ----
real 16 REAL ---- type yes ----
---- ---- ---- ---- output_plist2 no type
---- ---- e ---- output_plist2 yes ----
---- ---- ---- ---- output_plist2 no output_plist2
] 16 SQBC ---- ret yes ----
; 16 SEMICOL ---- ret yes ----
start 17 START ---- moduleDef yes ----
---- ---- ---- ---- module no moduleDef
res_2_a 18 ID ---- assignmentStmt yes ----
---- ---- ---- ---- simpleStmt no assignmentStmt
:= 18 ASSIGNOP ---- lvalueIDStmt yes ----
---- ---- ---- ---- whichStmt no lvalueIDStmt
- 18 MINUS ---- expression yes ----
---- ---- ---- ---- lvalueIDStmt no expression
( 18 BO ---- booleanOrNonBooleanArithmeticExpr yes ----
---- ---- ---- ---- expression no booleanOrNonBooleanArithmeticExpr
a 18 ID ---- var yes ----
---- ---- ---- ---- factor no var
---- ---- e ---- whichId yes ----
---- ---- ---- ---- var no whichId
---- ---- ---- ---- term no factor
---- ---- ---- ---- arithmeticExpr no term
* 18 MUL ---- op2 yes ----
---- ---- ---- ---- term2 no op2
---- ---- ---- ---- term no term2
b 18 ID ---- var yes ----
---- ---- ---- ---- factor no var
---- ---- e ---- whichId yes ----
---- ---- ---- ---- var no whichId
---- ---- ---- ---- term2 no factor
---- ---- e ---- term2 yes ----
---- ---- ---- ---- term2 no term2
---- ---- ---- ---- booleanOrNonBooleanArithmeticExpr no arithmeticExpr
- 18 MINUS ---- op1 yes ----
---- ---- ---- ---- arithmeticExpr2 no op1
---- ---- ---- ---- arithmeticExpr no arithmeticExpr2
c 18 ID ---- var yes ----
---- ---- ---- ---- factor no var
---- ---- e ---- whichId yes ----
---- ---- ---- ---- var no whichId
---- ---- ---- ---- term no factor
---- ---- ---- ---- arithmeticExpr2 no term
/ 18 DIV ---- op2 yes ----
---- ---- ---- ---- term2 no op2
---- ---- ---- ---- term no term2
5 18 NUM 5 var yes ----
---- ---- ---- ---- factor no var
---- ---- ---- ---- term2 no factor
---- ---- e ---- term2 yes ----
---- ---- ---- ---- term2 no term2
---- ---- e ---- arithmeticExpr2 yes ----
---- ---- ---- ---- arithmeticExpr2 no arithmeticExpr2
) 18 BC ---- booleanOrNonBooleanArithmeticExpr yes ----
; 18 SEMICOL ---- lvalueIDStmt yes ----
---- ---- ---- ---- assignmentStmt no whichStmt
---- ---- ---- ---- statement no simpleStmt
---- ---- ---- ---- statements no statement
---- ---- ---- ---- moduleDef no statements
res_2__b 19 ID ---- assignmentStmt yes ----
---- ---- ---- ---- simpleStmt no assignmentStmt
:= 19 ASSIGNOP ---- lvalueIDStmt yes ----
---- ---- ---- ---- whichStmt no lvalueIDStmt
( 19 BO ---- arithmeticOrBooleanExpr yes ----
---- ---- ---- ---- expression no arithmeticOrBooleanExpr
12.2 19 RNUM 12.200000 var yes ----
---- ---- ---- ---- factor no var
---- ---- ---- ---- term no factor
---- ---- ---- ---- arithmeticExpr no term
---- ---- e ---- term2 yes ----
---- ---- ---- ---- term no term2
---- ---- ---- ---- anyTerm no arithmeticExpr
+ 19 PLUS ---- op1 yes ----
---- ---- ---- ---- arithmeticExpr2 no op1
---- ---- ---- ---- arithmeticExpr no arithmeticExpr2
22.34E-2 19 RNUM 0.223400 var yes ----
---- ---- ---- ---- factor no var
---- ---- ---- ---- term no factor
---- ---- ---- ---- arithmeticExpr2 no term
---- ---- e ---- term2 yes ----
---- ---- ---- ---- term no term2
---- ---- e ---- arithmeticExpr2 yes ----
---- ---- ---- ---- arithmeticExpr2 no arithmeticExpr2
---- ---- ---- ---- arithmeticOrBooleanExpr no anyTerm
---- ---- e ---- expressionWithRelOp yes ----
---- ---- ---- ---- anyTerm no expressionWithRelOp
---- ---- ---- ---- arithmeticOrBooleanExpr no arithmeticOrBooleanExpr
---- ---- e ---- expressionWithLogOp yes ----
---- ---- ---- ---- arithmeticOrBooleanExpr no expressionWithLogOp
) 19 BC ---- arithmeticOrBooleanExpr yes ----
---- ---- e ---- arithmeticOrBooleanExpr2 yes ----
---- ---- ---- ---- arithmeticOrBooleanExpr no arithmeticOrBooleanExpr2
---- ---- ---- ---- lvalueIDStmt no expression
; 19 SEMICOL ---- lvalueIDStmt yes ----
---- ---- ---- ---- assignmentStmt no whichStmt
---- ---- ---- ---- statement no simpleStmt
---- ---- ---- ---- statements no statement
---- ---- ---- ---- statements no statements
print 21 PRINT ---- ioStmt yes ----
---- ---- ---- ---- statement no ioStmt
( 21 BO ---- ioStmt yes ----
res_1 21 ID ---- var yes ----
---- ---- ---- ---- ioStmt no var
---- ---- e ---- whichId yes ----
---- ---- ---- ---- var no whichId
) 21 BC ---- ioStmt yes ----
; 21 SEMICOL ---- ioStmt yes ----
---- ---- ---- ---- statements no statement
---- ---- ---- ---- statements no statements
---- ---- e ---- statements yes ----
---- ---- ---- ---- statements no statements
end 22 END ---- moduleDef yes ----
---- ---- ---- ---- program no otherModules
---- ---- e ---- otherModules yes ----
---- ---- ---- ---- otherModules no otherModules