2 static char yyid
[] = "@(#)modification of yaccpar 1.8 (Berkeley) 01/20/90";
4 #define YYXBYACC 1 /* XBYACC -- modified Berkeley yacc */
6 Berkeley yacc modified so only tables and
7 yydebug and yylval are global
8 #define YYGLOBAL -- gives standard byacc
9 #define YYPURE -- gives a reentrant parser
29 #define YYMAXDEPTH 200
31 /* Bison's use of MSDOS and ours clashes */
34 extern void PROTO( eat_nl
, (void) ) ;
35 static void PROTO( resize_fblock
, (FBLOCK
*, INST
*) ) ;
36 static void PROTO( code_array
, (SYMTAB
*) ) ;
37 static void PROTO( code_call_id
, (CA_REC
*, SYMTAB
*) ) ;
38 static void PROTO( field_A2I
, (void)) ;
39 static int PROTO( current_offset
, (void) ) ;
40 static void PROTO( check_var
, (SYMTAB
*) ) ;
41 static void PROTO( check_array
, (SYMTAB
*) ) ;
42 static void PROTO( RE_as_arg
, (void)) ;
45 static FBLOCK
*active_funct
;
46 /* when scope is SCOPE_FUNCT */
48 #define code_address(x) if( is_local(x) )\
49 { code1(L_PUSHA) ; code1((x)->offset) ; }\
50 else code2(_PUSHA, (x)->stval.cp)
52 /* this nonsense caters to MSDOS large model */
53 #define CODE_FE_PUSHA() code_ptr->ptr = (PTR) 0 ; code1(FE_PUSHA)
59 INST
*start
; /* code starting address */
60 PF_CP fp
; /* ptr to a (print/printf) or (sub/gsub) function */
61 BI_REC
*bip
; /* ptr to info about a builtin */
62 FBLOCK
*fbp
; /* ptr to a function block */
69 #define UNEXPECTED 257
70 #define BAD_DECIMAL 258
72 #define SEMI_COLON 260
110 #define INC_or_DEC 298
125 #define MATCH_FUNC 313
142 #define YYERRCODE 256
143 short yylhs
[] = { -1,
144 0, 0, 36, 36, 36, 37, 39, 37, 40, 37,
145 41, 37, 42, 43, 37, 1, 1, 2, 2, 3,
146 3, 4, 4, 4, 4, 4, 4, 4, 4, 44,
147 44, 13, 13, 13, 13, 13, 13, 13, 13, 13,
148 13, 13, 13, 13, 13, 13, 45, 13, 46, 13,
149 47, 48, 13, 14, 14, 15, 15, 15, 15, 15,
150 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
151 15, 15, 15, 15, 10, 25, 25, 26, 26, 8,
152 5, 4, 27, 27, 6, 6, 6, 7, 7, 49,
153 49, 17, 4, 50, 4, 51, 4, 16, 4, 4,
154 18, 18, 19, 19, 52, 52, 13, 13, 10, 15,
155 15, 4, 20, 4, 11, 11, 11, 11, 11, 15,
156 13, 13, 13, 13, 13, 13, 13, 15, 22, 53,
157 53, 15, 23, 4, 4, 21, 21, 15, 15, 15,
158 15, 15, 54, 12, 12, 9, 9, 15, 28, 28,
159 24, 24, 38, 29, 30, 30, 34, 34, 35, 35,
160 15, 31, 31, 32, 32, 32, 33, 33,
163 1, 2, 1, 1, 2, 1, 0, 3, 0, 3,
164 0, 3, 0, 0, 6, 3, 3, 1, 1, 1,
165 2, 1, 2, 1, 2, 2, 2, 1, 2, 1,
166 1, 1, 3, 3, 3, 3, 3, 3, 3, 3,
167 3, 3, 3, 3, 3, 3, 0, 4, 0, 4,
168 0, 0, 7, 1, 2, 1, 1, 1, 3, 1,
169 3, 3, 3, 3, 3, 3, 2, 2, 2, 1,
170 2, 2, 2, 2, 1, 0, 1, 1, 3, 5,
171 0, 5, 1, 1, 1, 3, 2, 3, 3, 0,
172 2, 4, 2, 1, 4, 1, 7, 4, 2, 4,
173 3, 4, 1, 2, 1, 2, 3, 5, 5, 5,
174 6, 7, 6, 2, 1, 2, 6, 2, 3, 1,
175 3, 3, 3, 3, 3, 3, 3, 2, 5, 1,
176 3, 6, 1, 2, 3, 2, 3, 1, 2, 2,
177 3, 4, 1, 1, 1, 2, 3, 6, 1, 1,
178 1, 3, 2, 4, 2, 2, 0, 1, 1, 3,
179 3, 2, 2, 1, 3, 3, 2, 2,
181 short yydefred
[] = { 0,
182 0, 0, 143, 0, 0, 0, 0, 0, 115, 0,
183 56, 57, 60, 0, 81, 81, 0, 0, 149, 150,
184 7, 9, 0, 0, 6, 70, 0, 0, 0, 0,
185 0, 0, 0, 0, 0, 0, 1, 3, 4, 0,
186 5, 0, 30, 31, 83, 84, 96, 0, 0, 0,
187 0, 0, 0, 0, 0, 0, 22, 0, 20, 0,
188 0, 0, 0, 0, 28, 81, 24, 0, 0, 0,
189 0, 0, 0, 0, 0, 0, 72, 74, 0, 118,
190 0, 0, 0, 71, 0, 0, 0, 0, 0, 0,
191 0, 155, 156, 2, 0, 0, 0, 0, 0, 0,
192 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,
193 13, 51, 47, 49, 0, 0, 0, 0, 0, 0,
194 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
195 0, 0, 130, 128, 0, 153, 0, 146, 144, 145,
196 0, 17, 25, 0, 0, 26, 27, 0, 81, 0,
197 134, 29, 0, 136, 0, 16, 21, 23, 99, 0,
198 103, 0, 0, 114, 0, 0, 0, 0, 0, 0,
199 0, 0, 0, 119, 0, 59, 0, 0, 161, 0,
200 0, 0, 0, 8, 10, 0, 0, 0, 0, 0,
201 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
202 0, 0, 0, 107, 0, 40, 41, 42, 43, 44,
203 45, 18, 12, 19, 0, 0, 0, 0, 0, 0,
204 0, 0, 0, 0, 159, 0, 0, 147, 0, 101,
205 0, 0, 0, 0, 135, 137, 94, 0, 104, 105,
206 0, 0, 0, 0, 0, 85, 0, 0, 0, 0,
207 0, 0, 0, 0, 0, 162, 0, 0, 163, 0,
208 0, 0, 0, 0, 0, 0, 142, 131, 0, 154,
209 0, 98, 0, 102, 92, 0, 95, 106, 100, 87,
210 0, 0, 0, 0, 0, 0, 0, 0, 108, 0,
211 166, 168, 165, 167, 80, 129, 0, 0, 52, 0,
212 160, 0, 0, 0, 0, 82, 0, 0, 0, 109,
213 117, 111, 132, 15, 0, 0, 151, 148, 113, 0,
214 0, 0, 0, 112, 97, 152,
216 short yydgoto
[] = { 24,
217 57, 213, 58, 59, 85, 244, 81, 26, 27, 28,
218 29, 141, 60, 31, 32, 61, 62, 63, 163, 64,
219 65, 33, 224, 318, 246, 247, 66, 34, 35, 36,
220 179, 180, 259, 226, 227, 37, 38, 39, 90, 91,
221 123, 200, 298, 67, 202, 203, 201, 315, 283, 238,
224 short yysindex
[] = { 38,
225 -259, 276, 0, 2215, 2215, 2215, -158, 2128, 0, 2244,
226 0, 0, 0, -290, 0, 0, -286, -274, 0, 0,
227 0, 0, -212, 38, 0, 0, 2215, 282, 2122, 2514,
228 2215, 116, -242, -270, -259, -261, 0, 0, 0, -223,
229 0, -125, 0, 0, 0, 0, 0, -255, -250, -197,
230 -197, -234, -222, 1702, -197, 1702, 0, 130, 0, 2466,
231 349, 349, 1792, 349, 0, 0, 0, 349, 2244, -290,
232 -210, -260, -260, -260, -103, 0, 0, 0, 0, 0,
233 -241, -84, 2069, 0, -147, -169, -143, 2244, 2244, -259,
234 -259, 0, 0, 0, -130, 2244, 2244, 2244, 2244, 2244,
235 2244, 2244, 2244, 2244, 2244, 2244, 2244, 2244, 2244, 0,
236 0, 0, 0, 0, -135, 2244, 2244, 2244, 2244, 2244,
237 2244, 2244, -44, 116, 2215, 2215, 2215, 2215, 2215, -110,
238 2215, 2244, 0, 0, 2244, 0, -106, 0, 0, 0,
239 -69, 0, 0, 2244, 1822, 0, 0, 2244, 0, 2466,
240 0, 0, 2466, 0, -197, 0, 0, 0, 0, -95,
241 0, 2478, 2157, 0, 2273, -88, 2373, -22, -59, -14,
242 -10, 2244, -24, 0, 2244, 0, 2244, -46, 0, 2302,
243 2244, 2535, 2556, 0, 0, 2580, 2580, 2580, 2580, 2580,
244 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2244,
245 2244, 2244, 2244, 0, 204, 0, 0, 0, 0, 0,
246 0, 0, 0, 0, -25, -25, -260, -260, -260, -158,
247 -130, 2385, 2580, -8, 0, -43, -4, 0, 2400, 0,
248 -266, 2493, 2412, 5, 0, 0, 0, 349, 0, 0,
249 2427, 349, 2186, -2, 2580, 0, -3, -32, 2244, 2244,
250 2244, 2580, -31, 2580, -184, 0, -248, 2096, 0, -28,
251 -19, 2244, 2580, 2568, 2589, 197, 0, 0, 2244, 0,
252 -18, 0, -6, 0, 0, 2244, 0, 0, 0, 0,
253 -237, 2244, -197, 2244, 2244, -126, -111, -102, 0, -17,
254 0, 0, 0, 0, 0, 0, -20, -44, 0, 2123,
255 0, 2, -90, -24, 2580, 0, 2580, 2439, -17, 0,
256 0, 0, 0, 0, 2244, -158, 0, 0, 0, -197,
257 -197, 2580, 6, 0, 0, 0,
259 short yyrindex
[] = { 0,
260 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
261 0, 0, 0, 590, 0, 0, 0, 0, 0, 0,
262 0, 0, 0, 0, 0, 0, 0, 0, 1559, 19,
263 95, 1616, 0, 0, 0, 0, 0, 0, 0, 1388,
264 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
265 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
266 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,
267 647, 875, 932, 989, 0, 419, 0, 0, 476, 0,
268 0, 1917, 0, 0, 0, 0, 0, 0, 0, 0,
269 0, 0, 0, 0, 1046, 0, 0, 0, 0, 0,
270 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
271 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
272 0, 0, 0, 1673, 0, 0, 0, 0, 0, 0,
273 0, 0, 0, 0, 0, 0, 11, 0, 0, 0,
274 704, 0, 0, 0, 0, 0, 0, 0, 0, 0,
275 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
276 0, 0, 0, 0, -109, 0, 0, 0, 0, 0,
277 0, 0, 0, 0, 0, 0, 0, 2331, 0, 0,
278 12, 0, 0, 0, 0, -217, 135, 208, 281, 354,
279 1974, 1982, 1994, 2002, 2014, 2022, 2034, 2042, 2054, 0,
280 0, 0, 0, 0, -54, 0, 0, 0, 0, 0,
281 0, 0, 0, 0, 1445, 1502, 1103, 1160, 1217, 1331,
282 761, 0, -236, 0, 0, 0, 15, 0, 0, 0,
283 1758, 0, 0, 0, 0, 0, 0, 0, 0, 0,
284 0, 0, 0, -80, -173, 0, -207, 0, 0, 0,
285 0, -231, 0, -227, 0, 0, 1875, 0, 0, 0,
286 0, 0, 37, 0, -29, 46, 0, 0, 0, 0,
287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
288 0, 0, 0, 0, 0, 0, 0, 0, 0, 1274,
289 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
290 0, 0, 0, -67, -51, 0, -26, 0, 818, 0,
291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
294 short yygindex
[] = { 0,
295 21, 4, 0, -48, 3, 0, 41, 0, 0, -7,
296 -1, -185, 1, 0, 164, 0, 0, 0, 0, 0,
297 0, 0, 39, 0, 122, -136, 0, 0, 0, 0,
298 0, 0, 0, 0, 0, 294, 0, 0, 0, 0,
299 0, 0, 0, 105, 0, 0, 0, 0, 0, 0,
302 #define YYTABLESIZE 2874
303 short yytable
[] = { 77,
304 30, 2, 71, 71, 71, 78, 71, 84, 82, 157,
305 83, 273, 159, 160, 88, 164, 291, 86, 87, 166,
306 25, 41, 132, 172, 30, 71, 89, 172, 133, 71,
307 135, 84, 139, 89, 267, 130, 131, 88, 140, 137,
308 255, 33, 33, 33, 25, 144, 33, 33, 33, 84,
309 145, 77, 77, 292, 150, 136, 153, 33, 77, 133,
310 173, 43, 44, 162, 304, 133, 148, 82, 165, 167,
311 89, 138, 168, 169, 88, 8, 9, 75, 170, 290,
312 284, 171, 76, 149, 33, 78, 78, 110, 182, 183,
313 78, 78, 78, 92, 77, 93, 186, 187, 188, 189,
314 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
315 184, 185, 286, 287, 288, 177, 205, 206, 207, 208,
316 209, 210, 211, 71, 71, 71, 71, 71, 78, 71,
317 323, 178, 222, 43, 44, 223, 142, 309, 284, 303,
318 8, 9, 75, 212, 229, 232, 143, 76, 233, 76,
319 76, 234, 310, 284, 146, 147, 76, 181, 151, 152,
320 154, 311, 284, 241, 158, 245, 131, 72, 73, 74,
321 204, 80, 252, 320, 284, 254, 220, 245, 90, 90,
322 258, 245, 103, 104, 105, 106, 107, 108, 109, 277,
323 95, 86, 86, 279, 124, 8, 9, 75, 86, 225,
324 263, 264, 265, 266, 46, 46, 46, 91, 91, 46,
325 46, 46, 139, 110, 43, 44, 2, 174, 140, 46,
326 46, 46, 46, 46, 46, 228, 237, 214, 248, 48,
327 48, 48, 79, 79, 48, 48, 48, 79, 79, 79,
328 249, 82, 174, 83, 48, 48, 48, 46, 250, 245,
329 245, 245, 251, 253, 235, 256, 269, 236, 270, 143,
330 271, 284, 223, 282, 127, 128, 129, 276, 285, 300,
331 130, 131, 48, 295, 289, 79, 245, 11, 11, 11,
332 312, 313, 305, 281, 307, 308, 296, 301, 215, 216,
333 217, 218, 219, 1, 221, 14, 14, 14, 2, 302,
334 297, 314, 260, 319, 50, 50, 50, 326, 139, 50,
335 50, 50, 157, 76, 140, 322, 158, 94, 212, 50,
336 50, 50, 50, 0, 3, 4, 5, 0, 0, 0,
337 6, 0, 0, 0, 0, 7, 8, 9, 10, 0,
338 11, 12, 13, 14, 0, 15, 16, 50, 0, 17,
339 18, 19, 20, 32, 32, 32, 0, 0, 32, 32,
340 32, 21, 22, 0, 0, 0, 23, 0, 32, 32,
341 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
342 0, 0, 0, 0, 0, 155, 0, 306, 43, 44,
343 2, 156, 0, 34, 34, 34, 32, 0, 34, 34,
344 34, 0, 214, 125, 126, 127, 128, 129, 0, 34,
345 0, 130, 131, 0, 0, 0, 3, 4, 5, 0,
346 0, 0, 6, 0, 324, 325, 0, 7, 8, 9,
347 10, 0, 11, 12, 13, 14, 34, 15, 16, 45,
348 46, 17, 18, 19, 20, 47, 48, 49, 50, 51,
349 52, 0, 53, 0, 0, 54, 55, 56, 93, 0,
350 0, 93, 93, 93, 93, 0, 35, 35, 35, 0,
351 0, 35, 35, 35, 115, 116, 117, 118, 119, 120,
352 121, 122, 35, 117, 118, 119, 120, 121, 122, 93,
353 93, 93, 0, 0, 0, 93, 0, 0, 0, 0,
354 93, 93, 93, 93, 0, 93, 93, 93, 93, 35,
355 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
356 93, 93, 93, 93, 0, 93, 0, 0, 93, 93,
357 93, 42, 0, 0, 43, 44, 2, 0, 0, 36,
358 36, 36, 0, 0, 36, 36, 36, 0, 96, 97,
359 98, 99, 100, 101, 102, 36, 0, 0, 0, 0,
360 0, 0, 3, 4, 5, 0, 0, 0, 6, 0,
361 0, 0, 0, 7, 8, 9, 10, 0, 11, 12,
362 13, 14, 36, 15, 16, 45, 46, 17, 18, 19,
363 20, 47, 48, 49, 50, 51, 52, 0, 53, 0,
364 0, 54, 55, 56, 155, 0, 0, 43, 44, 2,
365 0, 0, 37, 37, 37, 0, 0, 37, 37, 37,
366 0, 0, 0, 0, 0, 0, 0, 0, 37, 0,
367 0, 0, 0, 0, 0, 3, 4, 5, 0, 0,
368 0, 6, 0, 0, 0, 0, 7, 8, 9, 10,
369 0, 11, 12, 13, 14, 37, 15, 16, 45, 46,
370 17, 18, 19, 20, 47, 48, 49, 50, 51, 52,
371 0, 53, 0, 0, 54, 55, 56, 75, 75, 75,
372 0, 81, 75, 75, 75, 75, 75, 75, 75, 75,
373 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
374 75, 75, 75, 75, 0, 75, 75, 75, 75, 75,
375 75, 75, 0, 75, 75, 75, 75, 75, 75, 75,
376 75, 75, 75, 75, 75, 0, 75, 75, 0, 0,
377 75, 75, 75, 75, 116, 116, 116, 0, 81, 116,
378 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
379 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
380 116, 0, 116, 116, 116, 116, 116, 116, 116, 0,
381 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
382 116, 116, 0, 116, 116, 0, 0, 116, 116, 116,
383 116, 58, 58, 58, 0, 81, 58, 58, 58, 58,
384 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
385 58, 58, 58, 58, 58, 58, 58, 58, 0, 58,
386 58, 58, 58, 58, 58, 58, 0, 58, 58, 58,
387 0, 58, 58, 58, 58, 58, 58, 58, 58, 0,
388 58, 58, 0, 0, 58, 58, 58, 58, 58, 58,
389 58, 0, 81, 58, 58, 58, 75, 75, 75, 75,
390 75, 75, 75, 58, 58, 58, 58, 58, 58, 58,
391 58, 58, 58, 58, 58, 0, 58, 58, 58, 58,
392 58, 58, 58, 0, 0, 58, 58, 0, 58, 58,
393 58, 58, 58, 58, 58, 58, 0, 58, 58, 0,
394 0, 58, 58, 58, 58, 120, 120, 120, 0, 0,
395 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
396 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
397 120, 120, 0, 120, 120, 120, 120, 120, 120, 120,
398 0, 120, 120, 120, 0, 120, 120, 120, 120, 120,
399 120, 120, 120, 0, 120, 120, 0, 0, 120, 120,
400 120, 120, 139, 139, 139, 0, 0, 139, 139, 139,
401 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
402 139, 139, 139, 139, 139, 139, 139, 139, 139, 0,
403 139, 139, 139, 139, 139, 139, 139, 0, 0, 139,
404 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
405 0, 139, 139, 0, 0, 139, 139, 139, 139, 66,
406 66, 66, 0, 0, 66, 66, 66, 66, 66, 66,
407 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
408 66, 66, 66, 66, 66, 66, 0, 66, 66, 66,
409 66, 66, 66, 66, 0, 66, 66, 0, 66, 66,
410 66, 66, 66, 66, 66, 66, 66, 0, 66, 66,
411 0, 0, 66, 66, 66, 66, 110, 110, 110, 0,
412 0, 110, 110, 110, 110, 110, 110, 110, 110, 110,
413 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
414 110, 110, 110, 0, 110, 110, 110, 110, 110, 110,
415 110, 0, 110, 110, 110, 0, 110, 110, 110, 110,
416 110, 110, 110, 110, 0, 110, 110, 0, 0, 110,
417 110, 110, 110, 68, 68, 68, 0, 0, 68, 68,
418 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
419 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
420 0, 68, 68, 68, 68, 68, 68, 68, 0, 68,
421 0, 0, 68, 68, 68, 68, 68, 68, 68, 68,
422 68, 0, 68, 68, 0, 0, 68, 68, 68, 68,
423 69, 69, 69, 0, 0, 69, 69, 69, 69, 69,
424 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
425 69, 69, 69, 69, 69, 69, 69, 0, 69, 69,
426 69, 69, 69, 69, 69, 0, 69, 0, 0, 69,
427 69, 69, 69, 69, 69, 69, 69, 69, 0, 69,
428 69, 0, 0, 69, 69, 69, 69, 67, 67, 67,
429 0, 0, 67, 67, 67, 67, 67, 67, 67, 67,
430 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
431 67, 67, 67, 67, 0, 67, 67, 67, 67, 67,
432 67, 67, 0, 67, 0, 0, 67, 67, 67, 67,
433 67, 67, 67, 67, 67, 0, 67, 67, 0, 0,
434 67, 67, 67, 67, 140, 140, 140, 0, 0, 140,
435 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
436 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
437 140, 0, 140, 140, 140, 140, 140, 140, 140, 0,
438 140, 0, 0, 140, 140, 140, 140, 140, 140, 140,
439 140, 140, 0, 140, 140, 0, 0, 140, 140, 140,
440 140, 63, 63, 63, 0, 0, 63, 63, 63, 63,
441 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
442 63, 63, 63, 63, 63, 63, 63, 63, 0, 63,
443 63, 63, 63, 63, 63, 63, 0, 63, 0, 0,
444 63, 63, 63, 63, 63, 63, 63, 63, 63, 0,
445 63, 63, 0, 0, 63, 63, 63, 63, 64, 64,
446 64, 0, 0, 64, 64, 64, 64, 64, 64, 64,
447 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
448 64, 64, 64, 64, 64, 0, 64, 64, 64, 64,
449 64, 64, 64, 0, 64, 0, 0, 64, 64, 64,
450 64, 64, 64, 64, 64, 64, 0, 64, 64, 0,
451 0, 64, 64, 64, 64, 65, 65, 65, 0, 0,
452 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
453 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
454 65, 65, 0, 65, 65, 65, 65, 65, 65, 65,
455 0, 65, 0, 0, 65, 65, 65, 65, 65, 65,
456 65, 65, 65, 0, 65, 65, 0, 0, 65, 65,
457 65, 65, 110, 110, 110, 0, 0, 110, 110, 110,
458 109, 109, 109, 109, 109, 109, 109, 110, 110, 110,
459 110, 110, 110, 110, 110, 110, 110, 110, 110, 0,
460 110, 110, 110, 110, 110, 110, 110, 0, 0, 110,
461 110, 0, 110, 110, 110, 110, 110, 110, 110, 110,
462 0, 110, 110, 0, 0, 110, 110, 110, 110, 141,
463 141, 141, 0, 0, 141, 141, 141, 141, 141, 141,
464 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
465 141, 141, 141, 141, 141, 141, 0, 141, 141, 141,
466 141, 141, 141, 141, 0, 141, 141, 141, 141, 0,
467 0, 0, 141, 141, 141, 141, 0, 0, 141, 141,
468 0, 0, 141, 141, 141, 141, 138, 138, 138, 0,
469 0, 138, 138, 138, 138, 138, 138, 138, 138, 138,
470 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
471 138, 138, 138, 0, 138, 138, 138, 138, 138, 138,
472 138, 0, 0, 138, 138, 138, 0, 0, 0, 138,
473 138, 138, 138, 0, 0, 138, 138, 0, 0, 138,
474 138, 138, 138, 61, 61, 61, 0, 0, 61, 61,
475 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
476 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
477 0, 61, 61, 61, 0, 0, 0, 61, 0, 61,
478 0, 0, 61, 61, 61, 61, 61, 61, 61, 61,
479 61, 0, 61, 61, 0, 0, 61, 61, 61, 61,
480 62, 62, 62, 0, 0, 62, 62, 62, 62, 62,
481 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
482 62, 62, 62, 62, 62, 62, 62, 0, 62, 62,
483 62, 0, 0, 0, 62, 0, 62, 0, 0, 62,
484 62, 62, 62, 62, 62, 62, 62, 62, 0, 62,
485 62, 0, 0, 62, 62, 62, 62, 120, 120, 120,
486 0, 0, 120, 120, 120, 0, 0, 0, 0, 0,
487 0, 0, 120, 120, 120, 120, 120, 120, 120, 120,
488 120, 120, 120, 120, 0, 120, 120, 120, 120, 120,
489 120, 120, 0, 0, 120, 120, 0, 120, 120, 120,
490 120, 120, 120, 120, 120, 0, 120, 120, 0, 0,
491 120, 120, 120, 120, 54, 54, 54, 0, 0, 54,
492 54, 54, 0, 0, 0, 0, 0, 0, 0, 54,
493 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
494 54, 0, 54, 0, 0, 0, 0, 0, 54, 0,
495 0, 0, 0, 54, 54, 54, 54, 54, 54, 54,
496 54, 54, 0, 54, 54, 0, 0, 54, 54, 54,
497 54, 55, 55, 55, 0, 0, 55, 55, 55, 0,
498 0, 0, 0, 0, 0, 0, 55, 55, 55, 55,
499 55, 55, 55, 55, 55, 55, 55, 55, 0, 55,
500 43, 44, 0, 0, 0, 55, 0, 0, 0, 0,
501 55, 55, 55, 55, 55, 55, 55, 55, 55, 0,
502 55, 55, 0, 0, 55, 55, 55, 55, 3, 4,
503 5, 0, 0, 0, 6, 0, 0, 0, 0, 7,
504 8, 9, 10, 0, 11, 12, 13, 14, 0, 15,
505 16, 0, 0, 17, 18, 19, 20, 58, 0, 0,
506 81, 0, 0, 0, 75, 75, 75, 75, 75, 75,
507 75, 58, 0, 58, 58, 0, 58, 58, 58, 58,
508 58, 58, 58, 0, 58, 58, 58, 58, 58, 58,
509 58, 161, 0, 58, 58, 0, 58, 58, 58, 0,
510 58, 58, 58, 58, 0, 58, 58, 0, 0, 58,
511 58, 58, 58, 0, 0, 0, 0, 0, 3, 4,
512 5, 230, 0, 0, 6, 0, 0, 0, 0, 7,
513 8, 9, 10, 0, 11, 12, 13, 14, 0, 15,
514 16, 0, 0, 17, 18, 19, 20, 0, 3, 4,
515 5, 0, 0, 0, 6, 0, 0, 0, 0, 7,
516 8, 9, 10, 0, 11, 12, 13, 231, 0, 15,
517 16, 0, 0, 17, 18, 19, 20, 81, 0, 0,
518 0, 75, 75, 75, 75, 75, 75, 75, 58, 0,
519 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
520 0, 58, 58, 58, 58, 58, 58, 58, 0, 0,
521 58, 58, 0, 58, 58, 58, 0, 58, 58, 58,
522 58, 120, 58, 58, 0, 0, 58, 58, 58, 58,
523 120, 0, 120, 120, 120, 120, 120, 120, 120, 120,
524 120, 120, 0, 120, 120, 120, 120, 120, 120, 120,
525 0, 0, 120, 120, 0, 120, 120, 120, 0, 120,
526 120, 120, 120, 0, 120, 120, 0, 0, 120, 120,
527 120, 120, 38, 38, 38, 0, 0, 38, 38, 38,
528 39, 39, 39, 0, 0, 39, 39, 39, 38, 0,
529 0, 0, 121, 121, 121, 0, 39, 121, 121, 121,
530 122, 122, 122, 0, 0, 122, 122, 122, 121, 0,
531 0, 0, 123, 123, 123, 38, 122, 123, 123, 123,
532 124, 124, 124, 39, 0, 124, 124, 124, 123, 0,
533 0, 0, 125, 125, 125, 121, 124, 125, 125, 125,
534 126, 126, 126, 122, 0, 126, 126, 126, 125, 0,
535 0, 0, 127, 127, 127, 123, 126, 127, 127, 127,
536 53, 53, 53, 124, 0, 53, 53, 53, 127, 0,
537 0, 0, 0, 175, 0, 125, 53, 0, 0, 0,
538 0, 0, 112, 126, 113, 114, 115, 116, 117, 118,
539 119, 120, 121, 122, 0, 127, 0, 0, 0, 0,
540 293, 0, 0, 53, 0, 0, 0, 0, 0, 112,
541 176, 113, 114, 115, 116, 117, 118, 119, 120, 121,
542 122, 0, 0, 0, 0, 0, 0, 316, 103, 104,
543 105, 106, 107, 108, 109, 0, 112, 294, 113, 114,
544 115, 116, 117, 118, 119, 120, 121, 122, 0, 0,
545 0, 0, 0, 0, 3, 4, 5, 0, 0, 110,
546 6, 0, 0, 0, 317, 7, 8, 9, 69, 0,
547 11, 12, 13, 70, 79, 15, 16, 0, 0, 17,
548 18, 19, 20, 3, 4, 5, 0, 0, 0, 6,
549 0, 0, 0, 0, 7, 8, 9, 10, 240, 11,
550 12, 13, 14, 0, 15, 16, 0, 0, 17, 18,
551 19, 20, 3, 4, 5, 0, 0, 0, 6, 0,
552 0, 0, 0, 7, 8, 9, 10, 280, 11, 12,
553 13, 14, 0, 15, 16, 0, 0, 17, 18, 19,
554 20, 3, 4, 5, 0, 0, 0, 6, 0, 0,
555 0, 0, 7, 8, 9, 69, 0, 11, 12, 13,
556 70, 0, 15, 16, 0, 0, 17, 18, 19, 20,
557 3, 4, 5, 0, 0, 0, 6, 0, 0, 0,
558 0, 7, 8, 9, 10, 0, 11, 12, 13, 14,
559 0, 15, 16, 0, 0, 17, 18, 19, 20, 3,
560 4, 5, 0, 0, 0, 6, 0, 0, 0, 0,
561 7, 8, 9, 243, 0, 11, 12, 13, 14, 0,
562 15, 16, 0, 0, 17, 18, 19, 20, 3, 4,
563 5, 0, 0, 0, 6, 0, 0, 0, 0, 7,
564 8, 9, 10, 0, 11, 12, 13, 257, 0, 15,
565 16, 0, 0, 17, 18, 19, 20, 164, 164, 164,
566 0, 0, 0, 164, 0, 0, 0, 0, 164, 164,
567 164, 164, 0, 164, 164, 164, 164, 0, 164, 164,
568 0, 0, 164, 164, 164, 164, 112, 0, 113, 114,
569 115, 116, 117, 118, 119, 120, 121, 122, 112, 0,
570 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
571 0, 0, 0, 112, 176, 113, 114, 115, 116, 117,
572 118, 119, 120, 121, 122, 112, 268, 113, 114, 115,
573 116, 117, 118, 119, 120, 121, 122, 0, 0, 0,
574 112, 272, 113, 114, 115, 116, 117, 118, 119, 120,
575 121, 122, 112, 275, 113, 114, 115, 116, 117, 118,
576 119, 120, 121, 122, 43, 44, 0, 0, 278, 0,
577 0, 0, 0, 0, 0, 0, 0, 239, 0, 112,
578 321, 113, 114, 115, 116, 117, 118, 119, 120, 121,
579 122, 112, 274, 113, 114, 115, 116, 117, 118, 119,
580 120, 121, 122, 0, 0, 0, 112, 0, 113, 114,
581 115, 116, 117, 118, 119, 120, 121, 122, 111, 0,
582 0, 0, 0, 0, 0, 0, 0, 112, 0, 113,
583 114, 115, 116, 117, 118, 119, 120, 121, 122, 261,
584 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
585 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
586 262, 0, 0, 0, 0, 0, 0, 0, 0, 112,
587 0, 113, 114, 115, 116, 117, 118, 119, 120, 121,
588 122, 112, 299, 113, 114, 115, 116, 117, 118, 119,
589 120, 121, 122, 112, 0, 113, 114, 115, 116, 117,
590 118, 119, 120, 121, 122, 114, 115, 116, 117, 118,
593 short yycheck
[] = { 7,
594 0, 261, 4, 5, 6, 7, 8, 298, 10, 58,
595 10, 278, 61, 62, 301, 64, 265, 15, 16, 68,
596 0, 1, 265, 265, 24, 27, 301, 265, 265, 31,
597 301, 298, 40, 265, 220, 296, 297, 265, 40, 301,
598 177, 259, 260, 261, 24, 301, 264, 265, 266, 298,
599 301, 259, 260, 302, 54, 35, 56, 275, 266, 302,
600 302, 259, 260, 63, 302, 302, 301, 69, 66, 69,
601 302, 295, 70, 75, 302, 299, 300, 301, 76, 264,
602 265, 79, 306, 306, 302, 259, 260, 298, 88, 89,
603 264, 265, 266, 306, 302, 308, 96, 97, 98, 99,
604 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
605 90, 91, 249, 250, 251, 263, 116, 117, 118, 119,
606 120, 121, 122, 125, 126, 127, 128, 129, 302, 131,
607 316, 301, 132, 259, 260, 135, 262, 264, 265, 276,
608 299, 300, 301, 123, 144, 145, 42, 306, 148, 259,
609 260, 149, 264, 265, 50, 51, 266, 301, 54, 55,
610 56, 264, 265, 163, 60, 165, 297, 4, 5, 6,
611 306, 8, 172, 264, 265, 175, 287, 177, 259, 260,
612 180, 181, 267, 268, 269, 270, 271, 272, 273, 238,
613 27, 259, 260, 242, 31, 299, 300, 301, 266, 306,
614 200, 201, 202, 203, 259, 260, 261, 259, 260, 264,
615 265, 266, 220, 298, 259, 260, 261, 302, 220, 274,
616 275, 276, 277, 278, 279, 295, 322, 123, 317, 259,
617 260, 261, 259, 260, 264, 265, 266, 264, 265, 266,
618 263, 243, 302, 243, 274, 275, 276, 302, 263, 249,
619 250, 251, 263, 278, 150, 302, 265, 153, 302, 155,
620 265, 265, 262, 266, 290, 291, 292, 263, 301, 269,
621 296, 297, 302, 302, 306, 302, 276, 259, 260, 261,
622 298, 302, 282, 243, 284, 285, 306, 306, 125, 126,
623 127, 128, 129, 256, 131, 259, 260, 261, 261, 306,
624 262, 298, 181, 302, 259, 260, 261, 302, 316, 264,
625 265, 266, 302, 302, 316, 315, 302, 24, 298, 274,
626 275, 276, 277, -1, 287, 288, 289, -1, -1, -1,
627 293, -1, -1, -1, -1, 298, 299, 300, 301, -1,
628 303, 304, 305, 306, -1, 308, 309, 302, -1, 312,
629 313, 314, 315, 259, 260, 261, -1, -1, 264, 265,
630 266, 324, 325, -1, -1, -1, 329, -1, 274, 275,
631 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
632 -1, -1, -1, -1, -1, 256, -1, 283, 259, 260,
633 261, 262, -1, 259, 260, 261, 302, -1, 264, 265,
634 266, -1, 298, 288, 289, 290, 291, 292, -1, 275,
635 -1, 296, 297, -1, -1, -1, 287, 288, 289, -1,
636 -1, -1, 293, -1, 320, 321, -1, 298, 299, 300,
637 301, -1, 303, 304, 305, 306, 302, 308, 309, 310,
638 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
639 321, -1, 323, -1, -1, 326, 327, 328, 256, -1,
640 -1, 259, 260, 261, 262, -1, 259, 260, 261, -1,
641 -1, 264, 265, 266, 278, 279, 280, 281, 282, 283,
642 284, 285, 275, 280, 281, 282, 283, 284, 285, 287,
643 288, 289, -1, -1, -1, 293, -1, -1, -1, -1,
644 298, 299, 300, 301, -1, 303, 304, 305, 306, 302,
645 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
646 318, 319, 320, 321, -1, 323, -1, -1, 326, 327,
647 328, 256, -1, -1, 259, 260, 261, -1, -1, 259,
648 260, 261, -1, -1, 264, 265, 266, -1, 267, 268,
649 269, 270, 271, 272, 273, 275, -1, -1, -1, -1,
650 -1, -1, 287, 288, 289, -1, -1, -1, 293, -1,
651 -1, -1, -1, 298, 299, 300, 301, -1, 303, 304,
652 305, 306, 302, 308, 309, 310, 311, 312, 313, 314,
653 315, 316, 317, 318, 319, 320, 321, -1, 323, -1,
654 -1, 326, 327, 328, 256, -1, -1, 259, 260, 261,
655 -1, -1, 259, 260, 261, -1, -1, 264, 265, 266,
656 -1, -1, -1, -1, -1, -1, -1, -1, 275, -1,
657 -1, -1, -1, -1, -1, 287, 288, 289, -1, -1,
658 -1, 293, -1, -1, -1, -1, 298, 299, 300, 301,
659 -1, 303, 304, 305, 306, 302, 308, 309, 310, 311,
660 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
661 -1, 323, -1, -1, 326, 327, 328, 259, 260, 261,
662 -1, 263, 264, 265, 266, 267, 268, 269, 270, 271,
663 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
664 282, 283, 284, 285, -1, 287, 288, 289, 290, 291,
665 292, 293, -1, 295, 296, 297, 298, 299, 300, 301,
666 302, 303, 304, 305, 306, -1, 308, 309, -1, -1,
667 312, 313, 314, 315, 259, 260, 261, -1, 263, 264,
668 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
669 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
670 285, -1, 287, 288, 289, 290, 291, 292, 293, -1,
671 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
672 305, 306, -1, 308, 309, -1, -1, 312, 313, 314,
673 315, 259, 260, 261, -1, 263, 264, 265, 266, 267,
674 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
675 278, 279, 280, 281, 282, 283, 284, 285, -1, 287,
676 288, 289, 290, 291, 292, 293, -1, 295, 296, 297,
677 -1, 299, 300, 301, 302, 303, 304, 305, 306, -1,
678 308, 309, -1, -1, 312, 313, 314, 315, 259, 260,
679 261, -1, 263, 264, 265, 266, 267, 268, 269, 270,
680 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
681 281, 282, 283, 284, 285, -1, 287, 288, 289, 290,
682 291, 292, 293, -1, -1, 296, 297, -1, 299, 300,
683 301, 302, 303, 304, 305, 306, -1, 308, 309, -1,
684 -1, 312, 313, 314, 315, 259, 260, 261, -1, -1,
685 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
686 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
687 284, 285, -1, 287, 288, 289, 290, 291, 292, 293,
688 -1, 295, 296, 297, -1, 299, 300, 301, 302, 303,
689 304, 305, 306, -1, 308, 309, -1, -1, 312, 313,
690 314, 315, 259, 260, 261, -1, -1, 264, 265, 266,
691 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
692 277, 278, 279, 280, 281, 282, 283, 284, 285, -1,
693 287, 288, 289, 290, 291, 292, 293, -1, -1, 296,
694 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
695 -1, 308, 309, -1, -1, 312, 313, 314, 315, 259,
696 260, 261, -1, -1, 264, 265, 266, 267, 268, 269,
697 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
698 280, 281, 282, 283, 284, 285, -1, 287, 288, 289,
699 290, 291, 292, 293, -1, 295, 296, -1, 298, 299,
700 300, 301, 302, 303, 304, 305, 306, -1, 308, 309,
701 -1, -1, 312, 313, 314, 315, 259, 260, 261, -1,
702 -1, 264, 265, 266, 267, 268, 269, 270, 271, 272,
703 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
704 283, 284, 285, -1, 287, 288, 289, 290, 291, 292,
705 293, -1, 295, 296, 297, -1, 299, 300, 301, 302,
706 303, 304, 305, 306, -1, 308, 309, -1, -1, 312,
707 313, 314, 315, 259, 260, 261, -1, -1, 264, 265,
708 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
709 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
710 -1, 287, 288, 289, 290, 291, 292, 293, -1, 295,
711 -1, -1, 298, 299, 300, 301, 302, 303, 304, 305,
712 306, -1, 308, 309, -1, -1, 312, 313, 314, 315,
713 259, 260, 261, -1, -1, 264, 265, 266, 267, 268,
714 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
715 279, 280, 281, 282, 283, 284, 285, -1, 287, 288,
716 289, 290, 291, 292, 293, -1, 295, -1, -1, 298,
717 299, 300, 301, 302, 303, 304, 305, 306, -1, 308,
718 309, -1, -1, 312, 313, 314, 315, 259, 260, 261,
719 -1, -1, 264, 265, 266, 267, 268, 269, 270, 271,
720 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
721 282, 283, 284, 285, -1, 287, 288, 289, 290, 291,
722 292, 293, -1, 295, -1, -1, 298, 299, 300, 301,
723 302, 303, 304, 305, 306, -1, 308, 309, -1, -1,
724 312, 313, 314, 315, 259, 260, 261, -1, -1, 264,
725 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
726 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
727 285, -1, 287, 288, 289, 290, 291, 292, 293, -1,
728 295, -1, -1, 298, 299, 300, 301, 302, 303, 304,
729 305, 306, -1, 308, 309, -1, -1, 312, 313, 314,
730 315, 259, 260, 261, -1, -1, 264, 265, 266, 267,
731 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
732 278, 279, 280, 281, 282, 283, 284, 285, -1, 287,
733 288, 289, 290, 291, 292, 293, -1, 295, -1, -1,
734 298, 299, 300, 301, 302, 303, 304, 305, 306, -1,
735 308, 309, -1, -1, 312, 313, 314, 315, 259, 260,
736 261, -1, -1, 264, 265, 266, 267, 268, 269, 270,
737 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
738 281, 282, 283, 284, 285, -1, 287, 288, 289, 290,
739 291, 292, 293, -1, 295, -1, -1, 298, 299, 300,
740 301, 302, 303, 304, 305, 306, -1, 308, 309, -1,
741 -1, 312, 313, 314, 315, 259, 260, 261, -1, -1,
742 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
743 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
744 284, 285, -1, 287, 288, 289, 290, 291, 292, 293,
745 -1, 295, -1, -1, 298, 299, 300, 301, 302, 303,
746 304, 305, 306, -1, 308, 309, -1, -1, 312, 313,
747 314, 315, 259, 260, 261, -1, -1, 264, 265, 266,
748 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
749 277, 278, 279, 280, 281, 282, 283, 284, 285, -1,
750 287, 288, 289, 290, 291, 292, 293, -1, -1, 296,
751 297, -1, 299, 300, 301, 302, 303, 304, 305, 306,
752 -1, 308, 309, -1, -1, 312, 313, 314, 315, 259,
753 260, 261, -1, -1, 264, 265, 266, 267, 268, 269,
754 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
755 280, 281, 282, 283, 284, 285, -1, 287, 288, 289,
756 290, 291, 292, 293, -1, 295, 296, 297, 298, -1,
757 -1, -1, 302, 303, 304, 305, -1, -1, 308, 309,
758 -1, -1, 312, 313, 314, 315, 259, 260, 261, -1,
759 -1, 264, 265, 266, 267, 268, 269, 270, 271, 272,
760 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
761 283, 284, 285, -1, 287, 288, 289, 290, 291, 292,
762 293, -1, -1, 296, 297, 298, -1, -1, -1, 302,
763 303, 304, 305, -1, -1, 308, 309, -1, -1, 312,
764 313, 314, 315, 259, 260, 261, -1, -1, 264, 265,
765 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
766 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
767 -1, 287, 288, 289, -1, -1, -1, 293, -1, 295,
768 -1, -1, 298, 299, 300, 301, 302, 303, 304, 305,
769 306, -1, 308, 309, -1, -1, 312, 313, 314, 315,
770 259, 260, 261, -1, -1, 264, 265, 266, 267, 268,
771 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
772 279, 280, 281, 282, 283, 284, 285, -1, 287, 288,
773 289, -1, -1, -1, 293, -1, 295, -1, -1, 298,
774 299, 300, 301, 302, 303, 304, 305, 306, -1, 308,
775 309, -1, -1, 312, 313, 314, 315, 259, 260, 261,
776 -1, -1, 264, 265, 266, -1, -1, -1, -1, -1,
777 -1, -1, 274, 275, 276, 277, 278, 279, 280, 281,
778 282, 283, 284, 285, -1, 287, 288, 289, 290, 291,
779 292, 293, -1, -1, 296, 297, -1, 299, 300, 301,
780 302, 303, 304, 305, 306, -1, 308, 309, -1, -1,
781 312, 313, 314, 315, 259, 260, 261, -1, -1, 264,
782 265, 266, -1, -1, -1, -1, -1, -1, -1, 274,
783 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
784 285, -1, 287, -1, -1, -1, -1, -1, 293, -1,
785 -1, -1, -1, 298, 299, 300, 301, 302, 303, 304,
786 305, 306, -1, 308, 309, -1, -1, 312, 313, 314,
787 315, 259, 260, 261, -1, -1, 264, 265, 266, -1,
788 -1, -1, -1, -1, -1, -1, 274, 275, 276, 277,
789 278, 279, 280, 281, 282, 283, 284, 285, -1, 287,
790 259, 260, -1, -1, -1, 293, -1, -1, -1, -1,
791 298, 299, 300, 301, 302, 303, 304, 305, 306, -1,
792 308, 309, -1, -1, 312, 313, 314, 315, 287, 288,
793 289, -1, -1, -1, 293, -1, -1, -1, -1, 298,
794 299, 300, 301, -1, 303, 304, 305, 306, -1, 308,
795 309, -1, -1, 312, 313, 314, 315, 260, -1, -1,
796 263, -1, -1, -1, 267, 268, 269, 270, 271, 272,
797 273, 274, -1, 276, 277, -1, 279, 280, 281, 282,
798 283, 284, 285, -1, 287, 288, 289, 290, 291, 292,
799 293, 260, -1, 296, 297, -1, 299, 300, 301, -1,
800 303, 304, 305, 306, -1, 308, 309, -1, -1, 312,
801 313, 314, 315, -1, -1, -1, -1, -1, 287, 288,
802 289, 260, -1, -1, 293, -1, -1, -1, -1, 298,
803 299, 300, 301, -1, 303, 304, 305, 306, -1, 308,
804 309, -1, -1, 312, 313, 314, 315, -1, 287, 288,
805 289, -1, -1, -1, 293, -1, -1, -1, -1, 298,
806 299, 300, 301, -1, 303, 304, 305, 306, -1, 308,
807 309, -1, -1, 312, 313, 314, 315, 263, -1, -1,
808 -1, 267, 268, 269, 270, 271, 272, 273, 274, -1,
809 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
810 -1, 287, 288, 289, 290, 291, 292, 293, -1, -1,
811 296, 297, -1, 299, 300, 301, -1, 303, 304, 305,
812 306, 265, 308, 309, -1, -1, 312, 313, 314, 315,
813 274, -1, 276, 277, 278, 279, 280, 281, 282, 283,
814 284, 285, -1, 287, 288, 289, 290, 291, 292, 293,
815 -1, -1, 296, 297, -1, 299, 300, 301, -1, 303,
816 304, 305, 306, -1, 308, 309, -1, -1, 312, 313,
817 314, 315, 259, 260, 261, -1, -1, 264, 265, 266,
818 259, 260, 261, -1, -1, 264, 265, 266, 275, -1,
819 -1, -1, 259, 260, 261, -1, 275, 264, 265, 266,
820 259, 260, 261, -1, -1, 264, 265, 266, 275, -1,
821 -1, -1, 259, 260, 261, 302, 275, 264, 265, 266,
822 259, 260, 261, 302, -1, 264, 265, 266, 275, -1,
823 -1, -1, 259, 260, 261, 302, 275, 264, 265, 266,
824 259, 260, 261, 302, -1, 264, 265, 266, 275, -1,
825 -1, -1, 259, 260, 261, 302, 275, 264, 265, 266,
826 259, 260, 261, 302, -1, 264, 265, 266, 275, -1,
827 -1, -1, -1, 265, -1, 302, 275, -1, -1, -1,
828 -1, -1, 274, 302, 276, 277, 278, 279, 280, 281,
829 282, 283, 284, 285, -1, 302, -1, -1, -1, -1,
830 265, -1, -1, 302, -1, -1, -1, -1, -1, 274,
831 302, 276, 277, 278, 279, 280, 281, 282, 283, 284,
832 285, -1, -1, -1, -1, -1, -1, 265, 267, 268,
833 269, 270, 271, 272, 273, -1, 274, 302, 276, 277,
834 278, 279, 280, 281, 282, 283, 284, 285, -1, -1,
835 -1, -1, -1, -1, 287, 288, 289, -1, -1, 298,
836 293, -1, -1, -1, 302, 298, 299, 300, 301, -1,
837 303, 304, 305, 306, 307, 308, 309, -1, -1, 312,
838 313, 314, 315, 287, 288, 289, -1, -1, -1, 293,
839 -1, -1, -1, -1, 298, 299, 300, 301, 302, 303,
840 304, 305, 306, -1, 308, 309, -1, -1, 312, 313,
841 314, 315, 287, 288, 289, -1, -1, -1, 293, -1,
842 -1, -1, -1, 298, 299, 300, 301, 302, 303, 304,
843 305, 306, -1, 308, 309, -1, -1, 312, 313, 314,
844 315, 287, 288, 289, -1, -1, -1, 293, -1, -1,
845 -1, -1, 298, 299, 300, 301, -1, 303, 304, 305,
846 306, -1, 308, 309, -1, -1, 312, 313, 314, 315,
847 287, 288, 289, -1, -1, -1, 293, -1, -1, -1,
848 -1, 298, 299, 300, 301, -1, 303, 304, 305, 306,
849 -1, 308, 309, -1, -1, 312, 313, 314, 315, 287,
850 288, 289, -1, -1, -1, 293, -1, -1, -1, -1,
851 298, 299, 300, 301, -1, 303, 304, 305, 306, -1,
852 308, 309, -1, -1, 312, 313, 314, 315, 287, 288,
853 289, -1, -1, -1, 293, -1, -1, -1, -1, 298,
854 299, 300, 301, -1, 303, 304, 305, 306, -1, 308,
855 309, -1, -1, 312, 313, 314, 315, 287, 288, 289,
856 -1, -1, -1, 293, -1, -1, -1, -1, 298, 299,
857 300, 301, -1, 303, 304, 305, 306, -1, 308, 309,
858 -1, -1, 312, 313, 314, 315, 274, -1, 276, 277,
859 278, 279, 280, 281, 282, 283, 284, 285, 274, -1,
860 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
861 -1, -1, -1, 274, 302, 276, 277, 278, 279, 280,
862 281, 282, 283, 284, 285, 274, 302, 276, 277, 278,
863 279, 280, 281, 282, 283, 284, 285, -1, -1, -1,
864 274, 302, 276, 277, 278, 279, 280, 281, 282, 283,
865 284, 285, 274, 302, 276, 277, 278, 279, 280, 281,
866 282, 283, 284, 285, 259, 260, -1, -1, 302, -1,
867 -1, -1, -1, -1, -1, -1, -1, 260, -1, 274,
868 302, 276, 277, 278, 279, 280, 281, 282, 283, 284,
869 285, 274, 260, 276, 277, 278, 279, 280, 281, 282,
870 283, 284, 285, -1, -1, -1, 274, -1, 276, 277,
871 278, 279, 280, 281, 282, 283, 284, 285, 265, -1,
872 -1, -1, -1, -1, -1, -1, -1, 274, -1, 276,
873 277, 278, 279, 280, 281, 282, 283, 284, 285, 265,
874 -1, -1, -1, -1, -1, -1, -1, -1, 274, -1,
875 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
876 265, -1, -1, -1, -1, -1, -1, -1, -1, 274,
877 -1, 276, 277, 278, 279, 280, 281, 282, 283, 284,
878 285, 274, 275, 276, 277, 278, 279, 280, 281, 282,
879 283, 284, 285, 274, -1, 276, 277, 278, 279, 280,
880 281, 282, 283, 284, 285, 277, 278, 279, 280, 281,
887 #define YYMAXTOKEN 329
890 "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
891 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
892 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
893 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
894 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
895 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
896 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"UNEXPECTED","BAD_DECIMAL","NL",
897 "SEMI_COLON","LBRACE","RBRACE","LBOX","RBOX","COMMA","IO_OUT","ASSIGN",
898 "ADD_ASG","SUB_ASG","MUL_ASG","DIV_ASG","MOD_ASG","POW_ASG","QMARK","COLON",
899 "OR","AND","IN","MATCH","EQ","NEQ","LT","LTE","GT","GTE","CAT","GETLINE","PLUS",
900 "MINUS","MUL","DIV","MOD","NOT","UMINUS","IO_IN","PIPE","POW","INC_or_DEC",
901 "DOLLAR","FIELD","LPAREN","RPAREN","DOUBLE","STRING_","RE","ID","D_ID",
902 "FUNCT_ID","BUILTIN","PRINT","PRINTF","SPLIT","MATCH_FUNC","SUB","GSUB","DO",
903 "WHILE","FOR","BREAK","CONTINUE","IF","ELSE","DELETE","BEGIN","END","EXIT",
904 "NEXT","RETURN","FUNCTION",
908 "program : program_block",
909 "program : program program_block",
910 "program_block : PA_block",
911 "program_block : function_def",
912 "program_block : error block",
915 "PA_block : BEGIN $$1 block",
917 "PA_block : END $$2 block",
919 "PA_block : expr $$3 block_or_separator",
922 "PA_block : expr COMMA $$4 expr $$5 block_or_separator",
923 "block : LBRACE statement_list RBRACE",
924 "block : LBRACE error RBRACE",
925 "block_or_separator : block",
926 "block_or_separator : separator",
927 "statement_list : statement",
928 "statement_list : statement_list statement",
930 "statement : expr separator",
931 "statement : separator",
932 "statement : error separator",
933 "statement : BREAK separator",
934 "statement : CONTINUE separator",
935 "statement : return_statement",
936 "statement : NEXT separator",
938 "separator : SEMI_COLON",
940 "expr : lvalue ASSIGN expr",
941 "expr : lvalue ADD_ASG expr",
942 "expr : lvalue SUB_ASG expr",
943 "expr : lvalue MUL_ASG expr",
944 "expr : lvalue DIV_ASG expr",
945 "expr : lvalue MOD_ASG expr",
946 "expr : lvalue POW_ASG expr",
947 "expr : expr EQ expr",
948 "expr : expr NEQ expr",
949 "expr : expr LT expr",
950 "expr : expr LTE expr",
951 "expr : expr GT expr",
952 "expr : expr GTE expr",
953 "expr : expr MATCH expr",
955 "expr : expr OR $$6 expr",
957 "expr : expr AND $$7 expr",
960 "expr : expr QMARK $$8 expr COLON $$9 expr",
962 "cat_expr : cat_expr p_expr",
966 "p_expr : LPAREN expr RPAREN",
968 "p_expr : p_expr PLUS p_expr",
969 "p_expr : p_expr MINUS p_expr",
970 "p_expr : p_expr MUL p_expr",
971 "p_expr : p_expr DIV p_expr",
972 "p_expr : p_expr MOD p_expr",
973 "p_expr : p_expr POW p_expr",
974 "p_expr : NOT p_expr",
975 "p_expr : PLUS p_expr",
976 "p_expr : MINUS p_expr",
978 "p_expr : ID INC_or_DEC",
979 "p_expr : INC_or_DEC lvalue",
980 "p_expr : field INC_or_DEC",
981 "p_expr : INC_or_DEC field",
986 "args : args COMMA expr",
987 "builtin : BUILTIN mark LPAREN arglist RPAREN",
989 "statement : print mark pr_args pr_direction separator",
993 "pr_args : LPAREN arg2 RPAREN",
994 "pr_args : LPAREN RPAREN",
995 "arg2 : expr COMMA expr",
996 "arg2 : arg2 COMMA expr",
998 "pr_direction : IO_OUT expr",
999 "if_front : IF LPAREN expr RPAREN",
1000 "statement : if_front statement",
1002 "statement : if_front statement else statement",
1004 "statement : do statement WHILE LPAREN expr RPAREN separator",
1005 "while_front : WHILE LPAREN expr RPAREN",
1006 "statement : while_front statement",
1007 "statement : for1 for2 for3 statement",
1008 "for1 : FOR LPAREN SEMI_COLON",
1009 "for1 : FOR LPAREN expr SEMI_COLON",
1010 "for2 : SEMI_COLON",
1011 "for2 : expr SEMI_COLON",
1013 "for3 : expr RPAREN",
1014 "expr : expr IN ID",
1015 "expr : LPAREN arg2 RPAREN IN ID",
1016 "lvalue : ID mark LBOX args RBOX",
1017 "p_expr : ID mark LBOX args RBOX",
1018 "p_expr : ID mark LBOX args RBOX INC_or_DEC",
1019 "statement : DELETE ID mark LBOX args RBOX separator",
1020 "array_loop_front : FOR LPAREN ID IN ID RPAREN",
1021 "statement : array_loop_front statement",
1023 "field : DOLLAR D_ID",
1024 "field : DOLLAR D_ID mark LBOX args RBOX",
1025 "field : DOLLAR p_expr",
1026 "field : LPAREN field RPAREN",
1028 "expr : field ASSIGN expr",
1029 "expr : field ADD_ASG expr",
1030 "expr : field SUB_ASG expr",
1031 "expr : field MUL_ASG expr",
1032 "expr : field DIV_ASG expr",
1033 "expr : field MOD_ASG expr",
1034 "expr : field POW_ASG expr",
1035 "p_expr : split_front split_back",
1036 "split_front : SPLIT LPAREN expr COMMA ID",
1037 "split_back : RPAREN",
1038 "split_back : COMMA expr RPAREN",
1039 "p_expr : MATCH_FUNC LPAREN expr COMMA re_arg RPAREN",
1041 "statement : EXIT separator",
1042 "statement : EXIT expr separator",
1043 "return_statement : RETURN separator",
1044 "return_statement : RETURN expr separator",
1046 "p_expr : getline fvalue",
1047 "p_expr : getline_file p_expr",
1048 "p_expr : p_expr PIPE GETLINE",
1049 "p_expr : p_expr PIPE GETLINE fvalue",
1050 "getline : GETLINE",
1053 "getline_file : getline IO_IN",
1054 "getline_file : getline fvalue IO_IN",
1055 "p_expr : sub_or_gsub LPAREN re_arg COMMA expr sub_back",
1056 "sub_or_gsub : SUB",
1057 "sub_or_gsub : GSUB",
1058 "sub_back : RPAREN",
1059 "sub_back : COMMA fvalue RPAREN",
1060 "function_def : funct_start block",
1061 "funct_start : funct_head LPAREN f_arglist RPAREN",
1062 "funct_head : FUNCTION ID",
1063 "funct_head : FUNCTION FUNCT_ID",
1065 "f_arglist : f_args",
1067 "f_args : f_args COMMA ID",
1068 "p_expr : FUNCT_ID mark call_args",
1069 "call_args : LPAREN RPAREN",
1070 "call_args : ca_front ca_back",
1071 "ca_front : LPAREN",
1072 "ca_front : ca_front expr COMMA",
1073 "ca_front : ca_front ID COMMA",
1074 "ca_back : expr RPAREN",
1075 "ca_back : ID RPAREN",
1080 #define YYLEX() yylex(&yylval)
1082 #define YYLEX() yylex()
1085 #define yyclearin (yychar=(-1))
1086 #define yyerrok (yyerrflag=0)
1089 #define YYMAXDEPTH YYSTACKSIZE
1093 #define YYSTACKSIZE YYMAXDEPTH
1095 #define YYSTACKSIZE 500
1096 #define YYMAXDEPTH 500
1111 short yyss
[YYSTACKSIZE
];
1112 YYSTYPE yyvs
[YYSTACKSIZE
];
1114 #define yystacksize YYSTACKSIZE
1115 #line 1041 "parse.y"
1117 /* resize the code for a user function */
1119 static void resize_fblock( fbp
, code_ptr
)
1124 code1(_RET0
) ; /* make sure there is always a return statement */
1128 { code1(_HALT
) ; /*stops da() */
1129 add_to_fdump_list(fbp
) ;
1133 if ( (size
= code_ptr
- fbp
->code
) > PAGE_SZ
-1 )
1134 overflow("function code size", PAGE_SZ
) ;
1136 /* resize the code */
1137 fbp
->code
= (INST
*) zrealloc(fbp
->code
, PAGE_SZ
*sizeof(INST
),
1138 size
* sizeof(INST
) ) ;
1143 /* convert FE_PUSHA to FE_PUSHI
1144 or F_PUSH to F_PUSHI
1147 static void field_A2I()
1150 if ( code_ptr
[-1].op
== FE_PUSHA
&&
1151 code_ptr
[-1].ptr
== (PTR
) 0)
1152 /* On most architectures, the two tests are the same; a good
1153 compiler might eliminate one. On LM_DOS, and possibly other
1154 segmented architectures, they are not */
1155 { code_ptr
[-1].op
= FE_PUSHI
; }
1158 cp
= (CELL
*) code_ptr
[-1].ptr
;
1163 SAMESEG(cp
,field
) &&
1165 cp
> NF
&& cp
<= LAST_PFIELD
)
1167 code_ptr
[-2].op
= _PUSHI
;
1169 else if ( cp
== NF
)
1170 { code_ptr
[-2].op
= NF_PUSHI
; code_ptr
-- ; }
1174 code_ptr
[-2].op
= F_PUSHI
;
1175 code_ptr
-> op
= field_addr_to_index( code_ptr
[-1].ptr
) ;
1181 /* we've seen an ID in a context where it should be a VAR,
1182 check that's consistent with previous usage */
1184 static void check_var( p
)
1185 register SYMTAB
*p
;
1189 case ST_NONE
: /* new id */
1191 p
->stval
.cp
= new_CELL() ;
1192 p
->stval
.cp
->type
= C_NOINIT
;
1195 case ST_LOCAL_NONE
:
1196 p
->type
= ST_LOCAL_VAR
;
1197 active_funct
->typev
[p
->offset
] = ST_LOCAL_VAR
;
1201 case ST_LOCAL_VAR
: break ;
1209 /* we've seen an ID in a context where it should be an ARRAY,
1210 check that's consistent with previous usage */
1211 static void check_array(p
)
1212 register SYMTAB
*p
;
1216 case ST_NONE
: /* a new array */
1217 p
->type
= ST_ARRAY
;
1218 p
->stval
.array
= new_ARRAY() ;
1222 case ST_LOCAL_ARRAY
:
1225 case ST_LOCAL_NONE
:
1226 p
->type
= ST_LOCAL_ARRAY
;
1227 active_funct
->typev
[p
->offset
] = ST_LOCAL_ARRAY
;
1230 default : type_error(p
) ; break ;
1234 static void code_array(p
)
1235 register SYMTAB
*p
;
1236 { if ( is_local(p
) )
1237 { code1(LA_PUSHA
) ; code1(p
->offset
) ; }
1238 else code2(A_PUSHA
, p
->stval
.array
) ;
1242 static int current_offset()
1246 case SCOPE_MAIN
: return code_ptr
- main_start
;
1247 case SCOPE_BEGIN
: return code_ptr
- begin_code
.start
;
1248 case SCOPE_END
: return code_ptr
- end_code
.start
;
1249 case SCOPE_FUNCT
: return code_ptr
- active_funct
->code
;
1251 /* can't get here */
1255 /* we've seen an ID as an argument to a user defined function */
1257 static void code_call_id( p
, ip
)
1258 register CA_REC
*p
;
1259 register SYMTAB
*ip
;
1260 { static CELL dummy
;
1266 code2(_PUSHI
, ip
->stval
.cp
) ;
1276 p
->type
= CA_ARRAY
;
1277 code2(A_PUSHA
, ip
->stval
.array
) ;
1280 case ST_LOCAL_ARRAY
:
1281 p
->type
= CA_ARRAY
;
1286 /* not enough info to code it now; it will have to
1291 p
->call_offset
= current_offset() ;
1293 code2(_PUSHI
, &dummy
) ;
1296 case ST_LOCAL_NONE
:
1297 p
->type
= ST_LOCAL_NONE
;
1298 p
->call_offset
= current_offset() ;
1299 p
->type_p
= & active_funct
->typev
[ip
->offset
] ;
1307 bozo("code_call_id") ;
1313 /* an RE by itself was coded as _MATCH0 , change to
1314 push as an expression */
1316 static void RE_as_arg()
1317 { CELL
*cp
= ZMALLOC(CELL
) ;
1321 cp
->ptr
= code_ptr
[1].ptr
;
1327 { int yy
= yyparse() ;
1330 extern struct yacc_mem
*yacc_memp
;
1332 yacc_memp
++ ; /* puts parser tables in mem pool */
1335 if ( resolve_list
) resolve_fcalls() ;
1339 #line 1340 "y.tab.c"
1340 #define YYABORT goto yyabort
1341 #define YYACCEPT goto yyaccept
1342 #define YYERROR goto yyerrlab
1346 register int yyn
, yystate
;
1356 register short *yyssp
;
1357 register YYSTYPE
*yyvsp
;
1359 short yyss
[YYSTACKSIZE
];
1360 YYSTYPE yyvs
[YYSTACKSIZE
];
1364 extern char *getenv();
1366 if (yys
= getenv("YYDEBUG"))
1369 if (yyn
>= '0' && yyn
<= '9')
1370 yydebug
= yyn
- '0';
1380 *yyssp
= yystate
= 0;
1383 if (yyn
= yydefred
[yystate
]) goto yyreduce
;
1386 if ((yychar
= YYLEX()) < 0) yychar
= 0;
1391 if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
1392 if (!yys
) yys
= "illegal-symbol";
1393 printf("yydebug: state %d, reading %d (%s)\n", yystate
,
1398 if ((yyn
= yysindex
[yystate
]) && (yyn
+= yychar
) >= 0 &&
1399 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yychar
)
1403 printf("yydebug: state %d, shifting to state %d\n",
1404 yystate
, yytable
[yyn
]);
1406 if (yyssp
>= yyss
+ yystacksize
- 1)
1410 *++yyssp
= yystate
= yytable
[yyn
];
1413 if (yyerrflag
> 0) --yyerrflag
;
1416 if ((yyn
= yyrindex
[yystate
]) && (yyn
+= yychar
) >= 0 &&
1417 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yychar
)
1422 if (yyerrflag
) goto yyinrecovery
;
1427 yyerror("syntax error");
1439 if ((yyn
= yysindex
[*yyssp
]) && (yyn
+= YYERRCODE
) >= 0 &&
1440 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == YYERRCODE
)
1444 printf("yydebug: state %d, error recovery shifting\
1445 to state %d\n", *yyssp
, yytable
[yyn
]);
1447 if (yyssp
>= yyss
+ yystacksize
- 1)
1451 *++yyssp
= yystate
= yytable
[yyn
];
1459 printf("yydebug: error recovery discarding state %d\n",
1462 if (yyssp
<= yyss
) goto yyabort
;
1470 if (yychar
== 0) goto yyabort
;
1475 if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
1476 if (!yys
) yys
= "illegal-symbol";
1477 printf("yydebug: state %d, error recovery discards token %d (%s)\n",
1478 yystate
, yychar
, yys
);
1487 printf("yydebug: state %d, reducing by rule %d (%s)\n",
1488 yystate
, yyn
, yyrule
[yyn
]);
1491 yyval
= yyvsp
[1-yym
];
1496 { if (scope
== SCOPE_FUNCT
)
1497 { restore_ids() ; scope
= SCOPE_MAIN
; }
1498 code_ptr
= main_code_ptr
;
1503 { /* this do nothing action removes a vacuous warning
1510 be_expand(&begin_code
) ;
1511 scope
= SCOPE_BEGIN
;
1516 { be_shrink(&begin_code
) ;
1517 scope
= SCOPE_MAIN
;
1523 be_expand(&end_code
) ;
1529 { be_shrink(&end_code
) ;
1530 scope
= SCOPE_MAIN
;
1535 { code_jmp(_JZ
, (INST
*)0) ; }
1539 { patch_jmp( code_ptr
) ; }
1543 { code_push(yyvsp
[-1].start
, code_ptr
- yyvsp
[-1].start
) ;
1544 code_ptr
= yyvsp
[-1].start
;
1545 code1(_RANGE
) ; code1(1) ;
1547 code_ptr
+= code_pop(code_ptr
) ;
1549 yyvsp
[-1].start
[2].op
= code_ptr
- (yyvsp
[-1].start
+1) ;
1558 { yyvsp
[-5].start
[3].op
= yyvsp
[0].start
- (yyvsp
[-5].start
+1) ;
1559 yyvsp
[-5].start
[4].op
= code_ptr
- (yyvsp
[-5].start
+1) ;
1564 { yyval
.start
= yyvsp
[-1].start
; }
1568 { yyval
.start
= code_ptr
; /* does nothing won't be executed */
1569 print_flag
= getline_flag
= paren_cnt
= 0 ;
1574 { yyval
.start
= code_ptr
;
1575 code1(_PUSHINT
) ; code1(0) ;
1576 code2(_PRINT
, bi_print
) ;
1585 { yyval
.start
= code_ptr
; }
1589 { yyval
.start
= code_ptr
;
1590 print_flag
= getline_flag
= 0 ;
1597 { yyval
.start
= code_ptr
; BC_insert('B', code_ptr
+1) ;
1598 code2(_JMP
, 0) /* don't use code_jmp ! */ ; }
1602 { yyval
.start
= code_ptr
; BC_insert('C', code_ptr
+1) ;
1607 { if ( scope
!= SCOPE_FUNCT
)
1608 compile_error("return outside function body") ;
1613 { if ( scope
!= SCOPE_MAIN
)
1614 compile_error( "improper use of next" ) ;
1615 yyval
.start
= code_ptr
;
1621 { code1(_ASSIGN
) ; }
1625 { code1(_ADD_ASG
) ; }
1629 { code1(_SUB_ASG
) ; }
1633 { code1(_MUL_ASG
) ; }
1637 { code1(_DIV_ASG
) ; }
1641 { code1(_MOD_ASG
) ; }
1645 { code1(_POW_ASG
) ; }
1674 if ( yyvsp
[0].start
== code_ptr
- 2 )
1676 if ( yyvsp
[0].start
->op
== _MATCH0
) yyvsp
[0].start
->op
= _MATCH1
;
1678 else /* check for string */
1679 if ( yyvsp
[0].start
->op
== _PUSHS
)
1680 { CELL
*cp
= ZMALLOC(CELL
) ;
1682 cp
->type
= C_STRING
;
1683 cp
->ptr
= yyvsp
[0].start
[1].ptr
;
1686 code2(_MATCH1
, cp
->ptr
) ;
1689 else code1(_MATCH2
) ;
1691 else code1(_MATCH2
) ;
1693 if ( !yyvsp
[-1].ival
) code1(_NOT
) ;
1699 code_jmp(_JNZ
, (INST
*)0) ;
1705 { patch_jmp(code_ptr
) ; code1(_TEST
) ; }
1709 { code1(_DUP
) ; code_jmp(_JZ
, (INST
*)0) ;
1714 { patch_jmp(code_ptr
) ; code1(_TEST
) ; }
1718 { code_jmp(_JZ
, (INST
*)0) ; }
1722 { code_jmp(_JMP
, (INST
*)0) ; }
1726 { patch_jmp(code_ptr
) ; patch_jmp(yyvsp
[0].start
) ; }
1734 { yyval
.start
= code_ptr
; code2(_PUSHD
, yyvsp
[0].ptr
) ; }
1738 { yyval
.start
= code_ptr
; code2(_PUSHS
, yyvsp
[0].ptr
) ; }
1742 { check_var(yyvsp
[0].stp
) ;
1743 yyval
.start
= code_ptr
;
1744 if ( is_local(yyvsp
[0].stp
) )
1745 { code1(L_PUSHI
) ; code1(yyvsp
[0].stp
->offset
) ; }
1746 else code2(_PUSHI
, yyvsp
[0].stp
->stval
.cp
) ;
1751 { yyval
.start
= yyvsp
[-1].start
; }
1755 { yyval
.start
= code_ptr
; code2(_MATCH0
, yyvsp
[0].ptr
) ; }
1783 { yyval
.start
= yyvsp
[0].start
; code1(_NOT
) ; }
1787 { yyval
.start
= yyvsp
[0].start
; code1(_UPLUS
) ; }
1791 { yyval
.start
= yyvsp
[0].start
; code1(_UMINUS
) ; }
1795 { check_var(yyvsp
[-1].stp
) ;
1796 yyval
.start
= code_ptr
;
1797 code_address(yyvsp
[-1].stp
) ;
1799 if ( yyvsp
[0].ival
== '+' ) code1(_POST_INC
) ;
1800 else code1(_POST_DEC
) ;
1805 { yyval
.start
= yyvsp
[0].start
;
1806 if ( yyvsp
[-1].ival
== '+' ) code1(_PRE_INC
) ;
1807 else code1(_PRE_DEC
) ;
1812 { if (yyvsp
[0].ival
== '+' ) code1(F_POST_INC
) ;
1813 else code1(F_POST_DEC
) ;
1818 { yyval
.start
= yyvsp
[0].start
;
1819 if ( yyvsp
[-1].ival
== '+' ) code1(F_PRE_INC
) ;
1820 else code1( F_PRE_DEC
) ;
1825 { yyval
.start
= code_ptr
;
1826 check_var(yyvsp
[0].stp
) ;
1827 code_address(yyvsp
[0].stp
) ;
1832 { yyval
.ival
= 0 ; }
1836 { yyval
.ival
= 1 ; }
1840 { yyval
.ival
= yyvsp
[-2].ival
+ 1 ; }
1844 { BI_REC
*p
= yyvsp
[-4].bip
;
1845 yyval
.start
= yyvsp
[-3].start
;
1846 if ( p
-> min_args
> yyvsp
[-1].ival
|| p
->max_args
< yyvsp
[-1].ival
)
1848 "wrong number of arguments in call to %s" ,
1850 if ( p
->min_args
!= p
->max_args
) /* variable args */
1851 { code1(_PUSHINT
) ; code1(yyvsp
[-1].ival
) ; }
1852 code2(_BUILTIN
, p
->fp
) ;
1857 { yyval
.start
= code_ptr
; }
1861 { code2(_PRINT
, yyvsp
[-4].fp
) ; yyval
.start
= yyvsp
[-3].start
;
1862 if ( yyvsp
[-4].fp
== bi_printf
&& yyvsp
[-2].ival
== 0 )
1863 compile_error("no arguments in call to printf") ;
1865 yyval
.start
= yyvsp
[-3].start
;
1870 { yyval
.fp
= bi_print
; print_flag
= 1 ;}
1874 { yyval
.fp
= bi_printf
; print_flag
= 1 ; }
1878 { code1(_PUSHINT
) ; code1(yyvsp
[0].ival
) ; }
1882 { yyval
.ival
= yyvsp
[-1].arg2p
->cnt
; zfree(yyvsp
[-1].arg2p
,sizeof(ARG2_REC
)) ;
1883 code1(_PUSHINT
) ; code1(yyval
.ival
) ;
1888 { yyval
.ival
=0 ; code1(_PUSHINT
) ; code1(0) ; }
1892 { yyval
.arg2p
= (ARG2_REC
*) zmalloc(sizeof(ARG2_REC
)) ;
1893 yyval
.arg2p
->start
= yyvsp
[-2].start
;
1894 yyval
.arg2p
->cnt
= 2 ;
1899 { yyval
.arg2p
= yyvsp
[-2].arg2p
; yyval
.arg2p
->cnt
++ ; }
1903 { code1(_PUSHINT
) ; code1(yyvsp
[-1].ival
) ; }
1907 { yyval
.start
= yyvsp
[-1].start
; eat_nl() ; code_jmp(_JZ
, (INST
*)0) ; }
1911 { patch_jmp( code_ptr
) ; }
1915 { eat_nl() ; code_jmp(_JMP
, (INST
*)0) ; }
1919 { patch_jmp(code_ptr
) ; patch_jmp(yyvsp
[0].start
) ; }
1923 { eat_nl() ; BC_new() ; }
1927 { yyval
.start
= yyvsp
[-5].start
;
1928 code_jmp(_JNZ
, yyvsp
[-5].start
) ;
1929 BC_clear(code_ptr
, yyvsp
[-2].start
) ; }
1933 { eat_nl() ; BC_new() ;
1934 yyval
.start
= yyvsp
[-1].start
;
1936 /* check if const expression */
1937 if ( code_ptr
- 2 == yyvsp
[-1].start
&&
1938 code_ptr
[-2].op
== _PUSHD
&&
1939 *(double*)code_ptr
[-1].ptr
!= 0.0
1944 code_push(yyvsp
[-1].start
, code_ptr
-yyvsp
[-1].start
) ;
1945 code_ptr
= yyvsp
[-1].start
;
1946 code2(_JMP
, (INST
*)0) ; /* code2() not code_jmp() */
1953 INST
*c_addr
; int len
;
1955 if ( yyvsp
[-1].start
!= yyvsp
[0].start
) /* real test in loop */
1957 yyvsp
[-1].start
[1].op
= code_ptr
-(yyvsp
[-1].start
+1) ;
1959 len
= code_pop(code_ptr
) ;
1961 code_jmp(_JNZ
, yyvsp
[0].start
) ;
1962 BC_clear(code_ptr
, c_addr
) ;
1966 code_jmp(_JMP
, yyvsp
[-1].start
) ;
1967 BC_clear(code_ptr
, yyvsp
[0].start
) ;
1974 INST
*cont_address
= code_ptr
;
1975 unsigned len
= code_pop(code_ptr
) ;
1979 if ( yyvsp
[-2].start
!= yyvsp
[0].start
) /* real test in for2 */
1981 yyvsp
[0].start
[-1].op
= code_ptr
- yyvsp
[0].start
+ 1 ;
1982 len
= code_pop(code_ptr
) ;
1984 code_jmp(_JNZ
, yyvsp
[0].start
) ;
1987 code_jmp(_JMP
, yyvsp
[0].start
) ;
1989 BC_clear(code_ptr
, cont_address
) ;
1995 { yyval
.start
= code_ptr
; }
1999 { yyval
.start
= yyvsp
[-1].start
; code1(_POP
) ; }
2003 { yyval
.start
= code_ptr
; }
2008 if ( code_ptr
- 2 == yyvsp
[-1].start
&&
2009 code_ptr
[-2].op
== _PUSHD
&&
2010 * (double*) code_ptr
[-1].ptr
!= 0.0
2015 code_push(yyvsp
[-1].start
, code_ptr
-yyvsp
[-1].start
) ;
2016 code_ptr
= yyvsp
[-1].start
;
2017 code2(_JMP
, (INST
*)0) ;
2023 { eat_nl() ; BC_new() ; code_push((INST
*)0,0) ; }
2027 { eat_nl() ; BC_new() ;
2029 code_push(yyvsp
[-1].start
, code_ptr
- yyvsp
[-1].start
) ;
2030 code_ptr
-= code_ptr
- yyvsp
[-1].start
;
2035 { check_array(yyvsp
[0].stp
) ;
2036 code_array(yyvsp
[0].stp
) ;
2042 { yyval
.start
= yyvsp
[-3].arg2p
->start
;
2043 code1(A_CAT
) ; code1(yyvsp
[-3].arg2p
->cnt
) ;
2044 zfree(yyvsp
[-3].arg2p
, sizeof(ARG2_REC
)) ;
2046 check_array(yyvsp
[0].stp
) ;
2047 code_array(yyvsp
[0].stp
) ;
2054 if ( yyvsp
[-1].ival
> 1 )
2055 { code1(A_CAT
) ; code1(yyvsp
[-1].ival
) ; }
2057 check_array(yyvsp
[-4].stp
) ;
2058 if( is_local(yyvsp
[-4].stp
) )
2059 { code1(LAE_PUSHA
) ; code1(yyvsp
[-4].stp
->offset
) ; }
2060 else code2(AE_PUSHA
, yyvsp
[-4].stp
->stval
.array
) ;
2061 yyval
.start
= yyvsp
[-3].start
;
2067 if ( yyvsp
[-1].ival
> 1 )
2068 { code1(A_CAT
) ; code1(yyvsp
[-1].ival
) ; }
2070 check_array(yyvsp
[-4].stp
) ;
2071 if( is_local(yyvsp
[-4].stp
) )
2072 { code1(LAE_PUSHI
) ; code1(yyvsp
[-4].stp
->offset
) ; }
2073 else code2(AE_PUSHI
, yyvsp
[-4].stp
->stval
.array
) ;
2074 yyval
.start
= yyvsp
[-3].start
;
2080 if ( yyvsp
[-2].ival
> 1 )
2081 { code1(A_CAT
) ; code1(yyvsp
[-2].ival
) ; }
2083 check_array(yyvsp
[-5].stp
) ;
2084 if( is_local(yyvsp
[-5].stp
) )
2085 { code1(LAE_PUSHA
) ; code1(yyvsp
[-5].stp
->offset
) ; }
2086 else code2(AE_PUSHA
, yyvsp
[-5].stp
->stval
.array
) ;
2087 if ( yyvsp
[0].ival
== '+' ) code1(_POST_INC
) ;
2088 else code1(_POST_DEC
) ;
2090 yyval
.start
= yyvsp
[-4].start
;
2096 yyval
.start
= yyvsp
[-4].start
;
2097 if ( yyvsp
[-2].ival
> 1 ) { code1(A_CAT
) ; code1(yyvsp
[-2].ival
) ; }
2098 check_array(yyvsp
[-5].stp
) ;
2099 code_array(yyvsp
[-5].stp
) ;
2105 { eat_nl() ; BC_new() ;
2106 yyval
.start
= code_ptr
;
2108 check_var(yyvsp
[-3].stp
) ;
2109 code_address(yyvsp
[-3].stp
) ;
2110 check_array(yyvsp
[-1].stp
) ;
2111 code_array(yyvsp
[-1].stp
) ;
2113 code2(SET_ALOOP
, (INST
*)0) ;
2119 yyvsp
[0].start
[-1].op
= code_ptr
- yyvsp
[0].start
+ 1 ;
2120 BC_clear( code_ptr
+3 , code_ptr
) ;
2121 code_jmp(ALOOP
, yyvsp
[0].start
) ;
2122 code_ptr
++->ptr
= (PTR
) ZMALLOC(ALOOP_STATE
) ;
2127 { yyval
.start
= code_ptr
; code2(F_PUSHA
, yyvsp
[0].cp
) ; }
2131 { check_var(yyvsp
[0].stp
) ;
2132 yyval
.start
= code_ptr
;
2133 if ( is_local(yyvsp
[0].stp
) )
2134 { code1(L_PUSHI
) ; code1(yyvsp
[0].stp
->offset
) ; }
2135 else code2(_PUSHI
, yyvsp
[0].stp
->stval
.cp
) ;
2143 if ( yyvsp
[-1].ival
> 1 )
2144 { code1(A_CAT
) ; code1(yyvsp
[-1].ival
) ; }
2146 check_array(yyvsp
[-4].stp
) ;
2147 if( is_local(yyvsp
[-4].stp
) )
2148 { code1(LAE_PUSHI
) ; code1(yyvsp
[-4].stp
->offset
) ; }
2149 else code2(AE_PUSHI
, yyvsp
[-4].stp
->stval
.array
) ;
2153 yyval
.start
= yyvsp
[-3].start
;
2158 { yyval
.start
= yyvsp
[0].start
; CODE_FE_PUSHA() ; }
2162 { yyval
.start
= yyvsp
[-1].start
; }
2170 { code1(F_ASSIGN
) ; }
2174 { code1(F_ADD_ASG
) ; }
2178 { code1(F_SUB_ASG
) ; }
2182 { code1(F_MUL_ASG
) ; }
2186 { code1(F_DIV_ASG
) ; }
2190 { code1(F_MOD_ASG
) ; }
2194 { code1(F_POW_ASG
) ; }
2198 { code2(_BUILTIN
, bi_split
) ; }
2202 { yyval
.start
= yyvsp
[-2].start
;
2203 check_array(yyvsp
[0].stp
) ;
2204 code_array(yyvsp
[0].stp
) ;
2209 { code2(_PUSHI
, &fs_shadow
) ; }
2214 if ( yyvsp
[-1].start
== code_ptr
- 2 )
2216 if ( code_ptr
[-2].op
== _MATCH0
)
2219 if ( code_ptr
[-2].op
== _PUSHS
)
2220 { CELL
*cp
= ZMALLOC(CELL
) ;
2222 cp
->type
= C_STRING
;
2223 cp
->ptr
= code_ptr
[-1].ptr
;
2224 cast_for_split(cp
) ;
2225 code_ptr
[-2].op
= _PUSHC
;
2226 code_ptr
[-1].ptr
= (PTR
) cp
;
2233 { yyval
.start
= yyvsp
[-3].start
;
2234 code2(_BUILTIN
, bi_match
) ;
2240 if ( yyvsp
[0].start
== code_ptr
- 2 )
2242 if ( yyvsp
[0].start
->op
== _MATCH0
) RE_as_arg() ;
2244 if ( yyvsp
[0].start
->op
== _PUSHS
)
2245 { CELL
*cp
= ZMALLOC(CELL
) ;
2247 cp
->type
= C_STRING
;
2248 cp
->ptr
= yyvsp
[0].start
[1].ptr
;
2250 yyvsp
[0].start
->op
= _PUSHC
;
2251 yyvsp
[0].start
[1].ptr
= (PTR
) cp
;
2258 { yyval
.start
= code_ptr
;
2263 { yyval
.start
= yyvsp
[-1].start
; code1(_EXIT
) ; }
2267 { yyval
.start
= code_ptr
;
2272 { yyval
.start
= yyvsp
[-1].start
; code1(_RET
) ; }
2276 { yyval
.start
= code_ptr
;
2277 code2(F_PUSHA
, &field
[0]) ;
2278 code1(_PUSHINT
) ; code1(0) ;
2279 code2(_BUILTIN
, bi_getline
) ;
2285 { yyval
.start
= yyvsp
[0].start
;
2286 code1(_PUSHINT
) ; code1(0) ;
2287 code2(_BUILTIN
, bi_getline
) ;
2293 { code1(_PUSHINT
) ; code1(F_IN
) ;
2294 code2(_BUILTIN
, bi_getline
) ;
2295 /* getline_flag already off in yylex() */
2300 { code2(F_PUSHA
, &field
[0]) ;
2301 code1(_PUSHINT
) ; code1(PIPE_IN
) ;
2302 code2(_BUILTIN
, bi_getline
) ;
2308 code1(_PUSHINT
) ; code1(PIPE_IN
) ;
2309 code2(_BUILTIN
, bi_getline
) ;
2314 { getline_flag
= 1 ; }
2318 { yyval
.start
= code_ptr
;
2319 code2(F_PUSHA
, field
+0) ;
2324 { yyval
.start
= yyvsp
[-1].start
; }
2329 if ( yyvsp
[0].start
- yyvsp
[-1].start
== 2 && yyvsp
[-1].start
->op
== _PUSHS
)
2330 { /* cast from STRING to REPL at compile time */
2331 CELL
*cp
= ZMALLOC(CELL
) ;
2332 cp
->type
= C_STRING
;
2333 cp
->ptr
= yyvsp
[-1].start
[1].ptr
;
2335 yyvsp
[-1].start
->op
= _PUSHC
;
2336 yyvsp
[-1].start
[1].ptr
= (PTR
) cp
;
2338 code2(_BUILTIN
, yyvsp
[-5].fp
) ;
2339 yyval
.start
= yyvsp
[-3].start
;
2344 { yyval
.fp
= bi_sub
; }
2348 { yyval
.fp
= bi_gsub
; }
2352 { yyval
.start
= code_ptr
;
2353 code2(F_PUSHA
, &field
[0]) ;
2358 { yyval
.start
= yyvsp
[-1].start
; }
2362 { resize_fblock(yyvsp
[-1].fbp
, code_ptr
) ;
2363 code_ptr
= main_code_ptr
;
2364 scope
= SCOPE_MAIN
;
2365 active_funct
= (FBLOCK
*) 0 ;
2372 scope
= SCOPE_FUNCT
;
2373 active_funct
= yyvsp
[-3].fbp
;
2374 main_code_ptr
= code_ptr
;
2376 if ( yyvsp
[-3].fbp
->nargs
= yyvsp
[-1].ival
)
2377 yyvsp
[-3].fbp
->typev
= (char *)
2378 memset( zmalloc(yyvsp
[-1].ival
), ST_LOCAL_NONE
, SIZE_T(yyvsp
[-1].ival
)) ;
2379 else yyvsp
[-3].fbp
->typev
= (char *) 0 ;
2380 code_ptr
= yyvsp
[-3].fbp
->code
=
2381 (INST
*) zmalloc(PAGE_SZ
*sizeof(INST
)) ;
2388 if ( yyvsp
[0].stp
->type
== ST_NONE
)
2390 yyvsp
[0].stp
->type
= ST_FUNCT
;
2391 fbp
= yyvsp
[0].stp
->stval
.fbp
=
2392 (FBLOCK
*) zmalloc(sizeof(FBLOCK
)) ;
2393 fbp
->name
= yyvsp
[0].stp
->name
;
2397 type_error( yyvsp
[0].stp
) ;
2399 /* this FBLOCK will not be put in
2401 fbp
= (FBLOCK
*) zmalloc(sizeof(FBLOCK
)) ;
2409 { yyval
.fbp
= yyvsp
[0].fbp
;
2410 if ( yyvsp
[0].fbp
->code
)
2411 compile_error("redefinition of %s" , yyvsp
[0].fbp
->name
) ;
2416 { yyval
.ival
= 0 ; }
2420 { yyvsp
[0].stp
= save_id(yyvsp
[0].stp
->name
) ;
2421 yyvsp
[0].stp
->type
= ST_LOCAL_NONE
;
2422 yyvsp
[0].stp
->offset
= 0 ;
2428 { if ( is_local(yyvsp
[0].stp
) )
2429 compile_error("%s is duplicated in argument list",
2430 yyvsp
[0].stp
->name
) ;
2432 { yyvsp
[0].stp
= save_id(yyvsp
[0].stp
->name
) ;
2433 yyvsp
[0].stp
->type
= ST_LOCAL_NONE
;
2434 yyvsp
[0].stp
->offset
= yyvsp
[-2].ival
;
2435 yyval
.ival
= yyvsp
[-2].ival
+ 1 ;
2441 { yyval
.start
= yyvsp
[-1].start
;
2442 code2(_CALL
, yyvsp
[-2].fbp
) ;
2444 if ( yyvsp
[0].ca_p
) code1(yyvsp
[0].ca_p
->arg_num
+1) ;
2447 check_fcall(yyvsp
[-2].fbp
, scope
, active_funct
,
2448 yyvsp
[0].ca_p
, token_lineno
) ;
2453 { yyval
.ca_p
= (CA_REC
*) 0 ; }
2457 { yyval
.ca_p
= yyvsp
[0].ca_p
;
2458 yyval
.ca_p
->link
= yyvsp
[-1].ca_p
;
2459 yyval
.ca_p
->arg_num
= yyvsp
[-1].ca_p
? yyvsp
[-1].ca_p
->arg_num
+1 : 0 ;
2463 #line 1010 "parse.y"
2464 { yyval
.ca_p
= (CA_REC
*) 0 ; }
2467 #line 1012 "parse.y"
2468 { yyval
.ca_p
= (CA_REC
*) zmalloc(sizeof(CA_REC
)) ;
2469 yyval
.ca_p
->link
= yyvsp
[-2].ca_p
;
2470 yyval
.ca_p
->type
= CA_EXPR
;
2471 yyval
.ca_p
->arg_num
= yyvsp
[-2].ca_p
? yyvsp
[-2].ca_p
->arg_num
+1 : 0 ;
2475 #line 1018 "parse.y"
2476 { yyval
.ca_p
= (CA_REC
*) zmalloc(sizeof(CA_REC
)) ;
2477 yyval
.ca_p
->link
= yyvsp
[-2].ca_p
;
2478 yyval
.ca_p
->arg_num
= yyvsp
[-2].ca_p
? yyvsp
[-2].ca_p
->arg_num
+1 : 0 ;
2480 code_call_id(yyval
.ca_p
, yyvsp
[-1].stp
) ;
2484 #line 1027 "parse.y"
2485 { yyval
.ca_p
= (CA_REC
*) zmalloc(sizeof(CA_REC
)) ;
2486 yyval
.ca_p
->type
= CA_EXPR
;
2490 #line 1032 "parse.y"
2491 { yyval
.ca_p
= (CA_REC
*) zmalloc(sizeof(CA_REC
)) ;
2492 code_call_id(yyval
.ca_p
, yyvsp
[-1].stp
) ;
2495 #line 2496 "y.tab.c"
2501 if (yystate
== 0 && yym
== 0)
2505 printf("yydebug: after reduction, shifting from state 0 to\
2506 state %d\n", YYFINAL
);
2513 if ((yychar
= YYLEX()) < 0) yychar
= 0;
2518 if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
2519 if (!yys
) yys
= "illegal-symbol";
2520 printf("yydebug: state %d, reading %d (%s)\n",
2521 YYFINAL
, yychar
, yys
);
2525 if (yychar
== 0) goto yyaccept
;
2528 if ((yyn
= yygindex
[yym
]) && (yyn
+= yystate
) >= 0 &&
2529 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yystate
)
2530 yystate
= yytable
[yyn
];
2532 yystate
= yydgoto
[yym
];
2535 printf("yydebug: after reduction, shifting from state %d \
2536 to state %d\n", *yyssp
, yystate
);
2538 if (yyssp
>= yyss
+ yystacksize
- 1)
2546 yyerror("yacc stack overflow");
2553 /********************************************
2555 copyright 1991, Michael D. Brennan
2557 This is a source file for mawk, an implementation of
2558 the AWK programming language.
2560 Mawk is distributed without warranty under the terms of
2561 the GNU General Public License, version 2, 1991.
2562 ********************************************/
2564 /* $Log: parse.c,v $
2565 * Revision 1.5 92/01/09 08:45:30 brennan
2568 Revision 5.1 91/12/05 07:52:38 brennan
2573 /* If using Berkeley yacc, we can put the parser table
2574 memory to the zmalloc pool. This is kind of ugly and
2575 with paged vm probably a nop, but for DOS and MINIX and ??
2576 it frees a considerably amount of memory.
2578 This file is part of parse.c via
2579 cat y.tab.c parse2.xc > parse.c
2582 static struct yacc_mem yacc_mem
[] =
2584 0 , 0 , /* don't remove this */
2587 (PTR
) yycheck
, sizeof(yycheck
)/ZBLOCKSZ
,
2588 (PTR
) yytable
, sizeof(yytable
)/ZBLOCKSZ
,
2589 #ifndef YYXBYACC /* with xbyacc these are storage auto */
2590 (PTR
) yyvs
, sizeof(yyvs
)/ZBLOCKSZ
,
2591 (PTR
) yyss
, sizeof(yyss
)/ZBLOCKSZ
,
2593 (PTR
) yydefred
, sizeof(yydefred
)/ZBLOCKSZ
,
2594 (PTR
) yydgoto
, sizeof(yydgoto
)/ZBLOCKSZ
,
2595 (PTR
) yygindex
, sizeof(yygindex
)/ZBLOCKSZ
,
2596 (PTR
) yylen
, sizeof(yylen
)/ZBLOCKSZ
,
2597 (PTR
) yylhs
, sizeof(yylhs
)/ZBLOCKSZ
,
2598 (PTR
) yyrindex
, sizeof(yyrindex
)/ZBLOCKSZ
,
2599 (PTR
) yysindex
, sizeof(yysindex
)/ZBLOCKSZ
,
2604 struct yacc_mem
*yacc_memp
= yacc_mem
;