Annotation of OpenXM/src/k097/simple.tab.c, Revision 1.2
1.1 maekawa 1:
2: /* A Bison parser, made from simple.y
1.2 ! takayama 3: by GNU Bison version 1.28 */
1.1 maekawa 4:
5: #define YYBISON 1 /* Identify Bison output. */
6:
7: #define yyparse KCparse
8: #define yylex KClex
9: #define yyerror KCerror
10: #define yylval KClval
11: #define yychar KCchar
12: #define yydebug KCdebug
13: #define yynerrs KCnerrs
1.2 ! takayama 14: #define ID 257
! 15: #define QUOTE 258
! 16: #define SINGLEQUOTE 259
! 17: #define NUMBER 260
! 18: #define CLASS 261
! 19: #define SUPER 262
! 20: #define OPERATOR 263
! 21: #define FINAL 264
! 22: #define EXTENDS 265
! 23: #define INCETANCEVARIABLE 266
! 24: #define THIS 267
! 25: #define NEW 268
! 26: #define SIZEOFTHISCLASS 269
! 27: #define STARTOFTHISCLASS 270
! 28: #define MODULE 271
! 29: #define PRINT 272
! 30: #define LOCAL 273
! 31: #define DEF 274
! 32: #define SM1 275
! 33: #define LOAD 276
! 34: #define TEST 277
! 35: #define SPECIAL 278
! 36: #define AUTO 279
! 37: #define BREAK 280
! 38: #define CASE 281
! 39: #define CHAR 282
! 40: #define CONST 283
! 41: #define CONTINUE 284
! 42: #define DEFAULT 285
! 43: #define DO 286
! 44: #define DOUBLE 287
! 45: #define ELSE 288
! 46: #define ENUM 289
! 47: #define EXTERN 290
! 48: #define FLOAT 291
! 49: #define FOR 292
! 50: #define GOTO 293
! 51: #define IF 294
! 52: #define INT 295
! 53: #define LONG 296
! 54: #define REGISTER 297
! 55: #define RETURN 298
! 56: #define SHORT 299
! 57: #define SIGNED 300
! 58: #define SIZEOF 301
! 59: #define STATIC 302
! 60: #define STRUCT 303
! 61: #define SWITCH 304
! 62: #define TYPEDEF 305
! 63: #define UNION 306
! 64: #define UNSIGNED 307
! 65: #define VOLATILE 308
! 66: #define VOID 309
! 67: #define WHILE 310
! 68: #define PSFOR 311
! 69: #define PROMPT 312
! 70: #define PUT 313
! 71: #define MULTPUT 314
! 72: #define NEGATEPUT 315
! 73: #define RESIDUEPUT 316
! 74: #define OR 317
! 75: #define AND 318
! 76: #define EQUAL 319
! 77: #define NOTEQUAL 320
! 78: #define LESSEQUAL 321
! 79: #define GREATEREQUAL 322
! 80: #define LEFTSHIFT 323
! 81: #define RIGHTSHIFT 324
! 82: #define UNARYMINUS 325
! 83: #define INCREMENT 326
! 84: #define DECREMENT 327
! 85: #define MEMBER 328
1.1 maekawa 86:
87: #line 4 "simple.y"
88:
89: #include <stdio.h>
90: #include "d.h"
91: #ifndef YYSTYPE
92: #define YYSTYPE int
93: #endif
94: #include <stdio.h>
95:
96: #ifndef __cplusplus
97: #ifndef __STDC__
98: #define const
99: #endif
100: #endif
101:
102:
103:
104: #define YYFINAL 305
105: #define YYFLAG -32768
106: #define YYNTBASE 98
107:
1.2 ! takayama 108: #define YYTRANSLATE(x) ((unsigned)(x) <= 328 ? yytranslate[x] : 159)
1.1 maekawa 109:
110: static const char yytranslate[] = { 0,
111: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
112: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
113: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
114: 2, 2, 82, 2, 2, 2, 80, 67, 2, 96,
115: 97, 78, 76, 91, 77, 87, 79, 2, 2, 2,
116: 2, 2, 2, 2, 2, 2, 2, 90, 89, 70,
117: 59, 71, 2, 2, 2, 2, 2, 2, 2, 2,
118: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
119: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
120: 92, 2, 93, 86, 2, 2, 2, 2, 2, 2,
121: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
122: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
123: 2, 2, 94, 66, 95, 85, 2, 2, 2, 2,
124: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
125: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
126: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
127: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
128: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
129: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
130: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
131: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
132: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
133: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
134: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
135: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1.2 ! takayama 136: 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
! 137: 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
! 138: 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
! 139: 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
! 140: 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
! 141: 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
! 142: 57, 58, 60, 61, 62, 63, 64, 65, 68, 69,
! 143: 72, 73, 74, 75, 81, 83, 84, 88
1.1 maekawa 144: };
145:
146: #if YYDEBUG != 0
147: static const short yyprhs[] = { 0,
148: 0, 2, 5, 7, 9, 11, 13, 15, 17, 20,
149: 23, 25, 27, 30, 33, 36, 38, 40, 42, 44,
150: 46, 49, 52, 55, 57, 61, 63, 66, 68, 70,
151: 72, 75, 79, 82, 86, 91, 93, 95, 98, 103,
152: 108, 113, 117, 120, 122, 124, 129, 133, 136, 137,
153: 152, 155, 158, 162, 165, 168, 173, 178, 183, 188,
154: 191, 194, 199, 200, 204, 206, 210, 212, 214, 216,
155: 218, 220, 222, 226, 228, 230, 232, 234, 236, 238,
156: 240, 242, 244, 247, 251, 254, 258, 260, 263, 267,
157: 272, 276, 281, 285, 289, 293, 297, 299, 303, 307,
158: 309, 311, 315, 316, 318, 322, 326, 328, 331, 333,
159: 337, 341, 345, 347, 349, 352, 355, 358, 362, 366,
160: 370, 374, 378, 382, 386, 390, 394, 398, 402, 406,
161: 410, 414, 418, 422, 426, 430, 434, 437, 440, 444,
162: 448, 452, 456, 460, 464, 468, 472, 474, 476, 481,
163: 486, 490, 493, 496, 501, 505, 511, 515, 519, 521,
164: 525, 527, 532
165: };
166:
167: static const short yyrhs[] = { 99,
168: 0, 100, 99, 0, 100, 0, 116, 0, 119, 0,
169: 122, 0, 111, 0, 135, 0, 147, 89, 0, 147,
170: 90, 0, 89, 0, 152, 0, 1, 89, 0, 58,
171: 89, 0, 102, 101, 0, 102, 0, 116, 0, 119,
172: 0, 122, 0, 111, 0, 147, 89, 0, 104, 89,
173: 0, 105, 89, 0, 89, 0, 147, 91, 103, 0,
174: 147, 0, 44, 147, 0, 44, 0, 26, 0, 92,
175: 0, 106, 93, 0, 106, 103, 93, 0, 94, 95,
176: 0, 94, 101, 95, 0, 40, 96, 147, 97, 0,
177: 102, 0, 108, 0, 109, 110, 0, 109, 110, 34,
178: 102, 0, 109, 110, 34, 108, 0, 38, 96, 147,
179: 89, 0, 38, 96, 89, 0, 147, 89, 0, 89,
180: 0, 147, 0, 112, 113, 114, 97, 0, 112, 113,
181: 97, 0, 115, 108, 0, 0, 57, 96, 3, 59,
182: 147, 89, 118, 3, 70, 147, 89, 3, 83, 97,
183: 0, 117, 108, 0, 56, 96, 0, 120, 147, 97,
184: 0, 120, 97, 0, 121, 108, 0, 18, 96, 147,
185: 97, 0, 21, 96, 126, 97, 0, 22, 96, 4,
186: 97, 0, 22, 96, 3, 97, 0, 22, 3, 0,
187: 22, 4, 0, 22, 92, 4, 93, 0, 0, 126,
188: 91, 4, 0, 4, 0, 126, 91, 3, 0, 3,
189: 0, 3, 0, 4, 0, 5, 0, 6, 0, 13,
190: 0, 96, 147, 97, 0, 129, 0, 107, 0, 123,
191: 0, 124, 0, 125, 0, 148, 0, 149, 0, 146,
192: 0, 141, 0, 3, 96, 0, 128, 103, 97, 0,
193: 128, 97, 0, 130, 91, 3, 0, 3, 0, 20,
194: 3, 0, 20, 55, 3, 0, 96, 130, 97, 94,
195: 0, 96, 97, 94, 0, 137, 140, 101, 95, 0,
196: 140, 101, 95, 0, 131, 133, 134, 0, 156, 133,
197: 134, 0, 132, 133, 134, 0, 19, 0, 136, 130,
198: 89, 0, 138, 91, 3, 0, 3, 0, 36, 0,
199: 139, 138, 89, 0, 0, 142, 0, 144, 143, 93,
200: 0, 147, 91, 143, 0, 147, 0, 3, 92, 0,
201: 3, 0, 145, 59, 147, 0, 142, 59, 147, 0,
202: 13, 59, 147, 0, 127, 0, 158, 0, 82, 147,
203: 0, 85, 147, 0, 77, 147, 0, 147, 76, 147,
204: 0, 147, 77, 147, 0, 147, 78, 147, 0, 147,
205: 79, 147, 0, 147, 80, 147, 0, 147, 86, 147,
206: 0, 147, 67, 147, 0, 147, 66, 147, 0, 147,
207: 68, 147, 0, 147, 70, 147, 0, 147, 71, 147,
208: 0, 147, 72, 147, 0, 147, 74, 147, 0, 147,
209: 73, 147, 0, 147, 75, 147, 0, 147, 65, 147,
210: 0, 147, 64, 147, 0, 147, 69, 147, 0, 147,
211: 60, 147, 0, 145, 83, 0, 145, 84, 0, 147,
212: 88, 147, 0, 147, 87, 150, 0, 147, 87, 3,
213: 0, 157, 87, 150, 0, 6, 87, 6, 0, 147,
214: 63, 147, 0, 147, 62, 147, 0, 147, 61, 147,
215: 0, 15, 0, 16, 0, 23, 96, 147, 97, 0,
216: 24, 96, 107, 97, 0, 151, 103, 97, 0, 151,
217: 97, 0, 3, 96, 0, 153, 154, 99, 95, 0,
218: 153, 99, 95, 0, 7, 3, 11, 3, 94, 0,
219: 19, 155, 89, 0, 155, 91, 3, 0, 3, 0,
220: 20, 9, 3, 0, 8, 0, 14, 96, 147, 97,
221: 0, 14, 96, 97, 0
222: };
223:
224: #endif
225:
226: #if YYDEBUG != 0
227: static const short yyrline[] = { 0,
228: 42, 46, 48, 52, 54, 55, 56, 57, 58, 59,
229: 60, 61, 62, 63, 67, 69, 73, 75, 76, 77,
230: 78, 79, 80, 81, 85, 86, 90, 92, 95, 98,
231: 102, 103, 107, 108, 112, 115, 116, 119, 121, 122,
232: 127, 128, 131, 132, 135, 139, 141, 145, 150, 154,
233: 163, 168, 172, 173, 177, 182, 185, 189, 191, 192,
234: 193, 194, 196, 197, 198, 199, 200, 204, 212, 213,
235: 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
236: 224, 225, 229, 238, 241, 246, 247, 251, 260, 269,
237: 272, 278, 281, 286, 290, 294, 301, 305, 310, 312,
238: 316, 320, 322, 325, 328, 331, 333, 335, 348, 351,
239: 360, 361, 365, 366, 367, 368, 369, 370, 371, 372,
240: 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
241: 383, 384, 385, 386, 387, 388, 389, 393, 397, 398,
242: 399, 400, 401, 406, 407, 408, 409, 416, 424, 435,
243: 443, 446, 451, 457, 463, 473, 491, 497, 501, 507,
244: 517, 521, 530
245: };
246: #endif
247:
248:
249: #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
250:
251: static const char * const yytname[] = { "$","error","$undefined.","ID","QUOTE",
252: "SINGLEQUOTE","NUMBER","CLASS","SUPER","OPERATOR","FINAL","EXTENDS","INCETANCEVARIABLE",
253: "THIS","NEW","SIZEOFTHISCLASS","STARTOFTHISCLASS","MODULE","PRINT","LOCAL","DEF",
254: "SM1","LOAD","TEST","SPECIAL","AUTO","BREAK","CASE","CHAR","CONST","CONTINUE",
255: "DEFAULT","DO","DOUBLE","ELSE","ENUM","EXTERN","FLOAT","FOR","GOTO","IF","INT",
256: "LONG","REGISTER","RETURN","SHORT","SIGNED","SIZEOF","STATIC","STRUCT","SWITCH",
257: "TYPEDEF","UNION","UNSIGNED","VOLATILE","VOID","WHILE","PSFOR","PROMPT","'='",
258: "PUT","MULTPUT","NEGATEPUT","RESIDUEPUT","OR","AND","'|'","'&'","EQUAL","NOTEQUAL",
259: "'<'","'>'","LESSEQUAL","GREATEREQUAL","LEFTSHIFT","RIGHTSHIFT","'+'","'-'",
260: "'*'","'/'","'%'","UNARYMINUS","'!'","INCREMENT","DECREMENT","'~'","'^'","'.'",
261: "MEMBER","';'","':'","','","'['","']'","'{'","'}'","'('","')'","program","globalstatements",
262: "sentence","statements","localsentence","argList","return","break","list_prefix",
263: "list","curryBrace","if_prefix","if_body","if","for_prefix0","for_exit","for_inc",
264: "for_prefix","for","PSfor_prefix","@1","PSfor","while_prefix0","while_prefix",
265: "while","print","sm1","load","sm1ArgList","primitive","functionCall_prefix",
266: "functionCall","idList","functionHead","voidfunctionHead","functionArg","functionBody",
267: "functionDefinition","declaration_prefix","declaration","extern_idList","extern_declaration_prefix",
268: "extern_declaration","arrayValue","array","arrayIndex","array_prefix","id_set",
269: "set","exp","test","special","member_functionCall","member_functionCall_prefix",
270: "class_definition","class_definition_prefix","incetance_variables","incetance_variables_list",
271: "operatorfunctionHead","super","new", NULL
272: };
273: #endif
274:
275: static const short yyr1[] = { 0,
276: 98, 99, 99, 100, 100, 100, 100, 100, 100, 100,
277: 100, 100, 100, 100, 101, 101, 102, 102, 102, 102,
278: 102, 102, 102, 102, 103, 103, 104, 104, 105, 106,
279: 107, 107, 108, 108, 109, 110, 110, 111, 111, 111,
280: 112, 112, 113, 113, 114, 115, 115, 116, 118, 117,
281: 119, 120, 121, 121, 122, 123, 124, 125, 125, 125,
282: 125, 125, 126, 126, 126, 126, 126, 127, 127, 127,
283: 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
284: 127, 127, 128, 129, 129, 130, 130, 131, 132, 133,
285: 133, 134, 134, 135, 135, 135, 136, 137, 138, 138,
286: 139, 140, 140, 141, 142, 143, 143, 144, 145, 146,
287: 146, 146, 147, 147, 147, 147, 147, 147, 147, 147,
288: 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
289: 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
290: 147, 147, 147, 147, 147, 147, 147, 147, 148, 149,
291: 150, 150, 151, 152, 152, 153, 154, 155, 155, 156,
292: 157, 158, 158
293: };
294:
295: static const short yyr2[] = { 0,
296: 1, 2, 1, 1, 1, 1, 1, 1, 2, 2,
297: 1, 1, 2, 2, 2, 1, 1, 1, 1, 1,
298: 2, 2, 2, 1, 3, 1, 2, 1, 1, 1,
299: 2, 3, 2, 3, 4, 1, 1, 2, 4, 4,
300: 4, 3, 2, 1, 1, 4, 3, 2, 0, 14,
301: 2, 2, 3, 2, 2, 4, 4, 4, 4, 2,
302: 2, 4, 0, 3, 1, 3, 1, 1, 1, 1,
303: 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
304: 1, 1, 2, 3, 2, 3, 1, 2, 3, 4,
305: 3, 4, 3, 3, 3, 3, 1, 3, 3, 1,
306: 1, 3, 0, 1, 3, 3, 1, 2, 1, 3,
307: 3, 3, 1, 1, 2, 2, 2, 3, 3, 3,
308: 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
309: 3, 3, 3, 3, 3, 3, 2, 2, 3, 3,
310: 3, 3, 3, 3, 3, 3, 1, 1, 4, 4,
311: 3, 2, 2, 4, 3, 5, 3, 3, 1, 3,
312: 1, 4, 3
313: };
314:
315: static const short yydefact[] = { 0,
316: 0, 68, 69, 70, 71, 0, 161, 72, 0, 147,
317: 148, 0, 0, 0, 0, 0, 0, 0, 0, 0,
318: 0, 0, 0, 0, 0, 11, 30, 0, 1, 0,
319: 0, 75, 0, 7, 0, 0, 4, 0, 5, 0,
320: 0, 6, 76, 77, 78, 113, 0, 74, 0, 0,
321: 8, 82, 104, 0, 0, 81, 0, 79, 80, 12,
322: 0, 0, 0, 114, 13, 108, 83, 0, 0, 0,
323: 0, 0, 88, 0, 0, 63, 60, 61, 0, 0,
324: 0, 0, 0, 0, 52, 0, 14, 117, 115, 116,
325: 0, 2, 31, 0, 26, 29, 28, 24, 0, 36,
326: 0, 0, 37, 38, 20, 17, 18, 19, 0, 44,
327: 0, 0, 48, 51, 54, 0, 55, 85, 0, 0,
328: 103, 103, 0, 0, 107, 0, 137, 138, 0, 0,
329: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
330: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
331: 0, 0, 9, 10, 0, 0, 0, 103, 0, 143,
332: 0, 112, 163, 0, 0, 160, 89, 67, 65, 0,
333: 0, 0, 0, 0, 0, 42, 0, 0, 0, 73,
334: 32, 0, 27, 33, 0, 16, 22, 23, 0, 21,
335: 47, 0, 45, 43, 53, 84, 87, 0, 0, 97,
336: 101, 94, 0, 103, 0, 0, 96, 111, 105, 0,
337: 110, 136, 146, 145, 144, 134, 133, 125, 124, 126,
338: 135, 127, 128, 129, 131, 130, 132, 118, 119, 120,
339: 121, 122, 123, 141, 140, 0, 139, 159, 0, 155,
340: 0, 95, 0, 142, 0, 162, 56, 0, 57, 62,
341: 59, 58, 149, 150, 41, 35, 0, 25, 34, 15,
342: 39, 40, 46, 91, 0, 0, 0, 0, 100, 0,
343: 0, 106, 153, 152, 0, 157, 0, 154, 156, 66,
344: 64, 0, 86, 90, 98, 0, 102, 0, 93, 151,
345: 158, 49, 92, 99, 0, 0, 0, 0, 0, 0,
346: 0, 50, 0, 0, 0
347: };
348:
349: static const short yydefgoto[] = { 303,
350: 29, 30, 185, 186, 94, 101, 102, 31, 32, 103,
351: 33, 104, 105, 35, 111, 192, 36, 106, 38, 295,
352: 107, 40, 41, 108, 43, 44, 45, 170, 46, 47,
353: 48, 199, 49, 50, 121, 202, 51, 203, 204, 270,
354: 205, 206, 52, 53, 124, 54, 55, 56, 109, 58,
355: 59, 235, 236, 60, 61, 157, 239, 62, 63, 64
356: };
357:
358: static const short yypact[] = { 313,
359: -70, -41,-32768,-32768, -58, 36,-32768, -6, -46,-32768,
360: -32768, -8, 35, 7, 9, 8, 19, 23, 28, 29,
361: 31, -20, 848, 848, 848,-32768,-32768, 848,-32768, 171,
362: 217,-32768, 569,-32768, 754, 60,-32768, 60,-32768, 370,
363: 60,-32768,-32768,-32768,-32768,-32768, 407,-32768, 32, 32,
364: -32768,-32768, 37, 848, -38,-32768, 1139,-32768,-32768,-32768,
365: 267, 32, 13,-32768,-32768,-32768,-32768, 88, 91, 848,
366: 435, 848,-32768, 152, 153, 45,-32768,-32768, 154, 56,
367: 848, 73, 803, 848,-32768, 163,-32768, 34, 5, 5,
368: 840,-32768,-32768, 74, 1075,-32768, 848,-32768, 615,-32768,
369: 79, 80,-32768, 136,-32768,-32768,-32768,-32768, 1170,-32768,
370: 472, 1200,-32768,-32768,-32768, 885,-32768,-32768, 76, -2,
371: 1, 1, 848, 87, 1107, 848,-32768,-32768, 848, 848,
372: 848, 848, 848, 848, 848, 848, 848, 848, 848, 848,
373: 848, 848, 848, 848, 848, 848, 848, 848, 848, 848,
374: 178, 848,-32768,-32768, 180, 93, 313, 1, 187,-32768,
375: 193, 1320,-32768, 923, 961,-32768,-32768,-32768,-32768, -39,
376: 104, 101, 102, 999, 103,-32768, 1230, 1037, 142,-32768,
377: -32768, 848, 1320,-32768, 107, 709,-32768,-32768, 569,-32768,
378: -32768, 106, 1320,-32768,-32768,-32768,-32768, 110, -35,-32768,
379: -32768,-32768, 203, 172, 204, 709,-32768, 1320,-32768, 848,
380: 1320, 1320, 1320, 1320, 1320, 608, 1343, 1365, 1386, 1405,
381: 1405, -1, -1, -1, -1, 30, 30, 34, 34, 5,
382: 5, 5, 5, 116,-32768, 520,-32768,-32768, -74,-32768,
383: 118,-32768, 116,-32768, 120,-32768,-32768, 95,-32768,-32768,
384: -32768,-32768,-32768,-32768,-32768,-32768, 848,-32768,-32768,-32768,
385: -32768,-32768,-32768,-32768, 212, 122, -23, 709,-32768, -9,
386: 123,-32768,-32768,-32768, 127,-32768, 214,-32768,-32768,-32768,
387: -32768, 1260,-32768,-32768,-32768, 124,-32768, 223,-32768,-32768,
388: -32768,-32768,-32768,-32768, 231, 167, 848, 1290, 239, 160,
389: 147,-32768, 245, 246,-32768
390: };
391:
392: static const short yypgoto[] = {-32768,
393: -4,-32768, -179, -25, -31,-32768,-32768,-32768, 165, -27,
394: -32768,-32768, 2,-32768,-32768,-32768,-32768, 3,-32768,-32768,
395: 4,-32768,-32768, 6,-32768,-32768,-32768,-32768,-32768,-32768,
396: -32768, 46,-32768,-32768, -40, -117,-32768,-32768,-32768,-32768,
397: -32768, 47,-32768,-32768, 40,-32768,-32768,-32768, 0,-32768,
398: -32768, 96,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768
399: };
400:
401:
402: #define YYLAST 1493
403:
404:
405: static const short yytable[] = { 57,
406: 197, 34, 37, 39, 207, 42, 260, 100, 113, 122,
407: 114, 77, 78, 117, 276, 119, 277, -109, 65, 200,
408: 126, 158, 88, 89, 90, 92, 271, 91, 68, 57,
409: 95, 34, 37, 39, 112, 42, 201, 73, 69, 116,
410: 242, -109, -109, 74, 127, 128, 95, 168, 169, 71,
411: 66, 248, 70, 125, 67, 265, 156, 249, 172, 173,
412: 57, 266, 34, 37, 39, 285, 42, 265, 87, 162,
413: 164, 165, 143, 144, 145, 146, 147, 148, 149, 287,
414: 174, 288, 177, 178, 150, 151, 152, 72, 286, 75,
415: 150, 151, 152, 160, 198, 123, 183, 280, 281, 159,
416: 79, 161, 76, 81, 80, 145, 146, 147, 148, 149,
417: 193, 147, 148, 149, 82, 150, 151, 152, 83, 150,
418: 151, 152, 208, 84, 85, 211, 86, 120, 212, 213,
419: 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
420: 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
421: 258, 237, 241, 99, 166, 167, 57, 171, 34, 37,
422: 39, 262, 42, 261, 27, 179, 181, 187, 188, 189,
423: -3, 1, 196, 2, 3, 4, 5, 6, 7, 209,
424: 234, 95, 238, 8, 9, 10, 11, 240, 12, 243,
425: 13, 14, 15, 16, 17, 245, 250, 251, 252, 254,
426: 257, 259, 263, 264, 275, 197, 269, 201, 18, 125,
427: 19, 273, 278, 279, 283, 284, 291, 289, 293, 2,
428: 3, 4, 5, 290, 7, 294, 20, 21, 22, 8,
429: 9, 10, 11, 296, 12, 95, 297, 14, 15, 16,
430: 17, 300, 301, 302, 304, 305, 175, 23, 267, 272,
431: 268, 0, 24, 0, 244, 25, 282, 0, 0, 26,
432: 0, 0, 27, 0, 0, -3, 28, 1, 0, 2,
433: 3, 4, 5, 6, 7, 0, 0, 0, 0, 8,
434: 9, 10, 11, 0, 12, 155, 13, 14, 15, 16,
435: 17, 0, 0, 23, 0, 0, 298, 0, 24, 0,
436: 0, 25, 0, 0, 18, 0, 19, 0, 27, 93,
437: 0, 0, 28, 1, 0, 2, 3, 4, 5, 6,
438: 7, 0, 20, 21, 22, 8, 9, 10, 11, 0,
439: 12, 0, 13, 14, 15, 16, 17, 0, 0, 0,
440: 0, 0, 0, 23, 0, 0, 0, 0, 24, 0,
441: 18, 25, 19, 0, 0, 26, 0, 0, 27, 0,
442: 0, 0, 28, 0, 0, 0, 0, 0, 20, 21,
443: 22, 0, 2, 3, 4, 5, 0, 7, 0, 0,
444: 0, 0, 8, 9, 10, 11, 0, 12, 0, 23,
445: 14, 15, 16, 17, 24, 0, 0, 25, 0, 0,
446: 0, 26, 0, 0, 27, 0, 0, 0, 28, 2,
447: 3, 4, 5, 0, 7, 0, 0, 0, 0, 8,
448: 9, 10, 11, 0, 12, 0, 0, 14, 15, 16,
449: 17, 0, 0, 0, 0, 0, 0, 2, 3, 4,
450: 5, 0, 7, 0, 0, 0, 23, 8, 9, 10,
451: 11, 24, 12, 0, 25, 14, 15, 16, 17, 0,
452: 0, 27, 0, 0, 0, 28, 115, 0, 0, 0,
453: 0, 0, 0, 0, 2, 3, 4, 5, 0, 7,
454: 0, 0, 0, 23, 8, 9, 10, 11, 24, 12,
455: 0, 25, 14, 15, 16, 17, 0, 0, 27, 0,
456: 0, 0, 28, 118, 0, 0, 0, 0, 0, 0,
457: 0, 23, 0, 0, 0, 0, 24, 0, 0, 25,
458: 0, 0, 2, 3, 4, 5, 27, 7, 0, 0,
459: 28, 163, 8, 9, 10, 11, 0, 12, 0, 0,
460: 14, 15, 16, 17, 0, 0, 0, 0, 23, 0,
461: 0, 0, 0, 24, 0, 0, 25, 0, 0, 0,
462: 0, 0, 0, 27, 0, 0, 0, 28, 191, 0,
463: 0, 2, 3, 4, 5, 0, 7, 0, 0, 0,
464: 0, 8, 9, 10, 11, 0, 12, 0, 0, 14,
465: 15, 16, 17, 0, 96, 0, 23, 0, 0, 0,
466: 0, 24, 0, 0, 25, 0, 18, 0, 19, 0,
467: 0, 27, 97, 0, 0, 28, 274, 2, 3, 4,
468: 5, 0, 7, 0, 20, 21, 0, 8, 9, 10,
469: 11, 0, 12, 0, 0, 14, 15, 16, 17, 0,
470: 96, 0, 0, 0, 0, 23, 0, 0, 0, 0,
471: 24, 0, 18, 25, 19, 0, 0, 98, 97, 0,
472: 27, 0, 99, 0, 28, 0, 0, 0, 0, 0,
473: 20, 21, 134, 135, 136, 137, 138, 139, 140, 141,
474: 142, 143, 144, 145, 146, 147, 148, 149, 0, 0,
475: 0, 23, 0, 150, 151, 152, 24, 0, 0, 25,
476: 0, 0, 0, 98, 0, 0, 27, 0, 0, 184,
477: 28, 2, 3, 4, 5, 0, 7, 0, 0, 0,
478: 0, 8, 9, 10, 11, 0, 12, 0, 0, 14,
479: 15, 16, 17, 0, 96, 0, 0, 0, 0, 0,
480: 0, 0, 0, 0, 0, 0, 18, 0, 19, 0,
481: 0, 0, 97, 0, 0, 0, 2, 3, 4, 5,
482: 0, 7, 0, 0, 20, 21, 8, 9, 10, 11,
483: 0, 12, 0, 0, 14, 15, 16, 17, 0, 0,
484: 0, 0, 0, 0, 0, 23, 0, 0, 0, 0,
485: 24, 0, 0, 25, 0, 0, 0, 98, 0, 0,
486: 27, 0, 0, 0, 28, 2, 3, 4, 5, 0,
487: 7, 0, 0, 0, 0, 8, 9, 10, 11, 0,
488: 12, 0, 0, 14, 15, 16, 17, 0, 0, 0,
489: 23, 0, 0, 0, 0, 24, 0, 0, 25, 0,
490: 0, 0, 110, 0, 0, 27, 0, 0, 0, 28,
491: 2, 3, 4, 5, 0, 7, 0, 0, 0, 0,
492: 8, 9, 10, 11, 0, 12, 0, 0, 14, 15,
493: 16, 17, 0, 0, 0, 0, 0, 0, 0, 23,
494: 0, 0, 0, 0, 24, 0, 0, 25, 0, 0,
495: 0, 176, 0, 0, 27, 0, 0, 0, 28, 129,
496: 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
497: 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
498: 0, 0, 0, 0, 23, 150, 151, 152, 0, 24,
499: 0, 0, 25, 0, 0, 0, 180, 0, 0, 27,
500: 0, 0, 0, 28, 129, 130, 131, 132, 133, 134,
501: 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
502: 145, 146, 147, 148, 149, 0, 0, 0, 0, 0,
503: 150, 151, 152, 0, 0, 0, 0, 0, 0, 0,
504: 0, 195, 129, 130, 131, 132, 133, 134, 135, 136,
505: 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
506: 147, 148, 149, 0, 0, 0, 0, 0, 150, 151,
507: 152, 0, 0, 0, 0, 0, 0, 0, 0, 246,
508: 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
509: 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
510: 149, 0, 0, 0, 0, 0, 150, 151, 152, 0,
511: 0, 0, 0, 0, 0, 0, 0, 247, 129, 130,
512: 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
513: 141, 142, 143, 144, 145, 146, 147, 148, 149, 0,
514: 0, 0, 0, 0, 150, 151, 152, 0, 0, 0,
515: 0, 0, 0, 0, 0, 253, 129, 130, 131, 132,
516: 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
517: 143, 144, 145, 146, 147, 148, 149, 0, 0, 0,
518: 0, 0, 150, 151, 152, 0, 0, 0, 0, 0,
519: 0, 0, 0, 256, 129, 130, 131, 132, 133, 134,
520: 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
521: 145, 146, 147, 148, 149, 0, 0, 0, 0, 0,
522: 150, 151, 152, 0, 0, 182, 129, 130, 131, 132,
523: 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
524: 143, 144, 145, 146, 147, 148, 149, 0, 0, 0,
525: 0, 0, 150, 151, 152, 0, 0, 210, 129, 130,
526: 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
527: 141, 142, 143, 144, 145, 146, 147, 148, 149, 0,
528: 0, 0, 0, 0, 150, 151, 152, 153, 154, 129,
529: 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
530: 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
531: 0, 0, 0, 0, 0, 150, 151, 152, 190, 129,
532: 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
533: 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
534: 0, 0, 0, 0, 0, 150, 151, 152, 194, 129,
535: 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
536: 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
537: 0, 0, 0, 0, 0, 150, 151, 152, 255, 129,
538: 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
539: 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
540: 0, 0, 0, 0, 0, 150, 151, 152, 292, 129,
541: 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
542: 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
543: 0, 0, 0, 0, 0, 150, 151, 152, 299, 129,
544: 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
545: 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
546: 0, 0, 0, 0, 0, 150, 151, 152, 135, 136,
547: 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
548: 147, 148, 149, 0, 0, 0, 0, 0, 150, 151,
549: 152, 136, 137, 138, 139, 140, 141, 142, 143, 144,
550: 145, 146, 147, 148, 149, 0, 0, 0, 0, 0,
551: 150, 151, 152, 137, 138, 139, 140, 141, 142, 143,
552: 144, 145, 146, 147, 148, 149, 0, 0, 0, 0,
553: 0, 150, 151, 152, 139, 140, 141, 142, 143, 144,
554: 145, 146, 147, 148, 149, 0, 0, 0, 0, 0,
555: 150, 151, 152
556: };
557:
558: static const short yycheck[] = { 0,
559: 3, 0, 0, 0, 122, 0, 186, 33, 36, 50,
560: 38, 3, 4, 41, 89, 47, 91, 59, 89, 19,
561: 59, 62, 23, 24, 25, 30, 206, 28, 87, 30,
562: 31, 30, 30, 30, 35, 30, 36, 3, 3, 40,
563: 158, 83, 84, 9, 83, 84, 47, 3, 4, 96,
564: 92, 91, 59, 54, 96, 91, 61, 97, 3, 4,
565: 61, 97, 61, 61, 61, 89, 61, 91, 89, 70,
566: 71, 72, 74, 75, 76, 77, 78, 79, 80, 89,
567: 81, 91, 83, 84, 86, 87, 88, 96, 268, 55,
568: 86, 87, 88, 6, 97, 59, 97, 3, 4, 87,
569: 92, 11, 96, 96, 96, 76, 77, 78, 79, 80,
570: 111, 78, 79, 80, 96, 86, 87, 88, 96, 86,
571: 87, 88, 123, 96, 96, 126, 96, 96, 129, 130,
572: 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
573: 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
574: 182, 152, 157, 94, 3, 3, 157, 4, 157, 157,
575: 157, 189, 157, 189, 92, 3, 93, 89, 89, 34,
576: 0, 1, 97, 3, 4, 5, 6, 7, 8, 93,
577: 3, 182, 3, 13, 14, 15, 16, 95, 18, 3,
578: 20, 21, 22, 23, 24, 3, 93, 97, 97, 97,
579: 59, 95, 97, 94, 236, 3, 3, 36, 38, 210,
580: 40, 96, 95, 94, 3, 94, 3, 95, 95, 3,
581: 4, 5, 6, 97, 8, 3, 56, 57, 58, 13,
582: 14, 15, 16, 3, 18, 236, 70, 21, 22, 23,
583: 24, 3, 83, 97, 0, 0, 82, 77, 203, 210,
584: 204, -1, 82, -1, 159, 85, 257, -1, -1, 89,
585: -1, -1, 92, -1, -1, 95, 96, 1, -1, 3,
586: 4, 5, 6, 7, 8, -1, -1, -1, -1, 13,
587: 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
588: 24, -1, -1, 77, -1, -1, 297, -1, 82, -1,
589: -1, 85, -1, -1, 38, -1, 40, -1, 92, 93,
590: -1, -1, 96, 1, -1, 3, 4, 5, 6, 7,
591: 8, -1, 56, 57, 58, 13, 14, 15, 16, -1,
592: 18, -1, 20, 21, 22, 23, 24, -1, -1, -1,
593: -1, -1, -1, 77, -1, -1, -1, -1, 82, -1,
594: 38, 85, 40, -1, -1, 89, -1, -1, 92, -1,
595: -1, -1, 96, -1, -1, -1, -1, -1, 56, 57,
596: 58, -1, 3, 4, 5, 6, -1, 8, -1, -1,
597: -1, -1, 13, 14, 15, 16, -1, 18, -1, 77,
598: 21, 22, 23, 24, 82, -1, -1, 85, -1, -1,
599: -1, 89, -1, -1, 92, -1, -1, -1, 96, 3,
600: 4, 5, 6, -1, 8, -1, -1, -1, -1, 13,
601: 14, 15, 16, -1, 18, -1, -1, 21, 22, 23,
602: 24, -1, -1, -1, -1, -1, -1, 3, 4, 5,
603: 6, -1, 8, -1, -1, -1, 77, 13, 14, 15,
604: 16, 82, 18, -1, 85, 21, 22, 23, 24, -1,
605: -1, 92, -1, -1, -1, 96, 97, -1, -1, -1,
606: -1, -1, -1, -1, 3, 4, 5, 6, -1, 8,
607: -1, -1, -1, 77, 13, 14, 15, 16, 82, 18,
608: -1, 85, 21, 22, 23, 24, -1, -1, 92, -1,
609: -1, -1, 96, 97, -1, -1, -1, -1, -1, -1,
610: -1, 77, -1, -1, -1, -1, 82, -1, -1, 85,
611: -1, -1, 3, 4, 5, 6, 92, 8, -1, -1,
612: 96, 97, 13, 14, 15, 16, -1, 18, -1, -1,
613: 21, 22, 23, 24, -1, -1, -1, -1, 77, -1,
614: -1, -1, -1, 82, -1, -1, 85, -1, -1, -1,
615: -1, -1, -1, 92, -1, -1, -1, 96, 97, -1,
616: -1, 3, 4, 5, 6, -1, 8, -1, -1, -1,
617: -1, 13, 14, 15, 16, -1, 18, -1, -1, 21,
618: 22, 23, 24, -1, 26, -1, 77, -1, -1, -1,
619: -1, 82, -1, -1, 85, -1, 38, -1, 40, -1,
620: -1, 92, 44, -1, -1, 96, 97, 3, 4, 5,
621: 6, -1, 8, -1, 56, 57, -1, 13, 14, 15,
622: 16, -1, 18, -1, -1, 21, 22, 23, 24, -1,
623: 26, -1, -1, -1, -1, 77, -1, -1, -1, -1,
624: 82, -1, 38, 85, 40, -1, -1, 89, 44, -1,
625: 92, -1, 94, -1, 96, -1, -1, -1, -1, -1,
626: 56, 57, 65, 66, 67, 68, 69, 70, 71, 72,
627: 73, 74, 75, 76, 77, 78, 79, 80, -1, -1,
628: -1, 77, -1, 86, 87, 88, 82, -1, -1, 85,
629: -1, -1, -1, 89, -1, -1, 92, -1, -1, 95,
630: 96, 3, 4, 5, 6, -1, 8, -1, -1, -1,
631: -1, 13, 14, 15, 16, -1, 18, -1, -1, 21,
632: 22, 23, 24, -1, 26, -1, -1, -1, -1, -1,
633: -1, -1, -1, -1, -1, -1, 38, -1, 40, -1,
634: -1, -1, 44, -1, -1, -1, 3, 4, 5, 6,
635: -1, 8, -1, -1, 56, 57, 13, 14, 15, 16,
636: -1, 18, -1, -1, 21, 22, 23, 24, -1, -1,
637: -1, -1, -1, -1, -1, 77, -1, -1, -1, -1,
638: 82, -1, -1, 85, -1, -1, -1, 89, -1, -1,
639: 92, -1, -1, -1, 96, 3, 4, 5, 6, -1,
640: 8, -1, -1, -1, -1, 13, 14, 15, 16, -1,
641: 18, -1, -1, 21, 22, 23, 24, -1, -1, -1,
642: 77, -1, -1, -1, -1, 82, -1, -1, 85, -1,
643: -1, -1, 89, -1, -1, 92, -1, -1, -1, 96,
644: 3, 4, 5, 6, -1, 8, -1, -1, -1, -1,
645: 13, 14, 15, 16, -1, 18, -1, -1, 21, 22,
646: 23, 24, -1, -1, -1, -1, -1, -1, -1, 77,
647: -1, -1, -1, -1, 82, -1, -1, 85, -1, -1,
648: -1, 89, -1, -1, 92, -1, -1, -1, 96, 60,
649: 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
650: 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
651: -1, -1, -1, -1, 77, 86, 87, 88, -1, 82,
652: -1, -1, 85, -1, -1, -1, 97, -1, -1, 92,
653: -1, -1, -1, 96, 60, 61, 62, 63, 64, 65,
654: 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
655: 76, 77, 78, 79, 80, -1, -1, -1, -1, -1,
656: 86, 87, 88, -1, -1, -1, -1, -1, -1, -1,
657: -1, 97, 60, 61, 62, 63, 64, 65, 66, 67,
658: 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
659: 78, 79, 80, -1, -1, -1, -1, -1, 86, 87,
660: 88, -1, -1, -1, -1, -1, -1, -1, -1, 97,
661: 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
662: 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
663: 80, -1, -1, -1, -1, -1, 86, 87, 88, -1,
664: -1, -1, -1, -1, -1, -1, -1, 97, 60, 61,
665: 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
666: 72, 73, 74, 75, 76, 77, 78, 79, 80, -1,
667: -1, -1, -1, -1, 86, 87, 88, -1, -1, -1,
668: -1, -1, -1, -1, -1, 97, 60, 61, 62, 63,
669: 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
670: 74, 75, 76, 77, 78, 79, 80, -1, -1, -1,
671: -1, -1, 86, 87, 88, -1, -1, -1, -1, -1,
672: -1, -1, -1, 97, 60, 61, 62, 63, 64, 65,
673: 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
674: 76, 77, 78, 79, 80, -1, -1, -1, -1, -1,
675: 86, 87, 88, -1, -1, 91, 60, 61, 62, 63,
676: 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
677: 74, 75, 76, 77, 78, 79, 80, -1, -1, -1,
678: -1, -1, 86, 87, 88, -1, -1, 91, 60, 61,
679: 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
680: 72, 73, 74, 75, 76, 77, 78, 79, 80, -1,
681: -1, -1, -1, -1, 86, 87, 88, 89, 90, 60,
682: 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
683: 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
684: -1, -1, -1, -1, -1, 86, 87, 88, 89, 60,
685: 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
686: 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
687: -1, -1, -1, -1, -1, 86, 87, 88, 89, 60,
688: 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
689: 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
690: -1, -1, -1, -1, -1, 86, 87, 88, 89, 60,
691: 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
692: 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
693: -1, -1, -1, -1, -1, 86, 87, 88, 89, 60,
694: 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
695: 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
696: -1, -1, -1, -1, -1, 86, 87, 88, 89, 60,
697: 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
698: 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
699: -1, -1, -1, -1, -1, 86, 87, 88, 66, 67,
700: 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
701: 78, 79, 80, -1, -1, -1, -1, -1, 86, 87,
702: 88, 67, 68, 69, 70, 71, 72, 73, 74, 75,
703: 76, 77, 78, 79, 80, -1, -1, -1, -1, -1,
704: 86, 87, 88, 68, 69, 70, 71, 72, 73, 74,
705: 75, 76, 77, 78, 79, 80, -1, -1, -1, -1,
706: -1, 86, 87, 88, 70, 71, 72, 73, 74, 75,
707: 76, 77, 78, 79, 80, -1, -1, -1, -1, -1,
708: 86, 87, 88
709: };
710: /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1.2 ! takayama 711: #line 3 "/usr/share/misc/bison.simple"
! 712: /* This file comes from bison-1.28. */
1.1 maekawa 713:
714: /* Skeleton output parser for bison,
715: Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
716:
717: This program is free software; you can redistribute it and/or modify
718: it under the terms of the GNU General Public License as published by
719: the Free Software Foundation; either version 2, or (at your option)
720: any later version.
721:
722: This program is distributed in the hope that it will be useful,
723: but WITHOUT ANY WARRANTY; without even the implied warranty of
724: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
725: GNU General Public License for more details.
726:
727: You should have received a copy of the GNU General Public License
728: along with this program; if not, write to the Free Software
1.2 ! takayama 729: Foundation, Inc., 59 Temple Place - Suite 330,
! 730: Boston, MA 02111-1307, USA. */
1.1 maekawa 731:
732: /* As a special exception, when this file is copied by Bison into a
733: Bison output file, you may use that output file without restriction.
734: This special exception was added by the Free Software Foundation
735: in version 1.24 of Bison. */
736:
1.2 ! takayama 737: /* This is the parser code that is written into each bison parser
! 738: when the %semantic_parser declaration is not specified in the grammar.
! 739: It was written by Richard Stallman by simplifying the hairy parser
! 740: used when %semantic_parser is specified. */
! 741:
! 742: #ifndef YYSTACK_USE_ALLOCA
! 743: #ifdef alloca
! 744: #define YYSTACK_USE_ALLOCA
! 745: #else /* alloca not defined */
1.1 maekawa 746: #ifdef __GNUC__
1.2 ! takayama 747: #define YYSTACK_USE_ALLOCA
1.1 maekawa 748: #define alloca __builtin_alloca
749: #else /* not GNU C. */
1.2 ! takayama 750: #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
! 751: #define YYSTACK_USE_ALLOCA
1.1 maekawa 752: #include <alloca.h>
753: #else /* not sparc */
1.2 ! takayama 754: /* We think this test detects Watcom and Microsoft C. */
! 755: /* This used to test MSDOS, but that is a bad idea
! 756: since that symbol is in the user namespace. */
! 757: #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
! 758: #if 0 /* No need for malloc.h, which pollutes the namespace;
! 759: instead, just don't use alloca. */
1.1 maekawa 760: #include <malloc.h>
1.2 ! takayama 761: #endif
1.1 maekawa 762: #else /* not MSDOS, or __TURBOC__ */
763: #if defined(_AIX)
1.2 ! takayama 764: /* I don't know what this was needed for, but it pollutes the namespace.
! 765: So I turned it off. rms, 2 May 1997. */
! 766: /* #include <malloc.h> */
1.1 maekawa 767: #pragma alloca
1.2 ! takayama 768: #define YYSTACK_USE_ALLOCA
! 769: #else /* not MSDOS, or __TURBOC__, or _AIX */
! 770: #if 0
! 771: #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
! 772: and on HPUX 10. Eventually we can turn this on. */
! 773: #define YYSTACK_USE_ALLOCA
! 774: #define alloca __builtin_alloca
1.1 maekawa 775: #endif /* __hpux */
1.2 ! takayama 776: #endif
1.1 maekawa 777: #endif /* not _AIX */
778: #endif /* not MSDOS, or __TURBOC__ */
1.2 ! takayama 779: #endif /* not sparc */
! 780: #endif /* not GNU C */
! 781: #endif /* alloca not defined */
! 782: #endif /* YYSTACK_USE_ALLOCA not defined */
1.1 maekawa 783:
1.2 ! takayama 784: #ifdef YYSTACK_USE_ALLOCA
! 785: #define YYSTACK_ALLOC alloca
! 786: #else
! 787: #define YYSTACK_ALLOC malloc
! 788: #endif
1.1 maekawa 789:
790: /* Note: there must be only one dollar sign in this file.
791: It is replaced by the list of actions, each action
792: as one case of the switch. */
793:
794: #define yyerrok (yyerrstatus = 0)
795: #define yyclearin (yychar = YYEMPTY)
796: #define YYEMPTY -2
797: #define YYEOF 0
1.2 ! takayama 798: #define YYACCEPT goto yyacceptlab
! 799: #define YYABORT goto yyabortlab
1.1 maekawa 800: #define YYERROR goto yyerrlab1
801: /* Like YYERROR except do call yyerror.
802: This remains here temporarily to ease the
803: transition to the new meaning of YYERROR, for GCC.
804: Once GCC version 2 has supplanted version 1, this can go. */
805: #define YYFAIL goto yyerrlab
806: #define YYRECOVERING() (!!yyerrstatus)
807: #define YYBACKUP(token, value) \
808: do \
809: if (yychar == YYEMPTY && yylen == 1) \
810: { yychar = (token), yylval = (value); \
811: yychar1 = YYTRANSLATE (yychar); \
812: YYPOPSTACK; \
813: goto yybackup; \
814: } \
815: else \
816: { yyerror ("syntax error: cannot back up"); YYERROR; } \
817: while (0)
818:
819: #define YYTERROR 1
820: #define YYERRCODE 256
821:
822: #ifndef YYPURE
823: #define YYLEX yylex()
824: #endif
825:
826: #ifdef YYPURE
827: #ifdef YYLSP_NEEDED
828: #ifdef YYLEX_PARAM
829: #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
830: #else
831: #define YYLEX yylex(&yylval, &yylloc)
832: #endif
833: #else /* not YYLSP_NEEDED */
834: #ifdef YYLEX_PARAM
835: #define YYLEX yylex(&yylval, YYLEX_PARAM)
836: #else
837: #define YYLEX yylex(&yylval)
838: #endif
839: #endif /* not YYLSP_NEEDED */
840: #endif
841:
842: /* If nonreentrant, generate the variables here */
843:
844: #ifndef YYPURE
845:
846: int yychar; /* the lookahead symbol */
847: YYSTYPE yylval; /* the semantic value of the */
848: /* lookahead symbol */
849:
850: #ifdef YYLSP_NEEDED
851: YYLTYPE yylloc; /* location data for the lookahead */
852: /* symbol */
853: #endif
854:
855: int yynerrs; /* number of parse errors so far */
856: #endif /* not YYPURE */
857:
858: #if YYDEBUG != 0
859: int yydebug; /* nonzero means print parse trace */
860: /* Since this is uninitialized, it does not stop multiple parsers
861: from coexisting. */
862: #endif
863:
864: /* YYINITDEPTH indicates the initial size of the parser's stacks */
865:
866: #ifndef YYINITDEPTH
867: #define YYINITDEPTH 200
868: #endif
869:
870: /* YYMAXDEPTH is the maximum size the stacks can grow to
871: (effective only if the built-in stack extension method is used). */
872:
873: #if YYMAXDEPTH == 0
874: #undef YYMAXDEPTH
875: #endif
876:
877: #ifndef YYMAXDEPTH
878: #define YYMAXDEPTH 10000
879: #endif
1.2 ! takayama 880:
! 881: /* Define __yy_memcpy. Note that the size argument
! 882: should be passed with type unsigned int, because that is what the non-GCC
! 883: definitions require. With GCC, __builtin_memcpy takes an arg
! 884: of type size_t, but it can handle unsigned int. */
1.1 maekawa 885:
886: #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
887: #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
888: #else /* not GNU C or C++ */
889: #ifndef __cplusplus
890:
891: /* This is the most reliable way to avoid incompatibilities
892: in available built-in functions on various systems. */
893: static void
894: __yy_memcpy (to, from, count)
895: char *to;
896: char *from;
1.2 ! takayama 897: unsigned int count;
1.1 maekawa 898: {
899: register char *f = from;
900: register char *t = to;
901: register int i = count;
902:
903: while (i-- > 0)
904: *t++ = *f++;
905: }
906:
907: #else /* __cplusplus */
908:
909: /* This is the most reliable way to avoid incompatibilities
910: in available built-in functions on various systems. */
911: static void
1.2 ! takayama 912: __yy_memcpy (char *to, char *from, unsigned int count)
1.1 maekawa 913: {
1.2 ! takayama 914: register char *t = to;
1.1 maekawa 915: register char *f = from;
916: register int i = count;
917:
918: while (i-- > 0)
919: *t++ = *f++;
920: }
921:
922: #endif
923: #endif
924:
1.2 ! takayama 925: #line 217 "/usr/share/misc/bison.simple"
1.1 maekawa 926:
927: /* The user can define YYPARSE_PARAM as the name of an argument to be passed
928: into yyparse. The argument should have type void *.
929: It should actually point to an object.
930: Grammar actions can access the variable by casting it
931: to the proper pointer type. */
932:
933: #ifdef YYPARSE_PARAM
934: #ifdef __cplusplus
935: #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
936: #define YYPARSE_PARAM_DECL
937: #else /* not __cplusplus */
938: #define YYPARSE_PARAM_ARG YYPARSE_PARAM
939: #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
940: #endif /* not __cplusplus */
941: #else /* not YYPARSE_PARAM */
942: #define YYPARSE_PARAM_ARG
943: #define YYPARSE_PARAM_DECL
944: #endif /* not YYPARSE_PARAM */
945:
1.2 ! takayama 946: /* Prevent warning if -Wstrict-prototypes. */
! 947: #ifdef __GNUC__
! 948: #ifdef YYPARSE_PARAM
! 949: int yyparse (void *);
! 950: #else
! 951: int yyparse (void);
! 952: #endif
! 953: #endif
! 954:
1.1 maekawa 955: int
956: yyparse(YYPARSE_PARAM_ARG)
957: YYPARSE_PARAM_DECL
958: {
959: register int yystate;
960: register int yyn;
961: register short *yyssp;
962: register YYSTYPE *yyvsp;
963: int yyerrstatus; /* number of tokens to shift before error messages enabled */
964: int yychar1 = 0; /* lookahead token as an internal (translated) token number */
965:
966: short yyssa[YYINITDEPTH]; /* the state stack */
967: YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
968:
969: short *yyss = yyssa; /* refer to the stacks thru separate pointers */
970: YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
971:
972: #ifdef YYLSP_NEEDED
973: YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
974: YYLTYPE *yyls = yylsa;
975: YYLTYPE *yylsp;
976:
977: #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
978: #else
979: #define YYPOPSTACK (yyvsp--, yyssp--)
980: #endif
981:
982: int yystacksize = YYINITDEPTH;
1.2 ! takayama 983: int yyfree_stacks = 0;
1.1 maekawa 984:
985: #ifdef YYPURE
986: int yychar;
987: YYSTYPE yylval;
988: int yynerrs;
989: #ifdef YYLSP_NEEDED
990: YYLTYPE yylloc;
991: #endif
992: #endif
993:
994: YYSTYPE yyval; /* the variable used to return */
995: /* semantic values from the action */
996: /* routines */
997:
998: int yylen;
999:
1000: #if YYDEBUG != 0
1001: if (yydebug)
1002: fprintf(stderr, "Starting parse\n");
1003: #endif
1004:
1005: yystate = 0;
1006: yyerrstatus = 0;
1007: yynerrs = 0;
1008: yychar = YYEMPTY; /* Cause a token to be read. */
1009:
1010: /* Initialize stack pointers.
1011: Waste one element of value and location stack
1012: so that they stay on the same level as the state stack.
1013: The wasted elements are never initialized. */
1014:
1015: yyssp = yyss - 1;
1016: yyvsp = yyvs;
1017: #ifdef YYLSP_NEEDED
1018: yylsp = yyls;
1019: #endif
1020:
1021: /* Push a new state, which is found in yystate . */
1022: /* In all cases, when you get here, the value and location stacks
1023: have just been pushed. so pushing a state here evens the stacks. */
1024: yynewstate:
1025:
1026: *++yyssp = yystate;
1027:
1028: if (yyssp >= yyss + yystacksize - 1)
1029: {
1030: /* Give user a chance to reallocate the stack */
1031: /* Use copies of these so that the &'s don't force the real ones into memory. */
1032: YYSTYPE *yyvs1 = yyvs;
1033: short *yyss1 = yyss;
1034: #ifdef YYLSP_NEEDED
1035: YYLTYPE *yyls1 = yyls;
1036: #endif
1037:
1038: /* Get the current used size of the three stacks, in elements. */
1039: int size = yyssp - yyss + 1;
1040:
1041: #ifdef yyoverflow
1042: /* Each stack pointer address is followed by the size of
1043: the data in use in that stack, in bytes. */
1044: #ifdef YYLSP_NEEDED
1045: /* This used to be a conditional around just the two extra args,
1046: but that might be undefined if yyoverflow is a macro. */
1047: yyoverflow("parser stack overflow",
1048: &yyss1, size * sizeof (*yyssp),
1049: &yyvs1, size * sizeof (*yyvsp),
1050: &yyls1, size * sizeof (*yylsp),
1051: &yystacksize);
1052: #else
1053: yyoverflow("parser stack overflow",
1054: &yyss1, size * sizeof (*yyssp),
1055: &yyvs1, size * sizeof (*yyvsp),
1056: &yystacksize);
1057: #endif
1058:
1059: yyss = yyss1; yyvs = yyvs1;
1060: #ifdef YYLSP_NEEDED
1061: yyls = yyls1;
1062: #endif
1063: #else /* no yyoverflow */
1064: /* Extend the stack our own way. */
1065: if (yystacksize >= YYMAXDEPTH)
1066: {
1067: yyerror("parser stack overflow");
1.2 ! takayama 1068: if (yyfree_stacks)
! 1069: {
! 1070: free (yyss);
! 1071: free (yyvs);
! 1072: #ifdef YYLSP_NEEDED
! 1073: free (yyls);
! 1074: #endif
! 1075: }
1.1 maekawa 1076: return 2;
1077: }
1078: yystacksize *= 2;
1079: if (yystacksize > YYMAXDEPTH)
1080: yystacksize = YYMAXDEPTH;
1.2 ! takayama 1081: #ifndef YYSTACK_USE_ALLOCA
! 1082: yyfree_stacks = 1;
! 1083: #endif
! 1084: yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
! 1085: __yy_memcpy ((char *)yyss, (char *)yyss1,
! 1086: size * (unsigned int) sizeof (*yyssp));
! 1087: yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
! 1088: __yy_memcpy ((char *)yyvs, (char *)yyvs1,
! 1089: size * (unsigned int) sizeof (*yyvsp));
1.1 maekawa 1090: #ifdef YYLSP_NEEDED
1.2 ! takayama 1091: yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
! 1092: __yy_memcpy ((char *)yyls, (char *)yyls1,
! 1093: size * (unsigned int) sizeof (*yylsp));
1.1 maekawa 1094: #endif
1095: #endif /* no yyoverflow */
1096:
1097: yyssp = yyss + size - 1;
1098: yyvsp = yyvs + size - 1;
1099: #ifdef YYLSP_NEEDED
1100: yylsp = yyls + size - 1;
1101: #endif
1102:
1103: #if YYDEBUG != 0
1104: if (yydebug)
1105: fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1106: #endif
1107:
1108: if (yyssp >= yyss + yystacksize - 1)
1109: YYABORT;
1110: }
1111:
1112: #if YYDEBUG != 0
1113: if (yydebug)
1114: fprintf(stderr, "Entering state %d\n", yystate);
1115: #endif
1116:
1117: goto yybackup;
1118: yybackup:
1119:
1120: /* Do appropriate processing given the current state. */
1121: /* Read a lookahead token if we need one and don't already have one. */
1122: /* yyresume: */
1123:
1124: /* First try to decide what to do without reference to lookahead token. */
1125:
1126: yyn = yypact[yystate];
1127: if (yyn == YYFLAG)
1128: goto yydefault;
1129:
1130: /* Not known => get a lookahead token if don't already have one. */
1131:
1132: /* yychar is either YYEMPTY or YYEOF
1133: or a valid token in external form. */
1134:
1135: if (yychar == YYEMPTY)
1136: {
1137: #if YYDEBUG != 0
1138: if (yydebug)
1139: fprintf(stderr, "Reading a token: ");
1140: #endif
1141: yychar = YYLEX;
1142: }
1143:
1144: /* Convert token to internal form (in yychar1) for indexing tables with */
1145:
1146: if (yychar <= 0) /* This means end of input. */
1147: {
1148: yychar1 = 0;
1149: yychar = YYEOF; /* Don't call YYLEX any more */
1150:
1151: #if YYDEBUG != 0
1152: if (yydebug)
1153: fprintf(stderr, "Now at end of input.\n");
1154: #endif
1155: }
1156: else
1157: {
1158: yychar1 = YYTRANSLATE(yychar);
1159:
1160: #if YYDEBUG != 0
1161: if (yydebug)
1162: {
1163: fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1164: /* Give the individual parser a way to print the precise meaning
1165: of a token, for further debugging info. */
1166: #ifdef YYPRINT
1167: YYPRINT (stderr, yychar, yylval);
1168: #endif
1169: fprintf (stderr, ")\n");
1170: }
1171: #endif
1172: }
1173:
1174: yyn += yychar1;
1175: if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1176: goto yydefault;
1177:
1178: yyn = yytable[yyn];
1179:
1180: /* yyn is what to do for this token type in this state.
1181: Negative => reduce, -yyn is rule number.
1182: Positive => shift, yyn is new state.
1183: New state is final state => don't bother to shift,
1184: just return success.
1185: 0, or most negative number => error. */
1186:
1187: if (yyn < 0)
1188: {
1189: if (yyn == YYFLAG)
1190: goto yyerrlab;
1191: yyn = -yyn;
1192: goto yyreduce;
1193: }
1194: else if (yyn == 0)
1195: goto yyerrlab;
1196:
1197: if (yyn == YYFINAL)
1198: YYACCEPT;
1199:
1200: /* Shift the lookahead token. */
1201:
1202: #if YYDEBUG != 0
1203: if (yydebug)
1204: fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1205: #endif
1206:
1207: /* Discard the token being shifted unless it is eof. */
1208: if (yychar != YYEOF)
1209: yychar = YYEMPTY;
1210:
1211: *++yyvsp = yylval;
1212: #ifdef YYLSP_NEEDED
1213: *++yylsp = yylloc;
1214: #endif
1215:
1216: /* count tokens shifted since error; after three, turn off error status. */
1217: if (yyerrstatus) yyerrstatus--;
1218:
1219: yystate = yyn;
1220: goto yynewstate;
1221:
1222: /* Do the default action for the current state. */
1223: yydefault:
1224:
1225: yyn = yydefact[yystate];
1226: if (yyn == 0)
1227: goto yyerrlab;
1228:
1229: /* Do a reduction. yyn is the number of a rule to reduce with. */
1230: yyreduce:
1231: yylen = yyr2[yyn];
1232: if (yylen > 0)
1233: yyval = yyvsp[1-yylen]; /* implement default value of the action */
1234:
1235: #if YYDEBUG != 0
1236: if (yydebug)
1237: {
1238: int i;
1239:
1240: fprintf (stderr, "Reducing via rule %d (line %d), ",
1241: yyn, yyrline[yyn]);
1242:
1243: /* Print the symbols being reduced, and their result. */
1244: for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1245: fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1246: fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1247: }
1248: #endif
1249:
1250:
1251: switch (yyn) {
1252:
1253: case 8:
1254: #line 57 "simple.y"
1255: {sendKan(0); ;
1256: break;}
1257: case 9:
1258: #line 58 "simple.y"
1259: {sendKan(0); ;
1260: break;}
1261: case 10:
1262: #line 59 "simple.y"
1263: {pkkan(" [ ] {showln} sendmsg2 \n"); sendKan(0); ;
1264: break;}
1265: case 11:
1266: #line 60 "simple.y"
1267: {sendKan(0); ;
1268: break;}
1269: case 12:
1270: #line 61 "simple.y"
1271: {sendKan(0); ;
1272: break;}
1273: case 14:
1274: #line 63 "simple.y"
1275: {sendKan(10); ;
1276: break;}
1277: case 27:
1278: #line 91 "simple.y"
1279: { pkkan(" /FunctionValue set {/ExitPoint goto} exec %%return\n");;
1280: break;}
1281: case 28:
1282: #line 92 "simple.y"
1283: {pkkan(" {/ExitPoint goto} exec %%return void\n");;
1284: break;}
1285: case 29:
1286: #line 95 "simple.y"
1287: { pkkan(" exit "); ;
1288: break;}
1289: case 30:
1290: #line 99 "simple.y"
1291: { pkkan("[ "); ;
1292: break;}
1293: case 31:
1294: #line 102 "simple.y"
1295: { pkkan(" ] "); ;
1296: break;}
1297: case 32:
1298: #line 103 "simple.y"
1299: { pkkan(" ] "); ;
1300: break;}
1301: case 35:
1302: #line 112 "simple.y"
1303: { pkkan(" %% if-condition\n { %%ifbody\n"); ;
1304: break;}
1305: case 36:
1306: #line 115 "simple.y"
1307: { pkkan(" }%%end if if body\n { %%if- else part\n"); ;
1308: break;}
1309: case 37:
1310: #line 116 "simple.y"
1311: { pkkan(" }%%end if if body\n { %%if- else part\n"); ;
1312: break;}
1313: case 38:
1314: #line 119 "simple.y"
1315: { pkkan(" } ifelse\n"); ;
1316: break;}
1317: case 39:
1318: #line 121 "simple.y"
1319: { pkkan(" } ifelse\n"); ;
1320: break;}
1321: case 40:
1322: #line 122 "simple.y"
1323: { pkkan(" } ifelse\n"); ;
1324: break;}
1325: case 41:
1326: #line 127 "simple.y"
1327: { pkkan("%%for init.\n%%for\n{ "); ;
1328: break;}
1329: case 42:
1330: #line 128 "simple.y"
1331: { pkkan("%%nothing for init.\n%%for\n{ "); ;
1332: break;}
1333: case 43:
1334: #line 131 "simple.y"
1335: { pkkan(" { } {exit} ifelse\n[ {%%increment\n"); ;
1336: break;}
1337: case 44:
1338: #line 132 "simple.y"
1339: { pkkan("%%no exit rule.\n[ {%%increment\n"); ;
1340: break;}
1341: case 45:
1342: #line 135 "simple.y"
1343: { pkkan("} %%end of increment{A}\n"); ;
1344: break;}
1345: case 46:
1346: #line 140 "simple.y"
1347: { pkkan("{%%start of B part{B}\n"); ;
1348: break;}
1349: case 47:
1350: #line 142 "simple.y"
1351: { pkkan(" } %% dummy A\n{%%start of B part{B}\n"); ;
1352: break;}
1353: case 48:
1354: #line 146 "simple.y"
1355: { pkkan("} %% end of B part. {B}\n");
1356: pkkan(" 2 1 roll] {exec} map pop\n} loop %%end of for\n"); ;
1357: break;}
1358: case 49:
1359: #line 151 "simple.y"
1360: { pkkan("%%PSfor initvalue.\n (integer) data_conversion \n");
1361: ips(yyvsp[-3]);
1362: ;
1363: break;}
1364: case 50:
1365: #line 155 "simple.y"
1366: { ips(yyvsp[-7]); ips(yyvsp[-4]);
1367: /* They must be equal id, but it is not checked. */
1368: pkkan(" (1).. sub (integer) data_conversion 1 2 -1 roll \n");
1369: pkkan("{ %% for body\n (universalNumber) data_conversion ");
1370: pkkan("/"); printObjectSymbol(yyvsp[-11]); pkkan(" set \n");
1371: ;
1372: break;}
1373: case 51:
1374: #line 164 "simple.y"
1375: { pkkan(" } for \n"); ;
1376: break;}
1377: case 52:
1378: #line 168 "simple.y"
1379: { pkkan("\n%%while\n{ "); ;
1380: break;}
1381: case 53:
1382: #line 172 "simple.y"
1383: { pkkan(" { } {exit} ifelse\n "); ;
1384: break;}
1385: case 54:
1386: #line 173 "simple.y"
1387: { pkkan("%%no exit condition.\n "); ;
1388: break;}
1389: case 55:
1390: #line 177 "simple.y"
1391: { pkkan("} loop\n"); ;
1392: break;}
1393: case 56:
1394: #line 182 "simple.y"
1395: { pkkan(" print\n");;
1396: break;}
1397: case 58:
1398: #line 190 "simple.y"
1399: { loadFile(yyvsp[-1]); ;
1400: break;}
1401: case 59:
1402: #line 191 "simple.y"
1403: { loadFile(yyvsp[-1]); ;
1404: break;}
1405: case 60:
1406: #line 192 "simple.y"
1407: { loadFile(yyvsp[0]); ;
1408: break;}
1409: case 61:
1410: #line 193 "simple.y"
1411: { loadFile(yyvsp[0]); ;
1412: break;}
1413: case 62:
1414: #line 194 "simple.y"
1415: { loadFileWithCpp(yyvsp[-1]); ;
1416: break;}
1417: case 64:
1418: #line 197 "simple.y"
1419: { pkkan(" "); printObjectSymbol(yyvsp[0]); pkkan(" "); ;
1420: break;}
1421: case 65:
1422: #line 198 "simple.y"
1423: { pkkan(" "); printObjectSymbol(yyvsp[0]); pkkan(" "); ;
1424: break;}
1425: case 66:
1426: #line 199 "simple.y"
1427: { pkkan(" "); printObjectSymbol(yyvsp[0]); pkkan(" "); ;
1428: break;}
1429: case 67:
1430: #line 200 "simple.y"
1431: { pkkan(" "); printObjectSymbol(yyvsp[0]); pkkan(" "); ;
1432: break;}
1433: case 68:
1434: #line 205 "simple.y"
1435: { int tmp0;
1436: if ((tmp0 = K00getIncetanceVariable(objectSymbolToString(yyvsp[0]))) != -1) {
1437: pkkan(" this "); pkkanInteger(tmp0); pkkan(" get ");
1438: } else {
1439: printObjectSymbol(yyvsp[0]); pkkan(" ");
1440: }
1441: ;
1442: break;}
1443: case 69:
1444: #line 212 "simple.y"
1445: { pkkan("("); printObjectSymbol(yyvsp[0]); pkkan(") "); ;
1446: break;}
1447: case 71:
1448: #line 214 "simple.y"
1449: { pkkan("("); printObjectSymbol(yyvsp[0]); pkkan(").. ");;
1450: break;}
1451: case 72:
1452: #line 215 "simple.y"
1453: { pkkan(" this "); ;
1454: break;}
1455: case 83:
1456: #line 230 "simple.y"
1457: { pkkan("this [ %% function args \n"); yyval = yyvsp[-1] ;
1458: break;}
1459: case 84:
1460: #line 240 "simple.y"
1461: {pkkan("] {");printObjectSymbol(yyvsp[-2]);pkkan("} sendmsg2 \n");;
1462: break;}
1463: case 85:
1464: #line 242 "simple.y"
1465: {pkkan("] {");printObjectSymbol(yyvsp[-1]);pkkan("} sendmsg2 \n");;
1466: break;}
1467: case 86:
1468: #line 246 "simple.y"
1469: { pkkan("/");printObjectSymbol(yyvsp[0]); pkkan(" "); ips(yyvsp[0]);;
1470: break;}
1471: case 87:
1472: #line 247 "simple.y"
1473: { pkkan("/");printObjectSymbol(yyvsp[0]); pkkan(" "); ips(yyvsp[0]);;
1474: break;}
1475: case 88:
1476: #line 252 "simple.y"
1477: { pkkan("/"); printObjectSymbol(yyvsp[0]); pkkan(" {\n"); ips(yyvsp[0]);
1478: pkdebug("In function : ", objectSymbolToString(yyvsp[0]),
1479: " of class ",K00getCurrentContextName());
1480: pkkan(" /Arglist set /Argthis set /FunctionValue [ ] def\n [/this ");
1481: yyval = yyvsp[0];;
1482: break;}
1483: case 89:
1484: #line 261 "simple.y"
1485: { pkkan("/"); printObjectSymbol(yyvsp[0]); pkkan(" {\n"); ips(yyvsp[0]);
1486: pkdebug("In function : ", objectSymbolToString(yyvsp[0]),
1487: " of class ",K00getCurrentContextName());
1488: pkkan(" /Arglist set /Argthis set /FunctionValue [ ] def\n [/this ");
1489: yyval = yyvsp[-1];;
1490: break;}
1491: case 90:
1492: #line 270 "simple.y"
1493: {pkkan(" ] /ArgNames set ArgNames pushVariables [ %%function body\n");
1494: pkkan(" [Argthis] Arglist join ArgNames mapset\n");;
1495: break;}
1496: case 91:
1497: #line 273 "simple.y"
1498: {pkkan(" ] /ArgNames set ArgNames pushVariables [ %%function body\n");
1499: pkkan(" [Argthis] ArgNames mapset\n"); ;
1500: break;}
1501: case 92:
1502: #line 280 "simple.y"
1503: { pkkan("/ExitPoint ]pop popVariables %%pop the local variables\n"); ;
1504: break;}
1505: case 94:
1506: #line 287 "simple.y"
1507: {pkkan("/ExitPoint ]pop popVariables %%pop argValues\n");
1508: pkdebug2();
1509: pkkan("FunctionValue } def\n%%end of function\n\n"); ;
1510: break;}
1511: case 95:
1512: #line 291 "simple.y"
1513: {pkkan("/ExitPoint ]pop popVariables %%pop argValues\n");
1514: pkdebug2();
1515: pkkan("FunctionValue } def\n%%end of function\n\n"); ;
1516: break;}
1517: case 96:
1518: #line 295 "simple.y"
1519: {pkkan("/ExitPoint ]pop popVariables %%pop argValues\n");
1520: pkdebug2();
1521: pkkan("} def\n%%end of function\n\n"); ;
1522: break;}
1523: case 97:
1524: #line 301 "simple.y"
1525: { pkkan("[ %%start of local variables\n"); ;
1526: break;}
1527: case 98:
1528: #line 306 "simple.y"
1529: { pkkan("] pushVariables [ %%local variables\n"); ;
1530: break;}
1531: case 99:
1532: #line 311 "simple.y"
1533: { ;;
1534: break;}
1535: case 100:
1536: #line 312 "simple.y"
1537: { ;;
1538: break;}
1539: case 101:
1540: #line 316 "simple.y"
1541: { ; ;
1542: break;}
1543: case 102:
1544: #line 321 "simple.y"
1545: { ; ;
1546: break;}
1547: case 104:
1548: #line 326 "simple.y"
1549: { pkkan(" Get\n"); ;
1550: break;}
1551: case 105:
1552: #line 329 "simple.y"
1553: {pkkan(" ] "); ;
1554: break;}
1555: case 108:
1556: #line 337 "simple.y"
1557: { int tmp0;
1558: if ((tmp0 = K00getIncetanceVariable(objectSymbolToString(yyvsp[-1]))) != -1) {
1559: pkkan(" this "); pkkanInteger(tmp0); pkkan(" get [");
1560: } else {
1561: printObjectSymbol(yyvsp[-1]); pkkan(" [");
1562: }
1563: ;
1564: break;}
1565: case 109:
1566: #line 348 "simple.y"
1567: { yyval = yyvsp[0];;
1568: break;}
1569: case 110:
1570: #line 352 "simple.y"
1571: { int tmp0;
1572: if ((tmp0 = K00getIncetanceVariable(objectSymbolToString(yyvsp[-2]))) != -1) {
1573: pkkan(" this "); pkkanInteger(tmp0);
1574: pkkan(" 3 -1 roll put\n");
1575: }else {
1576: pkkan("/"); printObjectSymbol(yyvsp[-2]); pkkan(" "); ips(yyvsp[-2]); pkkan(" set\n");
1577: }
1578: ;
1579: break;}
1580: case 111:
1581: #line 360 "simple.y"
1582: { pkkan(" Put\n"); ;
1583: break;}
1584: case 112:
1585: #line 361 "simple.y"
1586: { pkkan(" /this set \n"); ;
1587: break;}
1588: case 115:
1589: #line 367 "simple.y"
1590: { pkkan(" not\n"); ;
1591: break;}
1592: case 117:
1593: #line 369 "simple.y"
1594: { pkkan(" (0).. 2 1 roll {sub} sendmsg \n"); ;
1595: break;}
1596: case 118:
1597: #line 370 "simple.y"
1598: { pkkan(" {add} sendmsg2 \n"); ;
1599: break;}
1600: case 119:
1601: #line 371 "simple.y"
1602: { pkkan(" {sub} sendmsg2 \n"); ;
1603: break;}
1604: case 120:
1605: #line 372 "simple.y"
1606: { pkkan(" {mul} sendmsg2 \n"); ;
1607: break;}
1608: case 121:
1609: #line 373 "simple.y"
1610: { pkkan(" {div} sendmsg2 \n"); ;
1611: break;}
1612: case 123:
1613: #line 375 "simple.y"
1614: { pkkan(" power\n"); ;
1615: break;}
1616: case 126:
1617: #line 378 "simple.y"
1618: { pkkan(" eq\n"); ;
1619: break;}
1620: case 127:
1621: #line 379 "simple.y"
1622: { pkkan(" lt\n"); ;
1623: break;}
1624: case 128:
1625: #line 380 "simple.y"
1626: { pkkan(" gt\n"); ;
1627: break;}
1628: case 129:
1629: #line 381 "simple.y"
1630: { pkkan(" lessThanOrEqual\n"); ;
1631: break;}
1632: case 131:
1633: #line 383 "simple.y"
1634: { pkkan(" greaterThanOrEqual\n"); ;
1635: break;}
1636: case 133:
1637: #line 385 "simple.y"
1638: { pkkan(" and\n"); ;
1639: break;}
1640: case 134:
1641: #line 386 "simple.y"
1642: { pkkan(" or\n"); ;
1643: break;}
1644: case 135:
1645: #line 387 "simple.y"
1646: { pkkan(" eq not\n"); ;
1647: break;}
1648: case 137:
1649: #line 389 "simple.y"
1650: { pkkan("/");
1651: printObjectSymbol(yyvsp[-1]); ips(yyvsp[-1]);
1652: pkkan(" "); printObjectSymbol(yyvsp[-1]);
1653: pkkan(" (1).. {add} sendmsg2 "); pkkan("def\n"); ;
1654: break;}
1655: case 138:
1656: #line 393 "simple.y"
1657: { pkkan("/");
1658: printObjectSymbol(yyvsp[-1]); ips(yyvsp[-1]);
1659: pkkan(" "); printObjectSymbol(yyvsp[-1]);
1660: pkkan(" (1).. {sub} sendmsg2 "); pkkan("def\n"); ;
1661: break;}
1662: case 140:
1663: #line 398 "simple.y"
1664: { pkkan(" sendmsg2 \n"); ;
1665: break;}
1666: case 141:
1667: #line 399 "simple.y"
1668: { /* Not implemented yet. */ ;
1669: break;}
1670: case 142:
1671: #line 400 "simple.y"
1672: { pkkan(" supmsg2 \n"); ;
1673: break;}
1674: case 143:
1675: #line 401 "simple.y"
1676: { pkkan("("); printObjectSymbol(yyvsp[-2]);
1677: pkkan(").. (double) dc ");
1678: pkkan("("); printObjectSymbol(yyvsp[0]); pkkan(").. ");
1679: pkkan("("); printTens(yyvsp[0]); pkkan(").. ");
1680: pkkan(" div (double) dc add\n"); ;
1681: break;}
1682: case 147:
1683: #line 410 "simple.y"
1684: {
1685: int tmp0;
1686: tmp0 = K00getIncetanceVariable("K00sizeof");
1687: pkkan(" ("); pkkanInteger(tmp0); pkkan(").. ");
1688: ;
1689: break;}
1690: case 148:
1691: #line 417 "simple.y"
1692: {
1693: int tmp0;
1694: tmp0 = K00getIncetanceVariable("K00start");
1695: pkkan(" ("); pkkanInteger(tmp0); pkkan(").. ");
1696: ;
1697: break;}
1698: case 149:
1699: #line 425 "simple.y"
1700: { /* It is not used now. */
1701: sendKan(1);
1702: Sm1obj = KSpop();
1703: if (Sm1obj.tag != Sdollar) {
1704: fprintf(stderr," Argument of test must be a string.\n");
1705: }
1706: testNewFunction((struct Object *)&Sm1obj);
1707: ;
1708: break;}
1709: case 150:
1710: #line 436 "simple.y"
1711: {
1712: fprintf(stderr," special is used to extend the function. \n");
1713: ;
1714: break;}
1715: case 151:
1716: #line 445 "simple.y"
1717: {pkkan("] {");printObjectSymbol(yyvsp[-2]);pkkan("} ");;
1718: break;}
1719: case 152:
1720: #line 447 "simple.y"
1721: {pkkan("] {");printObjectSymbol(yyvsp[-1]);pkkan("} ");;
1722: break;}
1723: case 153:
1724: #line 452 "simple.y"
1725: { pkkan(" [ %% function args \n"); yyval = yyvsp[-1] ;
1726: break;}
1727: case 154:
1728: #line 459 "simple.y"
1729: { pkkan(" PrimitiveContextp setcontext ");
1730: /* debug */ K00foo1();
1731: K00toPrimitiveClass();
1732: ;
1733: break;}
1734: case 155:
1735: #line 465 "simple.y"
1736: { pkkan(" PrimitiveContextp setcontext ");
1737: K00putIncetanceVariable(IEXIT," ");
1738: /* debug */ K00foo1();
1739: K00toPrimitiveClass();
1740: ;
1741: break;}
1742: case 156:
1743: #line 475 "simple.y"
1744: { ips(yyvsp[-3]);
1745: pkkan("[ $") ; printObjectSymbol(yyvsp[-3]); pkkan("$ ");
1746: printObjectSymbol(yyvsp[-1]); pkkan(" 0 get newcontext ] /");
1747: printObjectSymbol(yyvsp[-3]); pkkan(" set \n");
1748: printObjectSymbol(yyvsp[-3]); pkkan(" 0 get setcontext \n");
1749:
1750: if (K00declareClass(objectSymbolToString(yyvsp[-3]),
1751: objectSymbolToString(yyvsp[-1])) == -1) {
1752: /* error */
1753: KCerror("Super class has not been defined or Invalid class name.");
1754: }else{
1755: K00putIncetanceVariable(IRESET," ");
1756: }
1757: ;
1758: break;}
1759: case 157:
1760: #line 492 "simple.y"
1761: {
1762: K00putIncetanceVariable(IEXIT," ");
1763: ;
1764: break;}
1765: case 158:
1766: #line 498 "simple.y"
1767: {
1768: K00putIncetanceVariable(IPUT,objectSymbolToString(yyvsp[0]));
1769: ;
1770: break;}
1771: case 159:
1772: #line 502 "simple.y"
1773: {
1774: K00putIncetanceVariable(IPUT,objectSymbolToString(yyvsp[0]));
1775: ;
1776: break;}
1777: case 160:
1778: #line 508 "simple.y"
1779: { pkkan("/"); printObjectSymbol(yyvsp[0]); pkkan(" {\n"); ips(yyvsp[0]);
1780: pkdebug("In function : ", objectSymbolToString(yyvsp[0]),", of class ",
1781: K00getCurrentContextName());
1782: pkkan(" /Arglist set /Arglist [Arglist] def ");
1783: pkkan(" /Argthis set /FunctionValue [ ] def\n [/this ");
1784: yyval = yyvsp[0];;
1785: break;}
1786: case 161:
1787: #line 517 "simple.y"
1788: { pkkan(" this "); ;
1789: break;}
1790: case 162:
1791: #line 522 "simple.y"
1792: { int tmp;
1793: tmp = K00getIncetanceVariable("K00sizeof")
1794: +K00getIncetanceVariable("K00start");
1795: pkkanInteger(tmp);
1796: pkkan(" ");
1797: pkkan(K00getCurrentContextName());
1798: pkkan(" cclass \n");
1799: ;
1800: break;}
1801: case 163:
1802: #line 531 "simple.y"
1803: { int tmp;
1804: pkkan(" PrimitiveObject ");
1805: tmp = K00getIncetanceVariable("K00sizeof")
1806: +K00getIncetanceVariable("K00start");
1807: pkkanInteger(tmp);
1808: pkkan(" ");
1809: pkkan(K00getCurrentContextName());
1810: pkkan(" cclass \n");
1811: ;
1812: break;}
1813: }
1814: /* the action file gets copied in in place of this dollarsign */
1.2 ! takayama 1815: #line 543 "/usr/share/misc/bison.simple"
1.1 maekawa 1816:
1817: yyvsp -= yylen;
1818: yyssp -= yylen;
1819: #ifdef YYLSP_NEEDED
1820: yylsp -= yylen;
1821: #endif
1822:
1823: #if YYDEBUG != 0
1824: if (yydebug)
1825: {
1826: short *ssp1 = yyss - 1;
1827: fprintf (stderr, "state stack now");
1828: while (ssp1 != yyssp)
1829: fprintf (stderr, " %d", *++ssp1);
1830: fprintf (stderr, "\n");
1831: }
1832: #endif
1833:
1834: *++yyvsp = yyval;
1835:
1836: #ifdef YYLSP_NEEDED
1837: yylsp++;
1838: if (yylen == 0)
1839: {
1840: yylsp->first_line = yylloc.first_line;
1841: yylsp->first_column = yylloc.first_column;
1842: yylsp->last_line = (yylsp-1)->last_line;
1843: yylsp->last_column = (yylsp-1)->last_column;
1844: yylsp->text = 0;
1845: }
1846: else
1847: {
1848: yylsp->last_line = (yylsp+yylen-1)->last_line;
1849: yylsp->last_column = (yylsp+yylen-1)->last_column;
1850: }
1851: #endif
1852:
1853: /* Now "shift" the result of the reduction.
1854: Determine what state that goes to,
1855: based on the state we popped back to
1856: and the rule number reduced by. */
1857:
1858: yyn = yyr1[yyn];
1859:
1860: yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1861: if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1862: yystate = yytable[yystate];
1863: else
1864: yystate = yydefgoto[yyn - YYNTBASE];
1865:
1866: goto yynewstate;
1867:
1868: yyerrlab: /* here on detecting error */
1869:
1870: if (! yyerrstatus)
1871: /* If not already recovering from an error, report this error. */
1872: {
1873: ++yynerrs;
1874:
1875: #ifdef YYERROR_VERBOSE
1876: yyn = yypact[yystate];
1877:
1878: if (yyn > YYFLAG && yyn < YYLAST)
1879: {
1880: int size = 0;
1881: char *msg;
1882: int x, count;
1883:
1884: count = 0;
1885: /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
1886: for (x = (yyn < 0 ? -yyn : 0);
1887: x < (sizeof(yytname) / sizeof(char *)); x++)
1888: if (yycheck[x + yyn] == x)
1889: size += strlen(yytname[x]) + 15, count++;
1890: msg = (char *) malloc(size + 15);
1891: if (msg != 0)
1892: {
1893: strcpy(msg, "parse error");
1894:
1895: if (count < 5)
1896: {
1897: count = 0;
1898: for (x = (yyn < 0 ? -yyn : 0);
1899: x < (sizeof(yytname) / sizeof(char *)); x++)
1900: if (yycheck[x + yyn] == x)
1901: {
1902: strcat(msg, count == 0 ? ", expecting `" : " or `");
1903: strcat(msg, yytname[x]);
1904: strcat(msg, "'");
1905: count++;
1906: }
1907: }
1908: yyerror(msg);
1909: free(msg);
1910: }
1911: else
1912: yyerror ("parse error; also virtual memory exceeded");
1913: }
1914: else
1915: #endif /* YYERROR_VERBOSE */
1916: yyerror("parse error");
1917: }
1918:
1919: goto yyerrlab1;
1920: yyerrlab1: /* here on error raised explicitly by an action */
1921:
1922: if (yyerrstatus == 3)
1923: {
1924: /* if just tried and failed to reuse lookahead token after an error, discard it. */
1925:
1926: /* return failure if at end of input */
1927: if (yychar == YYEOF)
1928: YYABORT;
1929:
1930: #if YYDEBUG != 0
1931: if (yydebug)
1932: fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
1933: #endif
1934:
1935: yychar = YYEMPTY;
1936: }
1937:
1938: /* Else will try to reuse lookahead token
1939: after shifting the error token. */
1940:
1941: yyerrstatus = 3; /* Each real token shifted decrements this */
1942:
1943: goto yyerrhandle;
1944:
1945: yyerrdefault: /* current state does not do anything special for the error token. */
1946:
1947: #if 0
1948: /* This is wrong; only states that explicitly want error tokens
1949: should shift them. */
1950: yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
1951: if (yyn) goto yydefault;
1952: #endif
1953:
1954: yyerrpop: /* pop the current state because it cannot handle the error token */
1955:
1956: if (yyssp == yyss) YYABORT;
1957: yyvsp--;
1958: yystate = *--yyssp;
1959: #ifdef YYLSP_NEEDED
1960: yylsp--;
1961: #endif
1962:
1963: #if YYDEBUG != 0
1964: if (yydebug)
1965: {
1966: short *ssp1 = yyss - 1;
1967: fprintf (stderr, "Error: state stack now");
1968: while (ssp1 != yyssp)
1969: fprintf (stderr, " %d", *++ssp1);
1970: fprintf (stderr, "\n");
1971: }
1972: #endif
1973:
1974: yyerrhandle:
1975:
1976: yyn = yypact[yystate];
1977: if (yyn == YYFLAG)
1978: goto yyerrdefault;
1979:
1980: yyn += YYTERROR;
1981: if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1982: goto yyerrdefault;
1983:
1984: yyn = yytable[yyn];
1985: if (yyn < 0)
1986: {
1987: if (yyn == YYFLAG)
1988: goto yyerrpop;
1989: yyn = -yyn;
1990: goto yyreduce;
1991: }
1992: else if (yyn == 0)
1993: goto yyerrpop;
1994:
1995: if (yyn == YYFINAL)
1996: YYACCEPT;
1997:
1998: #if YYDEBUG != 0
1999: if (yydebug)
2000: fprintf(stderr, "Shifting error token, ");
2001: #endif
2002:
2003: *++yyvsp = yylval;
2004: #ifdef YYLSP_NEEDED
2005: *++yylsp = yylloc;
2006: #endif
2007:
2008: yystate = yyn;
2009: goto yynewstate;
1.2 ! takayama 2010:
! 2011: yyacceptlab:
! 2012: /* YYACCEPT comes here. */
! 2013: if (yyfree_stacks)
! 2014: {
! 2015: free (yyss);
! 2016: free (yyvs);
! 2017: #ifdef YYLSP_NEEDED
! 2018: free (yyls);
! 2019: #endif
! 2020: }
! 2021: return 0;
! 2022:
! 2023: yyabortlab:
! 2024: /* YYABORT comes here. */
! 2025: if (yyfree_stacks)
! 2026: {
! 2027: free (yyss);
! 2028: free (yyvs);
! 2029: #ifdef YYLSP_NEEDED
! 2030: free (yyls);
! 2031: #endif
! 2032: }
! 2033: return 1;
1.1 maekawa 2034: }
2035: #line 547 "simple.y"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>