|
|
1.1 root 1:
2: /* A Bison parser, made from parse.y */
3:
4: #define IDENTIFIER 258
5: #define TYPENAME 259
6: #define SCSPEC 260
7: #define TYPESPEC 261
8: #define TYPE_QUAL 262
9: #define CONSTANT 263
10: #define STRING 264
11: #define ELLIPSIS 265
12: #define SIZEOF 266
13: #define ENUM 267
14: #define STRUCT 268
15: #define UNION 269
16: #define IF 270
17: #define ELSE 271
18: #define WHILE 272
19: #define DO 273
20: #define FOR 274
21: #define SWITCH 275
22: #define CASE 276
23: #define DEFAULT 277
24: #define BREAK 278
25: #define CONTINUE 279
26: #define RETURN 280
27: #define GOTO 281
28: #define ASM 282
29: #define TYPEOF 283
30: #define ALIGNOF 284
31: #define ASSIGN 285
32: #define OROR 286
33: #define ANDAND 287
34: #define EQCOMPARE 288
35: #define ARITHCOMPARE 289
36: #define LSHIFT 290
37: #define RSHIFT 291
38: #define UNARY 292
39: #define PLUSPLUS 293
40: #define MINUSMINUS 294
41: #define HYPERUNARY 295
42: #define POINTSAT 296
43:
44: #line 44 "parse.y"
45:
46: #include "config.h"
47: #include "tree.h"
48: #include "parse.h"
49: #include "c-tree.h"
50: #include "flags.h"
51:
52: #include <stdio.h>
53:
54: /* Cause the `yydebug' variable to be defined. */
55: #define YYDEBUG
56:
57: #line 59 "parse.y"
58: typedef union {long itype; tree ttype; enum tree_code code; char *cptr; } YYSTYPE;
59: #line 143 "parse.y"
60:
61: /* the declaration found for the last IDENTIFIER token read in.
62: yylex must look this up to detect typedefs, which get token type TYPENAME,
63: so it is left around in case the identifier is not a typedef but is
64: used in a context which makes it a reference to a variable. */
65: static tree lastiddecl;
66:
67: static tree make_pointer_declarator ();
68: static tree combine_strings ();
69: static void reinit_parse_for_function ();
70:
71: extern double atof ();
72:
73: /* List of types and structure classes of the current declaration */
74: tree current_declspecs;
75:
76: char *input_filename; /* source file current line is coming from */
77: char *main_input_filename; /* top-level source file */
78:
79: #ifndef YYLTYPE
80: typedef
81: struct yyltype
82: {
83: int timestamp;
84: int first_line;
85: int first_column;
86: int last_line;
87: int last_column;
88: char *text;
89: }
90: yyltype;
91:
92: #define YYLTYPE yyltype
93: #endif
94:
95: #define YYACCEPT return(0)
96: #define YYABORT return(1)
97: #define YYERROR return(1)
98: #include <stdio.h>
99:
100: #ifndef __STDC__
101: #define const
102: #endif
103:
104:
105:
106: #define YYFINAL 481
107: #define YYFLAG -32768
108: #define YYNTBASE 64
109:
110: #define YYTRANSLATE(x) ((unsigned)(x) <= 296 ? yytranslate[x] : 161)
111:
112: static const char yytranslate[] = { 0,
113: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
114: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
115: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
116: 2, 2, 59, 2, 2, 2, 47, 38, 2, 54,
117: 55, 45, 43, 60, 44, 53, 46, 2, 2, 2,
118: 2, 2, 2, 2, 2, 2, 2, 33, 56, 2,
119: 31, 2, 32, 2, 2, 2, 2, 2, 2, 2,
120: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
121: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
122: 62, 2, 63, 37, 2, 2, 2, 2, 2, 2,
123: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
124: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
125: 2, 2, 61, 36, 57, 58, 2, 2, 2, 2,
126: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
127: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
128: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
129: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
130: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
131: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
132: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
133: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
134: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
135: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
136: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
137: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
138: 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
139: 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
140: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
141: 26, 27, 28, 29, 30, 34, 35, 39, 40, 41,
142: 42, 48, 49, 50, 51, 52
143: };
144:
145: static const short yyrline[] = { 0,
146: 164, 165, 172, 174, 174, 175, 177, 179, 180, 187,
147: 193, 195, 197, 199, 201, 202, 203, 206, 212, 214,
148: 215, 217, 222, 224, 225, 227, 232, 234, 235, 239,
149: 241, 244, 246, 248, 250, 252, 254, 256, 260, 264,
150: 267, 270, 273, 277, 279, 281, 283, 286, 298, 303,
151: 305, 310, 312, 314, 316, 318, 320, 322, 324, 326,
152: 328, 330, 332, 334, 336, 338, 340, 342, 344, 348,
153: 370, 371, 373, 375, 377, 384, 389, 391, 393, 395,
154: 397, 399, 404, 406, 410, 412, 415, 417, 418, 419,
155: 424, 429, 432, 434, 436, 444, 447, 451, 453, 455,
156: 463, 466, 468, 470, 479, 482, 486, 488, 496, 497,
157: 498, 499, 503, 511, 512, 513, 516, 518, 521, 523,
158: 526, 529, 537, 542, 543, 548, 553, 554, 559, 561,
159: 563, 565, 571, 574, 581, 583, 588, 591, 596, 598,
160: 600, 602, 610, 616, 618, 620, 622, 628, 634, 636,
161: 638, 640, 642, 645, 650, 654, 657, 659, 661, 663,
162: 666, 668, 671, 674, 677, 680, 684, 686, 689, 691,
163: 693, 707, 711, 714, 718, 721, 722, 726, 729, 731,
164: 740, 742, 747, 750, 754, 757, 761, 764, 767, 770,
165: 774, 777, 781, 785, 787, 789, 791, 793, 795, 797,
166: 799, 807, 809, 810, 813, 815, 818, 821, 828, 829,
167: 833, 837, 843, 848, 850, 852, 856, 859, 860, 862,
168: 865, 869, 870, 873, 875, 880, 885, 889, 895, 901,
169: 908, 910, 936, 936, 947, 947, 951, 955, 958, 961,
170: 967, 974, 980, 985, 990, 990, 993, 996, 1000, 1003,
171: 1008, 1009, 1013, 1014, 1020, 1023, 1028, 1031, 1034, 1036,
172: 1038, 1042, 1044, 1050, 1052, 1054, 1058, 1061, 1067, 1070,
173: 1072, 1074, 1076, 1081, 1084
174: };
175:
176: static const char * const yytname[] = { 0,
177: "error","$illegal.","IDENTIFIER","TYPENAME","SCSPEC","TYPESPEC","TYPE_QUAL","CONSTANT","STRING","ELLIPSIS",
178: "SIZEOF","ENUM","STRUCT","UNION","IF","ELSE","WHILE","DO","FOR","SWITCH",
179: "CASE","DEFAULT","BREAK","CONTINUE","RETURN","GOTO","ASM","TYPEOF","ALIGNOF","ASSIGN",
180: "'='","'?'","':'","OROR","ANDAND","'|'","'^'","'&'","EQCOMPARE","ARITHCOMPARE",
181: "LSHIFT","RSHIFT","'+'","'-'","'*'","'/'","'%'","UNARY","PLUSPLUS","MINUSMINUS",
182: "HYPERUNARY","POINTSAT","'.'","'('","')'","';'","'}'","'~'","'!'","','",
183: "'{'","'['","']'","program"
184: };
185:
186: static const short yyr1[] = { 0,
187: 64, 64, 66, 65, 67, 65, 68, 68, 68, 69,
188: 69, 69, 69, 69, 69, 69, 69, 71, 72, 70,
189: 70, 73, 74, 70, 70, 75, 76, 70, 70, 77,
190: 77, 78, 78, 78, 78, 78, 78, 78, 79, 80,
191: 80, 81, 81, 82, 82, 82, 82, 82, 82, 82,
192: 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
193: 82, 82, 82, 82, 82, 82, 82, 82, 82, 83,
194: 83, 83, 83, 83, 84, 83, 83, 83, 83, 83,
195: 83, 83, 85, 85, 86, 86, 87, 87, 87, 87,
196: 88, 89, 89, 89, 89, 90, 90, 91, 91, 91,
197: 92, 92, 92, 92, 93, 93, 94, 94, 95, 95,
198: 95, 95, 95, 96, 96, 96, 97, 97, 98, 98,
199: 99, 99, 101, 100, 100, 103, 102, 102, 104, 104,
200: 104, 104, 105, 105, 106, 106, 107, 107, 107, 107,
201: 107, 107, 108, 108, 108, 108, 108, 109, 109, 109,
202: 109, 109, 109, 111, 110, 110, 110, 112, 110, 110,
203: 110, 113, 110, 114, 110, 110, 115, 115, 116, 116,
204: 116, 117, 117, 117, 118, 118, 118, 119, 119, 119,
205: 120, 120, 121, 121, 122, 122, 123, 123, 124, 124,
206: 125, 125, 126, 126, 126, 126, 126, 126, 126, 126,
207: 126, 127, 127, 127, 128, 128, 129, 130, 131, 131,
208: 131, 131, 133, 132, 134, 134, 135, 134, 134, 136,
209: 137, 134, 138, 139, 134, 140, 141, 142, 134, 143,
210: 134, 144, 134, 145, 134, 134, 134, 134, 134, 134,
211: 134, 134, 134, 146, 134, 134, 147, 147, 148, 148,
212: 149, 149, 150, 150, 152, 151, 154, 153, 155, 155,
213: 155, 156, 156, 157, 157, 157, 158, 158, 159, 159,
214: 159, 159, 159, 160, 160
215: };
216:
217: static const short yyr2[] = { 0,
218: 0, 1, 0, 2, 0, 3, 1, 1, 5, 3,
219: 4, 4, 2, 2, 2, 2, 1, 0, 0, 7,
220: 4, 0, 0, 7, 4, 0, 0, 6, 3, 1,
221: 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
222: 1, 1, 3, 1, 2, 2, 4, 7, 2, 4,
223: 2, 4, 3, 3, 3, 3, 3, 3, 3, 3,
224: 3, 3, 3, 3, 3, 3, 5, 3, 3, 1,
225: 1, 1, 3, 3, 0, 4, 4, 4, 3, 3,
226: 2, 2, 1, 2, 0, 1, 1, 1, 2, 2,
227: 0, 4, 4, 2, 2, 2, 3, 0, 2, 2,
228: 1, 1, 2, 2, 2, 3, 0, 2, 1, 1,
229: 1, 4, 4, 1, 1, 1, 1, 3, 1, 3,
230: 0, 4, 0, 5, 2, 0, 5, 2, 1, 3,
231: 4, 1, 1, 3, 1, 1, 3, 3, 4, 3,
232: 3, 1, 3, 4, 3, 3, 1, 3, 3, 3,
233: 4, 3, 1, 0, 6, 4, 2, 0, 6, 4,
234: 2, 0, 7, 0, 6, 2, 0, 1, 0, 3,
235: 2, 3, 3, 1, 0, 1, 3, 1, 3, 2,
236: 1, 3, 1, 3, 2, 2, 0, 1, 1, 2,
237: 0, 2, 3, 3, 2, 3, 4, 3, 2, 3,
238: 2, 1, 2, 2, 0, 1, 2, 0, 2, 5,
239: 4, 4, 0, 6, 1, 2, 0, 4, 1, 0,
240: 0, 7, 0, 0, 9, 0, 0, 0, 12, 0,
241: 6, 0, 5, 0, 4, 2, 2, 2, 3, 6,
242: 8, 10, 3, 0, 4, 1, 0, 1, 0, 1,
243: 1, 3, 0, 4, 0, 2, 0, 2, 2, 2,
244: 2, 2, 2, 0, 1, 3, 1, 3, 2, 2,
245: 2, 2, 2, 1, 3
246: };
247:
248: static const short yydefact[] = { 3,
249: 5, 0, 0, 0, 111, 102, 109, 101, 0, 0,
250: 0, 0, 0, 17, 4, 8, 7, 0, 91, 91,
251: 98, 110, 6, 15, 16, 30, 31, 164, 166, 169,
252: 157, 169, 161, 0, 0, 153, 191, 0, 0, 119,
253: 0, 14, 0, 104, 103, 13, 0, 98, 96, 0,
254: 162, 0, 154, 0, 158, 83, 0, 70, 189, 71,
255: 0, 0, 32, 34, 33, 0, 35, 36, 0, 37,
256: 38, 0, 0, 39, 42, 44, 72, 187, 107, 0,
257: 187, 0, 0, 10, 0, 29, 0, 257, 0, 0,
258: 128, 142, 191, 0, 0, 117, 0, 135, 136, 0,
259: 0, 97, 100, 114, 115, 99, 116, 183, 167, 181,
260: 0, 174, 171, 156, 91, 0, 91, 169, 160, 169,
261: 84, 0, 0, 49, 0, 51, 45, 0, 0, 0,
262: 0, 46, 112, 0, 0, 0, 249, 0, 0, 0,
263: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
264: 0, 81, 82, 0, 0, 40, 0, 191, 255, 0,
265: 185, 188, 105, 113, 190, 107, 186, 192, 150, 149,
266: 120, 121, 0, 148, 0, 152, 0, 0, 27, 86,
267: 0, 91, 91, 88, 126, 0, 0, 12, 0, 21,
268: 0, 125, 257, 0, 11, 25, 0, 0, 168, 0,
269: 167, 175, 170, 175, 0, 0, 9, 0, 0, 74,
270: 73, 208, 0, 0, 43, 69, 68, 250, 0, 66,
271: 65, 63, 64, 62, 61, 60, 58, 59, 53, 54,
272: 55, 56, 57, 80, 79, 0, 41, 0, 195, 0,
273: 199, 0, 201, 0, 255, 0, 108, 106, 0, 0,
274: 274, 187, 187, 258, 0, 265, 267, 0, 151, 207,
275: 0, 89, 90, 94, 0, 95, 0, 0, 141, 137,
276: 118, 19, 123, 138, 140, 0, 23, 184, 182, 165,
277: 0, 0, 178, 172, 176, 173, 155, 159, 50, 52,
278: 209, 0, 76, 0, 47, 0, 77, 78, 194, 193,
279: 0, 256, 0, 200, 196, 198, 0, 122, 261, 147,
280: 191, 255, 269, 270, 271, 191, 272, 273, 259, 0,
281: 260, 0, 28, 0, 0, 121, 132, 0, 129, 127,
282: 0, 0, 139, 0, 163, 180, 0, 0, 0, 70,
283: 111, 0, 220, 223, 0, 0, 0, 0, 0, 0,
284: 0, 0, 247, 246, 0, 0, 205, 0, 215, 219,
285: 202, 133, 167, 67, 263, 262, 197, 195, 257, 0,
286: 195, 266, 268, 275, 92, 93, 0, 20, 124, 24,
287: 179, 177, 211, 0, 0, 0, 249, 0, 0, 234,
288: 236, 237, 238, 0, 0, 248, 0, 244, 216, 0,
289: 0, 212, 204, 203, 217, 0, 0, 146, 143, 145,
290: 0, 130, 0, 0, 0, 0, 0, 0, 232, 0,
291: 239, 243, 0, 0, 210, 0, 134, 48, 144, 131,
292: 213, 0, 224, 226, 230, 0, 235, 0, 245, 218,
293: 0, 221, 0, 249, 0, 233, 253, 0, 214, 0,
294: 0, 0, 231, 0, 0, 251, 240, 222, 0, 227,
295: 0, 253, 0, 253, 0, 249, 0, 0, 241, 252,
296: 225, 0, 254, 0, 228, 242, 0, 229, 0, 0,
297: 0
298: };
299:
300: static const short yydefgoto[] = { 479,
301: 1, 2, 3, 15, 16, 17, 191, 331, 197, 334,
302: 90, 261, 355, 72, 356, 236, 74, 75, 76, 130,
303: 77, 179, 180, 18, 181, 182, 49, 183, 78, 163,
304: 21, 106, 95, 39, 91, 96, 332, 40, 268, 362,
305: 363, 172, 98, 313, 99, 22, 118, 120, 111, 50,
306: 200, 52, 116, 284, 285, 109, 110, 80, 161, 81,
307: 82, 162, 358, 401, 184, 292, 359, 360, 441, 361,
308: 426, 385, 450, 386, 443, 444, 466, 477, 445, 436,
309: 420, 424, 397, 219, 455, 456, 241, 242, 174, 175,
310: 254, 302, 255, 256, 257, 258
311: };
312:
313: static const short yypact[] = { 26,
314: 52, 1388, 1388, 221,-32768,-32768,-32768,-32768, 62, 73,
315: 143, 13, 15,-32768,-32768,-32768,-32768, 168, 22, 430,
316: -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -43,-32768,
317: 24,-32768, 93, 161, 1204,-32768,-32768, 168, 101,-32768,
318: 332,-32768, 251,-32768,-32768,-32768, 168,-32768, 398, 310,
319: -32768, 275,-32768, 1348,-32768,-32768, 129,-32768,-32768,-32768,
320: 1248, 1270,-32768,-32768,-32768, 1292,-32768,-32768, 692,-32768,
321: -32768, 1292, 163, 120, 1439, 316, 218, -5,-32768, 179,
322: 969, 241, -4,-32768, 251,-32768, 186,-32768, 817, 994,
323: 230,-32768,-32768, 251, 187,-32768, 965, 123, 125, 190,
324: 394, 398,-32768,-32768,-32768,-32768,-32768, 237, 220,-32768,
325: 310,-32768,-32768,-32768,-32768, 216, 315,-32768,-32768,-32768,
326: -32768, 228, 692,-32768, 692,-32768,-32768, 245, 249, 254,
327: 269,-32768,-32768, 1292, 1292, 1292, 1292, 1292, 1292, 1292,
328: 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292,
329: 1292,-32768,-32768, 310, 310, 1292, 1292,-32768, -5, 839,
330: -32768, 144, 49,-32768,-32768,-32768,-32768,-32768, 125,-32768,
331: -32768, 298, 161,-32768, 1417,-32768, 267, 278,-32768, 542,
332: 456, 284, 660,-32768,-32768, 212, 27,-32768, 251,-32768,
333: 994, 311,-32768, 861,-32768,-32768, 994, 1292, 310, 290,
334: 220, 229,-32768, 229, 1352, 1371,-32768, 286, 293,-32768,
335: -32768, 294, 295, 1145, 1439, 1439, 1439,-32768, 322, 1414,
336: 1454, 1465, 1181, 1474, 564, 666, 264, 264, 246, 246,
337: -32768,-32768,-32768,-32768,-32768, 301, 120, 304, 88, 119,
338: -32768, 1434,-32768, 308,-32768, 883,-32768, 49, 153, 303,
339: -32768, 148, 1006,-32768, 306, 312,-32768, 103,-32768,-32768,
340: 254,-32768,-32768,-32768, 251,-32768, 168, 795, 123,-32768,
341: -32768,-32768,-32768,-32768,-32768, 313,-32768, 1439,-32768,-32768,
342: 307, 1292, 340, 314,-32768, 314,-32768,-32768, 736, 736,
343: -32768, 515,-32768, 795,-32768, 1292,-32768,-32768, 144,-32768,
344: 324,-32768, 326,-32768,-32768,-32768, 320,-32768,-32768,-32768,
345: -32768, 83, 158, 125,-32768,-32768, 125,-32768,-32768, 483,
346: -32768, 374,-32768, 196, 204, 128,-32768, 795, 1439,-32768,
347: 254, 795,-32768, 254,-32768, 1439, 1292, 229, 261, 351,
348: 352, 333,-32768,-32768, 335, 337, 1292, 363, 341, 346,
349: 1226, 310, 406,-32768, 381, 359, 1058, 574,-32768, 401,
350: -32768,-32768, 358, 1001,-32768,-32768,-32768, 94,-32768, 905,
351: 29,-32768,-32768,-32768,-32768,-32768, 210,-32768,-32768,-32768,
352: 1439,-32768,-32768, 1292, 365, 1117, 1292, 1292, 387,-32768,
353: -32768,-32768,-32768, 367, 368,-32768, 373,-32768,-32768, 633,
354: 371,-32768,-32768,-32768,-32768, 714, 372, 158,-32768,-32768,
355: 369,-32768, 773, 375, 1292, 416, 382, 384,-32768, 1117,
356: -32768,-32768, 161, 1117,-32768, 1117,-32768,-32768,-32768,-32768,
357: -32768, 385,-32768,-32768,-32768, 1117,-32768, 38,-32768,-32768,
358: 1117,-32768, 391, 1292, 1117,-32768, 432, 390,-32768, 1117,
359: 1292, 393,-32768, 397, 4,-32768,-32768,-32768, 392,-32768,
360: 1292, 432, 396, 432, 410, 1292, 417, 181,-32768,-32768,
361: -32768, 436,-32768, 442,-32768,-32768, 1117,-32768, 453, 492,
362: -32768
363: };
364:
365: static const short yypgoto[] = {-32768,
366: -32768,-32768,-32768, 499,-32768,-32768,-32768,-32768,-32768,-32768,
367: -32768,-32768, 10,-32768, -35,-32768, 347, -31,-32768,-32768,
368: -33, -97, 215, 9, -168, 0, 460, 3, -9, 338,
369: 18, -121, 244, -38, -80, -60,-32768,-32768,-32768, -253,
370: 197, -36, -55, 177, -14, -27,-32768,-32768,-32768,-32768,
371: -187, 12,-32768, 327, 213, 439, 353, 80, -58, -6,
372: -85, -143, 200,-32768, -170,-32768, -117,-32768,-32768, -151,
373: -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
374: -32768,-32768,-32768, -360, 99, 98, 318,-32768, -183,-32768,
375: -32768,-32768, 325,-32768, 248,-32768
376: };
377:
378:
379: #define YYLAST 1521
380:
381:
382: static const short yytable[] = { 73,
383: 57, 19, 19, 41, 20, 20, 97, 186, 100, 274,
384: 263, 262, 213, 281, 330, 240, 192, 51, 29, 31,
385: 33, 107, 167, 83, 171, -1, 417, 43, 47, 124,
386: 126, 36, 101, 129, 127, 168, 462, 48, 187, 158,
387: 132, 247, 115, 54, 115, 117, 121, 117, 159, 88,
388: 170, -2, 79, 177, 104, 105, 160, 89, 463, 108,
389: 9, 10, 11, 464, 26, 27, 34, 169, 35, 79,
390: 447, 79, 239, 316, 107, 26, 27, 42, 379, 83,
391: 193, 270, 312, 452, 53, 36, 79, 129, 194, 129,
392: 160, 192, 448, 272, 168, 299, 36, 310, 166, 277,
393: 168, 218, 215, 216, 217, 472, 220, 221, 222, 223,
394: 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
395: 108, 238, 28, 202, 244, 204, 247, 316, 271, 205,
396: 269, 206, 158, 30, 166, 107, 312, 121, 311, 249,
397: 79, 159, 79, 323, 160, 26, 27, 312, 131, 160,
398: 36, 310, 427, 55, 87, 160, 84, 321, 276, 427,
399: 85, 121, 322, 234, 235, 283, 278, 283, 240, 56,
400: 36, 169, 245, 300, 252, 407, 193, 253, 88, 134,
401: 246, 88, 295, 122, 194, 409, 89, 403, 262, 89,
402: 265, 267, 311, 315, 318, 115, 115, 245, 117, 117,
403: 48, 312, 208, 32, 209, 246, 404, 308, 108, 160,
404: 307, 369, 37, 378, 36, 92, 380, 133, 168, 370,
405: 107, 38, 79, 79, 299, 368, 121, 299, 325, 403,
406: 371, 36, 92, 164, 416, 474, 329, 314, 317, 173,
407: 464, 252, 188, 36, 253, 195, 189, 168, 404, 85,
408: 336, 375, 326, 36, 92, 189, 93, 295, 295, 376,
409: 185, 282, 329, 85, 364, 94, 412, 198, 437, 413,
410: 48, 203, 439, 93, 440, 112, 24, 25, 5, 199,
411: 7, 59, 94, 207, 446, 37, 9, 10, 11, 449,
412: 149, 150, 151, 453, 38, 93, 329, 83, 458, 210,
413: 329, 283, 13, 211, 94, 381, 147, 148, 149, 150,
414: 151, 389, 26, 27, 212, 394, 260, 383, 5, 252,
415: 7, 165, 253, 214, 87, 478, 9, 10, 11, 259,
416: 113, 114, 86, 260, 411, -26, -26, -26, -26, 264,
417: 289, 273, 13, -26, -26, -26, 280, 290, 414, 293,
418: 291, 218, 418, 169, 296, 297, 169, 309, 87, -26,
419: 319, 395, -121, 335, 152, 153, 298, 154, 155, 156,
420: 304, 320, 337, 338, 329, 333, 374, 157, 365, 432,
421: 366, 329, 367, -30, -31, 88, 384, -121, 387, 438,
422: 388, -121, -26, 89, 196, 390, 391, -22, -22, -22,
423: -22, 392, 103, 104, 105, -22, -22, -22, 218, 9,
424: 10, 11, 396, 398, 399, 459, 405, 406, 415, 419,
425: 87, -22, 421, 422, -121, 467, 423, 425, 428, 431,
426: 218, 429, 433, 5, 44, 7, 45, 434, 435, 442,
427: 454, 9, 10, 11, 451, 457, 465, 88, 460, -121,
428: 461, 469, 480, -121, -22, 89, 178, 13, -87, -87,
429: -87, -87, -87, -87, -87, 471, -87, -87, -87, -87,
430: -87, 473, -87, -87, -87, -87, -87, -87, -87, -87,
431: -87, -87, -87, -87, -87, 46, 5, 6, 7, 8,
432: 475, 481, 372, -87, 9, 10, 11, 476, -87, -87,
433: -87, 23, 237, 248, -87, -87, 357, 102, 324, -87,
434: 13, -87, -87, -87, -87, 339, -87, 340, 341, 6,
435: 7, 8, 60, 56, 377, 61, 9, 10, 11, 342,
436: 286, 343, 344, 345, 346, 347, 348, 349, 350, 351,
437: 352, 353, 13, 62, 408, 5, 6, 7, 8, 201,
438: 382, 279, 63, 9, 10, 11, 400, 64, 65, 66,
439: 468, 470, 305, 67, 68, 0, 303, 373, 69, 13,
440: 354, 0, 70, 71, 178, 212, 340, 27, 0, 0,
441: 0, 60, 56, 0, 61, 0, 0, 0, 342, 0,
442: 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
443: 353, 0, 62, 144, 145, 146, 147, 148, 149, 150,
444: 151, 63, 0, 0, 0, 0, 64, 65, 66, 0,
445: 0, 0, 67, 68, 0, 0, 0, 69, 0, 354,
446: 402, 70, 71, 178, 212, 340, 27, 0, 0, 0,
447: 60, 56, 0, 61, 0, 0, 0, 342, 0, 343,
448: 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
449: 0, 62, 0, 5, 44, 7, 45, 0, 0, 0,
450: 63, 9, 10, 11, 0, 64, 65, 66, 0, 0,
451: 0, 67, 68, 0, 0, 0, 69, 13, 354, -206,
452: 70, 71, 128, 212, 58, 5, 0, 7, 59, 60,
453: 56, 0, 61, 9, 10, 11, 145, 146, 147, 148,
454: 149, 150, 151, 0, 327, 266, 58, 0, 0, 13,
455: 62, 60, 56, 0, 61, 0, 0, 0, 0, 63,
456: 0, 0, 0, 0, 64, 65, 66, 0, 58, 0,
457: 67, 68, 62, 60, 56, 69, 61, 0, 0, 70,
458: 71, 63, -75, 0, 0, 0, 64, 65, 66, 0,
459: 0, 0, 67, 68, 62, 0, 0, 69, 0, 0,
460: -168, 70, 71, 327, 328, 58, 0, 0, 0, 0,
461: 60, 56, 0, 61, 67, 68, 0, 0, 0, 69,
462: 0, 0, 0, 70, 71, 327, 294, 58, 0, 0,
463: 0, 62, 60, 56, 0, 61, 0, 0, 0, 0,
464: 63, 0, 0, 0, 0, 64, 65, 66, 0, 58,
465: 0, 67, 68, 62, 60, 56, 69, 61, 0, 430,
466: 70, 71, 63, 328, 0, 0, 0, 64, 65, 66,
467: 0, 58, 0, 67, 68, 62, 60, 56, 69, 61,
468: 0, 0, 70, 71, 63, 328, 0, 0, 0, 64,
469: 65, 66, 0, 58, 0, 67, 68, 62, 60, 56,
470: 69, 61, 0, 0, 70, 71, 63, 0, 0, 176,
471: 0, 64, 65, 66, 0, 58, 0, 67, 68, 62,
472: 60, 56, 69, 61, 0, 0, 70, 71, 63, 0,
473: 0, 243, 0, 64, 65, 66, 0, 58, 0, 67,
474: 68, 62, 60, 56, 69, 61, 0, 0, 70, 71,
475: 63, 0, 0, 275, 0, 64, 65, 66, 0, 0,
476: 0, 67, 68, 62, 0, 0, 69, 0, 0, 0,
477: 70, 71, 63, 0, 0, 306, 0, 64, 65, 66,
478: 0, 0, 0, 67, 68, 0, 0, 0, 69, 0,
479: 0, 0, 70, 71, 0, 190, 0, 410, -18, -18,
480: -18, -18, 5, 0, 7, 165, -18, -18, -18, 0,
481: 9, 10, 11, 0, 0, 0, 0, 0, 0, 0,
482: 0, 87, -18, 0, 178, -121, 13, 5, 6, 7,
483: 8, 0, 0, 0, 0, 9, 10, 11, 36, 5,
484: 44, 7, 45, 158, 0, 0, 0, 9, 10, 11,
485: -121, 13, 159, 0, -121, -18, 0, 0, 0, 0,
486: 160, 0, 137, 13, 138, 139, 140, 141, 142, 143,
487: 144, 145, 146, 147, 148, 149, 150, 151, 0, 0,
488: 316, 0, 0, 0, -85, 0, 0, 0, 0, 312,
489: 340, 341, 6, 7, 8, 60, 56, 160, 61, 9,
490: 10, 11, 342, 0, 343, 344, 345, 346, 347, 348,
491: 349, 350, 351, 352, 353, 13, 62, 0, 0, 0,
492: 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,
493: 64, 65, 66, 0, 0, 0, 67, 68, 0, 0,
494: 0, 69, 0, 354, 0, 70, 71, 0, 212, 340,
495: 27, 0, 0, 0, 60, 56, 0, 61, 0, 0,
496: 0, 342, 0, 343, 344, 345, 346, 347, 348, 349,
497: 350, 351, 352, 353, 0, 62, 0, 58, 0, 0,
498: 0, 0, 60, 56, 63, 61, 0, 0, 0, 64,
499: 65, 66, 0, 0, 0, 67, 68, 0, 0, 0,
500: 69, 0, 354, 62, 70, 71, 0, 212, 0, 0,
501: 0, 0, 63, 0, 0, 0, 0, 64, 65, 66,
502: 0, 0, 0, 67, 68, 0, 0, 0, 69, 0,
503: 0, 0, 70, 71, 0, 294, 58, 5, 0, 7,
504: 59, 60, 56, 0, 61, 9, 10, 11, 142, 143,
505: 144, 145, 146, 147, 148, 149, 150, 151, 58, 0,
506: 0, 13, 62, 60, 56, 0, 61, 0, 0, 0,
507: 0, 63, 0, 0, 0, 0, 64, 65, 66, 0,
508: 58, 0, 67, 68, 62, 60, 56, 69, 61, 0,
509: 0, 70, 71, 63, 0, 0, 0, 0, 64, 65,
510: 66, 0, 58, 0, 67, 68, 62, 60, 56, 69,
511: 61, 393, 0, 70, 71, 63, 0, 0, 0, 0,
512: 64, 65, 66, 0, 58, 0, 67, 68, 62, 60,
513: 56, 123, 61, 0, 0, 70, 71, 63, 0, 0,
514: 0, 0, 64, 65, 66, 0, 0, 0, 67, 68,
515: 62, 0, 0, 125, 0, 0, 0, 70, 71, 63,
516: 0, 0, 0, 0, 64, 65, 66, 0, 0, 0,
517: 67, 68, 0, 0, 0, 69, 0, 0, 112, 70,
518: 71, 5, 112, 7, 59, 5, 0, 7, 59, 9,
519: 10, 11, 0, 9, 10, 11, 0, 0, 0, 0,
520: 0, 112, 0, 0, 5, 13, 7, 59, 0, 13,
521: 0, 0, 9, 10, 11, 0, 0, 0, 4, 0,
522: -91, 5, 6, 7, 8, 0, 0, 0, 13, 9,
523: 10, 11, 0, 113, 119, 0, 0, 113, 287, 0,
524: 0, 0, 0, 0, 12, 13, 0, 250, 0, 251,
525: 5, 6, 7, 8, 0, 0, 113, 288, 9, 10,
526: 11, 0, -91, 0, 301, 0, 0, 5, 6, 7,
527: 8, -91, 0, 14, 13, 9, 10, 11, 139, 140,
528: 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
529: 151, 13, 0, 0, 0, 0, 0, 0, 135, 136,
530: 137, -264, 138, 139, 140, 141, 142, 143, 144, 145,
531: 146, 147, 148, 149, 150, 151, 0, 0, -264, 140,
532: 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
533: 151, 141, 142, 143, 144, 145, 146, 147, 148, 149,
534: 150, 151, 143, 144, 145, 146, 147, 148, 149, 150,
535: 151
536: };
537:
538: static const short yycheck[] = { 35,
539: 34, 2, 3, 18, 2, 3, 43, 93, 47, 193,
540: 181, 180, 130, 201, 268, 159, 97, 61, 9, 10,
541: 11, 49, 81, 38, 85, 0, 387, 19, 20, 61,
542: 62, 3, 47, 69, 66, 7, 33, 20, 94, 45,
543: 72, 163, 52, 32, 54, 52, 9, 54, 54, 54,
544: 55, 0, 35, 89, 6, 7, 62, 62, 55, 50,
545: 12, 13, 14, 60, 3, 4, 54, 82, 54, 52,
546: 33, 54, 158, 45, 102, 3, 4, 56, 332, 94,
547: 54, 55, 54, 444, 61, 3, 69, 123, 62, 125,
548: 62, 172, 55, 191, 7, 239, 3, 4, 81, 197,
549: 7, 137, 134, 135, 136, 466, 138, 139, 140, 141,
550: 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
551: 111, 157, 61, 115, 160, 117, 248, 45, 189, 118,
552: 186, 120, 45, 61, 117, 163, 54, 9, 45, 173,
553: 123, 54, 125, 261, 62, 3, 4, 54, 69, 62,
554: 3, 4, 406, 61, 27, 62, 56, 55, 194, 413,
555: 60, 9, 60, 154, 155, 202, 198, 204, 312, 9,
556: 3, 186, 54, 55, 175, 363, 54, 175, 54, 60,
557: 62, 54, 214, 55, 62, 369, 62, 358, 357, 62,
558: 182, 183, 45, 252, 253, 205, 206, 54, 205, 206,
559: 183, 54, 123, 61, 125, 62, 358, 55, 199, 62,
560: 246, 54, 45, 331, 3, 4, 334, 55, 7, 62,
561: 248, 54, 205, 206, 368, 311, 9, 371, 267, 400,
562: 316, 3, 4, 55, 386, 55, 268, 252, 253, 54,
563: 60, 242, 56, 3, 242, 56, 60, 7, 400, 60,
564: 282, 56, 267, 3, 4, 60, 45, 289, 290, 56,
565: 31, 33, 294, 60, 296, 54, 57, 31, 420, 60,
566: 253, 56, 424, 45, 426, 1, 56, 57, 4, 60,
567: 6, 7, 54, 56, 436, 45, 12, 13, 14, 441,
568: 45, 46, 47, 445, 54, 45, 328, 312, 450, 55,
569: 332, 338, 28, 55, 54, 337, 43, 44, 45, 46,
570: 47, 347, 3, 4, 61, 351, 56, 57, 4, 320,
571: 6, 7, 320, 55, 27, 477, 12, 13, 14, 63,
572: 56, 57, 1, 56, 370, 4, 5, 6, 7, 56,
573: 55, 31, 28, 12, 13, 14, 57, 55, 384, 55,
574: 57, 387, 388, 368, 33, 55, 371, 55, 27, 28,
575: 55, 352, 31, 57, 49, 50, 63, 52, 53, 54,
576: 63, 60, 33, 60, 406, 63, 3, 62, 55, 415,
577: 55, 413, 63, 33, 33, 54, 54, 56, 54, 423,
578: 54, 60, 61, 62, 1, 33, 56, 4, 5, 6,
579: 7, 56, 5, 6, 7, 12, 13, 14, 444, 12,
580: 13, 14, 7, 33, 56, 451, 16, 60, 54, 33,
581: 27, 28, 56, 56, 31, 461, 54, 57, 57, 55,
582: 466, 63, 17, 4, 5, 6, 7, 56, 55, 55,
583: 9, 12, 13, 14, 54, 56, 55, 54, 56, 56,
584: 54, 56, 0, 60, 61, 62, 1, 28, 3, 4,
585: 5, 6, 7, 8, 9, 56, 11, 12, 13, 14,
586: 15, 55, 17, 18, 19, 20, 21, 22, 23, 24,
587: 25, 26, 27, 28, 29, 56, 4, 5, 6, 7,
588: 55, 0, 10, 38, 12, 13, 14, 56, 43, 44,
589: 45, 3, 156, 166, 49, 50, 292, 48, 265, 54,
590: 28, 56, 57, 58, 59, 1, 61, 3, 4, 5,
591: 6, 7, 8, 9, 328, 11, 12, 13, 14, 15,
592: 204, 17, 18, 19, 20, 21, 22, 23, 24, 25,
593: 26, 27, 28, 29, 368, 4, 5, 6, 7, 111,
594: 338, 199, 38, 12, 13, 14, 357, 43, 44, 45,
595: 462, 464, 245, 49, 50, -1, 242, 320, 54, 28,
596: 56, -1, 58, 59, 1, 61, 3, 4, -1, -1,
597: -1, 8, 9, -1, 11, -1, -1, -1, 15, -1,
598: 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
599: 27, -1, 29, 40, 41, 42, 43, 44, 45, 46,
600: 47, 38, -1, -1, -1, -1, 43, 44, 45, -1,
601: -1, -1, 49, 50, -1, -1, -1, 54, -1, 56,
602: 57, 58, 59, 1, 61, 3, 4, -1, -1, -1,
603: 8, 9, -1, 11, -1, -1, -1, 15, -1, 17,
604: 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
605: -1, 29, -1, 4, 5, 6, 7, -1, -1, -1,
606: 38, 12, 13, 14, -1, 43, 44, 45, -1, -1,
607: -1, 49, 50, -1, -1, -1, 54, 28, 56, 57,
608: 58, 59, 1, 61, 3, 4, -1, 6, 7, 8,
609: 9, -1, 11, 12, 13, 14, 41, 42, 43, 44,
610: 45, 46, 47, -1, 1, 56, 3, -1, -1, 28,
611: 29, 8, 9, -1, 11, -1, -1, -1, -1, 38,
612: -1, -1, -1, -1, 43, 44, 45, -1, 3, -1,
613: 49, 50, 29, 8, 9, 54, 11, -1, -1, 58,
614: 59, 38, 61, -1, -1, -1, 43, 44, 45, -1,
615: -1, -1, 49, 50, 29, -1, -1, 54, -1, -1,
616: 57, 58, 59, 1, 61, 3, -1, -1, -1, -1,
617: 8, 9, -1, 11, 49, 50, -1, -1, -1, 54,
618: -1, -1, -1, 58, 59, 1, 61, 3, -1, -1,
619: -1, 29, 8, 9, -1, 11, -1, -1, -1, -1,
620: 38, -1, -1, -1, -1, 43, 44, 45, -1, 3,
621: -1, 49, 50, 29, 8, 9, 54, 11, -1, 57,
622: 58, 59, 38, 61, -1, -1, -1, 43, 44, 45,
623: -1, 3, -1, 49, 50, 29, 8, 9, 54, 11,
624: -1, -1, 58, 59, 38, 61, -1, -1, -1, 43,
625: 44, 45, -1, 3, -1, 49, 50, 29, 8, 9,
626: 54, 11, -1, -1, 58, 59, 38, -1, -1, 63,
627: -1, 43, 44, 45, -1, 3, -1, 49, 50, 29,
628: 8, 9, 54, 11, -1, -1, 58, 59, 38, -1,
629: -1, 63, -1, 43, 44, 45, -1, 3, -1, 49,
630: 50, 29, 8, 9, 54, 11, -1, -1, 58, 59,
631: 38, -1, -1, 63, -1, 43, 44, 45, -1, -1,
632: -1, 49, 50, 29, -1, -1, 54, -1, -1, -1,
633: 58, 59, 38, -1, -1, 63, -1, 43, 44, 45,
634: -1, -1, -1, 49, 50, -1, -1, -1, 54, -1,
635: -1, -1, 58, 59, -1, 1, -1, 63, 4, 5,
636: 6, 7, 4, -1, 6, 7, 12, 13, 14, -1,
637: 12, 13, 14, -1, -1, -1, -1, -1, -1, -1,
638: -1, 27, 28, -1, 1, 31, 28, 4, 5, 6,
639: 7, -1, -1, -1, -1, 12, 13, 14, 3, 4,
640: 5, 6, 7, 45, -1, -1, -1, 12, 13, 14,
641: 56, 28, 54, -1, 60, 61, -1, -1, -1, -1,
642: 62, -1, 32, 28, 34, 35, 36, 37, 38, 39,
643: 40, 41, 42, 43, 44, 45, 46, 47, -1, -1,
644: 45, -1, -1, -1, 61, -1, -1, -1, -1, 54,
645: 3, 4, 5, 6, 7, 8, 9, 62, 11, 12,
646: 13, 14, 15, -1, 17, 18, 19, 20, 21, 22,
647: 23, 24, 25, 26, 27, 28, 29, -1, -1, -1,
648: -1, -1, -1, -1, -1, 38, -1, -1, -1, -1,
649: 43, 44, 45, -1, -1, -1, 49, 50, -1, -1,
650: -1, 54, -1, 56, -1, 58, 59, -1, 61, 3,
651: 4, -1, -1, -1, 8, 9, -1, 11, -1, -1,
652: -1, 15, -1, 17, 18, 19, 20, 21, 22, 23,
653: 24, 25, 26, 27, -1, 29, -1, 3, -1, -1,
654: -1, -1, 8, 9, 38, 11, -1, -1, -1, 43,
655: 44, 45, -1, -1, -1, 49, 50, -1, -1, -1,
656: 54, -1, 56, 29, 58, 59, -1, 61, -1, -1,
657: -1, -1, 38, -1, -1, -1, -1, 43, 44, 45,
658: -1, -1, -1, 49, 50, -1, -1, -1, 54, -1,
659: -1, -1, 58, 59, -1, 61, 3, 4, -1, 6,
660: 7, 8, 9, -1, 11, 12, 13, 14, 38, 39,
661: 40, 41, 42, 43, 44, 45, 46, 47, 3, -1,
662: -1, 28, 29, 8, 9, -1, 11, -1, -1, -1,
663: -1, 38, -1, -1, -1, -1, 43, 44, 45, -1,
664: 3, -1, 49, 50, 29, 8, 9, 54, 11, -1,
665: -1, 58, 59, 38, -1, -1, -1, -1, 43, 44,
666: 45, -1, 3, -1, 49, 50, 29, 8, 9, 54,
667: 11, 56, -1, 58, 59, 38, -1, -1, -1, -1,
668: 43, 44, 45, -1, 3, -1, 49, 50, 29, 8,
669: 9, 54, 11, -1, -1, 58, 59, 38, -1, -1,
670: -1, -1, 43, 44, 45, -1, -1, -1, 49, 50,
671: 29, -1, -1, 54, -1, -1, -1, 58, 59, 38,
672: -1, -1, -1, -1, 43, 44, 45, -1, -1, -1,
673: 49, 50, -1, -1, -1, 54, -1, -1, 1, 58,
674: 59, 4, 1, 6, 7, 4, -1, 6, 7, 12,
675: 13, 14, -1, 12, 13, 14, -1, -1, -1, -1,
676: -1, 1, -1, -1, 4, 28, 6, 7, -1, 28,
677: -1, -1, 12, 13, 14, -1, -1, -1, 1, -1,
678: 3, 4, 5, 6, 7, -1, -1, -1, 28, 12,
679: 13, 14, -1, 56, 57, -1, -1, 56, 57, -1,
680: -1, -1, -1, -1, 27, 28, -1, 1, -1, 3,
681: 4, 5, 6, 7, -1, -1, 56, 57, 12, 13,
682: 14, -1, 45, -1, 1, -1, -1, 4, 5, 6,
683: 7, 54, -1, 56, 28, 12, 13, 14, 35, 36,
684: 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
685: 47, 28, -1, -1, -1, -1, -1, -1, 30, 31,
686: 32, 55, 34, 35, 36, 37, 38, 39, 40, 41,
687: 42, 43, 44, 45, 46, 47, -1, -1, 55, 36,
688: 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
689: 47, 37, 38, 39, 40, 41, 42, 43, 44, 45,
690: 46, 47, 39, 40, 41, 42, 43, 44, 45, 46,
691: 47
692: };
693: #define YYPURE 1
694:
695: #line 2 "bison.simple"
696:
697: /* Skeleton output parser for bison,
698: copyright (C) 1984 Bob Corbett and Richard Stallman
699:
700: NO WARRANTY
701:
702: BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
703: NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
704: WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC,
705: RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS"
706: WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
707: BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
708: FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY
709: AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
710: DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
711: CORRECTION.
712:
713: IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
714: STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY
715: WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE
716: LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR
717: OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
718: USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
719: DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR
720: A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS
721: PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
722: DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
723:
724: GENERAL PUBLIC LICENSE TO COPY
725:
726: 1. You may copy and distribute verbatim copies of this source file
727: as you receive it, in any medium, provided that you conspicuously and
728: appropriately publish on each copy a valid copyright notice "Copyright
729: (C) 1985 Free Software Foundation, Inc."; and include following the
730: copyright notice a verbatim copy of the above disclaimer of warranty
731: and of this License. You may charge a distribution fee for the
732: physical act of transferring a copy.
733:
734: 2. You may modify your copy or copies of this source file or
735: any portion of it, and copy and distribute such modifications under
736: the terms of Paragraph 1 above, provided that you also do the following:
737:
738: a) cause the modified files to carry prominent notices stating
739: that you changed the files and the date of any change; and
740:
741: b) cause the whole of any work that you distribute or publish,
742: that in whole or in part contains or is a derivative of this
743: program or any part thereof, to be licensed at no charge to all
744: third parties on terms identical to those contained in this
745: License Agreement (except that you may choose to grant more extensive
746: warranty protection to some or all third parties, at your option).
747:
748: c) You may charge a distribution fee for the physical act of
749: transferring a copy, and you may at your option offer warranty
750: protection in exchange for a fee.
751:
752: Mere aggregation of another unrelated program with this program (or its
753: derivative) on a volume of a storage or distribution medium does not bring
754: the other program under the scope of these terms.
755:
756: 3. You may copy and distribute this program (or a portion or derivative
757: of it, under Paragraph 2) in object code or executable form under the terms
758: of Paragraphs 1 and 2 above provided that you also do one of the following:
759:
760: a) accompany it with the complete corresponding machine-readable
761: source code, which must be distributed under the terms of
762: Paragraphs 1 and 2 above; or,
763:
764: b) accompany it with a written offer, valid for at least three
765: years, to give any third party free (except for a nominal
766: shipping charge) a complete machine-readable copy of the
767: corresponding source code, to be distributed under the terms of
768: Paragraphs 1 and 2 above; or,
769:
770: c) accompany it with the information you received as to where the
771: corresponding source code may be obtained. (This alternative is
772: allowed only for noncommercial distribution and only if you
773: received the program in object code or executable form alone.)
774:
775: For an executable file, complete source code means all the source code for
776: all modules it contains; but, as a special exception, it need not include
777: source code for modules which are standard libraries that accompany the
778: operating system on which the executable file runs.
779:
780: 4. You may not copy, sublicense, distribute or transfer this program
781: except as expressly provided under this License Agreement. Any attempt
782: otherwise to copy, sublicense, distribute or transfer this program is void and
783: your rights to use the program under this License agreement shall be
784: automatically terminated. However, parties who have received computer
785: software programs from you with this License Agreement will not have
786: their licenses terminated so long as such parties remain in full compliance.
787:
788: 5. If you wish to incorporate parts of this program into other free
789: programs whose distribution conditions are different, write to the Free
790: Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not yet
791: worked out a simple rule that can be stated here, but we will often permit
792: this. We will be guided by the two goals of preserving the free status of
793: all derivatives of our free software and of promoting the sharing and reuse of
794: software.
795:
796:
797: In other words, you are welcome to use, share and improve this program.
798: You are forbidden to forbid anyone else to use, share and improve
799: what you give them. Help stamp out software-hoarding! */
800:
801: /* This is the parser code that is written into each bison parser
802: when the %semantic_parser declaration is not specified in the grammar.
803: It was written by Richard Stallman by simplifying the hairy parser
804: used when %semantic_parser is specified. */
805:
806: /* Note: there must be only one dollar sign in this file.
807: It is replaced by the list of actions, each action
808: as one case of the switch. */
809:
810: #define yyerrok (yyerrstatus = 0)
811: #define yyclearin (yychar = YYEMPTY)
812: #define YYEMPTY -2
813: #define YYEOF 0
814: #define YYFAIL goto yyerrlab;
815:
816: #define YYTERROR 1
817:
818: #ifndef YYIMPURE
819: #define YYLEX yylex()
820: #endif
821:
822: #ifndef YYPURE
823: #define YYLEX yylex(&yylval, &yylloc)
824: #endif
825:
826: /* If nonreentrant, generate the variables here */
827:
828: #ifndef YYIMPURE
829:
830: int yychar; /* the lookahead symbol */
831: YYSTYPE yylval; /* the semantic value of the */
832: /* lookahead symbol */
833:
834: YYLTYPE yylloc; /* location data for the lookahead */
835: /* symbol */
836:
837: int yynerr; /* number of parse errors so far */
838:
839: #ifdef YYDEBUG
840: int yydebug = 0; /* nonzero means print parse trace */
841: #endif
842:
843: #endif /* YYIMPURE */
844:
845:
846: /* YYMAXDEPTH indicates the initial size of the parser's stacks */
847:
848: #ifndef YYMAXDEPTH
849: #define YYMAXDEPTH 200
850: #endif
851:
852: /* YYMAXLIMIT is the maximum size the stacks can grow to
853: (effective only if the built-in stack extension method is used). */
854:
855: #ifndef YYMAXLIMIT
856: #define YYMAXLIMIT 10000
857: #endif
858:
859:
860: #line 165 "bison.simple"
861: int
862: yyparse()
863: {
864: register int yystate;
865: register int yyn;
866: register short *yyssp;
867: register YYSTYPE *yyvsp;
868: YYLTYPE *yylsp;
869: int yyerrstatus; /* number of tokens to shift before error messages enabled */
870: int yychar1; /* lookahead token as an internal (translated) token number */
871:
872: short yyssa[YYMAXDEPTH]; /* the state stack */
873: YYSTYPE yyvsa[YYMAXDEPTH]; /* the semantic value stack */
874: YYLTYPE yylsa[YYMAXDEPTH]; /* the location stack */
875:
876: short *yyss = yyssa; /* refer to the stacks thru separate pointers */
877: YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
878: YYLTYPE *yyls = yylsa;
879:
880: int yymaxdepth = YYMAXDEPTH;
881:
882: #ifndef YYPURE
883: int yychar;
884: YYSTYPE yylval;
885: YYLTYPE yylloc;
886: #endif
887:
888: #ifdef YYDEBUG
889: extern int yydebug;
890: #endif
891:
892:
893: YYSTYPE yyval; /* the variable used to return */
894: /* semantic values from the action */
895: /* routines */
896:
897: int yylen;
898:
899: #ifdef YYDEBUG
900: if (yydebug)
901: fprintf(stderr, "Starting parse\n");
902: #endif
903:
904: yystate = 0;
905: yyerrstatus = 0;
906: yynerr = 0;
907: yychar = YYEMPTY; /* Cause a token to be read. */
908:
909: /* Initialize stack pointers.
910: Waste one element of value and location stack
911: so that they stay on the same level as the state stack. */
912:
913: yyssp = yyss - 1;
914: yyvsp = yyvs;
915: yylsp = yyls;
916:
917: /* Push a new state, which is found in yystate . */
918: /* In all cases, when you get here, the value and location stacks
919: have just been pushed. so pushing a state here evens the stacks. */
920: yynewstate:
921:
922: *++yyssp = yystate;
923:
924: if (yyssp >= yyss + yymaxdepth - 1)
925: {
926: /* Give user a chance to reallocate the stack */
927: /* Use copies of these so that the &'s don't force the real ones into memory. */
928: YYSTYPE *yyvs1 = yyvs;
929: YYLTYPE *yyls1 = yyls;
930: short *yyss1 = yyss;
931:
932: /* Get the current used size of the three stacks, in elements. */
933: int size = yyssp - yyss + 1;
934:
935: #ifdef yyoverflow
936: /* Each stack pointer address is followed by the size of
937: the data in use in that stack, in bytes. */
938: yyoverflow("parser stack overflow",
939: &yyss1, size * sizeof (*yyssp),
940: &yyvs1, size * sizeof (*yyvsp),
941: &yyls1, size * sizeof (*yylsp),
942: &yymaxdepth);
943:
944: yyss = yyss1; yyvs = yyvs1; yyls = yyls1;
945: #else /* no yyoverflow */
946: /* Extend the stack our own way. */
947: if (yymaxdepth >= YYMAXLIMIT)
948: yyerror("parser stack overflow");
949: yymaxdepth *= 2;
950: if (yymaxdepth > YYMAXLIMIT)
951: yymaxdepth = YYMAXLIMIT;
952: yyss = (short *) alloca (yymaxdepth * sizeof (*yyssp));
953: bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
954: yyvs = (YYSTYPE *) alloca (yymaxdepth * sizeof (*yyvsp));
955: bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
956: #ifdef YYLSP_NEEDED
957: yyls = (YYLTYPE *) alloca (yymaxdepth * sizeof (*yylsp));
958: bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
959: #endif
960: #endif /* no yyoverflow */
961:
962: yyssp = yyss + size - 1;
963: yyvsp = yyvs + size - 1;
964: #ifdef YYLSP_NEEDED
965: yylsp = yyls + size - 1;
966: #endif
967:
968: #ifdef YYDEBUG
969: if (yydebug)
970: fprintf(stderr, "Stack size increased to %d\n", yymaxdepth);
971: #endif
972:
973: if (yyssp >= yyss + yymaxdepth - 1)
974: YYERROR;
975: }
976:
977: #ifdef YYDEBUG
978: if (yydebug)
979: fprintf(stderr, "Entering state %d\n", yystate);
980: #endif
981:
982: /* Do appropriate processing given the current state. */
983: /* Read a lookahead token if we need one and don't already have one. */
984: yyresume:
985:
986: /* First try to decide what to do without reference to lookahead token. */
987:
988: yyn = yypact[yystate];
989: if (yyn == YYFLAG)
990: goto yydefault;
991:
992: /* Not known => get a lookahead token if don't already have one. */
993:
994: /* yychar is either YYEMPTY or YYEOF
995: or a valid token in external form. */
996:
997: if (yychar == YYEMPTY)
998: {
999: #ifdef YYDEBUG
1000: if (yydebug)
1001: fprintf(stderr, "Reading a token: ");
1002: #endif
1003: yychar = YYLEX;
1004: }
1005:
1006: /* Convert token to internal form (in yychar1) for indexing tables with */
1007:
1008: if (yychar <= 0) /* This means end of input. */
1009: {
1010: yychar1 = 0;
1011: yychar = YYEOF; /* Don't call YYLEX any more */
1012:
1013: #ifdef YYDEBUG
1014: if (yydebug)
1015: fprintf(stderr, "Now at end of input.\n");
1016: #endif
1017: }
1018: else
1019: {
1020: yychar1 = YYTRANSLATE(yychar);
1021:
1022: #ifdef YYDEBUG
1023: if (yydebug)
1024: fprintf(stderr, "Next token is %d (%s)\n", yychar, yytname[yychar1]);
1025: #endif
1026: }
1027:
1028: yyn += yychar1;
1029: if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1030: goto yydefault;
1031:
1032: yyn = yytable[yyn];
1033:
1034: /* yyn is what to do for this token type in this state.
1035: Negative => reduce, -yyn is rule number.
1036: Positive => shift, yyn is new state.
1037: New state is final state => don't bother to shift,
1038: just return success.
1039: 0, or most negative number => error. */
1040:
1041: if (yyn < 0)
1042: {
1043: if (yyn == YYFLAG)
1044: goto yyerrlab;
1045: yyn = -yyn;
1046: goto yyreduce;
1047: }
1048: else if (yyn == 0)
1049: goto yyerrlab;
1050:
1051: if (yyn == YYFINAL)
1052: YYACCEPT;
1053:
1054: /* Shift the lookahead token. */
1055:
1056: #ifdef YYDEBUG
1057: if (yydebug)
1058: fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1059: #endif
1060:
1061: /* Discard the token being shifted unless it is eof. */
1062: if (yychar != YYEOF)
1063: yychar = YYEMPTY;
1064:
1065: *++yyvsp = yylval;
1066: #ifdef YYLSP_NEEDED
1067: *++yylsp = yylloc;
1068: #endif
1069:
1070: /* count tokens shifted since error; after three, turn off error status. */
1071: if (yyerrstatus) yyerrstatus--;
1072:
1073: yystate = yyn;
1074: goto yynewstate;
1075:
1076: /* Do the default action for the current state. */
1077: yydefault:
1078:
1079: yyn = yydefact[yystate];
1080: if (yyn == 0)
1081: goto yyerrlab;
1082:
1083: /* Do a reduction. yyn is the number of a rule to reduce with. */
1084: yyreduce:
1085: yylen = yyr2[yyn];
1086: yyval = yyvsp[1-yylen]; /* implement default value of the action */
1087:
1088: #ifdef YYDEBUG
1089: if (yydebug)
1090: {
1091: if (yylen == 1)
1092: fprintf (stderr, "Reducing 1 value via line %d, ",
1093: yyrline[yyn]);
1094: else
1095: fprintf (stderr, "Reducing %d values via line %d, ",
1096: yylen, yyrline[yyn]);
1097: }
1098: #endif
1099:
1100:
1101: switch (yyn) {
1102:
1103: case 3:
1104: #line 173 "parse.y"
1105: {yyval.ttype = NULL_TREE; ;
1106: break;}
1107: case 5:
1108: #line 174 "parse.y"
1109: {yyval.ttype = NULL_TREE; ;
1110: break;}
1111: case 9:
1112: #line 181 "parse.y"
1113: { if (pedantic)
1114: warning ("ANSI C forbids use of `asm' keyword");
1115: if (TREE_CHAIN (yyvsp[-2].ttype)) yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype);
1116: assemble_asm (yyvsp[-2].ttype); ;
1117: break;}
1118: case 10:
1119: #line 189 "parse.y"
1120: { if (pedantic)
1121: error ("ANSI C forbids data definition lacking type or storage class");
1122: else
1123: warning ("data definition lacks type or storage class"); ;
1124: break;}
1125: case 11:
1126: #line 194 "parse.y"
1127: {;
1128: break;}
1129: case 12:
1130: #line 196 "parse.y"
1131: {;
1132: break;}
1133: case 13:
1134: #line 198 "parse.y"
1135: { error ("empty declaration"); ;
1136: break;}
1137: case 14:
1138: #line 200 "parse.y"
1139: { shadow_tag (yyvsp[-1].ttype); ;
1140: break;}
1141: case 18:
1142: #line 208 "parse.y"
1143: { if (! start_function (yyvsp[-2].ttype, yyvsp[0].ttype))
1144: YYFAIL;
1145: reinit_parse_for_function (); ;
1146: break;}
1147: case 19:
1148: #line 212 "parse.y"
1149: { store_parm_decls (); ;
1150: break;}
1151: case 20:
1152: #line 214 "parse.y"
1153: { finish_function (); ;
1154: break;}
1155: case 21:
1156: #line 216 "parse.y"
1157: { ;
1158: break;}
1159: case 22:
1160: #line 218 "parse.y"
1161: { if (! start_function (yyvsp[-2].ttype, yyvsp[0].ttype))
1162: YYFAIL;
1163: reinit_parse_for_function (); ;
1164: break;}
1165: case 23:
1166: #line 222 "parse.y"
1167: { store_parm_decls (); ;
1168: break;}
1169: case 24:
1170: #line 224 "parse.y"
1171: { finish_function (); ;
1172: break;}
1173: case 25:
1174: #line 226 "parse.y"
1175: { ;
1176: break;}
1177: case 26:
1178: #line 228 "parse.y"
1179: { if (! start_function (0, yyvsp[0].ttype))
1180: YYFAIL;
1181: reinit_parse_for_function (); ;
1182: break;}
1183: case 27:
1184: #line 232 "parse.y"
1185: { store_parm_decls (); ;
1186: break;}
1187: case 28:
1188: #line 234 "parse.y"
1189: { finish_function (); ;
1190: break;}
1191: case 29:
1192: #line 236 "parse.y"
1193: { ;
1194: break;}
1195: case 32:
1196: #line 245 "parse.y"
1197: { yyval.code = ADDR_EXPR; ;
1198: break;}
1199: case 33:
1200: #line 247 "parse.y"
1201: { yyval.code = NEGATE_EXPR; ;
1202: break;}
1203: case 34:
1204: #line 249 "parse.y"
1205: { yyval.code = CONVERT_EXPR; ;
1206: break;}
1207: case 35:
1208: #line 251 "parse.y"
1209: { yyval.code = PREINCREMENT_EXPR; ;
1210: break;}
1211: case 36:
1212: #line 253 "parse.y"
1213: { yyval.code = PREDECREMENT_EXPR; ;
1214: break;}
1215: case 37:
1216: #line 255 "parse.y"
1217: { yyval.code = BIT_NOT_EXPR; ;
1218: break;}
1219: case 38:
1220: #line 257 "parse.y"
1221: { yyval.code = TRUTH_NOT_EXPR; ;
1222: break;}
1223: case 39:
1224: #line 261 "parse.y"
1225: { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ;
1226: break;}
1227: case 40:
1228: #line 266 "parse.y"
1229: { yyval.ttype = NULL_TREE; ;
1230: break;}
1231: case 42:
1232: #line 272 "parse.y"
1233: { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
1234: break;}
1235: case 43:
1236: #line 274 "parse.y"
1237: { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
1238: break;}
1239: case 45:
1240: #line 280 "parse.y"
1241: { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ;
1242: break;}
1243: case 46:
1244: #line 282 "parse.y"
1245: { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); ;
1246: break;}
1247: case 47:
1248: #line 284 "parse.y"
1249: { tree type = groktypename (yyvsp[-2].ttype);
1250: yyval.ttype = build_c_cast (type, yyvsp[0].ttype); ;
1251: break;}
1252: case 48:
1253: #line 287 "parse.y"
1254: { tree type = groktypename (yyvsp[-5].ttype);
1255: if (pedantic)
1256: warning ("ANSI C forbids constructor-expressions");
1257: yyval.ttype = digest_init (type, build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)), 0);
1258: if (TREE_CODE (type) == ARRAY_TYPE && TYPE_SIZE (type) == 0)
1259: {
1260: int failure = complete_array_type (type, yyval.ttype, 1);
1261: if (failure)
1262: abort ();
1263: }
1264: ;
1265: break;}
1266: case 49:
1267: #line 299 "parse.y"
1268: { if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF
1269: && TREE_PACKED (TREE_OPERAND (yyvsp[0].ttype, 1)))
1270: error ("sizeof applied to a bit-field");
1271: yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ;
1272: break;}
1273: case 50:
1274: #line 304 "parse.y"
1275: { yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ;
1276: break;}
1277: case 51:
1278: #line 306 "parse.y"
1279: { if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF
1280: && TREE_PACKED (TREE_OPERAND (yyvsp[0].ttype, 1)))
1281: error ("__alignof applied to a bit-field");
1282: yyval.ttype = c_alignof (TREE_TYPE (yyvsp[0].ttype)); ;
1283: break;}
1284: case 52:
1285: #line 311 "parse.y"
1286: { yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ;
1287: break;}
1288: case 53:
1289: #line 313 "parse.y"
1290: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1291: break;}
1292: case 54:
1293: #line 315 "parse.y"
1294: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1295: break;}
1296: case 55:
1297: #line 317 "parse.y"
1298: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1299: break;}
1300: case 56:
1301: #line 319 "parse.y"
1302: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1303: break;}
1304: case 57:
1305: #line 321 "parse.y"
1306: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1307: break;}
1308: case 58:
1309: #line 323 "parse.y"
1310: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1311: break;}
1312: case 59:
1313: #line 325 "parse.y"
1314: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1315: break;}
1316: case 60:
1317: #line 327 "parse.y"
1318: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1319: break;}
1320: case 61:
1321: #line 329 "parse.y"
1322: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1323: break;}
1324: case 62:
1325: #line 331 "parse.y"
1326: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1327: break;}
1328: case 63:
1329: #line 333 "parse.y"
1330: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1331: break;}
1332: case 64:
1333: #line 335 "parse.y"
1334: { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1335: break;}
1336: case 65:
1337: #line 337 "parse.y"
1338: { yyval.ttype = build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1339: break;}
1340: case 66:
1341: #line 339 "parse.y"
1342: { yyval.ttype = build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1343: break;}
1344: case 67:
1345: #line 341 "parse.y"
1346: { yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ;
1347: break;}
1348: case 68:
1349: #line 343 "parse.y"
1350: { yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); ;
1351: break;}
1352: case 69:
1353: #line 345 "parse.y"
1354: { yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); ;
1355: break;}
1356: case 70:
1357: #line 350 "parse.y"
1358: { yyval.ttype = lastiddecl;
1359: if (!yyval.ttype)
1360: {
1361: if (yychar == YYEMPTY)
1362: yychar = YYLEX;
1363: if (yychar == '(')
1364: yyval.ttype = implicitly_declare (yyvsp[0].ttype);
1365: else
1366: {
1367: if (IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) != error_mark_node)
1368: error ("undeclared variable `%s' (first use here)",
1369: IDENTIFIER_POINTER (yyvsp[0].ttype));
1370: yyval.ttype = error_mark_node;
1371: /* Prevent repeated error messages. */
1372: IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) = error_mark_node;
1373: }
1374: }
1375: if (TREE_CODE (yyval.ttype) == CONST_DECL)
1376: yyval.ttype = DECL_INITIAL (yyval.ttype);
1377: ;
1378: break;}
1379: case 72:
1380: #line 372 "parse.y"
1381: { yyval.ttype = combine_strings (yyvsp[0].ttype); ;
1382: break;}
1383: case 73:
1384: #line 374 "parse.y"
1385: { yyval.ttype = yyvsp[-1].ttype; ;
1386: break;}
1387: case 74:
1388: #line 376 "parse.y"
1389: { yyval.ttype = error_mark_node; ;
1390: break;}
1391: case 75:
1392: #line 378 "parse.y"
1393: { if (current_function_decl == 0)
1394: {
1395: error ("braced-group within expression allowed only inside a function");
1396: YYFAIL;
1397: }
1398: expand_start_stmt_expr (); ;
1399: break;}
1400: case 76:
1401: #line 385 "parse.y"
1402: { if (pedantic)
1403: warning ("ANSI C forbids braced-groups within expressions");
1404: yyval.ttype = get_last_expr ();
1405: expand_end_stmt_expr (); ;
1406: break;}
1407: case 77:
1408: #line 390 "parse.y"
1409: { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
1410: break;}
1411: case 78:
1412: #line 392 "parse.y"
1413: { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
1414: break;}
1415: case 79:
1416: #line 394 "parse.y"
1417: { yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ;
1418: break;}
1419: case 80:
1420: #line 396 "parse.y"
1421: { yyval.ttype = build_component_ref (build_indirect_ref (yyvsp[-2].ttype, "->"), yyvsp[0].ttype); ;
1422: break;}
1423: case 81:
1424: #line 398 "parse.y"
1425: { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ;
1426: break;}
1427: case 82:
1428: #line 400 "parse.y"
1429: { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ;
1430: break;}
1431: case 84:
1432: #line 407 "parse.y"
1433: { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ;
1434: break;}
1435: case 91:
1436: #line 425 "parse.y"
1437: { current_declspecs = yyvsp[0].ttype;
1438: yyval.itype = suspend_momentary (); ;
1439: break;}
1440: case 92:
1441: #line 431 "parse.y"
1442: { resume_momentary (yyvsp[-2].itype); ;
1443: break;}
1444: case 93:
1445: #line 433 "parse.y"
1446: { resume_momentary (yyvsp[-2].itype); ;
1447: break;}
1448: case 94:
1449: #line 435 "parse.y"
1450: { shadow_tag (yyvsp[-1].ttype); ;
1451: break;}
1452: case 95:
1453: #line 437 "parse.y"
1454: { warning ("empty declaration"); ;
1455: break;}
1456: case 96:
1457: #line 446 "parse.y"
1458: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ;
1459: break;}
1460: case 97:
1461: #line 448 "parse.y"
1462: { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ;
1463: break;}
1464: case 98:
1465: #line 452 "parse.y"
1466: { yyval.ttype = NULL_TREE; ;
1467: break;}
1468: case 99:
1469: #line 454 "parse.y"
1470: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
1471: break;}
1472: case 100:
1473: #line 456 "parse.y"
1474: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
1475: break;}
1476: case 101:
1477: #line 465 "parse.y"
1478: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;
1479: break;}
1480: case 102:
1481: #line 467 "parse.y"
1482: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;
1483: break;}
1484: case 103:
1485: #line 469 "parse.y"
1486: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
1487: break;}
1488: case 104:
1489: #line 471 "parse.y"
1490: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
1491: break;}
1492: case 105:
1493: #line 481 "parse.y"
1494: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ;
1495: break;}
1496: case 106:
1497: #line 483 "parse.y"
1498: { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ;
1499: break;}
1500: case 107:
1501: #line 487 "parse.y"
1502: { yyval.ttype = NULL_TREE; ;
1503: break;}
1504: case 108:
1505: #line 489 "parse.y"
1506: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
1507: break;}
1508: case 112:
1509: #line 500 "parse.y"
1510: { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype);
1511: if (pedantic)
1512: warning ("ANSI C forbids `typeof'") ;
1513: break;}
1514: case 113:
1515: #line 504 "parse.y"
1516: { yyval.ttype = groktypename (yyvsp[-1].ttype);
1517: if (pedantic)
1518: warning ("ANSI C forbids `typeof'") ;
1519: break;}
1520: case 121:
1521: #line 528 "parse.y"
1522: { yyval.ttype = NULL_TREE; ;
1523: break;}
1524: case 122:
1525: #line 530 "parse.y"
1526: { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype);
1527: yyval.ttype = yyvsp[-1].ttype;
1528: if (pedantic)
1529: warning ("ANSI C forbids use of `asm' keyword");
1530: ;
1531: break;}
1532: case 123:
1533: #line 539 "parse.y"
1534: { yyval.ttype = start_decl (yyvsp[-2].ttype, current_declspecs, 1); ;
1535: break;}
1536: case 124:
1537: #line 542 "parse.y"
1538: { finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-3].ttype); ;
1539: break;}
1540: case 125:
1541: #line 544 "parse.y"
1542: { tree d = start_decl (yyvsp[-1].ttype, current_declspecs, 0);
1543: finish_decl (d, NULL_TREE, yyvsp[0].ttype); ;
1544: break;}
1545: case 126:
1546: #line 550 "parse.y"
1547: { yyval.ttype = start_decl (yyvsp[-2].ttype, current_declspecs, 1); ;
1548: break;}
1549: case 127:
1550: #line 553 "parse.y"
1551: { finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-3].ttype); ;
1552: break;}
1553: case 128:
1554: #line 555 "parse.y"
1555: { tree d = start_decl (yyvsp[-1].ttype, current_declspecs, 0);
1556: finish_decl (d, NULL_TREE, yyvsp[0].ttype); ;
1557: break;}
1558: case 130:
1559: #line 562 "parse.y"
1560: { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-1].ttype)); ;
1561: break;}
1562: case 131:
1563: #line 564 "parse.y"
1564: { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)); ;
1565: break;}
1566: case 132:
1567: #line 566 "parse.y"
1568: { yyval.ttype = NULL_TREE; ;
1569: break;}
1570: case 133:
1571: #line 573 "parse.y"
1572: { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
1573: break;}
1574: case 134:
1575: #line 575 "parse.y"
1576: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype); ;
1577: break;}
1578: case 137:
1579: #line 590 "parse.y"
1580: { yyval.ttype = yyvsp[-1].ttype; ;
1581: break;}
1582: case 138:
1583: #line 592 "parse.y"
1584: { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;
1585: break;}
1586: case 139:
1587: #line 597 "parse.y"
1588: { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
1589: break;}
1590: case 140:
1591: #line 599 "parse.y"
1592: { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
1593: break;}
1594: case 141:
1595: #line 601 "parse.y"
1596: { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
1597: break;}
1598: case 143:
1599: #line 612 "parse.y"
1600: { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;
1601: break;}
1602: case 144:
1603: #line 617 "parse.y"
1604: { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
1605: break;}
1606: case 145:
1607: #line 619 "parse.y"
1608: { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
1609: break;}
1610: case 146:
1611: #line 621 "parse.y"
1612: { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
1613: break;}
1614: case 148:
1615: #line 630 "parse.y"
1616: { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;
1617: break;}
1618: case 149:
1619: #line 635 "parse.y"
1620: { yyval.ttype = yyvsp[-1].ttype; ;
1621: break;}
1622: case 150:
1623: #line 637 "parse.y"
1624: { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
1625: break;}
1626: case 151:
1627: #line 639 "parse.y"
1628: { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
1629: break;}
1630: case 152:
1631: #line 641 "parse.y"
1632: { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
1633: break;}
1634: case 154:
1635: #line 647 "parse.y"
1636: { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype);
1637: /* Start scope of tag before parsing components. */
1638: ;
1639: break;}
1640: case 155:
1641: #line 651 "parse.y"
1642: { yyval.ttype = finish_struct (yyvsp[-2].ttype, yyvsp[-1].ttype);
1643: /* Really define the structure. */
1644: ;
1645: break;}
1646: case 156:
1647: #line 655 "parse.y"
1648: { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE),
1649: yyvsp[-1].ttype); ;
1650: break;}
1651: case 157:
1652: #line 658 "parse.y"
1653: { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ;
1654: break;}
1655: case 158:
1656: #line 660 "parse.y"
1657: { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ;
1658: break;}
1659: case 159:
1660: #line 662 "parse.y"
1661: { yyval.ttype = finish_struct (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
1662: break;}
1663: case 160:
1664: #line 664 "parse.y"
1665: { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE),
1666: yyvsp[-1].ttype); ;
1667: break;}
1668: case 161:
1669: #line 667 "parse.y"
1670: { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ;
1671: break;}
1672: case 162:
1673: #line 669 "parse.y"
1674: { yyvsp[0].itype = suspend_momentary ();
1675: yyval.ttype = start_enum (yyvsp[-1].ttype); ;
1676: break;}
1677: case 163:
1678: #line 672 "parse.y"
1679: { yyval.ttype = finish_enum (yyvsp[-3].ttype, nreverse (yyvsp[-2].ttype));
1680: resume_momentary (yyvsp[-4].itype); ;
1681: break;}
1682: case 164:
1683: #line 675 "parse.y"
1684: { yyvsp[0].itype = suspend_momentary ();
1685: yyval.ttype = start_enum (NULL_TREE); ;
1686: break;}
1687: case 165:
1688: #line 678 "parse.y"
1689: { yyval.ttype = finish_enum (yyvsp[-3].ttype, nreverse (yyvsp[-2].ttype));
1690: resume_momentary (yyvsp[-4].itype); ;
1691: break;}
1692: case 166:
1693: #line 681 "parse.y"
1694: { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ;
1695: break;}
1696: case 169:
1697: #line 690 "parse.y"
1698: { yyval.ttype = NULL_TREE; ;
1699: break;}
1700: case 170:
1701: #line 692 "parse.y"
1702: { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
1703: break;}
1704: case 171:
1705: #line 694 "parse.y"
1706: { if (pedantic)
1707: warning ("extra semicolon in struct or union specified"); ;
1708: break;}
1709: case 172:
1710: #line 709 "parse.y"
1711: { yyval.ttype = yyvsp[0].ttype;
1712: resume_momentary (yyvsp[-1].itype); ;
1713: break;}
1714: case 173:
1715: #line 712 "parse.y"
1716: { yyval.ttype = yyvsp[0].ttype;
1717: resume_momentary (yyvsp[-1].itype); ;
1718: break;}
1719: case 174:
1720: #line 715 "parse.y"
1721: { yyval.ttype = NULL_TREE; ;
1722: break;}
1723: case 175:
1724: #line 720 "parse.y"
1725: { yyval.ttype = NULL_TREE; ;
1726: break;}
1727: case 177:
1728: #line 723 "parse.y"
1729: { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;
1730: break;}
1731: case 178:
1732: #line 728 "parse.y"
1733: { yyval.ttype = grokfield (input_filename, lineno, yyvsp[0].ttype, current_declspecs, NULL_TREE); ;
1734: break;}
1735: case 179:
1736: #line 730 "parse.y"
1737: { yyval.ttype = grokfield (input_filename, lineno, yyvsp[-2].ttype, current_declspecs, yyvsp[0].ttype); ;
1738: break;}
1739: case 180:
1740: #line 732 "parse.y"
1741: { yyval.ttype = grokfield (input_filename, lineno, NULL_TREE, current_declspecs, yyvsp[0].ttype); ;
1742: break;}
1743: case 182:
1744: #line 743 "parse.y"
1745: { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ;
1746: break;}
1747: case 183:
1748: #line 749 "parse.y"
1749: { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ;
1750: break;}
1751: case 184:
1752: #line 751 "parse.y"
1753: { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ;
1754: break;}
1755: case 185:
1756: #line 756 "parse.y"
1757: { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;
1758: break;}
1759: case 186:
1760: #line 758 "parse.y"
1761: { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;
1762: break;}
1763: case 187:
1764: #line 763 "parse.y"
1765: { yyval.ttype = NULL_TREE; ;
1766: break;}
1767: case 189:
1768: #line 769 "parse.y"
1769: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;
1770: break;}
1771: case 190:
1772: #line 771 "parse.y"
1773: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
1774: break;}
1775: case 191:
1776: #line 776 "parse.y"
1777: { yyval.ttype = NULL_TREE; ;
1778: break;}
1779: case 192:
1780: #line 778 "parse.y"
1781: { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
1782: break;}
1783: case 193:
1784: #line 783 "parse.y"
1785: { yyval.ttype = yyvsp[-1].ttype; ;
1786: break;}
1787: case 194:
1788: #line 786 "parse.y"
1789: { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
1790: break;}
1791: case 195:
1792: #line 788 "parse.y"
1793: { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ;
1794: break;}
1795: case 196:
1796: #line 790 "parse.y"
1797: { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;
1798: break;}
1799: case 197:
1800: #line 792 "parse.y"
1801: { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
1802: break;}
1803: case 198:
1804: #line 794 "parse.y"
1805: { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
1806: break;}
1807: case 199:
1808: #line 796 "parse.y"
1809: { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;
1810: break;}
1811: case 200:
1812: #line 798 "parse.y"
1813: { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ;
1814: break;}
1815: case 201:
1816: #line 800 "parse.y"
1817: { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ;
1818: break;}
1819: case 208:
1820: #line 822 "parse.y"
1821: { pushlevel (0);
1822: clear_last_expr ();
1823: push_momentary ();
1824: expand_start_bindings (0); ;
1825: break;}
1826: case 210:
1827: #line 830 "parse.y"
1828: { expand_end_bindings (getdecls (), 1);
1829: poplevel (1, 1, 0);
1830: pop_momentary (); ;
1831: break;}
1832: case 211:
1833: #line 834 "parse.y"
1834: { expand_end_bindings (getdecls (), 0);
1835: poplevel (0, 0, 0);
1836: pop_momentary (); ;
1837: break;}
1838: case 212:
1839: #line 838 "parse.y"
1840: { expand_end_bindings (getdecls (), 0);
1841: poplevel (0, 0, 0);
1842: pop_momentary (); ;
1843: break;}
1844: case 213:
1845: #line 845 "parse.y"
1846: { emit_note (input_filename, lineno);
1847: expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0); ;
1848: break;}
1849: case 216:
1850: #line 853 "parse.y"
1851: { emit_note (input_filename, lineno);
1852: expand_expr_stmt (yyvsp[-1].ttype);
1853: clear_momentary (); ;
1854: break;}
1855: case 217:
1856: #line 857 "parse.y"
1857: { expand_start_else (); ;
1858: break;}
1859: case 218:
1860: #line 859 "parse.y"
1861: { expand_end_else (); ;
1862: break;}
1863: case 219:
1864: #line 861 "parse.y"
1865: { expand_end_cond (); ;
1866: break;}
1867: case 220:
1868: #line 863 "parse.y"
1869: { emit_note (input_filename, lineno);
1870: expand_start_loop (1); ;
1871: break;}
1872: case 221:
1873: #line 866 "parse.y"
1874: { emit_note (input_filename, lineno);
1875: expand_exit_loop_if_false (truthvalue_conversion (yyvsp[-1].ttype)); ;
1876: break;}
1877: case 222:
1878: #line 869 "parse.y"
1879: { expand_end_loop (); ;
1880: break;}
1881: case 223:
1882: #line 871 "parse.y"
1883: { emit_note (input_filename, lineno);
1884: expand_start_loop_continue_elsewhere (1); ;
1885: break;}
1886: case 224:
1887: #line 874 "parse.y"
1888: { expand_loop_continue_here (); ;
1889: break;}
1890: case 225:
1891: #line 876 "parse.y"
1892: { emit_note (input_filename, lineno);
1893: expand_exit_loop_if_false (truthvalue_conversion (yyvsp[-2].ttype));
1894: expand_end_loop ();
1895: clear_momentary (); ;
1896: break;}
1897: case 226:
1898: #line 882 "parse.y"
1899: { emit_note (input_filename, lineno);
1900: if (yyvsp[-1].ttype) expand_expr_stmt (yyvsp[-1].ttype);
1901: expand_start_loop_continue_elsewhere (1); ;
1902: break;}
1903: case 227:
1904: #line 886 "parse.y"
1905: { emit_note (input_filename, lineno);
1906: if (yyvsp[-1].ttype)
1907: expand_exit_loop_if_false (truthvalue_conversion (yyvsp[-1].ttype)); ;
1908: break;}
1909: case 228:
1910: #line 892 "parse.y"
1911: { push_momentary ();
1912: yyvsp[0].itype = lineno; ;
1913: break;}
1914: case 229:
1915: #line 895 "parse.y"
1916: { emit_note (input_filename, yyvsp[-2].itype);
1917: expand_loop_continue_here ();
1918: if (yyvsp[-3].ttype)
1919: expand_expr_stmt (yyvsp[-3].ttype);
1920: pop_momentary ();
1921: expand_end_loop (); ;
1922: break;}
1923: case 230:
1924: #line 902 "parse.y"
1925: { emit_note (input_filename, lineno);
1926: c_expand_start_case (yyvsp[-1].ttype);
1927: /* Don't let the tree nodes for $3 be discarded by
1928: clear_momentary during the parsing of the next stmt. */
1929: push_momentary (); ;
1930: break;}
1931: case 231:
1932: #line 908 "parse.y"
1933: { expand_end_case ();
1934: pop_momentary (); ;
1935: break;}
1936: case 232:
1937: #line 911 "parse.y"
1938: { register tree value = fold (yyvsp[-1].ttype);
1939: register tree label
1940: = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
1941:
1942: if (TREE_CODE (value) != INTEGER_CST
1943: && value != error_mark_node)
1944: {
1945: error ("case label does not reduce to an integer constant");
1946: value = error_mark_node;
1947: }
1948: else
1949: /* Promote char or short to int. */
1950: value = default_conversion (value);
1951: if (value != error_mark_node)
1952: {
1953: int success = pushcase (value, label);
1954: if (success == 1)
1955: error ("case label not within a switch statement");
1956: else if (success == 2)
1957: error ("duplicate case value");
1958: else if (success == 3)
1959: warning ("case value out of range");
1960: }
1961: ;
1962: break;}
1963: case 234:
1964: #line 937 "parse.y"
1965: {
1966: register tree label
1967: = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
1968: int success = pushcase (NULL_TREE, label);
1969: if (success == 1)
1970: error ("default label not within a switch statement");
1971: else if (success == 2)
1972: error ("multiple default labels in one switch");
1973: ;
1974: break;}
1975: case 236:
1976: #line 948 "parse.y"
1977: { emit_note (input_filename, lineno);
1978: if ( ! expand_exit_something ())
1979: error ("break statement not within loop or switch"); ;
1980: break;}
1981: case 237:
1982: #line 952 "parse.y"
1983: { emit_note (input_filename, lineno);
1984: if (! expand_continue_loop ())
1985: error ("continue statement not within a loop"); ;
1986: break;}
1987: case 238:
1988: #line 956 "parse.y"
1989: { emit_note (input_filename, lineno);
1990: c_expand_return (NULL_TREE); ;
1991: break;}
1992: case 239:
1993: #line 959 "parse.y"
1994: { emit_note (input_filename, lineno);
1995: c_expand_return (yyvsp[-1].ttype); ;
1996: break;}
1997: case 240:
1998: #line 962 "parse.y"
1999: { if (pedantic)
2000: warning ("ANSI C forbids use of `asm' keyword");
2001: if (TREE_CHAIN (yyvsp[-2].ttype)) yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype);
2002: expand_asm (yyvsp[-2].ttype); ;
2003: break;}
2004: case 241:
2005: #line 968 "parse.y"
2006: { if (pedantic)
2007: warning ("ANSI C forbids use of `asm' keyword");
2008: if (TREE_CHAIN (yyvsp[-4].ttype)) yyvsp[-4].ttype = combine_strings (yyvsp[-4].ttype);
2009: c_expand_asm_operands (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE,
2010: yyvsp[-6].ttype == ridpointers[(int)RID_VOLATILE]); ;
2011: break;}
2012: case 242:
2013: #line 975 "parse.y"
2014: { if (pedantic)
2015: warning ("ANSI C forbids use of `asm' keyword");
2016: if (TREE_CHAIN (yyvsp[-6].ttype)) yyvsp[-6].ttype = combine_strings (yyvsp[-6].ttype);
2017: c_expand_asm_operands (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype,
2018: yyvsp[-8].ttype == ridpointers[(int)RID_VOLATILE]); ;
2019: break;}
2020: case 243:
2021: #line 981 "parse.y"
2022: { tree decl;
2023: emit_note (input_filename, lineno);
2024: decl = lookup_label (yyvsp[-1].ttype);
2025: expand_goto (decl); ;
2026: break;}
2027: case 244:
2028: #line 986 "parse.y"
2029: { tree label = define_label (input_filename, lineno, yyvsp[-1].ttype);
2030: if (label)
2031: expand_label (label); ;
2032: break;}
2033: case 247:
2034: #line 995 "parse.y"
2035: { emit_note (input_filename, lineno); ;
2036: break;}
2037: case 248:
2038: #line 997 "parse.y"
2039: { emit_note (input_filename, lineno); ;
2040: break;}
2041: case 249:
2042: #line 1002 "parse.y"
2043: { yyval.ttype = NULL_TREE; ;
2044: break;}
2045: case 252:
2046: #line 1010 "parse.y"
2047: { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;
2048: break;}
2049: case 254:
2050: #line 1015 "parse.y"
2051: { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
2052: break;}
2053: case 255:
2054: #line 1021 "parse.y"
2055: { pushlevel (0); ;
2056: break;}
2057: case 256:
2058: #line 1023 "parse.y"
2059: { yyval.ttype = yyvsp[0].ttype; poplevel (0, 0, 0); ;
2060: break;}
2061: case 257:
2062: #line 1029 "parse.y"
2063: { pushlevel (0); ;
2064: break;}
2065: case 258:
2066: #line 1031 "parse.y"
2067: { yyval.ttype = yyvsp[0].ttype; poplevel (0, 0, 0); ;
2068: break;}
2069: case 260:
2070: #line 1037 "parse.y"
2071: { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ;
2072: break;}
2073: case 261:
2074: #line 1039 "parse.y"
2075: { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ;
2076: break;}
2077: case 263:
2078: #line 1045 "parse.y"
2079: { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ;
2080: break;}
2081: case 264:
2082: #line 1051 "parse.y"
2083: { yyval.ttype = get_parm_info (0); ;
2084: break;}
2085: case 265:
2086: #line 1053 "parse.y"
2087: { yyval.ttype = get_parm_info (1); ;
2088: break;}
2089: case 266:
2090: #line 1055 "parse.y"
2091: { yyval.ttype = get_parm_info (0); ;
2092: break;}
2093: case 267:
2094: #line 1060 "parse.y"
2095: { push_parm_decl (yyvsp[0].ttype); ;
2096: break;}
2097: case 268:
2098: #line 1062 "parse.y"
2099: { push_parm_decl (yyvsp[0].ttype); ;
2100: break;}
2101: case 269:
2102: #line 1069 "parse.y"
2103: { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype) ; ;
2104: break;}
2105: case 270:
2106: #line 1071 "parse.y"
2107: { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype) ; ;
2108: break;}
2109: case 271:
2110: #line 1073 "parse.y"
2111: { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;
2112: break;}
2113: case 272:
2114: #line 1075 "parse.y"
2115: { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype) ; ;
2116: break;}
2117: case 273:
2118: #line 1077 "parse.y"
2119: { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;
2120: break;}
2121: case 274:
2122: #line 1083 "parse.y"
2123: { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
2124: break;}
2125: case 275:
2126: #line 1085 "parse.y"
2127: { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
2128: break;}
2129: }
2130: /* the action file gets copied in in place of this dollarsign */
2131: #line 303 "bison.simple"
2132:
2133: yyvsp -= yylen;
2134: yyssp -= yylen;
2135: #ifdef YYLSP_NEEDED
2136: yylsp -= yylen;
2137: #endif
2138:
2139: #ifdef YYDEBUG
2140: if (yydebug)
2141: {
2142: short *ssp1 = yyss - 1;
2143: fprintf (stderr, "state stack now", yyssp-yyss);
2144: while (ssp1 != yyssp)
2145: fprintf (stderr, " %d", *++ssp1);
2146: fprintf (stderr, "\n");
2147: }
2148: #endif
2149:
2150: *++yyvsp = yyval;
2151:
2152: #ifdef YYLSP_NEEDED
2153: yylsp++;
2154: if (yylen == 0)
2155: {
2156: yylsp->first_line = yylloc.first_line;
2157: yylsp->first_column = yylloc.first_column;
2158: yylsp->last_line = (yylsp-1)->last_line;
2159: yylsp->last_column = (yylsp-1)->last_column;
2160: yylsp->text = 0;
2161: }
2162: else
2163: {
2164: yylsp->last_line = (yylsp+yylen-1)->last_line;
2165: yylsp->last_column = (yylsp+yylen-1)->last_column;
2166: }
2167: #endif
2168:
2169: /* Now "shift" the result of the reduction.
2170: Determine what state that goes to,
2171: based on the state we popped back to
2172: and the rule number reduced by. */
2173:
2174: yyn = yyr1[yyn];
2175:
2176: yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
2177: if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2178: yystate = yytable[yystate];
2179: else
2180: yystate = yydefgoto[yyn - YYNTBASE];
2181:
2182: goto yynewstate;
2183:
2184: yyerrlab: /* here on detecting error */
2185:
2186: if (! yyerrstatus)
2187: /* If not already recovering from an error, report this error. */
2188: {
2189: ++yynerr;
2190: yyerror("parse error");
2191: }
2192:
2193: if (yyerrstatus == 3)
2194: {
2195: /* if just tried and failed to reuse lookahead token after an error, discard it. */
2196:
2197: /* return failure if at end of input */
2198: if (yychar == YYEOF)
2199: YYERROR;
2200:
2201: #ifdef YYDEBUG
2202: if (yydebug)
2203: fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
2204: #endif
2205:
2206: yychar = YYEMPTY;
2207: }
2208:
2209: /* Else will try to reuse lookahead token
2210: after shifting the error token. */
2211:
2212: yyerrstatus = 3; /* Each real token shifted decrements this */
2213:
2214: goto yyerrhandle;
2215:
2216: yyerrdefault: /* current state does not do anything special for the error token. */
2217:
2218: #if 0
2219: /* This is wrong; only states that explicitly want error tokens
2220: should shift them. */
2221: yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
2222: if (yyn) goto yydefault;
2223: #endif
2224:
2225: yyerrpop: /* pop the current state because it cannot handle the error token */
2226:
2227: if (yyssp == yyss) YYERROR;
2228: yyvsp--;
2229: yystate = *--yyssp;
2230: #ifdef YYLSP_NEEDED
2231: yylsp--;
2232: #endif
2233:
2234: #ifdef YYDEBUG
2235: if (yydebug)
2236: {
2237: short *ssp1 = yyss - 1;
2238: fprintf (stderr, "Error: state stack now", yyssp-yyss);
2239: while (ssp1 != yyssp)
2240: fprintf (stderr, " %d", *++ssp1);
2241: fprintf (stderr, "\n");
2242: }
2243: #endif
2244:
2245: yyerrhandle:
2246:
2247: yyn = yypact[yystate];
2248: if (yyn == YYFLAG)
2249: goto yyerrdefault;
2250:
2251: yyn += YYTERROR;
2252: if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
2253: goto yyerrdefault;
2254:
2255: yyn = yytable[yyn];
2256: if (yyn < 0)
2257: {
2258: if (yyn == YYFLAG)
2259: goto yyerrpop;
2260: yyn = -yyn;
2261: goto yyreduce;
2262: }
2263: else if (yyn == 0)
2264: goto yyerrpop;
2265:
2266: if (yyn == YYFINAL)
2267: YYACCEPT;
2268:
2269: #ifdef YYDEBUG
2270: if (yydebug)
2271: fprintf(stderr, "Shifting error token, ");
2272: #endif
2273:
2274: *++yyvsp = yylval;
2275: #ifdef YYLSP_NEEDED
2276: *++yylsp = yylloc;
2277: #endif
2278:
2279: yystate = yyn;
2280: goto yynewstate;
2281: }
2282: #line 1087 "parse.y"
2283:
2284:
2285: /* Return something to represent absolute declarators containing a *.
2286: TARGET is the absolute declarator that the * contains.
2287: TYPE_QUALS is a list of modifiers such as const or volatile
2288: to apply to the pointer type, represented as identifiers.
2289:
2290: We return an INDIRECT_REF whose "contents" are TARGET
2291: and whose type is the modifier list. */
2292:
2293: static tree
2294: make_pointer_declarator (type_quals, target)
2295: tree type_quals, target;
2296: {
2297: return build (INDIRECT_REF, type_quals, target);
2298: }
2299:
2300: /* Given a chain of STRING_CST nodes,
2301: concatenate them into one STRING_CST
2302: and give it a suitable array-of-chars data type. */
2303:
2304: static tree
2305: combine_strings (strings)
2306: tree strings;
2307: {
2308: register tree value, t;
2309: register int length = 1;
2310: int wide_length = 0;
2311: int wide_flag = 0;
2312:
2313: if (TREE_CHAIN (strings))
2314: {
2315: /* More than one in the chain, so concatenate. */
2316: register char *p, *q;
2317:
2318: /* Don't include the \0 at the end of each substring,
2319: except for the last one.
2320: Count wide strings and ordinary strings separately. */
2321: for (t = strings; t; t = TREE_CHAIN (t))
2322: {
2323: if (TREE_TYPE (t) == int_array_type_node)
2324: {
2325: wide_length += (TREE_STRING_LENGTH (t) - 1);
2326: wide_flag = 1;
2327: }
2328: else
2329: length += (TREE_STRING_LENGTH (t) - 1);
2330: }
2331:
2332: /* If anything is wide, the non-wides will be converted,
2333: which makes them take more space. */
2334: if (wide_flag)
2335: length = length * UNITS_PER_WORD + wide_length;
2336:
2337: p = (char *) oballoc (length);
2338:
2339: /* Copy the individual strings into the new combined string.
2340: If the combined string is wide, convert the chars to ints
2341: for any individual strings that are not wide. */
2342:
2343: q = p;
2344: for (t = strings; t; t = TREE_CHAIN (t))
2345: {
2346: int len = TREE_STRING_LENGTH (t) - 1;
2347: if ((TREE_TYPE (t) == int_array_type_node) == wide_flag)
2348: {
2349: bcopy (TREE_STRING_POINTER (t), q, len);
2350: q += len;
2351: }
2352: else
2353: {
2354: int i;
2355: for (i = 0; i < len; i++)
2356: ((int *) q)[i] = TREE_STRING_POINTER (t)[i];
2357: q += len * UNITS_PER_WORD;
2358: }
2359: }
2360: *q = 0;
2361:
2362: value = make_node (STRING_CST);
2363: TREE_STRING_POINTER (value) = p;
2364: TREE_STRING_LENGTH (value) = length;
2365: TREE_LITERAL (value) = 1;
2366: }
2367: else
2368: {
2369: value = strings;
2370: length = TREE_STRING_LENGTH (value);
2371: if (TREE_TYPE (value) == int_array_type_node)
2372: wide_flag = 1;
2373: }
2374:
2375: TREE_TYPE (value)
2376: = build_array_type (wide_flag ? integer_type_node : char_type_node,
2377: make_index_type (build_int_2 (length - 1, 0)));
2378: TREE_LITERAL (value) = 1;
2379: TREE_STATIC (value) = 1;
2380: return value;
2381: }
2382:
2383: int lineno; /* current line number in file being read */
2384:
2385: FILE *finput; /* input file.
2386: Normally a pipe from the preprocessor. */
2387:
2388: /* lexical analyzer */
2389:
2390: static int maxtoken; /* Current nominal length of token buffer */
2391: static char *token_buffer; /* Pointer to token buffer.
2392: Actual allocated length is maxtoken + 2. */
2393: static dollar_seen = 0; /* Nonzero if have warned about `$'. */
2394:
2395: #define MAXRESERVED 9
2396:
2397: /* frw[I] is index in `reswords' of the first word whose length is I;
2398: frw[I+1] is one plus the index of the last word whose length is I.
2399: The length of frw must be MAXRESERVED + 2 so there is an element
2400: at MAXRESERVED+1 for the case I == MAXRESERVED. */
2401:
2402: static char frw[MAXRESERVED+2] =
2403: { 0, 0, 0, 2, 5, 13, 19, 29, 32, 36, 37 };
2404:
2405: /* Table of reserved words. */
2406:
2407: struct resword { char *name; short token; enum rid rid;};
2408:
2409: #define NORID RID_UNUSED
2410:
2411: static struct resword reswords[]
2412: = {{"if", IF, NORID},
2413: {"do", DO, NORID},
2414: {"int", TYPESPEC, RID_INT},
2415: {"for", FOR, NORID},
2416: {"asm", ASM, NORID},
2417: {"case", CASE, NORID},
2418: {"char", TYPESPEC, RID_CHAR},
2419: {"auto", SCSPEC, RID_AUTO},
2420: {"goto", GOTO, NORID},
2421: {"else", ELSE, NORID},
2422: {"long", TYPESPEC, RID_LONG},
2423: {"void", TYPESPEC, RID_VOID},
2424: {"enum", ENUM, NORID},
2425: {"float", TYPESPEC, RID_FLOAT},
2426: {"short", TYPESPEC, RID_SHORT},
2427: {"union", UNION, NORID},
2428: {"break", BREAK, NORID},
2429: {"while", WHILE, NORID},
2430: {"const", TYPE_QUAL, RID_CONST},
2431: {"double", TYPESPEC, RID_DOUBLE},
2432: {"static", SCSPEC, RID_STATIC},
2433: {"extern", SCSPEC, RID_EXTERN},
2434: {"struct", STRUCT, NORID},
2435: {"return", RETURN, NORID},
2436: {"sizeof", SIZEOF, NORID},
2437: {"typeof", TYPEOF, NORID},
2438: {"switch", SWITCH, NORID},
2439: {"signed", TYPESPEC, RID_SIGNED},
2440: {"inline", SCSPEC, RID_INLINE},
2441: {"typedef", SCSPEC, RID_TYPEDEF},
2442: {"default", DEFAULT, NORID},
2443: {"noalias", TYPE_QUAL, RID_NOALIAS},
2444: {"unsigned", TYPESPEC, RID_UNSIGNED},
2445: {"continue", CONTINUE, NORID},
2446: {"register", SCSPEC, RID_REGISTER},
2447: {"volatile", TYPE_QUAL, RID_VOLATILE},
2448: {"__alignof", ALIGNOF, NORID}};
2449:
2450: /* The elements of `ridpointers' are identifier nodes
2451: for the reserved type names and storage classes.
2452: It is indexed by a RID_... value. */
2453:
2454: tree ridpointers[(int) RID_MAX];
2455:
2456: static tree line_identifier; /* The identifier node named "line" */
2457:
2458: void check_newline ();
2459:
2460: void
2461: init_lex ()
2462: {
2463: extern char *malloc ();
2464:
2465: /* Start it at 0, because check_newline is called at the very beginning
2466: and will increment it to 1. */
2467: lineno = 0;
2468: line_identifier = get_identifier ("line");
2469:
2470: maxtoken = 40;
2471: token_buffer = malloc (maxtoken + 2);
2472: ridpointers[(int) RID_INT] = get_identifier ("int");
2473: ridpointers[(int) RID_CHAR] = get_identifier ("char");
2474: ridpointers[(int) RID_VOID] = get_identifier ("void");
2475: ridpointers[(int) RID_FLOAT] = get_identifier ("float");
2476: ridpointers[(int) RID_DOUBLE] = get_identifier ("double");
2477: ridpointers[(int) RID_SHORT] = get_identifier ("short");
2478: ridpointers[(int) RID_LONG] = get_identifier ("long");
2479: ridpointers[(int) RID_UNSIGNED] = get_identifier ("unsigned");
2480: ridpointers[(int) RID_SIGNED] = get_identifier ("signed");
2481: ridpointers[(int) RID_INLINE] = get_identifier ("inline");
2482: ridpointers[(int) RID_CONST] = get_identifier ("const");
2483: ridpointers[(int) RID_VOLATILE] = get_identifier ("volatile");
2484: ridpointers[(int) RID_AUTO] = get_identifier ("auto");
2485: ridpointers[(int) RID_STATIC] = get_identifier ("static");
2486: ridpointers[(int) RID_EXTERN] = get_identifier ("extern");
2487: ridpointers[(int) RID_TYPEDEF] = get_identifier ("typedef");
2488: ridpointers[(int) RID_REGISTER] = get_identifier ("register");
2489: }
2490:
2491: static void
2492: reinit_parse_for_function ()
2493: {
2494: }
2495:
2496: static int
2497: skip_white_space ()
2498: {
2499: register int c;
2500: register int inside;
2501:
2502: c = getc (finput);
2503:
2504: for (;;)
2505: {
2506: switch (c)
2507: {
2508: case '/':
2509: c = getc (finput);
2510: if (c != '*')
2511: {
2512: ungetc (c, finput);
2513: return '/';
2514: }
2515:
2516: c = getc (finput);
2517:
2518: inside = 1;
2519: while (inside)
2520: {
2521: if (c == '*')
2522: {
2523: while (c == '*')
2524: c = getc (finput);
2525:
2526: if (c == '/')
2527: {
2528: inside = 0;
2529: c = getc (finput);
2530: }
2531: }
2532: else if (c == '\n')
2533: {
2534: lineno++;
2535: c = getc (finput);
2536: }
2537: else if (c == EOF)
2538: {
2539: error ("unterminated comment");
2540: break;
2541: }
2542: else
2543: c = getc (finput);
2544: }
2545:
2546: break;
2547:
2548: case '\n':
2549: check_newline ();
2550:
2551: case ' ':
2552: case '\t':
2553: case '\f':
2554: case '\r':
2555: case '\b':
2556: c = getc (finput);
2557: break;
2558:
2559: case '\\':
2560: c = getc (finput);
2561: if (c == '\n')
2562: lineno++;
2563: else
2564: error ("stray '\\' in program");
2565: c = getc (finput);
2566: break;
2567:
2568: default:
2569: return (c);
2570: }
2571: }
2572: }
2573:
2574:
2575:
2576: /* Make the token buffer longer, preserving the data in it.
2577: P should point to just beyond the last valid character in the old buffer.
2578: The value we return is a pointer to the new buffer
2579: at a place corresponding to P. */
2580:
2581: static char *
2582: extend_token_buffer (p)
2583: char *p;
2584: {
2585: int offset = p - token_buffer;
2586:
2587: maxtoken = maxtoken * 2 + 10;
2588: token_buffer = (char *) realloc (token_buffer, maxtoken + 2);
2589: if (token_buffer == 0)
2590: fatal ("virtual memory exceeded");
2591:
2592: return token_buffer + offset;
2593: }
2594:
2595: /* At the beginning of a line, increment the line number
2596: and handle a #line directive immediately following */
2597:
2598: void
2599: check_newline ()
2600: {
2601: register int c;
2602: register int token;
2603:
2604: while (1)
2605: {
2606: lineno++;
2607:
2608: /* Read first nonwhite char on the line. */
2609:
2610: c = getc (finput);
2611: while (c == ' ' || c == '\t')
2612: c = getc (finput);
2613:
2614: if (c != '#')
2615: {
2616: /* If not #, unread it. */
2617: ungetc (c, finput);
2618: return;
2619: }
2620:
2621: /* Read first nonwhite char after the `#'. */
2622:
2623: c = getc (finput);
2624: while (c == ' ' || c == '\t')
2625: c = getc (finput);
2626:
2627: /* If a letter follows, then if the word here is `line', skip
2628: it and ignore it; otherwise, ignore the line, with an error
2629: if the word isn't `pragma'. */
2630:
2631: if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
2632: {
2633: if (c == 'p')
2634: {
2635: if (getc (finput) == 'r'
2636: && getc (finput) == 'a'
2637: && getc (finput) == 'g'
2638: && getc (finput) == 'm'
2639: && getc (finput) == 'a'
2640: && ((c = getc (finput)) == ' ' || c == '\t'))
2641: goto noerror;
2642: }
2643:
2644: else if (c == 'l')
2645: {
2646: if (getc (finput) == 'i'
2647: && getc (finput) == 'n'
2648: && getc (finput) == 'e'
2649: && ((c = getc (finput)) == ' ' || c == '\t'))
2650: goto linenum;
2651: }
2652:
2653: error ("undefined or invalid # directive");
2654: noerror:
2655:
2656: while ((c = getc (finput)) && c != '\n');
2657:
2658: continue;
2659: }
2660:
2661: linenum:
2662: /* Here we have either `#line' or `# <nonletter>'.
2663: In either case, it should be a line number; a digit should follow.
2664:
2665: while (c == ' ' || c == '\t')
2666: c = getc (finput);
2667:
2668: /* If the # is the only nonwhite char on the line,
2669: just ignore it. Check the new newline. */
2670: if (c == '\n')
2671: continue;
2672:
2673: /* Something follows the #; read a token. */
2674:
2675: ungetc (c, finput);
2676: token = yylex ();
2677:
2678: if (token == CONSTANT
2679: && TREE_CODE (yylval.ttype) == INTEGER_CST)
2680: {
2681: /* subtract one, because it is the following line that
2682: gets the specified number */
2683:
2684: int l = TREE_INT_CST_LOW (yylval.ttype) - 1;
2685:
2686: /* Is this the last nonwhite stuff on the line? */
2687: c = getc (finput);
2688: while (c == ' ' || c == '\t')
2689: c = getc (finput);
2690: if (c == '\n')
2691: {
2692: /* No more: store the line number and check following line. */
2693: lineno = l;
2694: continue;
2695: }
2696: ungetc (c, finput);
2697:
2698: /* More follows: it must be a string constant (filename). */
2699:
2700: token = yylex ();
2701: if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
2702: {
2703: error ("invalid #line");
2704: return;
2705: }
2706:
2707: input_filename
2708: = (char *) permalloc (TREE_STRING_LENGTH (yylval.ttype) + 1);
2709: strcpy (input_filename, TREE_STRING_POINTER (yylval.ttype));
2710: lineno = l;
2711:
2712: if (main_input_filename == 0)
2713: main_input_filename = input_filename;
2714: }
2715: else
2716: error ("invalid #line");
2717:
2718: /* skip the rest of this line. */
2719: while ((c = getc (finput)) != '\n');
2720: }
2721: }
2722:
2723:
2724:
2725: #define isalnum(char) ((char >= 'a' && char <= 'z') || (char >= 'A' && char <= 'Z') || (char >= '0' && char <= '9'))
2726: #define isdigit(char) (char >= '0' && char <= '9')
2727: #define ENDFILE -1 /* token that represents end-of-file */
2728:
2729:
2730: static int
2731: readescape ()
2732: {
2733: register int c = getc (finput);
2734: register int count, code;
2735:
2736: switch (c)
2737: {
2738: case 'x':
2739: code = 0;
2740: count = 0;
2741: while (1)
2742: {
2743: c = getc (finput);
2744: if (!(c >= 'a' && c <= 'f')
2745: && !(c >= 'A' && c <= 'F')
2746: && !(c >= '0' && c <= '9'))
2747: {
2748: ungetc (c, finput);
2749: break;
2750: }
2751: code *= 16;
2752: if (c >= 'a' && c <= 'f')
2753: code += c - 'a' + 10;
2754: if (c >= 'A' && c <= 'F')
2755: code += c - 'A' + 10;
2756: if (c >= '0' && c <= '9')
2757: code += c - '0';
2758: count++;
2759: }
2760: if (count == 0)
2761: error ("\\x used with no following hex digits");
2762: return code;
2763:
2764: case '0': case '1': case '2': case '3': case '4':
2765: case '5': case '6': case '7':
2766: code = 0;
2767: count = 0;
2768: while ((c <= '7') && (c >= '0') && (count++ < 3))
2769: {
2770: code = (code * 8) + (c - '0');
2771: c = getc (finput);
2772: }
2773: ungetc (c, finput);
2774: return code;
2775:
2776: case '\\': case '\'': case '"':
2777: return c;
2778:
2779: case '\n':
2780: lineno++;
2781: return -1;
2782:
2783: case 'n':
2784: return TARGET_NEWLINE;
2785:
2786: case 't':
2787: return TARGET_TAB;
2788:
2789: case 'r':
2790: return TARGET_CR;
2791:
2792: case 'f':
2793: return TARGET_FF;
2794:
2795: case 'b':
2796: return TARGET_BS;
2797:
2798: case 'a':
2799: return TARGET_BELL;
2800:
2801: case 'v':
2802: return TARGET_VT;
2803:
2804: case 'E':
2805: return 033;
2806:
2807: case '?':
2808: return c;
2809: }
2810: if (c >= 040 && c <= 0177)
2811: warning ("unknown escape sequence `\\%c'", c);
2812: else
2813: warning ("unknown escape sequence: `\\' followed by char code 0x%x", c);
2814: return c;
2815: }
2816:
2817: void
2818: yyerror (string)
2819: char *string;
2820: {
2821: char buf[200];
2822:
2823: strcpy (buf, string);
2824:
2825: /* We can't print string and character constants well
2826: because the token_buffer contains the result of processing escapes. */
2827: if (token_buffer[0] == 0)
2828: strcat (buf, " at end of input");
2829: else if (token_buffer[0] == '"')
2830: strcat (buf, " before string constant");
2831: else if (token_buffer[0] == '\'')
2832: strcat (buf, " before character constant");
2833: else
2834: strcat (buf, " before `%s'");
2835:
2836: error (buf, token_buffer);
2837: }
2838:
2839: static int
2840: yylex ()
2841: {
2842: register int c;
2843: register char *p;
2844: register int value;
2845: int wide_flag = 0;
2846:
2847: /* Effectively do c = skip_white_space ()
2848: but do it faster in the usual cases. */
2849: c = getc (finput);
2850: while (1)
2851: switch (c)
2852: {
2853: case ' ':
2854: case '\t':
2855: case '\f':
2856: case '\r':
2857: case '\b':
2858: c = getc (finput);
2859: break;
2860:
2861: case '\n':
2862: case '/':
2863: case '\\':
2864: ungetc (c, finput);
2865: c = skip_white_space ();
2866: default:
2867: goto found_nonwhite;
2868: }
2869: found_nonwhite:
2870:
2871: token_buffer[0] = c;
2872: token_buffer[1] = 0;
2873:
2874: yylloc.first_line = lineno;
2875:
2876: switch (c)
2877: {
2878: case EOF:
2879: token_buffer[0] = 0;
2880: value = ENDFILE;
2881: break;
2882:
2883: case 'L':
2884: /* Capital L may start a wide-string or wide-character constant. */
2885: {
2886: register int c = getc (finput);
2887: if (c == '\'')
2888: {
2889: wide_flag = 1;
2890: goto char_constant;
2891: }
2892: if (c == '"')
2893: {
2894: wide_flag = 1;
2895: goto string_constant;
2896: }
2897: ungetc (c, finput);
2898: }
2899:
2900: case 'A': case 'B': case 'C': case 'D': case 'E':
2901: case 'F': case 'G': case 'H': case 'I': case 'J':
2902: case 'K': case 'M': case 'N': case 'O':
2903: case 'P': case 'Q': case 'R': case 'S': case 'T':
2904: case 'U': case 'V': case 'W': case 'X': case 'Y':
2905: case 'Z':
2906: case 'a': case 'b': case 'c': case 'd': case 'e':
2907: case 'f': case 'g': case 'h': case 'i': case 'j':
2908: case 'k': case 'l': case 'm': case 'n': case 'o':
2909: case 'p': case 'q': case 'r': case 's': case 't':
2910: case 'u': case 'v': case 'w': case 'x': case 'y':
2911: case 'z':
2912: case '_':
2913: case '$':
2914: p = token_buffer;
2915: while (isalnum (c) || c == '_' || c == '$')
2916: {
2917: if (p >= token_buffer + maxtoken)
2918: p = extend_token_buffer (p);
2919: if (c == '$')
2920: {
2921: if (pedantic)
2922: {
2923: if (! dollar_seen)
2924: warning ("ANSI C forbids `$' (first use here)");
2925: dollar_seen = 1;
2926: }
2927: }
2928:
2929: *p++ = c;
2930: c = getc (finput);
2931: }
2932:
2933: *p = 0;
2934: ungetc (c, finput);
2935:
2936: value = IDENTIFIER;
2937: yylval.itype = 0;
2938:
2939: /* Try to recognize a keyword. */
2940:
2941: if (p - token_buffer <= MAXRESERVED)
2942: {
2943: register int lim = frw [p - token_buffer + 1];
2944: register int i = frw[p - token_buffer];
2945: register struct resword *p = &reswords[i];
2946:
2947: for (; i < lim; i++, p++)
2948: if (p->name[0] == token_buffer[0]
2949: && !strcmp (p->name, token_buffer))
2950: {
2951: if (p->rid)
2952: yylval.ttype = ridpointers[(int) p->rid];
2953: if ((! flag_no_asm
2954: || ((int) p->token != ASM
2955: && (int) p->token != TYPEOF
2956: && strcmp (p->name, "inline")))
2957: /* -ftraditional means don't recognize
2958: typeof, const, volatile, noalias, signed or inline. */
2959: && (! flag_traditional
2960: || ((int) p->token != TYPE_QUAL
2961: && (int) p->token != TYPEOF
2962: && strcmp (p->name, "signed")
2963: && strcmp (p->name, "inline"))))
2964: value = (int) p->token;
2965: break;
2966: }
2967: }
2968:
2969: /* If we did not find a keyword, look for an identifier
2970: (or a typename). */
2971:
2972: if (value == IDENTIFIER)
2973: {
2974: yylval.ttype = get_identifier (token_buffer);
2975: lastiddecl = lookup_name (yylval.ttype);
2976:
2977: if (lastiddecl != 0 && TREE_CODE (lastiddecl) == TYPE_DECL)
2978: value = TYPENAME;
2979: }
2980:
2981: break;
2982:
2983: case '0': case '1': case '2': case '3': case '4':
2984: case '5': case '6': case '7': case '8': case '9':
2985: case '.':
2986: {
2987: int base = 10;
2988: int count = 0;
2989: int largest_digit = 0;
2990: int numdigits = 0;
2991: /* for multi-precision arithmetic,
2992: we store only 8 live bits in each short,
2993: giving us 64 bits of reliable precision */
2994: short shorts[8];
2995: int floatflag = 0; /* Set 1 if we learn this is a floating constant */
2996:
2997: for (count = 0; count < 8; count++)
2998: shorts[count] = 0;
2999:
3000: p = token_buffer;
3001: *p++ = c;
3002:
3003: if (c == '0')
3004: {
3005: *p++ = (c = getc (finput));
3006: if ((c == 'x') || (c == 'X'))
3007: {
3008: base = 16;
3009: *p++ = (c = getc (finput));
3010: }
3011: else
3012: {
3013: base = 8;
3014: numdigits++;
3015: }
3016: }
3017:
3018: /* Read all the digits-and-decimal-points. */
3019:
3020: while (c == '.'
3021: || (isalnum (c) && (c != 'l') && (c != 'L')
3022: && (c != 'u') && (c != 'U')
3023: && (!floatflag || ((c != 'f') && (c != 'F')))))
3024: {
3025: if (c == '.')
3026: {
3027: if (base == 16)
3028: error ("floating constant may not be in radix 16");
3029: floatflag = 1;
3030: base = 10;
3031: *p++ = c = getc (finput);
3032: /* Accept '.' as the start of a floating-point number
3033: only when it is followed by a digit.
3034: Otherwise, unread the following non-digit
3035: and use the '.' as a structural token. */
3036: if (p == token_buffer + 2 && !isdigit (c))
3037: {
3038: if (c == '.')
3039: {
3040: c = getc (finput);
3041: if (c == '.')
3042: {
3043: *p++ = c;
3044: *p = 0;
3045: return ELLIPSIS;
3046: }
3047: error ("parse error at `..'");
3048: }
3049: ungetc (c, finput);
3050: token_buffer[1] = 0;
3051: value = '.';
3052: goto done;
3053: }
3054: }
3055: else
3056: {
3057: /* It is not a decimal point.
3058: It should be a digit (perhaps a hex digit). */
3059:
3060: if (isdigit (c))
3061: {
3062: c = c - '0';
3063: }
3064: else if (base <= 10)
3065: {
3066: if ((c&~040) == 'E')
3067: {
3068: base = 10;
3069: floatflag = 1;
3070: break; /* start of exponent */
3071: }
3072: error ("nondigits in number and not hexadecimal");
3073: c = 0;
3074: }
3075: else if (c >= 'a')
3076: {
3077: c = c - 'a' + 10;
3078: }
3079: else
3080: {
3081: c = c - 'A' + 10;
3082: }
3083: if (c >= largest_digit)
3084: largest_digit = c;
3085: numdigits++;
3086:
3087: for (count = 0; count < 8; count++)
3088: {
3089: (shorts[count] *= base);
3090: if (count)
3091: {
3092: shorts[count] += (shorts[count-1] >> 8);
3093: shorts[count-1] &= (1<<8)-1;
3094: }
3095: else shorts[0] += c;
3096: }
3097:
3098: if (p >= token_buffer + maxtoken - 3)
3099: p = extend_token_buffer (p);
3100: *p++ = (c = getc (finput));
3101: }
3102: }
3103:
3104: if (numdigits == 0)
3105: error ("numeric constant with no digits");
3106:
3107: if (largest_digit >= base)
3108: error ("numeric constant contains digits beyond the radix");
3109:
3110: /* Remove terminating char from the token buffer and delimit the string */
3111: *--p = 0;
3112:
3113: if (floatflag)
3114: {
3115: tree type = double_type_node;
3116: char f_seen = 0;
3117: char l_seen = 0;
3118:
3119: /* Read explicit exponent if any, and put it in tokenbuf. */
3120:
3121: if ((c == 'e') || (c == 'E'))
3122: {
3123: if (p >= token_buffer + maxtoken - 3)
3124: p = extend_token_buffer (p);
3125: *p++ = c;
3126: c = getc (finput);
3127: if ((c == '+') || (c == '-'))
3128: {
3129: *p++ = c;
3130: c = getc (finput);
3131: }
3132: if (! isdigit (c))
3133: error ("floating constant exponent has no digits");
3134: while (isdigit (c))
3135: {
3136: if (p >= token_buffer + maxtoken - 3)
3137: p = extend_token_buffer (p);
3138: *p++ = c;
3139: c = getc (finput);
3140: }
3141: }
3142:
3143: *p = 0;
3144: yylval.ttype = build_real (atof (token_buffer));
3145:
3146: while (1)
3147: {
3148: if (c == 'f' || c == 'F')
3149: {
3150: if (f_seen)
3151: error ("two `f's in floating constant");
3152: f_seen = 1;
3153: type = float_type_node;
3154: }
3155: else if (c == 'l' || c == 'L')
3156: {
3157: if (l_seen)
3158: error ("two `l's in floating constant");
3159: l_seen = 1;
3160: type = long_double_type_node;
3161: }
3162: else
3163: {
3164: if (isalnum (c))
3165: {
3166: error ("garbage at end of number");
3167: while (isalnum (c))
3168: {
3169: if (p >= token_buffer + maxtoken - 3)
3170: p = extend_token_buffer (p);
3171: *p++ = c;
3172: c = getc (finput);
3173: }
3174: }
3175: break;
3176: }
3177: if (p >= token_buffer + maxtoken - 3)
3178: p = extend_token_buffer (p);
3179: *p++ = c;
3180: c = getc (finput);
3181: }
3182:
3183: ungetc (c, finput);
3184: *p = 0;
3185:
3186: TREE_TYPE (yylval.ttype) = type;
3187: }
3188: else
3189: {
3190: tree type;
3191: int spec_unsigned = 0;
3192: int spec_long = 0;
3193:
3194: while (1)
3195: {
3196: if (c == 'u' || c == 'U')
3197: {
3198: if (spec_unsigned)
3199: error ("two `u's in integer constant");
3200: spec_unsigned = 1;
3201: }
3202: else if (c == 'l' || c == 'L')
3203: {
3204: if (spec_long)
3205: error ("two `l's in integer constant");
3206: spec_long = 1;
3207: }
3208: else
3209: {
3210: if (isalnum (c))
3211: {
3212: error ("garbage at end of number");
3213: while (isalnum (c))
3214: {
3215: if (p >= token_buffer + maxtoken - 3)
3216: p = extend_token_buffer (p);
3217: *p++ = c;
3218: c = getc (finput);
3219: }
3220: }
3221: break;
3222: }
3223: if (p >= token_buffer + maxtoken - 3)
3224: p = extend_token_buffer (p);
3225: *p++ = c;
3226: c = getc (finput);
3227: }
3228:
3229: ungetc (c, finput);
3230:
3231: if (shorts[7] | shorts[6] | shorts[5] | shorts[4])
3232: warning ("integer constant out of range");
3233:
3234: /* This is simplified by the fact that our constant
3235: is always positive. */
3236: yylval.ttype
3237: = build_int_2 ((shorts[3]<<24) + (shorts[2]<<16) + (shorts[1]<<8) + shorts[0],
3238: 0);
3239:
3240: if (!spec_long && !spec_unsigned
3241: && int_fits_type_p (yylval.ttype, integer_type_node))
3242: type = integer_type_node;
3243:
3244: else if (!spec_long && base != 10
3245: && int_fits_type_p (yylval.ttype, unsigned_type_node))
3246: type = unsigned_type_node;
3247:
3248: else if (!spec_unsigned
3249: && int_fits_type_p (yylval.ttype, long_integer_type_node))
3250: type = long_integer_type_node;
3251:
3252: else
3253: {
3254: type = long_unsigned_type_node;
3255: if (! int_fits_type_p (yylval.ttype, long_unsigned_type_node))
3256: warning ("integer constant out of range");
3257: }
3258: TREE_TYPE (yylval.ttype) = type;
3259: }
3260:
3261: value = CONSTANT; break;
3262: }
3263:
3264: case '\'':
3265: char_constant:
3266: c = getc (finput);
3267: {
3268: register int code = 0;
3269:
3270: tryagain:
3271:
3272: if (c == '\\')
3273: {
3274: c = readescape ();
3275: if (c < 0)
3276: goto tryagain;
3277: }
3278: else if (c == '\n')
3279: {
3280: if (pedantic)
3281: warning ("ANSI C forbids newline in character constant");
3282: lineno++;
3283: }
3284:
3285: code = c;
3286: token_buffer[1] = c;
3287: token_buffer[2] = '\'';
3288: token_buffer[3] = 0;
3289:
3290: c = getc (finput);
3291: if (c != '\'')
3292: error ("malformatted character constant");
3293:
3294: /* If char type is signed, sign-extend the constant. */
3295: if (TREE_UNSIGNED (char_type_node)
3296: || ((code >> (BITS_PER_UNIT - 1)) & 1) == 0)
3297: yylval.ttype = build_int_2 (code & ((1 << BITS_PER_UNIT) - 1), 0);
3298: else
3299: yylval.ttype = build_int_2 (code | ((-1) << BITS_PER_UNIT), -1);
3300:
3301: TREE_TYPE (yylval.ttype) = integer_type_node;
3302: value = CONSTANT; break;
3303: }
3304:
3305: case '"':
3306: string_constant:
3307: {
3308: c = getc (finput);
3309: p = token_buffer + 1;
3310:
3311: while (c != '"')
3312: {
3313: if (c == '\\')
3314: {
3315: c = readescape ();
3316: if (c < 0)
3317: goto skipnewline;
3318: }
3319: else if (c == '\n')
3320: {
3321: if (pedantic)
3322: warning ("ANSI C forbids newline in string constant");
3323: lineno++;
3324: }
3325:
3326: if (p == token_buffer + maxtoken)
3327: p = extend_token_buffer (p);
3328: *p++ = c;
3329:
3330: skipnewline:
3331: c = getc (finput);
3332: }
3333:
3334: *p = 0;
3335:
3336: if (wide_flag)
3337: {
3338: /* If this is a L"..." wide-string, convert each char
3339: to an int, making a vector of ints. */
3340: int *widebuf = (int *) alloca (p - token_buffer);
3341: char *p1 = token_buffer + 1;
3342: for (; p1 == p; p1++)
3343: widebuf[p1 - token_buffer - 1] = *p1;
3344: yylval.ttype = build_string ((p - token_buffer) * sizeof (int),
3345: widebuf);
3346: TREE_TYPE (yylval.ttype) = int_array_type_node;
3347: }
3348: else
3349: {
3350: yylval.ttype = build_string (p - token_buffer, token_buffer + 1);
3351: TREE_TYPE (yylval.ttype) = char_array_type_node;
3352: }
3353:
3354: *p++ = '"';
3355: *p = 0;
3356:
3357: value = STRING; break;
3358: }
3359:
3360: case '+':
3361: case '-':
3362: case '&':
3363: case '|':
3364: case '<':
3365: case '>':
3366: case '*':
3367: case '/':
3368: case '%':
3369: case '^':
3370: case '!':
3371: case '=':
3372: {
3373: register int c1;
3374:
3375: combine:
3376:
3377: switch (c)
3378: {
3379: case '+':
3380: yylval.code = PLUS_EXPR; break;
3381: case '-':
3382: yylval.code = MINUS_EXPR; break;
3383: case '&':
3384: yylval.code = BIT_AND_EXPR; break;
3385: case '|':
3386: yylval.code = BIT_IOR_EXPR; break;
3387: case '*':
3388: yylval.code = MULT_EXPR; break;
3389: case '/':
3390: yylval.code = TRUNC_DIV_EXPR; break;
3391: case '%':
3392: yylval.code = TRUNC_MOD_EXPR; break;
3393: case '^':
3394: yylval.code = BIT_XOR_EXPR; break;
3395: case LSHIFT:
3396: yylval.code = LSHIFT_EXPR; break;
3397: case RSHIFT:
3398: yylval.code = RSHIFT_EXPR; break;
3399: case '<':
3400: yylval.code = LT_EXPR; break;
3401: case '>':
3402: yylval.code = GT_EXPR; break;
3403: }
3404:
3405: token_buffer[1] = c1 = getc (finput);
3406: token_buffer[2] = 0;
3407:
3408: if (c1 == '=')
3409: {
3410: switch (c)
3411: {
3412: case '<':
3413: value = ARITHCOMPARE; yylval.code = LE_EXPR; goto done;
3414: case '>':
3415: value = ARITHCOMPARE; yylval.code = GE_EXPR; goto done;
3416: case '!':
3417: value = EQCOMPARE; yylval.code = NE_EXPR; goto done;
3418: case '=':
3419: value = EQCOMPARE; yylval.code = EQ_EXPR; goto done;
3420: }
3421: value = ASSIGN; goto done;
3422: }
3423: else if (c == c1)
3424: switch (c)
3425: {
3426: case '+':
3427: value = PLUSPLUS; goto done;
3428: case '-':
3429: value = MINUSMINUS; goto done;
3430: case '&':
3431: value = ANDAND; goto done;
3432: case '|':
3433: value = OROR; goto done;
3434: case '<':
3435: c = LSHIFT;
3436: goto combine;
3437: case '>':
3438: c = RSHIFT;
3439: goto combine;
3440: }
3441: else if ((c == '-') && (c1 == '>'))
3442: { value = POINTSAT; goto done; }
3443: ungetc (c1, finput);
3444: token_buffer[1] = 0;
3445:
3446: if ((c == '<') || (c == '>'))
3447: value = ARITHCOMPARE;
3448: else value = c;
3449: goto done;
3450: }
3451:
3452: default:
3453: value = c;
3454: }
3455:
3456: done:
3457: yylloc.last_line = lineno;
3458:
3459: return value;
3460: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.