1 |
2 | /* A Bison parser, made from parse.y
3 | by GNU Bison version 1.28 */
4 |
5 | #define YYBISON 1 /* Identify Bison output. */
6 |
7 | #define IDENTIFIER 257
8 | #define TYPE_NAME 258
9 | #define LITERAL 259
10 | #define STRING_LITERAL 260
11 | #define ELLIPSES 261
12 | #define MUL_ASSIGN 262
13 | #define DIV_ASSIGN 263
14 | #define MOD_ASSIGN 264
15 | #define ADD_ASSIGN 265
16 | #define SUB_ASSIGN 266
17 | #define LEFT_ASSIGN 267
18 | #define RIGHT_ASSIGN 268
19 | #define AND_ASSIGN 269
20 | #define XOR_ASSIGN 270
21 | #define OR_ASSIGN 271
22 | #define EQ_OP 272
23 | #define NE_OP 273
24 | #define PTR_OP 274
25 | #define AND_OP 275
26 | #define OR_OP 276
27 | #define DEC_OP 277
28 | #define INC_OP 278
29 | #define LE_OP 279
30 | #define GE_OP 280
31 | #define LEFT_SHIFT 281
32 | #define RIGHT_SHIFT 282
33 | #define SIZEOF 283
34 | #define TYPEDEF 284
35 | #define EXTERN 285
36 | #define STATIC 286
37 | #define AUTO 287
38 | #define REGISTER 288
39 | #define CONST 289
40 | #define VOLATILE 290
41 | #define VOID 291
42 | #define INLINE 292
43 | #define CHAR 293
44 | #define SHORT 294
45 | #define INT 295
46 | #define LONG 296
47 | #define SIGNED 297
48 | #define UNSIGNED 298
49 | #define FLOAT 299
50 | #define DOUBLE 300
51 | #define STRUCT 301
52 | #define UNION 302
53 | #define ENUM 303
54 | #define CASE 304
55 | #define DEFAULT 305
56 | #define IF 306
57 | #define ELSE 307
58 | #define SWITCH 308
59 | #define WHILE 309
60 | #define DO 310
61 | #define FOR 311
62 | #define GOTO 312
63 | #define CONTINUE 313
64 | #define BREAK 314
65 | #define RETURN 315
66 | #define ASM 316
67 |
68 | #line 1 "parse.y"
69 |
70 | /***************************************
71 | $Header: /home/amb/cxref/RCS/parse.y 1.42 2001/04/28 15:33:03 amb Exp $
72 |
73 | C Cross Referencing & Documentation tool. Version 1.5c.
74 |
75 | C parser.
76 | ******************/ /******************
77 | Written by Andrew M. Bishop
78 |
79 | This file Copyright 1995,96,97,98,99,2000,2001 Andrew M. Bishop
80 | It may be distributed under the GNU Public License, version 2, or
81 | any higher version. See section COPYING of the GNU Public license
82 | for conditions under which this file may be redistributed.
83 | ***************************************/
84 |
85 | #include <string.h>
86 | #include "parse-yy.h"
87 | #include "cxref.h"
88 | #include "memory.h"
89 |
90 | /*+ A structure to hold the information about an object. +*/
91 | typedef struct _stack
92 | {
93 | char *name; /*+ The name of the object. +*/
94 | char *type; /*+ The type of the object. +*/
95 | char *qual; /*+ The type qualifier of the object. +*/
96 | }
97 | stack;
98 |
99 | #define yylex cxref_yylex
100 |
101 | static int cxref_yylex(void);
102 |
103 | static void yyerror(char *s);
104 |
105 | /*+ When in a header file, some stuff can be skipped over quickly. +*/
106 | extern int in_header;
107 |
108 | /*+ A flag that is set to true when typedef is seen in a statement. +*/
109 | int in_typedef=0;
110 |
111 | /*+ The scope of the function / variable that is being examined. +*/
112 | static int scope;
113 |
114 | /*+ The variable must be LOCAL or EXTERNAL or GLOBAL, so this checks and sets that. +*/
115 | #define SCOPE ( scope&(LOCAL|EXTERNAL|EXTERN_H|EXTERN_F) ? scope : scope|GLOBAL )
116 |
117 | /*+ When in a function or a function definition, the behaviour is different. +*/
118 | static int in_function=0,in_funcdef=0,in_funcbody=0;
119 |
120 | /*+ The parsing stack +*/
121 | static stack first={NULL,NULL,NULL}, /*+ first value. +*/
122 | *list=NULL, /*+ list of all values. +*/
123 | *current=&first; /*+ current values. +*/
124 |
125 | /*+ The depth of the stack +*/
126 | static int depth=0, /*+ currently in use. +*/
127 | maxdepth=0; /*+ total malloced. +*/
128 |
129 | /*+ Declarations that are in the same statement share this comment. +*/
130 | static char* common_comment=NULL;
131 |
132 | /*+ When inside a struct / union / enum definition, this is the depth. +*/
133 | static int in_structunion=0;
134 |
135 | /*+ When inside a struct / union definition, this is the component type. +*/
136 | static char *comp_type=NULL;
137 |
138 | /*+ To solve the problem where a type name is used as an identifier. +*/
139 | static int in_type_spec=0;
140 |
141 |
142 | /*++++++++++++++++++++++++++++++++++++++
143 | Reset the current level on the stack.
144 | ++++++++++++++++++++++++++++++++++++++*/
145 |
146 | static void reset(void)
147 | {
148 | current->name=NULL;
149 | current->type=NULL;
150 | current->qual=NULL;
151 | }
152 |
153 |
154 | /*++++++++++++++++++++++++++++++++++++++
155 | Push a level onto the stack.
156 | ++++++++++++++++++++++++++++++++++++++*/
157 |
158 | static void push(void)
159 | {
160 | if(list==NULL)
161 | {
162 | list=(stack*)Malloc(8*sizeof(struct _stack));
163 | list[0]=first;
164 | maxdepth=8;
165 | }
166 | else if(depth==(maxdepth-1))
167 | {
168 | list=Realloc(list,(maxdepth+8)*sizeof(struct _stack));
169 | maxdepth+=8;
170 | }
171 |
172 | depth++;
173 | current=&list[depth];
174 |
175 | reset();
176 | }
177 |
178 |
179 | /*++++++++++++++++++++++++++++++++++++++
180 | Pop a level from the stack.
181 | ++++++++++++++++++++++++++++++++++++++*/
182 |
183 | static void pop(void)
184 | {
185 | reset();
186 |
187 | depth--;
188 | current=&list[depth];
189 | }
190 |
191 |
192 | /*++++++++++++++++++++++++++++++++++++++
193 | Reset the Parser, ready for the next file.
194 | ++++++++++++++++++++++++++++++++++++++*/
195 |
196 | void ResetParser(void)
197 | {
198 | in_typedef=0;
199 | scope=0;
200 | in_function=0;
201 | in_funcdef=0;
202 | in_funcbody=0;
203 | depth=0;
204 | maxdepth=0;
205 | if(list) Free(list);
206 | list=NULL;
207 | current=&first;
208 | reset();
209 | common_comment=NULL;
210 | in_structunion=0;
211 | comp_type=NULL;
212 | in_type_spec=0;
213 | }
214 |
215 | #ifndef YYSTYPE
216 | #define YYSTYPE int
217 | #endif
218 | #include <stdio.h>
219 |
220 | #ifndef __cplusplus
221 | #ifndef __STDC__
222 | #define const
223 | #endif
224 | #endif
225 |
226 |
227 |
228 | #define YYFINAL 579
229 | #define YYFLAG -32768
230 | #define YYNTBASE 87
231 |
232 | #define YYTRANSLATE(x) ((unsigned)(x) <= 316 ? yytranslate[x] : 257)
233 |
234 | static const char yytranslate[] = { 0,
235 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
236 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
237 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
238 | 2, 2, 86, 2, 2, 2, 84, 78, 2, 72,
239 | 73, 74, 81, 64, 82, 69, 83, 2, 2, 2,
240 | 2, 2, 2, 2, 2, 2, 2, 68, 63, 79,
241 | 65, 80, 75, 2, 2, 2, 2, 2, 2, 2,
242 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
243 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
244 | 70, 2, 71, 77, 2, 2, 2, 2, 2, 2,
245 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
246 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
247 | 2, 2, 66, 76, 67, 85, 2, 2, 2, 2,
248 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
249 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
250 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
251 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
252 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
253 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
254 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
255 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
256 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
257 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
258 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
259 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
260 | 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
261 | 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
262 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
263 | 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
264 | 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
265 | 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
266 | 57, 58, 59, 60, 61, 62
267 | };
268 |
269 | #if YYDEBUG != 0
270 | static const short yyprhs[] = { 0,
271 | 0, 1, 3, 5, 8, 10, 12, 14, 16, 18,
272 | 21, 25, 28, 30, 32, 35, 37, 40, 42, 45,
273 | 47, 48, 53, 55, 57, 60, 63, 67, 70, 72,
274 | 75, 79, 84, 86, 90, 92, 96, 101, 106, 112,
275 | 114, 118, 120, 123, 125, 129, 132, 136, 140, 145,
276 | 148, 152, 156, 161, 163, 166, 168, 171, 174, 178,
277 | 180, 184, 186, 188, 190, 194, 195, 196, 203, 205,
278 | 207, 209, 211, 213, 215, 217, 219, 222, 224, 226,
279 | 228, 230, 232, 234, 236, 238, 240, 242, 244, 246,
280 | 249, 252, 254, 257, 260, 262, 264, 266, 268, 270,
281 | 272, 274, 276, 278, 281, 283, 285, 286, 292, 293,
282 | 300, 302, 305, 307, 311, 313, 317, 319, 322, 324,
283 | 326, 328, 330, 331, 337, 338, 345, 348, 350, 352,
284 | 354, 356, 357, 363, 364, 371, 374, 376, 378, 379,
285 | 381, 383, 386, 388, 391, 394, 396, 397, 402, 403,
286 | 409, 410, 416, 418, 422, 424, 426, 428, 431, 435,
287 | 437, 439, 441, 442, 446, 448, 450, 453, 456, 460,
288 | 462, 464, 468, 471, 476, 477, 483, 485, 486, 488,
289 | 490, 492, 496, 498, 502, 504, 508, 511, 513, 516,
290 | 518, 520, 522, 524, 526, 528, 530, 532, 534, 536,
291 | 538, 540, 542, 545, 546, 547, 553, 554, 556, 558,
292 | 561, 563, 565, 567, 575, 581, 583, 585, 587, 595,
293 | 601, 604, 608, 612, 616, 621, 626, 631, 637, 643,
294 | 646, 649, 652, 655, 660, 662, 664, 670, 673, 676,
295 | 679, 683, 685, 688, 692, 694, 696, 700, 702, 704,
296 | 708, 714, 716, 718, 720, 722, 724, 726, 728, 730,
297 | 732, 734, 736, 738, 744, 749, 751, 755, 757, 761,
298 | 763, 767, 769, 773, 775, 779, 781, 785, 787, 789,
299 | 791, 795, 797, 799, 801, 803, 805, 809, 811, 813,
300 | 815, 819, 821, 823, 825, 829, 831, 833, 835, 837,
301 | 839, 841, 843, 845, 847, 849, 851, 853, 855, 857,
302 | 860, 863, 868, 875, 882, 885, 888, 891, 894, 899,
303 | 902, 905, 908, 910, 912, 914, 916, 918, 920, 922,
304 | 924, 926, 930, 934, 938, 943, 947, 952, 955, 958,
305 | 963, 965, 967, 969, 971, 973, 976, 980, 981, 982,
306 | 988, 990, 992, 996, 1002, 1010, 1020, 1032, 1034, 1037,
307 | 1040, 1041, 1043, 1047, 1052, 1053, 1055, 1059, 1064, 1067,
308 | 1069, 1073, 1074, 1076, 1080, 1084, 1090, 1095, 1102, 1104
309 | };
310 |
311 | static const short yyrhs[] = { -1,
312 | 88, 0, 89, 0, 88, 89, 0, 91, 0, 159,
313 | 0, 246, 0, 197, 0, 91, 0, 90, 91, 0,
314 | 92, 94, 63, 0, 92, 63, 0, 93, 0, 113,
315 | 0, 113, 93, 0, 116, 0, 116, 93, 0, 115,
316 | 0, 115, 93, 0, 96, 0, 0, 94, 64, 95,
317 | 96, 0, 97, 0, 105, 0, 105, 251, 0, 105,
318 | 98, 0, 105, 251, 98, 0, 65, 99, 0, 201,
319 | 0, 66, 67, 0, 66, 100, 67, 0, 66, 100,
320 | 64, 67, 0, 101, 0, 100, 64, 101, 0, 99,
321 | 0, 158, 68, 99, 0, 69, 158, 65, 99, 0,
322 | 70, 102, 71, 99, 0, 70, 102, 71, 65, 99,
323 | 0, 244, 0, 244, 7, 244, 0, 106, 0, 106,
324 | 104, 0, 104, 0, 72, 103, 73, 0, 70, 71,
325 | 0, 104, 70, 71, 0, 70, 244, 71, 0, 104,
326 | 70, 244, 71, 0, 72, 73, 0, 104, 72, 73,
327 | 0, 72, 170, 73, 0, 104, 72, 170, 73, 0,
328 | 107, 0, 106, 107, 0, 74, 0, 74, 114, 0,
329 | 74, 106, 0, 74, 114, 106, 0, 108, 0, 72,
330 | 105, 73, 0, 109, 0, 165, 0, 3, 0, 107,
331 | 70, 71, 0, 0, 0, 107, 70, 110, 244, 111,
332 | 71, 0, 3, 0, 33, 0, 31, 0, 34, 0,
333 | 32, 0, 30, 0, 38, 0, 115, 0, 114, 115,
334 | 0, 35, 0, 36, 0, 117, 0, 124, 0, 118,
335 | 0, 119, 0, 134, 0, 121, 0, 140, 0, 122,
336 | 0, 45, 0, 46, 0, 46, 42, 0, 42, 46,
337 | 0, 120, 0, 120, 115, 0, 119, 120, 0, 43,
338 | 0, 44, 0, 39, 0, 40, 0, 41, 0, 42,
339 | 0, 4, 0, 37, 0, 92, 0, 92, 103, 0,
340 | 125, 0, 132, 0, 0, 49, 66, 126, 128, 67,
341 | 0, 0, 49, 133, 66, 127, 128, 67, 0, 129,
342 | 0, 129, 64, 0, 130, 0, 129, 64, 130, 0,
343 | 131, 0, 131, 65, 201, 0, 3, 0, 49, 133,
344 | 0, 3, 0, 4, 0, 135, 0, 138, 0, 0,
345 | 47, 66, 136, 146, 67, 0, 0, 47, 139, 66,
346 | 137, 146, 67, 0, 47, 139, 0, 3, 0, 4,
347 | 0, 141, 0, 144, 0, 0, 48, 66, 142, 146,
348 | 67, 0, 0, 48, 145, 66, 143, 146, 67, 0,
349 | 48, 145, 0, 3, 0, 4, 0, 0, 147, 0,
350 | 148, 0, 147, 148, 0, 63, 0, 135, 63, 0,
351 | 141, 63, 0, 149, 0, 0, 116, 150, 153, 63,
352 | 0, 0, 114, 116, 151, 153, 63, 0, 0, 116,
353 | 114, 152, 153, 63, 0, 154, 0, 153, 64, 154,
354 | 0, 155, 0, 156, 0, 105, 0, 68, 157, 0,
355 | 105, 68, 157, 0, 201, 0, 3, 0, 4, 0,
356 | 0, 161, 160, 175, 0, 162, 0, 163, 0, 92,
357 | 163, 0, 163, 90, 0, 92, 163, 90, 0, 164,
358 | 0, 165, 0, 72, 165, 73, 0, 106, 165, 0,
359 | 106, 72, 165, 73, 0, 0, 167, 72, 166, 168,
360 | 73, 0, 107, 0, 0, 170, 0, 169, 0, 3,
361 | 0, 169, 64, 3, 0, 171, 0, 171, 64, 7,
362 | 0, 172, 0, 171, 64, 172, 0, 92, 105, 0,
363 | 92, 0, 92, 103, 0, 246, 0, 175, 0, 180,
364 | 0, 183, 0, 188, 0, 192, 0, 193, 0, 194,
365 | 0, 195, 0, 196, 0, 197, 0, 198, 0, 173,
366 | 0, 174, 173, 0, 0, 0, 66, 176, 178, 177,
367 | 67, 0, 0, 179, 0, 174, 0, 179, 174, 0,
368 | 90, 0, 182, 0, 181, 0, 52, 72, 199, 73,
369 | 173, 53, 173, 0, 52, 72, 199, 73, 173, 0,
370 | 184, 0, 185, 0, 187, 0, 56, 173, 55, 72,
371 | 199, 73, 63, 0, 57, 72, 186, 73, 173, 0,
372 | 63, 63, 0, 199, 63, 63, 0, 63, 199, 63,
373 | 0, 63, 63, 199, 0, 63, 199, 63, 199, 0,
374 | 199, 63, 63, 199, 0, 199, 63, 199, 63, 0,
375 | 199, 63, 199, 63, 199, 0, 55, 72, 199, 73,
376 | 173, 0, 189, 68, 0, 191, 68, 0, 190, 68,
377 | 0, 50, 244, 0, 50, 244, 7, 244, 0, 51,
378 | 0, 3, 0, 54, 72, 199, 73, 173, 0, 60,
379 | 63, 0, 59, 63, 0, 199, 63, 0, 58, 3,
380 | 63, 0, 63, 0, 61, 63, 0, 61, 199, 63,
381 | 0, 200, 0, 201, 0, 200, 64, 201, 0, 203,
382 | 0, 252, 0, 219, 202, 201, 0, 219, 202, 66,
383 | 253, 67, 0, 65, 0, 8, 0, 9, 0, 10,
384 | 0, 11, 0, 12, 0, 13, 0, 14, 0, 15,
385 | 0, 16, 0, 17, 0, 204, 0, 204, 75, 199,
386 | 68, 203, 0, 204, 75, 68, 203, 0, 205, 0,
387 | 204, 22, 205, 0, 206, 0, 205, 21, 206, 0,
388 | 207, 0, 206, 76, 207, 0, 208, 0, 207, 77,
389 | 208, 0, 209, 0, 208, 78, 209, 0, 211, 0,
390 | 209, 210, 211, 0, 18, 0, 19, 0, 213, 0,
391 | 211, 212, 213, 0, 79, 0, 25, 0, 80, 0,
392 | 26, 0, 215, 0, 213, 214, 215, 0, 27, 0,
393 | 28, 0, 217, 0, 215, 216, 217, 0, 81, 0,
394 | 82, 0, 219, 0, 217, 218, 219, 0, 74, 0,
395 | 83, 0, 84, 0, 220, 0, 221, 0, 222, 0,
396 | 223, 0, 224, 0, 225, 0, 226, 0, 227, 0,
397 | 228, 0, 229, 0, 230, 0, 78, 219, 0, 85,
398 | 219, 0, 72, 123, 73, 219, 0, 72, 123, 73,
399 | 66, 253, 67, 0, 72, 123, 73, 66, 256, 67,
400 | 0, 74, 219, 0, 86, 219, 0, 23, 219, 0,
401 | 24, 219, 0, 29, 72, 123, 73, 0, 29, 219,
402 | 0, 82, 219, 0, 81, 219, 0, 231, 0, 234,
403 | 0, 235, 0, 236, 0, 237, 0, 238, 0, 239,
404 | 0, 232, 0, 233, 0, 230, 69, 158, 0, 230,
405 | 20, 158, 0, 230, 72, 73, 0, 230, 72, 245,
406 | 73, 0, 112, 72, 73, 0, 112, 72, 245, 73,
407 | 0, 230, 23, 0, 230, 24, 0, 230, 70, 199,
408 | 71, 0, 112, 0, 5, 0, 240, 0, 241, 0,
409 | 6, 0, 240, 6, 0, 72, 199, 73, 0, 0,
410 | 0, 72, 242, 175, 243, 73, 0, 199, 0, 201,
411 | 0, 245, 64, 201, 0, 247, 72, 240, 73, 63,
412 | 0, 247, 72, 240, 68, 248, 73, 63, 0, 247,
413 | 72, 240, 68, 248, 68, 248, 73, 63, 0, 247,
414 | 72, 240, 68, 248, 68, 248, 68, 250, 73, 63,
415 | 0, 62, 0, 62, 36, 0, 36, 62, 0, 0,
416 | 249, 0, 248, 64, 249, 0, 240, 72, 199, 73,
417 | 0, 0, 240, 0, 250, 64, 240, 0, 62, 72,
418 | 240, 73, 0, 21, 191, 0, 254, 0, 253, 64,
419 | 254, 0, 0, 201, 0, 66, 253, 67, 0, 158,
420 | 68, 201, 0, 158, 68, 66, 253, 67, 0, 69,
421 | 158, 65, 201, 0, 69, 158, 65, 66, 253, 67,
422 | 0, 255, 0, 256, 64, 255, 0
423 | };
424 |
425 | #endif
426 |
427 | #if YYDEBUG != 0
428 | static const short yyrline[] = { 0,
429 | 169, 170, 174, 175, 179, 181, 183, 184, 190, 192,
430 | 198, 200, 205, 211, 212, 214, 216, 219, 220, 227,
431 | 228, 229, 232, 279, 280, 281, 282, 286, 290, 291,
432 | 292, 293, 297, 298, 302, 303, 304, 305, 306, 310,
433 | 311, 318, 319, 321, 325, 328, 330, 332, 334, 336,
434 | 338, 340, 342, 349, 351, 356, 357, 359, 361, 366,
435 | 367, 371, 372, 376, 383, 385, 385, 386, 392, 396,
436 | 398, 403, 405, 407, 411, 416, 417, 422, 424, 431,
437 | 436, 437, 438, 439, 440, 441, 442, 446, 447, 448,
438 | 450, 455, 456, 458, 463, 464, 465, 466, 467, 468,
439 | 472, 476, 480, 482, 489, 490, 494, 502, 507, 515,
440 | 523, 524, 528, 529, 534, 536, 541, 545, 550, 551,
441 | 557, 558, 562, 570, 575, 583, 591, 596, 597, 603,
442 | 604, 608, 616, 621, 629, 637, 642, 643, 649, 650,
443 | 654, 655, 660, 661, 664, 667, 671, 673, 675, 677,
444 | 679, 681, 686, 688, 694, 695, 699, 704, 706, 711,
445 | 715, 716, 724, 727, 731, 753, 754, 756, 757, 764,
446 | 769, 770, 771, 773, 778, 781, 787, 795, 798, 799,
447 | 803, 805, 811, 812, 818, 821, 827, 829, 831, 838,
448 | 839, 840, 841, 842, 843, 844, 845, 846, 847, 848,
449 | 849, 853, 854, 860, 863, 865, 868, 869, 870, 871,
450 | 875, 881, 882, 886, 890, 896, 897, 898, 902, 906,
451 | 910, 911, 912, 913, 914, 915, 916, 917, 921, 927,
452 | 928, 929, 933, 934, 938, 942, 948, 954, 957, 961,
453 | 965, 969, 973, 974, 980, 986, 987, 994, 995, 996,
454 | 997, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008,
455 | 1009, 1010, 1016, 1017, 1019, 1026, 1027, 1034, 1035, 1042,
456 | 1043, 1050, 1051, 1058, 1059, 1066, 1067, 1071, 1072, 1078,
457 | 1079, 1083, 1084, 1085, 1086, 1092, 1093, 1097, 1098, 1104,
458 | 1105, 1109, 1110, 1116, 1117, 1121, 1122, 1123, 1129, 1130,
459 | 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1143,
460 | 1147, 1152, 1154, 1155, 1159, 1163, 1168, 1172, 1176, 1178,
461 | 1183, 1188, 1195, 1196, 1197, 1199, 1200, 1201, 1202, 1206,
462 | 1207, 1211, 1215, 1219, 1220, 1224, 1225, 1229, 1233, 1237,
463 | 1241, 1243, 1244, 1245, 1248, 1249, 1253, 1255, 1255, 1256,
464 | 1261, 1265, 1266, 1274, 1275, 1276, 1277, 1281, 1282, 1283,
465 | 1287, 1288, 1289, 1293, 1297, 1298, 1299, 1303, 1309, 1315,
466 | 1316, 1320, 1321, 1322, 1326, 1327, 1328, 1329, 1333, 1334
467 | };
468 | #endif
469 |
470 |
471 | #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
472 |
473 | static const char * const yytname[] = { "$","error","$undefined.","IDENTIFIER",
474 | "TYPE_NAME","LITERAL","STRING_LITERAL","ELLIPSES","MUL_ASSIGN","DIV_ASSIGN",
475 | "MOD_ASSIGN","ADD_ASSIGN","SUB_ASSIGN","LEFT_ASSIGN","RIGHT_ASSIGN","AND_ASSIGN",
476 | "XOR_ASSIGN","OR_ASSIGN","EQ_OP","NE_OP","PTR_OP","AND_OP","OR_OP","DEC_OP",
477 | "INC_OP","LE_OP","GE_OP","LEFT_SHIFT","RIGHT_SHIFT","SIZEOF","TYPEDEF","EXTERN",
478 | "STATIC","AUTO","REGISTER","CONST","VOLATILE","VOID","INLINE","CHAR","SHORT",
479 | "INT","LONG","SIGNED","UNSIGNED","FLOAT","DOUBLE","STRUCT","UNION","ENUM","CASE",
480 | "DEFAULT","IF","ELSE","SWITCH","WHILE","DO","FOR","GOTO","CONTINUE","BREAK",
481 | "RETURN","ASM","';'","','","'='","'{'","'}'","':'","'.'","'['","']'","'('","')'",
482 | "'*'","'?'","'|'","'^'","'&'","'<'","'>'","'+'","'-'","'/'","'%'","'~'","'!'",
483 | "file","program","top_level_declaration","declaration_list","declaration","declaration_specifiers",
484 | "declaration_specifiers1","initialized_declarator_list","@1","initialized_declarator",
485 | "initialized_declarator1","initializer_part","initializer","initializer_list",
486 | "named_initializer","named_initializer_index","abstract_declarator","direct_abstract_declarator",
487 | "declarator","pointer","direct_declarator","simple_declarator","array_declarator",
488 | "@2","@3","name","storage_class_specifier","type_qualifier_list","type_qualifier",
489 | "type_specifier","type_specifier1","floating_type_specifier","integer_type_specifier",
490 | "integer_type_specifier_part","typedef_name","void_type_specifier","type_name",
491 | "enumeration_type_specifier","enumeration_type_definition","@4","@5","enumeration_definition_list",
492 | "enumeration_definition_list1","enumeration_constant_definition","enumeration_constant",
493 | "enumeration_type_reference","enumeration_tag","structure_type_specifier","structure_type_definition",
494 | "@6","@7","structure_type_reference","structure_tag","union_type_specifier",
495 | "union_type_definition","@8","@9","union_type_reference","union_tag","field_list",
496 | "field_list1","field_list2","component_declaration","@10","@11","@12","component_declarator_list",
497 | "component_declarator","simple_component","bit_field","width","component_name",
498 | "function_definition","@13","function_specifier","function_specifier1","function_declarator",
499 | "function_declarator0","function_direct_declarator","@14","function_declarator1",
500 | "function_declarator2","identifier_list","parameter_type_list","parameter_list",
501 | "parameter_declaration","statement","statement_list","compound_statement","@15",
502 | "@16","compound_statement_body","inner_declaration_list","conditional_statement",
503 | "if_else_statement","if_statement","iterative_statement","do_statement","for_statement",
504 | "for_expressions","while_statement","labeled_statement","case_label","default_label",
505 | "named_label","switch_statement","break_statement","continue_statement","expression_statement",
506 | "goto_statement","null_statement","return_statement","expression","comma_expression",
507 | "assignment_expression","assignment_op","conditional_expression","logical_or_expression",
508 | "logical_and_expression","bitwise_or_expression","bitwise_xor_expression","bitwise_and_expression",
509 | "equality_expression","equality_op","relational_expression","relational_op",
510 | "shift_expression","shift_op","additive_expression","add_op","multiplicative_expression",
511 | "mult_op","unary_expression","address_expression","bitwise_negation_expression",
512 | "cast_expression","indirection_expression","logical_negation_expression","predecrement_expression",
513 | "preincrement_expression","sizeof_expression","unary_minus_expression","unary_plus_expression",
514 | "postfix_expression","component_selection_expression","direct_component_selection",
515 | "indirect_component_selection","function_call","function_call_direct","postdecrement_expression",
516 | "postincrement_expression","subscript_expression","primary_expression","string_literal",
517 | "parenthesized_expression","@17","@18","constant_expression","expression_list",
518 | "asm_statement","asm_type","asm_inout_list","asm_inout","asm_clobber_list","asm_label",
519 | "named_label_address","assignment_expression_list","assignment_expression_list_item",
520 | "named_assignment","named_assignment_list", NULL
521 | };
522 | #endif
523 |
524 | static const short yyr1[] = { 0,
525 | 87, 87, 88, 88, 89, 89, 89, 89, 90, 90,
526 | 91, 91, 92, 93, 93, 93, 93, 93, 93, 94,
527 | 95, 94, 96, 97, 97, 97, 97, 98, 99, 99,
528 | 99, 99, 100, 100, 101, 101, 101, 101, 101, 102,
529 | 102, 103, 103, 103, 104, 104, 104, 104, 104, 104,
530 | 104, 104, 104, 105, 105, 106, 106, 106, 106, 107,
531 | 107, 107, 107, 108, 109, 110, 111, 109, 112, 113,
532 | 113, 113, 113, 113, 113, 114, 114, 115, 115, 116,
533 | 117, 117, 117, 117, 117, 117, 117, 118, 118, 118,
534 | 118, 119, 119, 119, 120, 120, 120, 120, 120, 120,
535 | 121, 122, 123, 123, 124, 124, 126, 125, 127, 125,
536 | 128, 128, 129, 129, 130, 130, 131, 132, 133, 133,
537 | 134, 134, 136, 135, 137, 135, 138, 139, 139, 140,
538 | 140, 142, 141, 143, 141, 144, 145, 145, 146, 146,
539 | 147, 147, 148, 148, 148, 148, 150, 149, 151, 149,
540 | 152, 149, 153, 153, 154, 154, 155, 156, 156, 157,
541 | 158, 158, 160, 159, 161, 162, 162, 162, 162, 163,
542 | 164, 164, 164, 164, 166, 165, 167, 168, 168, 168,
543 | 169, 169, 170, 170, 171, 171, 172, 172, 172, 173,
544 | 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
545 | 173, 174, 174, 176, 177, 175, 178, 178, 178, 178,
546 | 179, 180, 180, 181, 182, 183, 183, 183, 184, 185,
547 | 186, 186, 186, 186, 186, 186, 186, 186, 187, 188,
548 | 188, 188, 189, 189, 190, 191, 192, 193, 194, 195,
549 | 196, 197, 198, 198, 199, 200, 200, 201, 201, 201,
550 | 201, 202, 202, 202, 202, 202, 202, 202, 202, 202,
551 | 202, 202, 203, 203, 203, 204, 204, 205, 205, 206,
552 | 206, 207, 207, 208, 208, 209, 209, 210, 210, 211,
553 | 211, 212, 212, 212, 212, 213, 213, 214, 214, 215,
554 | 215, 216, 216, 217, 217, 218, 218, 218, 219, 219,
555 | 219, 219, 219, 219, 219, 219, 219, 219, 219, 220,
556 | 221, 222, 222, 222, 223, 224, 225, 226, 227, 227,
557 | 228, 229, 230, 230, 230, 230, 230, 230, 230, 231,
558 | 231, 232, 233, 234, 234, 235, 235, 236, 237, 238,
559 | 239, 239, 239, 239, 240, 240, 241, 242, 243, 241,
560 | 244, 245, 245, 246, 246, 246, 246, 247, 247, 247,
561 | 248, 248, 248, 249, 250, 250, 250, 251, 252, 253,
562 | 253, 254, 254, 254, 255, 255, 255, 255, 256, 256
563 | };
564 |
565 | static const short yyr2[] = { 0,
566 | 0, 1, 1, 2, 1, 1, 1, 1, 1, 2,
567 | 3, 2, 1, 1, 2, 1, 2, 1, 2, 1,
568 | 0, 4, 1, 1, 2, 2, 3, 2, 1, 2,
569 | 3, 4, 1, 3, 1, 3, 4, 4, 5, 1,
570 | 3, 1, 2, 1, 3, 2, 3, 3, 4, 2,
571 | 3, 3, 4, 1, 2, 1, 2, 2, 3, 1,
572 | 3, 1, 1, 1, 3, 0, 0, 6, 1, 1,
573 | 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
574 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
575 | 2, 1, 2, 2, 1, 1, 1, 1, 1, 1,
576 | 1, 1, 1, 2, 1, 1, 0, 5, 0, 6,
577 | 1, 2, 1, 3, 1, 3, 1, 2, 1, 1,
578 | 1, 1, 0, 5, 0, 6, 2, 1, 1, 1,
579 | 1, 0, 5, 0, 6, 2, 1, 1, 0, 1,
580 | 1, 2, 1, 2, 2, 1, 0, 4, 0, 5,
581 | 0, 5, 1, 3, 1, 1, 1, 2, 3, 1,
582 | 1, 1, 0, 3, 1, 1, 2, 2, 3, 1,
583 | 1, 3, 2, 4, 0, 5, 1, 0, 1, 1,
584 | 1, 3, 1, 3, 1, 3, 2, 1, 2, 1,
585 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
586 | 1, 1, 2, 0, 0, 5, 0, 1, 1, 2,
587 | 1, 1, 1, 7, 5, 1, 1, 1, 7, 5,
588 | 2, 3, 3, 3, 4, 4, 4, 5, 5, 2,
589 | 2, 2, 2, 4, 1, 1, 5, 2, 2, 2,
590 | 3, 1, 2, 3, 1, 1, 3, 1, 1, 3,
591 | 5, 1, 1, 1, 1, 1, 1, 1, 1, 1,
592 | 1, 1, 1, 5, 4, 1, 3, 1, 3, 1,
593 | 3, 1, 3, 1, 3, 1, 3, 1, 1, 1,
594 | 3, 1, 1, 1, 1, 1, 3, 1, 1, 1,
595 | 3, 1, 1, 1, 3, 1, 1, 1, 1, 1,
596 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
597 | 2, 4, 6, 6, 2, 2, 2, 2, 4, 2,
598 | 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
599 | 1, 3, 3, 3, 4, 3, 4, 2, 2, 4,
600 | 1, 1, 1, 1, 1, 2, 3, 0, 0, 5,
601 | 1, 1, 3, 5, 7, 9, 11, 1, 2, 2,
602 | 0, 1, 3, 4, 0, 1, 3, 4, 2, 1,
603 | 3, 0, 1, 3, 3, 5, 4, 6, 1, 3
604 | };
605 |
606 | static const short yydefact[] = { 1,
607 | 64, 101, 74, 71, 73, 70, 72, 78, 79, 102,
608 | 75, 97, 98, 99, 100, 95, 96, 88, 89, 0,
609 | 0, 0, 358, 242, 0, 56, 2, 3, 5, 0,
610 | 13, 0, 177, 60, 62, 14, 18, 16, 80, 82,
611 | 83, 92, 85, 87, 81, 105, 106, 84, 121, 122,
612 | 86, 130, 131, 6, 163, 165, 166, 170, 171, 0,
613 | 8, 7, 0, 360, 91, 90, 128, 129, 123, 127,
614 | 137, 138, 132, 136, 119, 120, 107, 118, 359, 0,
615 | 0, 0, 54, 63, 79, 58, 57, 76, 4, 12,
616 | 0, 20, 23, 24, 0, 167, 0, 173, 66, 15,
617 | 19, 17, 100, 94, 93, 0, 168, 9, 0, 175,
618 | 0, 139, 125, 139, 134, 0, 109, 63, 61, 55,
619 | 172, 59, 77, 11, 21, 0, 0, 26, 25, 169,
620 | 63, 65, 0, 204, 164, 10, 178, 345, 0, 143,
621 | 0, 147, 121, 130, 0, 140, 141, 146, 139, 0,
622 | 139, 117, 0, 111, 113, 115, 0, 0, 0, 69,
623 | 342, 0, 0, 0, 0, 0, 348, 0, 0, 0,
624 | 0, 0, 0, 28, 341, 29, 248, 263, 266, 268,
625 | 270, 272, 274, 276, 280, 286, 290, 294, 299, 300,
626 | 301, 302, 303, 304, 305, 306, 307, 308, 309, 323,
627 | 330, 331, 324, 325, 326, 327, 328, 329, 343, 344,
628 | 249, 27, 174, 351, 245, 246, 67, 207, 181, 188,
629 | 0, 180, 179, 183, 185, 346, 361, 0, 149, 151,
630 | 0, 144, 145, 124, 142, 0, 133, 0, 108, 112,
631 | 0, 0, 22, 0, 236, 369, 317, 318, 348, 320,
632 | 69, 162, 30, 0, 0, 35, 0, 33, 0, 103,
633 | 0, 0, 0, 315, 310, 322, 321, 311, 316, 0,
634 | 0, 0, 0, 0, 0, 0, 278, 279, 0, 283,
635 | 285, 282, 284, 0, 288, 289, 0, 292, 293, 0,
636 | 296, 297, 298, 0, 253, 254, 255, 256, 257, 258,
637 | 259, 260, 261, 262, 252, 0, 0, 338, 339, 0,
638 | 0, 0, 0, 0, 69, 0, 235, 0, 0, 0,
639 | 0, 0, 0, 0, 0, 0, 211, 202, 209, 191,
640 | 205, 208, 192, 213, 212, 193, 216, 217, 218, 194,
641 | 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
642 | 0, 190, 0, 0, 189, 44, 187, 42, 176, 0,
643 | 0, 0, 0, 362, 354, 0, 0, 0, 157, 0,
644 | 153, 155, 156, 126, 135, 114, 116, 110, 368, 0,
645 | 161, 0, 0, 40, 0, 31, 0, 0, 104, 42,
646 | 0, 347, 349, 336, 352, 0, 267, 294, 0, 0,
647 | 269, 271, 273, 275, 277, 281, 287, 291, 295, 372,
648 | 250, 333, 332, 0, 334, 0, 247, 68, 233, 0,
649 | 0, 0, 0, 0, 0, 0, 239, 238, 243, 0,
650 | 203, 0, 210, 230, 232, 231, 240, 46, 0, 50,
651 | 0, 0, 0, 0, 43, 182, 184, 186, 0, 0,
652 | 361, 0, 0, 0, 158, 160, 0, 148, 0, 319,
653 | 0, 0, 0, 32, 34, 36, 372, 312, 0, 0,
654 | 337, 265, 0, 372, 373, 0, 370, 340, 335, 0,
655 | 0, 0, 0, 0, 0, 0, 0, 241, 244, 206,
656 | 48, 45, 52, 47, 0, 51, 0, 0, 363, 0,
657 | 355, 150, 152, 159, 154, 37, 0, 38, 41, 0,
658 | 0, 0, 379, 0, 350, 353, 264, 0, 372, 251,
659 | 234, 0, 0, 0, 0, 221, 0, 0, 0, 49,
660 | 53, 364, 365, 0, 39, 0, 0, 313, 0, 314,
661 | 374, 371, 215, 237, 229, 0, 224, 223, 220, 222,
662 | 0, 366, 0, 356, 0, 372, 375, 380, 0, 0,
663 | 225, 226, 227, 0, 0, 372, 377, 0, 214, 219,
664 | 228, 367, 357, 0, 376, 378, 0, 0, 0
665 | };
666 |
667 | static const short yydefgoto[] = { 577,
668 | 27, 28, 107, 108, 109, 31, 91, 158, 92, 93,
669 | 128, 256, 257, 258, 383, 441, 356, 81, 82, 83,
670 | 34, 35, 133, 314, 175, 36, 141, 37, 38, 39,
671 | 40, 41, 42, 43, 44, 261, 45, 46, 116, 157,
672 | 153, 154, 155, 156, 47, 78, 48, 49, 112, 149,
673 | 50, 70, 51, 52, 114, 151, 53, 74, 145, 146,
674 | 147, 148, 231, 366, 367, 370, 371, 372, 373, 455,
675 | 259, 54, 106, 55, 56, 57, 58, 118, 137, 60,
676 | 221, 222, 442, 224, 225, 328, 329, 330, 218, 432,
677 | 331, 332, 333, 334, 335, 336, 337, 338, 486, 339,
678 | 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
679 | 350, 351, 215, 216, 306, 177, 178, 179, 180, 181,
680 | 182, 183, 279, 184, 284, 185, 287, 186, 290, 187,
681 | 294, 188, 189, 190, 191, 192, 193, 194, 195, 196,
682 | 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
683 | 207, 208, 209, 210, 263, 469, 217, 396, 352, 63,
684 | 363, 364, 553, 129, 211, 476, 477, 513, 514
685 | };
686 |
687 | static const short yypact[] = { 1418,
688 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -35,-32768,
689 | -32768,-32768,-32768,-32768, 7,-32768,-32768,-32768, 15, 73,
690 | 76, 126, 46,-32768, 33, 100, 1418,-32768,-32768, 18,
691 | -32768, 17, 45,-32768,-32768, 1645, 1645, 1645,-32768,-32768,
692 | 357, 240,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
693 | -32768,-32768,-32768,-32768,-32768,-32768, 1645,-32768, 145, 54,
694 | -32768,-32768, 69,-32768,-32768,-32768,-32768,-32768,-32768, 32,
695 | -32768,-32768,-32768, 87,-32768,-32768,-32768, 107,-32768, 33,
696 | 104, 38, 50, 108,-32768,-32768, 100,-32768,-32768,-32768,
697 | -18,-32768,-32768, -22, 17, 1645, 33, 145, 122,-32768,
698 | -32768,-32768,-32768,-32768,-32768, 139, 1645,-32768, 22,-32768,
699 | 193, 661,-32768, 661,-32768, 216,-32768,-32768,-32768, 50,
700 | -32768,-32768,-32768,-32768,-32768, 151, 740,-32768, 169, 1645,
701 | 173,-32768, 1294,-32768,-32768,-32768, 1579,-32768, 10,-32768,
702 | 984, 240, 179, 185, 201, 661,-32768,-32768, 661, 205,
703 | 661,-32768, 218, 239,-32768, 244, 216, 33, 193,-32768,
704 | -32768, 313, 1331, 1331, 1401, 648, 517, 1331, 1331, 1331,
705 | 1331, 1331, 1331,-32768, 248,-32768,-32768, 28, 303, 250,
706 | 255, 279, 312, 118, 308, 270, 120, 243,-32768,-32768,
707 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 208,-32768,
708 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 353,-32768,
709 | -32768,-32768,-32768,-32768, 297,-32768,-32768, 433,-32768, 23,
710 | 298, 318,-32768, 321,-32768,-32768, 193, 304,-32768, 240,
711 | 34,-32768,-32768,-32768,-32768, 335,-32768, 336,-32768, 216,
712 | 1294, 337,-32768, 26,-32768,-32768,-32768,-32768, 517,-32768,
713 | 323,-32768,-32768, 350, 1294,-32768, 81,-32768, 338, 195,
714 | 332, 334, 139,-32768,-32768,-32768,-32768,-32768,-32768, 762,
715 | 1331, 784, 1331, 1331, 1331, 1331,-32768,-32768, 1331,-32768,
716 | -32768,-32768,-32768, 1331,-32768,-32768, 1331,-32768,-32768, 1331,
717 | -32768,-32768,-32768, 1331,-32768,-32768,-32768,-32768,-32768,-32768,
718 | -32768,-32768,-32768,-32768,-32768, 854, 350,-32768,-32768, 350,
719 | 1294, 876, 1294, 341, 340, 1294,-32768, 343, 344, 345,
720 | 564, 346, 406, 356, 358, 901, 1645,-32768, 564,-32768,
721 | -32768, 564,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
722 | 352, 355, 359,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
723 | 361,-32768, 971, 1465,-32768, 211,-32768, 41,-32768, 422,
724 | 1599, 52, 83,-32768,-32768, 34, 34, 1294, 360, 310,
725 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 367,
726 | -32768, 364, 370, 419, 670,-32768, 740, 1485,-32768, 249,
727 | 1316,-32768,-32768,-32768,-32768, 127, 303,-32768, 1331, 362,
728 | 250, 255, 279, 312, 118, 308, 270, 120,-32768, 993,
729 | -32768,-32768,-32768, 372,-32768, 152,-32768,-32768, 437, 1294,
730 | 1294, 1294, -35, 391, 1063, 384,-32768,-32768,-32768, 386,
731 | -32768, 383, 564,-32768,-32768,-32768,-32768,-32768, 380,-32768,
732 | 379, 382, 1085, 1532, 211,-32768,-32768,-32768, 1294, 193,
733 | 193, 395, 314, 324,-32768,-32768, 1294,-32768, 34, 1316,
734 | 740, 155, 1294,-32768,-32768,-32768, 294,-32768, 387, 1294,
735 | -32768,-32768, 1331, 993,-32768, 85,-32768,-32768,-32768, 1294,
736 | 388, 413, 424, 426, 1110, 427, 396,-32768,-32768,-32768,
737 | -32768,-32768,-32768,-32768, 430,-32768, 429, 431,-32768, 198,
738 | -32768,-32768,-32768,-32768,-32768,-32768, 740,-32768,-32768, 350,
739 | 435, 99,-32768, 225,-32768,-32768,-32768, 227, 993,-32768,
740 | -32768, 564, 564, 564, 1294, 1294, 443, 564, 1180,-32768,
741 | -32768,-32768, 193, 445,-32768, 444, 1202,-32768, 68,-32768,
742 | -32768,-32768, 457,-32768,-32768, 439,-32768, 1294,-32768, 1294,
743 | 450, 353, 162,-32768, 1224, 993,-32768,-32768, 564, 453,
744 | -32768,-32768, 1294, 193, 454, 993,-32768, 229,-32768,-32768,
745 | -32768, 353,-32768, 237,-32768,-32768, 524, 525,-32768
746 | };
747 |
748 | static const short yypgoto[] = {-32768,
749 | -32768, 499, -87, 2, 1, 275,-32768,-32768, 369,-32768,
750 | 399, -117,-32768, 144,-32768, -197, -272, -25, 4, 6,
751 | -32768,-32768,-32768,-32768,-32768,-32768, -14, 13, 133,-32768,
752 | -32768,-32768, 489,-32768,-32768, 282,-32768,-32768,-32768,-32768,
753 | 375,-32768, 293,-32768,-32768,-32768,-32768, 176,-32768,-32768,
754 | -32768,-32768,-32768, 235,-32768,-32768,-32768,-32768, 36,-32768,
755 | 389,-32768,-32768,-32768,-32768, 27, 75,-32768,-32768, 79,
756 | -237,-32768,-32768,-32768,-32768, 507,-32768, 24,-32768,-32768,
757 | -32768,-32768, -130,-32768, 178, -310, 210, -98,-32768,-32768,
758 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
759 | -32768,-32768,-32768, 381,-32768,-32768,-32768,-32768,-32768, 35,
760 | -32768, -115,-32768, -124,-32768, -386,-32768, 273, 272, 299,
761 | 296, 292,-32768, 295,-32768, 288,-32768, 289,-32768, 285,
762 | -32768, -104,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
763 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
764 | -32768,-32768, -111,-32768,-32768,-32768, -241, 265, 47,-32768,
765 | 128, 130,-32768,-32768,-32768, -452, 59, 42,-32768
766 | };
767 |
768 |
769 | #define YYLAST 1694
770 |
771 |
772 | static const short yytable[] = { 139,
773 | 30, 29, 176, 32, 94, 33, 223, 135, 130, 174,
774 | 424, 87, 472, 384, 512, 226, 382, 214, 431, 1,
775 | 1, 518, 355, 59, 1, 1, 64, 30, 29, 86,
776 | 32, 226, 33, 95, 61, 1, 1, 33, 88, 126,
777 | 1, 176, 127, 1, 124, 125, 62, 244, 84, 271,
778 | 59, 262, 65, 59, 105, 98, 66, 226, 247, 248,
779 | 250, 61, 389, 264, 265, 266, 267, 268, 269, 412,
780 | 381, 252, 413, 62, 419, 67, 68, 227, 71, 72,
781 | 90, 79, 228, 94, 90, 445, 517, 120, 97, 25,
782 | 122, 26, 353, 80, 354, 26, 26, 113, 379, 123,
783 | 120, 368, 272, 568, 80, 80, 26, 26, 136, 80,
784 | 353, 439, 354, 574, 99, 362, 377, 445, 98, 99,
785 | 131, -177, 431, 449, 88, 110, 88, 230, 75, 76,
786 | 327, 136, 94, 262, 8, 85, 510, 220, 69, 214,
787 | 111, 73, 280, 281, 385, 395, 450, 386, 519, 150,
788 | 451, 520, 115, 123, 88, 452, 400, 160, 88, 161,
789 | 138, 88, 519, 88, 393, 538, 398, 260, 398, 398,
790 | 398, 398, 117, 26, 398, 162, 119, 163, 164, 398,
791 | 121, 411, 398, 165, 236, 398, 238, 395, 417, 409,
792 | 470, 77, 132, 291, 357, 414, 282, 283, 138, 471,
793 | 214, 495, 292, 293, 134, 369, -63, -63, -63, -63,
794 | 430, 543, 544, 545, -63, 470, -63, 549, 152, 507,
795 | 166, 509, 159, 358, 479, 564, 167, 307, 168, 511,
796 | 308, 309, 169, 127, 565, 170, 171, 214, 521, 172,
797 | 173, 232, 123, 456, 142, 213, 142, 233, 569, 260,
798 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
799 | 176, 450, 176, 390, 353, 533, 388, 234, 26, 466,
800 | 534, 237, 536, 229, 8, 85, 310, 311, 142, 312,
801 | 443, 142, 444, 142, 239, 475, 468, 143, 539, 143,
802 | 519, 540, 519, 541, 398, 575, 251, 252, 161, 138,
803 | 519, 511, 240, 576, 481, 482, 483, 305, 241, 487,
804 | 100, 101, 102, 497, 162, 245, 163, 164, 353, 270,
805 | 388, 143, 165, 273, 143, 274, 143, 214, 136, 277,
806 | 278, 275, 456, 498, 285, 286, 176, 176, 362, 362,
807 | 369, 369, 475, 506, 508, 516, 144, 214, 144, 475,
808 | 288, 289, 381, 252, 220, 468, 276, 358, 226, 474,
809 | 313, 220, 510, 120, 214, 167, 365, 168, 398, 527,
810 | 359, 169, 458, 459, 170, 171, 502, 459, 172, 173,
811 | 144, 360, 176, 144, 361, 144, 503, 459, 220, 535,
812 | -161, 390, 453, 454, 475, 12, 13, 14, 103, 16,
813 | 17, 374, 375, 378, 391, 387, 392, -236, 426, 546,
814 | 547, 418, 557, 551, 420, 421, 422, 425, 427, 434,
815 | 428, 552, 435, 437, 446, 463, 436, 457, 461, 473,
816 | 567, 475, 561, 369, 562, 315, 2, 161, 138, 460,
817 | 462, 475, 478, 480, 220, 484, 488, 571, 489, 490,
818 | 491, 492, 572, 162, 493, 163, 164, 501, 529, 515,
819 | 522, 165, 3, 4, 5, 6, 7, 8, 9, 10,
820 | 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
821 | 21, 22, 316, 317, 318, 523, 319, 320, 321, 322,
822 | 323, 324, 325, 326, 23, 24, 524, 525, 134, 528,
823 | 530, 531, 537, 532, 167, 548, 168, 554, 555, 559,
824 | 169, 560, 563, 170, 171, 570, 573, 172, 173, 160,
825 | 2, 161, 138, 578, 579, 89, 243, 212, 465, 104,
826 | 380, 242, 376, 505, 235, 504, 96, 162, 448, 163,
827 | 164, 433, 246, 397, 401, 165, 3, 4, 5, 6,
828 | 7, 8, 85, 10, 11, 12, 13, 14, 15, 16,
829 | 17, 18, 19, 20, 21, 22, 315, 404, 161, 138,
830 | 403, 406, 402, 405, 408, 407, 416, 542, 500, 499,
831 | 558, 0, 0, 0, 162, 0, 163, 164, 167, 0,
832 | 168, 0, 165, 0, 169, 0, 0, 170, 171, 423,
833 | 0, 172, 173, 0, 0, 0, 0, 0, 0, 0,
834 | 0, 0, 0, 316, 317, 318, 0, 319, 320, 321,
835 | 322, 323, 324, 325, 326, 23, 24, 0, 0, 134,
836 | 0, 0, 0, 0, 0, 167, 0, 168, 0, 0,
837 | 0, 169, 0, 0, 170, 171, 0, 0, 172, 173,
838 | 251, 252, 161, 138, 0, 0, 0, 0, 0, 0,
839 | 0, 0, 0, 0, 2, 0, 0, 0, 162, 0,
840 | 163, 164, 251, 252, 161, 138, 165, 0, 0, 0,
841 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
842 | 162, 0, 163, 164, 0, 8, 85, 10, 165, 12,
843 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
844 | 0, 0, 0, 166, 253, 0, 254, 255, 0, 167,
845 | 0, 168, 0, 140, 0, 169, 0, 0, 170, 171,
846 | 0, 0, 172, 173, 0, 166, 464, 0, 254, 255,
847 | 0, 167, 160, 168, 161, 138, 0, 169, 0, 0,
848 | 170, 171, 0, 0, 172, 173, 0, 0, 0, 0,
849 | 162, 0, 163, 164, 160, 0, 161, 138, 165, 0,
850 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
851 | 0, 0, 162, 0, 163, 164, 160, 0, 161, 138,
852 | 165, 0, 0, 0, 0, 0, 0, 0, 0, 0,
853 | 0, 0, 0, 0, 162, 166, 163, 164, 0, 0,
854 | 0, 167, 165, 168, 0, 0, 0, 169, 0, 0,
855 | 170, 171, 0, 0, 172, 173, 0, 0, 0, 0,
856 | 0, 0, 0, 167, 394, 168, 0, 0, 0, 169,
857 | 0, 0, 170, 171, 0, 0, 172, 173, 0, 0,
858 | 0, 399, 0, 0, 0, 167, 160, 168, 161, 138,
859 | 0, 169, 0, 0, 170, 171, 0, 0, 172, 173,
860 | 0, 0, 0, 0, 162, 0, 163, 164, 160, 0,
861 | 161, 138, 165, 0, 0, 0, 0, 0, 0, 0,
862 | 0, 0, 0, 0, 0, 0, 162, 0, 163, 164,
863 | 0, 0, 0, 160, 165, 161, 138, 0, 0, 0,
864 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 410,
865 | 0, 162, 0, 163, 164, 167, 0, 168, 0, 165,
866 | 0, 169, 0, 0, 170, 171, 0, 0, 172, 173,
867 | 0, 0, 0, 0, 0, 0, 0, 167, 415, 168,
868 | 0, 0, 0, 169, 0, 0, 170, 171, 0, 0,
869 | 172, 173, 0, 429, 0, 0, 0, 0, 0, 0,
870 | 0, 0, 167, 160, 168, 161, 138, 0, 169, 0,
871 | 0, 170, 171, 0, 0, 172, 173, 2, 0, 0,
872 | 0, 162, 0, 163, 164, 160, 0, 161, 138, 165,
873 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
874 | 0, 0, 0, 162, 0, 163, 164, 0, 8, 85,
875 | 10, 165, 12, 13, 14, 15, 16, 17, 18, 19,
876 | 20, 21, 22, 0, 0, 0, 0, 0, 0, 0,
877 | 0, 438, 167, 0, 168, 0, 0, 0, 169, 0,
878 | 0, 170, 171, 0, 0, 172, 173, 0, 474, 0,
879 | 0, 0, 0, 0, 167, 160, 168, 161, 138, 0,
880 | 169, 0, 0, 170, 171, 0, 0, 172, 173, 0,
881 | 0, 0, 0, 162, 0, 163, 164, 160, 0, 161,
882 | 138, 165, 0, 0, 0, 0, 0, 0, 0, 0,
883 | 0, 0, 0, 0, 0, 162, 0, 163, 164, 0,
884 | 0, 0, 160, 165, 161, 138, 0, 0, 0, 0,
885 | 0, 0, 0, 0, 0, 485, 0, 0, 0, 0,
886 | 162, 0, 163, 164, 167, 0, 168, 0, 165, 0,
887 | 169, 0, 0, 170, 171, 0, 0, 172, 173, 0,
888 | 0, 0, 0, 0, 0, 494, 167, 0, 168, 0,
889 | 0, 0, 169, 0, 0, 170, 171, 0, 0, 172,
890 | 173, 0, 526, 0, 0, 0, 0, 0, 0, 0,
891 | 0, 167, 160, 168, 161, 138, 0, 169, 0, 0,
892 | 170, 171, 0, 0, 172, 173, 0, 0, 0, 0,
893 | 162, 0, 163, 164, 160, 0, 161, 138, 165, 0,
894 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
895 | 0, 0, 162, 0, 163, 164, 160, 0, 161, 138,
896 | 165, 0, 0, 0, 0, 0, 0, 0, 0, 0,
897 | 0, 0, 550, 0, 162, 0, 163, 164, 0, 0,
898 | 0, 167, 165, 168, 0, 0, 0, 169, 0, 0,
899 | 170, 171, 0, 0, 172, 173, 0, 556, 0, 0,
900 | 0, 0, 0, 167, 0, 168, 0, 0, 0, 169,
901 | 0, 0, 170, 171, 0, 0, 172, 173, 0, 566,
902 | 0, 0, 0, 0, 0, 167, 160, 168, 161, 138,
903 | 0, 169, 0, 0, 170, 171, 0, 0, 172, 173,
904 | 0, 0, 0, 0, 162, 0, 163, 164, 160, 0,
905 | 161, 138, 165, 0, 0, 0, 0, 0, 0, 0,
906 | 0, 0, 0, 160, 0, 161, 138, 0, 163, 164,
907 | 0, 0, 0, 0, 165, 0, 0, 0, 0, 0,
908 | 0, 0, 0, 163, 164, 0, 0, 0, 0, 165,
909 | 0, 0, 0, 0, 0, 167, 0, 168, 0, 0,
910 | 0, 169, 0, 0, 170, 171, 0, 0, 172, 173,
911 | 0, 467, 0, 0, 0, 0, 0, 167, 0, 168,
912 | 0, 0, 0, 169, 0, 0, 170, 171, 0, 0,
913 | 172, 173, 167, 160, 168, 161, 138, 0, 169, 0,
914 | 0, 170, 171, 0, 0, 172, 173, 0, 0, 0,
915 | 1, 2, 0, 163, 164, 0, 0, 0, 0, 165,
916 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
917 | 0, 0, 0, 0, 0, 0, 0, 3, 4, 5,
918 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
919 | 16, 17, 18, 19, 20, 21, 22, 1, 2, 0,
920 | 0, 0, 249, 0, 168, 0, 0, 0, 169, 23,
921 | 24, 170, 171, 0, 0, 172, 173, 0, 2, 25,
922 | 0, 26, 0, 0, 3, 4, 5, 6, 7, 8,
923 | 85, 10, 11, 12, 13, 14, 15, 16, 17, 18,
924 | 19, 20, 21, 22, 3, 4, 5, 6, 7, 8,
925 | 85, 10, 11, 12, 13, 14, 15, 16, 17, 18,
926 | 19, 20, 21, 22, 353, 2, 354, 440, 26, 0,
927 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
928 | 0, 0, 0, 0, 353, 0, 388, 440, 26, 0,
929 | 0, 3, 4, 5, 6, 7, 8, 85, 10, 11,
930 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
931 | 22, 219, 2, 0, 0, 0, 0, 0, 0, 0,
932 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
933 | 0, 0, 2, 0, 496, 447, 0, 0, 3, 4,
934 | 5, 6, 7, 8, 85, 10, 11, 12, 13, 14,
935 | 15, 16, 17, 18, 19, 20, 21, 22, 3, 4,
936 | 5, 6, 7, 8, 85, 10, 11, 12, 13, 14,
937 | 15, 16, 17, 18, 19, 20, 21, 22, 2, 0,
938 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
939 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
940 | 0, 0, 0, 0, 3, 4, 5, 6, 7, 8,
941 | 85, 10, 11, 12, 13, 14, 15, 16, 17, 18,
942 | 19, 20, 21, 22
943 | };
944 |
945 | static const short yycheck[] = { 111,
946 | 0, 0, 127, 0, 30, 0, 137, 106, 96, 127,
947 | 321, 26, 399, 255, 467, 6, 254, 133, 329, 3,
948 | 3, 474, 220, 0, 3, 3, 62, 27, 27, 26,
949 | 27, 6, 27, 30, 0, 3, 3, 32, 26, 62,
950 | 3, 166, 65, 3, 63, 64, 0, 159, 25, 22,
951 | 27, 167, 46, 30, 42, 32, 42, 6, 163, 164,
952 | 165, 27, 260, 168, 169, 170, 171, 172, 173, 307,
953 | 3, 4, 310, 27, 316, 3, 4, 68, 3, 4,
954 | 63, 36, 73, 109, 63, 358, 473, 82, 72, 72,
955 | 87, 74, 70, 72, 72, 74, 74, 66, 73, 87,
956 | 95, 68, 75, 556, 72, 72, 74, 74, 107, 72,
957 | 70, 353, 72, 566, 70, 227, 241, 390, 95, 70,
958 | 97, 72, 433, 72, 112, 72, 114, 142, 3, 4,
959 | 218, 130, 158, 249, 35, 36, 69, 137, 66, 255,
960 | 72, 66, 25, 26, 64, 270, 64, 67, 64, 114,
961 | 68, 67, 66, 141, 142, 73, 272, 3, 146, 5,
962 | 6, 149, 64, 151, 263, 67, 271, 167, 273, 274,
963 | 275, 276, 66, 74, 279, 21, 73, 23, 24, 284,
964 | 73, 306, 287, 29, 149, 290, 151, 312, 313, 294,
965 | 64, 66, 71, 74, 220, 311, 79, 80, 6, 73,
966 | 316, 443, 83, 84, 66, 231, 62, 63, 64, 65,
967 | 326, 522, 523, 524, 70, 64, 72, 528, 3, 65,
968 | 66, 463, 72, 220, 73, 64, 72, 20, 74, 467,
969 | 23, 24, 78, 65, 73, 81, 82, 353, 480, 85,
970 | 86, 63, 230, 368, 112, 73, 114, 63, 559, 249,
971 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
972 | 385, 64, 387, 260, 70, 68, 72, 67, 74, 387,
973 | 73, 67, 510, 141, 35, 36, 69, 70, 146, 72,
974 | 70, 149, 72, 151, 67, 410, 391, 112, 64, 114,
975 | 64, 67, 64, 67, 399, 67, 3, 4, 5, 6,
976 | 64, 539, 64, 67, 420, 421, 422, 65, 65, 425,
977 | 36, 37, 38, 444, 21, 3, 23, 24, 70, 72,
978 | 72, 146, 29, 21, 149, 76, 151, 443, 327, 18,
979 | 19, 77, 457, 449, 27, 28, 461, 462, 450, 451,
980 | 366, 367, 467, 461, 462, 470, 112, 463, 114, 474,
981 | 81, 82, 3, 4, 354, 460, 78, 354, 6, 66,
982 | 64, 361, 69, 358, 480, 72, 63, 74, 473, 485,
983 | 73, 78, 63, 64, 81, 82, 63, 64, 85, 86,
984 | 146, 64, 507, 149, 64, 151, 63, 64, 388, 507,
985 | 68, 388, 366, 367, 519, 39, 40, 41, 42, 43,
986 | 44, 67, 67, 67, 73, 68, 73, 68, 3, 525,
987 | 526, 71, 537, 529, 72, 72, 72, 72, 63, 68,
988 | 63, 533, 68, 63, 3, 7, 68, 68, 65, 68,
989 | 555, 556, 548, 459, 550, 3, 4, 5, 6, 73,
990 | 71, 566, 71, 7, 444, 55, 63, 563, 63, 67,
991 | 71, 73, 564, 21, 73, 23, 24, 63, 63, 73,
992 | 73, 29, 30, 31, 32, 33, 34, 35, 36, 37,
993 | 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
994 | 48, 49, 50, 51, 52, 73, 54, 55, 56, 57,
995 | 58, 59, 60, 61, 62, 63, 73, 72, 66, 73,
996 | 71, 73, 68, 73, 72, 63, 74, 63, 65, 53,
997 | 78, 73, 63, 81, 82, 63, 63, 85, 86, 3,
998 | 4, 5, 6, 0, 0, 27, 158, 129, 385, 41,
999 | 249, 157, 240, 459, 146, 457, 30, 21, 361, 23,
1000 | 24, 332, 162, 271, 273, 29, 30, 31, 32, 33,
1001 | 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
1002 | 44, 45, 46, 47, 48, 49, 3, 276, 5, 6,
1003 | 275, 284, 274, 279, 290, 287, 312, 519, 451, 450,
1004 | 539, -1, -1, -1, 21, -1, 23, 24, 72, -1,
1005 | 74, -1, 29, -1, 78, -1, -1, 81, 82, 36,
1006 | -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
1007 | -1, -1, -1, 50, 51, 52, -1, 54, 55, 56,
1008 | 57, 58, 59, 60, 61, 62, 63, -1, -1, 66,
1009 | -1, -1, -1, -1, -1, 72, -1, 74, -1, -1,
1010 | -1, 78, -1, -1, 81, 82, -1, -1, 85, 86,
1011 | 3, 4, 5, 6, -1, -1, -1, -1, -1, -1,
1012 | -1, -1, -1, -1, 4, -1, -1, -1, 21, -1,
1013 | 23, 24, 3, 4, 5, 6, 29, -1, -1, -1,
1014 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1015 | 21, -1, 23, 24, -1, 35, 36, 37, 29, 39,
1016 | 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
1017 | -1, -1, -1, 66, 67, -1, 69, 70, -1, 72,
1018 | -1, 74, -1, 63, -1, 78, -1, -1, 81, 82,
1019 | -1, -1, 85, 86, -1, 66, 67, -1, 69, 70,
1020 | -1, 72, 3, 74, 5, 6, -1, 78, -1, -1,
1021 | 81, 82, -1, -1, 85, 86, -1, -1, -1, -1,
1022 | 21, -1, 23, 24, 3, -1, 5, 6, 29, -1,
1023 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1024 | -1, -1, 21, -1, 23, 24, 3, -1, 5, 6,
1025 | 29, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1026 | -1, -1, -1, -1, 21, 66, 23, 24, -1, -1,
1027 | -1, 72, 29, 74, -1, -1, -1, 78, -1, -1,
1028 | 81, 82, -1, -1, 85, 86, -1, -1, -1, -1,
1029 | -1, -1, -1, 72, 73, 74, -1, -1, -1, 78,
1030 | -1, -1, 81, 82, -1, -1, 85, 86, -1, -1,
1031 | -1, 68, -1, -1, -1, 72, 3, 74, 5, 6,
1032 | -1, 78, -1, -1, 81, 82, -1, -1, 85, 86,
1033 | -1, -1, -1, -1, 21, -1, 23, 24, 3, -1,
1034 | 5, 6, 29, -1, -1, -1, -1, -1, -1, -1,
1035 | -1, -1, -1, -1, -1, -1, 21, -1, 23, 24,
1036 | -1, -1, -1, 3, 29, 5, 6, -1, -1, -1,
1037 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 66,
1038 | -1, 21, -1, 23, 24, 72, -1, 74, -1, 29,
1039 | -1, 78, -1, -1, 81, 82, -1, -1, 85, 86,
1040 | -1, -1, -1, -1, -1, -1, -1, 72, 73, 74,
1041 | -1, -1, -1, 78, -1, -1, 81, 82, -1, -1,
1042 | 85, 86, -1, 63, -1, -1, -1, -1, -1, -1,
1043 | -1, -1, 72, 3, 74, 5, 6, -1, 78, -1,
1044 | -1, 81, 82, -1, -1, 85, 86, 4, -1, -1,
1045 | -1, 21, -1, 23, 24, 3, -1, 5, 6, 29,
1046 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1047 | -1, -1, -1, 21, -1, 23, 24, -1, 35, 36,
1048 | 37, 29, 39, 40, 41, 42, 43, 44, 45, 46,
1049 | 47, 48, 49, -1, -1, -1, -1, -1, -1, -1,
1050 | -1, 71, 72, -1, 74, -1, -1, -1, 78, -1,
1051 | -1, 81, 82, -1, -1, 85, 86, -1, 66, -1,
1052 | -1, -1, -1, -1, 72, 3, 74, 5, 6, -1,
1053 | 78, -1, -1, 81, 82, -1, -1, 85, 86, -1,
1054 | -1, -1, -1, 21, -1, 23, 24, 3, -1, 5,
1055 | 6, 29, -1, -1, -1, -1, -1, -1, -1, -1,
1056 | -1, -1, -1, -1, -1, 21, -1, 23, 24, -1,
1057 | -1, -1, 3, 29, 5, 6, -1, -1, -1, -1,
1058 | -1, -1, -1, -1, -1, 63, -1, -1, -1, -1,
1059 | 21, -1, 23, 24, 72, -1, 74, -1, 29, -1,
1060 | 78, -1, -1, 81, 82, -1, -1, 85, 86, -1,
1061 | -1, -1, -1, -1, -1, 71, 72, -1, 74, -1,
1062 | -1, -1, 78, -1, -1, 81, 82, -1, -1, 85,
1063 | 86, -1, 63, -1, -1, -1, -1, -1, -1, -1,
1064 | -1, 72, 3, 74, 5, 6, -1, 78, -1, -1,
1065 | 81, 82, -1, -1, 85, 86, -1, -1, -1, -1,
1066 | 21, -1, 23, 24, 3, -1, 5, 6, 29, -1,
1067 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1068 | -1, -1, 21, -1, 23, 24, 3, -1, 5, 6,
1069 | 29, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1070 | -1, -1, 63, -1, 21, -1, 23, 24, -1, -1,
1071 | -1, 72, 29, 74, -1, -1, -1, 78, -1, -1,
1072 | 81, 82, -1, -1, 85, 86, -1, 66, -1, -1,
1073 | -1, -1, -1, 72, -1, 74, -1, -1, -1, 78,
1074 | -1, -1, 81, 82, -1, -1, 85, 86, -1, 66,
1075 | -1, -1, -1, -1, -1, 72, 3, 74, 5, 6,
1076 | -1, 78, -1, -1, 81, 82, -1, -1, 85, 86,
1077 | -1, -1, -1, -1, 21, -1, 23, 24, 3, -1,
1078 | 5, 6, 29, -1, -1, -1, -1, -1, -1, -1,
1079 | -1, -1, -1, 3, -1, 5, 6, -1, 23, 24,
1080 | -1, -1, -1, -1, 29, -1, -1, -1, -1, -1,
1081 | -1, -1, -1, 23, 24, -1, -1, -1, -1, 29,
1082 | -1, -1, -1, -1, -1, 72, -1, 74, -1, -1,
1083 | -1, 78, -1, -1, 81, 82, -1, -1, 85, 86,
1084 | -1, 66, -1, -1, -1, -1, -1, 72, -1, 74,
1085 | -1, -1, -1, 78, -1, -1, 81, 82, -1, -1,
1086 | 85, 86, 72, 3, 74, 5, 6, -1, 78, -1,
1087 | -1, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1088 | 3, 4, -1, 23, 24, -1, -1, -1, -1, 29,
1089 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1090 | -1, -1, -1, -1, -1, -1, -1, 30, 31, 32,
1091 | 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
1092 | 43, 44, 45, 46, 47, 48, 49, 3, 4, -1,
1093 | -1, -1, 72, -1, 74, -1, -1, -1, 78, 62,
1094 | 63, 81, 82, -1, -1, 85, 86, -1, 4, 72,
1095 | -1, 74, -1, -1, 30, 31, 32, 33, 34, 35,
1096 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
1097 | 46, 47, 48, 49, 30, 31, 32, 33, 34, 35,
1098 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
1099 | 46, 47, 48, 49, 70, 4, 72, 73, 74, -1,
1100 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1101 | -1, -1, -1, -1, 70, -1, 72, 73, 74, -1,
1102 | -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1103 | 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
1104 | 49, 3, 4, -1, -1, -1, -1, -1, -1, -1,
1105 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1106 | -1, -1, 4, -1, 73, 7, -1, -1, 30, 31,
1107 | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1108 | 42, 43, 44, 45, 46, 47, 48, 49, 30, 31,
1109 | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1110 | 42, 43, 44, 45, 46, 47, 48, 49, 4, -1,
1111 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1112 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1113 | -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
1114 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
1115 | 46, 47, 48, 49
1116 | };
1117 | /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1118 | #line 3 "/usr/share/misc/bison.simple"
1119 | /* This file comes from bison-1.28. */
1120 |
1121 | /* Skeleton output parser for bison,
1122 | Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
1123 |
1124 | This program is free software; you can redistribute it and/or modify
1125 | it under the terms of the GNU General Public License as published by
1126 | the Free Software Foundation; either version 2, or (at your option)
1127 | any later version.
1128 |
1129 | This program is distributed in the hope that it will be useful,
1130 | but WITHOUT ANY WARRANTY; without even the implied warranty of
1131 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1132 | GNU General Public License for more details.
1133 |
1134 | You should have received a copy of the GNU General Public License
1135 | along with this program; if not, write to the Free Software
1136 | Foundation, Inc., 59 Temple Place - Suite 330,
1137 | Boston, MA 02111-1307, USA. */
1138 |
1139 | /* As a special exception, when this file is copied by Bison into a
1140 | Bison output file, you may use that output file without restriction.
1141 | This special exception was added by the Free Software Foundation
1142 | in version 1.24 of Bison. */
1143 |
1144 | /* This is the parser code that is written into each bison parser
1145 | when the %semantic_parser declaration is not specified in the grammar.
1146 | It was written by Richard Stallman by simplifying the hairy parser
1147 | used when %semantic_parser is specified. */
1148 |
1149 | #ifndef YYSTACK_USE_ALLOCA
1150 | #ifdef alloca
1151 | #define YYSTACK_USE_ALLOCA
1152 | #else /* alloca not defined */
1153 | #ifdef __GNUC__
1154 | #define YYSTACK_USE_ALLOCA
1155 | #define alloca __builtin_alloca
1156 | #else /* not GNU C. */
1157 | #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
1158 | #define YYSTACK_USE_ALLOCA
1159 | #include <alloca.h>
1160 | #else /* not sparc */
1161 | /* We think this test detects Watcom and Microsoft C. */
1162 | /* This used to test MSDOS, but that is a bad idea
1163 | since that symbol is in the user namespace. */
1164 | #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
1165 | #if 0 /* No need for malloc.h, which pollutes the namespace;
1166 | instead, just don't use alloca. */
1167 | #include <malloc.h>
1168 | #endif
1169 | #else /* not MSDOS, or __TURBOC__ */
1170 | #if defined(_AIX)
1171 | /* I don't know what this was needed for, but it pollutes the namespace.
1172 | So I turned it off. rms, 2 May 1997. */
1173 | /* #include <malloc.h> */
1174 | #pragma alloca
1175 | #define YYSTACK_USE_ALLOCA
1176 | #else /* not MSDOS, or __TURBOC__, or _AIX */
1177 | #if 0
1178 | #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
1179 | and on HPUX 10. Eventually we can turn this on. */
1180 | #define YYSTACK_USE_ALLOCA
1181 | #define alloca __builtin_alloca
1182 | #endif /* __hpux */
1183 | #endif
1184 | #endif /* not _AIX */
1185 | #endif /* not MSDOS, or __TURBOC__ */
1186 | #endif /* not sparc */
1187 | #endif /* not GNU C */
1188 | #endif /* alloca not defined */
1189 | #endif /* YYSTACK_USE_ALLOCA not defined */
1190 |
1191 | #ifdef YYSTACK_USE_ALLOCA
1192 | #define YYSTACK_ALLOC alloca
1193 | #else
1194 | #define YYSTACK_ALLOC malloc
1195 | #endif
1196 |
1197 | /* Note: there must be only one dollar sign in this file.
1198 | It is replaced by the list of actions, each action
1199 | as one case of the switch. */
1200 |
1201 | #define yyerrok (yyerrstatus = 0)
1202 | #define yyclearin (yychar = YYEMPTY)
1203 | #define YYEMPTY -2
1204 | #define YYEOF 0
1205 | #define YYACCEPT goto yyacceptlab
1206 | #define YYABORT goto yyabortlab
1207 | #define YYERROR goto yyerrlab1
1208 | /* Like YYERROR except do call yyerror.
1209 | This remains here temporarily to ease the
1210 | transition to the new meaning of YYERROR, for GCC.
1211 | Once GCC version 2 has supplanted version 1, this can go. */
1212 | #define YYFAIL goto yyerrlab
1213 | #define YYRECOVERING() (!!yyerrstatus)
1214 | #define YYBACKUP(token, value) \
1215 | do \
1216 | if (yychar == YYEMPTY && yylen == 1) \
1217 | { yychar = (token), yylval = (value); \
1218 | yychar1 = YYTRANSLATE (yychar); \
1219 | YYPOPSTACK; \
1220 | goto yybackup; \
1221 | } \
1222 | else \
1223 | { yyerror ("syntax error: cannot back up"); YYERROR; } \
1224 | while (0)
1225 |
1226 | #define YYTERROR 1
1227 | #define YYERRCODE 256
1228 |
1229 | #ifndef YYPURE
1230 | #define YYLEX yylex()
1231 | #endif
1232 |
1233 | #ifdef YYPURE
1234 | #ifdef YYLSP_NEEDED
1235 | #ifdef YYLEX_PARAM
1236 | #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
1237 | #else
1238 | #define YYLEX yylex(&yylval, &yylloc)
1239 | #endif
1240 | #else /* not YYLSP_NEEDED */
1241 | #ifdef YYLEX_PARAM
1242 | #define YYLEX yylex(&yylval, YYLEX_PARAM)
1243 | #else
1244 | #define YYLEX yylex(&yylval)
1245 | #endif
1246 | #endif /* not YYLSP_NEEDED */
1247 | #endif
1248 |
1249 | /* If nonreentrant, generate the variables here */
1250 |
1251 | #ifndef YYPURE
1252 |
1253 | int yychar; /* the lookahead symbol */
1254 | YYSTYPE yylval; /* the semantic value of the */
1255 | /* lookahead symbol */
1256 |
1257 | #ifdef YYLSP_NEEDED
1258 | YYLTYPE yylloc; /* location data for the lookahead */
1259 | /* symbol */
1260 | #endif
1261 |
1262 | int yynerrs; /* number of parse errors so far */
1263 | #endif /* not YYPURE */
1264 |
1265 | #if YYDEBUG != 0
1266 | int yydebug; /* nonzero means print parse trace */
1267 | /* Since this is uninitialized, it does not stop multiple parsers
1268 | from coexisting. */
1269 | #endif
1270 |
1271 | /* YYINITDEPTH indicates the initial size of the parser's stacks */
1272 |
1273 | #ifndef YYINITDEPTH
1274 | #define YYINITDEPTH 200
1275 | #endif
1276 |
1277 | /* YYMAXDEPTH is the maximum size the stacks can grow to
1278 | (effective only if the built-in stack extension method is used). */
1279 |
1280 | #if YYMAXDEPTH == 0
1281 | #undef YYMAXDEPTH
1282 | #endif
1283 |
1284 | #ifndef YYMAXDEPTH
1285 | #define YYMAXDEPTH 10000
1286 | #endif
1287 |
1288 | /* Define __yy_memcpy. Note that the size argument
1289 | should be passed with type unsigned int, because that is what the non-GCC
1290 | definitions require. With GCC, __builtin_memcpy takes an arg
1291 | of type size_t, but it can handle unsigned int. */
1292 |
1293 | #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
1294 | #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
1295 | #else /* not GNU C or C++ */
1296 | #ifndef __cplusplus
1297 |
1298 | /* This is the most reliable way to avoid incompatibilities
1299 | in available built-in functions on various systems. */
1300 | static void
1301 | __yy_memcpy (to, from, count)
1302 | char *to;
1303 | char *from;
1304 | unsigned int count;
1305 | {
1306 | register char *f = from;
1307 | register char *t = to;
1308 | register int i = count;
1309 |
1310 | while (i-- > 0)
1311 | *t++ = *f++;
1312 | }
1313 |
1314 | #else /* __cplusplus */
1315 |
1316 | /* This is the most reliable way to avoid incompatibilities
1317 | in available built-in functions on various systems. */
1318 | static void
1319 | __yy_memcpy (char *to, char *from, unsigned int count)
1320 | {
1321 | register char *t = to;
1322 | register char *f = from;
1323 | register int i = count;
1324 |
1325 | while (i-- > 0)
1326 | *t++ = *f++;
1327 | }
1328 |
1329 | #endif
1330 | #endif
1331 |
1332 | #line 217 "/usr/share/misc/bison.simple"
1333 |
1334 | /* The user can define YYPARSE_PARAM as the name of an argument to be passed
1335 | into yyparse. The argument should have type void *.
1336 | It should actually point to an object.
1337 | Grammar actions can access the variable by casting it
1338 | to the proper pointer type. */
1339 |
1340 | #ifdef YYPARSE_PARAM
1341 | #ifdef __cplusplus
1342 | #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1343 | #define YYPARSE_PARAM_DECL
1344 | #else /* not __cplusplus */
1345 | #define YYPARSE_PARAM_ARG YYPARSE_PARAM
1346 | #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1347 | #endif /* not __cplusplus */
1348 | #else /* not YYPARSE_PARAM */
1349 | #define YYPARSE_PARAM_ARG
1350 | #define YYPARSE_PARAM_DECL
1351 | #endif /* not YYPARSE_PARAM */
1352 |
1353 | /* Prevent warning if -Wstrict-prototypes. */
1354 | #ifdef __GNUC__
1355 | #ifdef YYPARSE_PARAM
1356 | int yyparse (void *);
1357 | #else
1358 | int yyparse (void);
1359 | #endif
1360 | #endif
1361 |
1362 | int
1363 | yyparse(YYPARSE_PARAM_ARG)
1364 | YYPARSE_PARAM_DECL
1365 | {
1366 | register int yystate;
1367 | register int yyn;
1368 | register short *yyssp;
1369 | register YYSTYPE *yyvsp;
1370 | int yyerrstatus; /* number of tokens to shift before error messages enabled */
1371 | int yychar1 = 0; /* lookahead token as an internal (translated) token number */
1372 |
1373 | short yyssa[YYINITDEPTH]; /* the state stack */
1374 | YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
1375 |
1376 | short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1377 | YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
1378 |
1379 | #ifdef YYLSP_NEEDED
1380 | YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1381 | YYLTYPE *yyls = yylsa;
1382 | YYLTYPE *yylsp;
1383 |
1384 | #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1385 | #else
1386 | #define YYPOPSTACK (yyvsp--, yyssp--)
1387 | #endif
1388 |
1389 | int yystacksize = YYINITDEPTH;
1390 | int yyfree_stacks = 0;
1391 |
1392 | #ifdef YYPURE
1393 | int yychar;
1394 | YYSTYPE yylval;
1395 | int yynerrs;
1396 | #ifdef YYLSP_NEEDED
1397 | YYLTYPE yylloc;
1398 | #endif
1399 | #endif
1400 |
1401 | YYSTYPE yyval; /* the variable used to return */
1402 | /* semantic values from the action */
1403 | /* routines */
1404 |
1405 | int yylen;
1406 |
1407 | #if YYDEBUG != 0
1408 | if (yydebug)
1409 | fprintf(stderr, "Starting parse\n");
1410 | #endif
1411 |
1412 | yystate = 0;
1413 | yyerrstatus = 0;
1414 | yynerrs = 0;
1415 | yychar = YYEMPTY; /* Cause a token to be read. */
1416 |
1417 | /* Initialize stack pointers.
1418 | Waste one element of value and location stack
1419 | so that they stay on the same level as the state stack.
1420 | The wasted elements are never initialized. */
1421 |
1422 | yyssp = yyss - 1;
1423 | yyvsp = yyvs;
1424 | #ifdef YYLSP_NEEDED
1425 | yylsp = yyls;
1426 | #endif
1427 |
1428 | /* Push a new state, which is found in yystate . */
1429 | /* In all cases, when you get here, the value and location stacks
1430 | have just been pushed. so pushing a state here evens the stacks. */
1431 | yynewstate:
1432 |
1433 | *++yyssp = yystate;
1434 |
1435 | if (yyssp >= yyss + yystacksize - 1)
1436 | {
1437 | /* Give user a chance to reallocate the stack */
1438 | /* Use copies of these so that the &'s don't force the real ones into memory. */
1439 | YYSTYPE *yyvs1 = yyvs;
1440 | short *yyss1 = yyss;
1441 | #ifdef YYLSP_NEEDED
1442 | YYLTYPE *yyls1 = yyls;
1443 | #endif
1444 |
1445 | /* Get the current used size of the three stacks, in elements. */
1446 | int size = yyssp - yyss + 1;
1447 |
1448 | #ifdef yyoverflow
1449 | /* Each stack pointer address is followed by the size of
1450 | the data in use in that stack, in bytes. */
1451 | #ifdef YYLSP_NEEDED
1452 | /* This used to be a conditional around just the two extra args,
1453 | but that might be undefined if yyoverflow is a macro. */
1454 | yyoverflow("parser stack overflow",
1455 | &yyss1, size * sizeof (*yyssp),
1456 | &yyvs1, size * sizeof (*yyvsp),
1457 | &yyls1, size * sizeof (*yylsp),
1458 | &yystacksize);
1459 | #else
1460 | yyoverflow("parser stack overflow",
1461 | &yyss1, size * sizeof (*yyssp),
1462 | &yyvs1, size * sizeof (*yyvsp),
1463 | &yystacksize);
1464 | #endif
1465 |
1466 | yyss = yyss1; yyvs = yyvs1;
1467 | #ifdef YYLSP_NEEDED
1468 | yyls = yyls1;
1469 | #endif
1470 | #else /* no yyoverflow */
1471 | /* Extend the stack our own way. */
1472 | if (yystacksize >= YYMAXDEPTH)
1473 | {
1474 | yyerror("parser stack overflow");
1475 | if (yyfree_stacks)
1476 | {
1477 | free (yyss);
1478 | free (yyvs);
1479 | #ifdef YYLSP_NEEDED
1480 | free (yyls);
1481 | #endif
1482 | }
1483 | return 2;
1484 | }
1485 | yystacksize *= 2;
1486 | if (yystacksize > YYMAXDEPTH)
1487 | yystacksize = YYMAXDEPTH;
1488 | #ifndef YYSTACK_USE_ALLOCA
1489 | yyfree_stacks = 1;
1490 | #endif
1491 | yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
1492 | __yy_memcpy ((char *)yyss, (char *)yyss1,
1493 | size * (unsigned int) sizeof (*yyssp));
1494 | yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
1495 | __yy_memcpy ((char *)yyvs, (char *)yyvs1,
1496 | size * (unsigned int) sizeof (*yyvsp));
1497 | #ifdef YYLSP_NEEDED
1498 | yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
1499 | __yy_memcpy ((char *)yyls, (char *)yyls1,
1500 | size * (unsigned int) sizeof (*yylsp));
1501 | #endif
1502 | #endif /* no yyoverflow */
1503 |
1504 | yyssp = yyss + size - 1;
1505 | yyvsp = yyvs + size - 1;
1506 | #ifdef YYLSP_NEEDED
1507 | yylsp = yyls + size - 1;
1508 | #endif
1509 |
1510 | #if YYDEBUG != 0
1511 | if (yydebug)
1512 | fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1513 | #endif
1514 |
1515 | if (yyssp >= yyss + yystacksize - 1)
1516 | YYABORT;
1517 | }
1518 |
1519 | #if YYDEBUG != 0
1520 | if (yydebug)
1521 | fprintf(stderr, "Entering state %d\n", yystate);
1522 | #endif
1523 |
1524 | goto yybackup;
1525 | yybackup:
1526 |
1527 | /* Do appropriate processing given the current state. */
1528 | /* Read a lookahead token if we need one and don't already have one. */
1529 | /* yyresume: */
1530 |
1531 | /* First try to decide what to do without reference to lookahead token. */
1532 |
1533 | yyn = yypact[yystate];
1534 | if (yyn == YYFLAG)
1535 | goto yydefault;
1536 |
1537 | /* Not known => get a lookahead token if don't already have one. */
1538 |
1539 | /* yychar is either YYEMPTY or YYEOF
1540 | or a valid token in external form. */
1541 |
1542 | if (yychar == YYEMPTY)
1543 | {
1544 | #if YYDEBUG != 0
1545 | if (yydebug)
1546 | fprintf(stderr, "Reading a token: ");
1547 | #endif
1548 | yychar = YYLEX;
1549 | }
1550 |
1551 | /* Convert token to internal form (in yychar1) for indexing tables with */
1552 |
1553 | if (yychar <= 0) /* This means end of input. */
1554 | {
1555 | yychar1 = 0;
1556 | yychar = YYEOF; /* Don't call YYLEX any more */
1557 |
1558 | #if YYDEBUG != 0
1559 | if (yydebug)
1560 | fprintf(stderr, "Now at end of input.\n");
1561 | #endif
1562 | }
1563 | else
1564 | {
1565 | yychar1 = YYTRANSLATE(yychar);
1566 |
1567 | #if YYDEBUG != 0
1568 | if (yydebug)
1569 | {
1570 | fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1571 | /* Give the individual parser a way to print the precise meaning
1572 | of a token, for further debugging info. */
1573 | #ifdef YYPRINT
1574 | YYPRINT (stderr, yychar, yylval);
1575 | #endif
1576 | fprintf (stderr, ")\n");
1577 | }
1578 | #endif
1579 | }
1580 |
1581 | yyn += yychar1;
1582 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1583 | goto yydefault;
1584 |
1585 | yyn = yytable[yyn];
1586 |
1587 | /* yyn is what to do for this token type in this state.
1588 | Negative => reduce, -yyn is rule number.
1589 | Positive => shift, yyn is new state.
1590 | New state is final state => don't bother to shift,
1591 | just return success.
1592 | 0, or most negative number => error. */
1593 |
1594 | if (yyn < 0)
1595 | {
1596 | if (yyn == YYFLAG)
1597 | goto yyerrlab;
1598 | yyn = -yyn;
1599 | goto yyreduce;
1600 | }
1601 | else if (yyn == 0)
1602 | goto yyerrlab;
1603 |
1604 | if (yyn == YYFINAL)
1605 | YYACCEPT;
1606 |
1607 | /* Shift the lookahead token. */
1608 |
1609 | #if YYDEBUG != 0
1610 | if (yydebug)
1611 | fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1612 | #endif
1613 |
1614 | /* Discard the token being shifted unless it is eof. */
1615 | if (yychar != YYEOF)
1616 | yychar = YYEMPTY;
1617 |
1618 | *++yyvsp = yylval;
1619 | #ifdef YYLSP_NEEDED
1620 | *++yylsp = yylloc;
1621 | #endif
1622 |
1623 | /* count tokens shifted since error; after three, turn off error status. */
1624 | if (yyerrstatus) yyerrstatus--;
1625 |
1626 | yystate = yyn;
1627 | goto yynewstate;
1628 |
1629 | /* Do the default action for the current state. */
1630 | yydefault:
1631 |
1632 | yyn = yydefact[yystate];
1633 | if (yyn == 0)
1634 | goto yyerrlab;
1635 |
1636 | /* Do a reduction. yyn is the number of a rule to reduce with. */
1637 | yyreduce:
1638 | yylen = yyr2[yyn];
1639 | if (yylen > 0)
1640 | yyval = yyvsp[1-yylen]; /* implement default value of the action */
1641 |
1642 | #if YYDEBUG != 0
1643 | if (yydebug)
1644 | {
1645 | int i;
1646 |
1647 | fprintf (stderr, "Reducing via rule %d (line %d), ",
1648 | yyn, yyrline[yyn]);
1649 |
1650 | /* Print the symbols being reduced, and their result. */
1651 | for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1652 | fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1653 | fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1654 | }
1655 | #endif
1656 |
1657 |
1658 | switch (yyn) {
1659 |
1660 | case 5:
1661 | #line 180 "parse.y"
1662 | { scope=0; reset(); common_comment=NULL; in_typedef=0; GetCurrentComment(); ;
1663 | break;}
1664 | case 6:
1665 | #line 182 "parse.y"
1666 | { scope=0; reset(); common_comment=NULL; in_typedef=0; GetCurrentComment(); ;
1667 | break;}
1668 | case 9:
1669 | #line 191 "parse.y"
1670 | { scope=0; reset(); common_comment=NULL; in_typedef=0; ;
1671 | break;}
1672 | case 10:
1673 | #line 193 "parse.y"
1674 | { scope=0; reset(); common_comment=NULL; in_typedef=0;
1675 | yyval=yyvsp[0]; ;
1676 | break;}
1677 | case 11:
1678 | #line 199 "parse.y"
1679 | { in_type_spec=0; ;
1680 | break;}
1681 | case 12:
1682 | #line 201 "parse.y"
1683 | { in_type_spec=0; ;
1684 | break;}
1685 | case 13:
1686 | #line 206 "parse.y"
1687 | { if(!in_typedef && !in_function && !common_comment)
1688 | {common_comment=CopyString(GetCurrentComment()); SetCurrentComment(common_comment);} ;
1689 | break;}
1690 | case 15:
1691 | #line 213 "parse.y"
1692 | { if(yyvsp[-1]) yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); else yyval=yyvsp[0]; ;
1693 | break;}
1694 | case 16:
1695 | #line 215 "parse.y"
1696 | { if(!current->type) current->type=yyvsp[0]; ;
1697 | break;}
1698 | case 17:
1699 | #line 217 "parse.y"
1700 | { if(!current->type) current->type=yyvsp[-1];
1701 | yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
1702 | break;}
1703 | case 19:
1704 | #line 221 "parse.y"
1705 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
1706 | break;}
1707 | case 21:
1708 | #line 228 "parse.y"
1709 | { in_type_spec=1; ;
1710 | break;}
1711 | case 23:
1712 | #line 233 "parse.y"
1713 | {
1714 | if((in_function==0 || in_function==3) && !in_funcdef && !in_structunion)
1715 | {
1716 | char* specific_comment=GetCurrentComment();
1717 | if(!common_comment) SetCurrentComment(specific_comment); else
1718 | if(!specific_comment) SetCurrentComment(common_comment); else
1719 | if(strcmp(common_comment,specific_comment)) SetCurrentComment(ConcatStrings(3,common_comment," ",specific_comment)); else
1720 | SetCurrentComment(common_comment);
1721 | }
1722 |
1723 | if(in_typedef)
1724 | {
1725 | char* vname=strstr(yyvsp[0],current->name);
1726 | SeenTypedefName(current->name,vname[strlen(current->name)]=='('?-1:1);
1727 | if(!in_header)
1728 | SeenTypedef(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0]));
1729 | if(in_function==3)
1730 | DownScope();
1731 | }
1732 | else
1733 | if(in_function==2)
1734 | SeenFunctionArg(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0]));
1735 | else
1736 | {
1737 | char* vname=strstr(yyvsp[0],current->name);
1738 | if(vname[strlen(current->name)]!='(' && IsATypeName(current->type)!='f')
1739 | {
1740 | if((in_funcbody==0 || scope&EXTERN_F) && !in_structunion && !(in_header==GLOBAL && scope&EXTERN_H))
1741 | SeenVariableDefinition(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0]),SCOPE);
1742 | else
1743 | if(in_funcbody)
1744 | SeenScopeVariable(current->name);
1745 | }
1746 | else
1747 | {
1748 | SeenFunctionProto(current->name,in_funcbody);
1749 | if(in_function==3)
1750 | DownScope();
1751 | }
1752 | }
1753 |
1754 | if(in_function==3) in_function=0;
1755 | ;
1756 | break;}
1757 | case 43:
1758 | #line 320 "parse.y"
1759 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
1760 | break;}
1761 | case 45:
1762 | #line 326 "parse.y"
1763 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]);
1764 | { int i=0; while(yyvsp[-1][i] && yyvsp[-1][i]=='*') i++; if(!yyvsp[-1][i]) in_type_spec=0; } ;
1765 | break;}
1766 | case 46:
1767 | #line 329 "parse.y"
1768 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
1769 | break;}
1770 | case 47:
1771 | #line 331 "parse.y"
1772 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
1773 | break;}
1774 | case 48:
1775 | #line 333 "parse.y"
1776 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
1777 | break;}
1778 | case 49:
1779 | #line 335 "parse.y"
1780 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
1781 | break;}
1782 | case 50:
1783 | #line 337 "parse.y"
1784 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
1785 | break;}
1786 | case 51:
1787 | #line 339 "parse.y"
1788 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
1789 | break;}
1790 | case 52:
1791 | #line 341 "parse.y"
1792 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
1793 | break;}
1794 | case 53:
1795 | #line 343 "parse.y"
1796 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
1797 | break;}
1798 | case 54:
1799 | #line 350 "parse.y"
1800 | { in_type_spec=0; ;
1801 | break;}
1802 | case 55:
1803 | #line 352 "parse.y"
1804 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
1805 | break;}
1806 | case 57:
1807 | #line 358 "parse.y"
1808 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
1809 | break;}
1810 | case 58:
1811 | #line 360 "parse.y"
1812 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
1813 | break;}
1814 | case 59:
1815 | #line 362 "parse.y"
1816 | { yyval=ConcatStrings(4,yyvsp[-2]," ",yyvsp[-1],yyvsp[0]); ;
1817 | break;}
1818 | case 61:
1819 | #line 368 "parse.y"
1820 | { if(yyvsp[-1][0]=='*' && yyvsp[-1][1]==' ') { yyvsp[-1]=&yyvsp[-1][1]; yyvsp[-1][0]='*'; }
1821 | yyval=ConcatStrings(4," ",yyvsp[-2],yyvsp[-1],yyvsp[0]);
1822 | ;
1823 | break;}
1824 | case 64:
1825 | #line 377 "parse.y"
1826 | { yyval=ConcatStrings(2," ",yyvsp[0]); current->name=yyvsp[0];
1827 | if(!current->type) current->type="int";
1828 | if(in_funcdef==1 && in_function!=3 && !in_structunion) SeenScopeVariable(yyvsp[0]); ;
1829 | break;}
1830 | case 65:
1831 | #line 384 "parse.y"
1832 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
1833 | break;}
1834 | case 66:
1835 | #line 385 "parse.y"
1836 | { in_type_spec=0; ;
1837 | break;}
1838 | case 67:
1839 | #line 385 "parse.y"
1840 | { in_type_spec=1; ;
1841 | break;}
1842 | case 68:
1843 | #line 386 "parse.y"
1844 | { yyval=ConcatStrings(4,yyvsp[-5],yyvsp[-4],yyvsp[-2],yyvsp[0]); ;
1845 | break;}
1846 | case 70:
1847 | #line 397 "parse.y"
1848 | { yyval=NULL; ;
1849 | break;}
1850 | case 71:
1851 | #line 399 "parse.y"
1852 | { yyval=NULL;
1853 | if(in_funcbody) scope|=EXTERN_F;
1854 | else if(in_header) scope|=EXTERN_H;
1855 | else scope|=EXTERNAL; ;
1856 | break;}
1857 | case 72:
1858 | #line 404 "parse.y"
1859 | { yyval=NULL; ;
1860 | break;}
1861 | case 73:
1862 | #line 406 "parse.y"
1863 | { yyval=NULL; scope |= LOCAL; ;
1864 | break;}
1865 | case 74:
1866 | #line 408 "parse.y"
1867 | { yyval=NULL;
1868 | in_typedef=1; if(!in_header) SeenTypedef(NULL,NULL);
1869 | common_comment=CopyString(GetCurrentComment()); ;
1870 | break;}
1871 | case 75:
1872 | #line 412 "parse.y"
1873 | { yyval=NULL; scope |= INLINED; ;
1874 | break;}
1875 | case 77:
1876 | #line 418 "parse.y"
1877 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
1878 | break;}
1879 | case 78:
1880 | #line 423 "parse.y"
1881 | { if(!current->type) current->qual=ConcatStrings(3,current->qual,yyvsp[0]," "); ;
1882 | break;}
1883 | case 79:
1884 | #line 425 "parse.y"
1885 | { if(!current->type) current->qual=ConcatStrings(3,current->qual,yyvsp[0]," "); ;
1886 | break;}
1887 | case 80:
1888 | #line 432 "parse.y"
1889 | { in_type_spec=1; ;
1890 | break;}
1891 | case 90:
1892 | #line 449 "parse.y"
1893 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
1894 | break;}
1895 | case 91:
1896 | #line 451 "parse.y"
1897 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
1898 | break;}
1899 | case 93:
1900 | #line 457 "parse.y"
1901 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
1902 | break;}
1903 | case 94:
1904 | #line 459 "parse.y"
1905 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
1906 | break;}
1907 | case 103:
1908 | #line 481 "parse.y"
1909 | { in_type_spec=0; ;
1910 | break;}
1911 | case 104:
1912 | #line 483 "parse.y"
1913 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
1914 | break;}
1915 | case 107:
1916 | #line 495 "parse.y"
1917 | { push();
1918 | if(!in_header)
1919 | {
1920 | if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion);
1921 | else SeenStructUnionStart(yyvsp[-1]);
1922 | }
1923 | in_structunion++; ;
1924 | break;}
1925 | case 108:
1926 | #line 503 "parse.y"
1927 | { pop(); in_structunion--;
1928 | if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}");
1929 | if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd();
1930 | yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); ;
1931 | break;}
1932 | case 109:
1933 | #line 508 "parse.y"
1934 | { push();
1935 | if(!in_header)
1936 | {
1937 | if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion);
1938 | else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]));
1939 | }
1940 | in_structunion++; ;
1941 | break;}
1942 | case 110:
1943 | #line 516 "parse.y"
1944 | { pop(); in_structunion--;
1945 | if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]);
1946 | if(!in_header && !in_structunion) SeenStructUnionEnd();
1947 | yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]);;
1948 | break;}
1949 | case 114:
1950 | #line 530 "parse.y"
1951 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
1952 | break;}
1953 | case 115:
1954 | #line 535 "parse.y"
1955 | { if(!in_header) SeenStructUnionComp(yyvsp[0],in_structunion); ;
1956 | break;}
1957 | case 116:
1958 | #line 537 "parse.y"
1959 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); if(!in_header) SeenStructUnionComp(yyvsp[-2],in_structunion); ;
1960 | break;}
1961 | case 118:
1962 | #line 546 "parse.y"
1963 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
1964 | break;}
1965 | case 123:
1966 | #line 563 "parse.y"
1967 | { push();
1968 | if(!in_header)
1969 | {
1970 | if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion);
1971 | else SeenStructUnionStart(yyvsp[-1]);
1972 | }
1973 | in_structunion++; ;
1974 | break;}
1975 | case 124:
1976 | #line 571 "parse.y"
1977 | { pop(); in_structunion--;
1978 | if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}");
1979 | if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd();
1980 | yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); ;
1981 | break;}
1982 | case 125:
1983 | #line 576 "parse.y"
1984 | { push();
1985 | if(!in_header)
1986 | {
1987 | if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion);
1988 | else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]));
1989 | }
1990 | in_structunion++; ;
1991 | break;}
1992 | case 126:
1993 | #line 584 "parse.y"
1994 | { pop(); in_structunion--;
1995 | if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]);
1996 | if(!in_header && !in_structunion) SeenStructUnionEnd();
1997 | yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]);;
1998 | break;}
1999 | case 127:
2000 | #line 592 "parse.y"
2001 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
2002 | break;}
2003 | case 132:
2004 | #line 609 "parse.y"
2005 | { push();
2006 | if(!in_header)
2007 | {
2008 | if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion);
2009 | else SeenStructUnionStart(yyvsp[-1]);
2010 | }
2011 | in_structunion++; ;
2012 | break;}
2013 | case 133:
2014 | #line 617 "parse.y"
2015 | { pop(); in_structunion--;
2016 | if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}");
2017 | if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd();
2018 | yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); ;
2019 | break;}
2020 | case 134:
2021 | #line 622 "parse.y"
2022 | { push();
2023 | if(!in_header)
2024 | {
2025 | if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion);
2026 | else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]));
2027 | }
2028 | in_structunion++; ;
2029 | break;}
2030 | case 135:
2031 | #line 630 "parse.y"
2032 | { pop(); in_structunion--;
2033 | if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]);
2034 | if(!in_header && !in_structunion) SeenStructUnionEnd();
2035 | yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]);;
2036 | break;}
2037 | case 136:
2038 | #line 638 "parse.y"
2039 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
2040 | break;}
2041 | case 142:
2042 | #line 656 "parse.y"
2043 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
2044 | break;}
2045 | case 144:
2046 | #line 662 "parse.y"
2047 | { yyval = ConcatStrings(3, yyvsp[-1], " ", yyvsp[0]);
2048 | if(!in_header) SeenStructUnionComp(yyvsp[-1],in_structunion); ;
2049 | break;}
2050 | case 145:
2051 | #line 665 "parse.y"
2052 | { yyval = ConcatStrings(3, yyvsp[-1], " ", yyvsp[0]);
2053 | if(!in_header) SeenStructUnionComp(yyvsp[-1],in_structunion); ;
2054 | break;}
2055 | case 147:
2056 | #line 672 "parse.y"
2057 | { comp_type=yyvsp[0]; ;
2058 | break;}
2059 | case 148:
2060 | #line 674 "parse.y"
2061 | { yyval=ConcatStrings(3,yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; ;
2062 | break;}
2063 | case 149:
2064 | #line 676 "parse.y"
2065 | { comp_type=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
2066 | break;}
2067 | case 150:
2068 | #line 678 "parse.y"
2069 | { yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; ;
2070 | break;}
2071 | case 151:
2072 | #line 680 "parse.y"
2073 | { comp_type=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
2074 | break;}
2075 | case 152:
2076 | #line 682 "parse.y"
2077 | { yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; ;
2078 | break;}
2079 | case 153:
2080 | #line 687 "parse.y"
2081 | { if(!in_header) SeenStructUnionComp(ConcatStrings(2,comp_type,yyvsp[0]),in_structunion); ;
2082 | break;}
2083 | case 154:
2084 | #line 689 "parse.y"
2085 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]);
2086 | if(!in_header) SeenStructUnionComp(ConcatStrings(2,comp_type,yyvsp[0]),in_structunion); ;
2087 | break;}
2088 | case 157:
2089 | #line 700 "parse.y"
2090 | { if(in_function==2) { DownScope(); pop(); in_function=0; } ;
2091 | break;}
2092 | case 158:
2093 | #line 705 "parse.y"
2094 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
2095 | break;}
2096 | case 159:
2097 | #line 707 "parse.y"
2098 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2099 | break;}
2100 | case 163:
2101 | #line 725 "parse.y"
2102 | { pop(); in_funcbody=1; in_function=0; ;
2103 | break;}
2104 | case 164:
2105 | #line 727 "parse.y"
2106 | { in_funcbody=in_function=0; DownScope(); SeenFunctionDefinition(NULL); ;
2107 | break;}
2108 | case 165:
2109 | #line 732 "parse.y"
2110 | { char *func_type,*fname=strstr(yyvsp[0],(current-1)->name),*parenth=strstr(yyvsp[0],"(");
2111 | if(parenth>fname)
2112 | {parenth[0]=0;func_type=ConcatStrings(3,(current-1)->qual,(current-1)->type,yyvsp[0]);}
2113 | else
2114 | {
2115 | int open=1;
2116 | char *argbeg=strstr(&parenth[1],"("),*argend;
2117 | argbeg[1]=0;
2118 | for(argend=argbeg+2;*argend;argend++)
2119 | {
2120 | if(*argend=='(') open++;
2121 | if(*argend==')') open--;
2122 | if(!open) break;
2123 | }
2124 | func_type=ConcatStrings(4,(current-1)->qual,(current-1)->type,yyvsp[0],argend);
2125 | }
2126 | SeenFunctionDefinition(func_type);
2127 | ;
2128 | break;}
2129 | case 167:
2130 | #line 755 "parse.y"
2131 | { yyval=ConcatStrings(3,current->qual,current->type,yyvsp[0]); ;
2132 | break;}
2133 | case 169:
2134 | #line 758 "parse.y"
2135 | { yyval=ConcatStrings(3,current->qual,current->type,yyvsp[-1]); ;
2136 | break;}
2137 | case 170:
2138 | #line 765 "parse.y"
2139 | { push(); in_function=2; ;
2140 | break;}
2141 | case 173:
2142 | #line 772 "parse.y"
2143 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
2144 | break;}
2145 | case 174:
2146 | #line 774 "parse.y"
2147 | { yyval=ConcatStrings(2,yyvsp[-3],yyvsp[-1]); ;
2148 | break;}
2149 | case 175:
2150 | #line 779 "parse.y"
2151 | { push(); if(in_function==0) UpScope();
2152 | if(in_function==0 && !in_funcdef) in_function=1; if(in_function!=3) in_funcdef++; ;
2153 | break;}
2154 | case 176:
2155 | #line 782 "parse.y"
2156 | { pop(); if(in_function!=3) in_funcdef--; if(in_funcdef==0) in_function=3;
2157 | yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); ;
2158 | break;}
2159 | case 177:
2160 | #line 788 "parse.y"
2161 | {
2162 | if(!in_funcdef && !in_function && !in_funcbody) SeenFunctionDeclaration(current->name,SCOPE);
2163 | in_type_spec=0;
2164 | ;
2165 | break;}
2166 | case 178:
2167 | #line 796 "parse.y"
2168 | { if(in_function==1 && in_funcdef==1) SeenFunctionArg("void","void");
2169 | if(in_structunion) yyval=NULL; else yyval="void"; ;
2170 | break;}
2171 | case 181:
2172 | #line 804 "parse.y"
2173 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0) { SeenFunctionArg(yyvsp[0],NULL); SeenScopeVariable(yyvsp[0]); } ;
2174 | break;}
2175 | case 182:
2176 | #line 806 "parse.y"
2177 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0) { SeenFunctionArg(yyvsp[0],NULL); SeenScopeVariable(yyvsp[0]); }
2178 | yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2179 | break;}
2180 | case 184:
2181 | #line 813 "parse.y"
2182 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0) SeenFunctionArg(yyvsp[0],yyvsp[0]);
2183 | yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2184 | break;}
2185 | case 185:
2186 | #line 819 "parse.y"
2187 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0) SeenFunctionArg(strcmp("void",yyvsp[0])?current->name:"void",yyvsp[0]);
2188 | in_type_spec=0; ;
2189 | break;}
2190 | case 186:
2191 | #line 822 "parse.y"
2192 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0) SeenFunctionArg(current->name,yyvsp[0]);
2193 | in_type_spec=0; yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2194 | break;}
2195 | case 187:
2196 | #line 828 "parse.y"
2197 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
2198 | break;}
2199 | case 188:
2200 | #line 830 "parse.y"
2201 | { in_type_spec=0; ;
2202 | break;}
2203 | case 189:
2204 | #line 832 "parse.y"
2205 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
2206 | break;}
2207 | case 204:
2208 | #line 861 "parse.y"
2209 | { UpScope(); reset(); ;
2210 | break;}
2211 | case 205:
2212 | #line 863 "parse.y"
2213 | { DownScope(); ;
2214 | break;}
2215 | case 247:
2216 | #line 988 "parse.y"
2217 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2218 | break;}
2219 | case 264:
2220 | #line 1018 "parse.y"
2221 | { yyval=ConcatStrings(5,yyvsp[-4],yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2222 | break;}
2223 | case 265:
2224 | #line 1020 "parse.y"
2225 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2226 | break;}
2227 | case 267:
2228 | #line 1028 "parse.y"
2229 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2230 | break;}
2231 | case 269:
2232 | #line 1036 "parse.y"
2233 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2234 | break;}
2235 | case 271:
2236 | #line 1044 "parse.y"
2237 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2238 | break;}
2239 | case 273:
2240 | #line 1052 "parse.y"
2241 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2242 | break;}
2243 | case 275:
2244 | #line 1060 "parse.y"
2245 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2246 | break;}
2247 | case 277:
2248 | #line 1068 "parse.y"
2249 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2250 | break;}
2251 | case 281:
2252 | #line 1080 "parse.y"
2253 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2254 | break;}
2255 | case 287:
2256 | #line 1094 "parse.y"
2257 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2258 | break;}
2259 | case 291:
2260 | #line 1106 "parse.y"
2261 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2262 | break;}
2263 | case 295:
2264 | #line 1118 "parse.y"
2265 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2266 | break;}
2267 | case 311:
2268 | #line 1148 "parse.y"
2269 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
2270 | break;}
2271 | case 312:
2272 | #line 1153 "parse.y"
2273 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2274 | break;}
2275 | case 316:
2276 | #line 1164 "parse.y"
2277 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
2278 | break;}
2279 | case 319:
2280 | #line 1177 "parse.y"
2281 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2282 | break;}
2283 | case 320:
2284 | #line 1179 "parse.y"
2285 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
2286 | break;}
2287 | case 321:
2288 | #line 1184 "parse.y"
2289 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
2290 | break;}
2291 | case 322:
2292 | #line 1189 "parse.y"
2293 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
2294 | break;}
2295 | case 325:
2296 | #line 1198 "parse.y"
2297 | { if(!IsAScopeVariable(yyvsp[0])) SeenFunctionCall(yyvsp[0]); ;
2298 | break;}
2299 | case 341:
2300 | #line 1242 "parse.y"
2301 | { CheckFunctionVariableRef(yyvsp[0],in_funcbody); ;
2302 | break;}
2303 | case 347:
2304 | #line 1254 "parse.y"
2305 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
2306 | break;}
2307 | case 348:
2308 | #line 1255 "parse.y"
2309 | { push(); ;
2310 | break;}
2311 | case 349:
2312 | #line 1255 "parse.y"
2313 | { pop(); ;
2314 | break;}
2315 | }
2316 | /* the action file gets copied in in place of this dollarsign */
2317 | #line 543 "/usr/share/misc/bison.simple"
2318 |
2319 | yyvsp -= yylen;
2320 | yyssp -= yylen;
2321 | #ifdef YYLSP_NEEDED
2322 | yylsp -= yylen;
2323 | #endif
2324 |
2325 | #if YYDEBUG != 0
2326 | if (yydebug)
2327 | {
2328 | short *ssp1 = yyss - 1;
2329 | fprintf (stderr, "state stack now");
2330 | while (ssp1 != yyssp)
2331 | fprintf (stderr, " %d", *++ssp1);
2332 | fprintf (stderr, "\n");
2333 | }
2334 | #endif
2335 |
2336 | *++yyvsp = yyval;
2337 |
2338 | #ifdef YYLSP_NEEDED
2339 | yylsp++;
2340 | if (yylen == 0)
2341 | {
2342 | yylsp->first_line = yylloc.first_line;
2343 | yylsp->first_column = yylloc.first_column;
2344 | yylsp->last_line = (yylsp-1)->last_line;
2345 | yylsp->last_column = (yylsp-1)->last_column;
2346 | yylsp->text = 0;
2347 | }
2348 | else
2349 | {
2350 | yylsp->last_line = (yylsp+yylen-1)->last_line;
2351 | yylsp->last_column = (yylsp+yylen-1)->last_column;
2352 | }
2353 | #endif
2354 |
2355 | /* Now "shift" the result of the reduction.
2356 | Determine what state that goes to,
2357 | based on the state we popped back to
2358 | and the rule number reduced by. */
2359 |
2360 | yyn = yyr1[yyn];
2361 |
2362 | yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
2363 | if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2364 | yystate = yytable[yystate];
2365 | else
2366 | yystate = yydefgoto[yyn - YYNTBASE];
2367 |
2368 | goto yynewstate;
2369 |
2370 | yyerrlab: /* here on detecting error */
2371 |
2372 | if (! yyerrstatus)
2373 | /* If not already recovering from an error, report this error. */
2374 | {
2375 | ++yynerrs;
2376 |
2377 | #ifdef YYERROR_VERBOSE
2378 | yyn = yypact[yystate];
2379 |
2380 | if (yyn > YYFLAG && yyn < YYLAST)
2381 | {
2382 | int size = 0;
2383 | char *msg;
2384 | int x, count;
2385 |
2386 | count = 0;
2387 | /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
2388 | for (x = (yyn < 0 ? -yyn : 0);
2389 | x < (sizeof(yytname) / sizeof(char *)); x++)
2390 | if (yycheck[x + yyn] == x)
2391 | size += strlen(yytname[x]) + 15, count++;
2392 | msg = (char *) malloc(size + 15);
2393 | if (msg != 0)
2394 | {
2395 | strcpy(msg, "parse error");
2396 |
2397 | if (count < 5)
2398 | {
2399 | count = 0;
2400 | for (x = (yyn < 0 ? -yyn : 0);
2401 | x < (sizeof(yytname) / sizeof(char *)); x++)
2402 | if (yycheck[x + yyn] == x)
2403 | {
2404 | strcat(msg, count == 0 ? ", expecting `" : " or `");
2405 | strcat(msg, yytname[x]);
2406 | strcat(msg, "'");
2407 | count++;
2408 | }
2409 | }
2410 | yyerror(msg);
2411 | free(msg);
2412 | }
2413 | else
2414 | yyerror ("parse error; also virtual memory exceeded");
2415 | }
2416 | else
2417 | #endif /* YYERROR_VERBOSE */
2418 | yyerror("parse error");
2419 | }
2420 |
2421 | goto yyerrlab1;
2422 | yyerrlab1: /* here on error raised explicitly by an action */
2423 |
2424 | if (yyerrstatus == 3)
2425 | {
2426 | /* if just tried and failed to reuse lookahead token after an error, discard it. */
2427 |
2428 | /* return failure if at end of input */
2429 | if (yychar == YYEOF)
2430 | YYABORT;
2431 |
2432 | #if YYDEBUG != 0
2433 | if (yydebug)
2434 | fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
2435 | #endif
2436 |
2437 | yychar = YYEMPTY;
2438 | }
2439 |
2440 | /* Else will try to reuse lookahead token
2441 | after shifting the error token. */
2442 |
2443 | yyerrstatus = 3; /* Each real token shifted decrements this */
2444 |
2445 | goto yyerrhandle;
2446 |
2447 | yyerrdefault: /* current state does not do anything special for the error token. */
2448 |
2449 | #if 0
2450 | /* This is wrong; only states that explicitly want error tokens
2451 | should shift them. */
2452 | yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
2453 | if (yyn) goto yydefault;
2454 | #endif
2455 |
2456 | yyerrpop: /* pop the current state because it cannot handle the error token */
2457 |
2458 | if (yyssp == yyss) YYABORT;
2459 | yyvsp--;
2460 | yystate = *--yyssp;
2461 | #ifdef YYLSP_NEEDED
2462 | yylsp--;
2463 | #endif
2464 |
2465 | #if YYDEBUG != 0
2466 | if (yydebug)
2467 | {
2468 | short *ssp1 = yyss - 1;
2469 | fprintf (stderr, "Error: state stack now");
2470 | while (ssp1 != yyssp)
2471 | fprintf (stderr, " %d", *++ssp1);
2472 | fprintf (stderr, "\n");
2473 | }
2474 | #endif
2475 |
2476 | yyerrhandle:
2477 |
2478 | yyn = yypact[yystate];
2479 | if (yyn == YYFLAG)
2480 | goto yyerrdefault;
2481 |
2482 | yyn += YYTERROR;
2483 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
2484 | goto yyerrdefault;
2485 |
2486 | yyn = yytable[yyn];
2487 | if (yyn < 0)
2488 | {
2489 | if (yyn == YYFLAG)
2490 | goto yyerrpop;
2491 | yyn = -yyn;
2492 | goto yyreduce;
2493 | }
2494 | else if (yyn == 0)
2495 | goto yyerrpop;
2496 |
2497 | if (yyn == YYFINAL)
2498 | YYACCEPT;
2499 |
2500 | #if YYDEBUG != 0
2501 | if (yydebug)
2502 | fprintf(stderr, "Shifting error token, ");
2503 | #endif
2504 |
2505 | *++yyvsp = yylval;
2506 | #ifdef YYLSP_NEEDED
2507 | *++yylsp = yylloc;
2508 | #endif
2509 |
2510 | yystate = yyn;
2511 | goto yynewstate;
2512 |
2513 | yyacceptlab:
2514 | /* YYACCEPT comes here. */
2515 | if (yyfree_stacks)
2516 | {
2517 | free (yyss);
2518 | free (yyvs);
2519 | #ifdef YYLSP_NEEDED
2520 | free (yyls);
2521 | #endif
2522 | }
2523 | return 0;
2524 |
2525 | yyabortlab:
2526 | /* YYABORT comes here. */
2527 | if (yyfree_stacks)
2528 | {
2529 | free (yyss);
2530 | free (yyvs);
2531 | #ifdef YYLSP_NEEDED
2532 | free (yyls);
2533 | #endif
2534 | }
2535 | return 1;
2536 | }
2537 | #line 1337 "parse.y"
2538 |
2539 |
2540 | #if YYDEBUG
2541 |
2542 | static int last_yylex[11];
2543 | static char *last_yylval[11];
2544 | static int count=0,modcount=0;
2545 |
2546 | #endif /* YYDEBUG */
2547 |
2548 |
2549 | /*++++++++++++++++++++++++++++++++++++++
2550 | Stop parsing the current file, due to an error.
2551 |
2552 | char *s The error message to print out.
2553 | ++++++++++++++++++++++++++++++++++++++*/
2554 |
2555 | static void yyerror( char *s )
2556 | {
2557 | #if YYDEBUG
2558 | int i;
2559 | #endif
2560 |
2561 | fflush(stdout);
2562 | fprintf(stderr,"%s:%d: cxref: %s\n\n",parse_file,parse_line,s);
2563 |
2564 | #if YYDEBUG
2565 |
2566 | fprintf(stderr,"The previous 10, current and next 10 symbols are:\n");
2567 |
2568 | for(i=count>10?count-11:0,modcount=i%11;i<count-1;i++,modcount=i%11)
2569 | #ifdef YYBISON
2570 | fprintf(stderr,"%3d | %3d : %16s : %s\n",i+1-count,last_yylex[modcount],last_yylex[modcount]>255?yytname[last_yylex[modcount]-255]:"",last_yylval[modcount]);
2571 | #else
2572 | fprintf(stderr,"%3d | %3d : %s\n",i+1-count,last_yylex[modcount],last_yylval[modcount]);
2573 | #endif
2574 |
2575 | #ifdef YYBISON
2576 | fprintf(stderr," 0 | %3d : %16s : %s\n",yychar,yychar>255?yytname[yychar-255]:"",yylval);
2577 | #else
2578 | fprintf(stderr," 0 | %3d : %s\n",yychar,yylval);
2579 | #endif
2580 |
2581 | for(i=0;i<10;i++)
2582 | {
2583 | yychar=yylex();
2584 | if(!yychar)
2585 | {fprintf(stderr,"END OF FILE\n");break;}
2586 | #ifdef YYBISON
2587 | fprintf(stderr,"%3d | %3d : %16s : %s\n",i+1,yychar,yychar>255?yytname[yychar-255]:"",yylval);
2588 | #else
2589 | fprintf(stderr,"%3d | %3d : %s\n",i+1,yychar,yylval);
2590 | #endif
2591 | }
2592 |
2593 | fprintf(stderr,"\n");
2594 |
2595 | #endif /* YYDEBUG */
2596 |
2597 | /* Finish off the input. */
2598 |
2599 | #undef yylex
2600 |
2601 | if(yychar)
2602 | while((yychar=yylex()));
2603 | }
2604 |
2605 |
2606 | /*++++++++++++++++++++++++++++++++++++++
2607 | Call the lexer, the feedback from the parser to the lexer is applied here.
2608 |
2609 | int cxref_yylex Returns the value from the lexer, modified due to parser feedback.
2610 | ++++++++++++++++++++++++++++++++++++++*/
2611 |
2612 | static int cxref_yylex(void)
2613 | {
2614 | static int last_yyl=0;
2615 | int yyl=yylex();
2616 |
2617 | if(yyl==TYPE_NAME)
2618 | if(in_type_spec || (in_structunion && last_yyl=='}') || last_yyl==TYPE_NAME ||
2619 | last_yyl==CHAR || last_yyl==SHORT || last_yyl==INT || last_yyl==LONG ||
2620 | last_yyl==SIGNED || last_yyl==UNSIGNED ||
2621 | last_yyl==FLOAT || last_yyl==DOUBLE)
2622 | yyl=IDENTIFIER;
2623 |
2624 | last_yyl=yyl;
2625 |
2626 | #if YYDEBUG
2627 |
2628 | last_yylex [modcount]=yyl;
2629 | last_yylval[modcount]=yylval;
2630 |
2631 | if(yyl)
2632 | {
2633 | count++;
2634 | modcount=count%11;
2635 | }
2636 | else
2637 | {
2638 | count=0;
2639 | modcount=0;
2640 | }
2641 |
2642 | #if YYDEBUG == 2
2643 |
2644 | if(yyl)
2645 | #ifdef YYBISON
2646 | printf("#parse.y# %6d | %16s:%4d | %3d : %16s : %s\n",count,parse_file,parse_line,yyl,yyl>255?yytname[yyl-255]:"",yylval);
2647 | #else
2648 | printf("#parse.y# %6d | %16s:%4d | %3d : %s\n",count,parse_file,parse_line,yyl,yylval);
2649 | #endif /* YYBISON */
2650 | else
2651 | printf("#parse.y# %6d | %16s:%4d | END OF FILE\n",count,parse_file,parse_line);
2652 |
2653 | fflush(stdout);
2654 |
2655 | #endif /* YYDEBUG==2 */
2656 |
2657 | #endif /* YYDEBUG */
2658 |
2659 | return(yyl);
2660 | }