home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
498a.lha
/
SC_v6.7
/
gram.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-08
|
81KB
|
2,195 lines
/* A Bison parser, made from gram.y */
#define STRING 258
#define NUMBER 259
#define FNUMBER 260
#define RANGE 261
#define VAR 262
#define WORD 263
#define COL 264
#define S_FORMAT 265
#define S_LABEL 266
#define S_LEFTSTRING 267
#define S_RIGHTSTRING 268
#define S_GET 269
#define S_PUT 270
#define S_MERGE 271
#define S_LET 272
#define S_WRITE 273
#define S_TBL 274
#define S_COPY 275
#define S_SHOW 276
#define S_ERASE 277
#define S_FILL 278
#define S_GOTO 279
#define S_DEFINE 280
#define S_UNDEFINE 281
#define S_VALUE 282
#define S_MDIR 283
#define S_HIDE 284
#define S_SET 285
#define K_FIXED 286
#define K_SUM 287
#define K_PROD 288
#define K_AVG 289
#define K_STDDEV 290
#define K_COUNT 291
#define K_ABS 292
#define K_ACOS 293
#define K_ASIN 294
#define K_ATAN 295
#define K_ATAN2 296
#define K_CEIL 297
#define K_COS 298
#define K_EXP 299
#define K_FABS 300
#define K_FLOOR 301
#define K_HYPOT 302
#define K_LN 303
#define K_LOG 304
#define K_PI 305
#define K_POW 306
#define K_SIN 307
#define K_SQRT 308
#define K_TAN 309
#define K_DTR 310
#define K_RTD 311
#define K_MAX 312
#define K_MIN 313
#define K_RND 314
#define K_ROUND 315
#define K_IF 316
#define K_PV 317
#define K_FV 318
#define K_PMT 319
#define K_HOUR 320
#define K_MINUTE 321
#define K_SECOND 322
#define K_MONTH 323
#define K_DAY 324
#define K_YEAR 325
#define K_NOW 326
#define K_DATE 327
#define K_DTS 328
#define K_TTS 329
#define K_FMT 330
#define K_SUBSTR 331
#define K_STON 332
#define K_EQS 333
#define K_EXT 334
#define K_NVAL 335
#define K_SVAL 336
#define K_LOOKUP 337
#define K_HLOOKUP 338
#define K_VLOOKUP 339
#define K_INDEX 340
#define K_STINDEX 341
#define K_AUTO 342
#define K_AUTOCALC 343
#define K_BYROWS 344
#define K_BYCOLS 345
#define K_BYGRAPH 346
#define K_ITERATIONS 347
#define K_NUMERIC 348
#define K_PRESCALE 349
#define K_EXTFUN 350
#define K_CELLCUR 351
#define K_TOPROW 352
#define K_TBLSTYLE 353
#define K_TBL 354
#define K_LATEX 355
#define K_TEX 356
#line 17 "gram.y"
#include <curses.h>
#include "sc.h"
#define ENULL (struct enode *)0
char *strcpy();
#line 26 "gram.y"
typedef union {
int ival;
double fval;
struct ent_ptr ent;
struct enode *enode;
char *sval;
struct range_s rval;
} YYSTYPE;
#ifndef YYLTYPE
typedef
struct yyltype
{
int timestamp;
int first_line;
int first_column;
int last_line;
int last_column;
char *text;
}
yyltype;
#define YYLTYPE yyltype
#endif
#define YYACCEPT return(0)
#define YYABORT return(1)
#define YYERROR return(1)
#include <stdio.h>
#ifdef __STDC__
#define CONST const
#else
#define CONST
#endif
#define YYFINAL 473
#define YYFLAG -32768
#define YYNTBASE 123
#define YYTRANSLATE(x) ((unsigned)(x) <= 356 ? yytranslate[x] : 134)
static CONST char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 109, 2, 112, 122, 115, 105, 2, 118,
119, 113, 110, 120, 111, 2, 114, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 103, 2, 106,
107, 108, 102, 117, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 116, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 104, 2, 121, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101
};
static CONST short yyrline[] = { 0,
153, 155, 157, 159, 161, 163, 165, 172, 178, 180,
185, 188, 192, 194, 198, 200, 202, 204, 206, 208,
211, 214, 216, 218, 222, 224, 226, 227, 228, 229,
230, 237, 238, 239, 240, 241, 242, 244, 245, 246,
248, 250, 252, 254, 256, 258, 260, 262, 264, 265,
266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
287, 288, 289, 291, 292, 293, 294, 295, 296, 297,
298, 300, 302, 303, 304, 305, 306, 308, 310, 313,
316, 318, 319, 320, 321, 323, 324, 325, 326, 327,
328, 329, 330, 331, 334, 335, 336, 337, 338, 339,
340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
350, 353, 354, 357, 358, 361, 362, 364, 366, 368,
371, 372, 375, 376, 377, 378, 381, 382, 393, 394,
397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
417, 418, 419, 420
};
static CONST char * yytname[] = { 0,
"error","$illegal.","STRING","NUMBER","FNUMBER","RANGE","VAR","WORD","COL","S_FORMAT",
"S_LABEL","S_LEFTSTRING","S_RIGHTSTRING","S_GET","S_PUT","S_MERGE","S_LET","S_WRITE","S_TBL","S_COPY",
"S_SHOW","S_ERASE","S_FILL","S_GOTO","S_DEFINE","S_UNDEFINE","S_VALUE","S_MDIR","S_HIDE","S_SET",
"K_FIXED","K_SUM","K_PROD","K_AVG","K_STDDEV","K_COUNT","K_ABS","K_ACOS","K_ASIN","K_ATAN",
"K_ATAN2","K_CEIL","K_COS","K_EXP","K_FABS","K_FLOOR","K_HYPOT","K_LN","K_LOG","K_PI",
"K_POW","K_SIN","K_SQRT","K_TAN","K_DTR","K_RTD","K_MAX","K_MIN","K_RND","K_ROUND",
"K_IF","K_PV","K_FV","K_PMT","K_HOUR","K_MINUTE","K_SECOND","K_MONTH","K_DAY","K_YEAR",
"K_NOW","K_DATE","K_DTS","K_TTS","K_FMT","K_SUBSTR","K_STON","K_EQS","K_EXT","K_NVAL",
"K_SVAL","K_LOOKUP","K_HLOOKUP","K_VLOOKUP","K_INDEX","K_STINDEX","K_AUTO","K_AUTOCALC","K_BYROWS","K_BYCOLS",
"K_BYGRAPH","K_ITERATIONS","K_NUMERIC","K_PRESCALE","K_EXTFUN","K_CELLCUR","K_TOPROW","K_TBLSTYLE","K_TBL","K_LATEX",
"K_TEX","'?'","':'","'|'","'&'","'<'","'='","'>'","'!'","'+'",
"'-'","'#'","'*'","'/'","'%'","'^'","'@'","'('","')'","','",
"'~'","'$'","command"
};
static CONST short yyr1[] = { 0,
123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
123, 123, 123, 123, 123, 123, 123, 124, 124, 124,
124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
124, 124, 124, 124, 125, 125, 125, 125, 125, 125,
125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
125, 126, 126, 127, 127, 128, 128, 128, 128, 128,
129, 129, 130, 130, 130, 130, 131, 131, 132, 132,
133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133
};
static CONST short yyr2[] = { 0,
4, 4, 4, 4, 6, 4, 2, 2, 2, 3,
2, 3, 2, 3, 2, 4, 4, 2, 2, 3,
1, 2, 1, 2, 3, 4, 2, 2, 2, 1,
2, 3, 3, 2, 2, 0, 1, 1, 2, 5,
5, 5, 5, 5, 5, 7, 5, 7, 5, 5,
5, 5, 7, 5, 5, 5, 5, 5, 7, 5,
5, 7, 5, 5, 5, 5, 5, 5, 7, 9,
9, 9, 9, 5, 5, 5, 5, 5, 5, 2,
9, 9, 5, 7, 5, 7, 7, 7, 9, 9,
7, 7, 7, 7, 9, 3, 2, 2, 1, 1,
1, 1, 2, 2, 3, 3, 3, 3, 3, 3,
1, 5, 3, 3, 3, 3, 3, 4, 4, 4,
3, 1, 3, 3, 1, 2, 3, 3, 4, 1,
1, 1, 1, 1, 2, 2, 1, 1, 0, 2,
1, 1, 2, 2, 2, 2, 1, 1, 1, 1,
2, 1, 2, 1, 2, 1, 2, 1, 2, 3,
3, 3, 3, 3
};
static CONST short yydefact[] = { 0,
37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 21, 0, 30, 0, 0, 23, 0,
0, 139, 0, 125, 130, 0, 0, 131, 132, 0,
0, 0, 137, 138, 7, 11, 8, 0, 13, 15,
0, 0, 0, 0, 22, 133, 134, 0, 0, 0,
0, 29, 27, 28, 31, 34, 24, 9, 19, 18,
35, 0, 0, 126, 0, 0, 0, 0, 0, 0,
10, 0, 12, 14, 20, 0, 0, 136, 135, 0,
25, 32, 33, 141, 142, 148, 147, 149, 0, 150,
152, 154, 156, 158, 0, 0, 0, 140, 6, 0,
128, 127, 0, 124, 102, 99, 100, 0, 101, 0,
0, 0, 0, 0, 0, 111, 2, 38, 3, 4,
1, 17, 16, 26, 0, 0, 145, 146, 151, 153,
155, 157, 159, 143, 144, 0, 129, 39, 104, 97,
98, 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, 80,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 160, 161, 162, 163, 164, 5, 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, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
96, 0, 117, 116, 0, 113, 114, 0, 115, 0,
105, 106, 121, 107, 108, 109, 110, 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, 38, 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, 118, 120, 119, 40, 41, 42,
43, 44, 49, 50, 51, 52, 0, 54, 55, 56,
57, 58, 0, 60, 61, 0, 63, 64, 65, 66,
67, 0, 45, 0, 47, 68, 0, 0, 0, 0,
0, 74, 75, 76, 77, 78, 79, 85, 0, 0,
0, 0, 83, 0, 0, 0, 0, 0, 0, 0,
0, 0, 112, 0, 0, 0, 122, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 53, 59, 62,
46, 0, 48, 69, 0, 0, 0, 0, 0, 0,
86, 0, 84, 92, 93, 94, 88, 0, 0, 87,
91, 123, 0, 0, 0, 0, 0, 0, 0, 0,
0, 70, 71, 72, 73, 81, 82, 95, 89, 90,
0, 0, 0
};
static CONST short yydefgoto[] = { 471,
116, 407, 408, 28, 118, 30, 51, 35, 61, 98
};
static CONST short yypact[] = { 486,
-32768, 20, 71, 71, 71, 42, 42, 42, 71, 42,
42, 71, 58, 71, 98, 85, 42, 71, 71, 42,
118,-32768, 6,-32768,-32768, 23, 30,-32768, -60, -54,
-32, -28,-32768,-32768,-32768, 71,-32768, -26, 71, 71,
71, -60, -20, -18,-32768,-32768,-32768, 14, 14, 14,
14,-32768,-32768,-32768, 71,-32768,-32768,-32768,-32768,-32768,
355, 95, 97,-32768, 104, 44, 52, 51, 51, 51,
-32768, 51,-32768,-32768,-32768, 106, 105,-32768,-32768, 14,
-32768,-32768, -60,-32768,-32768,-32768,-32768,-32768, 9,-32768,
-32768,-32768,-32768,-32768, 28, 168, -22,-32768,-32768, 119,
-32768,-32768, 134,-32768,-32768,-32768,-32768, 51,-32768, 51,
51, 51, 292, 51, 51,-32768, 1646,-32768, 1646, 1646,
1646,-32768,-32768,-32768, 135, 80,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768, 138,-32768,-32768,-32768,-32768,
-32768, 31, 35, 38, 45, 47, 57, 69, 72, 73,
74, 76, 79, 81, 84, 87, 88, 93, 94, 96,
129, 139, 142, 196, 197, 198, 199, 201, 202, 204,
224, 268, 270, 271, 272, 273, 274, 275, 276,-32768,
283, 284, 285, 286, 287, 289, 290, 293, 294, 295,
301, 307, 308, 309, 310, 925,-32768, 51, 51, 51,
19, 51, 37, 91, 51, 51, 51, 51, 51, 51,
51,-32768,-32768,-32768,-32768,-32768,-32768, 71, 71, 71,
71, 71, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 67, 67, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
-32768, 1631, 1658, 1669, 51, 269, 269, 51, 269, 51,
18, 18, 18, 313, 313, 313,-32768, 291, 311, 312,
317, 322, 941, 957, 973, 989, 415, 1005, 1021, 1037,
1053, 1069, 432, 1085, 1101, 449, 1117, 1133, 1149, 1165,
1181, 466, -56, 335, 483, 336, 1197, 500, 517, 534,
551, 568, 1213, 1229, 1245, 1261, 1277, 1293, 1309, 585,
602, 619, 636, 1325, 653, 670, 687, 704, 721, 738,
755, 772, 789, 51, 269, 269, 269,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768, 51,-32768,-32768,-32768,
-32768,-32768, 51,-32768,-32768, 51,-32768,-32768,-32768,-32768,
-32768, 51,-32768, 51,-32768,-32768, 51, 51, 51, 51,
51,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 51, 51,
51, 51,-32768, 51, 51, 51, 51, 71, 71, 71,
71, 71, 117, 1341, 1357, 1373, 1646, 32, 63, 1389,
806, 823, 840, 857, 874, 891, 1405, 908, 1421, 1437,
1453, 1469, 337, 338, 339, 341, 342,-32768,-32768,-32768,
-32768, 51,-32768,-32768, 51, 51, 51, 51, 51, 51,
-32768, 51,-32768,-32768,-32768,-32768,-32768, 51, 51,-32768,
-32768, 1646, 1485, 1501, 1517, 1533, 1549, 1565, 1581, 1597,
1613,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
457, 462,-32768
};
static CONST short yypgoto[] = {-32768,
-15, 43, 89, 131, -3, 16, 70, 193,-32768,-32768
};
#define YYLAST 1785
static CONST short yytable[] = { 29,
29, 29, 34, 34, 34, 29, 34, 34, 42, 62,
29, 29, 29, 34, 29, 29, 34, 46, 47, 31,
32, 105, 106, 107, 38, 25, 64, 26, 23, 45,
50, 53, 42, 56, 57, 42, 42, 29, 66, 105,
106, 107, 67, 25, 33, 26, 67, 102, 25, 108,
26, 83, 68, 105, 106, 107, 75, 25, 25, 26,
26, 43, -132, 104, 134, 135, 44, 108, 109, 105,
106, 107, 24, 25, 69, 26, 24, 25, 70, 26,
72, 108, 76, 213, 77, 54, 109, 52, 46, 47,
24, 25, 138, 26, 139, 140, 141, 108, 99, 197,
109, 46, 47, 24, 25, 100, 26, 101, 63, 122,
117, 119, 120, 123, 121, 125, 109, 78, 79, 80,
81, 59, 136, 48, 49, 275, 60, 110, 111, 112,
208, 209, 210, 211, 126, 113, 114, 137, 212, 115,
27, 217, 41, 278, 65, 110, 111, 112, 218, 124,
431, 432, 219, 113, 114, 220, 196, 115, 27, 110,
111, 112, 221, 27, 222, 103, 71, 113, 114, 73,
74, 115, 27, 27, 223, 110, 111, 112, 214, 215,
216, 433, 432, 113, 114, 82, 224, 115, 27, 225,
226, 227, 27, 228, 48, 49, 229, 280, 230, 36,
37, 231, 39, 40, 232, 233, 27, 48, 49, 55,
234, 235, 58, 236, 29, 29, 29, 29, 29, 27,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 288, 289, 290, 291, 292, 313, 313,
272, 273, 274, 276, 277, 279, 237, 281, 282, 283,
284, 285, 286, 287, 127, 128, 238, 314, 316, 239,
129, 130, 131, 132, 133, 293, 294, 295, 296, 297,
298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
308, 309, 310, 311, 312, 315, 317, 318, 319, 320,
321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
341, 342, 343, 240, 241, 242, 243, 345, 244, 245,
346, 246, 347, 142, 143, 144, 145, 146, 147, 148,
149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
159, 247, 160, 161, 162, 163, 164, 165, 166, 167,
168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
188, 189, 190, 191, 192, 193, 194, 195, 205, 206,
207, 208, 209, 210, 211, 248, 403, 249, 250, 251,
252, 253, 254, 255, 29, 29, 29, 29, 29, 404,
256, 257, 258, 259, 260, 405, 261, 262, 406, 348,
263, 264, 265, 423, 424, 425, 426, 427, 266, 410,
411, 412, 413, 414, 267, 268, 269, 270, 211, 349,
350, 415, 416, 417, 418, 351, 419, 420, 421, 422,
352, 84, 85, 86, 87, 88, 89, 90, 91, 92,
93, 94, 95, 373, 375, 447, 472, 448, 449, 450,
451, 473, 409, 96, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 452, 97, 0, 453, 454, 455,
456, 457, 458, 0, 459, -36, 1, 0, 0, 0,
460, 461, 0, 0, 0, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 198, 0, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 0, 198, 357, 199, 200, 201, 202, 203,
204, 205, 206, 207, 208, 209, 210, 211, 0, 0,
198, 363, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 0, 198, 366, 199,
200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
210, 211, 0, 0, 198, 372, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
0, 198, 374, 199, 200, 201, 202, 203, 204, 205,
206, 207, 208, 209, 210, 211, 0, 0, 198, 377,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 0, 198, 378, 199, 200, 201,
202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
0, 0, 198, 379, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 0, 198,
380, 199, 200, 201, 202, 203, 204, 205, 206, 207,
208, 209, 210, 211, 0, 0, 198, 381, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 0, 198, 389, 199, 200, 201, 202, 203,
204, 205, 206, 207, 208, 209, 210, 211, 0, 0,
198, 390, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 0, 198, 391, 199,
200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
210, 211, 0, 0, 198, 392, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
0, 198, 394, 199, 200, 201, 202, 203, 204, 205,
206, 207, 208, 209, 210, 211, 0, 0, 198, 395,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 0, 198, 396, 199, 200, 201,
202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
0, 0, 198, 397, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 0, 198,
398, 199, 200, 201, 202, 203, 204, 205, 206, 207,
208, 209, 210, 211, 0, 0, 198, 399, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 0, 198, 400, 199, 200, 201, 202, 203,
204, 205, 206, 207, 208, 209, 210, 211, 0, 0,
198, 401, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 0, 198, 402, 199,
200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
210, 211, 0, 0, 198, 435, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
0, 198, 436, 199, 200, 201, 202, 203, 204, 205,
206, 207, 208, 209, 210, 211, 0, 0, 198, 437,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 0, 198, 438, 199, 200, 201,
202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
0, 0, 198, 439, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 0, 198,
440, 199, 200, 201, 202, 203, 204, 205, 206, 207,
208, 209, 210, 211, 0, 0, 198, 442, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 198, 271, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 198, 353,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 198, 354, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
198, 355, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 198, 356, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 198, 358, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 198, 359,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 198, 360, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
198, 361, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 198, 362, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 198, 364, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 198, 365,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 198, 367, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
198, 368, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 198, 369, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 198, 370, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 198, 371,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 198, 376, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
198, 382, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 198, 383, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 198, 384, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 198, 385,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 198, 386, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
198, 387, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 198, 388, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 198, 393, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 198, 428,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 198, 429, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
198, 430, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 198, 434, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 198, 441, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 198, 443,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 198, 444, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
198, 445, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 198, 446, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 198, 462, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 198, 463,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 198, 464, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
198, 465, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211, 0, 198, 466, 199, 200,
201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
211, 0, 198, 467, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 0, 198, 468,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 0, 198, 469, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 0,
0, 470, 198, 344, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 198, 0, 199,
200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
210, 211, 200, 201, 202, 203, 204, 205, 206, 207,
208, 209, 210, 211, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 211
};
static CONST short yycheck[] = { 3,
4, 5, 6, 7, 8, 9, 10, 11, 12, 4,
14, 15, 16, 17, 18, 19, 20, 4, 5, 4,
5, 3, 4, 5, 9, 7, 4, 9, 9, 14,
15, 16, 36, 18, 19, 39, 40, 41, 9, 3,
4, 5, 103, 7, 3, 9, 103, 4, 7, 31,
9, 55, 107, 3, 4, 5, 41, 7, 7, 9,
9, 4, 119, 67, 87, 88, 9, 31, 50, 3,
4, 5, 6, 7, 107, 9, 6, 7, 107, 9,
107, 31, 103, 4, 103, 16, 50, 3, 4, 5,
6, 7, 108, 9, 110, 111, 112, 31, 4, 115,
50, 4, 5, 6, 7, 9, 9, 4, 103, 4,
68, 69, 70, 9, 72, 107, 50, 48, 49, 50,
51, 4, 4, 110, 111, 107, 9, 109, 110, 111,
113, 114, 115, 116, 107, 117, 118, 4, 4, 121,
122, 4, 12, 107, 122, 109, 110, 111, 118, 80,
119, 120, 118, 117, 118, 118, 114, 121, 122, 109,
110, 111, 118, 122, 118, 122, 36, 117, 118, 39,
40, 121, 122, 122, 118, 109, 110, 111, 99, 100,
101, 119, 120, 117, 118, 55, 118, 121, 122, 118,
118, 118, 122, 118, 110, 111, 118, 107, 118, 7,
8, 118, 10, 11, 118, 118, 122, 110, 111, 17,
118, 118, 20, 118, 218, 219, 220, 221, 222, 122,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, 218, 219, 220, 221, 222, 242, 243,
198, 199, 200, 201, 202, 203, 118, 205, 206, 207,
208, 209, 210, 211, 87, 88, 118, 242, 243, 118,
93, 94, 95, 96, 97, 223, 224, 225, 226, 227,
228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
268, 269, 270, 118, 118, 118, 118, 275, 118, 118,
278, 118, 280, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 118, 51, 52, 53, 54, 55, 56, 57, 58,
59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
79, 80, 81, 82, 83, 84, 85, 86, 110, 111,
112, 113, 114, 115, 116, 118, 344, 118, 118, 118,
118, 118, 118, 118, 398, 399, 400, 401, 402, 357,
118, 118, 118, 118, 118, 363, 118, 118, 366, 119,
118, 118, 118, 398, 399, 400, 401, 402, 118, 377,
378, 379, 380, 381, 118, 118, 118, 118, 116, 119,
119, 389, 390, 391, 392, 119, 394, 395, 396, 397,
119, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 119, 119, 119, 0, 120, 120, 119,
119, 0, 374, 109, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 432, 121, -1, 435, 436, 437,
438, 439, 440, -1, 442, 0, 1, -1, -1, -1,
448, 449, -1, -1, -1, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 102, -1, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, -1, 102, 120, 104, 105, 106, 107, 108,
109, 110, 111, 112, 113, 114, 115, 116, -1, -1,
102, 120, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, -1, 102, 120, 104,
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, -1, -1, 102, 120, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
-1, 102, 120, 104, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, -1, -1, 102, 120,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, -1, 102, 120, 104, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
-1, -1, 102, 120, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, -1, 102,
120, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, -1, -1, 102, 120, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, -1, 102, 120, 104, 105, 106, 107, 108,
109, 110, 111, 112, 113, 114, 115, 116, -1, -1,
102, 120, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, -1, 102, 120, 104,
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, -1, -1, 102, 120, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
-1, 102, 120, 104, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, -1, -1, 102, 120,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, -1, 102, 120, 104, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
-1, -1, 102, 120, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, -1, 102,
120, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, -1, -1, 102, 120, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, -1, 102, 120, 104, 105, 106, 107, 108,
109, 110, 111, 112, 113, 114, 115, 116, -1, -1,
102, 120, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, -1, 102, 120, 104,
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, -1, -1, 102, 120, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
-1, 102, 120, 104, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, -1, -1, 102, 120,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, -1, 102, 120, 104, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
-1, -1, 102, 120, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, -1, 102,
120, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, -1, -1, 102, 120, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, 102, 119, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, 102, 119,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, 102, 119, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
102, 119, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, 102, 119, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, 102, 119, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, 102, 119,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, 102, 119, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
102, 119, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, 102, 119, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, 102, 119, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, 102, 119,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, 102, 119, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
102, 119, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, 102, 119, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, 102, 119, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, 102, 119,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, 102, 119, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
102, 119, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, 102, 119, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, 102, 119, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, 102, 119,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, 102, 119, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
102, 119, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, 102, 119, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, 102, 119, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, 102, 119,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, 102, 119, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
102, 119, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, 102, 119, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, 102, 119, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, 102, 119,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, 102, 119, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
102, 119, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, 102, 119, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, 102, 119, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, 102, 119,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, 102, 119, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
102, 119, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, -1, 102, 119, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
116, -1, 102, 119, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, -1, 102, 119,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, -1, 102, 119, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
-1, 119, 102, 103, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 102, -1, 104,
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116
};
#define YYPURE 1
#line 2 "bison.simple"
/* Skeleton output parser for bison,
copyright (C) 1984 Bob Corbett and Richard Stallman
NO WARRANTY
BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC,
RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS"
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY
AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY
WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR
OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR
A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS
PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
GENERAL PUBLIC LICENSE TO COPY
1. You may copy and distribute verbatim copies of this source file
as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy a valid copyright notice "Copyright
(C) 1985 Free Software Foundation, Inc."; and include following the
copyright notice a verbatim copy of the above disclaimer of warranty
and of this License. You may charge a distribution fee for the
physical act of transferring a copy.
2. You may modify your copy or copies of this source file or
any portion of it, and copy and distribute such modifications under
the terms of Paragraph 1 above, provided that you also do the following:
a) cause the modified files to carry prominent notices stating
that you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish,
that in whole or in part contains or is a derivative of this
program or any part thereof, to be licensed at no charge to all
third parties on terms identical to those contained in this
License Agreement (except that you may choose to grant more extensive
warranty protection to some or all third parties, at your option).
c) You may charge a distribution fee for the physical act of
transferring a copy, and you may at your option offer warranty
protection in exchange for a fee.
Mere aggregation of another unrelated program with this program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other program under the scope of these terms.
3. You may copy and distribute this program (or a portion or derivative
of it, under Paragraph 2) in object code or executable form under the terms
of Paragraphs 1 and 2 above provided that you also do one of the following:
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal
shipping charge) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
For an executable file, complete source code means all the source code for
all modules it contains; but, as a special exception, it need not include
source code for modules which are standard libraries that accompany the
operating system on which the executable file runs.
4. You may not copy, sublicense, distribute or transfer this program
except as expressly provided under this License Agreement. Any attempt
otherwise to copy, sublicense, distribute or transfer this program is void and
your rights to use the program under this License agreement shall be
automatically terminated. However, parties who have received computer
software programs from you with this License Agreement will not have
their licenses terminated so long as such parties remain in full compliance.
5. If you wish to incorporate parts of this program into other free
programs whose distribution conditions are different, write to the Free
Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not yet
worked out a simple rule that can be stated here, but we will often permit
this. We will be guided by the two goals of preserving the free status of
all derivatives of our free software and of promoting the sharing and reuse of
software.
In other words, you are welcome to use, share and improve this program.
You are forbidden to forbid anyone else to use, share and improve
what you give them. Help stamp out software-hoarding! */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
as one case of the switch. */
#ifdef AMIGA
#define bzero(b, length) memset((b),'\0',(length))
#define bcopy(b1, b2, length) memcpy((b1),(b2),(length))
#define bcmp(b1, b2, length) memcmp((b1),(b2),(length))
void
memory_full ()
{
printf ("Memory exhausted.\n");
exit(1);
}
char *
bison_xmalloc (size)
int size;
{
extern char *malloc ();
register char *ptr = malloc (size);
if (ptr != 0) return (ptr);
memory_full ();
/*NOTREACHED*/
}
char *
xrealloc (old, size)
char *old;
int size;
{
extern char *realloc ();
register char *ptr = realloc (old, size);
if (ptr != 0) return (ptr);
memory_full ();
/*NOTREACHED*/
}
char *
xcalloc (number, size)
int number, size;
{
extern char *malloc ();
register int total = number * size;
register char *ptr = malloc (total);
if (ptr != 0)
{
if (total > 100)
bzero (ptr, total);
else {
/* It's not too long, so loop, zeroing by longs.
It must be safe because malloc values are always well aligned. */
register long *zp = (long *) ptr;
register long *zl = (long *) (ptr + total - 4);
register int i = total - 4;
while (zp < zl)
*zp++ = 0;
if (i < 0)
i = 0;
while (i < total)
ptr[i++] = 0;
}
return ptr;
}
memory_full ();
/*NOTREACHED*/
}
/*
alloca -- (mostly) portable public-domain implementation -- D A Gwyn
last edit: 86/05/30 rms
include config.h, since on VMS it renames some symbols.
Use bison_xmalloc instead of malloc.
This implementation of the PWB library alloca() function,
which is used to allocate space off the run-time stack so
that it is automatically reclaimed upon procedure exit,
was inspired by discussions with J. Q. Johnson of Cornell.
It should work under any C implementation that uses an
actual procedure stack (as opposed to a linked list of
frames). There are some preprocessor constants that can
be defined when compiling for your specific system, for
improved efficiency; however, the defaults should be okay.
The general concept of this implementation is to keep
track of all alloca()-allocated blocks, and reclaim any
that are found to be deeper in the stack than the current
invocation. This heuristic does not reclaim storage as
soon as it becomes invalid, but it will do so eventually.
As a special case, alloca(0) reclaims storage without
allocating any. It is a good idea to use alloca(0) in
your main control loop, etc. to force garbage collection.
*/
typedef char *pointer; /* generic pointer type */
extern void free();
extern pointer bison_xmalloc();
/*
Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#define STACK_DIRECTION -1
#define STACK_DIR STACK_DIRECTION /* known at compile-time */
/*
An "alloca header" is used to:
(a) chain together all alloca()ed blocks;
(b) keep track of stack depth.
It is very important that sizeof(header) agree with malloc()
alignment chunk size. The following default should work okay.
*/
#ifndef ALIGN_SIZE
#define ALIGN_SIZE sizeof(double)
#endif
typedef union hdr
{
char align[ALIGN_SIZE]; /* to force sizeof(header) */
struct
{
union hdr *next; /* for chaining headers */
char *deep; /* for stack depth measure */
} h;
} header;
/*
alloca( size ) returns a pointer to at least `size' bytes of
storage which will be automatically reclaimed upon exit from
the procedure that called alloca(). Originally, this space
was supposed to be taken from the current stack frame of the
caller, but that method cannot be made to work for some
implementations of C, for example under Gould's UTX/32.
*/
static header *last_alloca_header = NULL; /* -> last alloca header */
pointer
alloca (size) /* returns pointer to storage */
unsigned size; /* # bytes to allocate */
{
auto char probe; /* probes stack depth: */
register char *depth = &probe;
/* Reclaim garbage, defined as all alloca()ed storage that
was allocated from deeper in the stack than currently. */
{
register header *hp; /* traverses linked list */
for (hp = last_alloca_header; hp != NULL;)
if (STACK_DIR > 0 && hp->h.deep > depth
|| STACK_DIR < 0 && hp->h.deep < depth)
{
register header *np = hp->h.next;
free ((pointer) hp); /* collect garbage */
hp = np; /* -> next header */
}
else
break; /* rest are not deeper */
last_alloca_header = hp; /* -> last valid storage */
}
if (size == 0)
return NULL; /* no allocation required */
/* Allocate combined header + user data storage. */
{
register pointer new = bison_xmalloc (sizeof (header) + size);
/* address of header */
((header *)new)->h.next = last_alloca_header;
((header *)new)->h.deep = depth;
last_alloca_header = (header *)new;
/* User storage begins just after header. */
return (pointer)((char *)new + sizeof(header));
}
}
#endif
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYFAIL goto yyerrlab;
#define YYTERROR 1
#ifndef YYIMPURE
#define YYLEX yylex()
#endif
#ifndef YYPURE
#define YYLEX yylex(&yylval, &yylloc)
#endif
/* If nonreentrant, generate the variables here */
#ifndef YYIMPURE
int yychar; /* the lookahead symbol */
YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
YYLTYPE yylloc; /* location data for the lookahead */
/* symbol */
int yynerr; /* number of parse errors so far */
#ifdef YYDEBUG
int yydebug = 0; /* nonzero means print parse trace */
#endif
#endif /* YYIMPURE */
/* YYMAXDEPTH indicates the initial size of the parser's stacks */
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 200
#endif
/* YYMAXLIMIT is the maximum size the stacks can grow to
(effective only if the built-in stack extension method is used). */
#ifndef YYMAXLIMIT
#define YYMAXLIMIT 10000
#endif
#line 165 "bison.simple"
int
yyparse()
{
register int yystate;
register int yyn;
register short *yyssp;
register YYSTYPE *yyvsp;
YYLTYPE *yylsp;
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1; /* lookahead token as an internal (translated) token number */
short yyssa[YYMAXDEPTH]; /* the state stack */
YYSTYPE yyvsa[YYMAXDEPTH]; /* the semantic value stack */
YYLTYPE yylsa[YYMAXDEPTH]; /* the location stack */
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
YYLTYPE *yyls = yylsa;
int yymaxdepth = YYMAXDEPTH;
#ifndef YYPURE
int yychar;
YYSTYPE yylval;
YYLTYPE yylloc;
#endif
#ifdef YYDEBUG
extern int yydebug;
#endif
YYSTYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
int yylen;
#ifdef YYDEBUG
if (yydebug)
fprintf(stderr, "Starting parse\n");
#endif
yystate = 0;
yyerrstatus = 0;
yynerr = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack. */
yyssp = yyss - 1;
yyvsp = yyvs;
yylsp = yyls;
/* Push a new state, which is found in yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
yynewstate:
*++yyssp = yystate;
if (yyssp >= yyss + yymaxdepth - 1)
{
/* Give user a chance to reallocate the stack */
/* Use copies of these so that the &'s don't force the real ones into memory. */
YYSTYPE *yyvs1 = yyvs;
YYLTYPE *yyls1 = yyls;
short *yyss1 = yyss;
/* Get the current used size of the three stacks, in elements. */
int size = yyssp - yyss + 1;
#ifdef yyoverflow
/* Each stack pointer address is followed by the size of
the data in use in that stack, in bytes. */
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yyls1, size * sizeof (*yylsp),
&yymaxdepth);
yyss = yyss1; yyvs = yyvs1; yyls = yyls1;
#else /* no yyoverflow */
/* Extend the stack our own way. */
if (yymaxdepth >= YYMAXLIMIT)
yyerror("parser stack overflow");
yymaxdepth *= 2;
if (yymaxdepth > YYMAXLIMIT)
yymaxdepth = YYMAXLIMIT;
yyss = (short *) alloca (yymaxdepth * sizeof (*yyssp));
bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
yyvs = (YYSTYPE *) alloca (yymaxdepth * sizeof (*yyvsp));
bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) alloca (yymaxdepth * sizeof (*yylsp));
bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
yylsp = yyls + size - 1;
#endif
#ifdef YYDEBUG
if (yydebug)
fprintf(stderr, "Stack size increased to %d\n", yymaxdepth);
#endif
if (yyssp >= yyss + yymaxdepth - 1)
YYERROR;
}
#ifdef YYDEBUG
if (yydebug)
fprintf(stderr, "Entering state %d\n", yystate);
#endif
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
yyresume:
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
#ifdef YYDEBUG
if (yydebug)
fprintf(stderr, "Reading a token: ");
#endif
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
#ifdef YYDEBUG
if (yydebug)
fprintf(stderr, "Now at end of input.\n");
#endif
}
else
{
yychar1 = YYTRANSLATE(yychar);
#ifdef YYDEBUG
if (yydebug)
fprintf(stderr, "Next token is %d (%s)\n", yychar, yytname[yychar1]);
#endif
}
yyn += yychar1;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
#ifdef YYDEBUG
if (yydebug)
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
/* count tokens shifted since error; after three, turn off error status. */
if (yyerrstatus) yyerrstatus--;
yystate = yyn;
goto yynewstate;
/* Do the default action for the current state. */
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
/* Do a reduction. yyn is the number of a rule to reduce with. */
yyreduce:
yylen = yyr2[yyn];
yyval = yyvsp[1-yylen]; /* implement default value of the action */
#ifdef YYDEBUG
if (yydebug)
{
if (yylen == 1)
fprintf (stderr, "Reducing 1 value via line %d, ",
yyrline[yyn]);
else
fprintf (stderr, "Reducing %d values via line %d, ",
yylen, yyrline[yyn]);
}
#endif
switch (yyn) {
case 1:
#line 154 "gram.y"
{ let(yyvsp[-2].rval.left.vp, yyvsp[0].enode); ;
break;}
case 2:
#line 156 "gram.y"
{ slet(yyvsp[-2].rval.left.vp, yyvsp[0].enode, 0); ;
break;}
case 3:
#line 158 "gram.y"
{ slet(yyvsp[-2].rval.left.vp, yyvsp[0].enode, -1); ;
break;}
case 4:
#line 160 "gram.y"
{ slet(yyvsp[-2].rval.left.vp, yyvsp[0].enode, 1); ;
break;}
case 5:
#line 162 "gram.y"
{ doformat(yyvsp[-4].ival,yyvsp[-2].ival,yyvsp[-1].ival,yyvsp[0].ival); ;
break;}
case 6:
#line 164 "gram.y"
{ doformat(yyvsp[-2].ival,yyvsp[-2].ival,yyvsp[-1].ival,yyvsp[0].ival); ;
break;}
case 7:
#line 165 "gram.y"
{ /* This tmp hack is because readfile
* recurses back through yyparse. */
char *tmp;
tmp = yyvsp[0].sval;
readfile (tmp, 1);
xfree(tmp);
;
break;}
case 8:
#line 172 "gram.y"
{
char *tmp;
tmp = yyvsp[0].sval;
readfile (tmp, 0);
xfree(tmp);
;
break;}
case 9:
#line 179 "gram.y"
{ if (mdir) xfree(mdir); mdir = yyvsp[0].sval; ;
break;}
case 10:
#line 181 "gram.y"
{ (void) writefile(yyvsp[-1].sval, (yyvsp[0].rval.left.vp)->row,
(yyvsp[0].rval.left.vp)->col, (yyvsp[0].rval.right.vp)->row,
(yyvsp[0].rval.right.vp)->col);
xfree(yyvsp[-1].sval); ;
break;}
case 11:
#line 186 "gram.y"
{ (void) writefile (yyvsp[0].sval, 0, 0, maxrow, maxcol);
xfree(yyvsp[0].sval); ;
break;}
case 12:
#line 188 "gram.y"
{ (void) printfile(yyvsp[-1].sval, (yyvsp[0].rval.left.vp)->row,
(yyvsp[0].rval.left.vp)->col, (yyvsp[0].rval.right.vp)->row,
(yyvsp[0].rval.right.vp)->col);
xfree(yyvsp[-1].sval); ;
break;}
case 13:
#line 192 "gram.y"
{ (void) printfile (yyvsp[0].sval, 0, 0, maxrow, maxcol);
xfree(yyvsp[0].sval); ;
break;}
case 14:
#line 194 "gram.y"
{ (void) tblprintfile(yyvsp[-1].sval, (yyvsp[0].rval.left.vp)->row,
(yyvsp[0].rval.left.vp)->col, (yyvsp[0].rval.right.vp)->row,
(yyvsp[0].rval.right.vp)->col);
xfree(yyvsp[-1].sval); ;
break;}
case 15:
#line 198 "gram.y"
{ (void)tblprintfile (yyvsp[0].sval, 0, 0, maxrow, maxcol);
xfree(yyvsp[0].sval); ;
break;}
case 16:
#line 201 "gram.y"
{ showcol( yyvsp[-2].ival, yyvsp[0].ival); ;
break;}
case 17:
#line 203 "gram.y"
{ showrow( yyvsp[-2].ival, yyvsp[0].ival); ;
break;}
case 18:
#line 205 "gram.y"
{ hide_col( yyvsp[0].ival ); ;
break;}
case 19:
#line 207 "gram.y"
{ hide_row( yyvsp[0].ival ); ;
break;}
case 20:
#line 209 "gram.y"
{ copy(yyvsp[-1].rval.left.vp,yyvsp[-1].rval.right.vp,
yyvsp[0].rval.left.vp,yyvsp[0].rval.right.vp); ;
break;}
case 21:
#line 212 "gram.y"
{ eraser(lookat(showsr, showsc),
lookat(currow, curcol)); ;
break;}
case 22:
#line 215 "gram.y"
{ eraser(yyvsp[0].rval.left.vp, yyvsp[0].rval.right.vp); ;
break;}
case 23:
#line 216 "gram.y"
{ valueize_area(showsr, showsc, currow, curcol);
modflg++; ;
break;}
case 24:
#line 218 "gram.y"
{ valueize_area((yyvsp[0].rval.left.vp)->row,
(yyvsp[0].rval.left.vp)->col,
(yyvsp[0].rval.right.vp)->row,
(yyvsp[0].rval.right.vp)->col); modflg++; ;
break;}
case 25:
#line 222 "gram.y"
{ fill(lookat(showsr, showsc),
lookat(currow, curcol), yyvsp[-1].fval, yyvsp[0].fval); ;
break;}
case 26:
#line 225 "gram.y"
{ fill(yyvsp[-2].rval.left.vp, yyvsp[-2].rval.right.vp, yyvsp[-1].fval, yyvsp[0].fval); ;
break;}
case 27:
#line 226 "gram.y"
{moveto(yyvsp[0].rval.left.vp->row, yyvsp[0].rval.left.vp->col);;
break;}
case 28:
#line 227 "gram.y"
{num_search(yyvsp[0].fval);;
break;}
case 29:
#line 228 "gram.y"
{str_search(yyvsp[0].sval);;
break;}
case 30:
#line 229 "gram.y"
{go_last();;
break;}
case 31:
#line 230 "gram.y"
{ struct ent_ptr arg1, arg2;
arg1.vp = lookat(showsr, showsc);
arg1.vf = 0;
arg2.vp = lookat(currow, curcol);
arg2.vf = 0;
add_range(yyvsp[0].sval, arg1, arg2, 1); ;
break;}
case 32:
#line 237 "gram.y"
{ add_range(yyvsp[-1].sval, yyvsp[0].rval.left, yyvsp[0].rval.right, 1); ;
break;}
case 33:
#line 238 "gram.y"
{ add_range(yyvsp[-1].sval, yyvsp[0].ent, yyvsp[0].ent, 0); ;
break;}
case 34:
#line 239 "gram.y"
{ del_range(yyvsp[0].rval.left.vp, yyvsp[0].rval.right.vp); ;
break;}
case 38:
#line 244 "gram.y"
{ yyval.enode = new_var('v', yyvsp[0].ent); ;
break;}
case 39:
#line 245 "gram.y"
{ yyval.enode = new ('f', ENULL, yyvsp[0].enode); ;
break;}
case 40:
#line 247 "gram.y"
{ yyval.enode = new_range(REDUCE | '+', yyvsp[-1].rval); ;
break;}
case 41:
#line 249 "gram.y"
{ yyval.enode = new_range (REDUCE | '*', yyvsp[-1].rval); ;
break;}
case 42:
#line 251 "gram.y"
{ yyval.enode = new_range (REDUCE | 'a', yyvsp[-1].rval); ;
break;}
case 43:
#line 253 "gram.y"
{ yyval.enode = new_range (REDUCE | 's', yyvsp[-1].rval); ;
break;}
case 44:
#line 255 "gram.y"
{ yyval.enode = new_range (REDUCE | 'c', yyvsp[-1].rval); ;
break;}
case 45:
#line 257 "gram.y"
{ yyval.enode = new_range (REDUCE | MAX, yyvsp[-1].rval); ;
break;}
case 46:
#line 259 "gram.y"
{ yyval.enode = new(LMAX, yyvsp[-1].enode, yyvsp[-3].enode); ;
break;}
case 47:
#line 261 "gram.y"
{ yyval.enode = new_range (REDUCE | MIN, yyvsp[-1].rval); ;
break;}
case 48:
#line 263 "gram.y"
{ yyval.enode = new(LMIN, yyvsp[-1].enode, yyvsp[-3].enode); ;
break;}
case 49:
#line 264 "gram.y"
{ yyval.enode = new(ABS, ENULL, yyvsp[-1].enode); ;
break;}
case 50:
#line 265 "gram.y"
{ yyval.enode = new(ACOS, ENULL, yyvsp[-1].enode); ;
break;}
case 51:
#line 266 "gram.y"
{ yyval.enode = new(ASIN, ENULL, yyvsp[-1].enode); ;
break;}
case 52:
#line 267 "gram.y"
{ yyval.enode = new(ATAN, ENULL, yyvsp[-1].enode); ;
break;}
case 53:
#line 268 "gram.y"
{ yyval.enode = new(ATAN2, yyvsp[-3].enode, yyvsp[-1].enode); ;
break;}
case 54:
#line 269 "gram.y"
{ yyval.enode = new(CEIL, ENULL, yyvsp[-1].enode); ;
break;}
case 55:
#line 270 "gram.y"
{ yyval.enode = new(COS, ENULL, yyvsp[-1].enode); ;
break;}
case 56:
#line 271 "gram.y"
{ yyval.enode = new(EXP, ENULL, yyvsp[-1].enode); ;
break;}
case 57:
#line 272 "gram.y"
{ yyval.enode = new(FABS, ENULL, yyvsp[-1].enode); ;
break;}
case 58:
#line 273 "gram.y"
{ yyval.enode = new(FLOOR, ENULL, yyvsp[-1].enode); ;
break;}
case 59:
#line 274 "gram.y"
{ yyval.enode = new(HYPOT, yyvsp[-3].enode, yyvsp[-1].enode); ;
break;}
case 60:
#line 275 "gram.y"
{ yyval.enode = new(LOG, ENULL, yyvsp[-1].enode); ;
break;}
case 61:
#line 276 "gram.y"
{ yyval.enode = new(LOG10, ENULL, yyvsp[-1].enode); ;
break;}
case 62:
#line 277 "gram.y"
{ yyval.enode = new(POW, yyvsp[-3].enode, yyvsp[-1].enode); ;
break;}
case 63:
#line 278 "gram.y"
{ yyval.enode = new(SIN, ENULL, yyvsp[-1].enode); ;
break;}
case 64:
#line 279 "gram.y"
{ yyval.enode = new(SQRT, ENULL, yyvsp[-1].enode); ;
break;}
case 65:
#line 280 "gram.y"
{ yyval.enode = new(TAN, ENULL, yyvsp[-1].enode); ;
break;}
case 66:
#line 281 "gram.y"
{ yyval.enode = new(DTR, ENULL, yyvsp[-1].enode); ;
break;}
case 67:
#line 282 "gram.y"
{ yyval.enode = new(RTD, ENULL, yyvsp[-1].enode); ;
break;}
case 68:
#line 283 "gram.y"
{ yyval.enode = new(RND, ENULL, yyvsp[-1].enode); ;
break;}
case 69:
#line 284 "gram.y"
{ yyval.enode = new(ROUND, yyvsp[-3].enode, yyvsp[-1].enode); ;
break;}
case 70:
#line 285 "gram.y"
{ yyval.enode = new(IF, yyvsp[-5].enode,new(',',yyvsp[-3].enode,yyvsp[-1].enode)); ;
break;}
case 71:
#line 287 "gram.y"
{ yyval.enode = new(PV, yyvsp[-5].enode,new(':',yyvsp[-3].enode,yyvsp[-1].enode)); ;
break;}
case 72:
#line 288 "gram.y"
{ yyval.enode = new(FV, yyvsp[-5].enode,new(':',yyvsp[-3].enode,yyvsp[-1].enode)); ;
break;}
case 73:
#line 289 "gram.y"
{ yyval.enode = new(PMT, yyvsp[-5].enode,new(':',yyvsp[-3].enode,yyvsp[-1].enode)); ;
break;}
case 74:
#line 291 "gram.y"
{ yyval.enode = new(HOUR,ENULL, yyvsp[-1].enode); ;
break;}
case 75:
#line 292 "gram.y"
{ yyval.enode = new(MINUTE,ENULL, yyvsp[-1].enode); ;
break;}
case 76:
#line 293 "gram.y"
{ yyval.enode = new(SECOND,ENULL, yyvsp[-1].enode); ;
break;}
case 77:
#line 294 "gram.y"
{ yyval.enode = new(MONTH,ENULL,yyvsp[-1].enode); ;
break;}
case 78:
#line 295 "gram.y"
{ yyval.enode = new(DAY, ENULL, yyvsp[-1].enode); ;
break;}
case 79:
#line 296 "gram.y"
{ yyval.enode = new(YEAR, ENULL, yyvsp[-1].enode); ;
break;}
case 80:
#line 297 "gram.y"
{ yyval.enode = new(NOW, ENULL, ENULL);;
break;}
case 81:
#line 299 "gram.y"
{ yyval.enode = new(DTS, yyvsp[-5].enode, new(',', yyvsp[-3].enode, yyvsp[-1].enode));;
break;}
case 82:
#line 301 "gram.y"
{ yyval.enode = new(TTS, yyvsp[-5].enode, new(',', yyvsp[-3].enode, yyvsp[-1].enode));;
break;}
case 83:
#line 302 "gram.y"
{ yyval.enode = new(STON, ENULL, yyvsp[-1].enode); ;
break;}
case 84:
#line 303 "gram.y"
{ yyval.enode = new (EQS, yyvsp[-3].enode, yyvsp[-1].enode); ;
break;}
case 85:
#line 304 "gram.y"
{ yyval.enode = new(DATE, ENULL, yyvsp[-1].enode); ;
break;}
case 86:
#line 305 "gram.y"
{ yyval.enode = new(FMT, yyvsp[-3].enode, yyvsp[-1].enode); ;
break;}
case 87:
#line 307 "gram.y"
{ yyval.enode = new(INDEX, yyvsp[-3].enode, new_range(REDUCE | INDEX, yyvsp[-1].rval)); ;
break;}
case 88:
#line 309 "gram.y"
{ yyval.enode = new(LOOKUP, yyvsp[-3].enode, new_range(REDUCE | LOOKUP, yyvsp[-1].rval)); ;
break;}
case 89:
#line 311 "gram.y"
{ yyval.enode = new(HLOOKUP, new(',', yyvsp[-5].enode, yyvsp[-1].enode),
new_range(REDUCE | HLOOKUP, yyvsp[-3].rval)); ;
break;}
case 90:
#line 314 "gram.y"
{ yyval.enode = new(VLOOKUP, new(',', yyvsp[-5].enode, yyvsp[-1].enode),
new_range(REDUCE | VLOOKUP, yyvsp[-3].rval)); ;
break;}
case 91:
#line 317 "gram.y"
{ yyval.enode = new(STINDEX, yyvsp[-3].enode, new_range(REDUCE | STINDEX, yyvsp[-1].rval)); ;
break;}
case 92:
#line 318 "gram.y"
{ yyval.enode = new(EXT, yyvsp[-3].enode, yyvsp[-1].enode); ;
break;}
case 93:
#line 319 "gram.y"
{ yyval.enode = new(NVAL, yyvsp[-3].enode, yyvsp[-1].enode); ;
break;}
case 94:
#line 320 "gram.y"
{ yyval.enode = new(SVAL, yyvsp[-3].enode, yyvsp[-1].enode); ;
break;}
case 95:
#line 322 "gram.y"
{ yyval.enode = new(SUBSTR, yyvsp[-5].enode, new(',', yyvsp[-3].enode, yyvsp[-1].enode)); ;
break;}
case 96:
#line 323 "gram.y"
{ yyval.enode = yyvsp[-1].enode; ;
break;}
case 97:
#line 324 "gram.y"
{ yyval.enode = yyvsp[0].enode; ;
break;}
case 98:
#line 325 "gram.y"
{ yyval.enode = new ('m', ENULL, yyvsp[0].enode); ;
break;}
case 99:
#line 326 "gram.y"
{ yyval.enode = new_const('k', (double) yyvsp[0].ival); ;
break;}
case 100:
#line 327 "gram.y"
{ yyval.enode = new_const('k', yyvsp[0].fval); ;
break;}
case 101:
#line 328 "gram.y"
{ yyval.enode = new_const('k', (double)3.14159265358979323846); ;
break;}
case 102:
#line 329 "gram.y"
{ yyval.enode = new_str(yyvsp[0].sval); ;
break;}
case 103:
#line 330 "gram.y"
{ yyval.enode = new ('~', ENULL, yyvsp[0].enode); ;
break;}
case 104:
#line 331 "gram.y"
{ yyval.enode = new ('~', ENULL, yyvsp[0].enode); ;
break;}
case 105:
#line 334 "gram.y"
{ yyval.enode = new ('+', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 106:
#line 335 "gram.y"
{ yyval.enode = new ('-', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 107:
#line 336 "gram.y"
{ yyval.enode = new ('*', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 108:
#line 337 "gram.y"
{ yyval.enode = new ('/', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 109:
#line 338 "gram.y"
{ yyval.enode = new ('%', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 110:
#line 339 "gram.y"
{ yyval.enode = new ('^', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 112:
#line 341 "gram.y"
{ yyval.enode = new ('?', yyvsp[-4].enode, new(':', yyvsp[-2].enode, yyvsp[0].enode)); ;
break;}
case 113:
#line 342 "gram.y"
{ yyval.enode = new ('<', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 114:
#line 343 "gram.y"
{ yyval.enode = new ('=', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 115:
#line 344 "gram.y"
{ yyval.enode = new ('>', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 116:
#line 345 "gram.y"
{ yyval.enode = new ('&', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 117:
#line 346 "gram.y"
{ yyval.enode = new ('|', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 118:
#line 347 "gram.y"
{ yyval.enode = new ('~', ENULL, new ('>', yyvsp[-3].enode, yyvsp[0].enode)); ;
break;}
case 119:
#line 348 "gram.y"
{ yyval.enode = new ('~', ENULL, new ('=', yyvsp[-3].enode, yyvsp[0].enode)); ;
break;}
case 120:
#line 349 "gram.y"
{ yyval.enode = new ('~', ENULL, new ('<', yyvsp[-3].enode, yyvsp[0].enode)); ;
break;}
case 121:
#line 350 "gram.y"
{ yyval.enode = new ('#', yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 122:
#line 353 "gram.y"
{ yyval.enode = new(ELIST, ENULL, yyvsp[0].enode); ;
break;}
case 123:
#line 354 "gram.y"
{ yyval.enode = new(ELIST, yyvsp[-2].enode, yyvsp[0].enode); ;
break;}
case 124:
#line 357 "gram.y"
{ yyval.rval.left = yyvsp[-2].ent; yyval.rval.right = yyvsp[0].ent; ;
break;}
case 125:
#line 358 "gram.y"
{ yyval.rval = yyvsp[0].rval; ;
break;}
case 126:
#line 361 "gram.y"
{ yyval.ent.vp = lookat(yyvsp[0].ival , yyvsp[-1].ival); yyval.ent.vf = 0;;
break;}
case 127:
#line 362 "gram.y"
{ yyval.ent.vp = lookat(yyvsp[0].ival , yyvsp[-1].ival);
yyval.ent.vf = FIX_COL;;
break;}
case 128:
#line 364 "gram.y"
{ yyval.ent.vp = lookat(yyvsp[0].ival , yyvsp[-2].ival);
yyval.ent.vf = FIX_ROW;;
break;}
case 129:
#line 366 "gram.y"
{ yyval.ent.vp = lookat(yyvsp[0].ival , yyvsp[-2].ival);
yyval.ent.vf = FIX_ROW | FIX_COL;;
break;}
case 130:
#line 368 "gram.y"
{ yyval.ent = yyvsp[0].rval.left; ;
break;}
case 131:
#line 371 "gram.y"
{ yyval.rval = yyvsp[0].rval; ;
break;}
case 132:
#line 372 "gram.y"
{ yyval.rval.left = yyvsp[0].ent; yyval.rval.right = yyvsp[0].ent; ;
break;}
case 133:
#line 375 "gram.y"
{ yyval.fval = (double) yyvsp[0].ival; ;
break;}
case 134:
#line 376 "gram.y"
{ yyval.fval = yyvsp[0].fval; ;
break;}
case 135:
#line 377 "gram.y"
{ yyval.fval = -yyvsp[0].fval; ;
break;}
case 136:
#line 378 "gram.y"
{ yyval.fval = yyvsp[0].fval; ;
break;}
case 137:
#line 381 "gram.y"
{ yyval.sval = yyvsp[0].sval; ;
break;}
case 138:
#line 382 "gram.y"
{
char *s, *s1;
s1 = yyvsp[0].ent.vp->label;
if (!s1)
s1 = "NULL_STRING";
s = xmalloc((unsigned)strlen(s1)+1);
(void) strcpy(s, s1);
yyval.sval = s;
;
break;}
case 141:
#line 397 "gram.y"
{ setauto(1); ;
break;}
case 142:
#line 398 "gram.y"
{ setauto(1); ;
break;}
case 143:
#line 399 "gram.y"
{ setauto(0); ;
break;}
case 144:
#line 400 "gram.y"
{ setauto(0); ;
break;}
case 145:
#line 401 "gram.y"
{ setauto(0); ;
break;}
case 146:
#line 402 "gram.y"
{ setauto(0); ;
break;}
case 147:
#line 403 "gram.y"
{ setorder(BYCOLS); ;
break;}
case 148:
#line 404 "gram.y"
{ setorder(BYROWS); ;
break;}
case 149:
#line 405 "gram.y"
{ setorder(BYGRAPH); ;
break;}
case 150:
#line 406 "gram.y"
{ numeric = 1; ;
break;}
case 151:
#line 407 "gram.y"
{ numeric = 0; ;
break;}
case 152:
#line 408 "gram.y"
{ prescale = 0.01; ;
break;}
case 153:
#line 409 "gram.y"
{ prescale = 1.0; ;
break;}
case 154:
#line 410 "gram.y"
{ extfunc = 1; ;
break;}
case 155:
#line 411 "gram.y"
{ extfunc = 0; ;
break;}
case 156:
#line 412 "gram.y"
{ showcell = 1; ;
break;}
case 157:
#line 413 "gram.y"
{ showcell = 0; ;
break;}
case 158:
#line 414 "gram.y"
{ showtop = 1; ;
break;}
case 159:
#line 415 "gram.y"
{ showtop = 0; ;
break;}
case 160:
#line 416 "gram.y"
{ setiterations(yyvsp[0].ival); ;
break;}
case 161:
#line 417 "gram.y"
{ tbl_style = yyvsp[0].ival; ;
break;}
case 162:
#line 418 "gram.y"
{ tbl_style = TBL; ;
break;}
case 163:
#line 419 "gram.y"
{ tbl_style = LATEX; ;
break;}
case 164:
#line 420 "gram.y"
{ tbl_style = TEX; ;
break;}
}
/* the action file gets copied in in place of this dollarsign */
#line 303 "bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
#ifdef YYLSP_NEEDED
yylsp -= yylen;
#endif
#ifdef YYDEBUG
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#ifdef YYLSP_NEEDED
yylsp++;
if (yylen == 0)
{
yylsp->first_line = yylloc.first_line;
yylsp->first_column = yylloc.first_column;
yylsp->last_line = (yylsp-1)->last_line;
yylsp->last_column = (yylsp-1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp+yylen-1)->last_line;
yylsp->last_column = (yylsp+yylen-1)->last_column;
}
#endif
/* Now "shift" the result of the reduction.
Determine what state that goes to,
based on the state we popped back to
and the rule number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
yyerrlab: /* here on detecting error */
if (! yyerrstatus)
/* If not already recovering from an error, report this error. */
{
++yynerr;
yyerror("parse error");
}
if (yyerrstatus == 3)
{
/* if just tried and failed to reuse lookahead token after an error, discard it. */
/* return failure if at end of input */
if (yychar == YYEOF)
YYERROR;
#ifdef YYDEBUG
if (yydebug)
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token
after shifting the error token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
goto yyerrhandle;
yyerrdefault: /* current state does not do anything special for the error token. */
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (yyn) goto yydefault;
#endif
yyerrpop: /* pop the current state because it cannot handle the error token */
if (yyssp == yyss) YYERROR;
yyvsp--;
yystate = *--yyssp;
#ifdef YYLSP_NEEDED
yylsp--;
#endif
#ifdef YYDEBUG
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
yyerrhandle:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
#ifdef YYDEBUG
if (yydebug)
fprintf(stderr, "Shifting error token, ");
#endif
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
}
#line 422 "gram.y"