home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
NGAWK1.ZIP
/
GRAM.C
< prev
next >
Wrap
C/C++ Source or Header
|
1988-07-16
|
51KB
|
1,103 lines
/* A Bison parser, made from gram.y */
#define IDENTIFIER 258
#define CONSTANT 259
#define STRING_LITERAL 260
#define SIZEOF 261
#define PTR_OP 262
#define INC_OP 263
#define DEC_OP 264
#define LEFT_OP 265
#define RIGHT_OP 266
#define LE_OP 267
#define GE_OP 268
#define EQ_OP 269
#define NE_OP 270
#define AND_OP 271
#define OR_OP 272
#define MUL_ASSIGN 273
#define DIV_ASSIGN 274
#define MOD_ASSIGN 275
#define ADD_ASSIGN 276
#define SUB_ASSIGN 277
#define LEFT_ASSIGN 278
#define RIGHT_ASSIGN 279
#define AND_ASSIGN 280
#define XOR_ASSIGN 281
#define OR_ASSIGN 282
#define TYPE_NAME 283
#define TYPEDEF 284
#define EXTERN 285
#define STATIC 286
#define AUTO 287
#define REGISTER 288
#define CHAR 289
#define SHORT 290
#define INT 291
#define LONG 292
#define SIGNED 293
#define UNSIGNED 294
#define FLOAT 295
#define DOUBLE 296
#define CONST 297
#define VOLATILE 298
#define VOID 299
#define STRUCT 300
#define UNION 301
#define ENUM 302
#define ELIPSIS 303
#define RANGE 304
#define CASE 305
#define DEFAULT 306
#define IF 307
#define ELSE 308
#define SWITCH 309
#define WHILE 310
#define DO 311
#define FOR 312
#define GOTO 313
#define CONTINUE 314
#define BREAK 315
#define RETURN 316
#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)
#ifndef YYSTYPE
#define YYSTYPE int
#endif
#include <stdio.h>
#define YYFINAL 368
#define YYFLAG -32768
#define YYNTBASE 86
#define YYTRANSLATE(x) (yytranslate[x])
static 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, 73, 2, 2, 2, 75, 68, 2, 62,
63, 69, 70, 67, 71, 66, 74, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 81, 83, 76,
82, 77, 80, 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,
64, 2, 65, 78, 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, 84, 79, 85, 72, 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
};
static short yyrline[] = { 0,
17, 18, 19, 20, 24, 25, 26, 27, 28, 29,
30, 31, 35, 36, 40, 41, 42, 43, 44, 45,
49, 50, 51, 52, 53, 54, 58, 59, 63, 64,
65, 66, 70, 71, 72, 76, 77, 78, 82, 83,
84, 85, 86, 90, 91, 92, 96, 97, 101, 102,
106, 107, 111, 112, 116, 117, 121, 122, 126, 127,
131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
141, 145, 146, 150, 154, 155, 159, 160, 161, 162,
166, 167, 171, 172, 176, 177, 178, 179, 180, 184,
185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
195, 196, 197, 201, 202, 203, 207, 208, 212, 213,
217, 221, 222, 226, 227, 228, 232, 233, 234, 238,
239, 243, 244, 248, 249, 253, 254, 255, 256, 257,
258, 259, 263, 264, 265, 266, 270, 271, 275, 276,
280, 281, 285, 286, 290, 291, 295, 296, 300, 301,
305, 306, 307, 311, 312, 313, 314, 315, 316, 317,
318, 319, 323, 324, 325, 329, 330, 334, 335, 336,
337, 338, 339, 343, 344, 345, 349, 350, 351, 352,
356, 357, 361, 362, 366, 367, 371, 372, 373, 377,
378, 379, 380, 381, 382, 383, 384, 385, 386, 390,
391, 392, 393, 394, 398, 399, 403, 404, 408, 409,
413, 414, 418
};
static char * yytname[] = { 0,
"error","$illegal.","IDENTIFIER","CONSTANT","STRING_LITERAL","SIZEOF","PTR_OP","INC_OP","DEC_OP","LEFT_OP",
"RIGHT_OP","LE_OP","GE_OP","EQ_OP","NE_OP","AND_OP","OR_OP","MUL_ASSIGN","DIV_ASSIGN","MOD_ASSIGN",
"ADD_ASSIGN","SUB_ASSIGN","LEFT_ASSIGN","RIGHT_ASSIGN","AND_ASSIGN","XOR_ASSIGN","OR_ASSIGN","TYPE_NAME","TYPEDEF","EXTERN",
"STATIC","AUTO","REGISTER","CHAR","SHORT","INT","LONG","SIGNED","UNSIGNED","FLOAT",
"DOUBLE","CONST","VOLATILE","VOID","STRUCT","UNION","ENUM","ELIPSIS","RANGE","CASE",
"DEFAULT","IF","ELSE","SWITCH","WHILE","DO","FOR","GOTO","CONTINUE","BREAK",
"RETURN","'('","')'","'['","']'","'.'","','","'&'","'*'","'+'",
"'-'","'~'","'!'","'/'","'%'","'<'","'>'","'^'","'|'","'?'",
"':'","'='","';'","'{'","'}'","primary_expr"
};
static short yyr1[] = { 0,
86, 86, 86, 86, 87, 87, 87, 87, 87, 87,
87, 87, 88, 88, 89, 89, 89, 89, 89, 89,
90, 90, 90, 90, 90, 90, 91, 91, 92, 92,
92, 92, 93, 93, 93, 94, 94, 94, 95, 95,
95, 95, 95, 96, 96, 96, 97, 97, 98, 98,
99, 99, 100, 100, 101, 101, 102, 102, 103, 103,
104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
104, 105, 105, 106, 107, 107, 108, 108, 108, 108,
109, 109, 110, 110, 111, 111, 111, 111, 111, 112,
112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
112, 112, 112, 113, 113, 113, 114, 114, 115, 115,
116, 117, 117, 118, 118, 118, 119, 119, 119, 120,
120, 121, 121, 122, 122, 123, 123, 123, 123, 123,
123, 123, 124, 124, 124, 124, 125, 125, 126, 126,
127, 127, 128, 128, 129, 129, 130, 130, 131, 131,
132, 132, 132, 133, 133, 133, 133, 133, 133, 133,
133, 133, 134, 134, 134, 135, 135, 136, 136, 136,
136, 136, 136, 137, 137, 137, 138, 138, 138, 138,
139, 139, 140, 140, 141, 141, 142, 142, 142, 143,
143, 143, 143, 143, 143, 143, 143, 143, 143, 144,
144, 144, 144, 144, 145, 145, 146, 146, 147, 147,
148, 148, 149
};
static short yyr2[] = { 0,
1, 1, 1, 3, 1, 4, 3, 4, 3, 3,
2, 2, 1, 3, 1, 2, 2, 2, 2, 4,
1, 1, 1, 1, 1, 1, 1, 4, 1, 3,
3, 3, 1, 3, 3, 1, 3, 3, 1, 3,
3, 3, 3, 1, 3, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3, 1, 5, 1, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 3, 1, 2, 3, 1, 2, 1, 2,
1, 3, 1, 3, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 5, 4, 2, 1, 1, 1, 2,
3, 1, 3, 1, 2, 3, 4, 5, 2, 1,
3, 1, 3, 1, 2, 1, 3, 3, 4, 3,
4, 4, 1, 2, 2, 3, 1, 2, 1, 3,
1, 3, 1, 3, 1, 3, 2, 1, 1, 2,
1, 1, 2, 3, 2, 3, 3, 4, 2, 3,
3, 4, 1, 3, 4, 1, 3, 1, 1, 1,
1, 1, 1, 3, 4, 3, 2, 3, 3, 4,
1, 2, 1, 2, 1, 2, 5, 7, 5, 5,
7, 6, 7, 7, 8, 7, 8, 8, 9, 3,
2, 2, 2, 3, 1, 2, 1, 1, 2, 3,
1, 2, 1
};
static short yydefact[] = { 0,
213, 103, 85, 86, 87, 88, 89, 90, 91, 92,
93, 94, 95, 96, 97, 98, 99, 100, 107, 108,
0, 0, 133, 208, 0, 77, 79, 101, 0, 102,
0, 124, 0, 0, 205, 207, 126, 0, 119, 0,
137, 135, 134, 75, 0, 81, 83, 78, 80, 0,
106, 0, 181, 0, 211, 0, 209, 0, 0, 125,
206, 0, 120, 122, 0, 127, 138, 136, 0, 76,
0, 210, 0, 109, 0, 0, 2, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 21, 22, 23, 24, 25, 26, 185,
177, 5, 15, 27, 0, 29, 33, 36, 39, 44,
47, 49, 51, 53, 55, 57, 59, 72, 0, 183,
168, 169, 0, 0, 170, 171, 172, 173, 1, 83,
182, 212, 130, 149, 0, 139, 0, 143, 145, 148,
141, 128, 27, 74, 0, 1, 0, 117, 0, 0,
82, 0, 163, 84, 105, 110, 0, 0, 112, 114,
0, 0, 19, 0, 16, 17, 0, 0, 0, 0,
0, 0, 0, 0, 201, 202, 203, 0, 0, 149,
0, 0, 11, 12, 0, 0, 0, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 61, 0, 18,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
186, 179, 0, 178, 184, 0, 0, 0, 147, 151,
150, 152, 132, 0, 131, 0, 129, 121, 123, 118,
166, 0, 115, 0, 111, 0, 104, 0, 0, 176,
0, 0, 0, 0, 0, 0, 200, 204, 4, 0,
151, 0, 10, 7, 0, 13, 0, 9, 60, 30,
31, 32, 34, 35, 37, 38, 42, 43, 40, 41,
45, 46, 48, 50, 52, 54, 56, 0, 73, 180,
174, 159, 0, 0, 155, 0, 153, 0, 0, 140,
142, 144, 146, 0, 164, 113, 116, 20, 175, 0,
0, 0, 0, 0, 0, 0, 28, 8, 0, 6,
0, 160, 154, 156, 161, 0, 157, 0, 165, 167,
187, 189, 190, 0, 0, 0, 0, 0, 0, 14,
58, 162, 158, 0, 0, 192, 0, 0, 0, 0,
0, 0, 188, 191, 193, 194, 0, 196, 0, 0,
0, 195, 197, 198, 0, 199, 0, 0
};
static short yydefgoto[] = { 102,
103, 265, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 199, 119, 145,
53, 54, 45, 46, 26, 41, 28, 29, 73, 74,
158, 159, 30, 62, 63, 31, 32, 33, 134, 135,
136, 293, 138, 139, 140, 231, 232, 154, 242, 120,
121, 122, 56, 124, 125, 126, 127, 128, 34, 35,
36, 57, 146
};
static short yypact[] = { 1183,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
6, 14, 1484,-32768, 15, 1504, 1504,-32768, 11,-32768,
1387, 53, 43, 1138,-32768,-32768,-32768, 38, -22, 4,
-32768,-32768, 1484,-32768, -47,-32768, 1330,-32768,-32768, 1524,
-14, 402,-32768, 15,-32768, 1387,-32768, 339, 855, 53,
-32768, -37,-32768, -1, 38,-32768,-32768,-32768, 14,-32768,
325,-32768, 526,-32768, 793, 1524,-32768,-32768, 1052, 1080,
1080, 1092, 22, 48, 77, 92, 651, 186, 38, 30,
80, 670, 841,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768, 354, 274, 1092,-32768, 51, 101, 181, 32,
232, 110, 28, 145, 248, 2,-32768,-32768, -27,-32768,
-32768,-32768, 473, 544,-32768,-32768,-32768,-32768, 184, 185,
-32768,-32768,-32768, 1273, 203, 201, 207, 204,-32768,-32768,
-32768,-32768,-32768,-32768, 209,-32768, 38,-32768, 1092, -35,
-32768, 325,-32768,-32768,-32768,-32768, 1092, 44,-32768, 195,
1310, 841,-32768, 1092,-32768,-32768, 196, 651, 1092, 1092,
1092, 223, 686, 205,-32768,-32768,-32768, 49, -20, 1447,
216, 38,-32768,-32768, 886, 1092, 38,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1092,-32768,
1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092,
1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092,
-32768,-32768, 580,-32768,-32768, 651, 1228, 926,-32768, 50,
-32768, 102,-32768, 20,-32768, 1362,-32768,-32768,-32768,-32768,
-32768, -30,-32768, 23,-32768, 1092,-32768, 224, 651,-32768,
106, 114, 116, 240, 722, 76,-32768,-32768,-32768, 1410,
152, 1092,-32768,-32768, 117,-32768, 166,-32768,-32768,-32768,
-32768,-32768, 51, 51, 101, 101, 181, 181, 181, 181,
32, 32, 232, 110, 28, 145, 248, -2,-32768,-32768,
-32768,-32768, 243, 244,-32768, 221, 102, 736, 938,-32768,
-32768,-32768,-32768, 615,-32768,-32768,-32768,-32768,-32768, 651,
651, 651, 1092, 957, 79, 741,-32768,-32768, 1092,-32768,
1092,-32768,-32768,-32768,-32768, 245,-32768, 238,-32768,-32768,
256,-32768,-32768, 122, 651, 123, 969, 981, 93,-32768,
-32768,-32768,-32768, 651, 231,-32768, 651, 651, 154, 651,
162, 1009,-32768,-32768,-32768,-32768, 651,-32768, 651, 651,
176,-32768,-32768,-32768, 651,-32768, 317,-32768
};
static short yypgoto[] = {-32768,
-32768,-32768, -8,-32768, -101, 52, 55, 42, 46, 104,
107, 105, 108, 109, 119, -58, -64,-32768, -33, -71,
5, 118,-32768, 255,-32768, 289,-32768,-32768, 250, -67,
-32768, 95,-32768, 272, 193, -12, -17, -15, 57,-32768,
-32768, -56,-32768, 113, -66, -196, -195, -149,-32768, -75,
-32768, 111, 291, 228,-32768,-32768,-32768,-32768,-32768, 312,
-32768, 305, 0
};
#define YYLAST 1571
static short yytable[] = { 37,
144, 137, 241, 200, 24, 156, 153, 42, 1, 40,
167, 172, 47, 1, 218, 60, 1, 1, 218, 69,
39, 37, 1, 144, 37, 1, 181, 68, 51, 147,
294, 147, 37, 37, 297, 70, 304, 64, 24, 220,
1, 130, 259, 208, 209, 1, 220, 148, 225, 240,
143, 129, 1, 37, 305, 221, 130, 141, 178, 179,
131, 65, 160, 294, 64, 297, 66, 300, 37, 76,
163, 165, 166, 143, 37, 22, 22, 239, 321, 43,
149, 219, 23, 23, 22, 243, 129, 153, 174, 38,
144, 23, 250, 156, 50, 248, 143, 44, 144, 270,
271, 272, 168, 157, 22, 215, 75, 210, 211, 169,
244, 227, 175, 228, 58, 220, 59, 25, 230, 201,
266, 229, 129, 129, 202, 203, 245, 131, 179, 75,
179, 258, 75, 37, 269, 251, 252, 253, 170, 256,
143, 55, 220, 48, 49, 220, 64, 225, 143, 180,
291, 25, 267, 171, 330, 289, 296, 55, 316, 220,
317, 337, 176, 298, 261, 299, 132, 129, 310, 144,
204, 205, 220, 309, 307, 352, 311, 214, 312, 318,
220, 263, 220, 319, 345, 347, 268, 144, 220, 220,
206, 207, 143, 143, 143, 143, 143, 143, 143, 143,
143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
143, 230, 60, 260, 40, 228, 357, 75, 180, 143,
220, 315, 129, 216, 359, 129, 37, 328, 220, 37,
320, 160, 220, 301, 331, 332, 333, 143, 365, 153,
144, 326, 220, 37, 261, 212, 213, 173, 129, 277,
278, 279, 280, 143, 340, 273, 274, 281, 282, 346,
275, 276, 341, 217, 226, 233, 71, 234, 353, 235,
236, 355, 356, 237, 358, 246, 249, 254, 262, 334,
336, 362, 339, 363, 364, 324, 308, 257, 27, 366,
143, 188, 189, 190, 191, 192, 193, 194, 195, 196,
197, 313, 343, 349, 351, 322, 323, 342, 344, 129,
129, 129, 143, 354, 27, 27, 368, 283, 361, 27,
285, 284, 27, 151, 286, 161, 287, 1, 77, 78,
79, 67, 80, 81, 129, 27, 150, 288, 306, 238,
27, 1, 123, 129, 27, 61, 129, 129, 303, 129,
223, 72, 0, 0, 0, 198, 129, 0, 129, 129,
182, 183, 184, 67, 129, 0, 2, 0, 0, 0,
0, 0, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 93, 0, 0, 0,
0, 0, 94, 95, 96, 97, 98, 99, 0, 0,
0, 133, 0, 0, 1, 77, 78, 79, 152, 80,
81, 27, 0, 0, 0, 185, 0, 186, 0, 187,
0, 0, 67, 0, 0, 0, 0, 0, 0, 2,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 0,
0, 82, 83, 84, 0, 85, 86, 87, 88, 89,
90, 91, 92, 93, 0, 0, 0, 0, 67, 94,
95, 96, 97, 98, 99, 1, 77, 78, 79, 0,
80, 81, 0, 0, 100, 52, 101, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
0, 0, 82, 83, 84, 0, 85, 86, 87, 88,
89, 90, 91, 92, 93, 0, 0, 0, 0, 0,
94, 95, 96, 97, 98, 99, 1, 77, 78, 79,
0, 80, 81, 2, 0, 100, 52, 222, 0, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 77, 78, 79, 0, 80, 81, 0,
0, 0, 0, 82, 83, 84, 0, 85, 86, 87,
88, 89, 90, 91, 92, 93, 0, 0, 0, 0,
155, 94, 95, 96, 97, 98, 99, 1, 77, 78,
79, 0, 80, 81, 0, 0, 100, 52, 224, 82,
83, 84, 0, 85, 86, 87, 88, 89, 90, 91,
92, 93, 0, 0, 0, 0, 0, 94, 95, 96,
97, 98, 99, 1, 77, 78, 79, 0, 80, 81,
0, 0, 100, 52, 290, 0, 0, 0, 0, 0,
0, 0, 1, 77, 78, 79, 93, 80, 81, 0,
0, 0, 94, 95, 96, 97, 98, 99, 1, 77,
78, 79, 0, 80, 81, 0, 0, 0, 152, 329,
82, 83, 84, 0, 85, 86, 87, 88, 89, 90,
91, 92, 93, 0, 0, 0, 0, 0, 94, 95,
96, 97, 98, 99, 1, 77, 78, 79, 0, 80,
81, 93, 0, 100, 52, 0, 0, 94, 95, 96,
97, 98, 99, 1, 77, 78, 79, 93, 80, 81,
0, 0, 177, 94, 95, 96, 97, 98, 99, 0,
0, 0, 0, 2, 0, 0, 0, 0, 255, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 93, 0, 0, 0, 0, 0, 94,
95, 96, 97, 98, 99, 1, 0, 0, 325, 0,
0, 0, 93, 0, 314, 0, 0, 0, 94, 95,
96, 97, 98, 99, 0, 0, 0, 0, 0, 0,
2, 0, 0, 338, 0, 0, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
0, 0, 0, 1, 77, 78, 79, 0, 80, 81,
0, 0, 0, 0, 22, 0, 0, 1, 77, 78,
79, 23, 80, 81, 0, 0, 0, 0, 2, 0,
0, 0, 0, 157, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 1, 77,
78, 79, 0, 80, 81, 0, 0, 0, 0, 0,
0, 0, 93, 0, 0, 0, 0, 0, 94, 95,
96, 97, 98, 99, 0, 0, 93, 0, 0, 142,
0, 0, 94, 95, 96, 97, 98, 99, 1, 77,
78, 79, 0, 80, 81, 0, 0, 0, 0, 0,
1, 77, 78, 79, 0, 80, 81, 93, 264, 0,
0, 0, 0, 94, 95, 96, 97, 98, 99, 1,
77, 78, 79, 0, 80, 81, 0, 0, 0, 0,
0, 1, 77, 78, 79, 0, 80, 81, 0, 0,
0, 0, 0, 1, 77, 78, 79, 93, 80, 81,
295, 0, 0, 94, 95, 96, 97, 98, 99, 93,
0, 0, 327, 0, 0, 94, 95, 96, 97, 98,
99, 1, 77, 78, 79, 0, 80, 81, 93, 335,
0, 0, 0, 0, 94, 95, 96, 97, 98, 99,
93, 348, 0, 0, 0, 0, 94, 95, 96, 97,
98, 99, 93, 350, 0, 0, 0, 0, 94, 95,
96, 97, 98, 99, 1, 77, 78, 79, 0, 80,
81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
93, 360, 0, 0, 0, 0, 94, 95, 96, 97,
98, 99, 1, 77, 78, 79, 0, 80, 81, 0,
0, 0, 0, 0, 1, 77, 78, 79, 0, 80,
81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 162, 0, 0, 0, 0, 0, 94,
95, 96, 97, 98, 99, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 367, 0, 0,
1, 164, 0, 0, 0, 0, 0, 94, 95, 96,
97, 98, 99, 93, 0, 0, 0, 0, 0, 94,
95, 96, 97, 98, 99, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
0, 0, 0, 0, 0, 0, 23, 0, 0, 0,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
0, 23, 0, 0, 0, 2, 0, 0, 0, 0,
0, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 227,
292, 228, 0, 0, 0, 0, 23, 0, 0, 0,
2, 0, 0, 0, 0, 0, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 227, 0, 228, 2, 0, 0,
0, 23, 0, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
0, 0, 0, 0, 247, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 302,
0, 71, 0, 52, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 0, 0, 0, 2, 0, 0,
0, 0, 0, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
52, 260, 292, 228, 2, 0, 0, 0, 23, 0,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 260, 0,
228, 2, 0, 0, 0, 23, 0, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 2, 23, 0, 0, 0, 0, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21
};
static short yycheck[] = { 0,
59, 58, 152, 105, 0, 73, 71, 23, 3, 22,
82, 87, 25, 3, 17, 33, 3, 3, 17, 67,
21, 22, 3, 82, 25, 3, 93, 43, 29, 67,
227, 67, 33, 34, 230, 83, 67, 38, 34, 67,
3, 54, 63, 12, 13, 3, 67, 85, 124, 85,
59, 52, 3, 54, 85, 83, 69, 58, 92, 93,
56, 84, 75, 260, 65, 261, 63, 48, 69, 84,
79, 80, 81, 82, 75, 62, 62, 149, 81, 23,
82, 80, 69, 69, 62, 157, 87, 152, 89, 84,
149, 69, 168, 161, 84, 162, 105, 83, 157, 201,
202, 203, 81, 81, 62, 78, 50, 76, 77, 62,
67, 62, 83, 64, 62, 67, 64, 0, 134, 69,
185, 134, 123, 124, 74, 75, 83, 123, 162, 73,
164, 83, 76, 134, 199, 169, 170, 171, 62, 173,
149, 31, 67, 26, 27, 67, 147, 223, 157, 93,
226, 34, 186, 62, 304, 220, 228, 47, 83, 67,
262, 83, 83, 62, 180, 64, 56, 168, 63, 228,
70, 71, 67, 249, 246, 83, 63, 68, 63, 63,
67, 182, 67, 67, 63, 63, 187, 246, 67, 67,
10, 11, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
219, 227, 230, 62, 227, 64, 63, 161, 162, 228,
67, 255, 223, 79, 63, 226, 227, 299, 67, 230,
65, 244, 67, 234, 310, 311, 312, 246, 63, 304,
299, 298, 67, 244, 260, 14, 15, 62, 249, 208,
209, 210, 211, 262, 319, 204, 205, 212, 213, 335,
206, 207, 321, 16, 81, 63, 82, 67, 344, 63,
67, 347, 348, 65, 350, 81, 81, 55, 63, 313,
314, 357, 316, 359, 360, 65, 63, 83, 0, 365,
299, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 62, 65, 337, 338, 63, 63, 63, 53, 310,
311, 312, 321, 83, 26, 27, 0, 214, 352, 31,
216, 215, 34, 69, 217, 76, 218, 3, 4, 5,
6, 43, 8, 9, 335, 47, 65, 219, 244, 147,
52, 3, 52, 344, 56, 34, 347, 348, 236, 350,
123, 47, -1, -1, -1, 82, 357, -1, 359, 360,
7, 8, 9, 75, 365, -1, 28, -1, -1, -1,
-1, -1, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 62, -1, -1, -1,
-1, -1, 68, 69, 70, 71, 72, 73, -1, -1,
-1, 63, -1, -1, 3, 4, 5, 6, 84, 8,
9, 123, -1, -1, -1, 62, -1, 64, -1, 66,
-1, -1, 134, -1, -1, -1, -1, -1, -1, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
-1, 50, 51, 52, -1, 54, 55, 56, 57, 58,
59, 60, 61, 62, -1, -1, -1, -1, 180, 68,
69, 70, 71, 72, 73, 3, 4, 5, 6, -1,
8, 9, -1, -1, 83, 84, 85, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
-1, -1, 50, 51, 52, -1, 54, 55, 56, 57,
58, 59, 60, 61, 62, -1, -1, -1, -1, -1,
68, 69, 70, 71, 72, 73, 3, 4, 5, 6,
-1, 8, 9, 28, -1, 83, 84, 85, -1, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 3, 4, 5, 6, -1, 8, 9, -1,
-1, -1, -1, 50, 51, 52, -1, 54, 55, 56,
57, 58, 59, 60, 61, 62, -1, -1, -1, -1,
85, 68, 69, 70, 71, 72, 73, 3, 4, 5,
6, -1, 8, 9, -1, -1, 83, 84, 85, 50,
51, 52, -1, 54, 55, 56, 57, 58, 59, 60,
61, 62, -1, -1, -1, -1, -1, 68, 69, 70,
71, 72, 73, 3, 4, 5, 6, -1, 8, 9,
-1, -1, 83, 84, 85, -1, -1, -1, -1, -1,
-1, -1, 3, 4, 5, 6, 62, 8, 9, -1,
-1, -1, 68, 69, 70, 71, 72, 73, 3, 4,
5, 6, -1, 8, 9, -1, -1, -1, 84, 85,
50, 51, 52, -1, 54, 55, 56, 57, 58, 59,
60, 61, 62, -1, -1, -1, -1, -1, 68, 69,
70, 71, 72, 73, 3, 4, 5, 6, -1, 8,
9, 62, -1, 83, 84, -1, -1, 68, 69, 70,
71, 72, 73, 3, 4, 5, 6, 62, 8, 9,
-1, -1, 83, 68, 69, 70, 71, 72, 73, -1,
-1, -1, -1, 28, -1, -1, -1, -1, 83, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 62, -1, -1, -1, -1, -1, 68,
69, 70, 71, 72, 73, 3, -1, -1, 63, -1,
-1, -1, 62, -1, 83, -1, -1, -1, 68, 69,
70, 71, 72, 73, -1, -1, -1, -1, -1, -1,
28, -1, -1, 83, -1, -1, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
-1, -1, -1, 3, 4, 5, 6, -1, 8, 9,
-1, -1, -1, -1, 62, -1, -1, 3, 4, 5,
6, 69, 8, 9, -1, -1, -1, -1, 28, -1,
-1, -1, -1, 81, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 3, 4,
5, 6, -1, 8, 9, -1, -1, -1, -1, -1,
-1, -1, 62, -1, -1, -1, -1, -1, 68, 69,
70, 71, 72, 73, -1, -1, 62, -1, -1, 65,
-1, -1, 68, 69, 70, 71, 72, 73, 3, 4,
5, 6, -1, 8, 9, -1, -1, -1, -1, -1,
3, 4, 5, 6, -1, 8, 9, 62, 63, -1,
-1, -1, -1, 68, 69, 70, 71, 72, 73, 3,
4, 5, 6, -1, 8, 9, -1, -1, -1, -1,
-1, 3, 4, 5, 6, -1, 8, 9, -1, -1,
-1, -1, -1, 3, 4, 5, 6, 62, 8, 9,
65, -1, -1, 68, 69, 70, 71, 72, 73, 62,
-1, -1, 65, -1, -1, 68, 69, 70, 71, 72,
73, 3, 4, 5, 6, -1, 8, 9, 62, 63,
-1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
62, 63, -1, -1, -1, -1, 68, 69, 70, 71,
72, 73, 62, 63, -1, -1, -1, -1, 68, 69,
70, 71, 72, 73, 3, 4, 5, 6, -1, 8,
9, -1, -1, -1, -1, -1, -1, -1, -1, -1,
62, 63, -1, -1, -1, -1, 68, 69, 70, 71,
72, 73, 3, 4, 5, 6, -1, 8, 9, -1,
-1, -1, -1, -1, 3, 4, 5, 6, -1, 8,
9, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 62, -1, -1, -1, -1, -1, 68,
69, 70, 71, 72, 73, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 0, -1, -1,
3, 62, -1, -1, -1, -1, -1, 68, 69, 70,
71, 72, 73, 62, -1, -1, -1, -1, -1, 68,
69, 70, 71, 72, 73, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 3, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 62,
-1, -1, -1, -1, -1, -1, 69, -1, -1, -1,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
3, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 62, -1, -1, -1, -1, -1,
-1, 69, -1, -1, -1, 28, -1, -1, -1, -1,
-1, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 3, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 62,
63, 64, -1, -1, -1, -1, 69, -1, -1, -1,
28, -1, -1, -1, -1, -1, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 62, -1, 64, 28, -1, -1,
-1, 69, -1, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 28,
-1, -1, -1, -1, 85, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
-1, 82, -1, 84, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, -1, -1, -1, 28, -1, -1,
-1, -1, -1, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
84, 62, 63, 64, 28, -1, -1, -1, 69, -1,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 62, -1,
64, 28, -1, -1, -1, 69, -1, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, 28, 69, -1, -1, -1, -1, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47
};
#define YYPURE 1
#line 1 "bison.sim"
/* Skeleton output parser for bison,
copyright (C) 1984 Bob Corbett and Richard Stallman
Permission is granted to anyone to make or distribute verbatim copies of this program
provided that the copyright notice and this permission notice are preserved;
and provided that the recipient is not asked to waive or limit his right to
redistribute copies as permitted by this permission notice;
and provided that anyone possessing an executable copy
is granted access to copy the source code, in machine-readable form,
in some reasonable manner.
Permission is granted to distribute derived works or enhanced versions of
this program under the above conditions with the additional condition
that the entire derivative or enhanced work
must be covered by a permission notice identical to this one.
Anything distributed as part of a package containing portions derived
from this program, which cannot in current practice perform its function usefully
in the absense of what was derived directly from this program,
is to be considered as forming, together with the latter,
a single work derived from this program,
which must be entirely covered by a permission notice identical to this one
in order for distribution of the package to be permitted.
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. */
/* #include <malloc.h> */ /* WG */
#include <string.h> /* WG */
#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()
int yylex(void); /* WG */
#endif
#ifndef YYPURE
#define YYLEX yylex(&yylval, &yylloc)
int yylex(int, int); /* WG */
#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 yydebug = 0; /* nonzero means print parse trace */
#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 91 "bison.sim"
int
yyparse()
{
register int yystate;
register int yyn;
register short *yyssp;
register YYSTYPE *yyvsp;
void yyerror(char *,...); /* WG [ ',...' - added ADE ]*/
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;
extern int yydebug;
#endif
YYSTYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
int yylen;
if (yydebug)
fprintf(stderr, "Starting parse\n");
yystate = 0;
yyerrstatus = 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));
memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); /* WG */
yyls = (YYLTYPE *) alloca (yymaxdepth * sizeof (*yylsp));
memcpy ( (char *)yyls, (char *)yyls1,size * sizeof (*yylsp)); /* WG */
yyvs = (YYSTYPE *) alloca (yymaxdepth * sizeof (*yyvsp));
memcpy ( (char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); /* WG */
#endif /* no yyoverflow */
yyssp = yyss + size - 1;
yylsp = yyls + size - 1;
yyvsp = yyvs + size - 1;
if (yydebug)
fprintf(stderr, "Stack size increased to %d\n", yymaxdepth);
if (yyssp >= yyss + yymaxdepth - 1)
YYERROR;
}
if (yydebug)
fprintf(stderr, "Entering state %d\n", yystate);
/* 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 = (int)yypact[yystate]; /* WG */
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)
{
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 */
if (yydebug)
fprintf(stderr, "Now at end of input.\n");
}
else
{
yychar1 = YYTRANSLATE(yychar);
if (yydebug)
fprintf(stderr, "Parsing next token; it is %d (%s)\n", yychar, yytname[yychar1]);
}
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 == (int)YYFLAG) /* WG */
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
if (yydebug)
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
*++yylsp = yylloc;
/* 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 */
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]);
}
/* the action file follows */
switch (yyn) {
}
/* the action file gets copied in in place of this dollarsign */
/* the action file ends */
#line 308 "bison.sim"
yyvsp -= yylen;
yylsp -= yylen;
yyssp -= yylen;
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now", yyssp-yyss);
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
*++yyvsp = yyval;
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;
}
/* 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. */
{
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;
if (yydebug)
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
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. */
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (yyn) goto yydefault;
yyerrpop: /* pop the current state because it cannot handle the error token */
if (yyssp == yyss) YYERROR;
yyvsp--;
yylsp--;
yystate = *--yyssp;
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now", yyssp-yyss);
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
yyerrhandle:
yyn = yypact[yystate];
if (yyn == (int)YYFLAG) /* WG */
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;
if (yydebug)
fprintf(stderr, "Shifting error token, ");
*++yyvsp = yylval;
*++yylsp = yylloc;
yystate = yyn;
goto yynewstate;
}
#line 420 "gram.y"
#include <stdio.h>
extern char yytext[];
extern int column;
void
yyerror(s)
char *s;
{
fflush(stdout);
printf("\n%*s\n%*s\n", column, "^", column, s);
}