2 /* A Bison parser, made from pic.y */
4 #define YYBISON 1 /* Identify Bison output. */
10 #define COMMAND_LINE 262
14 #define LEFT_ARROW_HEAD 266
15 #define RIGHT_ARROW_HEAD 267
16 #define DOUBLE_ARROW_HEAD 268
98 #define EQUALEQUAL 350
100 #define GREATEREQUAL 352
101 #define LEFT_CORNER 353
102 #define RIGHT_CORNER 354
109 #define THICKNESS 361
123 extern int delim_flag
;
124 extern void do_copy(const char *);
125 extern void copy_rest_thru(const char *, const char *);
126 extern void copy_file_thru(const char *, const char *, const char *);
127 extern void push_body(const char *);
128 extern void do_for(char *var
, double from
, double to
,
129 int by_is_multiplicative
, double by
, char *body
);
130 extern void do_lookahead();
136 double fmod(double, double);
140 /* Maximum number of characters produced by printf("%g") */
145 #endif /* __BORLANDC__ */
148 void yyerror(const char *);
150 void reset(const char *nm
);
153 place
*lookup_label(const char *);
154 void define_label(const char *label
, const place
*pl
);
156 direction current_direction
;
157 position current_position
;
159 implement_ptable(place
)
161 PTABLE(place
) top_table
;
163 PTABLE(place
) *current_table
= &top_table
;
164 saved_state
*current_saved_state
= 0;
168 const char *ordinal_postfix(int n
);
169 const char *object_type_name(object_type type
);
170 char *format_number(const char *form
, double n
);
171 char *do_sprintf(const char *form
, const double *v
, int nv
);
179 struct { double x
, y
; } pair
;
180 struct { double x
; char *body
; } if_data
;
181 struct { char *str
; const char *filename
; int lineno
; } lstr
;
182 struct { double *v
; int nv
; int maxv
; } dv
;
183 struct { double val
; int is_multiplicative
; } by
;
190 graphics_state state
;
207 #define YYLTYPE yyltype
219 #define YYFLAG -32768
222 #define YYTRANSLATE(x) ((unsigned)(x) <= 367 ? yytranslate[x] : 179)
224 static const short yytranslate
[] = { 0,
225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
226 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
227 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
228 2, 2, 123, 2, 2, 2, 122, 2, 2, 113,
229 132, 120, 118, 115, 119, 133, 121, 2, 2, 2,
230 2, 2, 2, 2, 2, 2, 2, 127, 125, 116,
231 126, 117, 2, 2, 2, 2, 2, 2, 2, 2,
232 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
233 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
234 130, 2, 131, 124, 2, 114, 2, 2, 2, 2,
235 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
236 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
237 2, 2, 128, 2, 129, 2, 2, 2, 2, 2,
238 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
239 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
240 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
241 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
242 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
243 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
244 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
245 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
246 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
247 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
248 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
249 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
250 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
251 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
252 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
253 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
254 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
255 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
256 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
257 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
258 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
259 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
260 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
261 106, 107, 108, 109, 110, 111, 112
265 static const short yyprhs
[] = { 0,
266 0, 2, 4, 8, 10, 14, 15, 17, 19, 22,
267 26, 31, 33, 35, 37, 39, 41, 44, 47, 48,
268 52, 55, 56, 57, 65, 66, 67, 74, 75, 86,
269 88, 89, 94, 96, 98, 101, 104, 108, 110, 113,
270 115, 117, 119, 120, 126, 127, 130, 132, 134, 138,
271 142, 146, 150, 154, 158, 162, 166, 169, 170, 173,
272 177, 179, 184, 189, 194, 195, 196, 203, 205, 206,
273 208, 210, 212, 214, 216, 218, 220, 222, 224, 226,
274 229, 233, 234, 239, 243, 247, 251, 255, 258, 261,
275 265, 268, 272, 275, 279, 282, 286, 290, 294, 298,
276 302, 306, 309, 312, 316, 319, 323, 326, 330, 333,
277 337, 340, 343, 346, 349, 352, 355, 358, 361, 364,
278 367, 370, 373, 377, 380, 382, 388, 389, 393, 395,
279 397, 399, 403, 407, 413, 419, 426, 428, 433, 437,
280 441, 443, 446, 449, 453, 455, 457, 459, 463, 465,
281 469, 471, 474, 477, 480, 482, 484, 486, 488, 490,
282 492, 494, 497, 499, 502, 506, 508, 510, 513, 515,
283 520, 524, 528, 531, 533, 535, 537, 539, 541, 543,
284 545, 547, 549, 551, 553, 555, 557, 559, 561, 564,
285 567, 570, 573, 575, 577, 580, 583, 586, 589, 591,
286 593, 595, 597, 599, 602, 605, 608, 611, 614, 618,
287 622, 626, 630, 634, 638, 641, 645, 650, 655, 662,
288 667, 672, 677, 684, 691, 696, 701, 705, 709, 713,
289 717, 721, 725, 729, 733, 737
294 static const short yyrhs
[] = { 137,
295 0, 135, 0, 137, 136, 137, 0, 156, 0, 136,
296 138, 156, 0, 0, 138, 0, 125, 0, 138, 125,
297 0, 4, 126, 153, 0, 4, 127, 126, 153, 0,
298 15, 0, 16, 0, 17, 0, 18, 0, 7, 0,
299 110, 148, 0, 85, 148, 0, 0, 84, 140, 8,
300 0, 78, 6, 0, 0, 0, 78, 6, 79, 141,
301 8, 142, 152, 0, 0, 0, 78, 79, 143, 8,
302 144, 152, 0, 0, 88, 4, 126, 178, 32, 178,
303 155, 89, 145, 8, 0, 150, 0, 0, 150, 91,
304 146, 8, 0, 147, 0, 103, 0, 103, 4, 0,
305 147, 4, 0, 147, 115, 4, 0, 149, 0, 148,
306 149, 0, 178, 0, 162, 0, 164, 0, 0, 90,
307 153, 36, 151, 8, 0, 0, 104, 6, 0, 178,
308 0, 154, 0, 162, 95, 162, 0, 162, 94, 162,
309 0, 154, 92, 154, 0, 154, 92, 178, 0, 178,
310 92, 154, 0, 154, 93, 154, 0, 154, 93, 178,
311 0, 178, 93, 154, 0, 123, 154, 0, 0, 35,
312 178, 0, 35, 120, 178, 0, 160, 0, 3, 127,
313 137, 156, 0, 3, 127, 137, 165, 0, 3, 127,
314 137, 168, 0, 0, 0, 128, 157, 135, 129, 158,
315 159, 0, 139, 0, 0, 156, 0, 19, 0, 20,
316 0, 21, 0, 22, 0, 23, 0, 24, 0, 25,
317 0, 26, 0, 162, 0, 105, 178, 0, 105, 178,
318 162, 0, 0, 130, 161, 135, 131, 0, 160, 27,
319 178, 0, 160, 28, 178, 0, 160, 29, 178, 0,
320 160, 30, 178, 0, 160, 178, 0, 160, 15, 0,
321 160, 15, 178, 0, 160, 16, 0, 160, 16, 178,
322 0, 160, 18, 0, 160, 18, 178, 0, 160, 17,
323 0, 160, 17, 178, 0, 160, 31, 164, 0, 160,
324 32, 164, 0, 160, 33, 164, 0, 160, 34, 176,
325 0, 160, 35, 167, 0, 160, 36, 0, 160, 37,
326 0, 160, 37, 178, 0, 160, 38, 0, 160, 38,
327 178, 0, 160, 107, 0, 160, 107, 178, 0, 160,
328 39, 0, 160, 39, 178, 0, 160, 40, 0, 160,
329 41, 0, 160, 11, 0, 160, 12, 0, 160, 13,
330 0, 160, 86, 0, 160, 87, 0, 160, 162, 0,
331 160, 42, 0, 160, 43, 0, 160, 44, 0, 160,
332 45, 0, 160, 106, 178, 0, 160, 108, 0, 6,
333 0, 109, 113, 6, 163, 132, 0, 0, 163, 115,
334 178, 0, 165, 0, 168, 0, 167, 0, 164, 118,
335 167, 0, 164, 119, 167, 0, 113, 164, 115, 164,
336 132, 0, 178, 166, 164, 50, 164, 0, 178, 116,
337 164, 115, 164, 117, 0, 49, 0, 46, 47, 48,
338 49, 0, 178, 115, 178, 0, 113, 167, 132, 0,
339 169, 0, 169, 177, 0, 177, 169, 0, 177, 46,
340 169, 0, 51, 0, 3, 0, 172, 0, 169, 133,
341 3, 0, 9, 0, 114, 153, 10, 0, 14, 0,
342 170, 14, 0, 170, 173, 0, 171, 173, 0, 19,
343 0, 20, 0, 21, 0, 22, 0, 23, 0, 24,
344 0, 26, 0, 130, 131, 0, 6, 0, 133, 3,
345 0, 174, 133, 3, 0, 177, 0, 174, 0, 174,
346 177, 0, 175, 0, 9, 14, 173, 175, 0, 14,
347 173, 175, 0, 9, 173, 175, 0, 3, 175, 0,
348 52, 0, 53, 0, 54, 0, 55, 0, 56, 0,
349 57, 0, 58, 0, 59, 0, 60, 0, 61, 0,
350 62, 0, 80, 0, 81, 0, 17, 0, 18, 0,
351 82, 17, 0, 83, 17, 0, 82, 18, 0, 83,
352 18, 0, 98, 0, 99, 0, 82, 98, 0, 83,
353 98, 0, 82, 99, 0, 83, 99, 0, 100, 0,
354 102, 0, 101, 0, 4, 0, 5, 0, 168, 63,
355 0, 168, 64, 0, 168, 65, 0, 168, 66, 0,
356 168, 67, 0, 178, 118, 178, 0, 178, 119, 178,
357 0, 178, 120, 178, 0, 178, 121, 178, 0, 178,
358 122, 178, 0, 178, 124, 178, 0, 119, 178, 0,
359 113, 153, 132, 0, 68, 113, 153, 132, 0, 69,
360 113, 153, 132, 0, 70, 113, 153, 115, 153, 132,
361 0, 71, 113, 153, 132, 0, 72, 113, 153, 132,
362 0, 73, 113, 153, 132, 0, 74, 113, 153, 115,
363 153, 132, 0, 75, 113, 153, 115, 153, 132, 0,
364 76, 113, 153, 132, 0, 77, 113, 153, 132, 0,
365 77, 113, 132, 0, 178, 116, 178, 0, 178, 96,
366 178, 0, 178, 117, 178, 0, 178, 97, 178, 0,
367 178, 95, 178, 0, 178, 94, 178, 0, 178, 92,
368 178, 0, 178, 93, 178, 0, 123, 178, 0
372 static const short yyrline
[] = { 0,
373 273, 275, 283, 288, 291, 295, 297, 300, 302, 305,
374 311, 323, 325, 327, 329, 331, 336, 341, 346, 349,
375 354, 361, 364, 366, 374, 377, 379, 386, 389, 395,
376 403, 406, 417, 418, 422, 425, 427, 431, 434, 452,
377 460, 462, 470, 474, 477, 480, 484, 487, 491, 498,
378 504, 506, 508, 510, 512, 514, 516, 521, 524, 526,
379 530, 545, 547, 555, 561, 567, 574, 577, 585, 588,
380 592, 597, 601, 605, 610, 617, 624, 631, 638, 643,
381 648, 655, 670, 682, 688, 694, 700, 706, 725, 732,
382 739, 746, 753, 760, 767, 774, 781, 788, 803, 815,
383 821, 828, 840, 846, 852, 858, 864, 869, 875, 891,
384 908, 913, 918, 923, 928, 933, 938, 943, 950, 959,
385 968, 977, 986, 992, 999, 1004, 1014, 1021, 1042, 1045,
386 1053, 1056, 1061, 1066, 1071, 1076, 1083, 1085, 1088, 1091,
387 1095, 1098, 1104, 1110, 1116, 1124, 1135, 1139, 1147, 1150,
388 1157, 1160, 1164, 1179, 1195, 1198, 1200, 1202, 1204, 1206,
389 1208, 1210, 1212, 1216, 1221, 1228, 1236, 1240, 1247, 1253,
390 1259, 1265, 1271, 1279, 1282, 1284, 1286, 1288, 1290, 1292,
391 1294, 1296, 1298, 1300, 1302, 1304, 1306, 1308, 1310, 1312,
392 1314, 1316, 1318, 1320, 1322, 1324, 1326, 1328, 1330, 1332,
393 1334, 1338, 1347, 1349, 1356, 1363, 1370, 1377, 1384, 1386,
394 1388, 1390, 1398, 1406, 1419, 1421, 1423, 1432, 1441, 1454,
395 1463, 1472, 1481, 1483, 1485, 1487, 1489, 1495, 1497, 1499,
396 1501, 1503, 1505, 1507, 1509, 1511
399 static const char * const yytname
[] = { "$","error","$illegal.","LABEL","VARIABLE",
400 "NUMBER","TEXT","COMMAND_LINE","DELIMITED","ORDINAL","TH","LEFT_ARROW_HEAD",
401 "RIGHT_ARROW_HEAD","DOUBLE_ARROW_HEAD","LAST","UP","DOWN","LEFT","RIGHT","BOX",
402 "CIRCLE","ELLIPSE","ARC","LINE","ARROW","MOVE","SPLINE","HEIGHT","RADIUS","WIDTH",
403 "DIAMETER","FROM","TO","AT","WITH","BY","THEN","DOTTED","DASHED","CHOP","SAME",
404 "INVISIBLE","LJUST","RJUST","ABOVE","BELOW","OF","THE","WAY","BETWEEN","AND",
405 "HERE","DOT_N","DOT_E","DOT_W","DOT_S","DOT_NE","DOT_SE","DOT_NW","DOT_SW","DOT_C",
406 "DOT_START","DOT_END","DOT_X","DOT_Y","DOT_HT","DOT_WID","DOT_RAD","SIN","COS",
407 "ATAN2","LOG","EXP","SQRT","MAX","MIN","INT","RAND","COPY","THRU","TOP","BOTTOM",
408 "UPPER","LOWER","SH","PRINT","CW","CCW","FOR","DO","IF","ELSE","ANDAND","OROR",
409 "NOTEQUAL","EQUALEQUAL","LESSEQUAL","GREATEREQUAL","LEFT_CORNER","RIGHT_CORNER",
410 "CENTER","END","START","RESET","UNTIL","PLOT","THICKNESS","FILL","ALIGNED","SPRINTF",
411 "COMMAND","DEFINE","UNDEF","'('","'`'","','","'<'","'>'","'+'","'-'","'*'","'/'",
412 "'%'","'!'","'^'","';'","'='","':'","'{'","'}'","'['","']'","')'","'.'","top",
413 "element_list","middle_element_list","optional_separator","separator","placeless_element",
414 "@1","@2","@3","@4","@5","@6","@7","reset_variables","print_args","print_arg",
415 "simple_if","@8","until","any_expr","text_expr","optional_by","element","@9",
416 "@10","optional_element","object_spec","@11","text","sprintf_args","position",
417 "position_not_place","between","expr_pair","place","label","ordinal","optional_ordinal_last",
418 "nth_primitive","object_type","label_path","relative_path","path","corner","expr",
423 static const short yyr1
[] = { 0,
424 134, 134, 135, 136, 136, 137, 137, 138, 138, 139,
425 139, 139, 139, 139, 139, 139, 139, 139, 140, 139,
426 139, 141, 142, 139, 143, 144, 139, 145, 139, 139,
427 146, 139, 139, 139, 147, 147, 147, 148, 148, 149,
428 149, 149, 151, 150, 152, 152, 153, 153, 154, 154,
429 154, 154, 154, 154, 154, 154, 154, 155, 155, 155,
430 156, 156, 156, 156, 157, 158, 156, 156, 159, 159,
431 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
432 160, 161, 160, 160, 160, 160, 160, 160, 160, 160,
433 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
434 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
435 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
436 160, 160, 160, 160, 162, 162, 163, 163, 164, 164,
437 165, 165, 165, 165, 165, 165, 166, 166, 167, 167,
438 168, 168, 168, 168, 168, 169, 169, 169, 170, 170,
439 171, 171, 172, 172, 173, 173, 173, 173, 173, 173,
440 173, 173, 173, 174, 174, 175, 175, 175, 176, 176,
441 176, 176, 176, 177, 177, 177, 177, 177, 177, 177,
442 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
443 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
444 177, 178, 178, 178, 178, 178, 178, 178, 178, 178,
445 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
446 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
447 178, 178, 178, 178, 178, 178
450 static const short yyr2
[] = { 0,
451 1, 1, 3, 1, 3, 0, 1, 1, 2, 3,
452 4, 1, 1, 1, 1, 1, 2, 2, 0, 3,
453 2, 0, 0, 7, 0, 0, 6, 0, 10, 1,
454 0, 4, 1, 1, 2, 2, 3, 1, 2, 1,
455 1, 1, 0, 5, 0, 2, 1, 1, 3, 3,
456 3, 3, 3, 3, 3, 3, 2, 0, 2, 3,
457 1, 4, 4, 4, 0, 0, 6, 1, 0, 1,
458 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
459 3, 0, 4, 3, 3, 3, 3, 2, 2, 3,
460 2, 3, 2, 3, 2, 3, 3, 3, 3, 3,
461 3, 2, 2, 3, 2, 3, 2, 3, 2, 3,
462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 3, 2, 1, 5, 0, 3, 1, 1,
464 1, 3, 3, 5, 5, 6, 1, 4, 3, 3,
465 1, 2, 2, 3, 1, 1, 1, 3, 1, 3,
466 1, 2, 2, 2, 1, 1, 1, 1, 1, 1,
467 1, 2, 1, 2, 3, 1, 1, 2, 1, 4,
468 3, 3, 2, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
470 2, 2, 1, 1, 2, 2, 2, 2, 1, 1,
471 1, 1, 1, 2, 2, 2, 2, 2, 3, 3,
472 3, 3, 3, 3, 2, 3, 4, 4, 6, 4,
473 4, 4, 6, 6, 4, 4, 3, 3, 3, 3,
477 static const short yydefact
[] = { 6,
478 8, 2, 1, 7, 0, 0, 125, 16, 12, 13,
479 14, 15, 71, 72, 73, 74, 75, 76, 77, 78,
480 0, 19, 0, 0, 0, 34, 0, 0, 0, 65,
481 82, 6, 68, 33, 30, 4, 61, 79, 9, 6,
482 0, 0, 21, 25, 0, 146, 202, 203, 149, 151,
483 187, 188, 145, 174, 175, 176, 177, 178, 179, 180,
484 181, 182, 183, 184, 0, 0, 0, 0, 0, 0,
485 0, 0, 0, 0, 185, 186, 0, 0, 193, 194,
486 199, 201, 200, 0, 0, 0, 0, 18, 38, 41,
487 42, 129, 131, 130, 141, 0, 0, 147, 0, 40,
488 0, 0, 0, 0, 48, 0, 0, 47, 35, 80,
489 0, 17, 6, 6, 3, 7, 36, 0, 31, 113,
490 114, 115, 89, 91, 95, 93, 0, 0, 0, 0,
491 0, 0, 0, 0, 0, 102, 103, 105, 109, 111,
492 112, 119, 120, 121, 122, 116, 117, 0, 107, 124,
493 118, 88, 0, 10, 0, 22, 0, 20, 0, 0,
494 0, 0, 0, 0, 0, 0, 0, 0, 189, 191,
495 195, 197, 190, 192, 196, 198, 0, 0, 131, 47,
496 0, 215, 236, 39, 0, 0, 204, 205, 206, 207,
497 208, 0, 142, 163, 152, 155, 156, 157, 158, 159,
498 160, 161, 0, 153, 154, 0, 143, 0, 137, 0,
499 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
500 0, 0, 0, 0, 0, 0, 57, 236, 43, 0,
501 0, 0, 0, 0, 0, 0, 81, 127, 0, 0,
502 0, 5, 37, 0, 90, 92, 96, 94, 84, 85,
503 86, 87, 97, 0, 98, 99, 0, 0, 0, 0,
504 167, 169, 100, 166, 0, 101, 0, 104, 106, 110,
505 123, 108, 146, 202, 187, 188, 62, 0, 63, 64,
506 11, 0, 26, 0, 0, 0, 0, 0, 0, 0,
507 0, 0, 227, 0, 216, 0, 140, 150, 132, 133,
508 148, 162, 144, 0, 234, 235, 233, 232, 229, 231,
509 139, 0, 228, 230, 209, 210, 211, 212, 213, 214,
510 0, 0, 0, 51, 52, 54, 55, 50, 49, 53,
511 234, 56, 235, 228, 0, 66, 83, 32, 173, 0,
512 0, 0, 164, 0, 168, 0, 47, 23, 45, 217,
513 218, 0, 220, 221, 222, 0, 0, 225, 226, 0,
514 0, 0, 0, 0, 44, 0, 126, 69, 0, 172,
515 171, 165, 45, 0, 27, 0, 0, 0, 134, 138,
516 0, 135, 58, 128, 70, 67, 170, 24, 46, 219,
517 223, 224, 136, 0, 0, 0, 59, 28, 60, 0,
521 static const short yydefgoto
[] = { 402,
522 2, 32, 240, 4, 33, 45, 282, 373, 157, 349,
523 400, 244, 34, 88, 89, 35, 323, 375, 177, 105,
524 395, 36, 113, 368, 386, 37, 114, 106, 335, 91,
525 92, 225, 93, 107, 95, 96, 97, 98, 204, 261,
529 static const short yypact
[] = { -118,
530 -32768,-32768, 640, -113, -100, -59,-32768,-32768,-32768,-32768,
531 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
532 5,-32768, 860, 28, 972, 30, 1406, -61, 860,-32768,
533 -32768, -118,-32768, 12, -34,-32768, 748,-32768,-32768, -118,
534 972, -67, -24,-32768, 71,-32768,-32768,-32768,-32768,-32768,
535 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
536 -32768,-32768,-32768,-32768, -51, -2, 11, 31, 48, 51,
537 55, 73, 91, 92,-32768,-32768, 68, 129,-32768,-32768,
538 -32768,-32768,-32768, 1084, 972, 1406, 1406, 860,-32768,-32768,
539 -36,-32768,-32768, 192, 1995, -1, 273,-32768, 67, 1987,
540 2, 972, 972, 104, -5, 4, 192, 2072,-32768, 592,
541 174, 860, -118, -118,-32768, 612,-32768, 202,-32768,-32768,
542 -32768,-32768, 1855, 1855, 1693, 1774, 1406, 1406, 1406, 1406,
543 1509, 1509, 1509, 251, 1612,-32768, 1855, 1855, 1855,-32768,
544 -32768,-32768,-32768,-32768,-32768,-32768,-32768, 1406, 1855,-32768,
545 -32768, 2105, 494,-32768, 972,-32768, 201,-32768, 972, 972,
546 972, 972, 972, 972, 972, 972, 972, 373,-32768,-32768,
547 -32768,-32768,-32768,-32768,-32768,-32768, 78, -46, 83, 2020,
548 212, 100, 100,-32768, 1612, 1612,-32768,-32768,-32768,-32768,
549 -32768, 222,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
550 -32768,-32768, 95,-32768,-32768, 34, 96, 183,-32768, 1406,
551 1406, 1406, 1406, 1406, 1406, 1406, 1509, 1406, 1406, 1406,
552 1406, 1406, 1406, 1406, 1509, 1406,-32768, 100,-32768, 972,
553 972, 27, 27, 972, 972, 1406,-32768,-32768, 108, 640,
554 110,-32768,-32768, 236, 2105, 2105, 2105, 2105, 2105, 2105,
555 2105, 2105, -36, 1987, -36, -36, 1927, 264, 273, 242,
556 1941,-32768,-32768,-32768, 1196,-32768, 2030, 2105, 2105, 2105,
557 2105, 2105, -100, -59, 53, 54,-32768, -36, 3, 153,
558 -32768, 240,-32768, 119, 135, 146, 143, 144, 150, 159,
559 176, 157,-32768, 166,-32768, 1509,-32768,-32768,-32768,-32768,
560 -32768,-32768, 96, 252, 241, 2114, 289, 289, 114, 114,
561 2105, -41, 197, 114, 142, 142, 100, 100, 100, 100,
562 -22, 556, 293,-32768, 241, 228, 2123,-32768,-32768,-32768,
563 241, 228, 2123, 114, -76,-32768,-32768,-32768,-32768, 273,
564 1927, 1927,-32768, 311,-32768, 83, 2063,-32768, 218,-32768,
565 -32768, 972,-32768,-32768,-32768, 972, 972,-32768,-32768, -72,
566 274, 1509, 1509, 1406,-32768, 1406,-32768, 640, 1927,-32768,
567 -32768,-32768, 218, 318,-32768, 193, 194, 195,-32768,-32768,
568 15, -36, 1310, 2105,-32768,-32768,-32768,-32768,-32768,-32768,
569 -32768,-32768,-32768, 1299, 239, 1406, 2105,-32768, 2105, 321,
570 -32768, 330, 344,-32768
573 static const short yypgoto
[] = {-32768,
574 61,-32768, 26, 313,-32768,-32768,-32768,-32768,-32768,-32768,
575 -32768,-32768,-32768, 319, -71,-32768,-32768, -19, -10, -58,
576 -32768, -115,-32768,-32768,-32768,-32768,-32768, 7,-32768, -82,
577 203,-32768, -44, 6, -75,-32768,-32768,-32768, -88,-32768,
578 -249,-32768, -92, -23
585 static const short yytable
[] = { 100,
586 242, 178, 193, 110, 194, 100, 1, 339, 205, 38,
587 43, 39, 195, 152, 104, 117, 184, 196, 197, 198,
588 199, 200, 201, 207, 202, 3, 40, 363, 94, 90,
589 154, 101, 7, 109, 94, 90, 46, 277, 366, 179,
590 184, 264, 49, 151, 227, 185, 186, 50, 253, 255,
591 256, 111, -14, -15, 156, 367, 119, 115, 155, 379,
592 180, 159, 182, 183, 100, 153, 41, 42, 296, 46,
593 278, 185, 186, 362, 181, 49, 185, 186, 158, 228,
594 50, 185, 186, 44, 169, 170, 230, 231, 100, 94,
595 266, 370, 371, 94, 90, 185, 186, 232, 233, 245,
596 246, 247, 248, 249, 250, 251, 252, 254, 254, 254,
597 160, 267, 206, 268, 269, 270, 237, 94, 90, 387,
598 -129, -129, 38, 161, 271, 272, 118, 226, 203, 254,
599 303, 393, 185, 186, 312, 28, 94, 94, 94, 229,
600 299, 300, 321, 162, 281, 173, 174, 85, 284, 285,
601 286, 287, 288, 289, 290, 291, 292, 294, 280, 38,
602 163, 267, 267, 164, 264, 171, 172, 165, 345, 341,
603 342, 324, 326, 239, 241, 330, 332, -14, -15, 238,
604 85, -14, -15, -14, -15, 166, 305, 306, 307, 308,
605 309, 310, 311, 313, 314, 315, 316, 317, 318, 319,
606 320, 254, 322, 167, 168, 243, 325, 327, 283, 295,
607 331, 333, 334, 360, 297, 187, 188, 189, 190, 191,
608 346, 298, 94, 224, 301, 302, 175, 176, 192, 304,
609 94, 219, 220, 221, 222, 223, 336, 224, 328, 329,
610 337, 347, 208, 338, 343, 209, 38, 348, 264, 264,
611 350, 369, 385, 257, 187, 188, 189, 190, 191, 258,
612 352, 221, 222, 223, 259, 224, 351, 51, 52, 194,
613 -130, -130, 254, 356, 353, 354, 264, 340, 194, 381,
614 382, 355, 196, 197, 198, 199, 200, 201, 358, 202,
615 357, 196, 197, 198, 199, 200, 201, 359, 202, 361,
616 365, 94, 54, 55, 56, 57, 58, 59, 60, 61,
617 62, 63, 64, 372, 219, 220, 221, 222, 223, 230,
618 224, 374, 380, 389, 390, 391, 392, 398, 401, 403,
619 75, 76, 77, 78, 212, 213, 214, 215, 254, 254,
620 383, 376, 384, 404, 116, 377, 378, 112, 79, 80,
621 81, 82, 83, 388, 0, 279, 236, 218, 219, 220,
622 221, 222, 223, 0, 224, 0, 0, 94, 94, 0,
623 397, 0, 399, 0, 38, 46, 47, 48, 7, 0,
624 0, 49, 0, 260, 214, 215, 50, 0, 0, 51,
625 52, 0, 0, 203, 0, 0, 0, 0, 0, 0,
626 0, 0, 203, 0, 236, 218, 219, 220, 221, 222,
627 223, 0, 224, 0, 0, 0, 0, 0, 0, 0,
628 0, 0, 0, 53, 54, 55, 56, 57, 58, 59,
629 60, 61, 62, 63, 64, 0, 0, 0, 0, 0,
630 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
631 0, 0, 75, 76, 77, 78, 0, 0, 0, 0,
632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
633 79, 80, 81, 82, 83, 0, 0, 0, 0, 0,
634 0, 28, 0, 0, 0, 102, 85, 0, 0, 0,
635 0, 86, 0, 0, 0, 103, 273, 274, 48, 7,
636 8, 0, 49, 0, 293, 0, 0, 50, 9, 10,
637 275, 276, 13, 14, 15, 16, 17, 18, 19, 20,
638 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
639 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
640 0, 0, 0, 0, 53, 54, 55, 56, 57, 58,
641 59, 60, 61, 62, 63, 64, 0, 0, 0, 0,
642 0, 65, 66, 67, 68, 69, 70, 71, 72, 73,
643 74, 21, 0, 75, 76, 77, 78, 22, 23, 0,
644 0, 24, 0, 25, 0, 0, 0, 364, 0, 0,
645 0, 79, 80, 81, 82, 83, 26, 7, 27, 0,
646 0, 0, 28, 29, 0, 0, 84, 85, 0, 0,
647 0, 0, 86, 0, 5, 6, 87, 7, 8, 0,
648 0, 30, 0, 31, 0, 0, 9, 10, 11, 12,
649 13, 14, 15, 16, 17, 18, 19, 20, 0, 0,
650 0, 0, 5, 6, 0, 7, 8, 210, 211, 212,
651 213, 214, 215, 0, 9, 10, 11, 12, 13, 14,
652 15, 16, 17, 18, 19, 20, 0, 0, 0, 0,
653 0, 236, 218, 219, 220, 221, 222, 223, 0, 224,
654 0, 0, 0, 210, 211, 212, 213, 214, 215, 21,
655 0, 0, 0, 0, 0, 22, 23, 0, 0, 24,
656 28, 25, 0, 0, 0, 0, 0, 236, 218, 219,
657 220, 221, 222, 223, 26, 224, 27, 21, 0, 0,
658 28, 29, 0, 22, 23, 0, 0, 24, 0, 25,
659 0, 0, 0, 0, 0, 0, 39, 0, 0, 30,
660 0, 31, 26, 0, 27, 0, 0, 0, 28, 29,
661 46, 47, 48, 7, 0, 0, 49, 0, 120, 121,
662 122, 50, 123, 124, 125, 126, 0, 30, 0, 31,
663 0, 0, 0, 0, 127, 128, 129, 130, 131, 132,
664 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
665 143, 144, 145, 0, 0, 0, 0, 0, 53, 54,
666 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
667 0, 0, 0, 0, 0, 65, 66, 67, 68, 69,
668 70, 71, 72, 73, 74, 0, 0, 75, 76, 77,
669 78, 0, 0, 146, 147, 0, 0, 0, 0, 0,
670 0, 0, 0, 0, 0, 79, 80, 81, 82, 83,
671 0, 0, 0, 148, 149, 150, 28, 0, 0, 0,
672 102, 85, 46, 47, 48, 7, 86, 0, 49, 0,
673 87, 0, 0, 50, 0, 0, 51, 52, 0, 0,
674 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
675 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
677 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
678 63, 64, 0, 0, 0, 0, 0, 65, 66, 67,
679 68, 69, 70, 71, 72, 73, 74, 0, 0, 75,
680 76, 77, 78, 0, 0, 0, 0, 0, 0, 0,
681 0, 0, 0, 0, 0, 0, 0, 79, 80, 81,
682 82, 83, 0, 0, 0, 0, 0, 0, 28, 0,
683 0, 0, 84, 85, 46, 47, 48, 7, 86, 0,
684 49, 0, 87, 0, 0, 50, 0, 0, 51, 52,
685 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
688 0, 0, 53, 54, 55, 56, 57, 58, 59, 60,
689 61, 62, 63, 64, 0, 0, 0, 0, 0, 65,
690 66, 67, 68, 69, 70, 71, 72, 73, 74, 0,
691 0, 75, 76, 77, 78, 0, 0, 0, 0, 0,
692 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,
693 80, 81, 82, 83, 0, 0, 0, 0, 0, 0,
694 28, 0, 0, 0, 102, 85, 46, 47, 48, 7,
695 86, 0, 49, 0, 103, 0, 0, 50, 0, 0,
696 51, 52, 0, 0, 0, 0, 0, 0, 0, 0,
697 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
698 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
699 0, 0, 0, 0, 53, 54, 55, 56, 57, 58,
700 59, 60, 61, 62, 63, 64, 0, 0, 0, 0,
701 0, 65, 66, 67, 68, 69, 70, 71, 72, 73,
702 74, 0, 0, 75, 76, 77, 78, 0, 0, 0,
703 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
704 0, 79, 80, 81, 82, 83, 0, 0, 0, 0,
705 0, 0, 28, 0, 0, 0, 84, 85, 46, 47,
706 48, 7, 86, 0, 49, 0, 103, 0, 0, 50,
707 0, 0, 51, 52, 0, 0, 0, 0, 0, 0,
708 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
709 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
710 0, 0, 0, 0, 0, 0, 53, 54, 55, 56,
711 57, 58, 59, 60, 61, 62, 63, 64, 0, 0,
712 0, 0, 0, 65, 66, 67, 68, 69, 70, 71,
713 72, 73, 74, 0, 0, 75, 76, 77, 78, 0,
714 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
715 0, 0, 0, 79, 80, 81, 82, 83, 0, 0,
716 0, 46, 47, 48, 28, 0, 0, 49, 265, 85,
717 0, 0, 50, 0, 86, 51, 52, 0, 103, 0,
718 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
720 0, 0, 0, 0, 394, 0, 0, 0, 0, 53,
721 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
722 64, 0, 0, 0, 0, 0, 65, 66, 67, 68,
723 69, 70, 71, 72, 73, 74, 0, 0, 75, 76,
724 77, 78, 0, 0, 0, 0, 0, 0, 0, 0,
725 0, 0, 0, 0, 0, 0, 79, 80, 81, 82,
726 83, 210, 211, 212, 213, 214, 215, 0, 46, 47,
727 48, 102, 85, 0, 49, 0, 0, 86, 396, 50,
728 0, 87, 51, 52, 0, 236, 218, 219, 220, 221,
729 222, 223, 0, 224, 0, 0, 0, 0, 0, 0,
730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
731 0, 0, 0, 0, 0, 0, 53, 54, 55, 56,
732 57, 58, 59, 60, 61, 62, 63, 64, 0, 0,
733 0, 0, 0, 65, 66, 67, 68, 69, 70, 71,
734 72, 73, 74, 0, 0, 75, 76, 77, 78, 0,
735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
736 0, 0, 0, 79, 80, 81, 82, 83, 0, 0,
737 0, 46, 47, 48, 0, 0, 0, 49, 102, 85,
738 0, 0, 50, 0, 86, 51, 52, 0, 87, 0,
739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
741 0, 0, 0, 0, 0, 0, 0, 0, 0, 53,
742 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
743 64, 0, 0, 0, 0, 0, 65, 66, 67, 68,
744 69, 70, 71, 72, 73, 74, 0, 0, 75, 76,
745 77, 78, 0, 0, 0, 0, 0, 0, 0, 0,
746 0, 0, 0, 0, 0, 0, 79, 80, 81, 82,
747 83, 0, 0, 0, 46, 47, 48, 0, 0, 0,
748 49, 84, 85, 0, 0, 50, 0, 86, 51, 52,
749 0, 87, 0, 0, 0, 0, 0, 0, 0, 0,
750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
751 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
752 0, 0, 53, 54, 55, 56, 57, 58, 59, 60,
753 61, 62, 63, 64, 0, 0, 0, 0, 0, 65,
754 66, 67, 68, 69, 70, 71, 72, 73, 74, 0,
755 0, 75, 76, 77, 78, 46, 47, 48, 0, 0,
756 0, 49, 0, 0, 0, 0, 50, 0, 0, 79,
757 80, 81, 82, 83, 0, 0, 0, 0, 0, 0,
758 0, 0, 0, 0, 265, 85, 0, 0, 0, 0,
759 86, 0, 0, 0, 87, 0, 0, 0, -187, 0,
760 0, 0, 0, 53, 54, 55, 56, 57, 58, 59,
761 60, 61, 62, 63, 64, 0, 0, 0, 0, 0,
762 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
763 0, 0, 75, 76, 77, 78, 46, 47, 48, 0,
764 0, 0, 49, 0, 0, 0, 0, 50, 0, 0,
765 79, 80, 81, 82, 83, 0, 0, 0, 0, 0,
766 0, 0, 0, 0, 0, 102, 85, 0, 0, 0,
767 0, 86, 0, 0, 0, 87, 0, 0, 0, -188,
768 0, 0, 0, 0, 53, 54, 55, 56, 57, 58,
769 59, 60, 61, 62, 63, 64, 0, 0, 0, 0,
770 0, 65, 66, 67, 68, 69, 70, 71, 72, 73,
771 74, 0, 0, 75, 76, 77, 78, 46, 47, 48,
772 0, 0, 0, 49, 0, 0, 0, 0, 50, 0,
773 0, 79, 80, 81, 82, 83, 0, 0, 0, 0,
774 0, 0, 0, 0, 0, 0, 102, 85, 0, 0,
775 0, 0, 86, 0, 0, 0, 87, 0, 0, 0,
776 0, 0, 0, 0, 0, 53, 54, 55, 56, 57,
777 58, 59, 60, 61, 62, 63, 64, 0, 0, 0,
778 0, 0, 65, 66, 67, 68, 69, 70, 71, 72,
779 73, 74, 0, 0, 75, 76, 77, 78, 0, 0,
780 0, 0, 0, 51, 52, 0, 0, 0, 0, 0,
781 0, 0, 79, 80, 81, 82, 83, 51, 52, 0,
782 0, 0, 0, 0, 0, 0, 0, 102, 85, 0,
783 0, 0, 0, 86, 0, 0, 0, 87, 54, 55,
784 56, 57, 58, 59, 60, 61, 62, 63, 64, 0,
785 0, 0, 54, 55, 56, 57, 58, 59, 60, 61,
786 62, 63, 64, 0, 0, 0, 75, 76, 77, 78,
787 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
788 75, 76, 77, 78, 79, 80, 81, 82, 83, 0,
789 0, 0, 208, 0, 0, 209, 0, 0, 79, 80,
790 81, 82, 83, 0, 0, 0, 54, 55, 56, 57,
791 58, 59, 60, 61, 62, 63, 64, 0, 0, 260,
792 0, 0, 0, 0, 0, 208, 0, 0, 209, 0,
793 0, 0, 0, 344, 75, 76, 77, 78, 210, 211,
794 212, 213, 214, 215, 0, 0, 0, 0, 0, 0,
795 0, 0, 79, 80, 81, 82, 83, 0, 0, 0,
796 0, 216, 217, 218, 219, 220, 221, 222, 223, 0,
797 224, 234, 235, 212, 213, 214, 215, 0, 0, 0,
798 0, 210, 211, 212, 213, 214, 215, 192, 0, 0,
799 0, 0, 0, 0, 216, 217, 218, 219, 220, 221,
800 222, 223, 0, 224, 216, 236, 218, 219, 220, 221,
801 222, 223, 0, 224, 234, 235, 212, 213, 214, 215,
802 0, 0, 0, 234, 235, 212, 213, 214, 215, 0,
803 0, 0, 0, 0, 0, 0, 0, 216, 236, 218,
804 219, 220, 221, 222, 223, 0, 224, 236, 218, 219,
805 220, 221, 222, 223, 0, 224, 210, 211, 212, 213,
806 214, 215, 0, 0, 0, 210, 0, 212, 213, 214,
807 215, 0, 0, 0, 234, 0, 212, 213, 214, 215,
808 236, 218, 219, 220, 221, 222, 223, 0, 224, 236,
809 218, 219, 220, 221, 222, 223, 0, 224, 236, 218,
810 219, 220, 221, 222, 223, 0, 224
813 static const short yycheck
[] = { 23,
814 116, 84, 95, 27, 6, 29, 125, 257, 97, 3,
815 6, 125, 14, 37, 25, 4, 88, 19, 20, 21,
816 22, 23, 24, 99, 26, 0, 127, 50, 23, 23,
817 41, 4, 6, 4, 29, 29, 3, 153, 115, 84,
818 112, 134, 9, 37, 103, 118, 119, 14, 131, 132,
819 133, 113, 0, 0, 79, 132, 91, 32, 126, 132,
820 84, 113, 86, 87, 88, 40, 126, 127, 115, 3,
821 153, 118, 119, 115, 85, 9, 118, 119, 8, 103,
822 14, 118, 119, 79, 17, 18, 92, 93, 112, 84,
823 135, 341, 342, 88, 88, 118, 119, 94, 95, 123,
824 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
825 113, 135, 46, 137, 138, 139, 110, 112, 112, 369,
826 118, 119, 116, 113, 148, 149, 115, 126, 130, 153,
827 206, 117, 118, 119, 217, 109, 131, 132, 133, 36,
828 185, 186, 225, 113, 155, 17, 18, 114, 159, 160,
829 161, 162, 163, 164, 165, 166, 167, 168, 153, 153,
830 113, 185, 186, 113, 257, 98, 99, 113, 261, 258,
831 259, 230, 231, 113, 114, 234, 235, 125, 125, 6,
832 114, 129, 129, 131, 131, 113, 210, 211, 212, 213,
833 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
834 224, 225, 226, 113, 113, 4, 230, 231, 8, 132,
835 234, 235, 236, 296, 132, 63, 64, 65, 66, 67,
836 265, 10, 217, 124, 3, 131, 98, 99, 133, 47,
837 225, 118, 119, 120, 121, 122, 129, 124, 232, 233,
838 131, 265, 46, 8, 3, 49, 240, 8, 341, 342,
839 132, 340, 368, 3, 63, 64, 65, 66, 67, 9,
840 115, 120, 121, 122, 14, 124, 132, 17, 18, 6,
841 118, 119, 296, 115, 132, 132, 369, 14, 6, 362,
842 363, 132, 19, 20, 21, 22, 23, 24, 132, 26,
843 115, 19, 20, 21, 22, 23, 24, 132, 26, 48,
844 8, 296, 52, 53, 54, 55, 56, 57, 58, 59,
845 60, 61, 62, 3, 118, 119, 120, 121, 122, 92,
846 124, 104, 49, 6, 132, 132, 132, 89, 8, 0,
847 80, 81, 82, 83, 94, 95, 96, 97, 362, 363,
848 364, 352, 366, 0, 32, 356, 357, 29, 98, 99,
849 100, 101, 102, 373, -1, 153, 116, 117, 118, 119,
850 120, 121, 122, -1, 124, -1, -1, 362, 363, -1,
851 394, -1, 396, -1, 368, 3, 4, 5, 6, -1,
852 -1, 9, -1, 133, 96, 97, 14, -1, -1, 17,
853 18, -1, -1, 130, -1, -1, -1, -1, -1, -1,
854 -1, -1, 130, -1, 116, 117, 118, 119, 120, 121,
855 122, -1, 124, -1, -1, -1, -1, -1, -1, -1,
856 -1, -1, -1, 51, 52, 53, 54, 55, 56, 57,
857 58, 59, 60, 61, 62, -1, -1, -1, -1, -1,
858 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
859 -1, -1, 80, 81, 82, 83, -1, -1, -1, -1,
860 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
861 98, 99, 100, 101, 102, -1, -1, -1, -1, -1,
862 -1, 109, -1, -1, -1, 113, 114, -1, -1, -1,
863 -1, 119, -1, -1, -1, 123, 3, 4, 5, 6,
864 7, -1, 9, -1, 132, -1, -1, 14, 15, 16,
865 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
866 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
867 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
868 -1, -1, -1, -1, 51, 52, 53, 54, 55, 56,
869 57, 58, 59, 60, 61, 62, -1, -1, -1, -1,
870 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76,
871 77, 78, -1, 80, 81, 82, 83, 84, 85, -1,
872 -1, 88, -1, 90, -1, -1, -1, 32, -1, -1,
873 -1, 98, 99, 100, 101, 102, 103, 6, 105, -1,
874 -1, -1, 109, 110, -1, -1, 113, 114, -1, -1,
875 -1, -1, 119, -1, 3, 4, 123, 6, 7, -1,
876 -1, 128, -1, 130, -1, -1, 15, 16, 17, 18,
877 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
878 -1, -1, 3, 4, -1, 6, 7, 92, 93, 94,
879 95, 96, 97, -1, 15, 16, 17, 18, 19, 20,
880 21, 22, 23, 24, 25, 26, -1, -1, -1, -1,
881 -1, 116, 117, 118, 119, 120, 121, 122, -1, 124,
882 -1, -1, -1, 92, 93, 94, 95, 96, 97, 78,
883 -1, -1, -1, -1, -1, 84, 85, -1, -1, 88,
884 109, 90, -1, -1, -1, -1, -1, 116, 117, 118,
885 119, 120, 121, 122, 103, 124, 105, 78, -1, -1,
886 109, 110, -1, 84, 85, -1, -1, 88, -1, 90,
887 -1, -1, -1, -1, -1, -1, 125, -1, -1, 128,
888 -1, 130, 103, -1, 105, -1, -1, -1, 109, 110,
889 3, 4, 5, 6, -1, -1, 9, -1, 11, 12,
890 13, 14, 15, 16, 17, 18, -1, 128, -1, 130,
891 -1, -1, -1, -1, 27, 28, 29, 30, 31, 32,
892 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
893 43, 44, 45, -1, -1, -1, -1, -1, 51, 52,
894 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
895 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72,
896 73, 74, 75, 76, 77, -1, -1, 80, 81, 82,
897 83, -1, -1, 86, 87, -1, -1, -1, -1, -1,
898 -1, -1, -1, -1, -1, 98, 99, 100, 101, 102,
899 -1, -1, -1, 106, 107, 108, 109, -1, -1, -1,
900 113, 114, 3, 4, 5, 6, 119, -1, 9, -1,
901 123, -1, -1, 14, -1, -1, 17, 18, -1, -1,
902 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
903 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
904 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
905 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
906 61, 62, -1, -1, -1, -1, -1, 68, 69, 70,
907 71, 72, 73, 74, 75, 76, 77, -1, -1, 80,
908 81, 82, 83, -1, -1, -1, -1, -1, -1, -1,
909 -1, -1, -1, -1, -1, -1, -1, 98, 99, 100,
910 101, 102, -1, -1, -1, -1, -1, -1, 109, -1,
911 -1, -1, 113, 114, 3, 4, 5, 6, 119, -1,
912 9, -1, 123, -1, -1, 14, -1, -1, 17, 18,
913 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
914 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
915 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
916 -1, -1, 51, 52, 53, 54, 55, 56, 57, 58,
917 59, 60, 61, 62, -1, -1, -1, -1, -1, 68,
918 69, 70, 71, 72, 73, 74, 75, 76, 77, -1,
919 -1, 80, 81, 82, 83, -1, -1, -1, -1, -1,
920 -1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
921 99, 100, 101, 102, -1, -1, -1, -1, -1, -1,
922 109, -1, -1, -1, 113, 114, 3, 4, 5, 6,
923 119, -1, 9, -1, 123, -1, -1, 14, -1, -1,
924 17, 18, -1, -1, -1, -1, -1, -1, -1, -1,
925 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
926 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
927 -1, -1, -1, -1, 51, 52, 53, 54, 55, 56,
928 57, 58, 59, 60, 61, 62, -1, -1, -1, -1,
929 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76,
930 77, -1, -1, 80, 81, 82, 83, -1, -1, -1,
931 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
932 -1, 98, 99, 100, 101, 102, -1, -1, -1, -1,
933 -1, -1, 109, -1, -1, -1, 113, 114, 3, 4,
934 5, 6, 119, -1, 9, -1, 123, -1, -1, 14,
935 -1, -1, 17, 18, -1, -1, -1, -1, -1, -1,
936 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
937 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
938 -1, -1, -1, -1, -1, -1, 51, 52, 53, 54,
939 55, 56, 57, 58, 59, 60, 61, 62, -1, -1,
940 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74,
941 75, 76, 77, -1, -1, 80, 81, 82, 83, -1,
942 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
943 -1, -1, -1, 98, 99, 100, 101, 102, -1, -1,
944 -1, 3, 4, 5, 109, -1, -1, 9, 113, 114,
945 -1, -1, 14, -1, 119, 17, 18, -1, 123, -1,
946 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
947 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
948 -1, -1, -1, -1, 35, -1, -1, -1, -1, 51,
949 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
950 62, -1, -1, -1, -1, -1, 68, 69, 70, 71,
951 72, 73, 74, 75, 76, 77, -1, -1, 80, 81,
952 82, 83, -1, -1, -1, -1, -1, -1, -1, -1,
953 -1, -1, -1, -1, -1, -1, 98, 99, 100, 101,
954 102, 92, 93, 94, 95, 96, 97, -1, 3, 4,
955 5, 113, 114, -1, 9, -1, -1, 119, 120, 14,
956 -1, 123, 17, 18, -1, 116, 117, 118, 119, 120,
957 121, 122, -1, 124, -1, -1, -1, -1, -1, -1,
958 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
959 -1, -1, -1, -1, -1, -1, 51, 52, 53, 54,
960 55, 56, 57, 58, 59, 60, 61, 62, -1, -1,
961 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74,
962 75, 76, 77, -1, -1, 80, 81, 82, 83, -1,
963 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
964 -1, -1, -1, 98, 99, 100, 101, 102, -1, -1,
965 -1, 3, 4, 5, -1, -1, -1, 9, 113, 114,
966 -1, -1, 14, -1, 119, 17, 18, -1, 123, -1,
967 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
968 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
969 -1, -1, -1, -1, -1, -1, -1, -1, -1, 51,
970 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
971 62, -1, -1, -1, -1, -1, 68, 69, 70, 71,
972 72, 73, 74, 75, 76, 77, -1, -1, 80, 81,
973 82, 83, -1, -1, -1, -1, -1, -1, -1, -1,
974 -1, -1, -1, -1, -1, -1, 98, 99, 100, 101,
975 102, -1, -1, -1, 3, 4, 5, -1, -1, -1,
976 9, 113, 114, -1, -1, 14, -1, 119, 17, 18,
977 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
978 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
979 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
980 -1, -1, 51, 52, 53, 54, 55, 56, 57, 58,
981 59, 60, 61, 62, -1, -1, -1, -1, -1, 68,
982 69, 70, 71, 72, 73, 74, 75, 76, 77, -1,
983 -1, 80, 81, 82, 83, 3, 4, 5, -1, -1,
984 -1, 9, -1, -1, -1, -1, 14, -1, -1, 98,
985 99, 100, 101, 102, -1, -1, -1, -1, -1, -1,
986 -1, -1, -1, -1, 113, 114, -1, -1, -1, -1,
987 119, -1, -1, -1, 123, -1, -1, -1, 46, -1,
988 -1, -1, -1, 51, 52, 53, 54, 55, 56, 57,
989 58, 59, 60, 61, 62, -1, -1, -1, -1, -1,
990 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
991 -1, -1, 80, 81, 82, 83, 3, 4, 5, -1,
992 -1, -1, 9, -1, -1, -1, -1, 14, -1, -1,
993 98, 99, 100, 101, 102, -1, -1, -1, -1, -1,
994 -1, -1, -1, -1, -1, 113, 114, -1, -1, -1,
995 -1, 119, -1, -1, -1, 123, -1, -1, -1, 46,
996 -1, -1, -1, -1, 51, 52, 53, 54, 55, 56,
997 57, 58, 59, 60, 61, 62, -1, -1, -1, -1,
998 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76,
999 77, -1, -1, 80, 81, 82, 83, 3, 4, 5,
1000 -1, -1, -1, 9, -1, -1, -1, -1, 14, -1,
1001 -1, 98, 99, 100, 101, 102, -1, -1, -1, -1,
1002 -1, -1, -1, -1, -1, -1, 113, 114, -1, -1,
1003 -1, -1, 119, -1, -1, -1, 123, -1, -1, -1,
1004 -1, -1, -1, -1, -1, 51, 52, 53, 54, 55,
1005 56, 57, 58, 59, 60, 61, 62, -1, -1, -1,
1006 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75,
1007 76, 77, -1, -1, 80, 81, 82, 83, -1, -1,
1008 -1, -1, -1, 17, 18, -1, -1, -1, -1, -1,
1009 -1, -1, 98, 99, 100, 101, 102, 17, 18, -1,
1010 -1, -1, -1, -1, -1, -1, -1, 113, 114, -1,
1011 -1, -1, -1, 119, -1, -1, -1, 123, 52, 53,
1012 54, 55, 56, 57, 58, 59, 60, 61, 62, -1,
1013 -1, -1, 52, 53, 54, 55, 56, 57, 58, 59,
1014 60, 61, 62, -1, -1, -1, 80, 81, 82, 83,
1015 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1016 80, 81, 82, 83, 98, 99, 100, 101, 102, -1,
1017 -1, -1, 46, -1, -1, 49, -1, -1, 98, 99,
1018 100, 101, 102, -1, -1, -1, 52, 53, 54, 55,
1019 56, 57, 58, 59, 60, 61, 62, -1, -1, 133,
1020 -1, -1, -1, -1, -1, 46, -1, -1, 49, -1,
1021 -1, -1, -1, 133, 80, 81, 82, 83, 92, 93,
1022 94, 95, 96, 97, -1, -1, -1, -1, -1, -1,
1023 -1, -1, 98, 99, 100, 101, 102, -1, -1, -1,
1024 -1, 115, 116, 117, 118, 119, 120, 121, 122, -1,
1025 124, 92, 93, 94, 95, 96, 97, -1, -1, -1,
1026 -1, 92, 93, 94, 95, 96, 97, 133, -1, -1,
1027 -1, -1, -1, -1, 115, 116, 117, 118, 119, 120,
1028 121, 122, -1, 124, 115, 116, 117, 118, 119, 120,
1029 121, 122, -1, 124, 92, 93, 94, 95, 96, 97,
1030 -1, -1, -1, 92, 93, 94, 95, 96, 97, -1,
1031 -1, -1, -1, -1, -1, -1, -1, 115, 116, 117,
1032 118, 119, 120, 121, 122, -1, 124, 116, 117, 118,
1033 119, 120, 121, 122, -1, 124, 92, 93, 94, 95,
1034 96, 97, -1, -1, -1, 92, -1, 94, 95, 96,
1035 97, -1, -1, -1, 92, -1, 94, 95, 96, 97,
1036 116, 117, 118, 119, 120, 121, 122, -1, 124, 116,
1037 117, 118, 119, 120, 121, 122, -1, 124, 116, 117,
1038 118, 119, 120, 121, 122, -1, 124
1040 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1041 #line 3 "/usr/local/lib/bison.simple"
1043 /* Skeleton output parser for bison,
1044 Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
1046 This program is free software; you can redistribute it and/or modify
1047 it under the terms of the GNU General Public License as published by
1048 the Free Software Foundation; either version 1, or (at your option)
1051 This program is distributed in the hope that it will be useful,
1052 but WITHOUT ANY WARRANTY; without even the implied warranty of
1053 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1054 GNU General Public License for more details.
1056 You should have received a copy of the GNU General Public License
1057 along with this program; if not, write to the Free Software
1058 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
1063 #define alloca __builtin_alloca
1064 #else /* not GNU C. */
1065 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc)
1067 #else /* not sparc */
1068 #if defined (MSDOS) && !defined (__TURBOC__)
1070 #else /* not MSDOS, or __TURBOC__ */
1074 #endif /* not _AIX */
1075 #endif /* not MSDOS, or __TURBOC__ */
1076 #endif /* not sparc. */
1077 #endif /* not GNU C. */
1078 #endif /* alloca not defined. */
1080 /* This is the parser code that is written into each bison parser
1081 when the %semantic_parser declaration is not specified in the grammar.
1082 It was written by Richard Stallman by simplifying the hairy parser
1083 used when %semantic_parser is specified. */
1085 /* Note: there must be only one dollar sign in this file.
1086 It is replaced by the list of actions, each action
1087 as one case of the switch. */
1089 #define yyerrok (yyerrstatus = 0)
1090 #define yyclearin (yychar = YYEMPTY)
1093 #define YYACCEPT return(0)
1094 #define YYABORT return(1)
1095 #define YYERROR goto yyerrlab1
1096 /* Like YYERROR except do call yyerror.
1097 This remains here temporarily to ease the
1098 transition to the new meaning of YYERROR, for GCC.
1099 Once GCC version 2 has supplanted version 1, this can go. */
1100 #define YYFAIL goto yyerrlab
1101 #define YYRECOVERING() (!!yyerrstatus)
1102 #define YYBACKUP(token, value) \
1104 if (yychar == YYEMPTY && yylen == 1) \
1105 { yychar = (token), yylval = (value); \
1106 yychar1 = YYTRANSLATE (yychar); \
1111 { yyerror ("syntax error: cannot back up"); YYERROR; } \
1115 #define YYERRCODE 256
1118 #define YYLEX yylex()
1123 #define YYLEX yylex(&yylval, &yylloc)
1125 #define YYLEX yylex(&yylval)
1129 /* If nonreentrant, generate the variables here */
1133 int yychar
; /* the lookahead symbol */
1134 YYSTYPE yylval
; /* the semantic value of the */
1135 /* lookahead symbol */
1138 YYLTYPE yylloc
; /* location data for the lookahead */
1142 int yynerrs
; /* number of parse errors so far */
1143 #endif /* not YYPURE */
1146 int yydebug
; /* nonzero means print parse trace */
1147 /* Since this is uninitialized, it does not stop multiple parsers
1151 /* YYINITDEPTH indicates the initial size of the parser's stacks */
1154 #define YYINITDEPTH 200
1157 /* YYMAXDEPTH is the maximum size the stacks can grow to
1158 (effective only if the built-in stack extension method is used). */
1165 #define YYMAXDEPTH 10000
1168 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
1169 #define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
1170 #else /* not GNU C or C++ */
1173 /* This is the most reliable way to avoid incompatibilities
1174 in available built-in functions on various systems. */
1176 __yy_bcopy (from
, to
, count
)
1181 register char *f
= from
;
1182 register char *t
= to
;
1183 register int i
= count
;
1189 #else /* __cplusplus */
1191 /* This is the most reliable way to avoid incompatibilities
1192 in available built-in functions on various systems. */
1194 __yy_bcopy (char *from
, char *to
, int count
)
1196 register char *f
= from
;
1197 register char *t
= to
;
1198 register int i
= count
;
1207 #line 169 "/usr/local/lib/bison.simple"
1211 register int yystate
;
1213 register short *yyssp
;
1214 register YYSTYPE
*yyvsp
;
1215 int yyerrstatus
; /* number of tokens to shift before error messages enabled */
1216 int yychar1
; /* lookahead token as an internal (translated) token number */
1218 short yyssa
[YYINITDEPTH
]; /* the state stack */
1219 YYSTYPE yyvsa
[YYINITDEPTH
]; /* the semantic value stack */
1221 short *yyss
= yyssa
; /* refer to the stacks thru separate pointers */
1222 YYSTYPE
*yyvs
= yyvsa
; /* to allow yyoverflow to reallocate them elsewhere */
1225 YYLTYPE yylsa
[YYINITDEPTH
]; /* the location stack */
1226 YYLTYPE
*yyls
= yylsa
;
1229 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1231 #define YYPOPSTACK (yyvsp--, yyssp--)
1234 int yystacksize
= YYINITDEPTH
;
1245 YYSTYPE yyval
; /* the variable used to return */
1246 /* semantic values from the action */
1253 fprintf(stderr
, "Starting parse\n");
1259 yychar
= YYEMPTY
; /* Cause a token to be read. */
1261 /* Initialize stack pointers.
1262 Waste one element of value and location stack
1263 so that they stay on the same level as the state stack.
1264 The wasted elements are never initialized. */
1272 /* Push a new state, which is found in yystate . */
1273 /* In all cases, when you get here, the value and location stacks
1274 have just been pushed. so pushing a state here evens the stacks. */
1279 if (yyssp
>= yyss
+ yystacksize
- 1)
1281 /* Give user a chance to reallocate the stack */
1282 /* Use copies of these so that the &'s don't force the real ones into memory. */
1283 YYSTYPE
*yyvs1
= yyvs
;
1284 short *yyss1
= yyss
;
1286 YYLTYPE
*yyls1
= yyls
;
1289 /* Get the current used size of the three stacks, in elements. */
1290 int size
= yyssp
- yyss
+ 1;
1293 /* Each stack pointer address is followed by the size of
1294 the data in use in that stack, in bytes. */
1295 yyoverflow("parser stack overflow",
1296 &yyss1
, size
* sizeof (*yyssp
),
1297 &yyvs1
, size
* sizeof (*yyvsp
),
1299 &yyls1
, size
* sizeof (*yylsp
),
1303 yyss
= yyss1
; yyvs
= yyvs1
;
1307 #else /* no yyoverflow */
1308 /* Extend the stack our own way. */
1309 if (yystacksize
>= YYMAXDEPTH
)
1311 yyerror("parser stack overflow");
1315 if (yystacksize
> YYMAXDEPTH
)
1316 yystacksize
= YYMAXDEPTH
;
1317 yyss
= (short *) alloca (yystacksize
* sizeof (*yyssp
));
1318 __yy_bcopy ((char *)yyss1
, (char *)yyss
, size
* sizeof (*yyssp
));
1319 yyvs
= (YYSTYPE
*) alloca (yystacksize
* sizeof (*yyvsp
));
1320 __yy_bcopy ((char *)yyvs1
, (char *)yyvs
, size
* sizeof (*yyvsp
));
1322 yyls
= (YYLTYPE
*) alloca (yystacksize
* sizeof (*yylsp
));
1323 __yy_bcopy ((char *)yyls1
, (char *)yyls
, size
* sizeof (*yylsp
));
1325 #endif /* no yyoverflow */
1327 yyssp
= yyss
+ size
- 1;
1328 yyvsp
= yyvs
+ size
- 1;
1330 yylsp
= yyls
+ size
- 1;
1335 fprintf(stderr
, "Stack size increased to %d\n", yystacksize
);
1338 if (yyssp
>= yyss
+ yystacksize
- 1)
1344 fprintf(stderr
, "Entering state %d\n", yystate
);
1350 /* Do appropriate processing given the current state. */
1351 /* Read a lookahead token if we need one and don't already have one. */
1354 /* First try to decide what to do without reference to lookahead token. */
1356 yyn
= yypact
[yystate
];
1360 /* Not known => get a lookahead token if don't already have one. */
1362 /* yychar is either YYEMPTY or YYEOF
1363 or a valid token in external form. */
1365 if (yychar
== YYEMPTY
)
1369 fprintf(stderr
, "Reading a token: ");
1374 /* Convert token to internal form (in yychar1) for indexing tables with */
1376 if (yychar
<= 0) /* This means end of input. */
1379 yychar
= YYEOF
; /* Don't call YYLEX any more */
1383 fprintf(stderr
, "Now at end of input.\n");
1388 yychar1
= YYTRANSLATE(yychar
);
1393 fprintf (stderr
, "Next token is %d (%s", yychar
, yytname
[yychar1
]);
1394 /* Give the individual parser a way to print the precise meaning
1395 of a token, for further debugging info. */
1397 YYPRINT (stderr
, yychar
, yylval
);
1399 fprintf (stderr
, ")\n");
1405 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != yychar1
)
1410 /* yyn is what to do for this token type in this state.
1411 Negative => reduce, -yyn is rule number.
1412 Positive => shift, yyn is new state.
1413 New state is final state => don't bother to shift,
1414 just return success.
1415 0, or most negative number => error. */
1430 /* Shift the lookahead token. */
1434 fprintf(stderr
, "Shifting token %d (%s), ", yychar
, yytname
[yychar1
]);
1437 /* Discard the token being shifted unless it is eof. */
1438 if (yychar
!= YYEOF
)
1446 /* count tokens shifted since error; after three, turn off error status. */
1447 if (yyerrstatus
) yyerrstatus
--;
1452 /* Do the default action for the current state. */
1455 yyn
= yydefact
[yystate
];
1459 /* Do a reduction. yyn is the number of a rule to reduce with. */
1462 yyval
= yyvsp
[1-yylen
]; /* implement default value of the action */
1469 fprintf (stderr
, "Reducing via rule %d (line %d), ",
1472 /* Print the symbols being reduced, and their result. */
1473 for (i
= yyprhs
[yyn
]; yyrhs
[i
] > 0; i
++)
1474 fprintf (stderr
, "%s ", yytname
[yyrhs
[i
]]);
1475 fprintf (stderr
, " -> %s\n", yytname
[yyr1
[yyn
]]);
1486 print_picture(olist
.head
);
1491 { yyval
.pl
= yyvsp
[-1].pl
; ;
1495 { yyval
.pl
= yyvsp
[0].pl
; ;
1499 { yyval
.pl
= yyvsp
[-2].pl
; ;
1504 define_variable(yyvsp
[-2].str
, yyvsp
[0].x
);
1505 a_delete yyvsp
[-2].str
;
1511 place
*p
= lookup_label(yyvsp
[-3].str
);
1513 lex_error("variable `%1' not defined", yyvsp
[-3].str
);
1519 a_delete yyvsp
[-3].str
;
1524 { current_direction
= UP_DIRECTION
; ;
1528 { current_direction
= DOWN_DIRECTION
; ;
1532 { current_direction
= LEFT_DIRECTION
; ;
1536 { current_direction
= RIGHT_DIRECTION
; ;
1541 olist
.append(make_command_object(yyvsp
[0].lstr
.str
, yyvsp
[0].lstr
.filename
,
1542 yyvsp
[0].lstr
.lineno
));
1548 olist
.append(make_command_object(yyvsp
[0].lstr
.str
, yyvsp
[0].lstr
.filename
,
1549 yyvsp
[0].lstr
.lineno
));
1555 fprintf(stderr
, "%s\n", yyvsp
[0].lstr
.str
);
1567 system(yyvsp
[0].str
);
1568 a_delete yyvsp
[0].str
;
1576 do_copy(yyvsp
[0].lstr
.str
);
1577 // do not delete the filename
1593 copy_file_thru(yyvsp
[-5].lstr
.str
, yyvsp
[-2].str
, yyvsp
[0].str
);
1594 // do not delete the filename
1595 a_delete yyvsp
[-2].str
;
1596 a_delete yyvsp
[0].str
;
1612 copy_rest_thru(yyvsp
[-2].str
, yyvsp
[0].str
);
1613 a_delete yyvsp
[-2].str
;
1614 a_delete yyvsp
[0].str
;
1627 do_for(yyvsp
[-8].str
, yyvsp
[-6].x
, yyvsp
[-4].x
, yyvsp
[-3].by
.is_multiplicative
, yyvsp
[-3].by
.val
, yyvsp
[0].str
);
1635 if (yyvsp
[0].if_data
.x
!= 0.0)
1636 push_body(yyvsp
[0].if_data
.body
);
1637 a_delete yyvsp
[0].if_data
.body
;
1650 if (yyvsp
[-3].if_data
.x
!= 0.0)
1651 push_body(yyvsp
[-3].if_data
.body
);
1653 push_body(yyvsp
[0].str
);
1654 a_delete yyvsp
[-3].if_data
.body
;
1655 a_delete yyvsp
[0].str
;
1660 { define_variable("scale", 1.0); ;
1664 { reset(yyvsp
[0].str
); a_delete yyvsp
[0].str
; ;
1668 { reset(yyvsp
[0].str
); a_delete yyvsp
[0].str
; ;
1672 { reset(yyvsp
[0].str
); a_delete yyvsp
[0].str
; ;
1676 { yyval
.lstr
= yyvsp
[0].lstr
; ;
1681 yyval
.lstr
.str
= new char[strlen(yyvsp
[-1].lstr
.str
) + strlen(yyvsp
[0].lstr
.str
) + 1];
1682 strcpy(yyval
.lstr
.str
, yyvsp
[-1].lstr
.str
);
1683 strcat(yyval
.lstr
.str
, yyvsp
[0].lstr
.str
);
1684 a_delete yyvsp
[-1].lstr
.str
;
1685 a_delete yyvsp
[0].lstr
.str
;
1686 if (yyvsp
[-1].lstr
.filename
) {
1687 yyval
.lstr
.filename
= yyvsp
[-1].lstr
.filename
;
1688 yyval
.lstr
.lineno
= yyvsp
[-1].lstr
.lineno
;
1690 else if (yyvsp
[0].lstr
.filename
) {
1691 yyval
.lstr
.filename
= yyvsp
[0].lstr
.filename
;
1692 yyval
.lstr
.lineno
= yyvsp
[0].lstr
.lineno
;
1699 yyval
.lstr
.str
= new char[GDIGITS
+ 1];
1700 sprintf(yyval
.lstr
.str
, "%g", yyvsp
[0].x
);
1701 yyval
.lstr
.filename
= 0;
1702 yyval
.lstr
.lineno
= 0;
1707 { yyval
.lstr
= yyvsp
[0].lstr
; ;
1712 yyval
.lstr
.str
= new char[GDIGITS
+ 2 + GDIGITS
+ 1];
1713 sprintf(yyval
.lstr
.str
, "%g, %g", yyvsp
[0].pair
.x
, yyvsp
[0].pair
.y
);
1714 yyval
.lstr
.filename
= 0;
1715 yyval
.lstr
.lineno
= 0;
1724 { delim_flag
= 0; yyval
.if_data
.x
= yyvsp
[-3].x
; yyval
.if_data
.body
= yyvsp
[0].str
; ;
1732 { yyval
.str
= yyvsp
[0].lstr
.str
; ;
1736 { yyval
.x
= yyvsp
[0].x
; ;
1740 { yyval
.x
= yyvsp
[0].x
; ;
1745 yyval
.x
= strcmp(yyvsp
[-2].lstr
.str
, yyvsp
[0].lstr
.str
) == 0;
1746 a_delete yyvsp
[-2].lstr
.str
;
1747 a_delete yyvsp
[0].lstr
.str
;
1753 yyval
.x
= strcmp(yyvsp
[-2].lstr
.str
, yyvsp
[0].lstr
.str
) != 0;
1754 a_delete yyvsp
[-2].lstr
.str
;
1755 a_delete yyvsp
[0].lstr
.str
;
1760 { yyval
.x
= (yyvsp
[-2].x
!= 0.0 && yyvsp
[0].x
!= 0.0); ;
1764 { yyval
.x
= (yyvsp
[-2].x
!= 0.0 && yyvsp
[0].x
!= 0.0); ;
1768 { yyval
.x
= (yyvsp
[-2].x
!= 0.0 && yyvsp
[0].x
!= 0.0); ;
1772 { yyval
.x
= (yyvsp
[-2].x
!= 0.0 || yyvsp
[0].x
!= 0.0); ;
1776 { yyval
.x
= (yyvsp
[-2].x
!= 0.0 || yyvsp
[0].x
!= 0.0); ;
1780 { yyval
.x
= (yyvsp
[-2].x
!= 0.0 || yyvsp
[0].x
!= 0.0); ;
1784 { yyval
.x
= (yyvsp
[0].x
== 0.0); ;
1788 { yyval
.by
.val
= 1.0; yyval
.by
.is_multiplicative
= 0; ;
1792 { yyval
.by
.val
= yyvsp
[0].x
; yyval
.by
.is_multiplicative
= 0; ;
1796 { yyval
.by
.val
= yyvsp
[0].x
; yyval
.by
.is_multiplicative
= 1; ;
1801 yyval
.pl
.obj
= yyvsp
[0].spec
->make_object(¤t_position
,
1802 ¤t_direction
);
1803 if (yyval
.pl
.obj
== 0)
1805 delete yyvsp
[0].spec
;
1807 olist
.append(yyval
.pl
.obj
);
1809 yyval
.pl
.x
= current_position
.x
;
1810 yyval
.pl
.y
= current_position
.y
;
1816 { yyval
.pl
= yyvsp
[0].pl
; define_label(yyvsp
[-3].str
, & yyval
.pl
); a_delete yyvsp
[-3].str
; ;
1822 yyval
.pl
.x
= yyvsp
[0].pair
.x
;
1823 yyval
.pl
.y
= yyvsp
[0].pair
.y
;
1824 define_label(yyvsp
[-3].str
, & yyval
.pl
);
1825 a_delete yyvsp
[-3].str
;
1831 yyval
.pl
= yyvsp
[0].pl
;
1832 define_label(yyvsp
[-3].str
, & yyval
.pl
);
1833 a_delete yyvsp
[-3].str
;
1839 yyval
.state
.x
= current_position
.x
;
1840 yyval
.state
.y
= current_position
.y
;
1841 yyval
.state
.dir
= current_direction
;
1847 current_position
.x
= yyvsp
[-2].state
.x
;
1848 current_position
.y
= yyvsp
[-2].state
.y
;
1849 current_direction
= yyvsp
[-2].state
.dir
;
1855 yyval
.pl
= yyvsp
[-3].pl
;
1862 yyval
.pl
.x
= current_position
.x
;
1863 yyval
.pl
.y
= current_position
.y
;
1877 yyval
.spec
= new object_spec(BOX_OBJECT
);
1883 yyval
.spec
= new object_spec(CIRCLE_OBJECT
);
1889 yyval
.spec
= new object_spec(ELLIPSE_OBJECT
);
1895 yyval
.spec
= new object_spec(ARC_OBJECT
);
1896 yyval
.spec
->dir
= current_direction
;
1902 yyval
.spec
= new object_spec(LINE_OBJECT
);
1903 lookup_variable("lineht", & yyval
.spec
->segment_height
);
1904 lookup_variable("linewid", & yyval
.spec
->segment_width
);
1905 yyval
.spec
->dir
= current_direction
;
1911 yyval
.spec
= new object_spec(ARROW_OBJECT
);
1912 lookup_variable("lineht", & yyval
.spec
->segment_height
);
1913 lookup_variable("linewid", & yyval
.spec
->segment_width
);
1914 yyval
.spec
->dir
= current_direction
;
1920 yyval
.spec
= new object_spec(MOVE_OBJECT
);
1921 lookup_variable("moveht", & yyval
.spec
->segment_height
);
1922 lookup_variable("movewid", & yyval
.spec
->segment_width
);
1923 yyval
.spec
->dir
= current_direction
;
1929 yyval
.spec
= new object_spec(SPLINE_OBJECT
);
1930 lookup_variable("lineht", & yyval
.spec
->segment_height
);
1931 lookup_variable("linewid", & yyval
.spec
->segment_width
);
1932 yyval
.spec
->dir
= current_direction
;
1938 yyval
.spec
= new object_spec(TEXT_OBJECT
);
1939 yyval
.spec
->text
= new text_item(yyvsp
[0].lstr
.str
, yyvsp
[0].lstr
.filename
, yyvsp
[0].lstr
.lineno
);
1945 yyval
.spec
= new object_spec(TEXT_OBJECT
);
1946 yyval
.spec
->text
= new text_item(format_number(0, yyvsp
[0].x
), 0, -1);
1952 yyval
.spec
= new object_spec(TEXT_OBJECT
);
1953 yyval
.spec
->text
= new text_item(format_number(yyvsp
[0].lstr
.str
, yyvsp
[-1].x
),
1954 yyvsp
[0].lstr
.filename
, yyvsp
[0].lstr
.lineno
);
1955 a_delete yyvsp
[0].lstr
.str
;
1961 saved_state
*p
= new saved_state
;
1963 p
->x
= current_position
.x
;
1964 p
->y
= current_position
.y
;
1965 p
->dir
= current_direction
;
1966 p
->tbl
= current_table
;
1967 p
->prev
= current_saved_state
;
1968 current_position
.x
= 0.0;
1969 current_position
.y
= 0.0;
1970 current_table
= new PTABLE(place
);
1971 current_saved_state
= p
;
1972 olist
.append(make_mark_object());
1978 current_position
.x
= yyvsp
[-2].pstate
->x
;
1979 current_position
.y
= yyvsp
[-2].pstate
->y
;
1980 current_direction
= yyvsp
[-2].pstate
->dir
;
1981 yyval
.spec
= new object_spec(BLOCK_OBJECT
);
1982 olist
.wrap_up_block(& yyval
.spec
->oblist
);
1983 yyval
.spec
->tbl
= current_table
;
1984 current_table
= yyvsp
[-2].pstate
->tbl
;
1985 current_saved_state
= yyvsp
[-2].pstate
->prev
;
1986 delete yyvsp
[-2].pstate
;
1992 yyval
.spec
= yyvsp
[-2].spec
;
1993 yyval
.spec
->height
= yyvsp
[0].x
;
1994 yyval
.spec
->flags
|= HAS_HEIGHT
;
2000 yyval
.spec
= yyvsp
[-2].spec
;
2001 yyval
.spec
->radius
= yyvsp
[0].x
;
2002 yyval
.spec
->flags
|= HAS_RADIUS
;
2008 yyval
.spec
= yyvsp
[-2].spec
;
2009 yyval
.spec
->width
= yyvsp
[0].x
;
2010 yyval
.spec
->flags
|= HAS_WIDTH
;
2016 yyval
.spec
= yyvsp
[-2].spec
;
2017 yyval
.spec
->radius
= yyvsp
[0].x
/2.0;
2018 yyval
.spec
->flags
|= HAS_RADIUS
;
2024 yyval
.spec
= yyvsp
[-1].spec
;
2025 yyval
.spec
->flags
|= HAS_SEGMENT
;
2026 switch (yyval
.spec
->dir
) {
2028 yyval
.spec
->segment_pos
.y
+= yyvsp
[0].x
;
2030 case DOWN_DIRECTION
:
2031 yyval
.spec
->segment_pos
.y
-= yyvsp
[0].x
;
2033 case RIGHT_DIRECTION
:
2034 yyval
.spec
->segment_pos
.x
+= yyvsp
[0].x
;
2036 case LEFT_DIRECTION
:
2037 yyval
.spec
->segment_pos
.x
-= yyvsp
[0].x
;
2045 yyval
.spec
= yyvsp
[-1].spec
;
2046 yyval
.spec
->dir
= UP_DIRECTION
;
2047 yyval
.spec
->flags
|= HAS_SEGMENT
;
2048 yyval
.spec
->segment_pos
.y
+= yyval
.spec
->segment_height
;
2054 yyval
.spec
= yyvsp
[-2].spec
;
2055 yyval
.spec
->dir
= UP_DIRECTION
;
2056 yyval
.spec
->flags
|= HAS_SEGMENT
;
2057 yyval
.spec
->segment_pos
.y
+= yyvsp
[0].x
;
2063 yyval
.spec
= yyvsp
[-1].spec
;
2064 yyval
.spec
->dir
= DOWN_DIRECTION
;
2065 yyval
.spec
->flags
|= HAS_SEGMENT
;
2066 yyval
.spec
->segment_pos
.y
-= yyval
.spec
->segment_height
;
2072 yyval
.spec
= yyvsp
[-2].spec
;
2073 yyval
.spec
->dir
= DOWN_DIRECTION
;
2074 yyval
.spec
->flags
|= HAS_SEGMENT
;
2075 yyval
.spec
->segment_pos
.y
-= yyvsp
[0].x
;
2081 yyval
.spec
= yyvsp
[-1].spec
;
2082 yyval
.spec
->dir
= RIGHT_DIRECTION
;
2083 yyval
.spec
->flags
|= HAS_SEGMENT
;
2084 yyval
.spec
->segment_pos
.x
+= yyval
.spec
->segment_width
;
2090 yyval
.spec
= yyvsp
[-2].spec
;
2091 yyval
.spec
->dir
= RIGHT_DIRECTION
;
2092 yyval
.spec
->flags
|= HAS_SEGMENT
;
2093 yyval
.spec
->segment_pos
.x
+= yyvsp
[0].x
;
2099 yyval
.spec
= yyvsp
[-1].spec
;
2100 yyval
.spec
->dir
= LEFT_DIRECTION
;
2101 yyval
.spec
->flags
|= HAS_SEGMENT
;
2102 yyval
.spec
->segment_pos
.x
-= yyval
.spec
->segment_width
;
2108 yyval
.spec
= yyvsp
[-2].spec
;
2109 yyval
.spec
->dir
= LEFT_DIRECTION
;
2110 yyval
.spec
->flags
|= HAS_SEGMENT
;
2111 yyval
.spec
->segment_pos
.x
-= yyvsp
[0].x
;
2117 yyval
.spec
= yyvsp
[-2].spec
;
2118 yyval
.spec
->flags
|= HAS_FROM
;
2119 yyval
.spec
->from
.x
= yyvsp
[0].pair
.x
;
2120 yyval
.spec
->from
.y
= yyvsp
[0].pair
.y
;
2126 yyval
.spec
= yyvsp
[-2].spec
;
2127 if (yyval
.spec
->flags
& HAS_SEGMENT
)
2128 yyval
.spec
->segment_list
= new segment(yyval
.spec
->segment_pos
,
2129 yyval
.spec
->segment_is_absolute
,
2130 yyval
.spec
->segment_list
);
2131 yyval
.spec
->flags
|= HAS_SEGMENT
;
2132 yyval
.spec
->segment_pos
.x
= yyvsp
[0].pair
.x
;
2133 yyval
.spec
->segment_pos
.y
= yyvsp
[0].pair
.y
;
2134 yyval
.spec
->segment_is_absolute
= 1;
2135 yyval
.spec
->flags
|= HAS_TO
;
2136 yyval
.spec
->to
.x
= yyvsp
[0].pair
.x
;
2137 yyval
.spec
->to
.y
= yyvsp
[0].pair
.y
;
2143 yyval
.spec
= yyvsp
[-2].spec
;
2144 yyval
.spec
->flags
|= HAS_AT
;
2145 yyval
.spec
->at
.x
= yyvsp
[0].pair
.x
;
2146 yyval
.spec
->at
.y
= yyvsp
[0].pair
.y
;
2147 if (yyval
.spec
->type
!= ARC_OBJECT
) {
2148 yyval
.spec
->flags
|= HAS_FROM
;
2149 yyval
.spec
->from
.x
= yyvsp
[0].pair
.x
;
2150 yyval
.spec
->from
.y
= yyvsp
[0].pair
.y
;
2157 yyval
.spec
= yyvsp
[-2].spec
;
2158 yyval
.spec
->flags
|= HAS_WITH
;
2159 yyval
.spec
->with
= yyvsp
[0].pth
;
2165 yyval
.spec
= yyvsp
[-2].spec
;
2166 yyval
.spec
->flags
|= HAS_SEGMENT
;
2167 yyval
.spec
->segment_pos
.x
+= yyvsp
[0].pair
.x
;
2168 yyval
.spec
->segment_pos
.y
+= yyvsp
[0].pair
.y
;
2174 yyval
.spec
= yyvsp
[-1].spec
;
2175 if (yyval
.spec
->flags
& HAS_SEGMENT
) {
2176 yyval
.spec
->segment_list
= new segment(yyval
.spec
->segment_pos
,
2177 yyval
.spec
->segment_is_absolute
,
2178 yyval
.spec
->segment_list
);
2179 yyval
.spec
->flags
&= ~HAS_SEGMENT
;
2180 yyval
.spec
->segment_pos
.x
= yyval
.spec
->segment_pos
.y
= 0.0;
2181 yyval
.spec
->segment_is_absolute
= 0;
2188 yyval
.spec
= yyvsp
[-1].spec
;
2189 yyval
.spec
->flags
|= IS_DOTTED
;
2190 lookup_variable("dashwid", & yyval
.spec
->dash_width
);
2196 yyval
.spec
= yyvsp
[-2].spec
;
2197 yyval
.spec
->flags
|= IS_DOTTED
;
2198 yyval
.spec
->dash_width
= yyvsp
[0].x
;
2204 yyval
.spec
= yyvsp
[-1].spec
;
2205 yyval
.spec
->flags
|= IS_DASHED
;
2206 lookup_variable("dashwid", & yyval
.spec
->dash_width
);
2212 yyval
.spec
= yyvsp
[-2].spec
;
2213 yyval
.spec
->flags
|= IS_DASHED
;
2214 yyval
.spec
->dash_width
= yyvsp
[0].x
;
2220 yyval
.spec
= yyvsp
[-1].spec
;
2221 yyval
.spec
->flags
|= IS_DEFAULT_FILLED
;
2227 yyval
.spec
= yyvsp
[-2].spec
;
2228 yyval
.spec
->flags
|= IS_FILLED
;
2229 yyval
.spec
->fill
= yyvsp
[0].x
;
2235 yyval
.spec
= yyvsp
[-1].spec
;
2236 // line chop chop means line chop 0 chop 0
2237 if (yyval
.spec
->flags
& IS_DEFAULT_CHOPPED
) {
2238 yyval
.spec
->flags
|= IS_CHOPPED
;
2239 yyval
.spec
->flags
&= ~IS_DEFAULT_CHOPPED
;
2240 yyval
.spec
->start_chop
= yyval
.spec
->end_chop
= 0.0;
2242 else if (yyval
.spec
->flags
& IS_CHOPPED
) {
2243 yyval
.spec
->end_chop
= 0.0;
2246 yyval
.spec
->flags
|= IS_DEFAULT_CHOPPED
;
2253 yyval
.spec
= yyvsp
[-2].spec
;
2254 if (yyval
.spec
->flags
& IS_DEFAULT_CHOPPED
) {
2255 yyval
.spec
->flags
|= IS_CHOPPED
;
2256 yyval
.spec
->flags
&= ~IS_DEFAULT_CHOPPED
;
2257 yyval
.spec
->start_chop
= 0.0;
2258 yyval
.spec
->end_chop
= yyvsp
[0].x
;
2260 else if (yyval
.spec
->flags
& IS_CHOPPED
) {
2261 yyval
.spec
->end_chop
= yyvsp
[0].x
;
2264 yyval
.spec
->start_chop
= yyval
.spec
->end_chop
= yyvsp
[0].x
;
2265 yyval
.spec
->flags
|= IS_CHOPPED
;
2272 yyval
.spec
= yyvsp
[-1].spec
;
2273 yyval
.spec
->flags
|= IS_SAME
;
2279 yyval
.spec
= yyvsp
[-1].spec
;
2280 yyval
.spec
->flags
|= IS_INVISIBLE
;
2286 yyval
.spec
= yyvsp
[-1].spec
;
2287 yyval
.spec
->flags
|= HAS_LEFT_ARROW_HEAD
;
2293 yyval
.spec
= yyvsp
[-1].spec
;
2294 yyval
.spec
->flags
|= HAS_RIGHT_ARROW_HEAD
;
2300 yyval
.spec
= yyvsp
[-1].spec
;
2301 yyval
.spec
->flags
|= (HAS_LEFT_ARROW_HEAD
|HAS_RIGHT_ARROW_HEAD
);
2307 yyval
.spec
= yyvsp
[-1].spec
;
2308 yyval
.spec
->flags
|= IS_CLOCKWISE
;
2314 yyval
.spec
= yyvsp
[-1].spec
;
2315 yyval
.spec
->flags
&= ~IS_CLOCKWISE
;
2321 yyval
.spec
= yyvsp
[-1].spec
;
2322 for (text_item
**p
= & yyval
.spec
->text
; *p
; p
= &(*p
)->next
)
2324 *p
= new text_item(yyvsp
[0].lstr
.str
, yyvsp
[0].lstr
.filename
, yyvsp
[0].lstr
.lineno
);
2330 yyval
.spec
= yyvsp
[-1].spec
;
2331 if (yyval
.spec
->text
) {
2332 for (text_item
*p
= yyval
.spec
->text
; p
->next
; p
= p
->next
)
2334 p
->adj
.h
= LEFT_ADJUST
;
2341 yyval
.spec
= yyvsp
[-1].spec
;
2342 if (yyval
.spec
->text
) {
2343 for (text_item
*p
= yyval
.spec
->text
; p
->next
; p
= p
->next
)
2345 p
->adj
.h
= RIGHT_ADJUST
;
2352 yyval
.spec
= yyvsp
[-1].spec
;
2353 if (yyval
.spec
->text
) {
2354 for (text_item
*p
= yyval
.spec
->text
; p
->next
; p
= p
->next
)
2356 p
->adj
.v
= ABOVE_ADJUST
;
2363 yyval
.spec
= yyvsp
[-1].spec
;
2364 if (yyval
.spec
->text
) {
2365 for (text_item
*p
= yyval
.spec
->text
; p
->next
; p
= p
->next
)
2367 p
->adj
.v
= BELOW_ADJUST
;
2374 yyval
.spec
= yyvsp
[-2].spec
;
2375 yyval
.spec
->flags
|= HAS_THICKNESS
;
2376 yyval
.spec
->thickness
= yyvsp
[0].x
;
2382 yyval
.spec
= yyvsp
[-1].spec
;
2383 yyval
.spec
->flags
|= IS_ALIGNED
;
2389 yyval
.lstr
= yyvsp
[0].lstr
;
2395 yyval
.lstr
.filename
= yyvsp
[-2].lstr
.filename
;
2396 yyval
.lstr
.lineno
= yyvsp
[-2].lstr
.lineno
;
2397 yyval
.lstr
.str
= do_sprintf(yyvsp
[-2].lstr
.str
, yyvsp
[-1].dv
.v
, yyvsp
[-1].dv
.nv
);
2398 a_delete yyvsp
[-1].dv
.v
;
2399 a_delete yyvsp
[-2].lstr
.str
;
2413 yyval
.dv
= yyvsp
[-2].dv
;
2414 if (yyval
.dv
.nv
>= yyval
.dv
.maxv
) {
2415 if (yyval
.dv
.nv
== 0) {
2416 yyval
.dv
.v
= new double[4];
2420 double *oldv
= yyval
.dv
.v
;
2422 yyval
.dv
.v
= new double[yyval
.dv
.maxv
];
2423 memcpy(yyval
.dv
.v
, oldv
, yyval
.dv
.nv
*sizeof(double));
2427 yyval
.dv
.v
[yyval
.dv
.nv
] = yyvsp
[0].x
;
2433 { yyval
.pair
= yyvsp
[0].pair
; ;
2438 position pos
= yyvsp
[0].pl
;
2439 yyval
.pair
.x
= pos
.x
;
2440 yyval
.pair
.y
= pos
.y
;
2445 { yyval
.pair
= yyvsp
[0].pair
; ;
2450 yyval
.pair
.x
= yyvsp
[-2].pair
.x
+ yyvsp
[0].pair
.x
;
2451 yyval
.pair
.y
= yyvsp
[-2].pair
.y
+ yyvsp
[0].pair
.y
;
2457 yyval
.pair
.x
= yyvsp
[-2].pair
.x
- yyvsp
[0].pair
.x
;
2458 yyval
.pair
.y
= yyvsp
[-2].pair
.y
- yyvsp
[0].pair
.y
;
2464 yyval
.pair
.x
= yyvsp
[-3].pair
.x
;
2465 yyval
.pair
.y
= yyvsp
[-1].pair
.y
;
2471 yyval
.pair
.x
= (1.0 - yyvsp
[-4].x
)*yyvsp
[-2].pair
.x
+ yyvsp
[-4].x
*yyvsp
[0].pair
.x
;
2472 yyval
.pair
.y
= (1.0 - yyvsp
[-4].x
)*yyvsp
[-2].pair
.y
+ yyvsp
[-4].x
*yyvsp
[0].pair
.y
;
2478 yyval
.pair
.x
= (1.0 - yyvsp
[-5].x
)*yyvsp
[-3].pair
.x
+ yyvsp
[-5].x
*yyvsp
[-1].pair
.x
;
2479 yyval
.pair
.y
= (1.0 - yyvsp
[-5].x
)*yyvsp
[-3].pair
.y
+ yyvsp
[-5].x
*yyvsp
[-1].pair
.y
;
2484 { yyval
.pair
.x
= yyvsp
[-2].x
; yyval
.pair
.y
= yyvsp
[0].x
; ;
2488 { yyval
.pair
= yyvsp
[-1].pair
; ;
2492 { yyval
.pl
= yyvsp
[0].pl
; ;
2497 path
pth(yyvsp
[0].crn
);
2498 if (!pth
.follow(yyvsp
[-1].pl
, & yyval
.pl
))
2505 path
pth(yyvsp
[-1].crn
);
2506 if (!pth
.follow(yyvsp
[0].pl
, & yyval
.pl
))
2513 path
pth(yyvsp
[-2].crn
);
2514 if (!pth
.follow(yyvsp
[0].pl
, & yyval
.pl
))
2521 yyval
.pl
.x
= current_position
.x
;
2522 yyval
.pl
.y
= current_position
.y
;
2529 place
*p
= lookup_label(yyvsp
[0].str
);
2531 lex_error("there is no place `%1'", yyvsp
[0].str
);
2535 a_delete yyvsp
[0].str
;
2541 yyval
.pl
.obj
= yyvsp
[0].obj
;
2547 path
pth(yyvsp
[0].str
);
2548 if (!pth
.follow(yyvsp
[-2].pl
, & yyval
.pl
))
2554 { yyval
.n
= yyvsp
[0].n
; ;
2559 // XXX Check for overflow (and non-integers?).
2560 yyval
.n
= (int)yyvsp
[-1].x
;
2569 { yyval
.n
= yyvsp
[-1].n
; ;
2575 for (object
*p
= olist
.head
; p
!= 0; p
= p
->next
)
2576 if (p
->type() == yyvsp
[0].obtype
&& ++count
== yyvsp
[-1].n
) {
2581 lex_error("there is no %1%2 %3", yyvsp
[-1].n
, ordinal_postfix(yyvsp
[-1].n
),
2582 object_type_name(yyvsp
[0].obtype
));
2591 for (object
*p
= olist
.tail
; p
!= 0; p
= p
->prev
)
2592 if (p
->type() == yyvsp
[0].obtype
&& ++count
== yyvsp
[-1].n
) {
2597 lex_error("there is no %1%2 last %3", yyvsp
[-1].n
,
2598 ordinal_postfix(yyvsp
[-1].n
), object_type_name(yyvsp
[0].obtype
));
2605 { yyval
.obtype
= BOX_OBJECT
; ;
2609 { yyval
.obtype
= CIRCLE_OBJECT
; ;
2613 { yyval
.obtype
= ELLIPSE_OBJECT
; ;
2617 { yyval
.obtype
= ARC_OBJECT
; ;
2621 { yyval
.obtype
= LINE_OBJECT
; ;
2625 { yyval
.obtype
= ARROW_OBJECT
; ;
2629 { yyval
.obtype
= SPLINE_OBJECT
; ;
2633 { yyval
.obtype
= BLOCK_OBJECT
; ;
2637 { yyval
.obtype
= TEXT_OBJECT
; ;
2642 yyval
.pth
= new path(yyvsp
[0].str
);
2648 yyval
.pth
= yyvsp
[-2].pth
;
2649 yyval
.pth
->append(yyvsp
[0].str
);
2655 yyval
.pth
= new path(yyvsp
[0].crn
);
2661 yyval
.pth
= yyvsp
[0].pth
;
2667 yyval
.pth
= yyvsp
[-1].pth
;
2668 yyval
.pth
->append(yyvsp
[0].crn
);
2674 yyval
.pth
= yyvsp
[0].pth
;
2680 lex_warning("`%1%2 last %3' in `with' argument ignored",
2681 yyvsp
[-3].n
, ordinal_postfix(yyvsp
[-3].n
), object_type_name(yyvsp
[-1].obtype
));
2682 yyval
.pth
= yyvsp
[0].pth
;
2688 lex_warning("`last %1' in `with' argument ignored",
2689 object_type_name(yyvsp
[-1].obtype
));
2690 yyval
.pth
= yyvsp
[0].pth
;
2696 lex_warning("`%1%2 %3' in `with' argument ignored",
2697 yyvsp
[-2].n
, ordinal_postfix(yyvsp
[-2].n
), object_type_name(yyvsp
[-1].obtype
));
2698 yyval
.pth
= yyvsp
[0].pth
;
2704 lex_warning("initial `%1' in `with' argument ignored", yyvsp
[-1].str
);
2705 a_delete yyvsp
[-1].str
;
2706 yyval
.pth
= yyvsp
[0].pth
;
2711 { yyval
.crn
= &object::north
; ;
2715 { yyval
.crn
= &object::east
; ;
2719 { yyval
.crn
= &object::west
; ;
2723 { yyval
.crn
= &object::south
; ;
2727 { yyval
.crn
= &object::north_east
; ;
2731 { yyval
.crn
= &object:: south_east
; ;
2735 { yyval
.crn
= &object::north_west
; ;
2739 { yyval
.crn
= &object::south_west
; ;
2743 { yyval
.crn
= &object::center
; ;
2747 { yyval
.crn
= &object::start
; ;
2751 { yyval
.crn
= &object::end
; ;
2755 { yyval
.crn
= &object::north
; ;
2759 { yyval
.crn
= &object::south
; ;
2763 { yyval
.crn
= &object::west
; ;
2767 { yyval
.crn
= &object::east
; ;
2771 { yyval
.crn
= &object::north_west
; ;
2775 { yyval
.crn
= &object::south_west
; ;
2779 { yyval
.crn
= &object::north_east
; ;
2783 { yyval
.crn
= &object::south_east
; ;
2787 { yyval
.crn
= &object::west
; ;
2791 { yyval
.crn
= &object::east
; ;
2795 { yyval
.crn
= &object::north_west
; ;
2799 { yyval
.crn
= &object::south_west
; ;
2803 { yyval
.crn
= &object::north_east
; ;
2807 { yyval
.crn
= &object::south_east
; ;
2811 { yyval
.crn
= &object::center
; ;
2815 { yyval
.crn
= &object::start
; ;
2819 { yyval
.crn
= &object::end
; ;
2824 if (!lookup_variable(yyvsp
[0].str
, & yyval
.x
)) {
2825 lex_error("there is no variable `%1'", yyvsp
[0].str
);
2828 a_delete yyvsp
[0].str
;
2833 { yyval
.x
= yyvsp
[0].x
; ;
2838 if (yyvsp
[-1].pl
.obj
!= 0)
2839 yyval
.x
= yyvsp
[-1].pl
.obj
->origin().x
;
2841 yyval
.x
= yyvsp
[-1].pl
.x
;
2847 if (yyvsp
[-1].pl
.obj
!= 0)
2848 yyval
.x
= yyvsp
[-1].pl
.obj
->origin().y
;
2850 yyval
.x
= yyvsp
[-1].pl
.y
;
2856 if (yyvsp
[-1].pl
.obj
!= 0)
2857 yyval
.x
= yyvsp
[-1].pl
.obj
->height();
2865 if (yyvsp
[-1].pl
.obj
!= 0)
2866 yyval
.x
= yyvsp
[-1].pl
.obj
->width();
2874 if (yyvsp
[-1].pl
.obj
!= 0)
2875 yyval
.x
= yyvsp
[-1].pl
.obj
->radius();
2882 { yyval
.x
= yyvsp
[-2].x
+ yyvsp
[0].x
; ;
2886 { yyval
.x
= yyvsp
[-2].x
- yyvsp
[0].x
; ;
2890 { yyval
.x
= yyvsp
[-2].x
* yyvsp
[0].x
; ;
2895 if (yyvsp
[0].x
== 0.0) {
2896 lex_error("division by zero");
2899 yyval
.x
= yyvsp
[-2].x
/yyvsp
[0].x
;
2905 if (yyvsp
[0].x
== 0.0) {
2906 lex_error("modulus by zero");
2909 yyval
.x
= fmod(yyvsp
[-2].x
, yyvsp
[0].x
);
2916 yyval
.x
= pow(yyvsp
[-2].x
, yyvsp
[0].x
);
2917 if (errno
== EDOM
) {
2918 lex_error("arguments to `^' operator out of domain");
2921 if (errno
== ERANGE
) {
2922 lex_error("result of `^' operator out of range");
2929 { yyval
.x
= -yyvsp
[0].x
; ;
2933 { yyval
.x
= yyvsp
[-1].x
; ;
2939 yyval
.x
= sin(yyvsp
[-1].x
);
2940 if (errno
== ERANGE
) {
2941 lex_error("sin result out of range");
2950 yyval
.x
= cos(yyvsp
[-1].x
);
2951 if (errno
== ERANGE
) {
2952 lex_error("cos result out of range");
2961 yyval
.x
= atan2(yyvsp
[-3].x
, yyvsp
[-1].x
);
2962 if (errno
== EDOM
) {
2963 lex_error("atan2 argument out of domain");
2966 if (errno
== ERANGE
) {
2967 lex_error("atan2 result out of range");
2976 yyval
.x
= log10(yyvsp
[-1].x
);
2977 if (errno
== ERANGE
) {
2978 lex_error("log result out of range");
2987 yyval
.x
= pow(10.0, yyvsp
[-1].x
);
2988 if (errno
== ERANGE
) {
2989 lex_error("exp result out of range");
2998 yyval
.x
= sqrt(yyvsp
[-1].x
);
2999 if (errno
== EDOM
) {
3000 lex_error("sqrt argument out of domain");
3007 { yyval
.x
= yyvsp
[-3].x
> yyvsp
[-1].x
? yyvsp
[-3].x
: yyvsp
[-1].x
; ;
3011 { yyval
.x
= yyvsp
[-3].x
< yyvsp
[-1].x
? yyvsp
[-3].x
: yyvsp
[-1].x
; ;
3015 { yyval
.x
= floor(yyvsp
[-1].x
); ;
3019 { yyval
.x
= 1.0 + floor(((rand()&0x7fff)/double(0x7fff))*yyvsp
[-1].x
); ;
3024 /* return a random number in the range [0,1) */
3025 /* portable, but not very random */
3026 yyval
.x
= (rand() & 0x7fff) / double(0x8000);
3031 { yyval
.x
= (yyvsp
[-2].x
< yyvsp
[0].x
); ;
3035 { yyval
.x
= (yyvsp
[-2].x
<= yyvsp
[0].x
); ;
3039 { yyval
.x
= (yyvsp
[-2].x
> yyvsp
[0].x
); ;
3043 { yyval
.x
= (yyvsp
[-2].x
>= yyvsp
[0].x
); ;
3047 { yyval
.x
= (yyvsp
[-2].x
== yyvsp
[0].x
); ;
3051 { yyval
.x
= (yyvsp
[-2].x
!= yyvsp
[0].x
); ;
3055 { yyval
.x
= (yyvsp
[-2].x
!= 0.0 && yyvsp
[0].x
!= 0.0); ;
3059 { yyval
.x
= (yyvsp
[-2].x
!= 0.0 || yyvsp
[0].x
!= 0.0); ;
3063 { yyval
.x
= (yyvsp
[0].x
== 0.0); ;
3066 /* the action file gets copied in in place of this dollarsign */
3067 #line 442 "/usr/local/lib/bison.simple"
3078 short *ssp1
= yyss
- 1;
3079 fprintf (stderr
, "state stack now");
3080 while (ssp1
!= yyssp
)
3081 fprintf (stderr
, " %d", *++ssp1
);
3082 fprintf (stderr
, "\n");
3092 yylsp
->first_line
= yylloc
.first_line
;
3093 yylsp
->first_column
= yylloc
.first_column
;
3094 yylsp
->last_line
= (yylsp
-1)->last_line
;
3095 yylsp
->last_column
= (yylsp
-1)->last_column
;
3100 yylsp
->last_line
= (yylsp
+yylen
-1)->last_line
;
3101 yylsp
->last_column
= (yylsp
+yylen
-1)->last_column
;
3105 /* Now "shift" the result of the reduction.
3106 Determine what state that goes to,
3107 based on the state we popped back to
3108 and the rule number reduced by. */
3112 yystate
= yypgoto
[yyn
- YYNTBASE
] + *yyssp
;
3113 if (yystate
>= 0 && yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
3114 yystate
= yytable
[yystate
];
3116 yystate
= yydefgoto
[yyn
- YYNTBASE
];
3120 yyerrlab
: /* here on detecting error */
3123 /* If not already recovering from an error, report this error. */
3127 #ifdef YYERROR_VERBOSE
3128 yyn
= yypact
[yystate
];
3130 if (yyn
> YYFLAG
&& yyn
< YYLAST
)
3137 for (x
= 0; x
< (sizeof(yytname
) / sizeof(char *)); x
++)
3138 if (yycheck
[x
+ yyn
] == x
)
3139 size
+= strlen(yytname
[x
]) + 15, count
++;
3140 msg
= (char *) malloc(size
+ 15);
3143 strcpy(msg
, "parse error");
3148 for (x
= 0; x
< (sizeof(yytname
) / sizeof(char *)); x
++)
3149 if (yycheck
[x
+ yyn
] == x
)
3151 strcat(msg
, count
== 0 ? ", expecting `" : " or `");
3152 strcat(msg
, yytname
[x
]);
3161 yyerror ("parse error; also virtual memory exceeded");
3164 #endif /* YYERROR_VERBOSE */
3165 yyerror("parse error");
3169 yyerrlab1
: /* here on error raised explicitly by an action */
3171 if (yyerrstatus
== 3)
3173 /* if just tried and failed to reuse lookahead token after an error, discard it. */
3175 /* return failure if at end of input */
3176 if (yychar
== YYEOF
)
3181 fprintf(stderr
, "Discarding token %d (%s).\n", yychar
, yytname
[yychar1
]);
3187 /* Else will try to reuse lookahead token
3188 after shifting the error token. */
3190 yyerrstatus
= 3; /* Each real token shifted decrements this */
3194 yyerrdefault
: /* current state does not do anything special for the error token. */
3197 /* This is wrong; only states that explicitly want error tokens
3198 should shift them. */
3199 yyn
= yydefact
[yystate
]; /* If its default is to accept any token, ok. Otherwise pop it.*/
3200 if (yyn
) goto yydefault
;
3203 yyerrpop
: /* pop the current state because it cannot handle the error token */
3205 if (yyssp
== yyss
) YYABORT
;
3215 short *ssp1
= yyss
- 1;
3216 fprintf (stderr
, "Error: state stack now");
3217 while (ssp1
!= yyssp
)
3218 fprintf (stderr
, " %d", *++ssp1
);
3219 fprintf (stderr
, "\n");
3225 yyn
= yypact
[yystate
];
3230 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != YYTERROR
)
3249 fprintf(stderr
, "Shifting error token, ");
3263 /* bison defines const to be empty unless __STDC__ is defined, which it
3264 isn't under cfront */
3273 int scaled
; // non-zero if val should be multiplied by scale
3274 } defaults_table
[] = {
3278 "circlerad", .25, 1,
3284 "ellipsewid", .75, 1,
3292 "linethick", -1.0, 0, // in points
3294 "arrowhead", 1.0, 0,
3299 place
*lookup_label(const char *label
)
3301 saved_state
*state
= current_saved_state
;
3302 PTABLE(place
) *tbl
= current_table
;
3304 place
*pl
= tbl
->lookup(label
);
3310 state
= state
->prev
;
3314 void define_label(const char *label
, const place
*pl
)
3316 place
*p
= new place
;
3318 current_table
->define(label
, p
);
3321 int lookup_variable(const char *name
, double *val
)
3323 place
*pl
= lookup_label(name
);
3331 void define_variable(const char *name
, double val
)
3333 place
*p
= new place
;
3337 current_table
->define(name
, p
);
3338 if (strcmp(name
, "scale") == 0) {
3339 // When the scale changes, reset all scaled pre-defined variables to
3340 // their default values.
3341 for (int i
= 0; i
< sizeof(defaults_table
)/sizeof(defaults_table
[0]); i
++)
3342 if (defaults_table
[i
].scaled
)
3343 define_variable(defaults_table
[i
].name
, val
*defaults_table
[i
].val
);
3347 // called once only (not once per parse)
3351 current_direction
= RIGHT_DIRECTION
;
3352 current_position
.x
= 0.0;
3353 current_position
.y
= 0.0;
3354 // This resets everything to its default value.
3358 void reset(const char *nm
)
3360 for (int i
= 0; i
< sizeof(defaults_table
)/sizeof(defaults_table
[0]); i
++)
3361 if (strcmp(nm
, defaults_table
[i
].name
) == 0) {
3362 double val
= defaults_table
[i
].val
;
3363 if (defaults_table
[i
].scaled
) {
3365 lookup_variable("scale", &scale
);
3368 define_variable(defaults_table
[i
].name
, val
);
3371 lex_error("`%1' is not a predefined variable", nm
);
3376 // We only have to explicitly reset the pre-defined variables that
3377 // aren't scaled because `scale' is not scaled, and changing the
3378 // value of `scale' will reset all the pre-defined variables that
3380 for (int i
= 0; i
< sizeof(defaults_table
)/sizeof(defaults_table
[0]); i
++)
3381 if (!defaults_table
[i
].scaled
)
3382 define_variable(defaults_table
[i
].name
, defaults_table
[i
].val
);
3385 // called after each parse
3387 void parse_cleanup()
3389 while (current_saved_state
!= 0) {
3390 delete current_table
;
3391 current_table
= current_saved_state
->tbl
;
3392 saved_state
*tem
= current_saved_state
;
3393 current_saved_state
= current_saved_state
->prev
;
3396 assert(current_table
== &top_table
);
3397 PTABLE_ITERATOR(place
) iter(current_table
);
3400 while (iter
.next(&key
, &pl
))
3402 position pos
= pl
->obj
->origin();
3407 while (olist
.head
!= 0) {
3408 object
*tem
= olist
.head
;
3409 olist
.head
= olist
.head
->next
;
3413 current_direction
= RIGHT_DIRECTION
;
3414 current_position
.x
= 0.0;
3415 current_position
.y
= 0.0;
3418 const char *ordinal_postfix(int n
)
3420 if (n
< 10 || n
> 20)
3432 const char *object_type_name(object_type type
)
3439 case ELLIPSE_OBJECT
:
3463 static char sprintf_buf
[1024];
3465 char *format_number(const char *form
, double n
)
3470 // this is a fairly feeble attempt at validation of the format
3472 for (const char *p
= form
; *p
!= '\0'; p
++)
3480 lex_error("bad format `%1'", form
);
3481 return strsave(form
);
3484 sprintf(sprintf_buf
, form
, n
);
3485 return strsave(sprintf_buf
);
3488 char *do_sprintf(const char *form
, const double *v
, int nv
)
3495 one_format
+= *form
++;
3496 for (; *form
!= '\0' && strchr("#-+ 0123456789.", *form
) != 0; form
++)
3497 one_format
+= *form
;
3498 if (*form
== '\0' || strchr("eEfgG%", *form
) == 0) {
3499 lex_error("bad sprintf format");
3500 result
+= one_format
;
3505 one_format
+= *form
++;
3507 sprintf(sprintf_buf
, one_format
.contents());
3511 lex_error("too few arguments to sprintf");
3512 result
+= one_format
;
3516 one_format
+= *form
++;
3518 sprintf(sprintf_buf
, one_format
.contents(), v
[i
++]);
3521 result
+= sprintf_buf
;
3527 return strsave(result
.contents());