2 /* A Bison parser, made from /nfs/hoser/beer/java/egcs/gcc/java/parse.y
3 by GNU Bison version 1.25
6 #define YYBISON 1 /* Identify Bison output. */
8 #define yyparse java_parse
10 #define yyerror java_error
11 #define yylval java_lval
12 #define yychar java_char
13 #define yydebug java_debug
14 #define yynerrs java_nerrs
26 #define BOOL_AND_TK 269
27 #define BOOL_OR_TK 270
34 #define PLUS_ASSIGN_TK 277
35 #define MINUS_ASSIGN_TK 278
36 #define MULT_ASSIGN_TK 279
37 #define DIV_ASSIGN_TK 280
38 #define REM_ASSIGN_TK 281
39 #define LS_ASSIGN_TK 282
40 #define SRS_ASSIGN_TK 283
41 #define ZRS_ASSIGN_TK 284
42 #define AND_ASSIGN_TK 285
43 #define XOR_ASSIGN_TK 286
44 #define OR_ASSIGN_TK 287
46 #define PRIVATE_TK 289
47 #define PROTECTED_TK 290
50 #define SYNCHRONIZED_TK 293
51 #define VOLATILE_TK 294
52 #define TRANSIENT_TK 295
55 #define ABSTRACT_TK 298
56 #define MODIFIER_TK 299
59 #define DEFAULT_TK 302
62 #define BOOLEAN_TK 305
64 #define IMPLEMENTS_TK 307
69 #define INSTANCEOF_TK 312
73 #define INTERFACE_TK 316
75 #define EXTENDS_TK 318
76 #define FINALLY_TK 319
85 #define CONTINUE_TK 328
87 #define PACKAGE_TK 330
94 #define INTEGRAL_TK 337
100 #define REL_CL_TK 343
103 #define ASSIGN_ANY_TK 346
104 #define ASSIGN_TK 347
114 #define STRING_LIT_TK 357
115 #define CHAR_LIT_TK 358
116 #define INT_LIT_TK 359
117 #define FP_LIT_TK 360
120 #define BOOL_LIT_TK 363
123 #line 49 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
140 #include "java-tree.h"
146 /* Number of error found so far. */
147 int java_error_count
;
148 /* Number of warning found so far. */
149 int java_warning_count
;
151 /* The current parser context */
152 static struct parser_ctxt
*ctxp
;
154 /* binop_lookup maps token to tree_code. It is used where binary
155 operations are involved and required by the parser. RDIV_EXPR
156 covers both integral/floating point division. The code is changed
157 once the type of both operator is worked out. */
159 static enum tree_code binop_lookup
[19] =
161 PLUS_EXPR
, MINUS_EXPR
, MULT_EXPR
, RDIV_EXPR
, TRUNC_MOD_EXPR
,
162 LSHIFT_EXPR
, RSHIFT_EXPR
, URSHIFT_EXPR
,
163 BIT_AND_EXPR
, BIT_XOR_EXPR
, BIT_IOR_EXPR
,
164 TRUTH_ANDIF_EXPR
, TRUTH_ORIF_EXPR
,
165 EQ_EXPR
, NE_EXPR
, GT_EXPR
, GE_EXPR
, LT_EXPR
, LE_EXPR
,
167 #define BINOP_LOOKUP(VALUE) \
168 binop_lookup [((VALUE) - PLUS_TK)% \
169 (sizeof (binop_lookup) / sizeof (binop_lookup[0]))]
171 /* Fake WFL used to report error message. It is initialized once if
172 needed and reused with it's location information is overriden. */
173 static tree wfl_operator
= NULL_TREE
;
175 /* The "$L" identifier we use to create labels. */
176 static tree label_id
;
178 #line 104 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
203 #define YYFLAG -32768
206 #define YYTRANSLATE(x) ((unsigned)(x) <= 364 ? yytranslate[x] : 259)
208 static const char yytranslate
[] = { 0,
209 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
210 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
211 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
212 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
213 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
214 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
215 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
218 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
219 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
220 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
221 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
223 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
224 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
226 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
227 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
228 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
229 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
231 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
232 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
233 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
234 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
235 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
236 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
237 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
238 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
239 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
240 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
241 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
242 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
243 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
244 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
249 static const short yyprhs
[] = { 0,
250 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
251 20, 22, 24, 26, 28, 30, 32, 34, 38, 42,
252 46, 50, 54, 56, 58, 60, 64, 66, 67, 69,
253 71, 73, 76, 79, 82, 86, 88, 91, 93, 96,
254 100, 103, 107, 109, 111, 115, 118, 122, 128, 133,
255 139, 141, 143, 145, 147, 149, 152, 153, 161, 162,
256 169, 173, 176, 180, 185, 186, 189, 193, 196, 197,
257 200, 203, 205, 209, 213, 216, 220, 222, 225, 227,
258 229, 231, 233, 235, 237, 239, 241, 245, 250, 252,
259 256, 260, 262, 266, 270, 275, 277, 281, 284, 288,
260 292, 294, 296, 297, 301, 304, 308, 312, 317, 322,
261 325, 329, 332, 336, 339, 343, 348, 352, 356, 360,
262 362, 366, 370, 373, 377, 380, 384, 385, 388, 391,
263 393, 397, 401, 403, 406, 408, 411, 415, 417, 421,
264 426, 431, 437, 441, 446, 449, 453, 457, 462, 467,
265 473, 481, 488, 490, 492, 493, 498, 499, 505, 506,
266 512, 513, 520, 524, 529, 532, 536, 539, 543, 546,
267 550, 552, 555, 557, 559, 561, 563, 565, 568, 571,
268 574, 578, 582, 587, 589, 593, 597, 600, 601, 606,
269 608, 611, 613, 615, 617, 620, 623, 627, 629, 631,
270 633, 635, 637, 639, 641, 643, 645, 647, 649, 651,
271 653, 655, 657, 659, 661, 663, 665, 667, 669, 671,
272 673, 676, 679, 682, 685, 688, 691, 694, 697, 701,
273 706, 711, 717, 722, 728, 735, 743, 750, 752, 754,
274 756, 758, 760, 762, 764, 770, 773, 777, 782, 790,
275 798, 804, 807, 811, 817, 820, 824, 828, 833, 835,
276 838, 841, 843, 846, 850, 853, 856, 860, 863, 868,
277 871, 874, 878, 883, 886, 888, 896, 904, 911, 915,
278 921, 926, 934, 941, 944, 947, 951, 954, 955, 957,
279 959, 962, 963, 965, 967, 971, 975, 978, 982, 985,
280 989, 992, 996, 999, 1003, 1006, 1010, 1013, 1017, 1021,
281 1024, 1028, 1034, 1040, 1043, 1048, 1052, 1054, 1058, 1062,
282 1067, 1070, 1072, 1075, 1081, 1084, 1089, 1093, 1096, 1099,
283 1101, 1103, 1105, 1107, 1111, 1113, 1115, 1117, 1119, 1123,
284 1127, 1131, 1135, 1139, 1143, 1147, 1151, 1157, 1162, 1169,
285 1175, 1180, 1186, 1192, 1199, 1203, 1207, 1212, 1218, 1221,
286 1225, 1229, 1233, 1235, 1239, 1243, 1247, 1251, 1256, 1261,
287 1266, 1271, 1275, 1279, 1281, 1284, 1288, 1292, 1295, 1298,
288 1302, 1306, 1310, 1314, 1317, 1321, 1326, 1332, 1339, 1345,
289 1352, 1357, 1362, 1367, 1372, 1376, 1381, 1385, 1390, 1392,
290 1394, 1396, 1398, 1401, 1404, 1406, 1408, 1411, 1414, 1416,
291 1419, 1422, 1425, 1428, 1431, 1434, 1436, 1439, 1442, 1444,
292 1447, 1450, 1456, 1461, 1466, 1472, 1477, 1480, 1486, 1491,
293 1497, 1499, 1503, 1507, 1511, 1515, 1519, 1523, 1525, 1529,
294 1533, 1537, 1541, 1543, 1547, 1551, 1555, 1559, 1563, 1567,
295 1569, 1573, 1577, 1581, 1585, 1589, 1593, 1597, 1601, 1605,
296 1609, 1611, 1615, 1619, 1623, 1627, 1629, 1633, 1637, 1639,
297 1643, 1647, 1649, 1653, 1657, 1659, 1663, 1667, 1669, 1673,
298 1677, 1679, 1685, 1690, 1694, 1700, 1702, 1704, 1708, 1712,
299 1714, 1716, 1718, 1720, 1722, 1724
302 static const short yyrhs
[] = { 123,
303 0, 104, 0, 105, 0, 108, 0, 103, 0, 102,
304 0, 109, 0, 113, 0, 114, 0, 82, 0, 85,
305 0, 50, 0, 115, 0, 118, 0, 119, 0, 115,
306 0, 115, 0, 113, 97, 98, 0, 119, 97, 98,
307 0, 118, 97, 98, 0, 113, 97, 1, 0, 118,
308 97, 1, 0, 120, 0, 121, 0, 122, 0, 119,
309 101, 122, 0, 86, 0, 0, 126, 0, 124, 0,
310 125, 0, 126, 124, 0, 126, 125, 0, 124, 125,
311 0, 126, 124, 125, 0, 127, 0, 124, 127, 0,
312 130, 0, 125, 130, 0, 75, 119, 99, 0, 75,
313 1, 0, 75, 119, 1, 0, 128, 0, 129, 0,
314 55, 119, 99, 0, 55, 1, 0, 55, 119, 1,
315 0, 55, 119, 101, 5, 99, 0, 55, 119, 101,
316 1, 0, 55, 119, 101, 5, 1, 0, 132, 0,
317 163, 0, 99, 0, 1, 0, 44, 0, 131, 44,
318 0, 0, 131, 67, 122, 135, 136, 133, 138, 0,
319 0, 67, 122, 135, 136, 134, 138, 0, 131, 67,
320 1, 0, 67, 1, 0, 67, 122, 1, 0, 131,
321 67, 122, 1, 0, 0, 63, 116, 0, 63, 116,
322 1, 0, 63, 1, 0, 0, 52, 137, 0, 52,
323 1, 0, 117, 0, 137, 100, 117, 0, 137, 100,
324 1, 0, 95, 96, 0, 95, 139, 96, 0, 140,
325 0, 139, 140, 0, 141, 0, 156, 0, 158, 0,
326 176, 0, 142, 0, 147, 0, 132, 0, 163, 0,
327 112, 143, 99, 0, 131, 112, 143, 99, 0, 144,
328 0, 143, 100, 144, 0, 143, 100, 1, 0, 145,
329 0, 145, 92, 146, 0, 145, 92, 1, 0, 145,
330 92, 146, 1, 0, 122, 0, 145, 97, 98, 0,
331 122, 1, 0, 145, 97, 1, 0, 145, 98, 1,
332 0, 257, 0, 174, 0, 0, 149, 148, 155, 0,
333 149, 1, 0, 112, 150, 153, 0, 59, 150, 153,
334 0, 131, 112, 150, 153, 0, 131, 59, 150, 153,
335 0, 112, 1, 0, 131, 112, 1, 0, 59, 1,
336 0, 131, 59, 1, 0, 131, 1, 0, 122, 93,
337 94, 0, 122, 93, 151, 94, 0, 150, 97, 98,
338 0, 122, 93, 1, 0, 150, 97, 1, 0, 152,
339 0, 151, 100, 152, 0, 151, 100, 1, 0, 112,
340 145, 0, 131, 112, 145, 0, 112, 1, 0, 131,
341 112, 1, 0, 0, 53, 154, 0, 53, 1, 0,
342 116, 0, 154, 100, 116, 0, 154, 100, 1, 0,
343 176, 0, 176, 99, 0, 99, 0, 157, 176, 0,
344 157, 176, 99, 0, 44, 0, 159, 153, 160, 0,
345 131, 159, 153, 160, 0, 159, 153, 160, 99, 0,
346 131, 159, 153, 160, 99, 0, 120, 93, 94, 0,
347 120, 93, 151, 94, 0, 95, 96, 0, 95, 161,
348 96, 0, 95, 178, 96, 0, 95, 161, 178, 96,
349 0, 162, 93, 94, 99, 0, 162, 93, 226, 94,
350 99, 0, 119, 101, 65, 93, 226, 94, 99, 0,
351 119, 101, 65, 93, 94, 99, 0, 76, 0, 65,
352 0, 0, 61, 122, 164, 169, 0, 0, 131, 61,
353 122, 165, 169, 0, 0, 61, 122, 168, 166, 169,
354 0, 0, 131, 61, 122, 168, 167, 169, 0, 61,
355 122, 1, 0, 131, 61, 122, 1, 0, 63, 117,
356 0, 168, 100, 117, 0, 63, 1, 0, 168, 100,
357 1, 0, 95, 96, 0, 95, 170, 96, 0, 171,
358 0, 170, 171, 0, 172, 0, 173, 0, 132, 0,
359 163, 0, 142, 0, 149, 99, 0, 149, 1, 0,
360 95, 96, 0, 95, 175, 96, 0, 95, 100, 96,
361 0, 95, 175, 100, 96, 0, 146, 0, 175, 100,
362 146, 0, 175, 100, 1, 0, 95, 96, 0, 0,
363 95, 177, 178, 96, 0, 179, 0, 178, 179, 0,
364 180, 0, 182, 0, 132, 0, 181, 99, 0, 112,
365 143, 0, 131, 112, 143, 0, 184, 0, 187, 0,
366 191, 0, 192, 0, 201, 0, 205, 0, 184, 0,
367 188, 0, 193, 0, 202, 0, 206, 0, 176, 0,
368 185, 0, 189, 0, 194, 0, 204, 0, 212, 0,
369 213, 0, 214, 0, 216, 0, 215, 0, 218, 0,
370 99, 0, 122, 88, 0, 186, 182, 0, 122, 1,
371 0, 186, 183, 0, 190, 99, 0, 1, 99, 0,
372 1, 95, 0, 1, 96, 0, 162, 93, 1, 0,
373 162, 93, 94, 1, 0, 162, 93, 226, 1, 0,
374 162, 93, 226, 94, 1, 0, 119, 101, 65, 1,
375 0, 119, 101, 65, 93, 1, 0, 119, 101, 65,
376 93, 226, 1, 0, 119, 101, 65, 93, 226, 94,
377 1, 0, 119, 101, 65, 93, 94, 1, 0, 254,
378 0, 238, 0, 239, 0, 235, 0, 236, 0, 232,
379 0, 224, 0, 48, 93, 257, 94, 182, 0, 48,
380 1, 0, 48, 93, 1, 0, 48, 93, 257, 1,
381 0, 48, 93, 257, 94, 183, 56, 182, 0, 48,
382 93, 257, 94, 183, 56, 183, 0, 68, 93, 257,
383 94, 195, 0, 68, 1, 0, 68, 93, 1, 0,
384 68, 93, 257, 94, 1, 0, 95, 96, 0, 95,
385 198, 96, 0, 95, 196, 96, 0, 95, 196, 198,
386 96, 0, 197, 0, 196, 197, 0, 198, 178, 0,
387 199, 0, 198, 199, 0, 62, 258, 88, 0, 47,
388 88, 0, 62, 1, 0, 62, 258, 1, 0, 47,
389 1, 0, 66, 93, 257, 94, 0, 200, 182, 0,
390 66, 1, 0, 66, 93, 1, 0, 66, 93, 257,
391 1, 0, 200, 183, 0, 51, 0, 203, 182, 66,
392 93, 257, 94, 99, 0, 208, 99, 257, 99, 210,
393 94, 182, 0, 208, 99, 99, 210, 94, 182, 0,
394 208, 99, 1, 0, 208, 99, 257, 99, 1, 0,
395 208, 99, 99, 1, 0, 208, 99, 257, 99, 210,
396 94, 183, 0, 208, 99, 99, 210, 94, 183, 0,
397 71, 93, 0, 71, 1, 0, 71, 93, 1, 0,
398 207, 209, 0, 0, 211, 0, 181, 0, 211, 1,
399 0, 0, 211, 0, 190, 0, 211, 100, 190, 0,
400 211, 100, 1, 0, 54, 99, 0, 54, 122, 99,
401 0, 54, 1, 0, 54, 122, 1, 0, 73, 99,
402 0, 73, 122, 99, 0, 73, 1, 0, 73, 122,
403 1, 0, 58, 99, 0, 58, 257, 99, 0, 58,
404 1, 0, 58, 257, 1, 0, 49, 257, 99, 0,
405 49, 1, 0, 49, 257, 1, 0, 217, 93, 257,
406 94, 176, 0, 217, 93, 257, 94, 1, 0, 217,
407 1, 0, 217, 93, 1, 94, 0, 217, 93, 1,
408 0, 44, 0, 70, 176, 219, 0, 70, 176, 221,
409 0, 70, 176, 219, 221, 0, 70, 1, 0, 220,
410 0, 219, 220, 0, 60, 93, 152, 94, 176, 0,
411 60, 1, 0, 60, 93, 1, 94, 0, 60, 93,
412 1, 0, 64, 176, 0, 64, 1, 0, 223, 0,
413 227, 0, 111, 0, 76, 0, 93, 257, 94, 0,
414 224, 0, 231, 0, 232, 0, 233, 0, 119, 101,
415 67, 0, 113, 101, 67, 0, 59, 101, 67, 0,
416 119, 101, 76, 0, 93, 257, 1, 0, 119, 101,
417 1, 0, 113, 101, 1, 0, 59, 101, 1, 0,
418 72, 116, 93, 226, 94, 0, 72, 116, 93, 94,
419 0, 72, 116, 93, 226, 94, 138, 0, 72, 116,
420 93, 94, 138, 0, 225, 122, 93, 94, 0, 225,
421 122, 93, 94, 138, 0, 225, 122, 93, 226, 94,
422 0, 225, 122, 93, 226, 94, 138, 0, 72, 1,
423 99, 0, 72, 116, 1, 0, 72, 116, 93, 1,
424 0, 72, 116, 93, 226, 1, 0, 225, 1, 0,
425 225, 122, 1, 0, 119, 101, 72, 0, 222, 101,
426 72, 0, 257, 0, 226, 100, 257, 0, 226, 100,
427 1, 0, 72, 113, 228, 0, 72, 115, 228, 0,
428 72, 113, 228, 230, 0, 72, 115, 228, 230, 0,
429 72, 115, 230, 174, 0, 72, 113, 230, 174, 0,
430 72, 1, 98, 0, 72, 1, 97, 0, 229, 0,
431 228, 229, 0, 97, 257, 98, 0, 97, 257, 1,
432 0, 97, 1, 0, 97, 98, 0, 230, 97, 98,
433 0, 230, 97, 1, 0, 222, 101, 122, 0, 65,
434 101, 122, 0, 65, 1, 0, 119, 93, 94, 0,
435 119, 93, 226, 94, 0, 222, 101, 122, 93, 94,
436 0, 222, 101, 122, 93, 226, 94, 0, 65, 101,
437 122, 93, 94, 0, 65, 101, 122, 93, 226, 94,
438 0, 65, 101, 1, 94, 0, 65, 101, 1, 101,
439 0, 119, 97, 257, 98, 0, 223, 97, 257, 98,
440 0, 119, 97, 1, 0, 119, 97, 257, 1, 0,
441 223, 97, 1, 0, 223, 97, 257, 1, 0, 222,
442 0, 119, 0, 235, 0, 236, 0, 234, 46, 0,
443 234, 45, 0, 238, 0, 239, 0, 3, 237, 0,
444 4, 237, 0, 240, 0, 3, 1, 0, 4, 1,
445 0, 46, 237, 0, 46, 1, 0, 45, 237, 0,
446 45, 1, 0, 234, 0, 89, 237, 0, 90, 237,
447 0, 241, 0, 89, 1, 0, 90, 1, 0, 93,
448 113, 230, 94, 237, 0, 93, 113, 94, 237, 0,
449 93, 257, 94, 240, 0, 93, 119, 230, 94, 240,
450 0, 93, 113, 97, 1, 0, 93, 1, 0, 93,
451 113, 230, 94, 1, 0, 93, 113, 94, 1, 0,
452 93, 119, 230, 94, 1, 0, 237, 0, 242, 5,
453 237, 0, 242, 6, 237, 0, 242, 7, 237, 0,
454 242, 5, 1, 0, 242, 6, 1, 0, 242, 7,
455 1, 0, 242, 0, 243, 3, 242, 0, 243, 4,
456 242, 0, 243, 3, 1, 0, 243, 4, 1, 0,
457 243, 0, 244, 8, 243, 0, 244, 9, 243, 0,
458 244, 10, 243, 0, 244, 8, 1, 0, 244, 9,
459 1, 0, 244, 10, 1, 0, 244, 0, 245, 20,
460 244, 0, 245, 18, 244, 0, 245, 21, 244, 0,
461 245, 19, 244, 0, 245, 57, 114, 0, 245, 20,
462 1, 0, 245, 18, 1, 0, 245, 21, 1, 0,
463 245, 19, 1, 0, 245, 57, 1, 0, 245, 0,
464 246, 16, 245, 0, 246, 17, 245, 0, 246, 16,
465 1, 0, 246, 17, 1, 0, 246, 0, 247, 11,
466 246, 0, 247, 11, 1, 0, 247, 0, 248, 12,
467 247, 0, 248, 12, 1, 0, 248, 0, 249, 13,
468 248, 0, 249, 13, 1, 0, 249, 0, 250, 14,
469 249, 0, 250, 14, 1, 0, 250, 0, 251, 15,
470 250, 0, 251, 15, 1, 0, 251, 0, 251, 87,
471 257, 88, 252, 0, 251, 87, 88, 1, 0, 251,
472 87, 1, 0, 251, 87, 257, 88, 1, 0, 252,
473 0, 254, 0, 255, 256, 253, 0, 255, 256, 1,
474 0, 119, 0, 231, 0, 233, 0, 91, 0, 92,
481 static const short yyrline
[] = { 0,
482 251, 257, 259, 260, 261, 262, 263, 267, 269, 272,
483 274, 275, 278, 280, 283, 287, 291, 295, 301, 303,
484 305, 307, 312, 314, 317, 321, 326, 331, 333, 334,
485 335, 336, 337, 338, 339, 342, 347, 353, 355, 358,
486 361, 363, 367, 369, 372, 402, 404, 408, 421, 423,
487 427, 433, 434, 436, 446, 451, 466, 470, 473, 476,
488 479, 481, 483, 485, 489, 491, 493, 495, 499, 501,
489 503, 510, 516, 521, 525, 528, 532, 534, 537, 539,
490 540, 541, 544, 546, 547, 548, 552, 555, 567, 570,
491 572, 576, 579, 586, 592, 600, 602, 606, 608, 610,
492 614, 616, 621, 628, 640, 644, 647, 649, 651, 653,
493 655, 657, 659, 661, 668, 671, 673, 678, 680, 684,
494 689, 694, 698, 703, 708, 710, 717, 718, 719, 723,
495 725, 726, 730, 732, 733, 738, 743, 749, 761, 766,
496 772, 777, 786, 788, 791, 793, 794, 795, 799, 801,
497 804, 805, 809, 816, 826, 830, 833, 836, 839, 842,
498 845, 848, 851, 853, 857, 863, 868, 870, 874, 877,
499 881, 883, 886, 888, 889, 890, 893, 897, 903, 908,
500 913, 917, 921, 927, 929, 930, 935, 938, 941, 948,
501 950, 953, 955, 957, 960, 964, 967, 971, 973, 975,
502 977, 979, 981, 991, 993, 995, 997, 999, 1003, 1006,
503 1008, 1010, 1012, 1014, 1016, 1018, 1019, 1021, 1023, 1027,
504 1032, 1043, 1050, 1054, 1065, 1075, 1081, 1087, 1093, 1095,
505 1097, 1099, 1101, 1103, 1105, 1107, 1109, 1113, 1115, 1119,
506 1123, 1127, 1131, 1132, 1138, 1141, 1143, 1145, 1149, 1154,
507 1159, 1161, 1163, 1165, 1169, 1171, 1172, 1173, 1176, 1178,
508 1181, 1186, 1188, 1191, 1193, 1194, 1196, 1198, 1202, 1210,
509 1213, 1215, 1217, 1221, 1226, 1235, 1240, 1243, 1250, 1252,
510 1254, 1258, 1261, 1270, 1277, 1279, 1283, 1296, 1298, 1304,
511 1310, 1314, 1316, 1320, 1323, 1325, 1329, 1332, 1334, 1336,
512 1340, 1343, 1345, 1347, 1351, 1354, 1356, 1358, 1362, 1364,
513 1366, 1370, 1372, 1374, 1376, 1378, 1382, 1389, 1391, 1392,
514 1393, 1397, 1399, 1402, 1404, 1406, 1408, 1412, 1414, 1419,
515 1421, 1424, 1426, 1428, 1430, 1431, 1432, 1433, 1437, 1438,
516 1439, 1443, 1444, 1446, 1448, 1450, 1454, 1460, 1468, 1470,
517 1475, 1476, 1477, 1478, 1479, 1481, 1483, 1485, 1487, 1489,
518 1493, 1495, 1498, 1504, 1509, 1513, 1516, 1518, 1520, 1524,
519 1526, 1528, 1530, 1534, 1537, 1541, 1547, 1549, 1557, 1560,
520 1562, 1566, 1569, 1576, 1580, 1583, 1585, 1590, 1595, 1603,
521 1615, 1617, 1621, 1624, 1626, 1631, 1636, 1641, 1648, 1650,
522 1651, 1652, 1655, 1660, 1665, 1667, 1668, 1670, 1672, 1673,
523 1675, 1679, 1682, 1686, 1689, 1693, 1695, 1697, 1699, 1700,
524 1702, 1706, 1714, 1716, 1718, 1730, 1732, 1738, 1740, 1742,
525 1746, 1748, 1753, 1758, 1763, 1765, 1767, 1771, 1773, 1778,
526 1783, 1785, 1789, 1791, 1796, 1801, 1806, 1808, 1810, 1814,
527 1816, 1821, 1826, 1831, 1836, 1837, 1839, 1841, 1843, 1845,
528 1849, 1851, 1856, 1861, 1863, 1867, 1869, 1874, 1878, 1880,
529 1885, 1889, 1891, 1896, 1900, 1902, 1907, 1911, 1913, 1918,
530 1922, 1924, 1925, 1931, 1933, 1937, 1939, 1942, 1945, 1953,
531 1955, 1956, 1959, 1961, 1964, 1968
536 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
538 static const char * const yytname
[] = { "$","error","$undefined.","PLUS_TK",
539 "MINUS_TK","MULT_TK","DIV_TK","REM_TK","LS_TK","SRS_TK","ZRS_TK","AND_TK","XOR_TK",
540 "OR_TK","BOOL_AND_TK","BOOL_OR_TK","EQ_TK","NEQ_TK","GT_TK","GTE_TK","LT_TK",
541 "LTE_TK","PLUS_ASSIGN_TK","MINUS_ASSIGN_TK","MULT_ASSIGN_TK","DIV_ASSIGN_TK",
542 "REM_ASSIGN_TK","LS_ASSIGN_TK","SRS_ASSIGN_TK","ZRS_ASSIGN_TK","AND_ASSIGN_TK",
543 "XOR_ASSIGN_TK","OR_ASSIGN_TK","PUBLIC_TK","PRIVATE_TK","PROTECTED_TK","STATIC_TK",
544 "FINAL_TK","SYNCHRONIZED_TK","VOLATILE_TK","TRANSIENT_TK","NATIVE_TK","PAD_TK",
545 "ABSTRACT_TK","MODIFIER_TK","DECR_TK","INCR_TK","DEFAULT_TK","IF_TK","THROW_TK",
546 "BOOLEAN_TK","DO_TK","IMPLEMENTS_TK","THROWS_TK","BREAK_TK","IMPORT_TK","ELSE_TK",
547 "INSTANCEOF_TK","RETURN_TK","VOID_TK","CATCH_TK","INTERFACE_TK","CASE_TK","EXTENDS_TK",
548 "FINALLY_TK","SUPER_TK","WHILE_TK","CLASS_TK","SWITCH_TK","CONST_TK","TRY_TK",
549 "FOR_TK","NEW_TK","CONTINUE_TK","GOTO_TK","PACKAGE_TK","THIS_TK","BYTE_TK","SHORT_TK",
550 "INT_TK","LONG_TK","CHAR_TK","INTEGRAL_TK","FLOAT_TK","DOUBLE_TK","FP_TK","ID_TK",
551 "REL_QM_TK","REL_CL_TK","NOT_TK","NEG_TK","ASSIGN_ANY_TK","ASSIGN_TK","OP_TK",
552 "CP_TK","OCB_TK","CCB_TK","OSB_TK","CSB_TK","SC_TK","C_TK","DOT_TK","STRING_LIT_TK",
553 "CHAR_LIT_TK","INT_LIT_TK","FP_LIT_TK","TRUE_TK","FALSE_TK","BOOL_LIT_TK","NULL_TK",
554 "goal","literal","type","primitive_type","reference_type","class_or_interface_type",
555 "class_type","interface_type","array_type","name","simple_name","qualified_name",
556 "identifier","compilation_unit","import_declarations","type_declarations","package_declaration",
557 "import_declaration","single_type_import_declaration","type_import_on_demand_declaration",
558 "type_declaration","modifiers","class_declaration","@1","@2","super","interfaces",
559 "interface_type_list","class_body","class_body_declarations","class_body_declaration",
560 "class_member_declaration","field_declaration","variable_declarators","variable_declarator",
561 "variable_declarator_id","variable_initializer","method_declaration","@3","method_header",
562 "method_declarator","formal_parameter_list","formal_parameter","throws","class_type_list",
563 "method_body","static_initializer","static","constructor_declaration","constructor_declarator",
564 "constructor_body","explicit_constructor_invocation","this_or_super","interface_declaration",
565 "@4","@5","@6","@7","extends_interfaces","interface_body","interface_member_declarations",
566 "interface_member_declaration","constant_declaration","abstract_method_declaration",
567 "array_initializer","variable_initializers","block","@8","block_statements",
568 "block_statement","local_variable_declaration_statement","local_variable_declaration",
569 "statement","statement_nsi","statement_without_trailing_substatement","empty_statement",
570 "label_decl","labeled_statement","labeled_statement_nsi","expression_statement",
571 "statement_expression","if_then_statement","if_then_else_statement","if_then_else_statement_nsi",
572 "switch_statement","switch_block","switch_block_statement_groups","switch_block_statement_group",
573 "switch_labels","switch_label","while_expression","while_statement","while_statement_nsi",
574 "do_statement_begin","do_statement","for_statement","for_statement_nsi","for_header",
575 "for_begin","for_init","for_update","statement_expression_list","break_statement",
576 "continue_statement","return_statement","throw_statement","synchronized_statement",
577 "synchronized","try_statement","catches","catch_clause","finally","primary",
578 "primary_no_new_array","class_instance_creation_expression","something_dot_new",
579 "argument_list","array_creation_expression","dim_exprs","dim_expr","dims","field_access",
580 "method_invocation","array_access","postfix_expression","post_increment_expression",
581 "post_decrement_expression","unary_expression","pre_increment_expression","pre_decrement_expression",
582 "unary_expression_not_plus_minus","cast_expression","multiplicative_expression",
583 "additive_expression","shift_expression","relational_expression","equality_expression",
584 "and_expression","exclusive_or_expression","inclusive_or_expression","conditional_and_expression",
585 "conditional_or_expression","conditional_expression","assignment_expression",
586 "assignment","left_hand_side","assignment_operator","expression","constant_expression", NULL
590 static const short yyr1
[] = { 0,
591 110, 111, 111, 111, 111, 111, 111, 112, 112, 113,
592 113, 113, 114, 114, 115, 116, 117, 118, 118, 118,
593 118, 118, 119, 119, 120, 121, 122, 123, 123, 123,
594 123, 123, 123, 123, 123, 124, 124, 125, 125, 126,
595 126, 126, 127, 127, 128, 128, 128, 129, 129, 129,
596 130, 130, 130, 130, 131, 131, 133, 132, 134, 132,
597 132, 132, 132, 132, 135, 135, 135, 135, 136, 136,
598 136, 137, 137, 137, 138, 138, 139, 139, 140, 140,
599 140, 140, 141, 141, 141, 141, 142, 142, 143, 143,
600 143, 144, 144, 144, 144, 145, 145, 145, 145, 145,
601 146, 146, 148, 147, 147, 149, 149, 149, 149, 149,
602 149, 149, 149, 149, 150, 150, 150, 150, 150, 151,
603 151, 151, 152, 152, 152, 152, 153, 153, 153, 154,
604 154, 154, 155, 155, 155, 156, 156, 157, 158, 158,
605 158, 158, 159, 159, 160, 160, 160, 160, 161, 161,
606 161, 161, 162, 162, 164, 163, 165, 163, 166, 163,
607 167, 163, 163, 163, 168, 168, 168, 168, 169, 169,
608 170, 170, 171, 171, 171, 171, 172, 173, 173, 174,
609 174, 174, 174, 175, 175, 175, 176, 177, 176, 178,
610 178, 179, 179, 179, 180, 181, 181, 182, 182, 182,
611 182, 182, 182, 183, 183, 183, 183, 183, 184, 184,
612 184, 184, 184, 184, 184, 184, 184, 184, 184, 185,
613 186, 187, 187, 188, 189, 189, 189, 189, 189, 189,
614 189, 189, 189, 189, 189, 189, 189, 190, 190, 190,
615 190, 190, 190, 190, 191, 191, 191, 191, 192, 193,
616 194, 194, 194, 194, 195, 195, 195, 195, 196, 196,
617 197, 198, 198, 199, 199, 199, 199, 199, 200, 201,
618 201, 201, 201, 202, 203, 204, 205, 205, 205, 205,
619 205, 206, 206, 207, 207, 207, 208, 209, 209, 209,
620 209, 210, 210, 211, 211, 211, 212, 212, 212, 212,
621 213, 213, 213, 213, 214, 214, 214, 214, 215, 215,
622 215, 216, 216, 216, 216, 216, 217, 218, 218, 218,
623 218, 219, 219, 220, 220, 220, 220, 221, 221, 222,
624 222, 223, 223, 223, 223, 223, 223, 223, 223, 223,
625 223, 223, 223, 223, 223, 223, 224, 224, 224, 224,
626 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
627 225, 225, 226, 226, 226, 227, 227, 227, 227, 227,
628 227, 227, 227, 228, 228, 229, 229, 229, 230, 230,
629 230, 231, 231, 231, 232, 232, 232, 232, 232, 232,
630 232, 232, 233, 233, 233, 233, 233, 233, 234, 234,
631 234, 234, 235, 236, 237, 237, 237, 237, 237, 237,
632 237, 238, 238, 239, 239, 240, 240, 240, 240, 240,
633 240, 241, 241, 241, 241, 241, 241, 241, 241, 241,
634 242, 242, 242, 242, 242, 242, 242, 243, 243, 243,
635 243, 243, 244, 244, 244, 244, 244, 244, 244, 245,
636 245, 245, 245, 245, 245, 245, 245, 245, 245, 245,
637 246, 246, 246, 246, 246, 247, 247, 247, 248, 248,
638 248, 249, 249, 249, 250, 250, 250, 251, 251, 251,
639 252, 252, 252, 252, 252, 253, 253, 254, 254, 255,
640 255, 255, 256, 256, 257, 258
643 static const short yyr2
[] = { 0,
644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
645 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
646 3, 3, 1, 1, 1, 3, 1, 0, 1, 1,
647 1, 2, 2, 2, 3, 1, 2, 1, 2, 3,
648 2, 3, 1, 1, 3, 2, 3, 5, 4, 5,
649 1, 1, 1, 1, 1, 2, 0, 7, 0, 6,
650 3, 2, 3, 4, 0, 2, 3, 2, 0, 2,
651 2, 1, 3, 3, 2, 3, 1, 2, 1, 1,
652 1, 1, 1, 1, 1, 1, 3, 4, 1, 3,
653 3, 1, 3, 3, 4, 1, 3, 2, 3, 3,
654 1, 1, 0, 3, 2, 3, 3, 4, 4, 2,
655 3, 2, 3, 2, 3, 4, 3, 3, 3, 1,
656 3, 3, 2, 3, 2, 3, 0, 2, 2, 1,
657 3, 3, 1, 2, 1, 2, 3, 1, 3, 4,
658 4, 5, 3, 4, 2, 3, 3, 4, 4, 5,
659 7, 6, 1, 1, 0, 4, 0, 5, 0, 5,
660 0, 6, 3, 4, 2, 3, 2, 3, 2, 3,
661 1, 2, 1, 1, 1, 1, 1, 2, 2, 2,
662 3, 3, 4, 1, 3, 3, 2, 0, 4, 1,
663 2, 1, 1, 1, 2, 2, 3, 1, 1, 1,
664 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
665 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
666 2, 2, 2, 2, 2, 2, 2, 2, 3, 4,
667 4, 5, 4, 5, 6, 7, 6, 1, 1, 1,
668 1, 1, 1, 1, 5, 2, 3, 4, 7, 7,
669 5, 2, 3, 5, 2, 3, 3, 4, 1, 2,
670 2, 1, 2, 3, 2, 2, 3, 2, 4, 2,
671 2, 3, 4, 2, 1, 7, 7, 6, 3, 5,
672 4, 7, 6, 2, 2, 3, 2, 0, 1, 1,
673 2, 0, 1, 1, 3, 3, 2, 3, 2, 3,
674 2, 3, 2, 3, 2, 3, 2, 3, 3, 2,
675 3, 5, 5, 2, 4, 3, 1, 3, 3, 4,
676 2, 1, 2, 5, 2, 4, 3, 2, 2, 1,
677 1, 1, 1, 3, 1, 1, 1, 1, 3, 3,
678 3, 3, 3, 3, 3, 3, 5, 4, 6, 5,
679 4, 5, 5, 6, 3, 3, 4, 5, 2, 3,
680 3, 3, 1, 3, 3, 3, 3, 4, 4, 4,
681 4, 3, 3, 1, 2, 3, 3, 2, 2, 3,
682 3, 3, 3, 2, 3, 4, 5, 6, 5, 6,
683 4, 4, 4, 4, 3, 4, 3, 4, 1, 1,
684 1, 1, 2, 2, 1, 1, 2, 2, 1, 2,
685 2, 2, 2, 2, 2, 1, 2, 2, 1, 2,
686 2, 5, 4, 4, 5, 4, 2, 5, 4, 5,
687 1, 3, 3, 3, 3, 3, 3, 1, 3, 3,
688 3, 3, 1, 3, 3, 3, 3, 3, 3, 1,
689 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
690 1, 3, 3, 3, 3, 1, 3, 3, 1, 3,
691 3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
692 1, 5, 4, 3, 5, 1, 1, 3, 3, 1,
696 static const short yydefact
[] = { 0,
697 54, 55, 0, 0, 0, 0, 53, 1, 0, 0,
698 0, 36, 43, 44, 38, 0, 51, 52, 46, 27,
699 0, 23, 24, 25, 0, 62, 0, 41, 0, 0,
700 37, 39, 0, 0, 56, 0, 0, 47, 45, 0,
701 163, 0, 0, 159, 63, 0, 69, 42, 40, 0,
702 0, 0, 61, 0, 49, 0, 26, 167, 17, 165,
703 15, 0, 156, 0, 0, 68, 16, 0, 0, 59,
704 164, 0, 161, 64, 69, 50, 48, 12, 0, 10,
705 11, 169, 0, 8, 9, 13, 14, 15, 0, 175,
706 177, 0, 176, 0, 171, 173, 174, 168, 166, 160,
707 67, 71, 72, 70, 0, 158, 0, 57, 112, 0,
708 127, 110, 0, 0, 89, 92, 127, 0, 0, 0,
709 114, 0, 0, 179, 178, 170, 172, 0, 0, 60,
710 162, 0, 0, 0, 0, 107, 98, 87, 0, 0,
711 0, 0, 106, 21, 18, 22, 20, 19, 113, 127,
712 111, 0, 127, 74, 73, 55, 188, 75, 23, 0,
713 85, 0, 77, 79, 83, 84, 0, 80, 0, 81,
714 127, 86, 82, 58, 118, 115, 0, 0, 0, 120,
715 129, 130, 128, 119, 117, 91, 0, 90, 94, 0,
716 0, 0, 0, 0, 0, 0, 333, 0, 0, 0,
717 0, 6, 5, 2, 3, 4, 7, 332, 0, 400,
718 0, 102, 399, 330, 335, 0, 331, 336, 337, 338,
719 416, 401, 402, 431, 405, 406, 409, 419, 438, 443,
720 450, 461, 466, 469, 472, 475, 478, 481, 486, 495,
721 487, 0, 101, 99, 97, 100, 109, 88, 108, 187,
722 0, 0, 127, 76, 78, 105, 0, 136, 0, 125,
723 123, 0, 116, 0, 0, 410, 400, 336, 338, 407,
724 411, 408, 415, 414, 413, 412, 0, 384, 0, 0,
725 0, 16, 0, 420, 417, 421, 418, 427, 0, 400,
726 0, 180, 0, 184, 0, 0, 0, 0, 0, 95,
727 0, 0, 359, 0, 404, 403, 0, 0, 0, 0,
728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
729 0, 0, 0, 0, 0, 0, 0, 493, 494, 0,
730 0, 55, 0, 0, 275, 0, 0, 0, 0, 0,
731 0, 0, 0, 333, 0, 220, 0, 8, 400, 0,
732 0, 194, 0, 209, 0, 190, 192, 0, 193, 198,
733 210, 0, 199, 211, 0, 200, 201, 212, 0, 202,
734 0, 213, 203, 288, 0, 214, 215, 216, 218, 217,
735 0, 219, 244, 243, 0, 241, 242, 239, 240, 238,
736 143, 0, 0, 135, 104, 133, 137, 0, 139, 126,
737 124, 122, 121, 132, 131, 346, 341, 0, 383, 373,
738 372, 355, 0, 366, 374, 0, 367, 0, 356, 0,
739 0, 0, 0, 0, 0, 343, 334, 182, 181, 0,
740 345, 340, 385, 0, 363, 395, 0, 344, 339, 361,
741 342, 362, 382, 397, 0, 360, 0, 435, 432, 436,
742 433, 437, 434, 441, 439, 442, 440, 447, 444, 448,
743 445, 449, 446, 457, 452, 459, 454, 456, 451, 458,
744 453, 460, 0, 455, 464, 462, 465, 463, 468, 467,
745 471, 470, 474, 473, 477, 476, 480, 479, 484, 0,
746 0, 489, 488, 227, 228, 226, 246, 0, 310, 0,
747 299, 297, 0, 307, 305, 0, 271, 0, 252, 0,
748 321, 0, 285, 0, 303, 301, 0, 0, 196, 0,
749 0, 223, 221, 0, 0, 189, 191, 195, 317, 400,
750 222, 225, 270, 0, 400, 0, 290, 294, 287, 0,
751 0, 314, 0, 144, 140, 134, 145, 400, 0, 0,
752 0, 141, 391, 392, 0, 378, 379, 0, 375, 368,
753 0, 371, 369, 370, 357, 348, 0, 429, 423, 426,
754 0, 0, 424, 186, 183, 185, 386, 0, 396, 393,
755 0, 398, 394, 351, 0, 483, 0, 247, 0, 311,
756 309, 300, 298, 308, 306, 272, 0, 253, 0, 0,
757 0, 318, 322, 319, 286, 304, 302, 334, 0, 197,
758 229, 0, 0, 0, 291, 0, 279, 0, 0, 316,
759 0, 142, 0, 146, 0, 0, 147, 389, 0, 377,
760 376, 381, 380, 350, 358, 347, 428, 422, 430, 425,
761 365, 364, 387, 0, 352, 353, 485, 482, 248, 0,
762 273, 269, 0, 325, 0, 329, 328, 323, 320, 233,
763 0, 230, 231, 0, 0, 296, 295, 281, 0, 293,
764 0, 315, 0, 0, 148, 0, 0, 390, 349, 388,
765 354, 0, 245, 0, 198, 0, 205, 206, 0, 207,
766 208, 0, 254, 0, 251, 327, 0, 234, 0, 0,
767 232, 0, 0, 280, 0, 313, 312, 0, 149, 0,
768 0, 0, 224, 274, 0, 0, 0, 255, 0, 259,
769 0, 262, 326, 0, 237, 235, 0, 0, 278, 0,
770 0, 0, 150, 0, 249, 0, 0, 268, 265, 266,
771 496, 0, 257, 260, 0, 256, 0, 263, 324, 236,
772 276, 277, 152, 0, 0, 0, 0, 267, 264, 258,
773 151, 0, 0, 0, 0, 283, 0, 250, 282, 0,
777 static const short yydefgoto
[] = { 770,
778 208, 347, 209, 85, 86, 68, 60, 87, 210, 22,
779 23, 24, 8, 9, 10, 11, 12, 13, 14, 15,
780 351, 352, 132, 105, 47, 70, 104, 130, 162, 163,
781 164, 91, 114, 115, 116, 211, 166, 257, 92, 111,
782 179, 180, 136, 183, 395, 168, 169, 170, 171, 399,
783 549, 353, 18, 43, 72, 65, 107, 44, 63, 94,
784 95, 96, 97, 212, 295, 354, 251, 747, 356, 357,
785 358, 359, 684, 360, 361, 362, 363, 687, 364, 365,
786 366, 367, 688, 368, 695, 719, 720, 721, 722, 369,
787 370, 690, 371, 372, 373, 691, 374, 375, 539, 669,
788 670, 376, 377, 378, 379, 380, 381, 382, 602, 603,
789 604, 213, 214, 215, 216, 434, 217, 414, 415, 416,
790 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
791 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
792 238, 239, 240, 241, 242, 330, 435, 742
795 static const short yypact
[] = { 353,
796 -32768,-32768, 325, -41, 376, 398,-32768,-32768, 164, 528,
797 436,-32768,-32768,-32768,-32768, 494,-32768,-32768,-32768,-32768,
798 10,-32768,-32768,-32768, 18,-32768, 297,-32768, 11, 576,
799 -32768,-32768, 445, 598,-32768, -41, 428,-32768,-32768, 690,
800 -32768, 470, -13, -46,-32768, 495, 82,-32768,-32768, -41,
801 612, 328,-32768, 381,-32768, 28,-32768,-32768,-32768,-32768,
802 -36, 1021,-32768, 531, -13,-32768,-32768, 232, 577,-32768,
803 -32768, -13, -46,-32768, 82,-32768,-32768,-32768, 590,-32768,
804 -32768,-32768, 592, 2,-32768,-32768, 170, -7, 916,-32768,
805 -32768, 92,-32768, 1055,-32768,-32768,-32768,-32768,-32768,-32768,
806 -32768,-32768,-32768, 172, 202,-32768, -13,-32768,-32768, 262,
807 -1,-32768, 424, -75,-32768, 504, -1, 9, 86, 278,
808 -32768, 615, 617,-32768,-32768,-32768,-32768, 637, 936,-32768,
809 -32768, 202, 729, 653, 117,-32768,-32768,-32768, 660, 2333,
810 132, 384,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -1,
811 -32768, 655, -1,-32768,-32768, 337, 377,-32768, 417, 916,
812 -32768, 1001,-32768,-32768,-32768,-32768, 47,-32768, 406,-32768,
813 472,-32768,-32768,-32768,-32768,-32768, 667, 903, 551,-32768,
814 -32768,-32768, 442,-32768,-32768,-32768, 460,-32768,-32768, 3080,
815 3145, 3196, 3261, 466, 21, 497,-32768, 3312, 3377, 3428,
816 5442,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 543, 915,
817 99,-32768, 548, 560,-32768, 712,-32768, 770,-32768, 836,
818 888,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 619, 945,
819 1019, 937, 935, 669, 676, 694, 714, 258,-32768,-32768,
820 -32768, 872,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
821 2125, 731, 472,-32768,-32768,-32768, 128, 634, 668,-32768,
822 873, 719,-32768, 585, 721,-32768, 673,-32768,-32768,-32768,
823 -32768,-32768,-32768,-32768,-32768,-32768, 25,-32768, 724, 992,
824 643, 643, 290,-32768,-32768,-32768,-32768,-32768, 746, 962,
825 208,-32768, 654,-32768, 358, 331, 5509, 3493, 622,-32768,
826 427, 3544,-32768, 393,-32768,-32768, 3609, 3660, 3725, 3776,
827 3841, 3892, 3957, 4008, 4073, 4124, 4189, 4240, 525, 4305,
828 4356, 4421, 4472, 4537, 4588, 4653, 2384,-32768,-32768, 4704,
829 510, 415, 416, 4769,-32768, 182, 2449, 13, 418, 426,
830 26, 450, 204, 679, 5741,-32768, -41, 618, 844, 448,
831 827,-32768, 684,-32768, 1785,-32768,-32768, 685,-32768,-32768,
832 -32768, 2193,-32768,-32768, 689,-32768,-32768,-32768, 2193,-32768,
833 2193,-32768,-32768, 5792, 697,-32768,-32768,-32768,-32768,-32768,
834 469,-32768, 702, 711, 888, 947, 965,-32768,-32768,-32768,
835 -32768, 759, 668,-32768,-32768, 728,-32768, 1853, 732,-32768,
836 873,-32768,-32768,-32768,-32768,-32768,-32768, 123, 740,-32768,
837 -32768,-32768, 2500, 643,-32768, 493, 643, 493,-32768, 2565,
838 4820, 166, -30, 2616, 308,-32768, 1180,-32768,-32768, 1645,
839 -32768,-32768,-32768, 781,-32768,-32768, 239,-32768,-32768,-32768,
840 -32768,-32768, 772,-32768, 244,-32768, 5560,-32768,-32768,-32768,
841 -32768,-32768,-32768,-32768, 619,-32768, 619,-32768, 945,-32768,
842 945,-32768, 945,-32768, 1019,-32768, 1019,-32768, 1019,-32768,
843 1019,-32768, 2,-32768,-32768, 937,-32768, 937,-32768, 935,
844 -32768, 669,-32768, 676,-32768, 694,-32768, 714,-32768, 766,
845 784,-32768,-32768,-32768,-32768,-32768,-32768, 4885,-32768, 143,
846 -32768,-32768, 153,-32768,-32768, 180,-32768, 4936,-32768, 5001,
847 -32768, 681,-32768, 5350,-32768,-32768, 235, 242, 783, 2681,
848 620,-32768,-32768, -41, 2732,-32768,-32768,-32768,-32768, 1070,
849 -32768,-32768,-32768, 821, 984, 903,-32768,-32768,-32768, 104,
850 2797,-32768, 5052,-32768, 802,-32768,-32768, 1037, 1921, 812,
851 1989,-32768,-32768,-32768, 5625,-32768,-32768, 259,-32768, 826,
852 295,-32768, 826,-32768,-32768, 202, 61,-32768,-32768,-32768,
853 5117, 817,-32768,-32768,-32768,-32768,-32768, 5168,-32768,-32768,
854 5676,-32768,-32768, 202, 785,-32768, 5233,-32768, 252,-32768,
855 -32768,-32768,-32768,-32768,-32768,-32768, 253,-32768, 845, 471,
856 46, 681,-32768,-32768,-32768,-32768,-32768,-32768, 473, 783,
857 -32768, 941, 122, 851,-32768, 5484,-32768, 5375, 855, 865,
858 867,-32768, 645,-32768, 2057, 2848,-32768,-32768, 792,-32768,
859 -32768,-32768,-32768,-32768,-32768, 202,-32768,-32768,-32768,-32768,
860 -32768,-32768,-32768, 814,-32768, 202,-32768,-32768,-32768, 2259,
861 -32768,-32768, 87,-32768, 788,-32768,-32768,-32768,-32768,-32768,
862 2913,-32768,-32768, 972, 5741,-32768,-32768,-32768, 885, 884,
863 5417,-32768, 206, 478,-32768, 245, 134,-32768,-32768,-32768,
864 -32768, 481,-32768, 931, 934, 2259,-32768,-32768, 2259,-32768,
865 -32768, 897,-32768, 733,-32768, 905, 910,-32768, 1016, 138,
866 -32768, 929, 2193,-32768, 939,-32768,-32768, 2964,-32768, 257,
867 4885, 2193,-32768,-32768, 3029, 167, 5284,-32768, 739,-32768,
868 1484,-32768,-32768, 406,-32768,-32768, 1024, 944,-32768, 2193,
869 273, 150,-32768, 269,-32768, 5375, 948,-32768,-32768,-32768,
870 -32768, 212,-32768,-32768, 1571,-32768, 1717,-32768,-32768,-32768,
871 -32768,-32768,-32768, 276, 2259, 946, 5417,-32768,-32768,-32768,
872 -32768, 974, 2259, 955, 2259,-32768, 2259,-32768,-32768, 1038,
876 static const short yypgoto
[] = {-32768,
877 -32768, -58, 14, 737, 4, -99, 674,-32768, -3, 677,
878 -32768, 79,-32768, 1047, 760,-32768, 266,-32768,-32768, 881,
879 7, 23,-32768,-32768, 1007, 997,-32768, -131,-32768, 912,
880 -32768, 281, -121, 928, 431, -195,-32768,-32768, 408, 509,
881 832, -259, -73,-32768,-32768,-32768,-32768,-32768, 918, 686,
882 -32768, 700, -34,-32768,-32768,-32768,-32768, 1040, 508,-32768,
883 1006,-32768,-32768, 500,-32768, -120,-32768, -221, -340,-32768,
884 727, -299, 101, -526,-32768, -325,-32768,-32768,-32768, -336,
885 -32768,-32768,-32768,-32768,-32768,-32768, 389, 391, -666, -300,
886 -32768,-32768,-32768,-32768,-32768,-32768,-32768, -280,-32768, -297,
887 741,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 511,
888 517,-32768,-32768, -31,-32768, -369,-32768, 813, 219, -269,
889 1157, 133, 1187, 279, 423, 486, -20, 569, 607, -419,
890 -32768, 703, 819, 534, 699, 799, 801, 803, 800, 816,
891 -32768, 552, 815, 695,-32768,-32768, -51,-32768
898 static const short yytable
[] = { 21,
899 174, 152, 29, 83, 403, 294, 16, 573, 173, 144,
900 38, 48, 418, 278, 527, 16, 16, 16, 41, 423,
901 425, 278, 17, 138, 139, 406, 511, 93, 76, 355,
902 123, 17, 17, 17, 182, 83, 16, 538, 61, 16,
903 16, 173, 61, 143, 20, 59, 656, 256, 258, 67,
904 567, 134, 17, 64, 748, 17, 17, 16, 88, 93,
905 61, 635, 531, 571, 50, 61, 561, 59, 89, 533,
906 83, 534, 59, 17, 177, 84, 247, 585, 748, 249,
907 42, 62, 25, 27, 90, 88, 146, 693, 243, 120,
908 88, 407, 124, 50, 172, 135, 283, 259, 118, 300,
909 89, 123, 84, 83, 615, -154, 145, 84, 39, 49,
910 40, 50, -155, 279, 52, 54, 90, 184, 57, 262,
911 157, 279, 663, 685, 61, 88, 77, 172, 57, 88,
912 61, 59, 244, 69, 663, 160, 396, 67, 726, 178,
913 157, -103, 84, 590, 560, -103, 84, 563, 291, 243,
914 726, 161, 640, 592, 636, 613, 88, 110, 88, 685,
915 578, 113, 685, -30, 1, 405, 570, 738, 160, 270,
916 272, 274, 276, 84, 88, 84, 551, 285, 287, 393,
917 594, 694, 501, 147, 161, 629, 267, 267, 267, 267,
918 125, 84, 61, 177, 267, 267, 290, -93, -93, 282,
919 110, 113, -289, 616, 515, 177, 706, 2, 426, 281,
920 527, 644, 758, 289, 185, 664, 553, 187, 3, 383,
921 512, 578, 157, 554, 4, 519, 394, 710, 685, 245,
922 5, 727, 101, 578, 576, 606, 685, 578, 685, 579,
923 685, 591, 426, 754, 582, 662, 437, 349, 88, 578,
924 445, 593, 649, 651, 739, 187, 677, 701, 178, 630,
925 88, 61, 7, 557, 348, 84, 119, 20, 67, 649,
926 178, 128, 326, 725, 31, 491, 750, 84, 595, 667,
927 502, 538, 500, -66, 527, 506, 449, 451, 453, 20,
928 419, 700, 524, 518, 304, 632, 129, 45, 31, 759,
929 157, 427, 516, 267, 267, 267, 267, 267, 267, 267,
930 267, 267, 267, 267, 267, 88, 267, 267, 267, 267,
931 267, 267, 267, 383, 686, 19, -66, 625, 71, 350,
932 383, 431, 473, 607, 538, 608, 580, 383, 732, 383,
933 187, 583, 383, 709, 327, 650, 652, 88, -65, 689,
934 683, 349, -28, 1, 133, 733, 631, 409, 530, 46,
935 686, 558, 755, 686, 84, 530, 383, 530, 348, 692,
936 535, 753, 437, 705, 761, 148, 26, 57, 243, 443,
937 536, 74, 420, 384, 246, 689, 531, 348, 689, 533,
938 42, -65, 633, 446, 548, 697, 2, 432, 28, 538,
939 569, 572, 610, 729, 561, 692, 527, 3, 692, 165,
940 20, 348, 735, 4, 503, -317, 497, 267, 507, 5,
941 538, 517, -157, 267, 137, 187, 509, 6, 53, 686,
942 752, -138, -65, 350, 634, -29, 1, 686, 756, 686,
943 350, 686, 165, 46, -32, 1, 589, 350, 522, 350,
944 513, 7, 645, 429, 689, 683, 597, 430, 599, 764,
945 137, 20, 689, 729, 689, 735, 689, 752, 437, 542,
946 58, 654, 250, 660, 692, -65, 350, 524, 660, 2,
947 657, 497, 692, 20, 692, 447, 692, 384, 2, 619,
948 3, 621, -25, -25, 384, 66, 4, 280, 442, 3,
949 157, 384, 5, 384, 679, 4, 384, -317, 498, 252,
950 508, 5, 20, 20, 681, -96, 133, 383, 510, 383,
951 -96, -96, -96, -96, 134, 472, 642, -31, 1, 385,
952 384, 98, 88, -25, 7, 523, 167, 35, -25, -25,
953 -25, 265, 514, 7, -25, 349, 78, 349, -25, 84,
954 638, -96, 707, -96, 36, 20, -96, -96, -96, -96,
955 37, 543, 348, 655, 348, 661, 277, 267, 267, 167,
956 708, 2, 100, 711, 78, -34, 1, 102, 80, 106,
957 20, 81, 20, 267, 383, 402, 383, 201, 4, 561,
958 109, 117, 112, 383, 5, 140, 177, -33, 1, 57,
959 141, 142, 187, 749, 494, 495, 80, 261, 496, 81,
960 20, -35, 1, 702, 131, 149, 20, 151, 383, 2,
961 438, 349, 438, 307, 308, 309, 7, 350, 2, 350,
962 150, 153, 559, 385, 78, 559, 4, 154, 348, 383,
963 385, 2, 5, 296, 263, 438, 530, 385, 301, 385,
964 264, 88, 385, 181, 383, 2, 302, 383, 4, 734,
965 186, 178, 20, 737, 5, 741, 80, 260, 84, 81,
966 20, 383, 4, 386, 7, 20, 385, 20, 5, 322,
967 383, 384, 530, 384, 609, 530, 439, 323, 439, 383,
968 55, 440, 401, 440, 56, 441, 7, 441, 383, 530,
969 20, 57, 20, 350, 383, 20, 324, 20, 530, 674,
970 7, 439, 303, 383, 118, 383, 440, 349, 296, 400,
971 441, 404, 20, 383, 408, 383, 530, 325, 350, 175,
972 20, 383, 397, 383, 348, 383, 387, 99, 20, 413,
973 600, 349, 103, 349, 601, 20, -335, -335, 384, 428,
974 384, 530, 20, 248, 139, -337, -337, 384, 348, 530,
975 348, 530, 398, 530, 350, 297, 586, 350, 30, 298,
976 34, -153, 2, 299, 2, 20, 525, 386, 78, 716,
977 78, 350, 384, 528, 386, 716, 713, 532, 696, 714,
978 350, 386, 51, 386, 717, 541, 386, 20, -335, 350,
979 717, 155, -335, 384, 20, 159, 20, -337, 350, 20,
980 80, -337, 80, 81, 20, 81, 20, 639, 384, 388,
981 386, 384, 176, 350, 391, 350, 546, 385, 718, 385,
982 552, 2, 555, 350, 743, 384, 159, 78, 159, 421,
983 387, 350, 422, 350, 384, 350, 296, 387, 465, 467,
984 469, 471, 544, 384, 387, 762, 387, 389, 264, 387,
985 -491, -491, 384, 766, 581, 768, 78, 769, 384, 80,
986 35, 587, 81, 20, 577, 194, 78, 384, 646, 384,
987 578, 195, 139, 387, 578, 678, 614, 384, 196, 384,
988 32, 578, 197, 37, 385, 384, 385, 384, 80, 384,
989 622, 81, 20, 385, 626, 198, 199, 680, 80, 200,
990 32, 81, 20, 578, 32, 562, 121, 564, 202, 203,
991 204, 205, 561, 388, 206, 207, -492, -492, 385, -15,
992 388, 32, 305, 306, -490, -490, 297, 388, 653, 388,
993 520, 662, 388, 665, 521, 390, 35, 310, 311, 385,
994 320, 321, 78, 671, 315, 316, 317, 318, 672, 35,
995 673, 389, 328, 329, 385, 78, 388, 385, 389, 141,
996 142, 386, 701, 386, 122, 389, 36, 389, 703, 156,
997 389, 385, 37, 616, 80, 78, 712, 81, 20, -204,
998 385, -401, -401, 319, 79, 715, 4, 80, 723, 385,
999 81, 20, 5, 724, 389, -490, -490, 297, 385, -402,
1000 -402, 298, 455, 457, 385, 299, 725, 80, 476, 478,
1001 81, 20, 728, 385, 750, 385, 312, 313, 314, 765,
1002 157, 158, 730, 385, 387, 385, 387, 771, 386, 763,
1003 386, 385, 751, 385, 156, 385, 757, 386, 767, 390,
1004 78, 772, -490, -490, 297, 474, 390, 33, 424, 79,
1005 75, 4, 299, 390, 2, 390, 188, 5, 390, -15,
1006 78, 108, 386, 255, -490, -490, 297, 253, 545, 79,
1007 520, 4, 80, 392, 299, 81, 20, 5, 410, 411,
1008 412, 73, 390, 386, 417, 157, 254, 550, 2, 127,
1009 537, 387, 80, 387, 78, 81, 20, 744, 386, 745,
1010 387, 386, 658, 79, 540, 4, 82, 388, 659, 388,
1011 480, 5, -15, 482, 486, 386, 484, -490, -490, 297,
1012 459, 461, 463, 520, 386, 387, 80, 623, 648, 81,
1013 20, 488, 0, 386, 493, 0, 0, 0, 0, 0,
1014 126, 0, 386, 0, 0, 389, 387, 389, 386, 0,
1015 -490, -490, 297, 0, 0, 0, 298, 386, 0, 386,
1016 521, 387, 0, 0, 387, 0, 0, 386, 0, 386,
1017 0, 0, 0, 0, 388, 386, 388, 386, 387, 386,
1018 0, 0, 0, 388, 0, 0, 0, 387, 0, 0,
1019 0, 0, 0, 0, 0, 0, 387, 0, 0, 0,
1020 0, 0, 0, 0, 0, 387, 0, 0, 388, 0,
1021 0, 387, 389, 0, 389, 0, 0, 0, 0, 78,
1022 387, 389, 387, 0, 0, 0, 0, 0, 194, 388,
1023 387, 0, 387, 390, 195, 390, 0, 0, 387, 0,
1024 387, 196, 387, 0, 388, 197, 389, 388, 0, 0,
1025 0, 80, 0, 0, 81, 20, 0, 0, 198, 199,
1026 0, 388, 200, 0, 0, 0, 0, 389, 0, 0,
1027 388, 202, 203, 204, 205, 0, 0, 206, 207, 388,
1028 0, 0, 389, 0, 0, 389, 0, 0, 388, 0,
1029 0, 0, 0, 0, 388, 0, 0, 0, 0, 389,
1030 390, 0, 390, 388, 0, 388, 0, 0, 389, 390,
1031 0, 0, 0, 388, 0, 388, 0, 389, 0, 0,
1032 0, 388, 0, 388, 0, 388, 389, 0, 0, 0,
1033 0, 0, 389, 0, 390, 0, 268, 268, 268, 268,
1034 0, 389, 0, 389, 268, 268, 0, 0, 0, 0,
1035 0, 389, 0, 389, 0, 390, 0, 0, 0, 389,
1036 0, 389, 0, 389, 0, 0, 269, 269, 269, 269,
1037 390, 0, 0, 390, 269, 269, 0, 0, 0, 0,
1038 0, 0, 0, 0, 0, 0, 0, 390, 0, 0,
1039 0, 0, 0, 0, 0, 0, 390, 0, 0, 0,
1040 0, 0, 0, 0, 0, 390, 0, 0, 0, 0,
1041 0, 0, 0, 0, 390, 0, 0, 0, 0, 0,
1042 390, 0, 0, 0, 0, 0, 0, 0, 0, 390,
1043 0, 390, 0, 0, 0, 0, 0, 0, 0, 390,
1044 0, 390, 0, 0, 0, 0, 0, 390, 0, 390,
1045 0, 390, 0, 268, 268, 268, 268, 268, 268, 268,
1046 268, 268, 268, 268, 268, 0, 268, 268, 268, 268,
1047 268, 268, 268, 0, 331, 0, 0, 0, 0, 0,
1048 0, 0, 0, 269, 269, 269, 269, 269, 269, 269,
1049 269, 269, 269, 269, 269, 0, 269, 269, 269, 269,
1050 269, 269, 269, 0, 0, 0, 0, 0, 0, 0,
1051 0, 0, 0, 0, 0, 0, 0, 332, 192, 193,
1052 716, 333, 334, 78, 335, 0, 0, 336, 0, 0,
1053 0, 337, 194, 0, 0, 717, 0, 0, 338, 339,
1054 5, 340, 0, 341, 342, 196, 343, 0, 0, 344,
1055 0, 0, 0, 0, 0, 80, 0, 0, 81, 20,
1056 0, 331, 0, 0, 0, 0, 345, 268, 157, 746,
1057 0, 0, 346, 268, 0, 202, 203, 204, 205, 0,
1058 0, 206, 207, 0, 0, 0, 0, 0, 0, 0,
1059 0, 0, 0, 0, 0, 0, 0, 269, 0, 0,
1060 0, 0, 0, 269, 332, 192, 193, 716, 333, 334,
1061 78, 335, 0, 0, 336, 0, 0, 0, 337, 194,
1062 0, 0, 717, 0, 0, 338, 339, 5, 340, 0,
1063 341, 342, 196, 343, 0, 574, 344, 190, 191, 0,
1064 0, 0, 80, 0, 0, 81, 20, 0, 0, 0,
1065 0, 0, 0, 345, 0, 157, 760, 0, 0, 346,
1066 0, 0, 202, 203, 204, 205, 0, 0, 206, 207,
1067 0, 0, 0, 0, 0, 0, 0, 0, 0, 192,
1068 193, 0, 0, 0, 78, 0, 0, 0, 0, 0,
1069 0, 0, 0, 194, 0, 0, 0, 0, 0, 195,
1070 0, 0, 0, 0, 0, 0, 196, 331, 0, 0,
1071 197, 0, 0, 0, 0, 0, 80, 268, 268, 81,
1072 20, 0, 0, 198, 199, 0, 0, 200, 0, 201,
1073 575, 0, 0, 268, 0, 0, 202, 203, 204, 205,
1074 0, 0, 206, 207, 0, 0, 0, 269, 269, 0,
1075 332, 192, 193, -261, 333, 334, 78, 335, 0, 0,
1076 336, 0, 0, 269, 337, 194, 0, 0, -261, 0,
1077 0, 338, 339, 5, 340, 331, 341, 342, 196, 343,
1078 0, 0, 344, 0, 0, 0, 0, 0, 80, 0,
1079 0, 81, 20, 0, 0, 0, 0, 0, 0, 345,
1080 0, 157, -261, 0, 0, 346, 0, 0, 202, 203,
1081 204, 205, 0, 0, 206, 207, 0, 0, 332, 192,
1082 193, 0, 333, 334, 78, 335, 0, 0, 336, 0,
1083 0, 0, 337, 194, 0, 0, 0, 0, 0, 338,
1084 339, 5, 340, 331, 341, 342, 196, 343, 0, 0,
1085 344, 0, 0, 0, 0, 0, 80, 0, 0, 81,
1086 20, 0, 0, 0, 0, 0, 0, 345, 0, 157,
1087 526, 0, 0, 346, 0, 0, 202, 203, 204, 205,
1088 0, 0, 206, 207, 0, 0, 332, 192, 193, 0,
1089 333, 334, 78, 335, 0, 0, 336, 0, 0, 0,
1090 337, 194, 0, 0, 0, 0, 0, 338, 339, 5,
1091 340, 331, 341, 342, 196, 343, 0, 0, 344, 0,
1092 0, 0, 0, 0, 80, 0, 0, 81, 20, 0,
1093 0, 0, 0, 0, 0, 345, 0, 157, 547, 0,
1094 0, 346, 0, 0, 202, 203, 204, 205, 0, 0,
1095 206, 207, 0, 0, 332, 192, 193, 0, 333, 334,
1096 78, 335, 0, 0, 336, 0, 0, 0, 337, 194,
1097 0, 0, 0, 0, 0, 338, 339, 5, 340, 331,
1098 341, 342, 196, 343, 0, 0, 344, 0, 0, 0,
1099 0, 0, 80, 0, 0, 81, 20, 0, 0, 0,
1100 0, 0, 0, 345, 0, 157, 624, 0, 0, 346,
1101 0, 0, 202, 203, 204, 205, 0, 0, 206, 207,
1102 0, 0, 332, 192, 193, 0, 333, 334, 78, 335,
1103 0, 0, 336, 0, 0, 0, 337, 194, 0, 0,
1104 0, 0, 0, 338, 339, 5, 340, 331, 341, 342,
1105 196, 343, 0, 0, 344, 0, 0, 0, 0, 0,
1106 80, 0, 0, 81, 20, 0, 0, 0, 0, 0,
1107 0, 345, 0, 157, 627, 0, 0, 346, 0, 0,
1108 202, 203, 204, 205, 0, 0, 206, 207, 0, 0,
1109 332, 192, 193, 0, 333, 334, 78, 335, 0, 0,
1110 336, 0, 0, 0, 337, 194, 0, 0, 0, 0,
1111 0, 338, 339, 5, 340, 331, 341, 342, 196, 343,
1112 0, 0, 344, 0, 0, 0, 0, 0, 80, 0,
1113 0, 81, 20, 0, 0, 0, 0, 0, 0, 345,
1114 0, 157, 675, 0, 0, 346, 0, 0, 202, 203,
1115 204, 205, 0, 0, 206, 207, 0, 0, 332, 192,
1116 193, 0, 333, 334, 78, 335, 0, 0, 336, 0,
1117 0, 0, 337, 194, 0, 0, 0, 0, 0, 338,
1118 339, 5, 340, 331, 341, 342, 196, 343, 0, 0,
1119 344, 0, 0, 0, 0, 0, 80, 0, 0, 81,
1120 20, 0, 0, 0, 0, 0, 0, 345, 0, 157,
1121 0, 0, 0, 346, 0, 0, 202, 203, 204, 205,
1122 0, 0, 206, 207, 0, 0, 529, 192, 193, 0,
1123 333, 334, 78, 335, 0, 0, 336, 0, 0, 0,
1124 337, 194, 0, 0, 0, 0, 0, 338, 339, 331,
1125 340, 0, 341, 342, 196, 343, 0, 0, 344, 0,
1126 0, 0, 0, 0, 80, 0, 0, 81, 20, 0,
1127 0, 0, 0, 0, 0, 345, 0, 157, 0, 0,
1128 0, 346, 0, 0, 202, 203, 204, 205, 0, 0,
1129 206, 207, 529, 192, 193, 0, 682, 334, 78, 335,
1130 0, 0, 336, 0, 0, 0, 337, 194, 0, 0,
1131 0, 0, 0, 338, 339, 0, 340, 0, 341, 342,
1132 196, 343, 0, 189, 344, 190, 191, 0, 0, 0,
1133 80, 0, 0, 81, 20, 0, 0, 0, 0, 0,
1134 0, 345, 0, 157, 0, 0, 0, 346, 0, 0,
1135 202, 203, 204, 205, 0, 0, 206, 207, 0, 0,
1136 0, 0, 0, 0, 0, 0, 0, 192, 193, 0,
1137 0, 0, 78, 0, 489, 0, 190, 191, 0, 0,
1138 0, 194, 0, 0, 0, 0, 0, 195, 0, 0,
1139 0, 0, 0, 0, 196, 0, 0, 0, 197, 0,
1140 0, 0, 0, 0, 80, 0, 0, 81, 20, 0,
1141 0, 198, 199, 0, 0, 200, 0, 201, 192, 193,
1142 0, 0, 0, 78, 202, 203, 204, 205, 0, 0,
1143 206, 207, 194, 0, 0, 0, 0, 0, 195, 504,
1144 0, 190, 191, 0, 0, 196, 0, 0, 0, 197,
1145 0, 0, 0, 0, 0, 80, 0, 0, 81, 20,
1146 0, 490, 198, 199, 0, 0, 200, 0, 0, 0,
1147 0, 0, 0, 0, 0, 202, 203, 204, 205, 0,
1148 0, 206, 207, 192, 193, 0, 0, 0, 78, 0,
1149 556, 0, 190, 191, 0, 0, 0, 194, 0, 0,
1150 0, 0, 0, 195, 0, 0, 0, 0, 0, 0,
1151 196, 0, 0, 0, 197, 0, 0, 0, 0, 0,
1152 80, 0, 0, 81, 20, 0, 0, 198, 199, 0,
1153 0, 200, 0, 0, 192, 193, 0, 505, 0, 78,
1154 202, 203, 204, 205, 0, 0, 206, 207, 194, 0,
1155 0, 0, 0, 0, 195, 565, 0, 190, 191, 0,
1156 0, 196, 0, 0, 0, 197, 0, 0, 0, 0,
1157 0, 80, 0, 0, 81, 20, 0, 0, 198, 199,
1158 0, 0, 200, 0, 0, 0, 0, 557, 0, 0,
1159 0, 202, 203, 204, 205, 0, 0, 206, 207, 192,
1160 193, 0, 0, 0, 78, 0, 436, 0, 190, 191,
1161 0, 0, 0, 194, 0, 0, 0, 0, 0, 195,
1162 0, 0, 0, 0, 0, 0, 196, 0, 0, 0,
1163 197, 0, 0, 0, 0, 0, 80, 0, 0, 81,
1164 20, 0, 0, 198, 199, 0, 0, 200, 566, 0,
1165 192, 193, 0, 0, 0, 78, 202, 203, 204, 205,
1166 0, 0, 206, 207, 194, 0, 0, 0, 0, 0,
1167 195, 436, 0, 190, 191, 0, 0, 196, 0, 0,
1168 0, 197, 0, 0, 0, 0, 0, 80, 0, 0,
1169 81, 20, 0, 0, 198, 199, 0, 0, 200, 0,
1170 0, 0, 0, 557, 0, 0, 0, 202, 203, 204,
1171 205, 0, 0, 206, 207, 192, 193, 0, 0, 0,
1172 78, 0, 611, 0, 190, 191, 0, 0, 0, 194,
1173 0, 0, 0, 0, 0, 195, 0, 0, 0, 0,
1174 0, 0, 196, 0, 0, 0, 197, 0, 0, 0,
1175 0, 0, 80, 0, 0, 81, 20, 0, 0, 198,
1176 199, 0, 0, 200, 0, 0, 192, 193, 148, 0,
1177 0, 78, 202, 203, 204, 205, 0, 0, 206, 207,
1178 194, 0, 0, 0, 0, 0, 195, 617, 0, 190,
1179 191, 0, 0, 196, 0, 0, 0, 197, 0, 0,
1180 0, 0, 0, 80, 0, 0, 81, 20, 0, 0,
1181 198, 199, 0, 0, 200, 612, 0, 0, 0, 0,
1182 0, 0, 0, 202, 203, 204, 205, 0, 0, 206,
1183 207, 192, 193, 0, 0, 0, 78, 0, 611, 0,
1184 190, 191, 0, 0, 0, 194, 0, 0, 0, 0,
1185 0, 195, 0, 0, 0, 0, 0, 0, 196, 0,
1186 0, 0, 197, 0, 0, 0, 0, 0, 80, 0,
1187 0, 81, 20, 0, 0, 198, 199, 0, 0, 200,
1188 0, 0, 192, 193, 0, 618, 0, 78, 202, 203,
1189 204, 205, 0, 0, 206, 207, 194, 0, 0, 0,
1190 0, 0, 195, 698, 0, 190, 191, 0, 0, 196,
1191 0, 0, 0, 197, 0, 0, 0, 0, 0, 80,
1192 0, 0, 81, 20, 0, 0, 198, 199, 0, 0,
1193 200, 676, 0, 0, 0, 0, 0, 0, 0, 202,
1194 203, 204, 205, 0, 0, 206, 207, 192, 193, 0,
1195 0, 0, 78, 0, 698, 0, 190, 191, 0, 0,
1196 0, 194, 0, 0, 0, 0, 0, 195, 0, 0,
1197 0, 0, 0, 0, 196, 0, 0, 0, 197, 0,
1198 0, 0, 0, 0, 80, 0, 0, 81, 20, 0,
1199 0, 198, 199, 0, 0, 200, 699, 0, 192, 193,
1200 0, 0, 0, 78, 202, 203, 204, 205, 0, 0,
1201 206, 207, 194, 0, 0, 0, 0, 0, 195, 617,
1202 0, 190, 191, 0, 0, 196, 0, 0, 0, 197,
1203 0, 0, 0, 0, 0, 80, 0, 0, 81, 20,
1204 0, 0, 198, 199, 0, 0, 200, 731, 0, 0,
1205 0, 0, 0, 0, 0, 202, 203, 204, 205, 0,
1206 0, 206, 207, 192, 193, 0, 0, 0, 78, 0,
1207 266, 0, 190, 191, 0, 0, 0, 194, 0, 0,
1208 0, 0, 0, 195, 0, 0, 0, 0, 0, 0,
1209 196, 0, 0, 0, 197, 0, 0, 0, 0, 0,
1210 80, 0, 0, 81, 20, 0, 0, 198, 199, 0,
1211 0, 200, 0, 0, 192, 193, 0, 736, 0, 78,
1212 202, 203, 204, 205, 0, 0, 206, 207, 194, 0,
1213 0, 0, 0, 0, 195, 271, 0, 190, 191, 0,
1214 0, 196, 0, 0, 0, 197, 0, 0, 0, 0,
1215 0, 80, 0, 0, 81, 20, 0, 0, 198, 199,
1216 0, 0, 200, 0, 0, 0, 0, 0, 0, 0,
1217 0, 202, 203, 204, 205, 0, 0, 206, 207, 192,
1218 193, 0, 0, 0, 78, 0, 273, 0, 190, 191,
1219 0, 0, 0, 194, 0, 0, 0, 0, 0, 195,
1220 0, 0, 0, 0, 0, 0, 196, 0, 0, 0,
1221 197, 0, 0, 0, 0, 0, 80, 0, 0, 81,
1222 20, 0, 0, 198, 199, 0, 0, 200, 0, 0,
1223 192, 193, 0, 0, 0, 78, 202, 203, 204, 205,
1224 0, 0, 206, 207, 194, 0, 0, 0, 0, 0,
1225 195, 275, 0, 190, 191, 0, 0, 196, 0, 0,
1226 0, 197, 0, 0, 0, 0, 0, 80, 0, 0,
1227 81, 20, 0, 0, 198, 199, 0, 0, 200, 0,
1228 0, 0, 0, 0, 0, 0, 0, 202, 203, 204,
1229 205, 0, 0, 206, 207, 192, 193, 0, 0, 0,
1230 78, 0, 284, 0, 190, 191, 0, 0, 0, 194,
1231 0, 0, 0, 0, 0, 195, 0, 0, 0, 0,
1232 0, 0, 196, 0, 0, 0, 197, 0, 0, 0,
1233 0, 0, 80, 0, 0, 81, 20, 0, 0, 198,
1234 199, 0, 0, 200, 0, 0, 192, 193, 0, 0,
1235 0, 78, 202, 203, 204, 205, 0, 0, 206, 207,
1236 194, 0, 0, 0, 0, 0, 195, 286, 0, 190,
1237 191, 0, 0, 196, 0, 0, 0, 197, 0, 0,
1238 0, 0, 0, 80, 0, 0, 81, 20, 0, 0,
1239 198, 199, 0, 0, 200, 0, 0, 0, 0, 0,
1240 0, 0, 0, 202, 203, 204, 205, 0, 0, 206,
1241 207, 192, 193, 0, 0, 0, 78, 0, 288, 0,
1242 190, 191, 0, 0, 0, 194, 0, 0, 0, 0,
1243 0, 195, 0, 0, 0, 0, 0, 0, 196, 0,
1244 0, 0, 197, 0, 0, 0, 0, 0, 80, 0,
1245 0, 81, 20, 0, 0, 198, 199, 0, 0, 200,
1246 0, 0, 192, 193, 0, 0, 0, 78, 202, 203,
1247 204, 205, 0, 0, 206, 207, 194, 0, 0, 0,
1248 0, 0, 195, 436, 0, 190, 191, 0, 0, 196,
1249 0, 0, 0, 197, 0, 0, 0, 0, 0, 80,
1250 0, 0, 81, 20, 0, 0, 198, 199, 0, 0,
1251 200, 0, 0, 0, 0, 0, 0, 0, 0, 202,
1252 203, 204, 205, 0, 0, 206, 207, 192, 193, 0,
1253 0, 0, 78, 0, 444, 0, 190, 191, 0, 0,
1254 0, 194, 0, 0, 0, 0, 0, 195, 0, 0,
1255 0, 0, 0, 0, 196, 0, 0, 0, 197, 0,
1256 0, 0, 0, 0, 80, 0, 0, 81, 20, 0,
1257 0, 198, 199, 0, 0, 200, 0, 0, 192, 193,
1258 0, 0, 0, 78, 202, 203, 204, 205, 0, 0,
1259 206, 207, 194, 0, 0, 0, 0, 0, 195, 448,
1260 0, 190, 191, 0, 0, 196, 0, 0, 0, 197,
1261 0, 0, 0, 0, 0, 80, 0, 0, 81, 20,
1262 0, 0, 198, 199, 0, 0, 200, 0, 0, 0,
1263 0, 0, 0, 0, 0, 202, 203, 204, 205, 0,
1264 0, 206, 207, 192, 193, 0, 0, 0, 78, 0,
1265 450, 0, 190, 191, 0, 0, 0, 194, 0, 0,
1266 0, 0, 0, 195, 0, 0, 0, 0, 0, 0,
1267 196, 0, 0, 0, 197, 0, 0, 0, 0, 0,
1268 80, 0, 0, 81, 20, 0, 0, 198, 199, 0,
1269 0, 200, 0, 0, 192, 193, 0, 0, 0, 78,
1270 202, 203, 204, 205, 0, 0, 206, 207, 194, 0,
1271 0, 0, 0, 0, 195, 452, 0, 190, 191, 0,
1272 0, 196, 0, 0, 0, 197, 0, 0, 0, 0,
1273 0, 80, 0, 0, 81, 20, 0, 0, 198, 199,
1274 0, 0, 200, 0, 0, 0, 0, 0, 0, 0,
1275 0, 202, 203, 204, 205, 0, 0, 206, 207, 192,
1276 193, 0, 0, 0, 78, 0, 454, 0, 190, 191,
1277 0, 0, 0, 194, 0, 0, 0, 0, 0, 195,
1278 0, 0, 0, 0, 0, 0, 196, 0, 0, 0,
1279 197, 0, 0, 0, 0, 0, 80, 0, 0, 81,
1280 20, 0, 0, 198, 199, 0, 0, 200, 0, 0,
1281 192, 193, 0, 0, 0, 78, 202, 203, 204, 205,
1282 0, 0, 206, 207, 194, 0, 0, 0, 0, 0,
1283 195, 456, 0, 190, 191, 0, 0, 196, 0, 0,
1284 0, 197, 0, 0, 0, 0, 0, 80, 0, 0,
1285 81, 20, 0, 0, 198, 199, 0, 0, 200, 0,
1286 0, 0, 0, 0, 0, 0, 0, 202, 203, 204,
1287 205, 0, 0, 206, 207, 192, 193, 0, 0, 0,
1288 78, 0, 458, 0, 190, 191, 0, 0, 0, 194,
1289 0, 0, 0, 0, 0, 195, 0, 0, 0, 0,
1290 0, 0, 196, 0, 0, 0, 197, 0, 0, 0,
1291 0, 0, 80, 0, 0, 81, 20, 0, 0, 198,
1292 199, 0, 0, 200, 0, 0, 192, 193, 0, 0,
1293 0, 78, 202, 203, 204, 205, 0, 0, 206, 207,
1294 194, 0, 0, 0, 0, 0, 195, 460, 0, 190,
1295 191, 0, 0, 196, 0, 0, 0, 197, 0, 0,
1296 0, 0, 0, 80, 0, 0, 81, 20, 0, 0,
1297 198, 199, 0, 0, 200, 0, 0, 0, 0, 0,
1298 0, 0, 0, 202, 203, 204, 205, 0, 0, 206,
1299 207, 192, 193, 0, 0, 0, 78, 0, 462, 0,
1300 190, 191, 0, 0, 0, 194, 0, 0, 0, 0,
1301 0, 195, 0, 0, 0, 0, 0, 0, 196, 0,
1302 0, 0, 197, 0, 0, 0, 0, 0, 80, 0,
1303 0, 81, 20, 0, 0, 198, 199, 0, 0, 200,
1304 0, 0, 192, 193, 0, 0, 0, 78, 202, 203,
1305 204, 205, 0, 0, 206, 207, 194, 0, 0, 0,
1306 0, 0, 195, 464, 0, 190, 191, 0, 0, 196,
1307 0, 0, 0, 197, 0, 0, 0, 0, 0, 80,
1308 0, 0, 81, 20, 0, 0, 198, 199, 0, 0,
1309 200, 0, 0, 0, 0, 0, 0, 0, 0, 202,
1310 203, 204, 205, 0, 0, 206, 207, 192, 193, 0,
1311 0, 0, 78, 0, 466, 0, 190, 191, 0, 0,
1312 0, 194, 0, 0, 0, 0, 0, 195, 0, 0,
1313 0, 0, 0, 0, 196, 0, 0, 0, 197, 0,
1314 0, 0, 0, 0, 80, 0, 0, 81, 20, 0,
1315 0, 198, 199, 0, 0, 200, 0, 0, 192, 193,
1316 0, 0, 0, 78, 202, 203, 204, 205, 0, 0,
1317 206, 207, 194, 0, 0, 0, 0, 0, 195, 468,
1318 0, 190, 191, 0, 0, 196, 0, 0, 0, 197,
1319 0, 0, 0, 0, 0, 80, 0, 0, 81, 20,
1320 0, 0, 198, 199, 0, 0, 200, 0, 0, 0,
1321 0, 0, 0, 0, 0, 202, 203, 204, 205, 0,
1322 0, 206, 207, 192, 193, 0, 0, 0, 78, 0,
1323 470, 0, 190, 191, 0, 0, 0, 194, 0, 0,
1324 0, 0, 0, 195, 0, 0, 0, 0, 0, 0,
1325 196, 0, 0, 0, 197, 0, 0, 0, 0, 0,
1326 80, 0, 0, 81, 20, 0, 0, 198, 199, 0,
1327 0, 200, 0, 0, 192, 193, 0, 0, 0, 78,
1328 202, 203, 204, 205, 0, 0, 206, 207, 194, 0,
1329 0, 0, 0, 0, 195, 475, 0, 190, 191, 0,
1330 0, 196, 0, 0, 0, 197, 0, 0, 0, 0,
1331 0, 80, 0, 0, 81, 20, 0, 0, 198, 199,
1332 0, 0, 200, 0, 0, 0, 0, 0, 0, 0,
1333 0, 202, 203, 204, 205, 0, 0, 206, 207, 192,
1334 193, 0, 0, 0, 78, 0, 477, 0, 190, 191,
1335 0, 0, 0, 194, 0, 0, 0, 0, 0, 195,
1336 0, 0, 0, 0, 0, 0, 196, 0, 0, 0,
1337 197, 0, 0, 0, 0, 0, 80, 0, 0, 81,
1338 20, 0, 0, 198, 199, 0, 0, 200, 0, 0,
1339 192, 193, 0, 0, 0, 78, 202, 203, 204, 205,
1340 0, 0, 206, 207, 194, 0, 0, 0, 0, 0,
1341 195, 479, 0, 190, 191, 0, 0, 196, 0, 0,
1342 0, 197, 0, 0, 0, 0, 0, 80, 0, 0,
1343 81, 20, 0, 0, 198, 199, 0, 0, 200, 0,
1344 0, 0, 0, 0, 0, 0, 0, 202, 203, 204,
1345 205, 0, 0, 206, 207, 192, 193, 0, 0, 0,
1346 78, 0, 481, 0, 190, 191, 0, 0, 0, 194,
1347 0, 0, 0, 0, 0, 195, 0, 0, 0, 0,
1348 0, 0, 196, 0, 0, 0, 197, 0, 0, 0,
1349 0, 0, 80, 0, 0, 81, 20, 0, 0, 198,
1350 199, 0, 0, 200, 0, 0, 192, 193, 0, 0,
1351 0, 78, 202, 203, 204, 205, 0, 0, 206, 207,
1352 194, 0, 0, 0, 0, 0, 195, 483, 0, 190,
1353 191, 0, 0, 196, 0, 0, 0, 197, 0, 0,
1354 0, 0, 0, 80, 0, 0, 81, 20, 0, 0,
1355 198, 199, 0, 0, 200, 0, 0, 0, 0, 0,
1356 0, 0, 0, 202, 203, 204, 205, 0, 0, 206,
1357 207, 192, 193, 0, 0, 0, 78, 0, 485, 0,
1358 190, 191, 0, 0, 0, 194, 0, 0, 0, 0,
1359 0, 195, 0, 0, 0, 0, 0, 0, 196, 0,
1360 0, 0, 197, 0, 0, 0, 0, 0, 80, 0,
1361 0, 81, 20, 0, 0, 198, 199, 0, 0, 200,
1362 0, 0, 192, 193, 0, 0, 0, 78, 202, 203,
1363 204, 205, 0, 0, 206, 207, 194, 0, 0, 0,
1364 0, 0, 195, 487, 0, 190, 191, 0, 0, 196,
1365 0, 0, 0, 197, 0, 0, 0, 0, 0, 80,
1366 0, 0, 81, 20, 0, 0, 198, 199, 0, 0,
1367 200, 0, 0, 0, 0, 0, 0, 0, 0, 202,
1368 203, 204, 205, 0, 0, 206, 207, 192, 193, 0,
1369 0, 0, 78, 0, 492, 0, 190, 191, 0, 0,
1370 0, 194, 0, 0, 0, 0, 0, 195, 0, 0,
1371 0, 0, 0, 0, 196, 0, 0, 0, 197, 0,
1372 0, 0, 0, 0, 80, 0, 0, 81, 20, 0,
1373 0, 198, 199, 0, 0, 200, 0, 0, 192, 193,
1374 0, 0, 0, 78, 202, 203, 204, 205, 0, 0,
1375 206, 207, 194, 0, 0, 0, 0, 0, 195, 499,
1376 0, 190, 191, 0, 0, 196, 0, 0, 0, 197,
1377 0, 0, 0, 0, 0, 80, 0, 0, 81, 20,
1378 0, 0, 198, 199, 0, 0, 200, 0, 0, 0,
1379 0, 0, 0, 0, 0, 202, 203, 204, 205, 0,
1380 0, 206, 207, 192, 193, 0, 0, 0, 78, 0,
1381 568, 0, 190, 191, 0, 0, 0, 194, 0, 0,
1382 0, 0, 0, 195, 0, 0, 0, 0, 0, 0,
1383 196, 0, 0, 0, 197, 0, 0, 0, 0, 0,
1384 80, 0, 0, 81, 20, 0, 0, 198, 199, 0,
1385 0, 200, 0, 0, 192, 193, 0, 0, 0, 78,
1386 202, 203, 204, 205, 0, 0, 206, 207, 194, 0,
1387 0, 0, 0, 0, 195, 588, 0, 190, 191, 0,
1388 0, 196, 0, 0, 0, 197, 0, 0, 0, 0,
1389 0, 80, 0, 0, 81, 20, 0, 0, 198, 199,
1390 0, 0, 200, 0, 0, 0, 0, 0, 0, 0,
1391 0, 202, 203, 204, 205, 0, 0, 206, 207, 192,
1392 193, 0, 0, 0, 78, 0, 596, 0, 190, 191,
1393 0, 0, 0, 194, 0, 0, 0, 0, 0, 195,
1394 0, 0, 0, 0, 0, 0, 196, 0, 0, 0,
1395 197, 0, 0, 0, 0, 0, 80, 0, 0, 81,
1396 20, 0, 0, 198, 199, 0, 0, 200, 0, 0,
1397 192, 193, 0, 0, 0, 78, 202, 203, 204, 205,
1398 0, 0, 206, 207, 194, 0, 0, 0, 0, 0,
1399 195, 598, 0, 190, 191, 0, 0, 196, 0, 0,
1400 0, 197, 0, 0, 0, 0, 0, 80, 0, 0,
1401 81, 20, 0, 0, 198, 199, 0, 0, 200, 0,
1402 0, 0, 0, 0, 0, 0, 0, 202, 203, 204,
1403 205, 0, 0, 206, 207, 192, 193, 0, 0, 0,
1404 78, 0, 620, 0, 190, 191, 0, 0, 0, 194,
1405 0, 0, 0, 0, 0, 195, 0, 0, 0, 0,
1406 0, 0, 196, 0, 0, 0, 197, 0, 0, 0,
1407 0, 0, 80, 0, 0, 81, 20, 0, 0, 198,
1408 199, 0, 0, 200, 0, 0, 192, 193, 0, 0,
1409 0, 78, 202, 203, 204, 205, 0, 0, 206, 207,
1410 194, 0, 0, 0, 0, 0, 195, 637, 0, 190,
1411 191, 0, 0, 196, 0, 0, 0, 197, 0, 0,
1412 0, 0, 0, 80, 0, 0, 81, 20, 0, 0,
1413 198, 199, 0, 0, 200, 0, 0, 0, 0, 0,
1414 0, 0, 0, 202, 203, 204, 205, 0, 0, 206,
1415 207, 192, 193, 0, 0, 0, 78, 0, 641, 0,
1416 190, 191, 0, 0, 0, 194, 0, 0, 0, 0,
1417 0, 195, 0, 0, 0, 0, 0, 0, 196, 0,
1418 0, 0, 197, 0, 0, 0, 0, 0, 80, 0,
1419 0, 81, 20, 0, 0, 198, 199, 0, 0, 200,
1420 0, 0, 192, 193, 0, 0, 0, 78, 202, 203,
1421 204, 205, 0, 0, 206, 207, 194, 0, 0, 0,
1422 0, 0, 195, 647, 0, 190, 191, 0, 0, 196,
1423 0, 0, 0, 197, 0, 0, 0, 0, 0, 80,
1424 0, 0, 81, 20, 0, 0, 198, 199, 0, 0,
1425 200, 0, 0, 0, 0, 0, 0, 0, 0, 202,
1426 203, 204, 205, 0, 0, 206, 207, 192, 193, 0,
1427 0, 0, 78, 0, 740, 0, 190, 191, 0, 0,
1428 0, 194, 0, 0, 0, 0, 0, 195, 0, 0,
1429 0, 0, 0, 0, 196, 0, 0, 0, 197, 0,
1430 0, 0, 0, 0, 80, 0, 0, 81, 20, 0,
1431 0, 198, 199, 0, 0, 200, 0, 0, 192, 193,
1432 0, 0, 0, 78, 202, 203, 204, 205, 0, 0,
1433 206, 207, 194, 0, 0, 0, 0, 0, 195, 0,
1434 605, 0, 0, 0, 0, 196, 0, 0, 0, 197,
1435 0, 0, 0, 0, 0, 80, 0, 0, 81, 20,
1436 0, 0, 198, 199, 0, 668, 200, 0, 0, 0,
1437 0, 0, 0, 0, 0, 202, 203, 204, 205, 0,
1438 0, 206, 207, -284, -284, -284, 0, 0, 0, -284,
1439 0, 0, 0, 0, 0, 0, 0, 0, -284, 0,
1440 0, 0, 0, 0, -284, 0, 0, 704, 0, 192,
1441 193, -284, 0, 0, 78, -284, 0, 0, 0, 0,
1442 0, -284, 0, 194, -284, -284, 0, 0, 0, 195,
1443 0, 0, -284, 0, 190, 191, 196, 0, -284, 0,
1444 197, -284, -284, -284, -284, 0, 80, -284, -284, 81,
1445 20, 192, 193, 0, 0, 0, 78, 345, -292, 0,
1446 0, 0, 0, 0, 0, 194, 202, 203, 204, 205,
1447 0, 195, 206, 207, 666, 0, 192, 193, 196, 0,
1448 0, 78, 197, 0, 0, 0, 0, 0, 80, 0,
1449 194, 81, 20, 0, 0, 0, 195, 0, 0, 345,
1450 -292, 190, 191, 196, 0, 0, 0, 197, 202, 203,
1451 204, 205, 0, 80, 206, 207, 81, 20, 192, 193,
1452 198, 199, 0, 78, 200, 0, 201, 292, 0, 0,
1453 0, 293, 194, 202, 203, 204, 205, 0, 195, 206,
1454 207, 0, 0, 192, 193, 196, 0, 0, 78, 197,
1455 0, 0, 190, 191, 0, 80, 0, 194, 81, 20,
1456 0, 0, 0, 195, 0, 0, 345, 0, 0, 0,
1457 196, 0, 0, 0, 197, 202, 203, 204, 205, 0,
1458 80, 206, 207, 81, 20, 0, 0, 198, 199, 0,
1459 0, 200, 433, 0, 192, 193, 0, 0, 0, 78,
1460 202, 203, 204, 205, 0, 0, 206, 207, 194, 0,
1461 0, 0, 0, 0, 195, 0, 0, 190, 191, 0,
1462 0, 196, 0, 0, 0, 197, 0, 0, 0, 0,
1463 0, 80, 0, 0, 81, 20, 0, 0, 198, 199,
1464 0, 0, 200, 584, 0, 0, 0, 0, 0, 0,
1465 0, 202, 203, 204, 205, 0, 0, 206, 207, 192,
1466 193, 0, 0, 0, 78, 0, 0, 0, 190, 191,
1467 0, 0, 0, 194, 0, 0, 0, 0, 0, 195,
1468 0, 0, 0, 0, 0, 0, 196, 0, 0, 0,
1469 197, 0, 0, 0, 0, 0, 80, 0, 0, 81,
1470 20, 0, 0, 198, 199, 0, 0, 200, 628, 0,
1471 192, 193, 0, 0, 0, 78, 202, 203, 204, 205,
1472 0, 0, 206, 207, 194, 0, 0, 0, 0, 0,
1473 195, 0, 0, 190, 191, 0, 0, 196, 0, 0,
1474 0, 197, 0, 0, 0, 0, 0, 80, 0, 0,
1475 81, 20, 0, 0, 198, 199, 0, 0, 200, 643,
1476 0, 0, 0, 0, 0, 0, 0, 202, 203, 204,
1477 205, 0, 0, 206, 207, 192, 193, 0, 0, 0,
1478 78, 0, 0, 0, 0, 0, 0, 0, 0, 194,
1479 0, 0, 0, 0, 0, 195, 0, 0, 0, 0,
1480 0, 0, 196, 0, 0, 0, 197, 0, 0, 0,
1481 0, 0, 80, 0, 0, 81, 20, 0, 0, 198,
1482 199, 0, 0, 200, 0, 2, 192, 193, 0, 0,
1483 0, 78, 202, 203, 204, 205, 0, 0, 206, 207,
1484 194, 0, 0, 0, 0, 0, 195, 0, 0, 0,
1485 0, 0, 0, 196, 0, 0, 0, 197, 0, 0,
1486 0, 0, 0, 80, 0, 0, 81, 20, 0, 0,
1487 0, 0, 0, 0, 345, 0, 0, 0, 0, 0,
1488 0, 0, 0, 202, 203, 204, 205, 0, 0, 206,
1492 static const short yycheck
[] = { 3,
1493 132, 123, 6, 62, 264, 201, 0, 427, 129, 1,
1494 1, 1, 282, 1, 355, 9, 10, 11, 1, 289,
1495 290, 1, 0, 99, 100, 1, 1, 62, 1, 251,
1496 89, 9, 10, 11, 134, 94, 30, 374, 42, 33,
1497 34, 162, 46, 117, 86, 42, 1, 1, 169, 46,
1498 420, 53, 30, 100, 721, 33, 34, 51, 62, 94,
1499 64, 1, 362, 94, 101, 69, 97, 64, 62, 369,
1500 129, 371, 69, 51, 133, 62, 150, 447, 745, 153,
1501 63, 95, 4, 5, 62, 89, 1, 1, 140, 97,
1502 94, 67, 1, 101, 129, 97, 196, 171, 97, 1,
1503 94, 160, 89, 162, 1, 93, 98, 94, 99, 99,
1504 101, 101, 95, 101, 36, 37, 94, 1, 40, 178,
1505 95, 101, 1, 650, 128, 129, 99, 162, 50, 133,
1506 134, 128, 1, 52, 1, 129, 257, 134, 1, 133,
1507 95, 95, 129, 1, 414, 99, 133, 417, 200, 201,
1508 1, 129, 572, 1, 94, 525, 160, 79, 162, 686,
1509 100, 83, 689, 0, 1, 265, 1, 1, 162, 190,
1510 191, 192, 193, 160, 178, 162, 398, 198, 199, 253,
1511 1, 95, 1, 98, 162, 555, 190, 191, 192, 193,
1512 99, 178, 196, 252, 198, 199, 200, 99, 100, 196,
1513 122, 123, 99, 100, 1, 264, 1, 44, 1, 196,
1514 551, 581, 1, 200, 98, 94, 94, 139, 55, 251,
1515 341, 100, 95, 101, 61, 347, 99, 94, 755, 98,
1516 67, 94, 1, 100, 430, 1, 763, 100, 765, 1,
1517 767, 99, 1, 94, 1, 1, 298, 251, 252, 100,
1518 302, 99, 1, 1, 88, 177, 626, 1, 252, 1,
1519 264, 265, 99, 98, 251, 252, 97, 86, 265, 1,
1520 264, 100, 15, 1, 9, 327, 1, 264, 99, 616,
1521 99, 618, 334, 52, 625, 337, 307, 308, 309, 86,
1522 1, 661, 351, 345, 216, 1, 95, 1, 33, 88,
1523 95, 94, 99, 307, 308, 309, 310, 311, 312, 313,
1524 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
1525 324, 325, 326, 355, 650, 1, 95, 549, 1, 251,
1526 362, 1, 319, 99, 671, 94, 98, 369, 708, 371,
1527 262, 98, 374, 99, 87, 94, 94, 351, 52, 650,
1528 650, 355, 0, 1, 93, 99, 98, 279, 362, 63,
1529 686, 413, 94, 689, 351, 369, 398, 371, 355, 650,
1530 374, 99, 424, 671, 99, 98, 1, 299, 430, 301,
1531 374, 1, 93, 251, 1, 686, 686, 374, 689, 689,
1532 63, 95, 98, 1, 398, 655, 44, 67, 1, 736,
1533 421, 94, 524, 703, 97, 686, 747, 55, 689, 129,
1534 86, 398, 712, 61, 336, 1, 1, 421, 1, 67,
1535 757, 343, 95, 427, 1, 347, 1, 75, 1, 755,
1536 730, 95, 52, 355, 566, 0, 1, 763, 736, 765,
1537 362, 767, 162, 63, 0, 1, 498, 369, 1, 371,
1538 1, 99, 584, 96, 755, 755, 508, 100, 510, 757,
1539 1, 86, 763, 763, 765, 765, 767, 767, 520, 1,
1540 1, 1, 96, 1, 755, 95, 398, 536, 1, 44,
1541 601, 1, 763, 86, 765, 93, 767, 355, 44, 541,
1542 55, 543, 45, 46, 362, 1, 61, 1, 72, 55,
1543 95, 369, 67, 371, 636, 61, 374, 93, 93, 93,
1544 93, 67, 86, 86, 646, 92, 93, 549, 93, 551,
1545 97, 98, 99, 100, 53, 1, 578, 0, 1, 251,
1546 398, 1, 536, 86, 99, 88, 129, 44, 91, 92,
1547 93, 100, 93, 99, 97, 549, 50, 551, 101, 536,
1548 571, 92, 673, 94, 61, 86, 97, 98, 99, 100,
1549 67, 93, 549, 93, 551, 93, 101, 571, 572, 162,
1550 93, 44, 65, 93, 50, 0, 1, 1, 82, 72,
1551 86, 85, 86, 587, 616, 1, 618, 95, 61, 97,
1552 1, 83, 1, 625, 67, 92, 655, 0, 1, 521,
1553 97, 98, 524, 724, 95, 96, 82, 177, 99, 85,
1554 86, 0, 1, 665, 107, 1, 86, 1, 650, 44,
1555 1, 625, 1, 5, 6, 7, 99, 549, 44, 551,
1556 122, 123, 414, 355, 50, 417, 61, 1, 625, 671,
1557 362, 44, 67, 101, 94, 1, 650, 369, 101, 371,
1558 100, 655, 374, 1, 686, 44, 97, 689, 61, 711,
1559 1, 655, 86, 715, 67, 717, 82, 1, 655, 85,
1560 86, 703, 61, 251, 99, 86, 398, 86, 67, 11,
1561 712, 549, 686, 551, 65, 689, 67, 12, 67, 721,
1562 1, 72, 262, 72, 5, 76, 99, 76, 730, 703,
1563 86, 623, 86, 625, 736, 86, 13, 86, 712, 65,
1564 99, 67, 1, 745, 97, 747, 72, 721, 101, 1,
1565 76, 1, 86, 755, 1, 757, 730, 14, 650, 1,
1566 86, 763, 99, 765, 721, 767, 251, 64, 86, 97,
1567 60, 745, 69, 747, 64, 86, 45, 46, 616, 96,
1568 618, 755, 86, 99, 100, 45, 46, 625, 745, 763,
1569 747, 765, 95, 767, 686, 93, 1, 689, 9, 97,
1570 11, 93, 44, 101, 44, 86, 93, 355, 50, 47,
1571 50, 703, 650, 99, 362, 47, 686, 99, 1, 689,
1572 712, 369, 33, 371, 62, 99, 374, 86, 97, 721,
1573 62, 128, 101, 671, 86, 129, 86, 97, 730, 86,
1574 82, 101, 82, 85, 86, 85, 86, 1, 686, 251,
1575 398, 689, 94, 745, 94, 747, 99, 549, 96, 551,
1576 99, 44, 93, 755, 96, 703, 160, 50, 162, 94,
1577 355, 763, 97, 765, 712, 767, 101, 362, 315, 316,
1578 317, 318, 94, 721, 369, 755, 371, 251, 100, 374,
1579 91, 92, 730, 763, 93, 765, 50, 767, 736, 82,
1580 44, 88, 85, 86, 94, 59, 50, 745, 94, 747,
1581 100, 65, 100, 398, 100, 94, 66, 755, 72, 757,
1582 10, 100, 76, 67, 616, 763, 618, 765, 82, 767,
1583 99, 85, 86, 625, 93, 89, 90, 94, 82, 93,
1584 30, 85, 86, 100, 34, 416, 1, 418, 102, 103,
1585 104, 105, 97, 355, 108, 109, 91, 92, 650, 86,
1586 362, 51, 45, 46, 91, 92, 93, 369, 94, 371,
1587 97, 1, 374, 93, 101, 251, 44, 3, 4, 671,
1588 16, 17, 50, 99, 18, 19, 20, 21, 94, 44,
1589 94, 355, 91, 92, 686, 50, 398, 689, 362, 97,
1590 98, 549, 1, 551, 59, 369, 61, 371, 94, 44,
1591 374, 703, 67, 100, 82, 50, 56, 85, 86, 56,
1592 712, 45, 46, 57, 59, 99, 61, 82, 94, 721,
1593 85, 86, 67, 94, 398, 91, 92, 93, 730, 45,
1594 46, 97, 310, 311, 736, 101, 1, 82, 320, 321,
1595 85, 86, 94, 745, 1, 747, 8, 9, 10, 56,
1596 95, 96, 94, 755, 549, 757, 551, 0, 616, 94,
1597 618, 763, 99, 765, 44, 767, 99, 625, 94, 355,
1598 50, 0, 91, 92, 93, 319, 362, 11, 97, 59,
1599 54, 61, 101, 369, 44, 371, 139, 67, 374, 86,
1600 50, 75, 650, 162, 91, 92, 93, 160, 393, 59,
1601 97, 61, 82, 252, 101, 85, 86, 67, 97, 98,
1602 99, 52, 398, 671, 282, 95, 96, 398, 44, 94,
1603 374, 616, 82, 618, 50, 85, 86, 719, 686, 719,
1604 625, 689, 602, 59, 374, 61, 96, 549, 602, 551,
1605 322, 67, 86, 323, 325, 703, 324, 91, 92, 93,
1606 312, 313, 314, 97, 712, 650, 82, 101, 587, 85,
1607 86, 326, -1, 721, 330, -1, -1, -1, -1, -1,
1608 96, -1, 730, -1, -1, 549, 671, 551, 736, -1,
1609 91, 92, 93, -1, -1, -1, 97, 745, -1, 747,
1610 101, 686, -1, -1, 689, -1, -1, 755, -1, 757,
1611 -1, -1, -1, -1, 616, 763, 618, 765, 703, 767,
1612 -1, -1, -1, 625, -1, -1, -1, 712, -1, -1,
1613 -1, -1, -1, -1, -1, -1, 721, -1, -1, -1,
1614 -1, -1, -1, -1, -1, 730, -1, -1, 650, -1,
1615 -1, 736, 616, -1, 618, -1, -1, -1, -1, 50,
1616 745, 625, 747, -1, -1, -1, -1, -1, 59, 671,
1617 755, -1, 757, 549, 65, 551, -1, -1, 763, -1,
1618 765, 72, 767, -1, 686, 76, 650, 689, -1, -1,
1619 -1, 82, -1, -1, 85, 86, -1, -1, 89, 90,
1620 -1, 703, 93, -1, -1, -1, -1, 671, -1, -1,
1621 712, 102, 103, 104, 105, -1, -1, 108, 109, 721,
1622 -1, -1, 686, -1, -1, 689, -1, -1, 730, -1,
1623 -1, -1, -1, -1, 736, -1, -1, -1, -1, 703,
1624 616, -1, 618, 745, -1, 747, -1, -1, 712, 625,
1625 -1, -1, -1, 755, -1, 757, -1, 721, -1, -1,
1626 -1, 763, -1, 765, -1, 767, 730, -1, -1, -1,
1627 -1, -1, 736, -1, 650, -1, 190, 191, 192, 193,
1628 -1, 745, -1, 747, 198, 199, -1, -1, -1, -1,
1629 -1, 755, -1, 757, -1, 671, -1, -1, -1, 763,
1630 -1, 765, -1, 767, -1, -1, 190, 191, 192, 193,
1631 686, -1, -1, 689, 198, 199, -1, -1, -1, -1,
1632 -1, -1, -1, -1, -1, -1, -1, 703, -1, -1,
1633 -1, -1, -1, -1, -1, -1, 712, -1, -1, -1,
1634 -1, -1, -1, -1, -1, 721, -1, -1, -1, -1,
1635 -1, -1, -1, -1, 730, -1, -1, -1, -1, -1,
1636 736, -1, -1, -1, -1, -1, -1, -1, -1, 745,
1637 -1, 747, -1, -1, -1, -1, -1, -1, -1, 755,
1638 -1, 757, -1, -1, -1, -1, -1, 763, -1, 765,
1639 -1, 767, -1, 307, 308, 309, 310, 311, 312, 313,
1640 314, 315, 316, 317, 318, -1, 320, 321, 322, 323,
1641 324, 325, 326, -1, 1, -1, -1, -1, -1, -1,
1642 -1, -1, -1, 307, 308, 309, 310, 311, 312, 313,
1643 314, 315, 316, 317, 318, -1, 320, 321, 322, 323,
1644 324, 325, 326, -1, -1, -1, -1, -1, -1, -1,
1645 -1, -1, -1, -1, -1, -1, -1, 44, 45, 46,
1646 47, 48, 49, 50, 51, -1, -1, 54, -1, -1,
1647 -1, 58, 59, -1, -1, 62, -1, -1, 65, 66,
1648 67, 68, -1, 70, 71, 72, 73, -1, -1, 76,
1649 -1, -1, -1, -1, -1, 82, -1, -1, 85, 86,
1650 -1, 1, -1, -1, -1, -1, 93, 421, 95, 96,
1651 -1, -1, 99, 427, -1, 102, 103, 104, 105, -1,
1652 -1, 108, 109, -1, -1, -1, -1, -1, -1, -1,
1653 -1, -1, -1, -1, -1, -1, -1, 421, -1, -1,
1654 -1, -1, -1, 427, 44, 45, 46, 47, 48, 49,
1655 50, 51, -1, -1, 54, -1, -1, -1, 58, 59,
1656 -1, -1, 62, -1, -1, 65, 66, 67, 68, -1,
1657 70, 71, 72, 73, -1, 1, 76, 3, 4, -1,
1658 -1, -1, 82, -1, -1, 85, 86, -1, -1, -1,
1659 -1, -1, -1, 93, -1, 95, 96, -1, -1, 99,
1660 -1, -1, 102, 103, 104, 105, -1, -1, 108, 109,
1661 -1, -1, -1, -1, -1, -1, -1, -1, -1, 45,
1662 46, -1, -1, -1, 50, -1, -1, -1, -1, -1,
1663 -1, -1, -1, 59, -1, -1, -1, -1, -1, 65,
1664 -1, -1, -1, -1, -1, -1, 72, 1, -1, -1,
1665 76, -1, -1, -1, -1, -1, 82, 571, 572, 85,
1666 86, -1, -1, 89, 90, -1, -1, 93, -1, 95,
1667 96, -1, -1, 587, -1, -1, 102, 103, 104, 105,
1668 -1, -1, 108, 109, -1, -1, -1, 571, 572, -1,
1669 44, 45, 46, 47, 48, 49, 50, 51, -1, -1,
1670 54, -1, -1, 587, 58, 59, -1, -1, 62, -1,
1671 -1, 65, 66, 67, 68, 1, 70, 71, 72, 73,
1672 -1, -1, 76, -1, -1, -1, -1, -1, 82, -1,
1673 -1, 85, 86, -1, -1, -1, -1, -1, -1, 93,
1674 -1, 95, 96, -1, -1, 99, -1, -1, 102, 103,
1675 104, 105, -1, -1, 108, 109, -1, -1, 44, 45,
1676 46, -1, 48, 49, 50, 51, -1, -1, 54, -1,
1677 -1, -1, 58, 59, -1, -1, -1, -1, -1, 65,
1678 66, 67, 68, 1, 70, 71, 72, 73, -1, -1,
1679 76, -1, -1, -1, -1, -1, 82, -1, -1, 85,
1680 86, -1, -1, -1, -1, -1, -1, 93, -1, 95,
1681 96, -1, -1, 99, -1, -1, 102, 103, 104, 105,
1682 -1, -1, 108, 109, -1, -1, 44, 45, 46, -1,
1683 48, 49, 50, 51, -1, -1, 54, -1, -1, -1,
1684 58, 59, -1, -1, -1, -1, -1, 65, 66, 67,
1685 68, 1, 70, 71, 72, 73, -1, -1, 76, -1,
1686 -1, -1, -1, -1, 82, -1, -1, 85, 86, -1,
1687 -1, -1, -1, -1, -1, 93, -1, 95, 96, -1,
1688 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
1689 108, 109, -1, -1, 44, 45, 46, -1, 48, 49,
1690 50, 51, -1, -1, 54, -1, -1, -1, 58, 59,
1691 -1, -1, -1, -1, -1, 65, 66, 67, 68, 1,
1692 70, 71, 72, 73, -1, -1, 76, -1, -1, -1,
1693 -1, -1, 82, -1, -1, 85, 86, -1, -1, -1,
1694 -1, -1, -1, 93, -1, 95, 96, -1, -1, 99,
1695 -1, -1, 102, 103, 104, 105, -1, -1, 108, 109,
1696 -1, -1, 44, 45, 46, -1, 48, 49, 50, 51,
1697 -1, -1, 54, -1, -1, -1, 58, 59, -1, -1,
1698 -1, -1, -1, 65, 66, 67, 68, 1, 70, 71,
1699 72, 73, -1, -1, 76, -1, -1, -1, -1, -1,
1700 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
1701 -1, 93, -1, 95, 96, -1, -1, 99, -1, -1,
1702 102, 103, 104, 105, -1, -1, 108, 109, -1, -1,
1703 44, 45, 46, -1, 48, 49, 50, 51, -1, -1,
1704 54, -1, -1, -1, 58, 59, -1, -1, -1, -1,
1705 -1, 65, 66, 67, 68, 1, 70, 71, 72, 73,
1706 -1, -1, 76, -1, -1, -1, -1, -1, 82, -1,
1707 -1, 85, 86, -1, -1, -1, -1, -1, -1, 93,
1708 -1, 95, 96, -1, -1, 99, -1, -1, 102, 103,
1709 104, 105, -1, -1, 108, 109, -1, -1, 44, 45,
1710 46, -1, 48, 49, 50, 51, -1, -1, 54, -1,
1711 -1, -1, 58, 59, -1, -1, -1, -1, -1, 65,
1712 66, 67, 68, 1, 70, 71, 72, 73, -1, -1,
1713 76, -1, -1, -1, -1, -1, 82, -1, -1, 85,
1714 86, -1, -1, -1, -1, -1, -1, 93, -1, 95,
1715 -1, -1, -1, 99, -1, -1, 102, 103, 104, 105,
1716 -1, -1, 108, 109, -1, -1, 44, 45, 46, -1,
1717 48, 49, 50, 51, -1, -1, 54, -1, -1, -1,
1718 58, 59, -1, -1, -1, -1, -1, 65, 66, 1,
1719 68, -1, 70, 71, 72, 73, -1, -1, 76, -1,
1720 -1, -1, -1, -1, 82, -1, -1, 85, 86, -1,
1721 -1, -1, -1, -1, -1, 93, -1, 95, -1, -1,
1722 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
1723 108, 109, 44, 45, 46, -1, 48, 49, 50, 51,
1724 -1, -1, 54, -1, -1, -1, 58, 59, -1, -1,
1725 -1, -1, -1, 65, 66, -1, 68, -1, 70, 71,
1726 72, 73, -1, 1, 76, 3, 4, -1, -1, -1,
1727 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
1728 -1, 93, -1, 95, -1, -1, -1, 99, -1, -1,
1729 102, 103, 104, 105, -1, -1, 108, 109, -1, -1,
1730 -1, -1, -1, -1, -1, -1, -1, 45, 46, -1,
1731 -1, -1, 50, -1, 1, -1, 3, 4, -1, -1,
1732 -1, 59, -1, -1, -1, -1, -1, 65, -1, -1,
1733 -1, -1, -1, -1, 72, -1, -1, -1, 76, -1,
1734 -1, -1, -1, -1, 82, -1, -1, 85, 86, -1,
1735 -1, 89, 90, -1, -1, 93, -1, 95, 45, 46,
1736 -1, -1, -1, 50, 102, 103, 104, 105, -1, -1,
1737 108, 109, 59, -1, -1, -1, -1, -1, 65, 1,
1738 -1, 3, 4, -1, -1, 72, -1, -1, -1, 76,
1739 -1, -1, -1, -1, -1, 82, -1, -1, 85, 86,
1740 -1, 88, 89, 90, -1, -1, 93, -1, -1, -1,
1741 -1, -1, -1, -1, -1, 102, 103, 104, 105, -1,
1742 -1, 108, 109, 45, 46, -1, -1, -1, 50, -1,
1743 1, -1, 3, 4, -1, -1, -1, 59, -1, -1,
1744 -1, -1, -1, 65, -1, -1, -1, -1, -1, -1,
1745 72, -1, -1, -1, 76, -1, -1, -1, -1, -1,
1746 82, -1, -1, 85, 86, -1, -1, 89, 90, -1,
1747 -1, 93, -1, -1, 45, 46, -1, 99, -1, 50,
1748 102, 103, 104, 105, -1, -1, 108, 109, 59, -1,
1749 -1, -1, -1, -1, 65, 1, -1, 3, 4, -1,
1750 -1, 72, -1, -1, -1, 76, -1, -1, -1, -1,
1751 -1, 82, -1, -1, 85, 86, -1, -1, 89, 90,
1752 -1, -1, 93, -1, -1, -1, -1, 98, -1, -1,
1753 -1, 102, 103, 104, 105, -1, -1, 108, 109, 45,
1754 46, -1, -1, -1, 50, -1, 1, -1, 3, 4,
1755 -1, -1, -1, 59, -1, -1, -1, -1, -1, 65,
1756 -1, -1, -1, -1, -1, -1, 72, -1, -1, -1,
1757 76, -1, -1, -1, -1, -1, 82, -1, -1, 85,
1758 86, -1, -1, 89, 90, -1, -1, 93, 94, -1,
1759 45, 46, -1, -1, -1, 50, 102, 103, 104, 105,
1760 -1, -1, 108, 109, 59, -1, -1, -1, -1, -1,
1761 65, 1, -1, 3, 4, -1, -1, 72, -1, -1,
1762 -1, 76, -1, -1, -1, -1, -1, 82, -1, -1,
1763 85, 86, -1, -1, 89, 90, -1, -1, 93, -1,
1764 -1, -1, -1, 98, -1, -1, -1, 102, 103, 104,
1765 105, -1, -1, 108, 109, 45, 46, -1, -1, -1,
1766 50, -1, 1, -1, 3, 4, -1, -1, -1, 59,
1767 -1, -1, -1, -1, -1, 65, -1, -1, -1, -1,
1768 -1, -1, 72, -1, -1, -1, 76, -1, -1, -1,
1769 -1, -1, 82, -1, -1, 85, 86, -1, -1, 89,
1770 90, -1, -1, 93, -1, -1, 45, 46, 98, -1,
1771 -1, 50, 102, 103, 104, 105, -1, -1, 108, 109,
1772 59, -1, -1, -1, -1, -1, 65, 1, -1, 3,
1773 4, -1, -1, 72, -1, -1, -1, 76, -1, -1,
1774 -1, -1, -1, 82, -1, -1, 85, 86, -1, -1,
1775 89, 90, -1, -1, 93, 94, -1, -1, -1, -1,
1776 -1, -1, -1, 102, 103, 104, 105, -1, -1, 108,
1777 109, 45, 46, -1, -1, -1, 50, -1, 1, -1,
1778 3, 4, -1, -1, -1, 59, -1, -1, -1, -1,
1779 -1, 65, -1, -1, -1, -1, -1, -1, 72, -1,
1780 -1, -1, 76, -1, -1, -1, -1, -1, 82, -1,
1781 -1, 85, 86, -1, -1, 89, 90, -1, -1, 93,
1782 -1, -1, 45, 46, -1, 99, -1, 50, 102, 103,
1783 104, 105, -1, -1, 108, 109, 59, -1, -1, -1,
1784 -1, -1, 65, 1, -1, 3, 4, -1, -1, 72,
1785 -1, -1, -1, 76, -1, -1, -1, -1, -1, 82,
1786 -1, -1, 85, 86, -1, -1, 89, 90, -1, -1,
1787 93, 94, -1, -1, -1, -1, -1, -1, -1, 102,
1788 103, 104, 105, -1, -1, 108, 109, 45, 46, -1,
1789 -1, -1, 50, -1, 1, -1, 3, 4, -1, -1,
1790 -1, 59, -1, -1, -1, -1, -1, 65, -1, -1,
1791 -1, -1, -1, -1, 72, -1, -1, -1, 76, -1,
1792 -1, -1, -1, -1, 82, -1, -1, 85, 86, -1,
1793 -1, 89, 90, -1, -1, 93, 94, -1, 45, 46,
1794 -1, -1, -1, 50, 102, 103, 104, 105, -1, -1,
1795 108, 109, 59, -1, -1, -1, -1, -1, 65, 1,
1796 -1, 3, 4, -1, -1, 72, -1, -1, -1, 76,
1797 -1, -1, -1, -1, -1, 82, -1, -1, 85, 86,
1798 -1, -1, 89, 90, -1, -1, 93, 94, -1, -1,
1799 -1, -1, -1, -1, -1, 102, 103, 104, 105, -1,
1800 -1, 108, 109, 45, 46, -1, -1, -1, 50, -1,
1801 1, -1, 3, 4, -1, -1, -1, 59, -1, -1,
1802 -1, -1, -1, 65, -1, -1, -1, -1, -1, -1,
1803 72, -1, -1, -1, 76, -1, -1, -1, -1, -1,
1804 82, -1, -1, 85, 86, -1, -1, 89, 90, -1,
1805 -1, 93, -1, -1, 45, 46, -1, 99, -1, 50,
1806 102, 103, 104, 105, -1, -1, 108, 109, 59, -1,
1807 -1, -1, -1, -1, 65, 1, -1, 3, 4, -1,
1808 -1, 72, -1, -1, -1, 76, -1, -1, -1, -1,
1809 -1, 82, -1, -1, 85, 86, -1, -1, 89, 90,
1810 -1, -1, 93, -1, -1, -1, -1, -1, -1, -1,
1811 -1, 102, 103, 104, 105, -1, -1, 108, 109, 45,
1812 46, -1, -1, -1, 50, -1, 1, -1, 3, 4,
1813 -1, -1, -1, 59, -1, -1, -1, -1, -1, 65,
1814 -1, -1, -1, -1, -1, -1, 72, -1, -1, -1,
1815 76, -1, -1, -1, -1, -1, 82, -1, -1, 85,
1816 86, -1, -1, 89, 90, -1, -1, 93, -1, -1,
1817 45, 46, -1, -1, -1, 50, 102, 103, 104, 105,
1818 -1, -1, 108, 109, 59, -1, -1, -1, -1, -1,
1819 65, 1, -1, 3, 4, -1, -1, 72, -1, -1,
1820 -1, 76, -1, -1, -1, -1, -1, 82, -1, -1,
1821 85, 86, -1, -1, 89, 90, -1, -1, 93, -1,
1822 -1, -1, -1, -1, -1, -1, -1, 102, 103, 104,
1823 105, -1, -1, 108, 109, 45, 46, -1, -1, -1,
1824 50, -1, 1, -1, 3, 4, -1, -1, -1, 59,
1825 -1, -1, -1, -1, -1, 65, -1, -1, -1, -1,
1826 -1, -1, 72, -1, -1, -1, 76, -1, -1, -1,
1827 -1, -1, 82, -1, -1, 85, 86, -1, -1, 89,
1828 90, -1, -1, 93, -1, -1, 45, 46, -1, -1,
1829 -1, 50, 102, 103, 104, 105, -1, -1, 108, 109,
1830 59, -1, -1, -1, -1, -1, 65, 1, -1, 3,
1831 4, -1, -1, 72, -1, -1, -1, 76, -1, -1,
1832 -1, -1, -1, 82, -1, -1, 85, 86, -1, -1,
1833 89, 90, -1, -1, 93, -1, -1, -1, -1, -1,
1834 -1, -1, -1, 102, 103, 104, 105, -1, -1, 108,
1835 109, 45, 46, -1, -1, -1, 50, -1, 1, -1,
1836 3, 4, -1, -1, -1, 59, -1, -1, -1, -1,
1837 -1, 65, -1, -1, -1, -1, -1, -1, 72, -1,
1838 -1, -1, 76, -1, -1, -1, -1, -1, 82, -1,
1839 -1, 85, 86, -1, -1, 89, 90, -1, -1, 93,
1840 -1, -1, 45, 46, -1, -1, -1, 50, 102, 103,
1841 104, 105, -1, -1, 108, 109, 59, -1, -1, -1,
1842 -1, -1, 65, 1, -1, 3, 4, -1, -1, 72,
1843 -1, -1, -1, 76, -1, -1, -1, -1, -1, 82,
1844 -1, -1, 85, 86, -1, -1, 89, 90, -1, -1,
1845 93, -1, -1, -1, -1, -1, -1, -1, -1, 102,
1846 103, 104, 105, -1, -1, 108, 109, 45, 46, -1,
1847 -1, -1, 50, -1, 1, -1, 3, 4, -1, -1,
1848 -1, 59, -1, -1, -1, -1, -1, 65, -1, -1,
1849 -1, -1, -1, -1, 72, -1, -1, -1, 76, -1,
1850 -1, -1, -1, -1, 82, -1, -1, 85, 86, -1,
1851 -1, 89, 90, -1, -1, 93, -1, -1, 45, 46,
1852 -1, -1, -1, 50, 102, 103, 104, 105, -1, -1,
1853 108, 109, 59, -1, -1, -1, -1, -1, 65, 1,
1854 -1, 3, 4, -1, -1, 72, -1, -1, -1, 76,
1855 -1, -1, -1, -1, -1, 82, -1, -1, 85, 86,
1856 -1, -1, 89, 90, -1, -1, 93, -1, -1, -1,
1857 -1, -1, -1, -1, -1, 102, 103, 104, 105, -1,
1858 -1, 108, 109, 45, 46, -1, -1, -1, 50, -1,
1859 1, -1, 3, 4, -1, -1, -1, 59, -1, -1,
1860 -1, -1, -1, 65, -1, -1, -1, -1, -1, -1,
1861 72, -1, -1, -1, 76, -1, -1, -1, -1, -1,
1862 82, -1, -1, 85, 86, -1, -1, 89, 90, -1,
1863 -1, 93, -1, -1, 45, 46, -1, -1, -1, 50,
1864 102, 103, 104, 105, -1, -1, 108, 109, 59, -1,
1865 -1, -1, -1, -1, 65, 1, -1, 3, 4, -1,
1866 -1, 72, -1, -1, -1, 76, -1, -1, -1, -1,
1867 -1, 82, -1, -1, 85, 86, -1, -1, 89, 90,
1868 -1, -1, 93, -1, -1, -1, -1, -1, -1, -1,
1869 -1, 102, 103, 104, 105, -1, -1, 108, 109, 45,
1870 46, -1, -1, -1, 50, -1, 1, -1, 3, 4,
1871 -1, -1, -1, 59, -1, -1, -1, -1, -1, 65,
1872 -1, -1, -1, -1, -1, -1, 72, -1, -1, -1,
1873 76, -1, -1, -1, -1, -1, 82, -1, -1, 85,
1874 86, -1, -1, 89, 90, -1, -1, 93, -1, -1,
1875 45, 46, -1, -1, -1, 50, 102, 103, 104, 105,
1876 -1, -1, 108, 109, 59, -1, -1, -1, -1, -1,
1877 65, 1, -1, 3, 4, -1, -1, 72, -1, -1,
1878 -1, 76, -1, -1, -1, -1, -1, 82, -1, -1,
1879 85, 86, -1, -1, 89, 90, -1, -1, 93, -1,
1880 -1, -1, -1, -1, -1, -1, -1, 102, 103, 104,
1881 105, -1, -1, 108, 109, 45, 46, -1, -1, -1,
1882 50, -1, 1, -1, 3, 4, -1, -1, -1, 59,
1883 -1, -1, -1, -1, -1, 65, -1, -1, -1, -1,
1884 -1, -1, 72, -1, -1, -1, 76, -1, -1, -1,
1885 -1, -1, 82, -1, -1, 85, 86, -1, -1, 89,
1886 90, -1, -1, 93, -1, -1, 45, 46, -1, -1,
1887 -1, 50, 102, 103, 104, 105, -1, -1, 108, 109,
1888 59, -1, -1, -1, -1, -1, 65, 1, -1, 3,
1889 4, -1, -1, 72, -1, -1, -1, 76, -1, -1,
1890 -1, -1, -1, 82, -1, -1, 85, 86, -1, -1,
1891 89, 90, -1, -1, 93, -1, -1, -1, -1, -1,
1892 -1, -1, -1, 102, 103, 104, 105, -1, -1, 108,
1893 109, 45, 46, -1, -1, -1, 50, -1, 1, -1,
1894 3, 4, -1, -1, -1, 59, -1, -1, -1, -1,
1895 -1, 65, -1, -1, -1, -1, -1, -1, 72, -1,
1896 -1, -1, 76, -1, -1, -1, -1, -1, 82, -1,
1897 -1, 85, 86, -1, -1, 89, 90, -1, -1, 93,
1898 -1, -1, 45, 46, -1, -1, -1, 50, 102, 103,
1899 104, 105, -1, -1, 108, 109, 59, -1, -1, -1,
1900 -1, -1, 65, 1, -1, 3, 4, -1, -1, 72,
1901 -1, -1, -1, 76, -1, -1, -1, -1, -1, 82,
1902 -1, -1, 85, 86, -1, -1, 89, 90, -1, -1,
1903 93, -1, -1, -1, -1, -1, -1, -1, -1, 102,
1904 103, 104, 105, -1, -1, 108, 109, 45, 46, -1,
1905 -1, -1, 50, -1, 1, -1, 3, 4, -1, -1,
1906 -1, 59, -1, -1, -1, -1, -1, 65, -1, -1,
1907 -1, -1, -1, -1, 72, -1, -1, -1, 76, -1,
1908 -1, -1, -1, -1, 82, -1, -1, 85, 86, -1,
1909 -1, 89, 90, -1, -1, 93, -1, -1, 45, 46,
1910 -1, -1, -1, 50, 102, 103, 104, 105, -1, -1,
1911 108, 109, 59, -1, -1, -1, -1, -1, 65, 1,
1912 -1, 3, 4, -1, -1, 72, -1, -1, -1, 76,
1913 -1, -1, -1, -1, -1, 82, -1, -1, 85, 86,
1914 -1, -1, 89, 90, -1, -1, 93, -1, -1, -1,
1915 -1, -1, -1, -1, -1, 102, 103, 104, 105, -1,
1916 -1, 108, 109, 45, 46, -1, -1, -1, 50, -1,
1917 1, -1, 3, 4, -1, -1, -1, 59, -1, -1,
1918 -1, -1, -1, 65, -1, -1, -1, -1, -1, -1,
1919 72, -1, -1, -1, 76, -1, -1, -1, -1, -1,
1920 82, -1, -1, 85, 86, -1, -1, 89, 90, -1,
1921 -1, 93, -1, -1, 45, 46, -1, -1, -1, 50,
1922 102, 103, 104, 105, -1, -1, 108, 109, 59, -1,
1923 -1, -1, -1, -1, 65, 1, -1, 3, 4, -1,
1924 -1, 72, -1, -1, -1, 76, -1, -1, -1, -1,
1925 -1, 82, -1, -1, 85, 86, -1, -1, 89, 90,
1926 -1, -1, 93, -1, -1, -1, -1, -1, -1, -1,
1927 -1, 102, 103, 104, 105, -1, -1, 108, 109, 45,
1928 46, -1, -1, -1, 50, -1, 1, -1, 3, 4,
1929 -1, -1, -1, 59, -1, -1, -1, -1, -1, 65,
1930 -1, -1, -1, -1, -1, -1, 72, -1, -1, -1,
1931 76, -1, -1, -1, -1, -1, 82, -1, -1, 85,
1932 86, -1, -1, 89, 90, -1, -1, 93, -1, -1,
1933 45, 46, -1, -1, -1, 50, 102, 103, 104, 105,
1934 -1, -1, 108, 109, 59, -1, -1, -1, -1, -1,
1935 65, 1, -1, 3, 4, -1, -1, 72, -1, -1,
1936 -1, 76, -1, -1, -1, -1, -1, 82, -1, -1,
1937 85, 86, -1, -1, 89, 90, -1, -1, 93, -1,
1938 -1, -1, -1, -1, -1, -1, -1, 102, 103, 104,
1939 105, -1, -1, 108, 109, 45, 46, -1, -1, -1,
1940 50, -1, 1, -1, 3, 4, -1, -1, -1, 59,
1941 -1, -1, -1, -1, -1, 65, -1, -1, -1, -1,
1942 -1, -1, 72, -1, -1, -1, 76, -1, -1, -1,
1943 -1, -1, 82, -1, -1, 85, 86, -1, -1, 89,
1944 90, -1, -1, 93, -1, -1, 45, 46, -1, -1,
1945 -1, 50, 102, 103, 104, 105, -1, -1, 108, 109,
1946 59, -1, -1, -1, -1, -1, 65, 1, -1, 3,
1947 4, -1, -1, 72, -1, -1, -1, 76, -1, -1,
1948 -1, -1, -1, 82, -1, -1, 85, 86, -1, -1,
1949 89, 90, -1, -1, 93, -1, -1, -1, -1, -1,
1950 -1, -1, -1, 102, 103, 104, 105, -1, -1, 108,
1951 109, 45, 46, -1, -1, -1, 50, -1, 1, -1,
1952 3, 4, -1, -1, -1, 59, -1, -1, -1, -1,
1953 -1, 65, -1, -1, -1, -1, -1, -1, 72, -1,
1954 -1, -1, 76, -1, -1, -1, -1, -1, 82, -1,
1955 -1, 85, 86, -1, -1, 89, 90, -1, -1, 93,
1956 -1, -1, 45, 46, -1, -1, -1, 50, 102, 103,
1957 104, 105, -1, -1, 108, 109, 59, -1, -1, -1,
1958 -1, -1, 65, 1, -1, 3, 4, -1, -1, 72,
1959 -1, -1, -1, 76, -1, -1, -1, -1, -1, 82,
1960 -1, -1, 85, 86, -1, -1, 89, 90, -1, -1,
1961 93, -1, -1, -1, -1, -1, -1, -1, -1, 102,
1962 103, 104, 105, -1, -1, 108, 109, 45, 46, -1,
1963 -1, -1, 50, -1, 1, -1, 3, 4, -1, -1,
1964 -1, 59, -1, -1, -1, -1, -1, 65, -1, -1,
1965 -1, -1, -1, -1, 72, -1, -1, -1, 76, -1,
1966 -1, -1, -1, -1, 82, -1, -1, 85, 86, -1,
1967 -1, 89, 90, -1, -1, 93, -1, -1, 45, 46,
1968 -1, -1, -1, 50, 102, 103, 104, 105, -1, -1,
1969 108, 109, 59, -1, -1, -1, -1, -1, 65, 1,
1970 -1, 3, 4, -1, -1, 72, -1, -1, -1, 76,
1971 -1, -1, -1, -1, -1, 82, -1, -1, 85, 86,
1972 -1, -1, 89, 90, -1, -1, 93, -1, -1, -1,
1973 -1, -1, -1, -1, -1, 102, 103, 104, 105, -1,
1974 -1, 108, 109, 45, 46, -1, -1, -1, 50, -1,
1975 1, -1, 3, 4, -1, -1, -1, 59, -1, -1,
1976 -1, -1, -1, 65, -1, -1, -1, -1, -1, -1,
1977 72, -1, -1, -1, 76, -1, -1, -1, -1, -1,
1978 82, -1, -1, 85, 86, -1, -1, 89, 90, -1,
1979 -1, 93, -1, -1, 45, 46, -1, -1, -1, 50,
1980 102, 103, 104, 105, -1, -1, 108, 109, 59, -1,
1981 -1, -1, -1, -1, 65, 1, -1, 3, 4, -1,
1982 -1, 72, -1, -1, -1, 76, -1, -1, -1, -1,
1983 -1, 82, -1, -1, 85, 86, -1, -1, 89, 90,
1984 -1, -1, 93, -1, -1, -1, -1, -1, -1, -1,
1985 -1, 102, 103, 104, 105, -1, -1, 108, 109, 45,
1986 46, -1, -1, -1, 50, -1, 1, -1, 3, 4,
1987 -1, -1, -1, 59, -1, -1, -1, -1, -1, 65,
1988 -1, -1, -1, -1, -1, -1, 72, -1, -1, -1,
1989 76, -1, -1, -1, -1, -1, 82, -1, -1, 85,
1990 86, -1, -1, 89, 90, -1, -1, 93, -1, -1,
1991 45, 46, -1, -1, -1, 50, 102, 103, 104, 105,
1992 -1, -1, 108, 109, 59, -1, -1, -1, -1, -1,
1993 65, 1, -1, 3, 4, -1, -1, 72, -1, -1,
1994 -1, 76, -1, -1, -1, -1, -1, 82, -1, -1,
1995 85, 86, -1, -1, 89, 90, -1, -1, 93, -1,
1996 -1, -1, -1, -1, -1, -1, -1, 102, 103, 104,
1997 105, -1, -1, 108, 109, 45, 46, -1, -1, -1,
1998 50, -1, 1, -1, 3, 4, -1, -1, -1, 59,
1999 -1, -1, -1, -1, -1, 65, -1, -1, -1, -1,
2000 -1, -1, 72, -1, -1, -1, 76, -1, -1, -1,
2001 -1, -1, 82, -1, -1, 85, 86, -1, -1, 89,
2002 90, -1, -1, 93, -1, -1, 45, 46, -1, -1,
2003 -1, 50, 102, 103, 104, 105, -1, -1, 108, 109,
2004 59, -1, -1, -1, -1, -1, 65, 1, -1, 3,
2005 4, -1, -1, 72, -1, -1, -1, 76, -1, -1,
2006 -1, -1, -1, 82, -1, -1, 85, 86, -1, -1,
2007 89, 90, -1, -1, 93, -1, -1, -1, -1, -1,
2008 -1, -1, -1, 102, 103, 104, 105, -1, -1, 108,
2009 109, 45, 46, -1, -1, -1, 50, -1, 1, -1,
2010 3, 4, -1, -1, -1, 59, -1, -1, -1, -1,
2011 -1, 65, -1, -1, -1, -1, -1, -1, 72, -1,
2012 -1, -1, 76, -1, -1, -1, -1, -1, 82, -1,
2013 -1, 85, 86, -1, -1, 89, 90, -1, -1, 93,
2014 -1, -1, 45, 46, -1, -1, -1, 50, 102, 103,
2015 104, 105, -1, -1, 108, 109, 59, -1, -1, -1,
2016 -1, -1, 65, 1, -1, 3, 4, -1, -1, 72,
2017 -1, -1, -1, 76, -1, -1, -1, -1, -1, 82,
2018 -1, -1, 85, 86, -1, -1, 89, 90, -1, -1,
2019 93, -1, -1, -1, -1, -1, -1, -1, -1, 102,
2020 103, 104, 105, -1, -1, 108, 109, 45, 46, -1,
2021 -1, -1, 50, -1, 1, -1, 3, 4, -1, -1,
2022 -1, 59, -1, -1, -1, -1, -1, 65, -1, -1,
2023 -1, -1, -1, -1, 72, -1, -1, -1, 76, -1,
2024 -1, -1, -1, -1, 82, -1, -1, 85, 86, -1,
2025 -1, 89, 90, -1, -1, 93, -1, -1, 45, 46,
2026 -1, -1, -1, 50, 102, 103, 104, 105, -1, -1,
2027 108, 109, 59, -1, -1, -1, -1, -1, 65, -1,
2028 1, -1, -1, -1, -1, 72, -1, -1, -1, 76,
2029 -1, -1, -1, -1, -1, 82, -1, -1, 85, 86,
2030 -1, -1, 89, 90, -1, 1, 93, -1, -1, -1,
2031 -1, -1, -1, -1, -1, 102, 103, 104, 105, -1,
2032 -1, 108, 109, 44, 45, 46, -1, -1, -1, 50,
2033 -1, -1, -1, -1, -1, -1, -1, -1, 59, -1,
2034 -1, -1, -1, -1, 65, -1, -1, 1, -1, 45,
2035 46, 72, -1, -1, 50, 76, -1, -1, -1, -1,
2036 -1, 82, -1, 59, 85, 86, -1, -1, -1, 65,
2037 -1, -1, 93, -1, 3, 4, 72, -1, 99, -1,
2038 76, 102, 103, 104, 105, -1, 82, 108, 109, 85,
2039 86, 45, 46, -1, -1, -1, 50, 93, 94, -1,
2040 -1, -1, -1, -1, -1, 59, 102, 103, 104, 105,
2041 -1, 65, 108, 109, 1, -1, 45, 46, 72, -1,
2042 -1, 50, 76, -1, -1, -1, -1, -1, 82, -1,
2043 59, 85, 86, -1, -1, -1, 65, -1, -1, 93,
2044 94, 3, 4, 72, -1, -1, -1, 76, 102, 103,
2045 104, 105, -1, 82, 108, 109, 85, 86, 45, 46,
2046 89, 90, -1, 50, 93, -1, 95, 96, -1, -1,
2047 -1, 100, 59, 102, 103, 104, 105, -1, 65, 108,
2048 109, -1, -1, 45, 46, 72, -1, -1, 50, 76,
2049 -1, -1, 3, 4, -1, 82, -1, 59, 85, 86,
2050 -1, -1, -1, 65, -1, -1, 93, -1, -1, -1,
2051 72, -1, -1, -1, 76, 102, 103, 104, 105, -1,
2052 82, 108, 109, 85, 86, -1, -1, 89, 90, -1,
2053 -1, 93, 94, -1, 45, 46, -1, -1, -1, 50,
2054 102, 103, 104, 105, -1, -1, 108, 109, 59, -1,
2055 -1, -1, -1, -1, 65, -1, -1, 3, 4, -1,
2056 -1, 72, -1, -1, -1, 76, -1, -1, -1, -1,
2057 -1, 82, -1, -1, 85, 86, -1, -1, 89, 90,
2058 -1, -1, 93, 94, -1, -1, -1, -1, -1, -1,
2059 -1, 102, 103, 104, 105, -1, -1, 108, 109, 45,
2060 46, -1, -1, -1, 50, -1, -1, -1, 3, 4,
2061 -1, -1, -1, 59, -1, -1, -1, -1, -1, 65,
2062 -1, -1, -1, -1, -1, -1, 72, -1, -1, -1,
2063 76, -1, -1, -1, -1, -1, 82, -1, -1, 85,
2064 86, -1, -1, 89, 90, -1, -1, 93, 94, -1,
2065 45, 46, -1, -1, -1, 50, 102, 103, 104, 105,
2066 -1, -1, 108, 109, 59, -1, -1, -1, -1, -1,
2067 65, -1, -1, 3, 4, -1, -1, 72, -1, -1,
2068 -1, 76, -1, -1, -1, -1, -1, 82, -1, -1,
2069 85, 86, -1, -1, 89, 90, -1, -1, 93, 94,
2070 -1, -1, -1, -1, -1, -1, -1, 102, 103, 104,
2071 105, -1, -1, 108, 109, 45, 46, -1, -1, -1,
2072 50, -1, -1, -1, -1, -1, -1, -1, -1, 59,
2073 -1, -1, -1, -1, -1, 65, -1, -1, -1, -1,
2074 -1, -1, 72, -1, -1, -1, 76, -1, -1, -1,
2075 -1, -1, 82, -1, -1, 85, 86, -1, -1, 89,
2076 90, -1, -1, 93, -1, 44, 45, 46, -1, -1,
2077 -1, 50, 102, 103, 104, 105, -1, -1, 108, 109,
2078 59, -1, -1, -1, -1, -1, 65, -1, -1, -1,
2079 -1, -1, -1, 72, -1, -1, -1, 76, -1, -1,
2080 -1, -1, -1, 82, -1, -1, 85, 86, -1, -1,
2081 -1, -1, -1, -1, 93, -1, -1, -1, -1, -1,
2082 -1, -1, -1, 102, 103, 104, 105, -1, -1, 108,
2087 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
2088 #line 3 "/usr/cygnus/gnupro-98r1/share/bison.simple"
2090 /* Skeleton output parser for bison,
2091 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
2093 This program is free software; you can redistribute it and/or modify
2094 it under the terms of the GNU General Public License as published by
2095 the Free Software Foundation; either version 2, or (at your option)
2098 This program is distributed in the hope that it will be useful,
2099 but WITHOUT ANY WARRANTY; without even the implied warranty of
2100 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2101 GNU General Public License for more details.
2103 You should have received a copy of the GNU General Public License
2104 along with this program; if not, write to the Free Software
2105 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
2107 /* As a special exception, when this file is copied by Bison into a
2108 Bison output file, you may use that output file without restriction.
2109 This special exception was added by the Free Software Foundation
2110 in version 1.24 of Bison. */
2114 #define alloca __builtin_alloca
2115 #else /* not GNU C. */
2116 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
2118 #else /* not sparc */
2119 #if defined (MSDOS) && !defined (__TURBOC__)
2121 #else /* not MSDOS, or __TURBOC__ */
2125 #else /* not MSDOS, __TURBOC__, or _AIX */
2129 void *alloca (unsigned int);
2131 #else /* not __cplusplus */
2133 #endif /* not __cplusplus */
2135 #endif /* not _AIX */
2136 #endif /* not MSDOS, or __TURBOC__ */
2137 #endif /* not sparc. */
2138 #endif /* not GNU C. */
2139 #endif /* alloca not defined. */
2141 /* This is the parser code that is written into each bison parser
2142 when the %semantic_parser declaration is not specified in the grammar.
2143 It was written by Richard Stallman by simplifying the hairy parser
2144 used when %semantic_parser is specified. */
2146 /* Note: there must be only one dollar sign in this file.
2147 It is replaced by the list of actions, each action
2148 as one case of the switch. */
2150 #define yyerrok (yyerrstatus = 0)
2151 #define yyclearin (yychar = YYEMPTY)
2154 #define YYACCEPT return(0)
2155 #define YYABORT return(1)
2156 #define YYERROR goto yyerrlab1
2157 /* Like YYERROR except do call yyerror.
2158 This remains here temporarily to ease the
2159 transition to the new meaning of YYERROR, for GCC.
2160 Once GCC version 2 has supplanted version 1, this can go. */
2161 #define YYFAIL goto yyerrlab
2162 #define YYRECOVERING() (!!yyerrstatus)
2163 #define YYBACKUP(token, value) \
2165 if (yychar == YYEMPTY && yylen == 1) \
2166 { yychar = (token), yylval = (value); \
2167 yychar1 = YYTRANSLATE (yychar); \
2172 { yyerror ("syntax error: cannot back up"); YYERROR; } \
2176 #define YYERRCODE 256
2179 #define YYLEX yylex()
2185 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
2187 #define YYLEX yylex(&yylval, &yylloc)
2189 #else /* not YYLSP_NEEDED */
2191 #define YYLEX yylex(&yylval, YYLEX_PARAM)
2193 #define YYLEX yylex(&yylval)
2195 #endif /* not YYLSP_NEEDED */
2198 /* If nonreentrant, generate the variables here */
2202 int yychar
; /* the lookahead symbol */
2203 YYSTYPE yylval
; /* the semantic value of the */
2204 /* lookahead symbol */
2207 YYLTYPE yylloc
; /* location data for the lookahead */
2211 int yynerrs
; /* number of parse errors so far */
2212 #endif /* not YYPURE */
2215 int yydebug
; /* nonzero means print parse trace */
2216 /* Since this is uninitialized, it does not stop multiple parsers
2220 /* YYINITDEPTH indicates the initial size of the parser's stacks */
2223 #define YYINITDEPTH 200
2226 /* YYMAXDEPTH is the maximum size the stacks can grow to
2227 (effective only if the built-in stack extension method is used). */
2234 #define YYMAXDEPTH 10000
2237 /* Prevent warning if -Wstrict-prototypes. */
2242 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
2243 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
2244 #else /* not GNU C or C++ */
2247 /* This is the most reliable way to avoid incompatibilities
2248 in available built-in functions on various systems. */
2250 __yy_memcpy (to
, from
, count
)
2255 register char *f
= from
;
2256 register char *t
= to
;
2257 register int i
= count
;
2263 #else /* __cplusplus */
2265 /* This is the most reliable way to avoid incompatibilities
2266 in available built-in functions on various systems. */
2268 __yy_memcpy (char *to
, char *from
, int count
)
2270 register char *f
= from
;
2271 register char *t
= to
;
2272 register int i
= count
;
2281 #line 196 "/usr/cygnus/gnupro-98r1/share/bison.simple"
2283 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
2284 into yyparse. The argument should have type void *.
2285 It should actually point to an object.
2286 Grammar actions can access the variable by casting it
2287 to the proper pointer type. */
2289 #ifdef YYPARSE_PARAM
2291 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
2292 #define YYPARSE_PARAM_DECL
2293 #else /* not __cplusplus */
2294 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
2295 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
2296 #endif /* not __cplusplus */
2297 #else /* not YYPARSE_PARAM */
2298 #define YYPARSE_PARAM_ARG
2299 #define YYPARSE_PARAM_DECL
2300 #endif /* not YYPARSE_PARAM */
2303 yyparse(YYPARSE_PARAM_ARG
)
2306 register int yystate
;
2308 register short *yyssp
;
2309 register YYSTYPE
*yyvsp
;
2310 int yyerrstatus
; /* number of tokens to shift before error messages enabled */
2311 int yychar1
= 0; /* lookahead token as an internal (translated) token number */
2313 short yyssa
[YYINITDEPTH
]; /* the state stack */
2314 YYSTYPE yyvsa
[YYINITDEPTH
]; /* the semantic value stack */
2316 short *yyss
= yyssa
; /* refer to the stacks thru separate pointers */
2317 YYSTYPE
*yyvs
= yyvsa
; /* to allow yyoverflow to reallocate them elsewhere */
2320 YYLTYPE yylsa
[YYINITDEPTH
]; /* the location stack */
2321 YYLTYPE
*yyls
= yylsa
;
2324 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
2326 #define YYPOPSTACK (yyvsp--, yyssp--)
2329 int yystacksize
= YYINITDEPTH
;
2340 YYSTYPE yyval
; /* the variable used to return */
2341 /* semantic values from the action */
2348 fprintf(stderr
, "Starting parse\n");
2354 yychar
= YYEMPTY
; /* Cause a token to be read. */
2356 /* Initialize stack pointers.
2357 Waste one element of value and location stack
2358 so that they stay on the same level as the state stack.
2359 The wasted elements are never initialized. */
2367 /* Push a new state, which is found in yystate . */
2368 /* In all cases, when you get here, the value and location stacks
2369 have just been pushed. so pushing a state here evens the stacks. */
2374 if (yyssp
>= yyss
+ yystacksize
- 1)
2376 /* Give user a chance to reallocate the stack */
2377 /* Use copies of these so that the &'s don't force the real ones into memory. */
2378 YYSTYPE
*yyvs1
= yyvs
;
2379 short *yyss1
= yyss
;
2381 YYLTYPE
*yyls1
= yyls
;
2384 /* Get the current used size of the three stacks, in elements. */
2385 int size
= yyssp
- yyss
+ 1;
2388 /* Each stack pointer address is followed by the size of
2389 the data in use in that stack, in bytes. */
2391 /* This used to be a conditional around just the two extra args,
2392 but that might be undefined if yyoverflow is a macro. */
2393 yyoverflow("parser stack overflow",
2394 &yyss1
, size
* sizeof (*yyssp
),
2395 &yyvs1
, size
* sizeof (*yyvsp
),
2396 &yyls1
, size
* sizeof (*yylsp
),
2399 yyoverflow("parser stack overflow",
2400 &yyss1
, size
* sizeof (*yyssp
),
2401 &yyvs1
, size
* sizeof (*yyvsp
),
2405 yyss
= yyss1
; yyvs
= yyvs1
;
2409 #else /* no yyoverflow */
2410 /* Extend the stack our own way. */
2411 if (yystacksize
>= YYMAXDEPTH
)
2413 yyerror("parser stack overflow");
2417 if (yystacksize
> YYMAXDEPTH
)
2418 yystacksize
= YYMAXDEPTH
;
2419 yyss
= (short *) alloca (yystacksize
* sizeof (*yyssp
));
2420 __yy_memcpy ((char *)yyss
, (char *)yyss1
, size
* sizeof (*yyssp
));
2421 yyvs
= (YYSTYPE
*) alloca (yystacksize
* sizeof (*yyvsp
));
2422 __yy_memcpy ((char *)yyvs
, (char *)yyvs1
, size
* sizeof (*yyvsp
));
2424 yyls
= (YYLTYPE
*) alloca (yystacksize
* sizeof (*yylsp
));
2425 __yy_memcpy ((char *)yyls
, (char *)yyls1
, size
* sizeof (*yylsp
));
2427 #endif /* no yyoverflow */
2429 yyssp
= yyss
+ size
- 1;
2430 yyvsp
= yyvs
+ size
- 1;
2432 yylsp
= yyls
+ size
- 1;
2437 fprintf(stderr
, "Stack size increased to %d\n", yystacksize
);
2440 if (yyssp
>= yyss
+ yystacksize
- 1)
2446 fprintf(stderr
, "Entering state %d\n", yystate
);
2452 /* Do appropriate processing given the current state. */
2453 /* Read a lookahead token if we need one and don't already have one. */
2456 /* First try to decide what to do without reference to lookahead token. */
2458 yyn
= yypact
[yystate
];
2462 /* Not known => get a lookahead token if don't already have one. */
2464 /* yychar is either YYEMPTY or YYEOF
2465 or a valid token in external form. */
2467 if (yychar
== YYEMPTY
)
2471 fprintf(stderr
, "Reading a token: ");
2476 /* Convert token to internal form (in yychar1) for indexing tables with */
2478 if (yychar
<= 0) /* This means end of input. */
2481 yychar
= YYEOF
; /* Don't call YYLEX any more */
2485 fprintf(stderr
, "Now at end of input.\n");
2490 yychar1
= YYTRANSLATE(yychar
);
2495 fprintf (stderr
, "Next token is %d (%s", yychar
, yytname
[yychar1
]);
2496 /* Give the individual parser a way to print the precise meaning
2497 of a token, for further debugging info. */
2499 YYPRINT (stderr
, yychar
, yylval
);
2501 fprintf (stderr
, ")\n");
2507 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != yychar1
)
2512 /* yyn is what to do for this token type in this state.
2513 Negative => reduce, -yyn is rule number.
2514 Positive => shift, yyn is new state.
2515 New state is final state => don't bother to shift,
2516 just return success.
2517 0, or most negative number => error. */
2532 /* Shift the lookahead token. */
2536 fprintf(stderr
, "Shifting token %d (%s), ", yychar
, yytname
[yychar1
]);
2539 /* Discard the token being shifted unless it is eof. */
2540 if (yychar
!= YYEOF
)
2548 /* count tokens shifted since error; after three, turn off error status. */
2549 if (yyerrstatus
) yyerrstatus
--;
2554 /* Do the default action for the current state. */
2557 yyn
= yydefact
[yystate
];
2561 /* Do a reduction. yyn is the number of a rule to reduce with. */
2565 yyval
= yyvsp
[1-yylen
]; /* implement default value of the action */
2572 fprintf (stderr
, "Reducing via rule %d (line %d), ",
2575 /* Print the symbols being reduced, and their result. */
2576 for (i
= yyprhs
[yyn
]; yyrhs
[i
] > 0; i
++)
2577 fprintf (stderr
, "%s ", yytname
[yyrhs
[i
]]);
2578 fprintf (stderr
, " -> %s\n", yytname
[yyr1
[yyn
]]);
2586 #line 253 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2590 #line 297 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2592 yyval
.node
= build_java_array_type (yyvsp
[-2].node
, -1);
2593 CLASS_LOADED_P (yyval
.node
) = 1;
2597 #line 302 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2598 { yyval
.node
= build_unresolved_array_type (yyvsp
[-2].node
); ;
2601 #line 304 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2602 { yyval
.node
= build_unresolved_array_type (yyvsp
[-2].node
); ;
2605 #line 306 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2606 {RULE ("']' expected"); RECOVER
;;
2609 #line 308 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2610 {RULE ("']' expected"); RECOVER
;;
2613 #line 323 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2614 { yyval
.node
= make_qualified_name (yyvsp
[-2].node
, yyvsp
[0].node
, yyvsp
[-1].operator.location
); ;
2617 #line 332 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2618 {yyval
.node
= NULL
;;
2621 #line 344 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2627 #line 348 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2633 #line 360 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2634 { ctxp
->package
= EXPR_WFL_NODE (yyvsp
[-1].node
); ;
2637 #line 362 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2638 {yyerror ("Missing name"); RECOVER
;;
2641 #line 364 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2642 {yyerror ("';' expected"); RECOVER
;;
2645 #line 374 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2647 tree name
= EXPR_WFL_NODE (yyvsp
[-1].node
), node
, last_name
;
2648 int i
= IDENTIFIER_LENGTH (name
)-1;
2649 char *last
= &IDENTIFIER_POINTER (name
)[i
];
2650 while (last
!= IDENTIFIER_POINTER (name
))
2652 if (last
[0] == '.')
2656 last_name
= get_identifier (++last
);
2657 if (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (last_name
))
2659 tree err
= find_name_in_single_imports (last_name
);
2660 if (err
&& err
!= name
)
2662 (yyvsp
[-1].node
, "Ambiguous class: `%s' and `%s'",
2663 IDENTIFIER_POINTER (name
),
2664 IDENTIFIER_POINTER (err
));
2668 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (last_name
) = 1;
2669 node
= build_tree_list (yyvsp
[-1].node
, last_name
);
2670 TREE_CHAIN (node
) = ctxp
->import_list
;
2671 ctxp
->import_list
= node
;
2676 #line 403 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2677 {yyerror ("Missing name"); RECOVER
;;
2680 #line 405 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2681 {yyerror ("';' expected"); RECOVER
;;
2684 #line 410 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2686 tree name
= EXPR_WFL_NODE (yyvsp
[-3].node
);
2687 tree node
= build_tree_list (yyvsp
[-3].node
, NULL_TREE
);
2688 if (!IS_AN_IMPORT_ON_DEMAND_P (name
))
2690 read_import_dir (yyvsp
[-3].node
);
2691 IS_AN_IMPORT_ON_DEMAND_P (name
) = 1;
2693 TREE_CHAIN (node
) = ctxp
->import_demand_list
;
2694 ctxp
->import_demand_list
= node
;
2698 #line 422 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2699 {yyerror ("'*' expected"); RECOVER
;;
2702 #line 424 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2703 {yyerror ("';' expected"); RECOVER
;;
2706 #line 429 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2708 maybe_generate_clinit ();
2709 yyval
.node
= yyvsp
[0].node
;
2713 #line 435 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2714 { yyval
.node
= NULL
; ;
2717 #line 437 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2720 yyerror ("Class or interface declaration expected");
2724 #line 448 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2726 yyval
.value
= (1 << yyvsp
[0].value
);
2730 #line 452 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2732 int acc
= (1 << yyvsp
[0].value
);
2733 if (yyval
.value
& acc
)
2735 (ctxp
->modifier_ctx
[yyvsp
[0].value
], "Modifier `%s' declared twice",
2736 java_accstring_lookup (acc
));
2744 #line 468 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2745 { create_class (yyvsp
[-4].value
, yyvsp
[-2].node
, yyvsp
[-1].node
, yyvsp
[0].node
); ;
2748 #line 470 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2750 yyval
.node
= yyvsp
[0].node
;
2754 #line 474 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2755 { create_class (0, yyvsp
[-2].node
, yyvsp
[-1].node
, yyvsp
[0].node
); ;
2758 #line 476 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2760 yyval
.node
= yyvsp
[0].node
;
2764 #line 480 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2765 {yyerror ("Missing class name"); RECOVER
;;
2768 #line 482 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2769 {yyerror ("Missing class name"); RECOVER
;;
2772 #line 484 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2773 {if (!ctxp
->class_err
) yyerror ("'{' expected"); DRECOVER(class1
);;
2776 #line 486 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2777 {if (!ctxp
->class_err
) yyerror ("'{' expected"); RECOVER
;;
2780 #line 490 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2781 { yyval
.node
= NULL
; ;
2784 #line 492 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2785 { yyval
.node
= yyvsp
[0].node
; ;
2788 #line 494 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2789 {yyerror ("'{' expected"); ctxp
->class_err
=1;;
2792 #line 496 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2793 {yyerror ("Missing super class name"); ctxp
->class_err
=1;;
2796 #line 500 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2797 { yyval
.node
= NULL_TREE
; ;
2800 #line 502 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2801 { yyval
.node
= yyvsp
[0].node
; ;
2804 #line 504 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2807 yyerror ("Missing interface name");
2811 #line 512 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2813 ctxp
->interface_number
= 1;
2814 yyval
.node
= build_tree_list (yyvsp
[0].node
, NULL_TREE
);
2818 #line 517 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2820 ctxp
->interface_number
++;
2821 yyval
.node
= chainon (yyvsp
[-2].node
, build_tree_list (yyvsp
[0].node
, NULL_TREE
));
2825 #line 522 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2826 {yyerror ("Missing interface name"); RECOVER
;;
2829 #line 527 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2830 { yyval
.node
= ctxp
->current_parsed_class
; ;
2833 #line 529 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2834 { yyval
.node
= ctxp
->current_parsed_class
; ;
2837 #line 554 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2838 { register_fields (0, yyvsp
[-2].node
, yyvsp
[-1].node
); ;
2841 #line 556 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2846 ("Illegal modifier `%s' for field declaration",
2847 yyvsp
[-3].value
, FIELD_MODIFIERS
);
2848 check_modifiers_consistency (yyvsp
[-3].value
);
2849 register_fields (yyvsp
[-3].value
, yyvsp
[-2].node
, yyvsp
[-1].node
);
2853 #line 571 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2854 { yyval
.node
= chainon (yyvsp
[-2].node
, yyvsp
[0].node
); ;
2857 #line 573 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2858 {yyerror ("Missing term"); RECOVER
;;
2861 #line 578 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2862 { yyval
.node
= build_tree_list (yyvsp
[0].node
, NULL_TREE
); ;
2865 #line 580 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2867 if (java_error_count
)
2868 yyvsp
[0].node
= NULL_TREE
;
2869 yyval
.node
= build_tree_list
2870 (yyvsp
[-2].node
, build_assignment (yyvsp
[-1].operator.token
, yyvsp
[-1].operator.location
, yyvsp
[-2].node
, yyvsp
[0].node
));
2874 #line 587 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2876 yyerror ("Missing variable initializer");
2877 yyval
.node
= build_tree_list (yyvsp
[-2].node
, NULL_TREE
);
2882 #line 593 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2884 yyerror ("';' expected");
2885 yyval
.node
= build_tree_list (yyvsp
[-3].node
, NULL_TREE
);
2890 #line 603 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2892 yyval
.node
= NULL
; /* FIXME */
2896 #line 607 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2897 {yyerror ("Invalid declaration"); DRECOVER(vdi
);;
2900 #line 609 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2901 {yyerror ("']' expected"); DRECOVER(vdi
);;
2904 #line 611 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2905 {yyerror ("Unbalanced ']'"); DRECOVER(vdi
);;
2908 #line 617 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2909 { yyval
.node
= NULL
; ;
2912 #line 623 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2914 current_function_decl
= yyvsp
[0].node
;
2915 source_start_java_method (current_function_decl
);
2919 #line 628 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2922 (DECL_FUNCTION_BODY (current_function_decl
)) = yyvsp
[0].node
;
2923 maybe_absorb_scoping_blocks ();
2924 exit_block (); /* Exit function's body. */
2926 /* Merge last line of the function with first line,
2927 directly in the function decl. It will be used to
2928 emit correct debug info. */
2929 DECL_SOURCE_LINE_MERGE (current_function_decl
,
2930 ctxp
->last_ccb_indent1
);
2934 #line 641 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2935 {YYNOT_TWICE
yyerror ("'{' expected"); RECOVER
;;
2938 #line 646 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2939 { yyval
.node
= method_header (0, yyvsp
[-2].node
, yyvsp
[-1].node
, NULL
); ;
2942 #line 648 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2943 { yyval
.node
= method_header (0, void_type_node
, yyvsp
[-1].node
, NULL
); ;
2946 #line 650 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2947 { yyval
.node
= method_header (yyvsp
[-3].value
, yyvsp
[-2].node
, yyvsp
[-1].node
, NULL
); ;
2950 #line 652 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2951 { yyval
.node
= method_header (yyvsp
[-3].value
, void_type_node
, yyvsp
[-1].node
, NULL
); ;
2954 #line 654 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2958 #line 656 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2962 #line 658 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2963 {yyerror ("Identifier expected"); RECOVER
;;
2966 #line 660 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2967 {yyerror ("Identifier expected"); RECOVER
;;
2970 #line 662 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2972 yyerror ("Invalid method declaration, return type required");
2977 #line 670 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2978 { yyval
.node
= method_declarator (yyvsp
[-2].node
, NULL_TREE
); ;
2981 #line 672 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2982 { yyval
.node
= method_declarator (yyvsp
[-3].node
, yyvsp
[-1].node
); ;
2985 #line 674 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2987 /* Issue a warning here: obsolete declaration. FIXME */
2988 yyval
.node
= NULL
; /* FIXME */
2992 #line 679 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2993 {yyerror ("')' expected"); DRECOVER(method_declarator
);;
2996 #line 681 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
2997 {yyerror ("']' expected"); RECOVER
;;
3000 #line 686 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3002 ctxp
->formal_parameter_number
= 1;
3006 #line 690 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3008 ctxp
->formal_parameter_number
+= 1;
3009 yyval
.node
= chainon (yyvsp
[-2].node
, yyvsp
[0].node
);
3013 #line 695 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3014 {yyerror ("Missing formal parameter term"); RECOVER
;;
3017 #line 700 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3019 yyval
.node
= build_tree_list (yyvsp
[0].node
, yyvsp
[-1].node
);
3023 #line 704 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3025 SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp
[-2].value
));
3026 yyval
.node
= NULL
; /* FIXME */
3030 #line 709 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3031 {yyerror ("Missing identifier"); RECOVER
;;
3034 #line 711 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3036 SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp
[-2].value
));
3037 yyerror ("Missing identifier"); RECOVER
;
3041 #line 720 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3042 {yyerror ("Missing class type term"); RECOVER
;;
3045 #line 727 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3046 {yyerror ("Missing class type term"); RECOVER
;;
3049 #line 734 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3050 { yyval
.node
= NULL_TREE
; ;
3053 #line 740 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3055 RULE ("STATIC_INITIALIZER");
3059 #line 744 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3061 RULE ("STATIC_INITIALIZER");
3065 #line 751 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3067 SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp
[0].value
));
3071 #line 763 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3073 RULE ("CONSTRUCTOR_DECLARATION");
3077 #line 767 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3079 SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp
[-3].value
));
3080 RULE ("CONSTRUCTOR_DECLARATION (modifier)");
3084 #line 773 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3086 RULE ("CONSTRUCTOR_DECLARATION");
3090 #line 778 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3092 SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp
[-4].value
));
3093 RULE ("CONSTRUCTOR_DECLARATION (modifier)");
3097 #line 806 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3098 {RULE ("explicit_constructor_invocation (X.super)");;
3101 #line 811 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3103 tree wfl
= build_wfl_node (this_identifier_node
, input_filename
, 0, 0);
3104 EXPR_WFL_LINECOL (wfl
) = yyvsp
[0].operator.location
;
3109 #line 817 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3111 tree wfl
= build_wfl_node (super_identifier_node
, input_filename
, 0, 0);
3112 EXPR_WFL_LINECOL (wfl
) = yyvsp
[0].operator.location
;
3117 #line 828 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3118 { create_interface (0, yyvsp
[0].node
, NULL_TREE
); ;
3121 #line 830 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3123 yyval
.node
= yyvsp
[0].node
;
3127 #line 834 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3128 { create_interface (yyvsp
[-2].value
, yyvsp
[0].node
, NULL_TREE
); ;
3131 #line 836 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3133 yyval
.node
= yyvsp
[0].node
;
3137 #line 840 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3138 { create_interface (0, yyvsp
[-1].node
, yyvsp
[0].node
); ;
3141 #line 842 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3143 yyval
.node
= yyvsp
[0].node
;
3147 #line 846 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3148 { create_interface (yyvsp
[-3].value
, yyvsp
[-1].node
, yyvsp
[0].node
); ;
3151 #line 848 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3153 yyval
.node
= yyvsp
[0].node
;
3157 #line 852 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3158 {yyerror ("(here)'{' expected"); RECOVER
;;
3161 #line 854 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3162 {yyerror ("(there)'{' expected"); RECOVER
;;
3165 #line 859 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3167 ctxp
->interface_number
= 1;
3168 yyval
.node
= build_tree_list (yyvsp
[0].node
, NULL_TREE
);
3172 #line 864 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3174 ctxp
->interface_number
++;
3175 yyval
.node
= chainon (yyvsp
[-2].node
, build_tree_list (yyvsp
[0].node
, NULL_TREE
));
3179 #line 869 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3180 {yyerror ("Invalid interface type"); RECOVER
;;
3183 #line 871 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3184 {yyerror ("Missing term"); RECOVER
;;
3187 #line 876 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3188 { yyval
.node
= NULL_TREE
; ;
3191 #line 878 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3192 { yyval
.node
= NULL_TREE
; ;
3195 #line 899 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3197 check_abstract_method_header (yyvsp
[-1].node
);
3198 current_function_decl
= NULL_TREE
; /* FIXME ? */
3202 #line 904 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3203 {yyerror ("';' expected"); RECOVER
;;
3206 #line 910 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3208 RULE ("ARRAY_INITIALIZER (empty)");
3212 #line 914 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3214 RULE ("ARRAY_INITIALIZER (variable)");
3218 #line 918 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3220 RULE ("ARRAY_INITIALIZER (,)");
3224 #line 922 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3226 RULE ("ARRAY_INITIALIZER (variable, ,)");
3230 #line 931 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3231 {yyerror ("Missing term"); RECOVER
;;
3234 #line 937 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3235 { yyval
.node
= size_zero_node
; ;
3238 #line 939 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3242 #line 942 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3244 maybe_absorb_scoping_blocks ();
3245 yyval
.node
= exit_block ();
3249 #line 956 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3250 { yyval
.node
= java_method_add_stmt (current_function_decl
, yyvsp
[0].node
); ;
3253 #line 966 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3254 { declare_local_variables (0, yyvsp
[-1].node
, yyvsp
[0].node
); ;
3257 #line 968 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3258 { declare_local_variables (yyvsp
[-2].value
, yyvsp
[-1].node
, yyvsp
[0].node
); ;
3261 #line 974 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3262 { RULE ("STATEMENT (labeled)"); ;
3265 #line 976 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3266 { RULE ("STATEMENT (if-then)"); ;
3269 #line 978 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3270 { RULE ("STATEMENT (if-then-else)"); ;
3273 #line 980 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3274 { RULE ("STATEMENT (while)"); ;
3277 #line 982 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3279 /* If the for loop is unlabeled, we must return the
3280 block it was defined it. It our last chance to
3281 get a hold on it. */
3282 if (!LOOP_HAS_LABEL_P (yyval
.node
))
3283 yyval
.node
= exit_block ();
3287 #line 994 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3288 { RULE ("NSI STATEMENT (labeled)"); ;
3291 #line 996 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3292 { RULE ("NSI STATEMENT (if-then-else)"); ;
3295 #line 998 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3296 { RULE ("NSI STATEMENT (while)"); ;
3299 #line 1000 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3300 { RULE ("NSI STATEMENT (for)"); ;
3303 #line 1005 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3304 { RULE ("STATEMENT (block)"); ;
3307 #line 1007 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3308 { RULE ("STATEMENT (empty)"); ;
3311 #line 1009 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3312 { RULE ("STATEMENT (expression)"); ;
3315 #line 1011 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3316 { RULE ("STATEMENT (switch)"); ;
3319 #line 1013 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3320 { RULE ("STATEMENT (do)"); ;
3323 #line 1015 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3324 { RULE ("STATEMENT (break)"); ;
3327 #line 1017 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3328 { RULE ("STATEMENT (continue)"); ;
3331 #line 1020 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3332 { RULE ("STATEMENT (synchronized)"); ;
3335 #line 1022 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3336 { RULE ("STATEMENT (throw)"); ;
3339 #line 1024 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3340 { RULE ("STATEMENT (try)"); ;
3343 #line 1029 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3344 { yyval
.node
= size_zero_node
; ;
3347 #line 1034 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3349 yyval
.node
= build_labeled_block (EXPR_WFL_LINECOL (yyvsp
[-1].node
),
3350 EXPR_WFL_NODE (yyvsp
[-1].node
), yyvsp
[-1].node
);
3352 push_labeled_block (yyval
.node
);
3353 PUSH_LABELED_BLOCK (yyval
.node
);
3357 #line 1045 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3359 yyval
.node
= complete_labeled_statement (yyvsp
[-1].node
, yyvsp
[0].node
);
3360 pop_labeled_block ();
3361 POP_LABELED_BLOCK ();
3365 #line 1051 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3366 {yyerror ("':' expected"); RECOVER
;;
3369 #line 1056 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3371 yyval
.node
= complete_labeled_statement (yyvsp
[-1].node
, yyvsp
[0].node
);
3372 pop_labeled_block ();
3373 POP_LABELED_BLOCK ();
3377 #line 1067 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3379 /* We have a statement. Generate a WFL around it so
3381 yyval
.node
= build_expr_wfl (yyvsp
[-1].node
, input_filename
, lineno
, 0);
3382 /* We know we have a statement, so set the debug
3383 info to be eventually generate here. */
3384 yyval
.node
= JAVA_MAYBE_GENERATE_DEBUG_INFO (yyval
.node
);
3388 #line 1076 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3390 if (ctxp
->prevent_ese
!= lineno
)
3391 yyerror ("Invalid expression statement");
3392 DRECOVER (expr_stmt
);
3396 #line 1082 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3398 if (ctxp
->prevent_ese
!= lineno
)
3399 yyerror ("Invalid expression statement");
3400 DRECOVER (expr_stmt
);
3404 #line 1088 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3406 if (ctxp
->prevent_ese
!= lineno
)
3407 yyerror ("Invalid expression statement");
3408 DRECOVER (expr_stmt
);
3412 #line 1094 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3413 {yyerror ("')' expected"); RECOVER
;;
3416 #line 1096 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3417 {yyerror ("';' expected"); RECOVER
;;
3420 #line 1098 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3421 {yyerror ("')' expected"); RECOVER
;;
3424 #line 1100 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3425 {yyerror ("';' expected"); RECOVER
;;
3428 #line 1102 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3429 {yyerror ("'(' expected"); RECOVER
;;
3432 #line 1104 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3433 {yyerror ("')' expected"); RECOVER
;;
3436 #line 1106 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3437 {yyerror ("')' expected"); RECOVER
;;
3440 #line 1108 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3441 {yyerror ("';' expected"); RECOVER
;;
3444 #line 1110 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3445 {yyerror ("';' expected"); RECOVER
;;
3448 #line 1116 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3450 RULE ("++INCREMENT");
3454 #line 1120 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3456 RULE ("--DECREMENT");
3460 #line 1124 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3462 RULE ("INCREMENT++");
3466 #line 1128 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3468 RULE ("DECREMENT--");
3472 #line 1133 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3474 RULE ("INSTANCE CREATION");
3478 #line 1140 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3479 { yyval
.node
= build_if_else_statement (yyvsp
[-3].operator.location
, yyvsp
[-2].node
, yyvsp
[0].node
, NULL_TREE
); ;
3482 #line 1142 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3483 {yyerror ("'(' expected"); RECOVER
;;
3486 #line 1144 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3487 {yyerror ("Missing term"); RECOVER
;;
3490 #line 1146 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3491 {yyerror ("')' expected"); RECOVER
;;
3494 #line 1151 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3495 { yyval
.node
= build_if_else_statement (yyvsp
[-5].operator.location
, yyvsp
[-4].node
, yyvsp
[-2].node
, yyvsp
[0].node
); ;
3498 #line 1156 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3499 { yyval
.node
= build_if_else_statement (yyvsp
[-5].operator.location
, yyvsp
[-4].node
, yyvsp
[-2].node
, yyvsp
[0].node
); ;
3502 #line 1162 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3503 {yyerror ("'(' expected"); RECOVER
;;
3506 #line 1164 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3507 {yyerror ("Missing term or ')'"); DRECOVER(switch_statement
);;
3510 #line 1166 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3511 {yyerror ("'{' expected"); RECOVER
;;
3514 #line 1195 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3515 {yyerror ("Missing or invalid constant expression"); RECOVER
;;
3518 #line 1197 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3519 {yyerror ("':' expected"); RECOVER
;;
3522 #line 1199 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3523 {yyerror ("':' expected"); RECOVER
;;
3526 #line 1204 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3528 tree body
= build_loop_body (yyvsp
[-2].operator.location
, yyvsp
[-1].node
, 0);
3529 yyval
.node
= build_new_loop (body
);
3533 #line 1212 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3534 { yyval
.node
= complete_loop_body (0, NULL_TREE
, yyvsp
[0].node
, 0); ;
3537 #line 1214 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3538 {YYERROR_NOW
; yyerror ("'(' expected"); RECOVER
;;
3541 #line 1216 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3542 {yyerror ("Missing term and ')' expected"); RECOVER
;;
3545 #line 1218 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3546 {yyerror ("')' expected"); RECOVER
;;
3549 #line 1223 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3550 { yyval
.node
= complete_loop_body (0, NULL_TREE
, yyvsp
[0].node
, 0); ;
3553 #line 1228 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3555 tree body
= build_loop_body (0, NULL_TREE
, 1);
3556 yyval
.node
= build_new_loop (body
);
3560 #line 1237 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3561 { yyval
.node
= complete_loop_body (yyvsp
[-3].operator.location
, yyvsp
[-2].node
, yyvsp
[-5].node
, 1); ;
3564 #line 1242 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3565 { yyval
.node
= complete_for_loop (EXPR_WFL_LINECOL (yyvsp
[-4].node
), yyvsp
[-4].node
, yyvsp
[-2].node
, yyvsp
[0].node
);;
3568 #line 1244 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3570 yyval
.node
= complete_for_loop (0, NULL_TREE
, yyvsp
[-2].node
, yyvsp
[0].node
);
3571 /* We have not condition, so we get rid of the EXIT_EXPR */
3572 LOOP_EXPR_BODY_CONDITION_EXPR (LOOP_EXPR_BODY (yyval
.node
), 0) =
3577 #line 1251 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3578 {yyerror ("Invalid control expression"); RECOVER
;;
3581 #line 1253 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3582 {yyerror ("Invalid update expression"); RECOVER
;;
3585 #line 1255 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3586 {yyerror ("Invalid update expression"); RECOVER
;;
3589 #line 1260 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3590 { yyval
.node
= complete_for_loop (EXPR_WFL_LINECOL (yyvsp
[-4].node
), yyvsp
[-4].node
, yyvsp
[-2].node
, yyvsp
[0].node
);;
3593 #line 1262 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3595 yyval
.node
= complete_for_loop (0, NULL_TREE
, yyvsp
[-2].node
, yyvsp
[0].node
);
3596 /* We have not condition, so we get rid of the EXIT_EXPR */
3597 LOOP_EXPR_BODY_CONDITION_EXPR (LOOP_EXPR_BODY (yyval
.node
), 0) =
3602 #line 1272 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3604 /* This scope defined for local variable that may be
3605 defined within the scope of the for loop */
3610 #line 1278 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3611 {yyerror ("'(' expected"); DRECOVER(for_1
);;
3614 #line 1280 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3615 {yyerror ("Invalid init statement"); RECOVER
;;
3618 #line 1285 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3620 /* We now declare the loop body. The loop is
3621 declared as a for loop. */
3622 tree body
= build_loop_body (0, NULL_TREE
, 0);
3623 yyval
.node
= build_new_loop (body
);
3624 IS_FOR_LOOP_P (yyval
.node
) = 1;
3625 /* The loop is added to the current block the for
3626 statement is defined within */
3627 java_method_add_stmt (current_function_decl
, yyval
.node
);
3631 #line 1297 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3632 { yyval
.node
= size_zero_node
; ;
3635 #line 1299 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3637 /* Init statement recorded within the previously
3638 defined block scope */
3639 yyval
.node
= java_method_add_stmt (current_function_decl
, yyvsp
[0].node
);
3643 #line 1305 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3645 /* Local variable are recorded within the previously
3646 defined block scope */
3647 yyval
.node
= NULL_TREE
;
3651 #line 1311 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3652 {yyerror ("';' expected"); DRECOVER(for_init_1
);;
3655 #line 1315 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3656 {yyval
.node
= size_zero_node
;;
3659 #line 1317 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3660 { yyval
.node
= build_debugable_stmt (BUILD_LOCATION (), yyvsp
[0].node
); ;
3663 #line 1322 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3664 { yyval
.node
= add_stmt_to_compound (NULL_TREE
, NULL_TREE
, yyvsp
[0].node
); ;
3667 #line 1324 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3668 { yyval
.node
= add_stmt_to_compound (yyvsp
[-2].node
, NULL_TREE
, yyvsp
[0].node
); ;
3671 #line 1326 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3672 {yyerror ("Missing term"); RECOVER
;;
3675 #line 1331 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3676 { yyval
.node
= build_bc_statement (yyvsp
[-1].operator.location
, 1, NULL_TREE
); ;
3679 #line 1333 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3680 { yyval
.node
= build_bc_statement (yyvsp
[-2].operator.location
, 1, yyvsp
[-1].node
); ;
3683 #line 1335 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3684 {yyerror ("Missing term"); RECOVER
;;
3687 #line 1337 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3688 {yyerror ("';' expected"); RECOVER
;;
3691 #line 1342 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3692 { yyval
.node
= build_bc_statement (yyvsp
[-1].operator.location
, 0, NULL_TREE
); ;
3695 #line 1344 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3696 { yyval
.node
= build_bc_statement (yyvsp
[-2].operator.location
, 0, yyvsp
[-1].node
); ;
3699 #line 1346 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3700 {yyerror ("Missing term"); RECOVER
;;
3703 #line 1348 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3704 {yyerror ("';' expected"); RECOVER
;;
3707 #line 1353 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3708 { yyval
.node
= build_return (yyvsp
[-1].operator.location
, NULL_TREE
); ;
3711 #line 1355 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3712 { yyval
.node
= build_return (yyvsp
[-2].operator.location
, yyvsp
[-1].node
); ;
3715 #line 1357 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3716 {yyerror ("Missing term"); RECOVER
;;
3719 #line 1359 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3720 {yyerror ("';' expected"); RECOVER
;;
3723 #line 1365 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3724 {yyerror ("Missing term"); RECOVER
;;
3727 #line 1367 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3728 {yyerror ("';' expected"); RECOVER
;;
3731 #line 1373 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3732 {yyerror ("'{' expected"); RECOVER
;;
3735 #line 1375 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3736 {yyerror ("'(' expected"); RECOVER
;;
3739 #line 1377 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3740 {yyerror ("Missing term"); RECOVER
;;
3743 #line 1379 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3744 {yyerror ("Missing term"); RECOVER
;;
3747 #line 1384 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3749 SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp
[0].value
));
3753 #line 1394 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3754 {yyerror ("'{' expected"); DRECOVER (try_statement
);;
3757 #line 1405 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3758 {yyerror ("'(' expected"); RECOVER
;;
3761 #line 1407 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3762 {yyerror ("Missing term"); DRECOVER (1);;
3765 #line 1409 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3766 {yyerror ("Missing term"); DRECOVER (2);;
3769 #line 1415 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3770 {yyerror ("'{' expected"); RECOVER
; ;
3773 #line 1427 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3774 { yyval
.node
= build_this (yyvsp
[0].operator.location
); ;
3777 #line 1429 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3778 {yyval
.node
= yyvsp
[-1].node
;;
3781 #line 1445 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3782 {yyerror ("')' expected"); RECOVER
;;
3785 #line 1447 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3786 {yyerror ("'class' or 'this' expected" ); RECOVER
;;
3789 #line 1449 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3790 {yyerror ("'class' expected" ); RECOVER
;;
3793 #line 1451 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3794 {yyerror ("'class' expected" ); RECOVER
;;
3797 #line 1456 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3799 yyval
.node
= build_method_invocation (yyvsp
[-3].node
, yyvsp
[-1].node
);
3800 TREE_SET_CODE (yyval
.node
, JAVA_NEW_CLASS_EXPR
);
3804 #line 1461 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3806 yyval
.node
= build_method_invocation (yyvsp
[-2].node
, NULL_TREE
);
3807 TREE_SET_CODE (yyval
.node
, JAVA_NEW_CLASS_EXPR
);
3811 #line 1469 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3812 {yyval
.node
= yyvsp
[-4].node
;;
3815 #line 1471 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3816 {yyval
.node
= yyvsp
[-3].node
;;
3819 #line 1480 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3820 {yyerror ("'(' expected"); DRECOVER(new_1
);;
3823 #line 1482 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3824 {yyerror ("'(' expected"); RECOVER
;;
3827 #line 1484 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3828 {yyerror ("')' or term expected"); RECOVER
;;
3831 #line 1486 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3832 {yyerror ("')' expected"); RECOVER
;;
3835 #line 1488 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3836 {YYERROR_NOW
; yyerror ("Identifier expected"); RECOVER
;;
3839 #line 1490 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3840 {yyerror ("'(' expected"); RECOVER
;;
3843 #line 1500 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3845 yyval
.node
= tree_cons (NULL_TREE
, yyvsp
[0].node
, NULL_TREE
);
3846 ctxp
->formal_parameter_number
= 1;
3850 #line 1505 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3852 ctxp
->formal_parameter_number
+= 1;
3853 yyval
.node
= tree_cons (NULL_TREE
, yyvsp
[0].node
, yyvsp
[-2].node
);
3857 #line 1510 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3858 {yyerror ("Missing term"); RECOVER
;;
3861 #line 1515 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3862 { yyval
.node
= build_newarray_node (yyvsp
[-1].node
, yyvsp
[0].node
, 0); ;
3865 #line 1517 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3866 { yyval
.node
= build_newarray_node (yyvsp
[-1].node
, yyvsp
[0].node
, 0); ;
3869 #line 1519 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3870 { yyval
.node
= build_newarray_node (yyvsp
[-2].node
, yyvsp
[-1].node
, ctxp
->osb_number
); ;
3873 #line 1521 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3874 { yyval
.node
= build_newarray_node (yyvsp
[-2].node
, yyvsp
[-1].node
, ctxp
->osb_number
); ;
3877 #line 1525 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3878 {yyval
.node
= yyvsp
[-2].node
;;
3881 #line 1527 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3882 {yyval
.node
= yyvsp
[-2].node
;;
3885 #line 1529 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3886 {yyerror ("'[' expected"); DRECOVER ("]");;
3889 #line 1531 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3890 {yyerror ("']' expected"); RECOVER
;;
3893 #line 1536 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3894 { yyval
.node
= build_tree_list (NULL_TREE
, yyvsp
[0].node
); ;
3897 #line 1538 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3898 { yyval
.node
= tree_cons (NULL_TREE
, yyvsp
[0].node
, yyval
.node
); ;
3901 #line 1543 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3903 EXPR_WFL_LINECOL (yyvsp
[-1].node
) = yyvsp
[-2].operator.location
;
3904 yyval
.node
= yyvsp
[-1].node
;
3908 #line 1548 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3909 {yyerror ("']' expected"); RECOVER
;;
3912 #line 1550 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3914 yyerror ("Missing term");
3915 yyerror ("']' expected");
3920 #line 1559 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3921 { ctxp
->osb_number
= 1; ;
3924 #line 1561 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3925 { ctxp
->osb_number
++; ;
3928 #line 1563 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3929 { yyerror ("']' expected"); RECOVER
;;
3932 #line 1568 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3933 { yyval
.node
= make_qualified_primary (yyvsp
[-2].node
, yyvsp
[0].node
, yyvsp
[-1].operator.location
); ;
3936 #line 1570 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3939 build_wfl_node (super_identifier_node
, input_filename
, 0, 0);
3940 EXPR_WFL_LINECOL (super_wfl
) = yyvsp
[-2].operator.location
;
3941 yyval
.node
= make_qualified_name (super_wfl
, yyvsp
[0].node
, yyvsp
[-1].operator.location
);
3945 #line 1577 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3946 {yyerror ("Field expected"); DRECOVER (super_field_acces
);;
3949 #line 1582 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3950 { yyval
.node
= build_method_invocation (yyvsp
[-2].node
, NULL_TREE
); ;
3953 #line 1584 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3954 { yyval
.node
= build_method_invocation (yyvsp
[-3].node
, yyvsp
[-1].node
); ;
3957 #line 1586 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3959 tree invok
= build_method_invocation (yyvsp
[-2].node
, NULL_TREE
);
3960 yyval
.node
= make_qualified_primary (yyvsp
[-4].node
, invok
, yyvsp
[-3].operator.location
);
3964 #line 1591 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3966 tree invok
= build_method_invocation (yyvsp
[-3].node
, yyvsp
[-1].node
);
3967 yyval
.node
= make_qualified_primary (yyvsp
[-5].node
, invok
, yyvsp
[-4].operator.location
);
3971 #line 1596 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3974 tree wfl
= build_wfl_node (super_identifier_node
, input_filename
, 0, 0);
3975 EXPR_WFL_LINECOL (wfl
) = yyvsp
[-4].operator.location
;
3976 invok
= build_method_invocation (yyvsp
[-2].node
, NULL_TREE
);
3977 yyval
.node
= make_qualified_primary (wfl
, invok
, yyvsp
[-3].operator.location
);
3981 #line 1604 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3984 tree wfl
= build_wfl_node (super_identifier_node
, input_filename
, 0, 0);
3985 EXPR_WFL_LINECOL (wfl
) = yyvsp
[-5].operator.location
;
3986 invok
= build_method_invocation (yyvsp
[-3].node
, yyvsp
[-1].node
);
3987 yyval
.node
= make_qualified_primary (wfl
, invok
, yyvsp
[-4].operator.location
);
3991 #line 1616 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3992 { yyerror ("'(' expected"); DRECOVER (method_invocation
); ;
3995 #line 1618 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
3996 { yyerror ("'(' expected"); DRECOVER (method_invocation
); ;
3999 #line 1623 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4000 { yyval
.node
= build_array_ref (yyvsp
[-2].operator.location
, yyvsp
[-3].node
, yyvsp
[-1].node
); ;
4003 #line 1625 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4004 { yyval
.node
= build_array_ref (yyvsp
[-2].operator.location
, yyvsp
[-3].node
, yyvsp
[-1].node
); ;
4007 #line 1627 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4009 yyerror ("Missing term and ']' expected");
4010 DRECOVER(array_access
);
4014 #line 1632 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4016 yyerror ("']' expected");
4017 DRECOVER(array_access
);
4021 #line 1637 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4023 yyerror ("Missing term and ']' expected");
4024 DRECOVER(array_access
);
4028 #line 1642 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4030 yyerror ("']' expected");
4031 DRECOVER(array_access
);
4035 #line 1657 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4036 { yyval
.node
= build_incdec (yyvsp
[0].operator.token
, yyvsp
[0].operator.location
, yyvsp
[-1].node
, 1); ;
4039 #line 1662 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4040 { yyval
.node
= build_incdec (yyvsp
[0].operator.token
, yyvsp
[0].operator.location
, yyvsp
[-1].node
, 1); ;
4043 #line 1669 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4044 {yyval
.node
= build_unaryop (yyvsp
[-1].operator.token
, yyvsp
[-1].operator.location
, yyvsp
[0].node
); ;
4047 #line 1671 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4048 {yyval
.node
= build_unaryop (yyvsp
[-1].operator.token
, yyvsp
[-1].operator.location
, yyvsp
[0].node
); ;
4051 #line 1674 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4052 {yyerror ("Missing term"); RECOVER
;
4055 #line 1676 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4056 {yyerror ("Missing term"); RECOVER
;
4059 #line 1681 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4060 {yyval
.node
= build_incdec (yyvsp
[-1].operator.token
, yyvsp
[-1].operator.location
, yyvsp
[0].node
, 0); ;
4063 #line 1683 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4064 {yyerror ("Missing term"); RECOVER
;
4067 #line 1688 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4068 {yyval
.node
= build_incdec (yyvsp
[-1].operator.token
, yyvsp
[-1].operator.location
, yyvsp
[0].node
, 0); ;
4071 #line 1690 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4072 {yyerror ("Missing term"); RECOVER
;
4075 #line 1696 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4076 {yyval
.node
= build_unaryop (yyvsp
[-1].operator.token
, yyvsp
[-1].operator.location
, yyvsp
[0].node
); ;
4079 #line 1698 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4080 {yyval
.node
= build_unaryop (yyvsp
[-1].operator.token
, yyvsp
[-1].operator.location
, yyvsp
[0].node
); ;
4083 #line 1701 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4084 {yyerror ("Missing term"); RECOVER
;
4087 #line 1703 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4088 {yyerror ("Missing term"); RECOVER
;
4091 #line 1708 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4093 tree type
= yyvsp
[-3].node
;
4094 while (ctxp
->osb_number
--)
4095 type
= build_java_array_type (type
, -1);
4096 yyval
.node
= build_cast (yyvsp
[-4].operator.location
, type
, yyvsp
[0].node
);
4100 #line 1715 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4101 { yyval
.node
= build_cast (yyvsp
[-3].operator.location
, yyvsp
[-2].node
, yyvsp
[0].node
); ;
4104 #line 1717 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4105 { yyval
.node
= build_cast (yyvsp
[-3].operator.location
, yyvsp
[-2].node
, yyvsp
[0].node
); ;
4108 #line 1719 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4111 while (ctxp
->osb_number
--)
4112 obstack_1grow (&temporary_obstack
, '[');
4113 obstack_grow0 (&temporary_obstack
,
4114 IDENTIFIER_POINTER (EXPR_WFL_NODE (yyvsp
[-3].node
)),
4115 IDENTIFIER_LENGTH (EXPR_WFL_NODE (yyvsp
[-3].node
)));
4116 ptr
= obstack_finish (&temporary_obstack
);
4117 EXPR_WFL_NODE (yyvsp
[-3].node
) = get_identifier (ptr
);
4118 yyval
.node
= build_cast (yyvsp
[-4].operator.location
, yyvsp
[-3].node
, yyvsp
[0].node
);
4122 #line 1731 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4123 {yyerror ("']' expected, invalid type expression");;
4126 #line 1733 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4128 if (ctxp
->prevent_ese
!= lineno
)
4129 yyerror ("Invalid type expression"); RECOVER
;
4134 #line 1739 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4135 {yyerror ("Missing term"); RECOVER
;;
4138 #line 1741 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4139 {yyerror ("Missing term"); RECOVER
;;
4142 #line 1743 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4143 {yyerror ("Missing term"); RECOVER
;;
4146 #line 1749 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4148 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
),
4149 yyvsp
[-1].operator.location
, yyvsp
[-2].node
, yyvsp
[0].node
);
4153 #line 1754 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4155 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4156 yyvsp
[-2].node
, yyvsp
[0].node
);
4160 #line 1759 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4162 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4163 yyvsp
[-2].node
, yyvsp
[0].node
);
4167 #line 1764 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4168 {yyerror ("Missing term"); RECOVER
;;
4171 #line 1766 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4172 {yyerror ("Missing term"); RECOVER
;;
4175 #line 1768 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4176 {yyerror ("Missing term"); RECOVER
;;
4179 #line 1774 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4181 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4182 yyvsp
[-2].node
, yyvsp
[0].node
);
4186 #line 1779 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4188 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4189 yyvsp
[-2].node
, yyvsp
[0].node
);
4193 #line 1784 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4194 {yyerror ("Missing term"); RECOVER
;;
4197 #line 1786 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4198 {yyerror ("Missing term"); RECOVER
;;
4201 #line 1792 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4203 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4204 yyvsp
[-2].node
, yyvsp
[0].node
);
4208 #line 1797 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4210 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4211 yyvsp
[-2].node
, yyvsp
[0].node
);
4215 #line 1802 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4217 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4218 yyvsp
[-2].node
, yyvsp
[0].node
);
4222 #line 1807 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4223 {yyerror ("Missing term"); RECOVER
;;
4226 #line 1809 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4227 {yyerror ("Missing term"); RECOVER
;;
4230 #line 1811 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4231 {yyerror ("Missing term"); RECOVER
;;
4234 #line 1817 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4236 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4237 yyvsp
[-2].node
, yyvsp
[0].node
);
4241 #line 1822 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4243 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4244 yyvsp
[-2].node
, yyvsp
[0].node
);
4248 #line 1827 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4250 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4251 yyvsp
[-2].node
, yyvsp
[0].node
);
4255 #line 1832 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4257 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4258 yyvsp
[-2].node
, yyvsp
[0].node
);
4262 #line 1838 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4263 {yyerror ("Missing term"); RECOVER
;;
4266 #line 1840 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4267 {yyerror ("Missing term"); RECOVER
;;
4270 #line 1842 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4271 {yyerror ("Missing term"); RECOVER
;;
4274 #line 1844 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4275 {yyerror ("Missing term"); RECOVER
;;
4278 #line 1846 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4279 {yyerror ("Invalid reference type"); RECOVER
;;
4282 #line 1852 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4284 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4285 yyvsp
[-2].node
, yyvsp
[0].node
);
4289 #line 1857 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4291 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4292 yyvsp
[-2].node
, yyvsp
[0].node
);
4296 #line 1862 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4297 {yyerror ("Missing term"); RECOVER
;;
4300 #line 1864 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4301 {yyerror ("Missing term"); RECOVER
;;
4304 #line 1870 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4306 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4307 yyvsp
[-2].node
, yyvsp
[0].node
);
4311 #line 1875 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4312 {yyerror ("Missing term"); RECOVER
;;
4315 #line 1881 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4317 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4318 yyvsp
[-2].node
, yyvsp
[0].node
);
4322 #line 1886 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4323 {yyerror ("Missing term"); RECOVER
;;
4326 #line 1892 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4328 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4329 yyvsp
[-2].node
, yyvsp
[0].node
);
4333 #line 1897 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4334 {yyerror ("Missing term"); RECOVER
;;
4337 #line 1903 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4339 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4340 yyvsp
[-2].node
, yyvsp
[0].node
);
4344 #line 1908 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4345 {yyerror ("Missing term"); RECOVER
;;
4348 #line 1914 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4350 yyval
.node
= build_binop (BINOP_LOOKUP (yyvsp
[-1].operator.token
), yyvsp
[-1].operator.location
,
4351 yyvsp
[-2].node
, yyvsp
[0].node
);
4355 #line 1919 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4356 {yyerror ("Missing term"); RECOVER
;;
4359 #line 1926 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4362 yyerror ("Missing term");
4367 #line 1932 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4368 {yyerror ("Missing term"); DRECOVER (2);;
4371 #line 1934 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4372 {yyerror ("Missing term"); DRECOVER (3);;
4375 #line 1944 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4376 { yyval
.node
= build_assignment (yyvsp
[-1].operator.token
, yyvsp
[-1].operator.location
, yyvsp
[-2].node
, yyvsp
[0].node
); ;
4379 #line 1946 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4381 if (ctxp
->prevent_ese
!= lineno
)
4382 yyerror ("Missing term");
4387 /* the action file gets copied in in place of this dollarsign */
4388 #line 498 "/usr/cygnus/gnupro-98r1/share/bison.simple"
4399 short *ssp1
= yyss
- 1;
4400 fprintf (stderr
, "state stack now");
4401 while (ssp1
!= yyssp
)
4402 fprintf (stderr
, " %d", *++ssp1
);
4403 fprintf (stderr
, "\n");
4413 yylsp
->first_line
= yylloc
.first_line
;
4414 yylsp
->first_column
= yylloc
.first_column
;
4415 yylsp
->last_line
= (yylsp
-1)->last_line
;
4416 yylsp
->last_column
= (yylsp
-1)->last_column
;
4421 yylsp
->last_line
= (yylsp
+yylen
-1)->last_line
;
4422 yylsp
->last_column
= (yylsp
+yylen
-1)->last_column
;
4426 /* Now "shift" the result of the reduction.
4427 Determine what state that goes to,
4428 based on the state we popped back to
4429 and the rule number reduced by. */
4433 yystate
= yypgoto
[yyn
- YYNTBASE
] + *yyssp
;
4434 if (yystate
>= 0 && yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
4435 yystate
= yytable
[yystate
];
4437 yystate
= yydefgoto
[yyn
- YYNTBASE
];
4441 yyerrlab
: /* here on detecting error */
4444 /* If not already recovering from an error, report this error. */
4448 #ifdef YYERROR_VERBOSE
4449 yyn
= yypact
[yystate
];
4451 if (yyn
> YYFLAG
&& yyn
< YYLAST
)
4458 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
4459 for (x
= (yyn
< 0 ? -yyn
: 0);
4460 x
< (sizeof(yytname
) / sizeof(char *)); x
++)
4461 if (yycheck
[x
+ yyn
] == x
)
4462 size
+= strlen(yytname
[x
]) + 15, count
++;
4463 msg
= (char *) malloc(size
+ 15);
4466 strcpy(msg
, "parse error");
4471 for (x
= (yyn
< 0 ? -yyn
: 0);
4472 x
< (sizeof(yytname
) / sizeof(char *)); x
++)
4473 if (yycheck
[x
+ yyn
] == x
)
4475 strcat(msg
, count
== 0 ? ", expecting `" : " or `");
4476 strcat(msg
, yytname
[x
]);
4485 yyerror ("parse error; also virtual memory exceeded");
4488 #endif /* YYERROR_VERBOSE */
4489 yyerror("parse error");
4493 yyerrlab1
: /* here on error raised explicitly by an action */
4495 if (yyerrstatus
== 3)
4497 /* if just tried and failed to reuse lookahead token after an error, discard it. */
4499 /* return failure if at end of input */
4500 if (yychar
== YYEOF
)
4505 fprintf(stderr
, "Discarding token %d (%s).\n", yychar
, yytname
[yychar1
]);
4511 /* Else will try to reuse lookahead token
4512 after shifting the error token. */
4514 yyerrstatus
= 3; /* Each real token shifted decrements this */
4518 yyerrdefault
: /* current state does not do anything special for the error token. */
4521 /* This is wrong; only states that explicitly want error tokens
4522 should shift them. */
4523 yyn
= yydefact
[yystate
]; /* If its default is to accept any token, ok. Otherwise pop it.*/
4524 if (yyn
) goto yydefault
;
4527 yyerrpop
: /* pop the current state because it cannot handle the error token */
4529 if (yyssp
== yyss
) YYABORT
;
4539 short *ssp1
= yyss
- 1;
4540 fprintf (stderr
, "Error: state stack now");
4541 while (ssp1
!= yyssp
)
4542 fprintf (stderr
, " %d", *++ssp1
);
4543 fprintf (stderr
, "\n");
4549 yyn
= yypact
[yystate
];
4554 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != YYTERROR
)
4573 fprintf(stderr
, "Shifting error token, ");
4584 #line 1972 "/nfs/hoser/beer/java/egcs/gcc/java/parse.y"
4590 /* Flag for the error report routine to issue the error the first time
4591 it's called (overriding the default behavior which is to drop the
4592 first invocation and honor the second one, taking advantage of a
4594 static int force_error
= 0;
4596 /* Create a new parser context and make it the current one. */
4599 java_push_parser_context ()
4601 struct parser_ctxt
*new =
4602 (struct parser_ctxt
*)malloc(sizeof (struct parser_ctxt
));
4604 bzero (new, sizeof (struct parser_ctxt
));
4608 ctxp
->incomplete_class
= ctxp
->next
->incomplete_class
;
4612 java_parser_context_save_global ()
4614 ctxp
->finput
= finput
;
4615 ctxp
->lineno
= lineno
;
4616 ctxp
->current_class
= current_class
;
4617 ctxp
->filename
= input_filename
;
4618 ctxp
->current_function_decl
= current_function_decl
;
4622 java_parser_context_restore_global ()
4624 finput
= ctxp
->finput
;
4625 lineno
= ctxp
->lineno
;
4626 current_class
= ctxp
->current_class
;
4627 input_filename
= ctxp
->filename
;
4628 current_function_decl
= ctxp
->current_function_decl
;
4632 java_pop_parser_context ()
4635 struct parser_ctxt
*toFree
= ctxp
;
4636 struct parser_ctxt
*next
= ctxp
->next
;
4640 next
->incomplete_class
= ctxp
->incomplete_class
;
4641 lineno
= ctxp
->lineno
;
4642 finput
= ctxp
->finput
;
4643 current_class
= ctxp
->current_class
;
4646 /* Set the single import class file flag to 0 for the current list
4647 of imported things */
4648 for (current
= ctxp
->import_list
; current
; current
= TREE_CHAIN (current
))
4649 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (TREE_PURPOSE (current
)) = 0;
4651 /* And restore those of the previous context */
4653 for (current
= ctxp
->import_list
; current
; current
= TREE_CHAIN (current
))
4654 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (TREE_PURPOSE (current
)) = 1;
4659 static int do_warning
= 0;
4666 static int prev_lineno
;
4667 static char *prev_msg
;
4670 char *remainder
, *code_from_source
;
4671 extern struct obstack temporary_obstack
;
4673 if (!force_error
&& prev_lineno
== lineno
)
4676 /* Save current error location but report latter, when the context is
4678 if (ctxp
->java_error_flag
== 0)
4680 ctxp
->java_error_flag
= 1;
4682 /* Do something to use the previous line if we're reaching the
4683 end of the file... */
4684 #ifdef VERBOSE_SKELETON
4685 printf ("* Error detected (%s)\n", (msg
? msg
: "(null)"));
4690 /* Ignore duplicate message on the same line. BTW, this is dubious. FIXME */
4691 if (!force_error
&& msg
== prev_msg
&& prev_lineno
== elc
.line
)
4694 ctxp
->java_error_flag
= 0;
4696 java_warning_count
++;
4700 if (elc
.col
== 0 && msg
[1] == ';')
4702 elc
.col
= ctxp
->p_line
->char_col
-1;
4703 elc
.line
= ctxp
->p_line
->lineno
;
4706 save_lineno
= lineno
;
4707 prev_lineno
= lineno
= elc
.line
;
4710 code_from_source
= java_get_line_col (ctxp
->filename
, elc
.line
, elc
.col
);
4711 obstack_grow0 (&temporary_obstack
,
4712 code_from_source
, strlen (code_from_source
));
4713 remainder
= obstack_finish (&temporary_obstack
);
4715 warning ("%s.\n%s", msg
, remainder
);
4717 error ("%s.\n%s", msg
, remainder
);
4719 /* This allow us to cheaply avoid an extra 'Invalid expression
4720 statement' error report when errors have been already reported on
4721 the same line. This occurs when we report an error but don't have
4722 a synchronization point other than ';', which
4723 expression_statement is the only one to take care of. */
4724 ctxp
->prevent_ese
= lineno
= save_lineno
;
4735 /* Issue an error message at a current source line CL */
4738 parse_error_context
VPROTO ((tree cl
, char *msg
, ...))
4749 cl
= va_arg (ap
, tree
);
4750 msg
= va_arg (ap
, char *);
4752 vsprintf (buffer
, msg
, ap
);
4755 ctxp
->elc
.line
= EXPR_WFL_LINENO (cl
);
4756 ctxp
->elc
.col
= (EXPR_WFL_COLNO (cl
) == 0xfff ? -1 : EXPR_WFL_COLNO (cl
));
4758 parse_error (buffer
);
4762 /* Issue a warning at a current source line CL */
4765 parse_warning_context
VPROTO ((tree cl
, char *msg
, ...))
4776 cl
= va_arg (ap
, tree
);
4777 msg
= va_arg (ap
, char *);
4779 vsprintf (buffer
, msg
, ap
);
4781 force_error
= do_warning
= 1;
4782 ctxp
->elc
.line
= EXPR_WFL_LINENO (cl
);
4783 ctxp
->elc
.col
= (EXPR_WFL_COLNO (cl
) == 0xfff ? -1 : EXPR_WFL_COLNO (cl
));
4785 parse_error (buffer
);
4786 do_warning
= force_error
= 0;
4790 java_report_errors ()
4792 if (java_error_count
)
4793 fprintf (stderr
, "%d error%s",
4794 java_error_count
, (java_error_count
== 1 ? "" : "s"));
4795 if (java_warning_count
)
4796 fprintf (stderr
, "%s%d warning%s", (java_error_count
? ", " : ""),
4797 java_warning_count
, (java_warning_count
== 1 ? "" : "s"));
4798 if (java_error_count
|| java_warning_count
)
4799 putc ('\n', stderr
);
4803 java_accstring_lookup (flags
)
4806 static char buffer
[80];
4807 #define COPY_RETURN(S) {strcpy (buffer, S); return buffer;}
4809 /* Access modifier looked-up first for easier report on forbidden
4811 if (flags
& ACC_PUBLIC
) COPY_RETURN ("public");
4812 if (flags
& ACC_PRIVATE
) COPY_RETURN ("private");
4813 if (flags
& ACC_PROTECTED
) COPY_RETURN ("protected");
4814 if (flags
& ACC_STATIC
) COPY_RETURN ("static");
4815 if (flags
& ACC_FINAL
) COPY_RETURN ("final");
4816 if (flags
& ACC_SYNCHRONIZED
) COPY_RETURN ("synchronized");
4817 if (flags
& ACC_VOLATILE
) COPY_RETURN ("volatile");
4818 if (flags
& ACC_TRANSIENT
) COPY_RETURN ("transient");
4819 if (flags
& ACC_NATIVE
) COPY_RETURN ("native");
4820 if (flags
& ACC_INTERFACE
) COPY_RETURN ("interface");
4821 if (flags
& ACC_ABSTRACT
) COPY_RETURN ("abstract");
4829 redefinition_error (context
, id
, decl
, cl
)
4833 parse_error_context (cl
, "%s `%s' already defined in %s:%d",
4834 context
, IDENTIFIER_POINTER (id
),
4835 DECL_SOURCE_FILE (decl
), DECL_SOURCE_LINE (decl
));
4836 /* Here we should point out where its redefined. It's a unicode. FIXME */
4839 /* Build something that the type identifier resolver will identify as
4840 being an array to an unresolved type. TYPE_WFL is a WFL on a
4844 build_unresolved_array_type (type_or_wfl
)
4849 /* TYPE_OR_WFL might be an array on a primitive type. In this case,
4850 just create a array type */
4851 if (TREE_CODE (type_or_wfl
) == RECORD_TYPE
)
4853 tree type
= build_java_array_type (type_or_wfl
, -1);
4854 CLASS_LOADED_P (type
) = CLASS_LOADED_P (type_or_wfl
);
4858 obstack_1grow (&temporary_obstack
, '[');
4859 obstack_grow0 (&temporary_obstack
,
4860 IDENTIFIER_POINTER (EXPR_WFL_NODE (type_or_wfl
)),
4861 IDENTIFIER_LENGTH (EXPR_WFL_NODE (type_or_wfl
)));
4862 ptr
= obstack_finish (&temporary_obstack
);
4863 return build_expr_wfl (get_identifier (ptr
),
4864 EXPR_WFL_FILENAME (type_or_wfl
),
4865 EXPR_WFL_LINENO (type_or_wfl
),
4866 EXPR_WFL_COLNO (type_or_wfl
));
4869 /* Check modifiers. If one doesn't fit, retrieve it in its declaration line
4870 and point it out. */
4873 check_modifiers (message
, value
, mask
)
4878 /* Should point out the one that don't fit. ASCII/unicode,
4879 going backward. FIXME */
4882 int i
, remainder
= value
& ~mask
;
4883 for (i
= 0; i
<= 10; i
++)
4884 if ((1 << i
) & remainder
)
4885 parse_error_context (ctxp
->modifier_ctx
[i
], message
,
4886 java_accstring_lookup (1 << i
));
4891 parser_add_interface (class_decl
, interface_decl
, wfl
)
4892 tree class_decl
, interface_decl
, wfl
;
4894 if (maybe_add_interface (TREE_TYPE (class_decl
), TREE_TYPE (interface_decl
)))
4895 parse_error_context (wfl
, "Interface `%s' repeated",
4896 IDENTIFIER_POINTER (DECL_NAME (interface_decl
)));
4899 /* Bulk of common class/interface checks. Return 1 if an error was
4900 encountered. TAG is 0 for a class, 1 for an interface. */
4903 check_class_interface_creation (is_interface
, flags
, raw_name
, qualified_name
, decl
, cl
)
4904 int is_interface
, flags
;
4905 tree raw_name
, qualified_name
, decl
, cl
;
4910 fprintf (stderr
, " %s %s", (is_interface
? "interface" : "class"),
4911 IDENTIFIER_POINTER (qualified_name
));
4913 /* Scope of an interface/class type name:
4914 - Can't be imported by a single type import
4915 - Can't already exists in the package */
4916 if (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (raw_name
)
4917 && (node
= find_name_in_single_imports (raw_name
)))
4920 (cl
, "%s name `%s' clashes with imported type `%s'",
4921 (is_interface
? "Interface" : "Class"),
4922 IDENTIFIER_POINTER (raw_name
), IDENTIFIER_POINTER (node
));
4925 if (decl
&& CLASS_COMPLETE_P (decl
))
4927 redefinition_error ((is_interface
? "Interface" : "Class"),
4928 qualified_name
, decl
, cl
);
4932 /* If public, file name should match class/interface name */
4933 if (flags
& ACC_PUBLIC
)
4937 /* Contains OS dependent assumption on path separator. FIXME */
4938 for (f
= &input_filename
[strlen (input_filename
)];
4939 f
!= input_filename
&& f
[0] != '/'; f
--);
4942 if (strncmp (IDENTIFIER_POINTER (raw_name
),
4943 f
, IDENTIFIER_LENGTH (raw_name
)) ||
4944 f
[IDENTIFIER_LENGTH (raw_name
)] != '.')
4945 parse_error_context (cl
, "Public %s `%s' must be defined in a file "
4947 (is_interface
? "interface" : "class"),
4948 IDENTIFIER_POINTER (qualified_name
),
4949 IDENTIFIER_POINTER (raw_name
));
4952 check_modifiers ((is_interface
?
4953 "Illegal modifier `%s' for interface declaration" :
4954 "Illegal modifier `%s' for class declaration"), flags
,
4955 (is_interface
? INTERFACE_MODIFIERS
: CLASS_MODIFIERS
));
4959 /* If DECL is NULL, create and push a new DECL, record the current
4960 line CL and do other maintenance things. */
4963 maybe_create_class_interface_decl (decl
, qualified_name
, cl
)
4964 tree decl
, qualified_name
, cl
;
4967 DECL_ARTIFICIAL (decl
) = 1; /* FIXME */
4969 decl
= push_class (make_class (), qualified_name
);
4971 /* Take care of the file and line business */
4972 DECL_SOURCE_FILE (decl
) = EXPR_WFL_FILENAME (cl
);
4973 DECL_SOURCE_LINE (decl
) = EXPR_WFL_LINENO (cl
);
4974 CLASS_FROM_SOURCE_P (TREE_TYPE (decl
)) = 1;
4976 ctxp
->current_parsed_class
= decl
;
4978 /* Link the declaration to the already seen ones */
4979 TREE_CHAIN (decl
) = ctxp
->class_list
;
4980 ctxp
->class_list
= decl
;
4981 /* Install a new dependency list element */
4982 create_jdep_list (ctxp
);
4984 SOURCE_FRONTEND_DEBUG (("Defining class/interface %s",
4985 IDENTIFIER_POINTER (qualified_name
)));
4990 add_superinterfaces (decl
, interface_list
)
4991 tree decl
, interface_list
;
4994 /* Superinterface(s): if present and defined, parser_check_super_interface ()
4995 takes care of ensuring that:
4996 - This is an accessible interface type,
4997 - Circularity detection.
4998 parser_add_interface is then called. If present but not defined,
4999 the check operation is delayed until the super interface gets
5001 for (node
= interface_list
; node
; node
= TREE_CHAIN (node
))
5003 tree current
= TREE_PURPOSE (node
), interface_decl
;
5004 if ((interface_decl
= IDENTIFIER_CLASS_VALUE (EXPR_WFL_NODE (current
))))
5006 if (!parser_check_super_interface (interface_decl
, decl
, current
))
5007 parser_add_interface (decl
, interface_decl
, current
);
5010 register_incomplete_type (JDEP_INTERFACE
,
5011 current
, decl
, NULL_TREE
);
5015 /* Create an interface in pass1 and return its decl. Return the
5016 interface's decl in pass 2. */
5019 create_interface (flags
, id
, super
)
5024 tree raw_name
= EXPR_WFL_NODE (id
);
5025 tree q_name
= parser_qualified_classname (id
);
5026 tree decl
= IDENTIFIER_CLASS_VALUE (q_name
);
5028 EXPR_WFL_NODE (id
) = q_name
; /* Keep source location, even if refined. */
5030 /* Basic checks: scope, redefinition, modifiers */
5031 if (check_class_interface_creation (1, flags
, raw_name
, q_name
, decl
, id
))
5034 /* Interface modifiers check
5035 - public/abstract allowed (already done at that point)
5036 - abstract is obsolete (comes first, it's a warning, or should be)
5037 - Can't use twice the same (checked in the modifier rule) */
5038 if (flags
& ACC_ABSTRACT
)
5039 parse_warning_context
5040 (MODIFIER_WFL (ABSTRACT_TK
),
5041 "Obsolete use of `abstract' modifier. Interface `%s' is implicitely "
5042 "abstract", IDENTIFIER_POINTER (raw_name
));
5043 if (flags
& ACC_PUBLIC
&& flags
& ACC_ABSTRACT
)
5045 (MODIFIER_WFL (ABSTRACT_TK
),
5046 "Can't specify both `public' and `abstract' modifiers in the "
5047 "definition of interface `%s'", IDENTIFIER_POINTER (raw_name
));
5049 /* Create a new decl if DECL is NULL, otherwise fix it */
5050 decl
= maybe_create_class_interface_decl (decl
, q_name
, id
);
5052 /* Set super info and mark the class a complete */
5053 set_super_info (ACC_ABSTRACT
| ACC_INTERFACE
| flags
, TREE_TYPE (decl
),
5054 object_type_node
, ctxp
->interface_number
);
5055 ctxp
->interface_number
= 0;
5056 CLASS_COMPLETE_P (decl
) = 1;
5057 add_superinterfaces (decl
, super
);
5062 /* Create an class in pass1 and return its decl. Return class
5063 interface's decl in pass 2. */
5066 create_class (flags
, id
, super
, interfaces
)
5068 tree id
, super
, interfaces
;
5071 tree raw_name
= EXPR_WFL_NODE (id
);
5072 tree class_id
, decl
;
5073 tree super_decl
= NULL
, super_decl_type
;
5075 class_id
= parser_qualified_classname (id
);
5076 decl
= IDENTIFIER_CLASS_VALUE (class_id
);
5077 EXPR_WFL_NODE (id
) = class_id
;
5079 /* Basic check: scope, redefinition, modifiers */
5080 if (check_class_interface_creation (0, flags
, raw_name
, class_id
, decl
, id
))
5083 /* Class modifier check:
5084 - Allowed modifier (already done at that point)
5085 - abstract AND final forbidden
5086 - Public classes defined in the correct file */
5087 if ((flags
& ACC_ABSTRACT
) && (flags
& ACC_FINAL
))
5088 parse_error_context (id
, "Class `%s' can't be declared both abstract "
5089 "and final", IDENTIFIER_POINTER (raw_name
));
5091 /* Create a new decl if DECL is NULL, otherwise fix it */
5092 decl
= maybe_create_class_interface_decl (decl
, class_id
, id
);
5094 /* If SUPER exists, use it, otherwise use Object */
5097 /* Can't extend java.lang.Object */
5098 if (TREE_TYPE (IDENTIFIER_CLASS_VALUE (class_id
)) == object_type_node
)
5100 parse_error_context (id
, "Can't extend `java.lang.Object'");
5104 /* The class is known and exists if there is a decl. Otherwise,
5105 postpone the operation and do it later. */
5106 super_decl
= IDENTIFIER_CLASS_VALUE (EXPR_WFL_NODE (super
));
5109 parser_check_super (super_decl
, decl
, id
);
5110 super_decl_type
= TREE_TYPE (super_decl
);
5114 register_incomplete_type (JDEP_SUPER
, super
, decl
, NULL_TREE
);
5116 else if (TREE_TYPE (decl
) != object_type_node
)
5117 super_decl_type
= object_type_node
;
5118 /* We're defining java.lang.Object */
5120 super_decl_type
= NULL_TREE
;
5122 /* Set super info and mark the class a complete */
5123 set_super_info (flags
, TREE_TYPE (decl
), super_decl_type
,
5124 ctxp
->interface_number
);
5125 ctxp
->interface_number
= 0;
5126 CLASS_COMPLETE_P (decl
) = 1;
5127 add_superinterfaces (decl
, interfaces
);
5132 /* Can't use lookup_field () since we don't want to load the class and
5133 can't set the CLASS_LOADED_P flag */
5136 find_field (class, name
)
5141 for (decl
= TYPE_FIELDS (class); decl
; decl
= TREE_CHAIN (decl
))
5143 if (DECL_NAME (decl
) == name
)
5149 /* Wrap around lookup_field that doesn't potentially upset the value
5153 lookup_field_wrapper (class, name
)
5157 return lookup_field (&type
, name
);
5160 /* Find duplicate field within the same class declarations and report
5164 duplicate_declaration_error (class, new_field_name
, new_type
, cl
)
5165 tree
class, new_field_name
, new_type
, cl
;
5167 /* This might be modified to work with method decl as well */
5168 tree decl
= find_field (TREE_TYPE (ctxp
->current_parsed_class
),
5172 char *t1
= strdup ((char *)lang_printable_name (new_type
, 1));
5174 strdup ((TREE_CODE (TREE_TYPE (decl
)) == TREE_LIST
?
5175 IDENTIFIER_POINTER (TYPE_NAME
5176 (TREE_PURPOSE (TREE_TYPE (decl
)))) :
5177 (char *)lang_printable_name (TREE_TYPE (decl
), 1)));
5179 (cl
, "Duplicate variable declaration: `%s %s' was `%s %s' (%s:%d)",
5180 t1
, IDENTIFIER_POINTER (new_field_name
),
5181 t2
, IDENTIFIER_POINTER (DECL_NAME (decl
)),
5182 DECL_SOURCE_FILE (decl
), DECL_SOURCE_LINE (decl
));
5190 /* Field registration routine. If TYPE doesn't exist, field
5191 declarations are linked to the undefined TYPE dependency list, to
5192 be later resolved in java_complete_class () */
5195 register_fields (flags
, type
, variable_list
)
5197 tree type
, variable_list
;
5199 tree current
, type_decl
, returned_type
;
5200 tree class_type
= TREE_TYPE (ctxp
->current_parsed_class
);
5201 int saved_lineno
= lineno
;
5203 tree wfl
= NULL_TREE
;
5205 /* If we're adding fields to interfaces, those fields are public,
5207 if (CLASS_INTERFACE (TYPE_NAME (class_type
)))
5209 OBSOLETE_MODIFIER_WARNING (MODIFIER_WFL (PUBLIC_TK
),
5211 "%s", "interface field(s)");
5212 OBSOLETE_MODIFIER_WARNING (MODIFIER_WFL (STATIC_TK
),
5214 "%s", "interface field(s)");
5215 OBSOLETE_MODIFIER_WARNING (MODIFIER_WFL (FINAL_TK
),
5216 flags
, ACC_FINAL
, "%s", "interface field(s)");
5217 check_modifiers ("Illegal interface member modifier `%s'", flags
,
5218 INTERFACE_FIELD_MODIFIERS
);
5219 flags
|= (ACC_PUBLIC
| ACC_STATIC
| ACC_FINAL
);
5222 if (unresolved_type_p (type
, &returned_type
))
5225 type
= returned_type
;
5229 type
= obtain_incomplete_type (type
);
5234 for (current
= variable_list
; current
; current
= TREE_CHAIN (current
))
5236 tree cl
= TREE_PURPOSE (current
);
5237 tree init
= TREE_VALUE (current
);
5238 tree current_name
= EXPR_WFL_NODE (cl
);
5240 if (duplicate_declaration_error (class_type
, current_name
, type
, cl
))
5243 lineno
= EXPR_WFL_LINENO (cl
);
5244 field_decl
= add_field (class_type
, current_name
, type
, flags
);
5246 /* Check if we must chain. */
5248 register_incomplete_type (JDEP_FIELD
, wfl
, field_decl
, type
);
5250 /* Default value of a static field is 0 and it is considered
5252 if (flags
& ACC_STATIC
)
5253 INITIALIZED_P (field_decl
) = 1;
5255 /* If we have an initialization value tied to the field */
5258 /* The field is declared static */
5259 if (flags
& ACC_STATIC
)
5262 if (flags
& ACC_FINAL
)
5264 /* Otherwise, the field should be initialized in
5265 <clinit>. This field is remembered so we can
5266 generate <clinit> later. */
5269 INITIALIZED_P (field_decl
) = 1;
5270 TREE_CHAIN (init
) = ctxp
->static_initialized
;
5271 ctxp
->static_initialized
= init
;
5274 /* A non-static field declared with an immediate
5275 initialization is to be initialized in <init>, if
5276 any. This field is remembered to be processed at the
5277 time of the generation of <init>. */
5280 TREE_CHAIN (init
) = ctxp
->non_static_initialized
;
5281 ctxp
->non_static_initialized
= init
;
5286 lineno
= saved_lineno
;
5289 /* Check whether it is necessary to generate a <clinit> for the class
5293 maybe_generate_clinit ()
5296 tree meth
, mdecl
, c
;
5297 tree cclass
, class_wfl
;
5299 if (!ctxp
->static_initialized
|| java_error_count
)
5302 cclass
= TREE_TYPE (ctxp
->current_parsed_class
);
5303 class_wfl
= build_expr_wfl (DECL_NAME (TYPE_NAME (cclass
)),
5304 input_filename
, 0, 0);
5306 saved_lineno
= lineno
;
5308 meth
= make_node (FUNCTION_TYPE
);
5309 TREE_TYPE (meth
) = void_type_node
;
5310 TYPE_ARG_TYPES (meth
) = NULL_TREE
;
5311 mdecl
= add_method (cclass
, ACC_STATIC
, clinit_identifier_node
,
5312 build_java_signature (meth
));
5313 lineno
= saved_lineno
;
5315 DECL_SOURCE_LINE (mdecl
) = 1;
5316 DECL_SOURCE_LINE_MERGE (mdecl
, 1);
5317 source_start_java_method (mdecl
);
5320 /* Keep initialization in order to enforce 8.5 */
5321 ctxp
->static_initialized
= nreverse (ctxp
->static_initialized
);
5323 /* We process the list of assignment we produced as the result of
5324 the declaration of initialized static field and add them as
5325 statement to the <clinit> method. */
5326 for (c
= ctxp
->static_initialized
; c
; c
= TREE_CHAIN (c
))
5328 /* We build the assignment expression that will initialize the
5329 field to its value. There are strict rules on static
5330 initializers (8.5). FIXME */
5331 java_method_add_stmt (mdecl
, c
);
5334 BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (mdecl
)) = exit_block ();
5336 ctxp
->static_initialized
= NULL_TREE
;
5339 /* Shared accros method_declarator and method_header to remember the
5340 patch stage that was reached during the declaration of the method.
5341 A method DECL is built differently is there is no patch
5342 (JDEP_NO_PATCH) or a patch (JDEP_METHOD or JDEP_METHOD_RETURN)
5343 pending on the currently defined method. */
5345 static int patch_stage
;
5347 /* Check the method declaration and add the method to its current
5348 class. If the argument list is known to contain incomplete types,
5349 the method is partially added and the registration will be resume
5350 once the method arguments resolved */
5353 method_header (flags
, type
, mdecl
, throws
)
5355 tree type
, mdecl
, throws
;
5357 tree meth
= TREE_VALUE (mdecl
);
5358 tree id
= TREE_PURPOSE (mdecl
);
5359 tree this_class
= TREE_TYPE (ctxp
->current_parsed_class
);
5360 tree handle_class
= CLASS_TO_HANDLE_TYPE (this_class
);
5361 tree meth_name
, returned_type
;
5364 check_modifiers_consistency (flags
);
5366 /* There are some forbidden modifiers for an abstract method and its
5367 class must be abstract as well. */
5368 if (flags
& ACC_ABSTRACT
)
5370 ABSTRACT_CHECK (flags
, ACC_PRIVATE
, id
, "Private");
5371 ABSTRACT_CHECK (flags
, ACC_STATIC
, id
, "Static");
5372 ABSTRACT_CHECK (flags
, ACC_FINAL
, id
, "Final");
5373 ABSTRACT_CHECK (flags
, ACC_NATIVE
, id
, "Native");
5374 ABSTRACT_CHECK (flags
, ACC_SYNCHRONIZED
,id
, "Synchronized");
5375 if (!CLASS_ABSTRACT (TYPE_NAME (this_class
)))
5377 (id
, "Class `%s' must be declared abstract to define abstract "
5379 IDENTIFIER_POINTER (DECL_NAME (ctxp
->current_parsed_class
)),
5380 IDENTIFIER_POINTER (EXPR_WFL_NODE (id
)));
5384 /* Method declared within the scope of an interface are implicitly
5385 abstract and public. Conflicts with other erroneously provided
5386 modifiers are check right after. */
5388 if (CLASS_INTERFACE (TYPE_NAME (this_class
)))
5390 /* If FLAGS isn't set because of a modifier, turn the
5391 corresponding modifier WFL to NULL so we issue a warning on
5392 the obsolete use of the modifier */
5393 if (!(flags
& ACC_PUBLIC
))
5394 MODIFIER_WFL (PUBLIC_TK
) = NULL
;
5395 if (!(flags
& ACC_ABSTRACT
))
5396 MODIFIER_WFL (ABSTRACT_TK
) = NULL
;
5397 flags
|= ACC_PUBLIC
;
5398 flags
|= ACC_ABSTRACT
;
5401 /* Modifiers context reset moved up, so abstract method declaration
5402 modifiers can be later checked. */
5404 meth_name
= EXPR_WFL_NODE (id
);
5406 if (unresolved_type_p (type
, &returned_type
))
5409 TREE_TYPE (meth
) = returned_type
;
5412 patch_stage
= JDEP_METHOD_RETURN
;
5414 register_incomplete_type (patch_stage
, type
, id
, NULL_TREE
);
5418 TREE_TYPE (meth
) = type
;
5420 saved_lineno
= lineno
;
5421 /* When defining an abstract or interface method, the curly
5422 bracket at level 1 doesn't exist because there is no function
5424 lineno
= (ctxp
->first_ccb_indent1
? ctxp
->first_ccb_indent1
:
5425 EXPR_WFL_LINENO (id
));
5427 if (patch_stage
) /* includes ret type and/or all args */
5430 meth
= add_method_1 (this_class
, flags
, meth_name
, meth
);
5431 /* Patch for the return type */
5432 if (patch_stage
== JDEP_METHOD_RETURN
)
5434 jdep
= CLASSD_LAST (ctxp
->classd_list
);
5435 JDEP_GET_PATCH (jdep
) = &TREE_TYPE (TREE_TYPE (meth
));
5437 /* This is the stop JDEP. METH allows the function's signature
5439 register_incomplete_type (JDEP_METHOD_END
, NULL_TREE
, meth
, NULL_TREE
);
5443 tree signature
= build_java_signature (meth
);
5445 /* Save original argument list, including argument's names */
5446 orig_arg
= TYPE_ARG_TYPES (meth
);
5447 /* Add the method to its class */
5448 meth
= add_method (this_class
, flags
, meth_name
, signature
);
5449 /* Fix the method argument list so we have the argument name
5451 arg
= TYPE_ARG_TYPES (TREE_TYPE (meth
));
5452 if (TREE_CODE (TREE_TYPE (meth
)) == METHOD_TYPE
)
5454 TREE_PURPOSE (arg
) = this_identifier_node
;
5455 arg
= TREE_CHAIN (arg
);
5459 TREE_PURPOSE (arg
) = TREE_PURPOSE (orig_arg
);
5460 orig_arg
= TREE_CHAIN (orig_arg
);
5461 arg
= TREE_CHAIN (arg
);
5464 DECL_MAX_LOCALS (meth
) = ctxp
->formal_parameter_number
+1;
5465 lineno
= saved_lineno
;
5466 /* We set the DECL_NAME to ID so we can track the location where
5467 the function was declared. This allow us to report
5468 redefinition error accurately. When method are verified,
5469 DECL_NAME is reinstalled properly (using the content of the
5470 WFL node ID) (see check_method_redefinition). We don't do that
5471 when Object is being defined. */
5472 if (TREE_TYPE (ctxp
->current_parsed_class
) != object_type_node
)
5473 DECL_NAME (meth
) = id
;
5477 /* Check modifiers that can be declared but exclusively */
5480 check_modifiers_consistency (flags
)
5484 tree cl
= NULL_TREE
;
5486 THIS_MODIFIER_ONLY (flags
, ACC_PUBLIC
, 0, acc_count
, cl
);
5487 THIS_MODIFIER_ONLY (flags
, ACC_PRIVATE
, 1, acc_count
, cl
);
5488 THIS_MODIFIER_ONLY (flags
, ACC_PROTECTED
, 2, acc_count
, cl
);
5491 (cl
, "Inconsistent member declaration. At most one of `public', "
5492 "`private', or `protected' may be specified");
5495 /* Check the methode header METH for abstract specifics features */
5498 check_abstract_method_header (meth
)
5501 int flags
= get_access_flags_from_decl (meth
);
5502 /* DECL_NAME might still be a WFL node */
5503 tree name
= (TREE_CODE (DECL_NAME (meth
)) == EXPR_WITH_FILE_LOCATION
?
5504 EXPR_WFL_NODE (DECL_NAME (meth
)) : DECL_NAME (meth
));
5506 OBSOLETE_MODIFIER_WARNING (MODIFIER_WFL (ABSTRACT_TK
), flags
,
5507 ACC_ABSTRACT
, "abstract method `%s'",
5508 IDENTIFIER_POINTER (name
));
5509 OBSOLETE_MODIFIER_WARNING (MODIFIER_WFL (PUBLIC_TK
), flags
,
5510 ACC_PUBLIC
, "abstract method `%s'",
5511 IDENTIFIER_POINTER (name
));
5513 check_modifiers ("Illegal modifier `%s' for interface method",
5514 flags
, INTERFACE_METHOD_MODIFIERS
);
5517 /* Create a FUNCTION_TYPE node and start augmenting it with the
5518 declared function arguments. Arguments type that can't be resolved
5519 are left as they are, but the returned node is marked as containing
5520 incomplete types. */
5523 method_declarator (id
, list
)
5526 tree arg_types
= NULL_TREE
, current
, node
;
5527 tree meth
= make_node (FUNCTION_TYPE
);
5531 patch_stage
= JDEP_NO_PATCH
;
5533 for (current
= list
; current
; current
= TREE_CHAIN (current
))
5535 tree wfl_name
= TREE_PURPOSE (current
);
5536 tree type
= TREE_VALUE (current
);
5537 tree name
= EXPR_WFL_NODE (wfl_name
);
5538 tree patchable_type
= NULL_TREE
, already
;
5539 tree arg_node
, returned_type
;
5541 /* Check redefinition */
5542 for (already
= arg_types
; already
; already
= TREE_CHAIN (already
))
5543 if (TREE_PURPOSE (already
) == name
)
5546 (wfl_name
, "Variable `%s' is used more than once in the "
5547 "argument list of method `%s'", IDENTIFIER_POINTER (name
),
5548 IDENTIFIER_POINTER (EXPR_WFL_NODE (id
)));
5552 /* If we've an incomplete argument type, we know there is a location
5553 to patch when the type get resolved, later. */
5555 if (unresolved_type_p (type
, &returned_type
))
5558 type
= returned_type
;
5561 patch_stage
= JDEP_METHOD
;
5562 type
= register_incomplete_type (patch_stage
, type
,
5563 wfl_name
, NULL_TREE
);
5564 jdep
= CLASSD_LAST (ctxp
->classd_list
);
5565 JDEP_MISC (jdep
) = id
;
5568 /* The argument node: a name and a (possibly) incomplete type */
5569 arg_node
= build_tree_list (name
, type
);
5571 JDEP_GET_PATCH (jdep
) = &TREE_VALUE (arg_node
);
5572 TREE_CHAIN (arg_node
) = arg_types
;
5573 arg_types
= arg_node
;
5575 TYPE_ARG_TYPES (meth
) = nreverse (arg_types
);
5576 node
= build_tree_list (id
, meth
);
5581 unresolved_type_p (wfl
, returned
)
5586 if (TREE_CODE (wfl
) == EXPR_WITH_FILE_LOCATION
)
5588 tree decl
= IDENTIFIER_CLASS_VALUE (EXPR_WFL_NODE (wfl
));
5590 *returned
= (decl
? TREE_TYPE (decl
) : NULL_TREE
);
5598 /* From NAME, build a qualified identifier node using the
5599 qualification from the current package definition. */
5602 parser_qualified_classname (name
)
5606 return merge_qualified_name (ctxp
->package
, EXPR_WFL_NODE (name
));
5608 return EXPR_WFL_NODE (name
);
5611 /* Called once the type a interface extends is resolved. Returns 0 if
5612 everything is OK. */
5615 parser_check_super_interface (super_decl
, this_decl
, this_wfl
)
5616 tree super_decl
, this_decl
, this_wfl
;
5618 tree super_type
= TREE_TYPE (super_decl
);
5620 /* Has to be an interface */
5621 if (!CLASS_INTERFACE (TYPE_NAME (TREE_TYPE (super_decl
))))
5624 (this_wfl
, "Can't use %s `%s' to implement/extend %s `%s'",
5625 (TYPE_ARRAY_P (super_type
) ? "array" : "class"),
5626 IDENTIFIER_POINTER (DECL_NAME (super_decl
)),
5627 (CLASS_INTERFACE (TYPE_NAME (TREE_TYPE (this_decl
))) ?
5628 "interface" : "class"),
5629 IDENTIFIER_POINTER (DECL_NAME (this_decl
)));
5633 /* Check scope: same package OK, other package: OK if public */
5634 if (check_pkg_class_access (DECL_NAME (super_decl
), lookup_cl (this_decl
)))
5637 SOURCE_FRONTEND_DEBUG (("Completing interface %s with %s",
5638 IDENTIFIER_POINTER (DECL_NAME (this_decl
)),
5639 IDENTIFIER_POINTER (DECL_NAME (super_decl
))));
5643 /* Makes sure that SUPER_DECL is suitable to extend THIS_DECL. Returns
5644 0 if everthing is OK. */
5647 parser_check_super (super_decl
, this_decl
, wfl
)
5648 tree super_decl
, this_decl
, wfl
;
5650 tree this_type
= TREE_TYPE (this_decl
);
5651 tree super_type
= TREE_TYPE (super_decl
);
5653 /* SUPER should be a CLASS (neither an array nor an interface) */
5654 if (TYPE_ARRAY_P (super_type
) || CLASS_INTERFACE (TYPE_NAME (super_type
)))
5657 (wfl
, "Class `%s' can't subclass %s `%s'",
5658 IDENTIFIER_POINTER (DECL_NAME (this_decl
)),
5659 (CLASS_INTERFACE (TYPE_NAME (super_type
)) ? "interface" : "array"),
5660 IDENTIFIER_POINTER (DECL_NAME (super_decl
)));
5664 if (CLASS_FINAL (TYPE_NAME (super_type
)))
5666 parse_error_context (wfl
, "Can't subclass final classes: %s",
5667 IDENTIFIER_POINTER (DECL_NAME (super_decl
)));
5671 /* Check scope: same package OK, other package: OK if public */
5672 if (check_pkg_class_access (DECL_NAME (super_decl
), wfl
))
5675 SOURCE_FRONTEND_DEBUG (("Completing class %s with %s",
5676 IDENTIFIER_POINTER (DECL_NAME (this_decl
)),
5677 IDENTIFIER_POINTER (DECL_NAME (super_decl
))));
5681 /* Create a new dependency list and link it (in a LIFO manner) to the
5682 CTXP list of type dependency list. */
5685 create_jdep_list (ctxp
)
5686 struct parser_ctxt
*ctxp
;
5688 jdeplist
*new = malloc (sizeof (jdeplist
));
5691 fatal ("Can't alloc jdeplist - create_jdep_list");
5693 new->first
= new->last
= NULL
;
5694 new->next
= ctxp
->classd_list
;
5695 ctxp
->classd_list
= new;
5699 reverse_jdep_list (ctxp
)
5700 struct parser_ctxt
*ctxp
;
5702 register jdeplist
*prev
= NULL
, *current
, *next
;
5703 for (current
= ctxp
->classd_list
; current
; current
= next
)
5705 next
= current
->next
;
5706 current
->next
= prev
;
5712 /* Create a fake pointer based on the ID stored in the WFL */
5715 obtain_incomplete_type (wfl
)
5719 tree name
= EXPR_WFL_NODE (wfl
);
5721 for (ptr
= ctxp
->incomplete_class
; ptr
; ptr
= TREE_CHAIN (ptr
))
5722 if (TYPE_NAME (TREE_PURPOSE (ptr
)) == name
)
5728 push_obstacks (&permanent_obstack
, &permanent_obstack
);
5729 BUILD_PTR_FROM_NAME (core
, name
);
5730 ptr
= build_tree_list (core
, NULL_TREE
);
5732 TREE_CHAIN (ptr
) = ctxp
->incomplete_class
;
5733 ctxp
->incomplete_class
= ptr
;
5739 /* Register a incomplete type whose name is WFL. Reuse PTR if PTR is
5740 non NULL instead of computing a new fake type based on WFL. The new
5741 dependency is inserted in the current type dependency list, in FIFO
5745 register_incomplete_type (kind
, wfl
, decl
, ptr
)
5747 tree wfl
, decl
, ptr
;
5749 jdep
*new = malloc (sizeof (jdep
));
5752 fatal ("Can't allocate new jdep - register_incomplete_type");
5753 if (!ptr
&& kind
!= JDEP_METHOD_END
) /* JDEP_METHOD_END is a mere marker */
5754 ptr
= obtain_incomplete_type (wfl
);
5756 JDEP_KIND (new) = kind
;
5757 JDEP_DECL (new) = decl
;
5758 JDEP_SOLV (new) = ptr
;
5759 JDEP_WFL (new) = wfl
;
5760 JDEP_CHAIN (new) = NULL
;
5761 JDEP_MISC (new) = NULL_TREE
;
5762 JDEP_GET_PATCH (new) = (tree
*)NULL
;
5764 JDEP_INSERT (ctxp
->classd_list
, new);
5770 java_check_circular_reference ()
5773 for (current
= ctxp
->class_list
; current
; current
= TREE_CHAIN (current
))
5775 tree type
= TREE_TYPE (current
);
5776 if (CLASS_INTERFACE (TYPE_NAME (type
)))
5778 /* Check all interfaces this class extends */
5779 tree basetype_vec
= TYPE_BINFO_BASETYPES (type
);
5784 n
= TREE_VEC_LENGTH (basetype_vec
);
5785 for (i
= 0; i
< n
; i
++)
5787 tree vec_elt
= TREE_VEC_ELT (basetype_vec
, i
);
5788 if (vec_elt
&& BINFO_TYPE (vec_elt
) != object_type_node
5789 && interface_of_p (type
, BINFO_TYPE (vec_elt
)))
5790 parse_error_context (lookup_cl (current
),
5791 "Cyclic interface inheritance");
5795 if (inherits_from_p (CLASSTYPE_SUPER (type
), type
))
5796 parse_error_context (lookup_cl (current
),
5797 "Cyclic class inheritance");
5802 safe_layout_class (class)
5805 tree save_current_class
= current_class
;
5806 char *save_input_filename
= input_filename
;
5807 int save_lineno
= lineno
;
5809 push_obstacks (&permanent_obstack
, &permanent_obstack
);
5810 layout_class (class);
5813 current_class
= save_current_class
;
5814 input_filename
= save_input_filename
;
5815 lineno
= save_lineno
;
5816 CLASS_LOADED_P (class) = 1;
5820 jdep_resolve_class (dep
)
5825 if (!JDEP_RESOLVED_P (dep
))
5828 resolve_class (JDEP_TO_RESOLVE (dep
), JDEP_DECL (dep
), JDEP_WFL (dep
));
5829 JDEP_RESOLVED (dep
, decl
);
5832 decl
= JDEP_RESOLVED_DECL (dep
);
5836 complete_class_report_errors (dep
);
5842 /* Complete unsatisfied class declaration and their dependencies */
5845 java_complete_class ()
5852 push_obstacks (&permanent_obstack
, &permanent_obstack
);
5854 /* Process imports and reverse the import on demand list */
5856 if (ctxp
->import_demand_list
)
5857 ctxp
->import_demand_list
= nreverse (ctxp
->import_demand_list
);
5859 /* Rever things so we have the right order */
5860 ctxp
->class_list
= nreverse (ctxp
->class_list
);
5861 ctxp
->classd_list
= reverse_jdep_list (ctxp
);
5863 for (cclassd
= ctxp
->classd_list
, cclass
= ctxp
->class_list
;
5865 cclass
= TREE_CHAIN (cclass
), cclassd
= CLASSD_CHAIN (cclassd
))
5868 for (dep
= CLASSD_FIRST (cclassd
); dep
; dep
= JDEP_CHAIN (dep
))
5872 if (!(decl
= jdep_resolve_class (dep
)))
5875 /* Now it's time to patch */
5876 switch (JDEP_KIND (dep
))
5879 /* Simply patch super */
5880 if (parser_check_super (decl
, JDEP_DECL (dep
), JDEP_WFL (dep
)))
5882 BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO
5883 (TREE_TYPE (JDEP_DECL (dep
)))), 0)) = TREE_TYPE (decl
);
5888 /* We do part of the job done in add_field */
5889 tree field_decl
= JDEP_DECL (dep
);
5890 tree field_type
= TREE_TYPE (decl
);
5891 push_obstacks (&permanent_obstack
, &permanent_obstack
);
5892 #if ! JAVA_PROMOTE_TO_INT
5893 if (TREE_CODE (field_type
) == RECORD_TYPE
)
5895 field_type
= promote_type (field_type
);
5897 TREE_TYPE (field_decl
) = field_type
;
5898 SOURCE_FRONTEND_DEBUG
5899 (("Completed field/var decl `%s' with `%s'",
5900 IDENTIFIER_POINTER (DECL_NAME (field_decl
)),
5901 IDENTIFIER_POINTER (DECL_NAME (decl
))));
5904 case JDEP_METHOD
: /* We start patching a method */
5905 case JDEP_METHOD_RETURN
:
5911 tree type
= promote_type (TREE_TYPE(decl
));
5912 JDEP_APPLY_PATCH (dep
, type
);
5913 SOURCE_FRONTEND_DEBUG
5914 (((JDEP_KIND (dep
) == JDEP_METHOD_RETURN
?
5915 "Completing fct `%s' with ret type `%s'":
5916 "Completing arg `%s' with type `%s'"),
5917 IDENTIFIER_POINTER (EXPR_WFL_NODE
5918 (JDEP_DECL_WFL (dep
))),
5919 IDENTIFIER_POINTER (DECL_NAME (decl
))));
5923 dep
= JDEP_CHAIN (dep
);
5924 if (JDEP_KIND (dep
) == JDEP_METHOD_END
)
5927 decl
= jdep_resolve_class (dep
);
5931 tree mdecl
= JDEP_DECL (dep
), signature
;
5932 push_obstacks (&permanent_obstack
, &permanent_obstack
);
5933 /* Recompute and reset the signature */
5934 signature
= build_java_signature (TREE_TYPE (mdecl
));
5935 set_java_signature (TREE_TYPE (mdecl
), signature
);
5942 case JDEP_INTERFACE
:
5943 if (parser_check_super_interface (decl
, JDEP_DECL (dep
),
5946 parser_add_interface (JDEP_DECL (dep
), decl
, JDEP_WFL (dep
));
5950 JDEP_APPLY_PATCH (dep
, promote_type (TREE_TYPE (decl
)));
5951 SOURCE_FRONTEND_DEBUG
5952 (("Completing variable `%s' with type `%s'",
5953 (TREE_CODE (JDEP_DECL_WFL (dep
)) == EXPR_WITH_FILE_LOCATION
?
5954 IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep
))) :
5955 IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL_WFL (dep
)))),
5956 IDENTIFIER_POINTER (DECL_NAME (decl
))));
5960 JDEP_APPLY_PATCH (dep
, TREE_TYPE (decl
));
5961 SOURCE_FRONTEND_DEBUG
5962 (("Completing a random type dependency on a '%s' node",
5963 tree_code_name
[TREE_CODE (JDEP_DECL (dep
))]));
5967 JDEP_APPLY_PATCH (dep
, promote_type (TREE_TYPE (decl
)));
5968 SOURCE_FRONTEND_DEBUG
5969 (("Completing parameter `%s' with type `%s'",
5970 IDENTIFIER_POINTER (JDEP_MISC (dep
)),
5971 IDENTIFIER_POINTER (DECL_NAME (decl
))));
5975 fatal ("incomplete switch - java_complete_class");
5983 /* Resolve class CLASS_TYPE. Handle the case of trying to resolve an
5987 resolve_class (class_type
, decl
, cl
)
5988 tree class_type
, decl
, cl
;
5990 char *name
= IDENTIFIER_POINTER (TYPE_NAME (class_type
));
5992 tree resolved_type
, resolved_type_decl
;
5994 /* 1- Check to see if we have an array. If true, find what we really
5996 while (name
[0] == '[')
5999 TYPE_NAME (class_type
) = get_identifier (name
);
6001 /* 2- Resolve the bare type */
6002 if (!(resolved_type_decl
= do_resolve_class (class_type
, decl
, cl
)))
6004 resolved_type
= TREE_TYPE (resolved_type_decl
);
6006 /* 3- If we have and array, reconstruct the array down to its nesting */
6009 while (base
!= name
)
6011 if (TREE_CODE (resolved_type
) == RECORD_TYPE
)
6012 resolved_type
= promote_type (resolved_type
);
6013 resolved_type
= build_java_array_type (resolved_type
, -1);
6016 /* Build a fake decl for this, since this is what is expected to
6018 resolved_type_decl
=
6019 build_decl (TYPE_DECL
, TYPE_NAME (resolved_type
), resolved_type
);
6020 /* Figure how those two things are important for error report. FIXME */
6021 DECL_SOURCE_LINE (resolved_type_decl
) = 0;
6022 DECL_SOURCE_FILE (resolved_type_decl
) = input_filename
;
6024 return resolved_type_decl
;
6027 /* Effectively perform the resolution of class CLASS_TYPE. DECL or CL
6028 are used to report error messages. */
6031 do_resolve_class (class_type
, decl
, cl
)
6036 tree new_class_decl
;
6037 tree original_name
= NULL_TREE
;
6039 /* Do not try to replace TYPE_NAME (class_type) by a variable, since
6040 its is changed by find_in_imports{_on_demand} */
6042 /* 1- Check for the type in single imports */
6043 if (find_in_imports (class_type
))
6046 /* 2- And check for the type in the current compilation unit. If it fails,
6047 try with a name qualified with the package name if appropriate. */
6049 if ((new_class_decl
= IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type
))))
6051 if (!CLASS_LOADED_P (TREE_TYPE (new_class_decl
)) &&
6052 !CLASS_FROM_SOURCE_P (TREE_TYPE (new_class_decl
)))
6053 load_class (TYPE_NAME (class_type
), 0);
6054 return IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type
));
6057 original_name
= TYPE_NAME (class_type
);
6058 if (!QUALIFIED_P (TYPE_NAME (class_type
)) && ctxp
->package
)
6059 TYPE_NAME (class_type
) = merge_qualified_name (ctxp
->package
,
6060 TYPE_NAME (class_type
));
6061 if ((new_class_decl
= IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type
))))
6063 if (!CLASS_LOADED_P (TREE_TYPE (new_class_decl
)) &&
6064 !CLASS_FROM_SOURCE_P (TREE_TYPE (new_class_decl
)))
6065 load_class (TYPE_NAME (class_type
), 0);
6066 return IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type
));
6068 TYPE_NAME (class_type
) = original_name
;
6070 /* 3- Check an other compilation unit that bears the name of type */
6071 load_class (TYPE_NAME (class_type
), 0);
6072 if (check_pkg_class_access (TYPE_NAME (class_type
),
6073 (cl
? cl
: lookup_cl (decl
))))
6076 if ((new_class_decl
= IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type
))))
6077 return new_class_decl
;
6079 /* 4- Check the import on demands. Don't allow bar.baz to be
6080 imported from foo.* */
6081 if (!QUALIFIED_P (TYPE_NAME (class_type
)))
6082 if (find_in_imports_on_demand (class_type
))
6085 /* 5- Last call for a resolution */
6086 return IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type
));
6089 /* Resolve NAME and lay it out (if not done and if not the current
6090 parsed class). Return a decl node. */
6093 resolve_and_layout (name
, cl
)
6097 tree decl
= resolve_no_layout (name
, cl
);
6098 if (decl
&& TREE_TYPE (decl
) != current_class
6099 && !CLASS_LOADED_P (TREE_TYPE (decl
)))
6100 safe_layout_class (TREE_TYPE (decl
));
6104 /* Resolve a class, returns its decl but doesn't perform any
6105 layout. The current parsing context is saved and restored */
6108 resolve_no_layout (name
, cl
)
6112 BUILD_PTR_FROM_NAME (ptr
, name
);
6113 java_parser_context_save_global ();
6114 decl
= resolve_class (ptr
, NULL_TREE
, cl
);
6115 java_parser_context_restore_global ();
6120 /* Called to report errors. Skip leader '[' in a complex array type
6121 description that failed to be resolved. */
6124 purify_type_name (name
)
6127 while (*name
&& *name
== '[')
6132 /* The type CURRENT refers to can't be found. We print error messages. */
6135 complete_class_report_errors (dep
)
6138 switch (JDEP_KIND (dep
))
6142 (JDEP_WFL (dep
), "Superclass `%s' of class `%s' not found",
6143 IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep
))),
6144 IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep
))));
6148 (JDEP_WFL (dep
), "Type `%s' not found in declaration of field `%s'",
6149 IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep
))),
6150 IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep
))));
6152 case JDEP_METHOD
: /* Covers arguments */
6154 (JDEP_WFL (dep
), "Type `%s' not found in the declaration of the "
6155 "argument `%s' of method `%s'",
6156 IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep
))),
6157 IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep
))),
6158 IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_MISC (dep
))));
6160 case JDEP_METHOD_RETURN
: /* Covers return type */
6162 (JDEP_WFL (dep
), "Type `%s' not found in the declaration of the "
6163 "return type of method `%s'",
6164 IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep
))),
6165 IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep
))));
6167 case JDEP_INTERFACE
:
6169 (JDEP_WFL (dep
), "Superinterface `%s' of %s `%s' not found",
6170 IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep
))),
6171 (CLASS_OR_INTERFACE (JDEP_DECL (dep
), "class", "interface")),
6172 IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep
))));
6176 (JDEP_WFL (dep
), "Type `%s' not found in the declaration of the "
6177 "local variable `%s'",
6178 purify_type_name (IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep
)))),
6179 IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep
))));
6184 /* Check uninitialized final. */
6192 check_method_redefinition (class, method
)
6196 tree cl
= DECL_NAME (method
);
6197 tree sig
= TYPE_LANG_SPECIFIC (TREE_TYPE (method
))->signature
;
6198 /* decl name of generated <clinit> doesn't need to be fixed and
6200 if (DECL_NAME (method
) != clinit_identifier_node
)
6202 /* NAME is just the plain name when Object is being defined */
6203 if (class != object_type_node
)
6204 name
= DECL_NAME (method
) = EXPR_WFL_NODE (DECL_NAME (method
));
6206 name
= DECL_NAME (method
);
6211 for (redef
= TYPE_METHODS (class); redef
; redef
= TREE_CHAIN (redef
))
6213 struct lang_type
*t
= TYPE_LANG_SPECIFIC (TREE_TYPE (redef
));
6215 if (! t
|| (redef
== method
))
6217 if (DECL_NAME (redef
) == name
&& sig
== t
->signature
)
6219 parse_error_context (cl
, "Duplicate method declaration");
6226 /* Check all the methods of CLASS. Methods are first completed then
6227 checked according to regular method existance rules.
6228 If no constructor were encountered, then build its declaration. */
6231 java_check_regular_methods (class_decl
)
6235 tree
class = CLASS_TO_HANDLE_TYPE (TREE_TYPE (class_decl
));
6236 tree super_class
= CLASSTYPE_SUPER (class);
6237 int seen_constructor
= 0;
6239 TYPE_METHODS (class) = nreverse (TYPE_METHODS (class));
6241 /* Should take interfaces into account. FIXME */
6242 for (method
= TYPE_METHODS (class); method
; method
= TREE_CHAIN (method
))
6245 tree method_wfl
= DECL_NAME (method
);
6248 if (DECL_CONSTRUCTOR_P (method
))
6249 seen_constructor
= 1;
6251 /* Check for redefinitions */
6252 if (check_method_redefinition (class, method
))
6255 sig
= build_java_argument_signature (TREE_TYPE (method
));
6257 found
= lookup_argument_method (super_class
, DECL_NAME (method
), sig
);
6260 /* Can't override a method with the same name and different return
6262 if (TREE_TYPE (TREE_TYPE (found
)) != TREE_TYPE (TREE_TYPE (method
)))
6263 parse_warning_context
6265 "Method `%s' redefined with different return type in class `%s'",
6266 lang_printable_name (found
),
6267 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found
)))));
6269 /* Can't override final. Can't override static. */
6270 if (METHOD_FINAL (found
) || METHOD_STATIC (found
))
6272 /* Static *can* override static */
6273 if (METHOD_STATIC (found
) && METHOD_STATIC (method
))
6277 "%s methods can't be overriden. Method `%s' is %s in class `%s'",
6278 (METHOD_FINAL (found
) ? "Final" : "Static"),
6279 lang_printable_name (found
),
6280 (METHOD_FINAL (found
) ? "final" : "static"),
6282 (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found
)))));
6285 /* Static method can't override instance method. */
6286 if (METHOD_STATIC (method
))
6290 "Instance methods can't be overriden by a static method. Method "
6291 "`%s' is an instance method in class `%s'",
6292 lang_printable_name (found
),
6294 (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found
)))));
6297 /* Overriding/hiding public must be public or
6298 overriding/hiding protected must be protected or public */
6299 if ((METHOD_PUBLIC (found
) && !METHOD_PUBLIC (method
)) ||
6300 (METHOD_PROTECTED (found
)
6301 && !(METHOD_PUBLIC (method
) || METHOD_PROTECTED (method
))))
6305 "Methods can't be overridden to be more private. Method `%s' is "
6306 "%s in class `%s'", lang_printable_name (found
),
6307 (METHOD_PUBLIC (found
) ? "public" : "protected"),
6309 (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found
)))));
6313 /* If the method has default access in an other package, then
6314 issue a warning that the current method doesn't override the one
6315 that was found elsewhere */
6316 aflags
= get_access_flags_from_decl (found
);
6317 if ((!aflags
|| (aflags
> ACC_PROTECTED
))
6318 && !class_in_current_package (DECL_CONTEXT (found
)))
6319 parse_warning_context
6320 (method_wfl
, "Method `%s' in class `%s' does not "
6321 "override the corresponding method in class `%s', which is "
6322 "private to a different package",
6323 lang_printable_name (found
),
6324 IDENTIFIER_POINTER (DECL_NAME (class_decl
)),
6325 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found
)))));
6327 /* Check on (default) package access. FIXME. */
6328 /* Inheriting multiple methods with the same signature. FIXME */
6331 TYPE_METHODS (class) = nreverse (TYPE_METHODS (class));
6333 if (!seen_constructor
)
6335 /* No constructor seen, we craft one, at line 0 */
6336 int saved_lineno
= lineno
;
6339 meth
= make_node (FUNCTION_TYPE
);
6340 TREE_TYPE (meth
) = void_type_node
;
6341 TYPE_ARG_TYPES (meth
) = NULL_TREE
;
6342 decl
= add_method (class, 0, init_identifier_node
,
6343 build_java_signature (meth
));
6344 DECL_CONSTRUCTOR_P (decl
) = 1;
6345 lineno
= saved_lineno
;
6349 /* Check abstract method of interface INTERFACE */
6352 java_check_abstract_methods (interface
)
6356 tree method
, basetype_vec
, found
;
6358 for (method
= TYPE_METHODS (interface
); method
; method
= TREE_CHAIN (method
))
6361 tree name
= DECL_NAME (method
);
6363 /* 2- Check for double definition inside the defining interface */
6364 if (check_method_redefinition (interface
, method
))
6367 /* 3- Overriding is OK as far as we preserve the return type and
6368 the thrown exceptions */
6369 found
= lookup_java_interface_method2 (interface
, method
);
6373 (lookup_cl (method
),
6374 "Method `%s' previously defined in interface `%s' is "
6375 "redefined with different return type in interface `%s'",
6376 lang_printable_name (found
),
6377 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found
)))),
6378 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (interface
))));
6383 /* 4- Inherited methods can't differ by their returned types */
6384 if (!(basetype_vec
= TYPE_BINFO_BASETYPES (interface
)))
6386 n
= TREE_VEC_LENGTH (basetype_vec
);
6387 for (i
= 0; i
< n
; i
++)
6389 tree sub_interface_method
, sub_interface
;
6390 tree vec_elt
= TREE_VEC_ELT (basetype_vec
, i
);
6393 sub_interface
= BINFO_TYPE (vec_elt
);
6394 for (sub_interface_method
= TYPE_METHODS (sub_interface
);
6395 sub_interface_method
;
6396 sub_interface_method
= TREE_CHAIN (sub_interface_method
))
6398 found
= lookup_java_interface_method2 (interface
,
6399 sub_interface_method
);
6400 if (found
&& (found
!= sub_interface_method
))
6402 (lookup_cl (sub_interface_method
),
6403 "Interface `%s' inherits method `%s' from interface `%s'. This "
6404 "method is redefined with a different return "
6405 "type in interface `%s'",
6406 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (interface
))),
6407 lang_printable_name (found
),
6409 (DECL_NAME (TYPE_NAME (DECL_CONTEXT (sub_interface_method
)))),
6411 (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found
)))));
6416 /* Check the method on all the defined classes. Should be done to the
6417 classes declared in the compilation unit only. FIXME */
6420 java_check_methods ()
6424 for (current
= ctxp
->class_list
; current
; current
= TREE_CHAIN (current
))
6425 if (CLASS_FROM_SOURCE_P (TREE_TYPE (current
)))
6427 tree
class = CLASS_TO_HANDLE_TYPE (TREE_TYPE (current
));
6429 if (CLASS_INTERFACE (TYPE_NAME (class)))
6430 java_check_abstract_methods (class);
6432 java_check_regular_methods (current
);
6436 /* Lookup methods in interfaces using their name and partial
6437 signature. Return a matching method only if their types differ. */
6440 lookup_java_interface_method2 (class, method_decl
)
6441 tree
class, method_decl
;
6444 tree basetype_vec
= TYPE_BINFO_BASETYPES (class), to_return
;
6449 n
= TREE_VEC_LENGTH (basetype_vec
);
6450 for (i
= 0; i
< n
; i
++)
6452 tree vec_elt
= TREE_VEC_ELT (basetype_vec
, i
), to_return
;
6453 if ((BINFO_TYPE (vec_elt
) != object_type_node
)
6455 lookup_java_method2 (BINFO_TYPE (vec_elt
), method_decl
, 1)))
6458 for (i
= 0; i
< n
; i
++)
6460 to_return
= lookup_java_interface_method2
6461 (BINFO_TYPE (TREE_VEC_ELT (basetype_vec
, i
)), method_decl
);
6469 /* Lookup method using their name and partial signature. Return a
6470 matching method only if their types differ. */
6473 lookup_java_method2 (clas
, method_decl
, do_interface
)
6474 tree clas
, method_decl
;
6477 tree method
, method_signature
, method_name
, method_type
;
6478 method_signature
= build_java_argument_signature (TREE_TYPE (method_decl
));
6479 method_name
= DECL_NAME (method_decl
);
6480 method_type
= TREE_TYPE (TREE_TYPE (method_decl
));
6482 while (clas
!= NULL_TREE
)
6484 for (method
= TYPE_METHODS (clas
);
6485 method
!= NULL_TREE
; method
= TREE_CHAIN (method
))
6487 tree method_sig
= build_java_argument_signature (TREE_TYPE (method
));
6488 if (DECL_NAME (method
) == method_name
6489 && method_sig
== method_signature
6490 && TREE_TYPE (TREE_TYPE (method
)) != method_type
)
6495 clas
= (do_interface
? NULL_TREE
: CLASSTYPE_SUPER (clas
));
6500 /* Return the line that matches DECL line number. Used during error
6507 static tree cl
= NULL_TREE
;
6512 if (cl
== NULL_TREE
)
6513 cl
= build_expr_wfl (NULL_TREE
, NULL
, 0, 0);
6515 EXPR_WFL_FILENAME_NODE (cl
) = get_identifier (DECL_SOURCE_FILE (decl
));
6516 EXPR_WFL_SET_LINECOL (cl
, DECL_SOURCE_LINE_FIRST (decl
), -1);
6521 /* Look for a simple name in the single-type import list */
6524 find_name_in_single_imports (name
)
6529 for (node
= ctxp
->import_list
; node
; node
= TREE_CHAIN (node
))
6530 if (TREE_VALUE (node
) == name
)
6531 return (EXPR_WFL_NODE (TREE_PURPOSE (node
)));
6536 /* Process all single-type import. */
6544 for (import
= ctxp
->import_list
; import
; import
= TREE_CHAIN (import
))
6546 tree to_be_found
= EXPR_WFL_NODE (TREE_PURPOSE (import
));
6548 /* Don't load twice something already defined. */
6549 if (IDENTIFIER_CLASS_VALUE (to_be_found
))
6551 QUALIFIED_P (to_be_found
) = 1;
6552 load_class (to_be_found
, 0);
6554 check_pkg_class_access (to_be_found
, TREE_PURPOSE (import
));
6555 if (!IDENTIFIER_CLASS_VALUE (to_be_found
))
6557 parse_error_context (TREE_PURPOSE (import
),
6558 "Class or interface `%s' not found in import",
6559 IDENTIFIER_POINTER (to_be_found
));
6568 /* Possibly find a class imported by a single-type import statement. Return
6569 1 if an error occured, 0 otherwise. */
6572 find_in_imports (class_type
)
6577 for (import
= ctxp
->import_list
; import
; import
= TREE_CHAIN (import
))
6578 if (TREE_VALUE (import
) == TYPE_NAME (class_type
))
6580 TYPE_NAME (class_type
) = EXPR_WFL_NODE (TREE_PURPOSE (import
));
6581 QUALIFIED_P (TYPE_NAME (class_type
)) = 1;
6582 return check_pkg_class_access (TYPE_NAME (class_type
),
6583 TREE_PURPOSE (import
));
6588 /* Process a import on demand statement (lazy) */
6591 read_import_entry (jcf
, dirp
, returned_name
)
6594 char **returned_name
;
6598 struct dirent
*direntp
= readdir (dirp
);
6601 *returned_name
= NULL
;
6606 *returned_name
= direntp
->d_name
;
6607 return (strlen (direntp
->d_name
));
6612 int current_dir_len
= strlen (jcf
->classname
);
6613 char *current_entry
;
6614 int current_entry_len
;
6616 /* Here we read a zip directory as a file directory. The files
6617 we're selecting must have the same root than the directory
6620 ZipDirectory
*zipd
= (ZipDirectory
*)jcf
->zipd
;
6624 current_entry
= ZIPDIR_FILENAME (zipd
);
6625 current_entry_len
= zipd
->filename_length
;
6626 while (current_entry_len
&& current_entry
[current_entry_len
] != '/')
6627 current_entry_len
--;
6628 /* If the path of the current file doesn't match the directory we're
6629 scanning, that the end of the search */
6630 current_entry_len
++;
6631 if (strncmp (jcf
->classname
, current_entry
, current_dir_len
))
6633 *returned_name
= NULL
;
6636 /* Ok, we have at least the same path. The position of the last '/'
6637 of the current file we're examining should match the size of
6638 name of the directory we're browsing, otherwise that an entry
6639 belonging to a sub directory, we want to skip it. */
6640 if (current_entry_len
!= current_dir_len
)
6641 zipd
= ZIPDIR_NEXT (zipd
);
6644 jcf
->zipd
= ZIPDIR_NEXT (zipd
); /* Prepare next read */
6645 *returned_name
= ¤t_entry
[current_entry_len
];
6646 return (zipd
->filename_length
- current_entry_len
);
6652 /* Read a import directory, gathering potential match for further type
6653 references. Indifferently reads a filesystem or a ZIP archive
6657 read_import_dir (wfl
)
6660 char *name
= IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl
));
6661 int name_len
= IDENTIFIER_LENGTH (EXPR_WFL_NODE (wfl
)), reclen
;
6663 tree dirname
= ident_subst (name
, name_len
, "", '.', '/', "");
6664 JCF jcfr
, *jcf
, *saved_jcf
= current_jcf
;
6665 char *founddirname
, *d_name
;
6666 struct ZipFileCache zip_cache
;
6671 if (!(founddirname
= find_class (name
, name_len
, jcf
, 0)))
6672 fatal ("Can't import `%s'", name
);
6673 if (jcf
->outofsynch
)
6674 jcf_out_of_synch (jcf
);
6675 if (jcf
->seen_in_zip
)
6676 jcf
->zipd
= ZIPDIR_NEXT ((ZipDirectory
*)jcf
->zipd
);
6678 else if (founddirname
&& (dirp
= opendir (founddirname
)))
6680 readdir (dirp
); readdir (dirp
);
6683 if (!founddirname
&& !dirp
)
6685 static int first
= 1;
6689 sprintf (buffer
, "Can't find default package `%s'. Check "
6690 "the CLASSPATH environment variable and the access to the "
6697 parse_error_context (wfl
, "Package `%s' not found in import", name
);
6698 current_jcf
= saved_jcf
;
6702 /* Here we should have a unified way of retrieving an entry, to be
6704 while ((reclen
= read_import_entry (jcf
, dirp
, &d_name
)))
6706 int java_or_class
= 0;
6709 && !strcmp (&d_name
[reclen
-5], ".java"))
6715 if (!java_or_class
&& (reclen
> 6) &&
6716 !strcmp (&d_name
[reclen
-6], ".class"))
6727 obstack_grow (&temporary_obstack
, name
, name_len
);
6728 obstack_1grow (&temporary_obstack
, '/');
6729 obstack_grow0 (&temporary_obstack
, d_name
, len
);
6730 id_name
= obstack_finish (&temporary_obstack
);
6732 node
= get_identifier (id_name
);
6733 IS_A_CLASSFILE_NAME (node
) = 1; /* Or soon to be */
6734 QUALIFIED_P (node
) = 1; /* As soon as we turn / into . */
6740 current_jcf
= saved_jcf
;
6743 /* Possibly find a type in the import on demands specified
6744 types. Returns 1 if an error occured, 0 otherwise. Run throught the
6745 entire list, to detected potential double definitions. */
6748 find_in_imports_on_demand (class_type
)
6751 tree node
, import
, node_to_use
;
6755 for (import
= ctxp
->import_demand_list
; import
; import
= TREE_CHAIN (import
))
6759 obstack_grow (&temporary_obstack
,
6760 IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import
))),
6761 IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import
))));
6762 obstack_1grow (&temporary_obstack
, '/');
6763 obstack_grow0 (&temporary_obstack
,
6764 IDENTIFIER_POINTER (TYPE_NAME (class_type
)),
6765 IDENTIFIER_LENGTH (TYPE_NAME (class_type
)));
6766 id_name
= obstack_finish (&temporary_obstack
);
6768 node
= maybe_get_identifier (id_name
);
6769 if (node
&& IS_A_CLASSFILE_NAME (node
))
6773 cl
= TREE_PURPOSE (import
);
6781 (import
, "Type `%s' also potentially defined in package `%s'",
6782 IDENTIFIER_POINTER (TYPE_NAME (class_type
)),
6783 IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import
))));
6790 /* Setup lineno so that it refers to the line of the import (in
6791 case we parse a class file and encounter errors */
6793 int saved_lineno
= lineno
;
6794 lineno
= EXPR_WFL_LINENO (cl
);
6795 TYPE_NAME (class_type
) = ident_subst (IDENTIFIER_POINTER (node_to_use
),
6796 IDENTIFIER_LENGTH (node_to_use
),
6798 QUALIFIED_P (TYPE_NAME (class_type
)) = 1;
6799 decl
= IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type
));
6800 /* If there is no DECL set for the class or if the class isn't
6801 loaded and not seen in source yet, the load */
6802 if (!decl
|| (!CLASS_LOADED_P (TREE_TYPE (decl
))
6803 && !CLASS_FROM_SOURCE_P (TREE_TYPE (decl
))))
6804 load_class (node_to_use
, 0);
6805 lineno
= saved_lineno
;
6806 return check_pkg_class_access (TYPE_NAME (class_type
), cl
);
6809 return (seen_once
< 0 ? 0 : seen_once
); /* It's ok not to have found */
6812 /* Check that CLASS_NAME refers to a PUBLIC class. Return 0 if no
6813 access violations were found, 1 otherwise. */
6816 check_pkg_class_access (class_name
, cl
)
6823 if (!QUALIFIED_P (class_name
) || !IDENTIFIER_CLASS_VALUE (class_name
))
6826 if (!(type
= TREE_TYPE (IDENTIFIER_CLASS_VALUE (class_name
))))
6829 if (!CLASS_PUBLIC (TYPE_NAME (type
)))
6832 (cl
, "Can't access %s `%s'. Only public classes and interfaces in "
6833 "other packages can be accessed",
6834 (CLASS_INTERFACE (TYPE_NAME (type
)) ? "interface" : "class"),
6835 IDENTIFIER_POINTER (class_name
));
6841 /* Local variable declaration. */
6844 declare_local_variables (modifier
, type
, vlist
)
6849 tree decl
, current
, returned_type
, type_wfl
, init_stmt
= NULL_TREE
;
6852 /* Push a new block if statement were seen between the last time we
6853 pushed a block and now. Keep a cound of block to close */
6854 if (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (current_function_decl
)))
6856 tree body
= DECL_FUNCTION_BODY (current_function_decl
);
6857 tree b
= enter_block ();
6858 BLOCK_EXPR_ORIGIN(b
) = body
;
6864 for (i
= 0; i
<= 10; i
++) if (1 << i
& modifier
) break;
6866 (ctxp
->modifier_ctx
[i
],
6867 (modifier
== ACC_FINAL
?
6868 "Unsupported JDK1.1 `final' locals" :
6869 "Only `final' is allowed as a local variables modifier"));
6873 if (unresolved_type_p (type
, &returned_type
))
6876 type
= returned_type
;
6880 type
= obtain_incomplete_type (type
);
6885 for (current
= vlist
; current
; current
= TREE_CHAIN (current
))
6887 tree wfl
= TREE_PURPOSE (current
);
6888 tree name
= EXPR_WFL_NODE (wfl
);
6889 tree init
= TREE_VALUE (current
);
6890 tree other
= lookup_name_in_blocks (name
);
6892 /* Don't try to use an INIT statement when an error was found */
6893 if (init
&& java_error_count
)
6898 (wfl
, "Variable `%s' is already defined in this method and was "
6899 "declared `%s %s' in line %d",
6900 IDENTIFIER_POINTER (name
), lang_printable_name (TREE_TYPE (other
)),
6901 IDENTIFIER_POINTER (name
), DECL_SOURCE_LINE (other
));
6904 if (!must_chain
&& TREE_CODE (type
) == RECORD_TYPE
)
6905 type
= promote_type (type
);
6906 /* Never layout this decl. This will be done when its scope
6908 decl
= build_decl_no_layout (VAR_DECL
, name
, type
);
6909 BLOCK_CHAIN_DECL (decl
);
6911 /* Add the initialization function to the current function's code */
6915 MODIFY_EXPR_FROM_INITIALIZATION_P (init
) = 1;
6916 java_method_add_stmt
6917 (current_function_decl
,
6918 build_debugable_stmt (EXPR_WFL_LINECOL (init
), init
));
6924 register_incomplete_type (JDEP_VARIABLE
, type_wfl
, decl
, type
);
6925 dep
= CLASSD_LAST (ctxp
->classd_list
);
6926 JDEP_GET_PATCH (dep
) = &TREE_TYPE (decl
);
6930 SOURCE_FRONTEND_DEBUG (("Defined locals"));
6933 /* Called during parsing. Build decls from argument list. */
6936 source_start_java_method (fndecl
)
6943 extern tree current_binding_level
;
6944 current_function_decl
= fndecl
;
6946 /* New scope for the function */
6948 for (tem
= TYPE_ARG_TYPES (TREE_TYPE (fndecl
)), i
= 0;
6949 tem
!= NULL_TREE
; tem
= TREE_CHAIN (tem
), i
++)
6951 tree type
= TREE_VALUE (tem
);
6952 tree name
= TREE_PURPOSE (tem
);
6954 /* If type is incomplete. Layout can't take place
6955 now. Create an incomplete decl and ask for the decl to be
6957 if (INCOMPLETE_TYPE_P (type
))
6960 parm_decl
= build_decl_no_layout (PARM_DECL
, name
, type
);
6962 register_incomplete_type (JDEP_PARM
, NULL_TREE
, NULL_TREE
, type
);
6963 jdep
= CLASSD_LAST (ctxp
->classd_list
);
6964 JDEP_MISC (jdep
) = name
;
6965 JDEP_GET_PATCH (jdep
) = &TREE_TYPE (parm_decl
);
6968 parm_decl
= build_decl (PARM_DECL
, name
, type
);
6970 BLOCK_CHAIN_DECL (parm_decl
);
6972 tem
= BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (current_function_decl
));
6973 BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (current_function_decl
)) =
6975 DECL_ARG_SLOT_COUNT (current_function_decl
) = i
;
6978 /* Called during expansion. Push decls formerly built from argument
6979 list so they're usable during expansion. */
6982 expand_start_java_method (fndecl
)
6988 extern tree current_binding_level
;
6989 current_function_decl
= fndecl
;
6991 announce_function (fndecl
);
6992 pushlevel (1); /* Push parameters */
6993 ptr
= &DECL_ARGUMENTS (fndecl
);
6994 tem
= BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (current_function_decl
));
6997 tree next
= TREE_CHAIN (tem
);
6998 DECL_ARG_TYPE (tem
) = TREE_TYPE (tem
);
6999 layout_decl (tem
, 0);
7001 INITIALIZED_P (tem
) = 1; /* Parms are initialized */
7003 ptr
= &TREE_CHAIN (tem
);
7007 pushdecl_force_head (DECL_ARGUMENTS (fndecl
));
7008 lineno
= DECL_SOURCE_LINE_FIRST (fndecl
);
7009 complete_start_java_method (fndecl
);
7012 /* Terminate a function and expand its body. */
7015 source_end_java_method ()
7017 tree fndecl
= current_function_decl
;
7019 java_parser_context_save_global ();
7020 lineno
= ctxp
->last_ccb_indent1
;
7022 /* Generate function's code */
7023 if (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (fndecl
))
7024 && ! flag_emit_class_files
)
7025 expand_expr_stmt (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (fndecl
)));
7027 /* pop out of its parameters */
7028 pushdecl_force_head (DECL_ARGUMENTS (fndecl
));
7030 BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl
)) = fndecl
;
7032 /* Generate rtl for function exit. */
7033 if (! flag_emit_class_files
)
7035 lineno
= DECL_SOURCE_LINE_LAST (fndecl
);
7036 expand_function_end (input_filename
, lineno
, 0);
7038 /* Run the optimizers and output assembler code for this function. */
7039 rest_of_compilation (fndecl
);
7042 current_function_decl
= NULL_TREE
;
7043 /* permanent_allocation (1); */
7044 java_parser_context_restore_global ();
7047 /* Record EXPR in the current function block. Complements compound
7048 expression second operand if necessary. */
7051 java_method_add_stmt (fndecl
, expr
)
7054 tree body
= BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (fndecl
));
7057 if (java_error_count
)
7059 if ((node
= add_stmt_to_compound (body
, NULL_TREE
, expr
)) == body
)
7062 BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (fndecl
)) = node
;
7063 TREE_SIDE_EFFECTS (node
) = 1;
7067 /* Add STMT to EXISTING if possible, otherwise create a new
7068 COMPOUND_EXPR and add STMT to it. */
7071 add_stmt_to_compound (existing
, type
, stmt
)
7072 tree existing
, type
, stmt
;
7076 if (existing
&& (TREE_CODE (existing
) == COMPOUND_EXPR
)
7077 && TREE_OPERAND (existing
, 1) == size_zero_node
)
7079 TREE_OPERAND (existing
, 1) = stmt
;
7080 TREE_TYPE (existing
) = type
;
7084 node
= build (COMPOUND_EXPR
, type
, existing
, stmt
);
7086 node
= build (COMPOUND_EXPR
, type
, stmt
, size_zero_node
);
7091 /* Hold THIS for the scope of the current public method decl. */
7092 static tree current_this
;
7094 /* Layout all class found during parsing */
7097 java_layout_classes ()
7100 for (current
= ctxp
->class_list
; current
; current
= TREE_CHAIN (current
))
7102 current_class
= TREE_TYPE (current
);
7103 TYPE_FIELDS (current_class
) = nreverse (TYPE_FIELDS (current_class
));
7104 if (!TYPE_SIZE (current_class
))
7105 safe_layout_class (current_class
);
7109 /* Expand all methods in all registered classes. */
7112 java_complete_expand_methods ()
7116 for (current
= ctxp
->class_list
; current
; current
= TREE_CHAIN (current
))
7118 extern tree current_constant_pool_data_ref
;
7119 tree class_type
= CLASS_TO_HANDLE_TYPE (TREE_TYPE (current
));
7123 current_class
= TREE_TYPE (current
);
7125 /* Initialize a new constant pool */
7126 init_outgoing_cpool ();
7128 /* Don't process function bodies in interfaces */
7129 if (!CLASS_INTERFACE (TYPE_NAME (current_class
)))
7130 for (decl
= TYPE_METHODS (class_type
); decl
; decl
= TREE_CHAIN (decl
))
7132 current_function_decl
= decl
;
7133 /* Don't generate debug info on line zero when expanding a
7134 generated constructor. */
7135 if (DECL_CONSTRUCTOR_P (decl
) && !DECL_FUNCTION_BODY (decl
))
7137 /* If we found errors, it's too dangerous to try to generate
7138 and expand a constructor */
7139 if (!java_error_count
)
7141 restore_line_number_status (1);
7142 java_complete_expand_method (decl
);
7143 restore_line_number_status (0);
7147 java_complete_expand_method (decl
);
7150 /* Make the class data, register it and run the rest of decl
7151 compilation on it */
7152 if (!java_error_count
&& ! flag_emit_class_files
)
7154 make_class_data (current_class
);
7156 rest_of_decl_compilation (TYPE_NAME (current_class
), (char*) 0, 1, 0);
7161 /* Complete and expand a method. */
7164 java_complete_expand_method (mdecl
)
7169 int no_ac_found
= 1;
7171 /* We generate some code for an empty constructor */
7172 if (DECL_CONSTRUCTOR_P (mdecl
) && !DECL_FUNCTION_BODY (mdecl
))
7174 tree arg_list
, func
, call
;
7175 tree method_type
= TREE_TYPE (mdecl
);
7176 tree class_type
= CLASS_TO_HANDLE_TYPE (current_class
);
7177 tree self_type
= (CLASSTYPE_SUPER (class_type
) ?
7178 CLASSTYPE_SUPER (class_type
) : class_type
);
7179 tree method_signature
=
7180 TYPE_LANG_SPECIFIC (method_type
)->signature
;
7182 lookup_java_constructor (CLASS_TO_HANDLE_TYPE (self_type
),
7184 tree block
, compound
;
7186 /* Fixe the begining/ending lines of the method so that with
7187 no_line_numbers set to 1 it doesn't generate debug info at
7188 line 1 for this artificial constructor. */
7189 DECL_SOURCE_LINE (mdecl
) = 1;
7190 DECL_SOURCE_LINE_MERGE (mdecl
, 1);
7191 source_start_java_method (mdecl
);
7192 arg_list
= BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (mdecl
));
7194 func
= build_known_method_ref (method
, method_type
, self_type
,
7195 method_signature
, arg_list
);
7197 if (! flag_emit_class_files
)
7198 func
= build1 (NOP_EXPR
, build_pointer_type (method_type
), func
);
7199 call
= build (CALL_EXPR
, TREE_TYPE (method_type
), func
,
7200 build_tree_list (NULL_TREE
, arg_list
), NULL_TREE
);
7201 TREE_SIDE_EFFECTS (call
) = 1;
7202 call
= build_class_init (self_type
, call
);
7203 compound
= java_method_add_stmt (mdecl
, call
);
7204 block
= exit_block ();
7205 BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (mdecl
)) = block
;
7206 /* The function decl, its block and the compound statement
7207 within this block are all of void type. */
7208 TREE_TYPE (block
) = TREE_TYPE (compound
) =
7209 TREE_TYPE (DECL_FUNCTION_BODY (mdecl
)) = void_type_node
;
7214 if (DECL_FUNCTION_BODY (mdecl
))
7216 expand_start_java_method (mdecl
);
7219 = (!METHOD_STATIC (mdecl
) ?
7220 BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (mdecl
)) : NULL_TREE
);
7222 if (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (mdecl
)) && no_ac_found
)
7223 java_complete_tree (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (mdecl
)));
7224 /* Don't go any further if we've found error(s) during the
7226 if (!java_error_count
)
7227 source_end_java_method ();
7231 /* Expand finals. */
7234 java_expand_finals ()
7238 /* Wrap non WFL PRIMARY around a WFL and set EXPR_WFL_QUALIFICATION to
7239 a tree list node containing RIGHT. Fore coming RIGHTs will be
7240 chained to this hook. LOCATION contains the location of the
7241 separating `.' operator. */
7244 make_qualified_primary (primary
, right
, location
)
7245 tree primary
, right
;
7250 /* We want to process THIS . xxx symbolicaly, to keep it consistent
7251 with the way we're processing SUPER. A THIS from a primary as a
7252 different form than a SUPER. Turn THIS into something symbolic */
7253 if (TREE_CODE (primary
) == JAVA_THIS_EXPR
)
7255 wfl
= build_wfl_node (this_identifier_node
, input_filename
, 0, 0);
7256 EXPR_WFL_LINECOL (wfl
) = EXPR_WFL_LINECOL (primary
);
7257 wfl
= make_qualified_name (wfl
, right
, location
);
7258 PRIMARY_P (wfl
) = 1;
7261 /* Other non WFL node are wrapped around a WFL */
7262 else if (TREE_CODE (primary
) != EXPR_WITH_FILE_LOCATION
)
7264 wfl
= build_expr_wfl (NULL_TREE
, ctxp
->filename
, 0, 0);
7265 EXPR_WFL_LINECOL (wfl
) = EXPR_WFL_LINECOL (primary
);
7266 EXPR_WFL_QUALIFICATION (wfl
) = build_tree_list (primary
, NULL_TREE
);
7271 if (!EXPR_WFL_QUALIFICATION (primary
))
7272 EXPR_WFL_QUALIFICATION (primary
) =
7273 build_tree_list (primary
, NULL_TREE
);
7276 EXPR_WFL_LINECOL (right
) = location
;
7277 chainon (EXPR_WFL_QUALIFICATION (wfl
), build_tree_list (right
, NULL_TREE
));
7278 PRIMARY_P (wfl
) = 1;
7282 /* Simple merge of two name separated by a `.' */
7285 merge_qualified_name (left
, right
)
7289 obstack_grow (&temporary_obstack
, IDENTIFIER_POINTER (left
),
7290 IDENTIFIER_LENGTH (left
));
7291 obstack_1grow (&temporary_obstack
, '.');
7292 obstack_grow0 (&temporary_obstack
, IDENTIFIER_POINTER (right
),
7293 IDENTIFIER_LENGTH (right
));
7294 node
= get_identifier (obstack_base (&temporary_obstack
));
7295 obstack_free (&temporary_obstack
, obstack_base (&temporary_obstack
));
7296 QUALIFIED_P (node
) = 1;
7300 /* Merge the two parts of a qualified name into LEFT. Set the
7301 location information of the resulting node to LOCATION, usually
7302 inherited from the location information of the `.' operator. */
7305 make_qualified_name (left
, right
, location
)
7310 tree left_id
= EXPR_WFL_NODE (left
);
7311 tree right_id
= EXPR_WFL_NODE (right
);
7314 merge
= merge_qualified_name (left_id
, right_id
);
7316 /* Left wasn't qualified and is now qualified */
7317 if (!QUALIFIED_P (left_id
))
7319 tree wfl
= build_expr_wfl (left_id
, ctxp
->filename
, 0, 0);
7320 EXPR_WFL_LINECOL (wfl
) = EXPR_WFL_LINECOL (left
);
7321 EXPR_WFL_QUALIFICATION (left
) = build_tree_list (wfl
, NULL_TREE
);
7324 wfl
= build_expr_wfl (right_id
, ctxp
->filename
, 0, 0);
7325 EXPR_WFL_LINECOL (wfl
) = location
;
7326 chainon (EXPR_WFL_QUALIFICATION (left
), build_tree_list (wfl
, NULL_TREE
));
7328 EXPR_WFL_NODE (left
) = merge
;
7332 /* Extract the last identifier component of the qualified in WFL. The
7333 last identifier is removed from the linked list */
7336 cut_identifier_in_qualified (wfl
)
7340 tree previous
= NULL_TREE
;
7341 for (q
= EXPR_WFL_QUALIFICATION (wfl
); ; previous
= q
, q
= TREE_CHAIN (q
))
7342 if (!TREE_CHAIN (q
))
7345 fatal ("Operating on a non qualified qualified WFL - "
7346 "cut_identifier_in_qualified");
7347 TREE_CHAIN (previous
) = NULL_TREE
;
7348 return TREE_PURPOSE (q
);
7352 /* Resolve the expression name NAME. Return its decl. */
7355 resolve_expression_name (id
)
7358 tree name
= EXPR_WFL_NODE (id
);
7361 /* 6.5.5.1: Simple expression names */
7362 if (!PRIMARY_P (id
) && !QUALIFIED_P (name
))
7364 /* 15.13.1: NAME can appear within the scope of a local variable
7366 if ((decl
= IDENTIFIER_LOCAL_VALUE (name
)))
7369 /* 15.13.1: NAME can appear within a class declaration */
7372 decl
= lookup_field_wrapper (current_class
, name
);
7375 int fs
= FIELD_STATIC (decl
);
7376 /* Instance variable (8.3.1.1) can't appear within
7377 static method, static initializer or initializer for
7378 a static variable. */
7379 if (!fs
&& METHOD_STATIC (current_function_decl
))
7382 (id
, "Can't make a static reference to nonstatic variable "
7383 "`%s' in class `%s'",
7384 IDENTIFIER_POINTER (name
),
7385 IDENTIFIER_POINTER (DECL_NAME
7386 (TYPE_NAME (current_class
))));
7387 return error_mark_node
;
7389 decl
= build_field_ref ((fs
? NULL_TREE
: current_this
),
7390 current_class
, name
);
7391 return (fs
? build_class_init (current_class
, decl
) : decl
);
7393 /* Fall down to error report on undefined variable */
7396 /* 6.5.5.2 Qualified Expression Names */
7399 qualify_ambiguous_name (id
);
7400 /* 15.10.1 Field Access Using a Primary and/or Expression Name */
7401 /* 15.10.2: Accessing Superclass Members using super */
7402 return resolve_field_access (id
, NULL
, NULL
);
7405 /* We've got an error here */
7406 parse_error_context (id
, "Undefined variable `%s'",
7407 IDENTIFIER_POINTER (name
));
7409 return error_mark_node
;
7412 /* 15.10.1 Field Acess Using a Primary and/or Expression Name.
7413 We return something suitable to generate the field access. We also
7414 return the field decl in FIELD_DECL and its type in FIELD_TYPE. If
7415 recipient's address can be null. */
7418 resolve_field_access (qual_wfl
, field_decl
, field_type
)
7420 tree
*field_decl
, *field_type
;
7424 tree decl
, where_found
, type_found
;
7426 if (resolve_qualified_expression_name (qual_wfl
, &decl
,
7427 &where_found
, &type_found
))
7428 return error_mark_node
;
7430 /* Resolve the LENGTH field of an array here */
7431 if (DECL_NAME (decl
) == length_identifier_node
&& TYPE_ARRAY_P (type_found
)
7432 && ! flag_emit_class_files
)
7434 tree length
= build_java_array_length_access (where_found
);
7436 build_java_arraynull_check (type_found
, length
, int_type_node
);
7438 /* We might have been trying to resolve field.method(). In which
7439 case, the resolution is over and decl is the answer */
7440 else if (DECL_P (decl
) && IDENTIFIER_LOCAL_VALUE (DECL_NAME (decl
)) == decl
)
7442 else if (DECL_P (decl
))
7444 is_static
= DECL_P (decl
) && FIELD_STATIC (decl
);
7445 field_ref
= build_field_ref ((is_static
? NULL_TREE
: where_found
),
7446 type_found
, DECL_NAME (decl
));
7447 if (field_ref
== error_mark_node
)
7448 return error_mark_node
;
7451 field_ref
= build_class_init (type_found
, field_ref
);
7452 /* If the static field was identified by an expression that
7453 needs to be generated, make the field access a compound
7454 expression whose first part of the evaluation of the
7455 field selector part. */
7456 if (where_found
&& TREE_CODE (where_found
) != TYPE_DECL
)
7458 tree type
= QUAL_DECL_TYPE (field_ref
);
7459 field_ref
= build (COMPOUND_EXPR
, type
, where_found
, field_ref
);
7469 *field_type
= QUAL_DECL_TYPE (decl
);
7473 /* 6.5.5.2: Qualified Expression Names */
7476 resolve_qualified_expression_name (wfl
, found_decl
, where_found
, type_found
)
7478 tree
*found_decl
, *type_found
, *where_found
;
7480 int from_type
= 0; /* Field search initiated from a type */
7481 int from_super
= 0, from_cast
= 0;
7482 int previous_call_static
= 0;
7484 tree decl
= NULL_TREE
, type
= NULL_TREE
, q
;
7485 *where_found
= NULL_TREE
;
7487 for (q
= EXPR_WFL_QUALIFICATION (wfl
); q
; q
= TREE_CHAIN (q
))
7489 tree qual_wfl
= QUAL_WFL (q
);
7491 /* 15.10.1 Field Access Using a Primary */
7493 switch (TREE_CODE (qual_wfl
))
7496 case JAVA_NEW_CLASS_EXPR
:
7497 /* If the access to the function call is a non static field,
7498 build the code to access it. */
7499 if (DECL_P (decl
) && !FIELD_STATIC (decl
))
7501 decl
= maybe_access_field (decl
, *where_found
, type
);
7502 if (decl
== error_mark_node
)
7505 /* And code for the function call */
7506 if (complete_function_arguments (qual_wfl
))
7509 patch_method_invocation_stmt (qual_wfl
, decl
, type
, &is_static
);
7510 if (*where_found
== error_mark_node
)
7512 *type_found
= type
= QUAL_DECL_TYPE (*where_found
);
7514 /* If the previous call was static and this one is too,
7515 build a compound expression to hold the two (because in
7516 that case, previous function calls aren't transported as
7517 forcoming function's argument. */
7518 if (previous_call_static
&& is_static
)
7520 decl
= build (COMPOUND_EXPR
, type
, decl
, *where_found
);
7521 TREE_SIDE_EFFECTS (decl
) = 1;
7525 previous_call_static
= is_static
;
7526 decl
= *where_found
;
7531 *where_found
= decl
= java_complete_tree (qual_wfl
);
7532 if (decl
== error_mark_node
)
7534 *type_found
= type
= QUAL_DECL_TYPE (decl
);
7539 /* If the access to the function call is a non static field,
7540 build the code to access it. */
7541 if (DECL_P (decl
) && !FIELD_STATIC (decl
))
7543 decl
= maybe_access_field (decl
, *where_found
, type
);
7544 if (decl
== error_mark_node
)
7547 /* And code for the array reference expression */
7548 decl
= java_complete_tree (qual_wfl
);
7549 if (decl
== error_mark_node
)
7551 type
= QUAL_DECL_TYPE (decl
);
7555 /* If we fall here, we weren't processing a (static) function call. */
7556 previous_call_static
= 0;
7558 /* It can be the keyword THIS */
7559 if (EXPR_WFL_NODE (qual_wfl
) == this_identifier_node
)
7564 (wfl
, "Keyword `this' used outside allowed context");
7567 /* We have to generate code for intermediate acess */
7568 *where_found
= decl
= current_this
;
7569 type
= QUAL_DECL_TYPE (decl
);
7573 /* 15.10.2 Accessing Superclass Members using SUPER */
7574 if (EXPR_WFL_NODE (qual_wfl
) == super_identifier_node
)
7577 /* Check on the restricted use of SUPER */
7578 if (METHOD_STATIC (current_function_decl
)
7579 || current_class
== object_type_node
)
7582 (wfl
, "Keyword `super' used outside allowed context");
7585 /* Otherwise, treat SUPER as (SUPER_CLASS)THIS */
7586 node
= build_cast (EXPR_WFL_LINECOL (qual_wfl
),
7587 CLASSTYPE_SUPER (current_class
),
7588 build_this (EXPR_WFL_LINECOL (qual_wfl
)));
7589 *where_found
= decl
= java_complete_tree (node
);
7590 *type_found
= type
= QUAL_DECL_TYPE (decl
);
7591 from_super
= from_type
= 1;
7595 /* 15.13.1: Can't search for field name in packages, so we
7596 assume a variable/class name was meant. */
7597 if (RESOLVE_PACKAGE_NAME_P (qual_wfl
))
7599 if (from_super
|| from_cast
)
7601 ((from_cast
? qual_wfl
: wfl
),
7602 "No variable `%s' defined in class `%s'",
7603 IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl
)),
7604 lang_printable_name (type
));
7607 (qual_wfl
, "Undefined variable or class name: `%s'",
7608 IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl
)));
7612 /* We have a type name. It's been already resolved when the
7613 expression was qualified. */
7614 else if (RESOLVE_TYPE_NAME_P (qual_wfl
))
7616 if (!(decl
= QUAL_RESOLUTION (q
)))
7617 return 1; /* Error reported already */
7619 if (not_accessible_p (TREE_TYPE (decl
), decl
, 0))
7622 (qual_wfl
, "Can't access %s field `%s.%s' from `%s'",
7623 java_accstring_lookup (get_access_flags_from_decl (decl
)),
7624 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type
))),
7625 IDENTIFIER_POINTER (DECL_NAME (decl
)),
7626 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class
))));
7630 type
= TREE_TYPE (decl
);
7633 /* We resolve and expression name */
7638 /* If there exists an early resolution, use it. That occurs
7639 only once and we know that there are more things to
7640 come. Don't do that when processing something after SUPER
7641 (we need more thing to be put in place below */
7642 if (!from_super
&& QUAL_RESOLUTION (q
))
7643 decl
= QUAL_RESOLUTION (q
);
7645 /* We have to search for a field, knowing the type of its
7646 container. The flag FROM_TYPE indicates that we resolved
7647 the last member of the expression as a type name, which
7648 means that for the resolution of this field, will check
7649 on other errors than if the it was resolved as a member
7650 of an other field. */
7654 if (!from_type
&& !JREFERENCE_TYPE_P (type
))
7657 (qual_wfl
, "Attempt to reference field `%s' in `%s %s'",
7658 IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl
)),
7659 lang_printable_name (type
),
7660 IDENTIFIER_POINTER (DECL_NAME (field_decl
)));
7665 lookup_field_wrapper (type
, EXPR_WFL_NODE (qual_wfl
))))
7668 (qual_wfl
, "No variable `%s' defined in class `%s'",
7669 IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl
)),
7670 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type
))));
7674 /* Check on accessibility here */
7675 if (not_accessible_p (type
, field_decl
, from_super
))
7679 "Can't access %s field `%s.%s' from `%s'",
7680 java_accstring_lookup
7681 (get_access_flags_from_decl (field_decl
)),
7682 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type
))),
7683 IDENTIFIER_POINTER (DECL_NAME (field_decl
)),
7685 (DECL_NAME (TYPE_NAME (current_class
))));
7689 /* There are things to check when fields are accessed
7690 from type. There are no restrictions on a static
7691 declaration of the field when it is accessed from an
7693 is_static
= FIELD_STATIC (field_decl
);
7694 if (!from_super
&& from_type
7695 && !TYPE_INTERFACE_P (type
) && !is_static
)
7698 (qual_wfl
, "Can't make a static reference to nonstatic "
7699 "variable `%s' in class `%s'",
7700 IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl
)),
7701 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type
))));
7704 from_cast
= from_super
= 0;
7706 /* If we need to generate something to get a proper handle
7707 on what this field is accessed from, do it now. */
7710 decl
= maybe_access_field (decl
, *where_found
, type
);
7711 if (decl
== error_mark_node
)
7715 /* We want to keep the location were found it, and the type
7717 *where_found
= decl
;
7720 /* This is the decl found and eventually the next one to
7726 type
= QUAL_DECL_TYPE (decl
);
7733 /* 6.6 Qualified name and access control. Returns 1 if MEMBER (a decl)
7734 can't be accessed from REFERENCE (a record type). */
7736 int not_accessible_p (reference
, member
, from_super
)
7737 tree reference
, member
;
7740 int access_flag
= get_access_flags_from_decl (member
);
7742 /* Access always granted for members declared public */
7743 if (access_flag
& ACC_PUBLIC
)
7746 /* Check access on protected members */
7747 if (access_flag
& ACC_PROTECTED
)
7749 /* Access granted if it occurs from within the package
7750 containing the class in which the protected member is
7752 if (class_in_current_package (DECL_CONTEXT (member
)))
7755 if (TREE_CODE (member
) == FUNCTION_DECL
&& DECL_CONSTRUCTOR_P (member
))
7757 /* Access from SUPER is granted */
7760 /* Otherwise, access isn't granted */
7765 /* If accessed with the form `super.member', then access is
7770 /* Otherwise, access is granted if occuring from the class where
7771 member is declared or a subclass of it */
7772 if (inherits_from_p (reference
, current_class
))
7778 /* Check access on private members. Access is granted only if it
7779 occurs from within the class in witch it is declared*/
7781 if (access_flag
& ACC_PRIVATE
)
7782 return (current_class
== DECL_CONTEXT (member
) ? 0 : 1);
7784 /* Default access are permitted only when occuring within the
7785 package in which the type (REFERENCE) is declared. In other words,
7786 REFERENCE is defined in the current package */
7788 return !class_in_current_package (reference
);
7790 /* Otherwise, access is granted */
7794 /* Returns 1 if class was declared in the current package, 0 otherwise */
7797 class_in_current_package (class)
7800 static tree cache
= NULL_TREE
;
7807 qualified_flag
= QUALIFIED_P (DECL_NAME (TYPE_NAME (class)));
7809 /* If the current package is empty and the name of CLASS is
7810 qualified, class isn't in the current package. If there is a
7811 current package and the name of the CLASS is not qualified, class
7812 isn't in the current package */
7813 if (!ctxp
->package
&& qualified_flag
|| ctxp
->package
&& !qualified_flag
)
7816 /* If there is not package and the name of CLASS isn't qualified,
7817 they belong to the same unnamed package */
7818 if (!ctxp
->package
&& !qualified_flag
)
7821 /* Compare the left part of the name of CLASS with the package name */
7822 breakdown_qualified (&left
, NULL
, DECL_NAME (TYPE_NAME (class)));
7823 if (ctxp
->package
== left
)
7831 /* This function may generate code to access DECL from WHERE. This is
7832 done only if certain conditions meet. */
7835 maybe_access_field (decl
, where
, type
)
7836 tree decl
, where
, type
;
7838 if (DECL_P (decl
) && decl
!= current_this
7839 && (!(TREE_CODE (decl
) != PARM_DECL
7840 && FIELD_STATIC (decl
)))
7841 && !IDENTIFIER_LOCAL_VALUE (DECL_NAME (decl
)))
7842 decl
= build_field_ref (where
? where
: current_this
,
7843 type
, DECL_NAME (decl
));
7847 /* Build a method invocation statement, by patching PATCH. If non NULL
7848 and according to the situation, PRIMARY and WHERE may be
7849 used. IS_STATIC is set to 1 if the invoked function is static. */
7852 patch_method_invocation_stmt (patch
, primary
, where
, is_static
)
7853 tree patch
, primary
, where
;
7856 tree wfl
= TREE_OPERAND (patch
, 0);
7857 tree args
= TREE_OPERAND (patch
, 1);
7858 tree name
= EXPR_WFL_NODE (wfl
);
7859 tree list
, class_type
;
7861 /* Should be overriden if everything goes well. Otherwise, if
7862 something fails, it should keep this value. It stop the
7863 evaluation of a bogus assignment. See java_complete_tree,
7864 MODIFY_EXPR: for the reasons why we sometimes want to keep on
7865 evaluating an assignment */
7866 TREE_TYPE (patch
) = error_mark_node
;
7868 /* Since lookup functions are messing with line numbers, save the
7870 java_parser_context_save_global ();
7872 /* 15.11.1: Compile-Time Step 1: Determine Class or Interface to Search */
7874 /* Resolution of qualified name, excluding constructors */
7875 if (QUALIFIED_P (name
) && !CALL_CONSTRUCTOR_P (patch
))
7877 tree class_decl
, identifier
, identifier_wfl
;
7878 /* Extract the last IDENTIFIER of the qualified
7879 expression. This is a wfl and we will use it's location
7880 data during error report. */
7881 identifier_wfl
= cut_identifier_in_qualified (wfl
);
7882 identifier
= EXPR_WFL_NODE (identifier_wfl
);
7884 /* Given the context, IDENTIFIER is syntactically qualified
7885 as a MethodName. We need to qualify what's before */
7886 qualify_ambiguous_name (wfl
);
7888 /* Package resolution are erroneous */
7889 if (RESOLVE_PACKAGE_NAME_P (wfl
))
7892 breakdown_qualified (&remainder
, NULL
, EXPR_WFL_NODE (wfl
));
7893 parse_error_context (wfl
, "Can't search method `%s' in package "
7894 "`%s'",IDENTIFIER_POINTER (identifier
),
7895 IDENTIFIER_POINTER (remainder
));
7896 return error_mark_node
;
7898 /* We're resolving a call from a type */
7899 else if (RESOLVE_TYPE_NAME_P (wfl
))
7901 tree decl
= QUAL_RESOLUTION (EXPR_WFL_QUALIFICATION (wfl
));
7902 tree name
= DECL_NAME (decl
);
7905 class_decl
= resolve_and_layout (name
, wfl
);
7906 if (CLASS_INTERFACE (decl
))
7909 (identifier_wfl
, "Can't make static reference to method "
7910 "`%s' in interface `%s'", IDENTIFIER_POINTER (identifier
),
7911 IDENTIFIER_POINTER (name
));
7912 return error_mark_node
;
7914 /* Look the method up in the type selector. The method ought
7916 type
= TREE_TYPE (class_decl
);
7917 list
= lookup_method_invoke (0, wfl
, type
, identifier
, args
);
7918 if (list
&& !METHOD_STATIC (list
))
7920 char *fct_name
= strdup ((char *)lang_printable_name (list
));
7923 "Can't make static reference to method `%s %s' in class `%s'",
7924 lang_printable_name (TREE_TYPE (TREE_TYPE (list
))), fct_name
,
7925 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type
))));
7927 return error_mark_node
;
7930 /* We're resolving an expression name */
7935 /* 1- Find the field to which the call applies */
7936 field
= resolve_field_access (wfl
, NULL
, &type
);
7937 if (field
== error_mark_node
)
7938 return error_mark_node
;
7940 /* 2- Do the layout of the class where the last field
7941 was found, so we can search it. */
7943 resolve_and_layout (DECL_NAME (TYPE_NAME (type
)), NULL_TREE
);
7945 /* 3- Retrieve a filtered list of method matches, Refine
7946 if necessary. In any cases, point out errors. */
7947 list
= lookup_method_invoke (0, identifier_wfl
, type
,
7950 /* 4- Add the field as an argument */
7951 args
= tree_cons (NULL_TREE
, field
, args
);
7954 /* CLASS_TYPE is used during the call to not_accessible_p and
7955 IDENTIFIER_WFL will be used to report any problem further */
7956 class_type
= TREE_TYPE (class_decl
);
7957 wfl
= identifier_wfl
;
7959 /* Resolution of simple names, names generated after a primary: or
7963 tree class_to_search
;
7964 int lc
; /* Looking for Constructor */
7966 /* We search constructor in their target class */
7967 if (CALL_CONSTRUCTOR_P (patch
))
7969 class_to_search
= resolve_no_layout (EXPR_WFL_NODE (wfl
), NULL_TREE
);
7970 if (!class_to_search
)
7973 (wfl
, "Class `%s' not found in type declaration",
7974 IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl
)));
7975 return error_mark_node
;
7978 /* Can't instantiate an abstract class */
7979 if (CLASS_ABSTRACT (class_to_search
))
7982 (wfl
, "Class `%s' is an abstract class. It can't be "
7983 "instantiated", IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl
)));
7984 return error_mark_node
;
7986 class_to_search
= TREE_TYPE (class_to_search
);
7989 /* This is a regular search in the local class, unless an
7990 alternate class is specified. */
7993 class_to_search
= (where
? where
: current_class
);
7997 /* NAME is a simple identifier or comes from a primary. Search
7998 in the class whose declaration contain the method being
8000 list
= lookup_method_invoke (lc
, wfl
, class_to_search
, name
, args
);
8002 /* Don't continue if no method were found, as the next statement
8003 can't be executed then. */
8004 if (!list
) return error_mark_node
;
8006 /* Check for static reference if non static methods */
8007 if (check_for_static_method_reference (wfl
, patch
, list
,
8008 class_to_search
, primary
))
8009 return error_mark_node
;
8011 /* Non static/constructor methods are called with the current
8012 object extra argument. If method is resolved as a primary,
8013 use the primary otherwise use the current THIS. */
8014 if (!CALL_CONSTRUCTOR_P (patch
) && !METHOD_STATIC (list
))
8015 args
= tree_cons (NULL_TREE
, primary
? primary
: current_this
, args
);
8017 class_type
= class_to_search
;
8020 /* Merge point of all resolution schemes. If we have nothing, this
8021 is an error, already signaled */
8022 if (!list
) return error_mark_node
;
8024 /* Check accessibility, position the is_static flag, build and
8026 if (not_accessible_p (class_type
, list
, 0))
8028 char *fct_name
= strdup ((char *)lang_printable_name (list
));
8030 (wfl
, "Can't access %s method `%s %s.%s' from `%s'",
8031 java_accstring_lookup (get_access_flags_from_decl (list
)),
8032 lang_printable_name (TREE_TYPE (TREE_TYPE (list
))),
8033 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class_type
))), fct_name
,
8034 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class
))));
8036 return error_mark_node
;
8040 *is_static
= METHOD_STATIC (list
);
8041 java_parser_context_restore_global ();
8042 return patch_invoke (patch
, list
, args
, wfl
);
8045 /* Check that we're not trying to do a static reference to a method in
8046 non static method. Return 1 if it's the case, 0 otherwise. */
8049 check_for_static_method_reference (wfl
, node
, method
, where
, primary
)
8050 tree wfl
, node
, method
, where
, primary
;
8052 if (METHOD_STATIC (current_function_decl
)
8053 && !METHOD_STATIC (method
) && !primary
&& !CALL_CONSTRUCTOR_P (node
))
8055 char *fct_name
= strdup ((char *)lang_printable_name (method
));
8057 (wfl
, "Can't make static reference to method `%s %s' in class `%s'",
8058 lang_printable_name (TREE_TYPE (TREE_TYPE (method
))), fct_name
,
8059 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (where
))));
8066 /* Patch an invoke expression METHOD and ARGS, based on its invocation
8070 patch_invoke (patch
, method
, args
, cl
)
8071 tree patch
, method
, args
;
8075 tree signature
= build_java_signature (TREE_TYPE (method
));
8078 switch (invocation_mode (method
, 0))
8080 case INVOKE_VIRTUAL
:
8081 dtable
= invoke_build_dtable (0, args
);
8082 func
= build_invokevirtual (dtable
, method
);
8085 func
= build_known_method_ref (method
, TREE_TYPE (method
),
8086 DECL_CONTEXT (method
),
8088 args
= nreverse (args
);
8092 fatal ("Unknown invocation mode - build_invoke");
8097 /* Ensure self_type is initialized, (invokestatic). FIXME */
8098 func
= build1 (NOP_EXPR
, build_pointer_type (TREE_TYPE (method
)), func
);
8099 TREE_TYPE (patch
) = TREE_TYPE (TREE_TYPE (method
));
8100 TREE_OPERAND (patch
, 0) = func
;
8101 TREE_OPERAND (patch
, 1) = args
;
8102 original_call
= patch
;
8104 /* We're calling a constructor. New is called an its returned value
8105 is an argument to the constructor. We build a COMPOUND_EXPR and
8106 use saved expression so that the overall NEW expression value is
8107 a pointer to a newly created and initialized class. */
8108 if (CALL_CONSTRUCTOR_P (original_call
))
8110 tree
class = DECL_CONTEXT (method
);
8111 tree c1
, saved_new
, size
, new;
8112 if (!TYPE_SIZE (class))
8113 safe_layout_class (class);
8114 size
= size_in_bytes (class);
8115 new = build (CALL_EXPR
, promote_type (class),
8116 build_address_of (alloc_object_node
),
8117 tree_cons (NULL_TREE
, build_class_ref (class),
8118 build_tree_list (NULL_TREE
,
8119 size_in_bytes (class))),
8121 saved_new
= save_expr (new);
8122 c1
= build_tree_list (NULL_TREE
, saved_new
);
8123 TREE_CHAIN (c1
) = TREE_OPERAND (original_call
, 1);
8124 TREE_OPERAND (original_call
, 1) = c1
;
8125 TREE_SET_CODE (original_call
, CALL_EXPR
);
8126 patch
= build (COMPOUND_EXPR
, TREE_TYPE (new), patch
, saved_new
);
8132 invocation_mode (method
, super
)
8136 int access
= get_access_flags_from_decl (method
);
8138 if (access
& ACC_STATIC
)
8139 return INVOKE_STATIC
;
8141 if (CLASS_FINAL (TYPE_NAME (DECL_CONTEXT (method
))))
8142 return INVOKE_STATIC
;
8145 return INVOKE_SUPER
;
8147 if (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (method
))))
8148 return INVOKE_INTERFACE
;
8150 if (DECL_CONSTRUCTOR_P (method
))
8151 return INVOKE_STATIC
;
8153 return INVOKE_VIRTUAL
;
8156 /* Retrieve a refined list of matching methods. */
8159 lookup_method_invoke (lc
, cl
, class, name
, arg_list
)
8162 tree
class, name
, arg_list
;
8164 tree method
= make_node (FUNCTION_TYPE
);
8165 tree arg_type_list
= NULL_TREE
;
8166 tree signature
, list
, node
, scratch
;
8168 for (node
= arg_list
; node
; node
= TREE_CHAIN (node
))
8172 build_tree_list (NULL_TREE
,
8173 promote_type (TREE_TYPE (TREE_VALUE (node
))));
8174 arg_type_list
= chainon (current_arg
, arg_type_list
);
8176 TYPE_ARG_TYPES (method
) = arg_type_list
;
8180 signature
= build_java_argument_signature (method
);
8181 list
= match_java_method (class, name
, signature
);
8182 list
= refine_accessible_methods_list (lc
, list
);
8186 TREE_TYPE (method
) = void_type_node
;
8187 signature
= build_java_signature (method
);
8188 list
= lookup_java_constructor (class, signature
);
8193 parse_error_context (cl
, "Can't find method `%s(%s)' in class `%s'",
8194 IDENTIFIER_POINTER (name
),
8195 IDENTIFIER_POINTER (signature
),
8196 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class))));
8203 if (TREE_CHAIN (list
))
8205 tree most_specific_list
= NULL_TREE
;
8207 /* 15.11.2.2 Choose the Most Specific Method */
8208 for (current
= list
; current
; current
= TREE_CHAIN (current
))
8211 tree method
= TREE_VALUE (list
);
8212 tree class_from
= DECL_CONTEXT (method
);
8213 for (rest
= TREE_CHAIN (current
); rest
; rest
= TREE_CHAIN (rest
))
8215 tree other
= TREE_VALUE (rest
);
8217 /* METHOD can be declared more specific with regard to OTHER iif:
8219 - The class METHOD belongs can be converted to the
8220 class OTHER belongs by method invocation conversion
8221 (5.3). Since we're dealing with classes here, it is
8222 covered by the identity conversion or the windening
8223 primitive conversion.
8225 - The types of the arguments of METHOD can be
8226 converted to the types of the arguments of OTHER by
8227 method invocation conversion (5.3). */
8229 if (valid_ref_assignconv_cast_p (class_from
,
8230 DECL_CONTEXT (other
), 0)
8231 && 1) /* Test on args non implemented */
8232 most_specific_list
= tree_cons (NULL_TREE
, method
,
8233 most_specific_list
);
8236 list
= most_specific_list
;
8239 if (!list
|| TREE_CHAIN (list
))
8241 parse_error_context (cl
, "Can't find method `%s(%s)' in class `%s'",
8242 IDENTIFIER_POINTER (name
),
8243 IDENTIFIER_POINTER (signature
),
8244 IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class))));
8248 /* 15.11.3 Is the Chosen Method Appropriate ? */
8250 return TREE_VALUE (list
);
8253 /* Refine accessible methods from the raw matching method list, as
8254 specified in 15.11.4.3. Return a (possibly empty) new method
8258 refine_accessible_methods_list (lc
, list
)
8259 int lc
; /* Looking for Constructor */
8262 #define ADD_TO_LIST_AND_CONTINUE \
8264 refined_list = tree_cons (NULL_TREE, method, refined_list); \
8267 tree node
, refined_list
= NULL_TREE
;
8268 tree current_class_name
= DECL_NAME (TYPE_NAME (current_class
));
8270 for (node
= list
; node
; node
= TREE_CHAIN (node
))
8272 int access
, identical
;
8273 tree class_from
, method
, class_from_name
;
8275 method
= TREE_VALUE (node
);
8277 /* Constructor not retained here, unless were specifically
8278 looking for them. */
8279 if (lc
&& DECL_CONSTRUCTOR_P (method
))
8280 ADD_TO_LIST_AND_CONTINUE
;
8282 access
= get_access_flags_from_decl (method
);
8283 class_from
= DECL_CONTEXT (method
);
8284 class_from_name
= DECL_NAME (TYPE_NAME (class_from
));
8286 identical
= identical_subpath_p (current_class_name
, class_from_name
);
8288 /* Check accessibility of class_from from the current one: This
8289 test has been already carried out when qualify_ambiguous_name
8290 tried to resolve a type found in an other package. It is not
8291 necessary to retest things here, the error has been already
8294 /* Public method are always OK */
8295 if (access
& ACC_PUBLIC
)
8296 ADD_TO_LIST_AND_CONTINUE
;
8298 /* Protected method access is OK if classes are from the
8299 same package or part of the same inheritance lineage */
8300 if ((access
& ACC_PROTECTED
)
8301 && (inherits_from_p (current_class
, class_from
) || identical
))
8302 ADD_TO_LIST_AND_CONTINUE
;
8304 /* Methods with default (package) access are OK if classes are
8305 from the same default package. */
8307 (!QUALIFIED_P (class_from_name
) && !QUALIFIED_P (current_class_name
)))
8308 ADD_TO_LIST_AND_CONTINUE
;
8310 /* Private method accessible iff current class is the node where
8311 the method is defined */
8312 if ((access
& ACC_PRIVATE
) && (class_from
== current_class
))
8313 ADD_TO_LIST_AND_CONTINUE
;
8315 #undef ADD_TO_LIST_AND_CONTINUE
8316 return refined_list
;
8319 /* Qualification routines */
8322 qualify_ambiguous_name (id
)
8325 tree qual
, qual_wfl
, name
, decl
, ptr_type
, saved_current_class
;
8326 int again
, super_found
= 0, this_found
= 0;
8328 /* We first qualify the first element, then derive qualification of
8329 others based on the first one. If the first element is qualified
8330 by a resolution (field or type), this resolution is stored in the
8331 QUAL_RESOLUTION of the qual element being examined. We need to
8332 save the current_class since the use of SUPER might change the
8334 saved_current_class
= current_class
;
8335 qual
= EXPR_WFL_QUALIFICATION (id
);
8338 /* Simple qualified expression feature a qual_wfl that is a
8339 WFL. Expression derived from a primary feature more complicated
8340 things like a CALL_EXPR. Expression from primary need to be
8341 worked out to extract the part on which the qualification will
8343 qual_wfl
= QUAL_WFL (qual
);
8344 switch (TREE_CODE (qual_wfl
))
8347 qual_wfl
= TREE_OPERAND (qual_wfl
, 0);
8348 if (TREE_CODE (qual_wfl
) != EXPR_WITH_FILE_LOCATION
)
8350 qual
= EXPR_WFL_QUALIFICATION (qual_wfl
);
8351 qual_wfl
= QUAL_WFL (qual
);
8354 case JAVA_NEW_CLASS_EXPR
:
8357 qual_wfl
= TREE_OPERAND (qual_wfl
, 0);
8360 name
= EXPR_WFL_NODE (qual_wfl
);
8361 ptr_type
= current_class
;
8363 /* If we have a THIS (from a primary), we set the context accordingly */
8364 if (name
== this_identifier_node
)
8366 qual
= TREE_CHAIN (qual
);
8367 qual_wfl
= QUAL_WFL (qual
);
8368 name
= EXPR_WFL_NODE (qual_wfl
);
8371 /* If we have a SUPER, we set the context accordingly */
8372 if (name
== super_identifier_node
)
8374 current_class
= CLASSTYPE_SUPER (ptr_type
);
8375 /* Check that there is such a thing as a super class. If not,
8376 return. The error will be caught later on, during the
8380 current_class
= saved_current_class
;
8383 qual
= TREE_CHAIN (qual
);
8384 /* Do one more interation to set things up */
8385 super_found
= again
= 1;
8389 /* If name appears within the scope of a location variable
8390 declaration or parameter declaration, then it is an expression
8391 name. We don't carry this test out if we're in the context of the
8392 use of SUPER or THIS */
8394 if (!this_found
&& !super_found
&& (decl
= IDENTIFIER_LOCAL_VALUE (name
)))
8396 RESOLVE_EXPRESSION_NAME_P (qual_wfl
) = 1;
8397 QUAL_RESOLUTION (qual
) = decl
;
8400 /* If within the class/interface NAME was found to be used there
8401 exists a (possibly inherited) field named NAME, then this is an
8403 else if ((decl
= lookup_field_wrapper (ptr_type
, name
)))
8405 RESOLVE_EXPRESSION_NAME_P (qual_wfl
) = 1;
8406 QUAL_RESOLUTION (qual
) = decl
;
8409 /* We reclassify NAME as a type name if:
8410 - NAME is a class/interface declared within the compilation
8411 unit containing NAME,
8412 - NAME is imported via a single-type-import declaration,
8413 - NAME is declared in an another compilation unit of the package
8414 of the compilation unit containing NAME,
8415 - NAME is declared by exactly on type-import-on-demand declaration
8416 of the compilation unit containing NAME. */
8417 else if ((decl
= resolve_and_layout (name
, NULL_TREE
)))
8419 RESOLVE_TYPE_NAME_P (qual_wfl
) = 1;
8420 QUAL_RESOLUTION (qual
) = decl
;
8423 /* Method call are expression name */
8424 else if (TREE_CODE (QUAL_WFL (qual
)) == CALL_EXPR
)
8425 RESOLVE_EXPRESSION_NAME_P (qual_wfl
) = 1;
8427 /* Check here that NAME isn't declared by more than one
8428 type-import-on-demand declaration of the compilation unit
8429 containing NAME. FIXME */
8431 /* Otherwise, NAME is reclassified as a package name */
8433 RESOLVE_PACKAGE_NAME_P (qual_wfl
) = 1;
8435 /* Propagate the qualification accross other components of the
8437 for (qual
= TREE_CHAIN (qual
); qual
;
8438 qual_wfl
= QUAL_WFL (qual
), qual
= TREE_CHAIN (qual
))
8440 if (RESOLVE_PACKAGE_NAME_P (qual_wfl
))
8441 RESOLVE_PACKAGE_NAME_P (QUAL_WFL (qual
)) = 1;
8443 RESOLVE_EXPRESSION_NAME_P (QUAL_WFL (qual
)) = 1;
8446 /* Store the global qualification for the ambiguous part of ID back
8448 if (RESOLVE_EXPRESSION_NAME_P (qual_wfl
))
8449 RESOLVE_EXPRESSION_NAME_P (id
) = 1;
8450 else if (RESOLVE_TYPE_NAME_P (qual_wfl
))
8451 RESOLVE_TYPE_NAME_P (id
) = 1;
8452 else if (RESOLVE_PACKAGE_NAME_P (qual_wfl
))
8453 RESOLVE_PACKAGE_NAME_P (id
) = 1;
8455 /* Restore the current class */
8456 current_class
= saved_current_class
;
8460 breakdown_qualified (left
, right
, source
)
8461 tree
*left
, *right
, source
;
8463 char *p
= IDENTIFIER_POINTER (source
), *base
;
8464 int l
= IDENTIFIER_LENGTH (source
);
8466 /* Breakdown NAME into REMAINDER . IDENTIFIER */
8469 while (*p
!= '.' && p
!= base
)
8472 /* We didn't find a '.'. Return an error */
8478 *right
= get_identifier (p
+1);
8479 *left
= get_identifier (IDENTIFIER_POINTER (source
));
8485 /* Return 1 if N1 and N2 have identical sub-path. */
8488 identical_subpath_p (n1
, n2
)
8493 if (!QUALIFIED_P (n1
) || !QUALIFIED_P (n2
))
8496 breakdown_qualified (&left1
, NULL
, n1
);
8497 breakdown_qualified (&left2
, NULL
, n2
);
8499 return left1
== left2
;
8503 not_initialized_as_it_should_p (decl
)
8508 if (TREE_CODE (decl
) == FIELD_DECL
8509 && METHOD_STATIC (current_function_decl
))
8511 return DECL_P (decl
) && !INITIALIZED_P (decl
);
8516 /* Patch tree nodes in a function body. When a BLOCK is found, push
8517 local variable decls if present. */
8520 java_complete_tree (node
)
8523 tree nn
, cn
, wfl_op1
, wfl_op2
;
8526 /* CONVERT_EXPR always has its type set, even though it needs to be
8528 if (TREE_TYPE (node
) && TREE_CODE (node
) != CONVERT_EXPR
)
8531 /* The switch block implements cases processing container nodes
8532 first. Contained nodes are always written back. Leaves come
8533 next and return a value. */
8534 switch (TREE_CODE (node
))
8538 /* 1- Block section.
8539 Set the local values on decl names so we can identify them
8540 faster when they're referenced. At that stage, identifiers
8541 are legal so we don't check for declaration errors. */
8542 for (cn
= BLOCK_EXPR_DECLS (node
); cn
; cn
= TREE_CHAIN (cn
))
8544 DECL_CONTEXT (cn
) = current_function_decl
;
8545 IDENTIFIER_LOCAL_VALUE (DECL_NAME (cn
)) = cn
;
8546 INITIALIZED_P (cn
) = 0;
8548 if (BLOCK_EXPR_BODY (node
))
8550 BLOCK_EXPR_BODY (node
) = java_complete_tree (BLOCK_EXPR_BODY (node
));
8551 if (BLOCK_EXPR_BODY (node
) == error_mark_node
)
8552 return error_mark_node
;
8554 /* Turn local bindings to null */
8555 for (cn
= BLOCK_EXPR_DECLS (node
); cn
; cn
= TREE_CHAIN (cn
))
8556 IDENTIFIER_LOCAL_VALUE (DECL_NAME (cn
)) = NULL_TREE
;
8558 TREE_TYPE (node
) = void_type_node
;
8561 /* 2- They are expressions but ultimately deal with statements */
8562 case LABELED_BLOCK_EXPR
:
8563 PUSH_LABELED_BLOCK (node
);
8564 if (LABELED_BLOCK_BODY (node
))
8565 COMPLETE_CHECK_OP_1 (node
);
8566 TREE_TYPE (node
) = void_type_node
;
8567 POP_LABELED_BLOCK ();
8570 case EXIT_BLOCK_EXPR
:
8571 /* We don't complete operand 1, because it's the return value of
8572 the EXIT_BLOCK_EXPR which doesn't exist it Java */
8573 return patch_bc_statement (node
);
8577 /* Check whether the loop was enclosed in a labeled
8578 statement. If not, create one, insert the loop in it and
8580 nn
= patch_loop_statement (node
);
8581 /* Anyways, walk the body of the loop */
8582 TREE_OPERAND (node
, 0) = java_complete_tree (TREE_OPERAND (node
, 0));
8583 if (TREE_OPERAND (node
, 0) == error_mark_node
)
8584 return error_mark_node
;
8585 TREE_TYPE (nn
) = TREE_TYPE (node
) = void_type_node
;
8586 /* If we returned something different, that's because we
8587 inserted a label. Pop the label too. */
8589 POP_LABELED_BLOCK ();
8594 TREE_OPERAND (node
, 0) = java_complete_tree (TREE_OPERAND (node
, 0));
8595 return patch_exit_expr (node
);
8599 TREE_OPERAND (node
, 0) = java_complete_tree (TREE_OPERAND (node
, 0));
8600 if (TREE_OPERAND (node
, 0) == error_mark_node
)
8601 return error_mark_node
;
8602 /* then-else branches */
8603 TREE_OPERAND (node
, 1) = java_complete_tree (TREE_OPERAND (node
, 1));
8604 if (TREE_OPERAND (node
, 1) == error_mark_node
)
8605 return error_mark_node
;
8606 TREE_OPERAND (node
, 2) = java_complete_tree (TREE_OPERAND (node
, 2));
8607 if (TREE_OPERAND (node
, 2) == error_mark_node
)
8608 return error_mark_node
;
8609 return patch_if_else_statement (node
);
8612 /* 3- Expression section */
8614 TREE_OPERAND (node
, 0) = java_complete_tree (TREE_OPERAND (node
, 0));
8615 TREE_OPERAND (node
, 1) = java_complete_tree (TREE_OPERAND (node
, 1));
8616 if (TREE_OPERAND (node
, 1) == error_mark_node
)
8617 return error_mark_node
;
8618 TREE_TYPE (node
) = TREE_TYPE (TREE_OPERAND (node
, 1));
8622 return patch_return (node
);
8624 case EXPR_WITH_FILE_LOCATION
:
8625 if (!EXPR_WFL_NODE (node
) /* Or a PRIMARY flag ? */
8626 || TREE_CODE (EXPR_WFL_NODE (node
)) == IDENTIFIER_NODE
)
8627 return resolve_expression_name (node
);
8630 EXPR_WFL_NODE (node
) = java_complete_tree (EXPR_WFL_NODE (node
));
8631 TREE_SIDE_EFFECTS (node
) = 1;
8632 if (EXPR_WFL_NODE (node
) == error_mark_node
)
8634 /* Its important for the evaluation of assignment that
8635 this mark on the TREE_TYPE is propagated. */
8636 TREE_TYPE (node
) = error_mark_node
;
8637 return error_mark_node
;
8640 TREE_TYPE (node
) = TREE_TYPE (EXPR_WFL_NODE (node
));
8644 case JAVA_NEW_ARRAY_EXPR
:
8645 /* Patch all the dimensions */
8647 for (cn
= TREE_OPERAND (node
, 1); cn
; cn
= TREE_CHAIN (cn
))
8649 int location
= EXPR_WFL_LINECOL (TREE_VALUE (cn
));
8650 tree dim
= java_complete_tree (TREE_VALUE (cn
));
8651 if (dim
== error_mark_node
)
8658 TREE_VALUE (cn
) = save_expr (dim
);
8659 /* Setup the location of the current dimension, for
8660 later error report. */
8662 build_expr_wfl (NULL_TREE
, input_filename
, 0, 0);
8663 EXPR_WFL_LINECOL (TREE_PURPOSE (cn
)) = location
;
8666 /* They complete the array creation expression, if no errors
8668 return (flag
? error_mark_node
: patch_newarray (node
));
8670 case JAVA_NEW_CLASS_EXPR
:
8672 /* Complete function's argument first */
8673 if (complete_function_arguments (node
))
8674 return error_mark_node
;
8676 return patch_method_invocation_stmt (node
, NULL_TREE
, NULL_TREE
, NULL
);
8679 /* Save potential wfls */
8680 wfl_op1
= TREE_OPERAND (node
, 0);
8681 wfl_op2
= TREE_OPERAND (node
, 1);
8682 TREE_OPERAND (node
, 0) = java_complete_tree (wfl_op1
);
8683 if (TREE_OPERAND (node
, 0) == error_mark_node
)
8684 return error_mark_node
;
8686 if (COMPOUND_ASSIGN_P (wfl_op2
))
8690 java_complete_tree (TREE_OPERAND (wfl_op2
, 0));
8692 /* Hand stablize the lhs on both places */
8693 lvalue
= stabilize_reference (other
);
8694 TREE_OPERAND (node
, 0) = lvalue
;
8695 TREE_OPERAND (TREE_OPERAND (node
, 1), 0) = lvalue
;
8698 /* There are cases where the type of RHS is fixed. In those
8699 cases, if the evaluation of the RHS fails, we further the
8700 evaluation of the assignment to detect more errors. */
8701 nn
= java_complete_tree (TREE_OPERAND (node
, 1));
8702 if (nn
== error_mark_node
)
8704 /* It's hopeless, but we can further things on to discover
8705 an error during the assignment. In any cases, the
8706 assignment operation fails. */
8707 if (TREE_CODE (TREE_OPERAND (node
, 1)) != EXPR_WITH_FILE_LOCATION
8708 && TREE_TYPE (TREE_OPERAND (node
, 1)) != error_mark_node
)
8709 patch_assignment (node
, wfl_op1
, wfl_op2
);
8711 /* Now, we still mark the lhs as initialized */
8712 if (DECL_P (TREE_OPERAND (node
, 0)))
8713 INITIALIZED_P (TREE_OPERAND (node
, 0)) = 1;
8715 return error_mark_node
;
8717 TREE_OPERAND (node
, 1) = nn
;
8718 return patch_assignment (node
, wfl_op1
, wfl_op2
);
8729 case TRUNC_MOD_EXPR
:
8731 case TRUTH_ANDIF_EXPR
:
8732 case TRUTH_ORIF_EXPR
:
8739 /* Operands 0 and 1 are WFL in certain cases only. patch_binop
8740 knows how to handle those cases. */
8741 wfl_op1
= TREE_OPERAND (node
, 0);
8742 wfl_op2
= TREE_OPERAND (node
, 1);
8743 TREE_OPERAND (node
, 0) = java_complete_tree (wfl_op1
);
8744 if (TREE_OPERAND (node
, 0) == error_mark_node
)
8745 return error_mark_node
;
8746 TREE_OPERAND (node
, 1) = java_complete_tree (wfl_op2
);
8747 if (TREE_OPERAND (node
, 1) == error_mark_node
)
8748 return error_mark_node
;
8749 return patch_binop (node
, wfl_op1
, wfl_op2
);
8751 case JAVA_UNARY_PLUS_EXPR
:
8753 case TRUTH_NOT_EXPR
:
8755 case PREDECREMENT_EXPR
:
8756 case PREINCREMENT_EXPR
:
8757 case POSTDECREMENT_EXPR
:
8758 case POSTINCREMENT_EXPR
:
8760 /* There are cases were wfl_op1 is a WFL. patch_unaryop knows
8761 how to handle those cases. */
8762 wfl_op1
= TREE_OPERAND (node
, 0);
8763 TREE_OPERAND (node
, 0) = java_complete_tree (wfl_op1
);
8764 if (TREE_OPERAND (node
, 0) == error_mark_node
)
8765 return error_mark_node
;
8766 return patch_unaryop (node
, wfl_op1
);
8769 /* There are cases were wfl_op1 is a WFL. patch_array_ref knows
8770 how to handle those cases. */
8771 wfl_op1
= TREE_OPERAND (node
, 0);
8772 TREE_OPERAND (node
, 0) = java_complete_tree (wfl_op1
);
8773 if (TREE_OPERAND (node
, 0) == error_mark_node
)
8774 return error_mark_node
;
8775 /* The same applies to wfl_op2 */
8776 wfl_op2
= TREE_OPERAND (node
, 1);
8777 TREE_OPERAND (node
, 1) = java_complete_tree (wfl_op2
);
8778 if (TREE_OPERAND (node
, 1) == error_mark_node
)
8779 return error_mark_node
;
8780 return patch_array_ref (node
, wfl_op1
, wfl_op2
);
8782 case JAVA_THIS_EXPR
:
8783 /* Can't use THIS in a static environment */
8786 EXPR_WFL_LINECOL (wfl_operator
) = EXPR_WFL_LINECOL (node
);
8787 parse_error_context (wfl_operator
, "Keyword `this' used outside "
8789 TREE_TYPE (node
) = error_mark_node
;
8790 return error_mark_node
;
8792 return current_this
;
8795 /* Build the internal string representation */
8796 push_obstacks (&permanent_obstack
, &permanent_obstack
);
8797 node
= get_identifier (TREE_STRING_POINTER (node
));
8798 location
= alloc_name_constant (CONSTANT_String
, node
);
8799 node
= build_ref_from_constant_pool (location
);
8800 TREE_TYPE (node
) = promote_type (string_type_node
);
8804 fatal ("No case for tree code `%s' - java_complete_tree\n",
8805 tree_code_name
[TREE_CODE (node
)]);
8810 /* Complete function call's argument. Return a non zero value is an
8814 complete_function_arguments (node
)
8820 for (cn
= TREE_OPERAND (node
, 1); cn
; cn
= TREE_CHAIN (cn
))
8822 tree wfl
= TREE_VALUE (cn
), parm
;
8823 parm
= java_complete_tree (wfl
);
8824 if (parm
== error_mark_node
)
8829 if (TREE_CODE (TREE_TYPE (parm
)) == RECORD_TYPE
)
8830 TREE_VALUE (cn
) = convert (promote_type (TREE_TYPE (parm
)), parm
);
8832 TREE_VALUE (cn
) = save_expr (parm
);
8833 if (not_initialized_as_it_should_p (parm
))
8835 ERROR_VARIABLE_NOT_INITIALIZED (wfl
, EXPR_WFL_NODE (wfl
));
8836 INITIALIZED_P (parm
) = 1;
8842 /* Sometimes (for loops and variable initialized during their
8843 declaration), we want to wrap a statement around a WFL and turn it
8847 build_debugable_stmt (location
, stmt
)
8851 if (TREE_CODE (stmt
) != EXPR_WITH_FILE_LOCATION
)
8853 stmt
= build_expr_wfl (stmt
, input_filename
, 0, 0);
8854 EXPR_WFL_LINECOL (stmt
) = location
;
8856 JAVA_MAYBE_GENERATE_DEBUG_INFO (stmt
);
8861 build_expr_block (body
, decls
)
8864 tree node
= make_node (BLOCK
);
8865 BLOCK_EXPR_DECLS (node
) = decls
;
8866 BLOCK_EXPR_BODY (body
);
8868 TREE_TYPE (node
) = TREE_TYPE (body
);
8869 TREE_SIDE_EFFECTS (node
) = 1;
8873 /* Create a new function block and link its supercontext to the
8874 previous block. The current function DECL is used as supercontext
8875 when enter_block is called for the first time for a given
8876 function. The current function body (DECL_FUNCTION_BODY) is set to
8877 the newly created block. */
8879 static block_level
= 0;
8884 tree b
= build_expr_block (NULL_TREE
, NULL_TREE
);
8885 tree fndecl
= current_function_decl
;
8887 if (!DECL_FUNCTION_BODY (fndecl
))
8889 BLOCK_SUPERCONTEXT (b
) = fndecl
;
8890 DECL_FUNCTION_BODY (fndecl
) = b
;
8894 BLOCK_SUPERCONTEXT (b
) = DECL_FUNCTION_BODY (fndecl
);
8895 DECL_FUNCTION_BODY (fndecl
) = b
;
8900 /* Exit a block by changing the current function body
8901 (DECL_FUNCTION_BODY) to the current block super context, only if
8902 the block being exited isn't the method's top level one. */
8907 tree b
= DECL_FUNCTION_BODY (current_function_decl
);
8909 if (BLOCK_SUPERCONTEXT (b
) != current_function_decl
)
8910 DECL_FUNCTION_BODY (current_function_decl
) = BLOCK_SUPERCONTEXT (b
);
8915 /* Lookup for NAME in the nested function's blocks, all the way up to
8916 the current toplevel one. It complies with Java's local variable
8920 lookup_name_in_blocks (name
)
8923 tree b
= DECL_FUNCTION_BODY (current_function_decl
);
8925 while (b
!= current_function_decl
)
8929 /* Paranoid sanity check. To be removed */
8930 if (TREE_CODE (b
) != BLOCK
)
8931 fatal ("non block expr function body - lookup_name_in_blocks");
8933 for (current
= BLOCK_EXPR_DECLS (b
); current
;
8934 current
= TREE_CHAIN (current
))
8935 if (DECL_NAME (current
) == name
)
8937 b
= BLOCK_SUPERCONTEXT (b
);
8943 maybe_absorb_scoping_blocks ()
8945 while (BLOCK_EXPR_ORIGIN (DECL_FUNCTION_BODY (current_function_decl
)))
8947 tree b
= exit_block ();
8948 java_method_add_stmt (current_function_decl
, b
);
8949 SOURCE_FRONTEND_DEBUG (("Absorbing scoping block at line %d", lineno
));
8954 /* This section of the source is reserved to build_* functions that
8955 are building incomplete tree nodes and the patch_* functions that
8956 are completing them. */
8958 /* Build an incomplete CALL_EXPR node. Encapsulate it within a WFL */
8961 build_method_invocation (name
, args
)
8965 tree call
= build (CALL_EXPR
, NULL_TREE
, name
, args
, NULL_TREE
);
8966 TREE_SIDE_EFFECTS (call
) = 1;
8967 /* Check on cases where NAME isn't a WFL. FIXME */
8968 EXPR_WFL_LINECOL (call
) = EXPR_WFL_LINECOL (name
);
8972 /* Build an incomplete assignment expression. */
8975 build_assignment (op
, op_location
, lhs
, rhs
)
8976 int op
, op_location
;
8980 /* Build the corresponding binop if we deal with a Compound
8981 Assignment operator. Mark the binop sub-tree as part of a
8982 Compound Assignment expression */
8983 if (op
!= ASSIGN_TK
)
8985 rhs
= build_binop (BINOP_LOOKUP (op
), op_location
, lhs
, rhs
);
8986 COMPOUND_ASSIGN_P (rhs
) = 1;
8988 assignment
= build (MODIFY_EXPR
, NULL_TREE
, lhs
, rhs
);
8989 TREE_SIDE_EFFECTS (assignment
) = 1;
8990 EXPR_WFL_LINECOL (assignment
) = op_location
;
8994 /* Print an INTEGER_CST node in a static buffer, and return the buffer. */
8997 print_int_node (node
)
9000 static char buffer
[80];
9001 if (TREE_CONSTANT_OVERFLOW (node
))
9002 sprintf (buffer
, "<overflow>");
9004 if (TREE_INT_CST_HIGH (node
) == 0)
9005 sprintf (buffer
, HOST_WIDE_INT_PRINT_UNSIGNED
,
9006 TREE_INT_CST_LOW (node
));
9007 else if (TREE_INT_CST_HIGH (node
) == -1
9008 && TREE_INT_CST_LOW (node
) != 0)
9011 sprintf (&buffer
[1], HOST_WIDE_INT_PRINT_UNSIGNED
,
9012 -TREE_INT_CST_LOW (node
));
9015 sprintf (buffer
, HOST_WIDE_INT_PRINT_DOUBLE_HEX
,
9016 TREE_INT_CST_HIGH (node
), TREE_INT_CST_LOW (node
));
9021 /* 15.25 Assignment operators. */
9024 patch_assignment (node
, wfl_op1
, wfl_op2
)
9029 tree rhs
= TREE_OPERAND (node
, 1);
9030 tree lvalue
= TREE_OPERAND (node
, 0);
9031 tree lhs_type
, rhs_type
, new_rhs
= NULL_TREE
;
9033 int error_found
= 0;
9034 int lvalue_from_array
= 0;
9036 /* Can't assign to a final. */
9037 if (DECL_P (lvalue
) && FIELD_FINAL (lvalue
))
9040 (wfl_op1
, "Can't assign a value to the final variable `%s'",
9041 IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl_op1
)));
9045 EXPR_WFL_LINECOL (wfl_operator
) = EXPR_WFL_LINECOL (node
);
9047 /* Lhs can be a named variable */
9048 if (DECL_P (lvalue
))
9050 INITIALIZED_P (lvalue
) = 1;
9051 lhs_type
= TREE_TYPE (lvalue
);
9053 /* Or Lhs can be a array acccess. Should that be lvalue ? FIXME +
9054 comment on reason why */
9055 else if (TREE_CODE (wfl_op1
) == ARRAY_REF
)
9057 lhs_type
= TREE_TYPE (lvalue
);
9058 lvalue_from_array
= 1;
9060 /* Or a field access */
9061 else if (TREE_CODE (lvalue
) == COMPONENT_REF
)
9062 lhs_type
= TREE_TYPE (lvalue
);
9063 /* Or a function return slot */
9064 else if (TREE_CODE (lvalue
) == RESULT_DECL
)
9065 lhs_type
= TREE_TYPE (lvalue
);
9066 /* Otherwise, this is an error */
9069 parse_error_context (wfl_op1
, "Invalid left hand side of assignment");
9073 rhs_type
= TREE_TYPE (rhs
);
9075 /* 5.2 Begin Assignment conversion */
9077 /* 5.1.1 Try Identity Conversion */
9078 if (lhs_type
== rhs_type
)
9081 /* 5.1.2 Try Widening Primitive Conversion */
9082 all_primitive
= JPRIMITIVE_TYPE_P (lhs_type
) && JPRIMITIVE_TYPE_P (rhs_type
);
9083 if (all_primitive
&& JINTEGRAL_TYPE_P (rhs_type
)
9084 && ((TYPE_PRECISION (rhs_type
) < TYPE_PRECISION (lhs_type
))
9085 || (JFLOAT_TYPE_P (lhs_type
) &&
9086 TYPE_PRECISION (rhs_type
) == TYPE_PRECISION (lhs_type
))))
9087 new_rhs
= convert (lhs_type
, rhs
);
9088 else if (all_primitive
&& JFLOAT_TYPE_P (rhs_type
)
9089 && (TYPE_PRECISION (rhs_type
) < TYPE_PRECISION (lhs_type
)))
9090 new_rhs
= convert (lhs_type
, rhs
);
9092 /* Try a narrowing primitive conversion:
9093 - expression is a constant expression of type int AND
9094 - variable is byte, short or char AND
9095 - The value of the expression is representable in the type of the
9097 else if (rhs_type
== int_type_node
&& TREE_CONSTANT (rhs
)
9098 && (lhs_type
== byte_type_node
|| lhs_type
== char_type_node
9099 || lhs_type
== short_type_node
))
9101 if (int_fits_type_p (rhs
, lhs_type
))
9102 new_rhs
= convert (lhs_type
, rhs
);
9104 parse_warning_context
9105 (wfl_op1
, "Constant expression `%s' to wide for narrowing "
9106 "primitive conversion to `%s'",
9107 print_int_node (rhs
), lang_printable_name (lhs_type
));
9108 /* Reported a warning that will turn into an error further
9109 down, so we don't return */
9112 /* 5.2 Try a reference conversion */
9113 else if (!JPRIMITIVE_TYPE_P (rhs_type
) && JREFERENCE_TYPE_P (lhs_type
))
9115 /* `null' may be assigned to any reference type */
9116 if (rhs
== null_pointer_node
)
9117 new_rhs
= null_pointer_node
;
9118 /* Try the reference assignment conversion */
9119 else if (valid_ref_assignconv_cast_p (rhs_type
, lhs_type
, 0))
9122 lhs_type
= promote_type (rhs_type
);
9125 /* 15.25.2 If we have a compound assignment, convert RHS into the
9127 else if (COMPOUND_ASSIGN_P (TREE_OPERAND (node
, 1)))
9128 new_rhs
= convert (lhs_type
, rhs
);
9130 /* Explicit cast required. This is an error */
9133 char *t1
= strdup ((char *)lang_printable_name (TREE_TYPE (rhs
)));
9134 char *t2
= strdup ((char *)lang_printable_name (lhs_type
));
9136 char operation
[32]; /* Max size known */
9138 /* If the assignment is part of a declaration, we use the WFL of
9139 the declared variable to point out the error and call it a
9140 declaration problem. If the assignment is a genuine =
9141 operator, we call is a operator `=' problem, otherwise we
9142 call it an assignment problem. In both of these last cases,
9143 we use the WFL of the operator to indicate the error. */
9145 if (MODIFY_EXPR_FROM_INITIALIZATION_P (node
))
9148 strcpy (operation
, "declaration");
9153 if (COMPOUND_ASSIGN_P (TREE_OPERAND (node
, 1)))
9154 strcpy (operation
, "assignment");
9155 else if (TREE_CODE (TREE_OPERAND (node
, 0)) == RESULT_DECL
)
9156 strcpy (operation
, "`return'");
9158 strcpy (operation
, "`='");
9162 (wfl
, (!can_cast_to_p (rhs_type
, lhs_type
) ?
9163 "Incompatible type for %s. Can't convert `%s' to `%s'" :
9164 "Incompatible type for %s. Explicit cast "
9165 "needed to convert `%s' to `%s'"), operation
, t1
, t2
);
9166 free (t1
); free (t2
);
9170 /* Before reporting type incompatibility errors, check that the rhs
9171 is initialized, if a variable */
9172 if (not_initialized_as_it_should_p (rhs
))
9174 ERROR_VARIABLE_NOT_INITIALIZED (wfl_op2
, DECL_NAME (rhs
));
9175 INITIALIZED_P (rhs
) = 1;
9179 return error_mark_node
;
9181 /* If we built a compound expression as the result of a reference
9182 assignment into an array element, return it here. */
9183 if (TREE_CODE (node
) == COMPOUND_EXPR
)
9186 TREE_OPERAND (node
, 0) = lvalue
;
9187 TREE_OPERAND (node
, 1) = new_rhs
;
9188 TREE_TYPE (node
) = lhs_type
;
9192 /* Check that SOURCE can be converted into DEST, at least with a
9193 cast. If the convertion can't occur at all, return 0 otherwise
9194 1. This function is used to produce accurate error messages on the
9195 reasons why an assignment failed. */
9198 can_cast_to_p (source
, dest
)
9202 if (TREE_CODE (source
) == POINTER_TYPE
)
9203 source
= TREE_TYPE (source
);
9204 if (TREE_CODE (dest
) == POINTER_TYPE
)
9205 dest
= TREE_TYPE (dest
);
9207 if (TREE_CODE (source
) == RECORD_TYPE
&& TREE_CODE (dest
) == RECORD_TYPE
)
9208 return valid_ref_assignconv_cast_p (source
, dest
, 1);
9210 else if (JNUMERIC_TYPE_P (source
) && JNUMERIC_TYPE_P (dest
))
9216 /* Check that something of SOURCE type can be assigned or cast to
9217 something of DEST type at runtime. Return 1 if the operation is
9218 valid, 0 otherwise. If CAST is set to 1, we're treating the case
9219 were SOURCE is cast into DEST, which borrows a lot of the
9220 assignment check. */
9223 valid_ref_assignconv_cast_p (source
, dest
, cast
)
9228 if (TREE_CODE (source
) == POINTER_TYPE
)
9229 source
= TREE_TYPE (source
);
9230 if (TREE_CODE (dest
) == POINTER_TYPE
)
9231 dest
= TREE_TYPE (dest
);
9232 /* Case where SOURCE is a class type */
9233 if (TYPE_CLASS_P (source
))
9235 if (TYPE_CLASS_P (dest
))
9236 return source
== dest
|| inherits_from_p (source
, dest
)
9237 || cast
&& inherits_from_p (dest
, source
);
9238 if (TYPE_INTERFACE_P (dest
))
9240 /* If doing a cast and SOURCE is final, the operation is
9241 always correct a compile time (because even if SOURCE
9242 does not implement DEST, a subclass of SOURCE might). */
9243 if (cast
&& !CLASS_FINAL (TYPE_NAME (source
)))
9245 /* Otherwise, SOURCE must implement DEST */
9246 return interface_of_p (dest
, source
);
9248 /* DEST is an array, cast permited if SOURCE is of Object type */
9249 return (cast
&& source
== object_type_node
? 1 : 0);
9251 if (TYPE_INTERFACE_P (source
))
9253 if (TYPE_CLASS_P (dest
))
9255 /* If not casting, DEST must be the Object type */
9257 return dest
== object_type_node
;
9258 /* We're doing a cast. The cast is always valid is class
9259 DEST is not final, otherwise, DEST must implement SOURCE */
9260 else if (!CLASS_FINAL (TYPE_NAME (source
)))
9263 return interface_of_p (source
, dest
);
9265 if (TYPE_INTERFACE_P (dest
))
9267 /* If doing a cast, then if SOURCE and DEST contain method
9268 with the same signature but different return type, then
9269 this is a (compile time) error */
9272 tree method_source
, method_dest
;
9274 tree source_sig
, dest_sig
;
9276 for (method_source
= TYPE_METHODS (source
); method_source
;
9277 method_source
= TREE_CHAIN (method_source
))
9280 build_java_argument_signature (TREE_TYPE (method_source
));
9281 source_type
= TREE_TYPE (TREE_TYPE (method_source
));
9282 source_name
= DECL_NAME (method_source
);
9283 for (method_dest
= TYPE_METHODS (dest
);
9284 method_dest
; method_dest
= TREE_CHAIN (method_dest
))
9286 build_java_argument_signature (TREE_TYPE (method_dest
))
9287 && source_name
== DECL_NAME (method_dest
)
9288 && source_type
!= TREE_TYPE (TREE_TYPE (method_dest
)))
9294 return source
== dest
|| interface_of_p (dest
, source
);
9299 if (TYPE_ARRAY_P (source
))
9301 if (TYPE_CLASS_P (dest
))
9302 return dest
== object_type_node
;
9303 if (TYPE_INTERFACE_P (dest
))
9304 return 0; /* Install test on Clonable. FIXME */
9307 tree source_element_type
= TYPE_ARRAY_ELEMENT (source
);
9308 tree dest_element_type
= TYPE_ARRAY_ELEMENT (dest
);
9310 if (source_element_type
== dest_element_type
)
9312 return valid_ref_assignconv_cast_p (source_element_type
,
9313 dest_element_type
, cast
);
9320 /* Build an incomplete binop expression. */
9323 build_binop (op
, op_location
, op1
, op2
)
9330 /* URSHIFT_EXPR is not part of what GCC understands, we can't directly build
9333 build ((op
== URSHIFT_EXPR
? RSHIFT_EXPR
: op
), NULL_TREE
, op1
, op2
);
9334 if (op
== URSHIFT_EXPR
)
9335 TREE_SET_CODE (binop
, op
);
9337 TREE_SIDE_EFFECTS (binop
) = 1;
9338 /* Store the location of the operator, for better error report. The
9339 string of the operator will be rebuild based on the OP value. */
9340 EXPR_WFL_LINECOL (binop
) = op_location
;
9344 /* Build the string of the operator retained by NODE. If NODE is part
9345 of a compound expression, add an '=' at the end of the string. This
9346 function is called when an error needs to be reported on an
9347 operator. The string is returned as a pointer to a static character
9351 operator_string (node
)
9354 #define BUILD_OPERATOR_STRING(S) \
9356 sprintf (buffer, "%s%s", S, (COMPOUND_ASSIGN_P (node) ? "=" : "")); \
9360 static char buffer
[10];
9361 switch (TREE_CODE (node
))
9363 case MULT_EXPR
: BUILD_OPERATOR_STRING ("*");
9364 case RDIV_EXPR
: BUILD_OPERATOR_STRING ("/");
9365 case TRUNC_MOD_EXPR
: BUILD_OPERATOR_STRING ("%");
9366 case PLUS_EXPR
: BUILD_OPERATOR_STRING ("+");
9367 case MINUS_EXPR
: BUILD_OPERATOR_STRING ("-");
9368 case LSHIFT_EXPR
: BUILD_OPERATOR_STRING ("<<");
9369 case RSHIFT_EXPR
: BUILD_OPERATOR_STRING (">>");
9370 case URSHIFT_EXPR
: BUILD_OPERATOR_STRING (">>>");
9371 case BIT_AND_EXPR
: BUILD_OPERATOR_STRING ("&");
9372 case BIT_XOR_EXPR
: BUILD_OPERATOR_STRING ("^");
9373 case BIT_IOR_EXPR
: BUILD_OPERATOR_STRING ("|");
9374 case TRUTH_ANDIF_EXPR
: BUILD_OPERATOR_STRING ("&&");
9375 case TRUTH_ORIF_EXPR
: BUILD_OPERATOR_STRING ("||");
9376 case EQ_EXPR
: BUILD_OPERATOR_STRING ("==");
9377 case NE_EXPR
: BUILD_OPERATOR_STRING ("!=");
9378 case GT_EXPR
: BUILD_OPERATOR_STRING (">");
9379 case GE_EXPR
: BUILD_OPERATOR_STRING (">=");
9380 case LT_EXPR
: BUILD_OPERATOR_STRING ("<");
9381 case LE_EXPR
: BUILD_OPERATOR_STRING ("<=");
9382 case JAVA_UNARY_PLUS_EXPR
: BUILD_OPERATOR_STRING ("+");
9383 case NEGATE_EXPR
: BUILD_OPERATOR_STRING ("-");
9384 case TRUTH_NOT_EXPR
: BUILD_OPERATOR_STRING ("!");
9385 case BIT_NOT_EXPR
: BUILD_OPERATOR_STRING ("~");
9386 case PREINCREMENT_EXPR
: /* Fall through */
9387 case POSTINCREMENT_EXPR
: BUILD_OPERATOR_STRING ("++");
9388 case PREDECREMENT_EXPR
: /* Fall through */
9389 case POSTDECREMENT_EXPR
: BUILD_OPERATOR_STRING ("--");
9391 fatal ("unregistered operator %s - operator_string",
9392 tree_code_name
[TREE_CODE (node
)]);
9395 #undef BUILD_OPERATOR_STRING
9398 /* Binary operators (15.16 up to 15.18). We return error_mark_node on
9399 errors but we modify NODE so that it contains the type computed
9400 according to the expression, when it's fixed. Otherwise, we write
9401 error_mark_node as the type. It allows us to further the analysis
9402 of remaining nodes and detects more errors in certain cases. */
9405 patch_binop (node
, wfl_op1
, wfl_op2
)
9410 tree op1
= TREE_OPERAND (node
, 0);
9411 tree op2
= TREE_OPERAND (node
, 1);
9412 tree op1_type
= TREE_TYPE (op1
);
9413 tree op2_type
= TREE_TYPE (op2
);
9415 int code
= TREE_CODE (node
);
9416 /* If 1, tell the routine that we have to return error_mark_node
9417 after checking for the initialization of the RHS */
9418 int error_found
= 0;
9420 /* Figure what is going to be checked first for initialization prior
9421 its use. If NODE is part of a compound assignment, we check the
9422 second operand first, otherwise the first one first. We also
9423 initialize the matching WFL for the error report. `cfi' stands
9424 for Check For Initialization */
9425 tree cfi
= (COMPOUND_ASSIGN_P (node
) ? op2
: op1
);
9426 tree cfi_wfl
= (COMPOUND_ASSIGN_P (node
) ? wfl_op2
: wfl_op1
);
9428 EXPR_WFL_LINECOL (wfl_operator
) = EXPR_WFL_LINECOL (node
);
9430 /* Check initialization of LHS first. We then silence further error
9431 message if the variable wasn't initialized */
9432 if (not_initialized_as_it_should_p (cfi
))
9434 ERROR_VARIABLE_NOT_INITIALIZED (cfi_wfl
, DECL_NAME (cfi
));
9435 INITIALIZED_P (op1
) = 1;
9440 /* 15.16 Multiplicative operators */
9441 case MULT_EXPR
: /* 15.16.1 Multiplication Operator * */
9442 case RDIV_EXPR
: /* 15.16.2 Division Operator / */
9443 case TRUNC_MOD_EXPR
: /* 15.16.3 Remainder operator % */
9444 if (!JPRIMITIVE_TYPE_P (op1_type
) || !JPRIMITIVE_TYPE_P (op2_type
))
9446 if (!JPRIMITIVE_TYPE_P (op1_type
))
9447 ERROR_CANT_CONVERT_TO_NUMERIC (wfl_operator
, node
, op1_type
);
9448 if (!JPRIMITIVE_TYPE_P (op2_type
) && (op1_type
!= op2_type
))
9449 ERROR_CANT_CONVERT_TO_NUMERIC (wfl_operator
, node
, op2_type
);
9450 TREE_TYPE (node
) = error_mark_node
;
9454 prom_type
= binary_numeric_promotion (op1_type
, op2_type
, &op1
, &op2
);
9455 /* Change the division operator if necessary */
9456 if (code
== RDIV_EXPR
&& TREE_CODE (prom_type
) == INTEGER_TYPE
)
9457 TREE_SET_CODE (node
, TRUNC_DIV_EXPR
);
9458 /* This one is more complicated. FLOATs are processed by a function
9459 call to soft_fmod. */
9460 if (code
== TRUNC_MOD_EXPR
)
9461 return build_java_binop (TRUNC_MOD_EXPR
, prom_type
, op1
, op2
);
9464 /* 15.17 Additive Operators */
9465 case PLUS_EXPR
: /* 15.17.1 String Concatenation Operator + */
9466 if (JSTRING_TYPE_P (op1_type
) || JSTRING_TYPE_P (op2_type
))
9467 fatal ("operator `+' non implemented on String - patch_binop");
9468 case MINUS_EXPR
: /* 15.17.2 Additive Operators (+ and -) for
9470 if (!JPRIMITIVE_TYPE_P (op1_type
) || !JPRIMITIVE_TYPE_P (op2_type
))
9472 if (!JPRIMITIVE_TYPE_P (op1_type
))
9473 ERROR_CANT_CONVERT_TO_NUMERIC (wfl_operator
, node
, op1_type
);
9474 if (!JPRIMITIVE_TYPE_P (op2_type
) && (op1_type
!= op2_type
))
9475 ERROR_CANT_CONVERT_TO_NUMERIC (wfl_operator
, node
, op2_type
);
9476 TREE_TYPE (node
) = error_mark_node
;
9480 prom_type
= binary_numeric_promotion (op1_type
, op2_type
, &op1
, &op2
);
9483 /* 15.18 Shift Operators */
9487 if (!JINTEGRAL_TYPE_P (op1_type
) || !JINTEGRAL_TYPE_P (op2_type
))
9489 if (!JINTEGRAL_TYPE_P (op1_type
))
9490 ERROR_CAST_NEEDED_TO_INTEGRAL (wfl_operator
, node
, op1_type
);
9493 (wfl_operator
, (JPRIMITIVE_TYPE_P (op2_type
) ?
9494 "Incompatible type for `%s'. Explicit cast needed to convert "
9495 "shift distance from `%s' to integral" :
9496 "Incompatible type for `%s'. Can't convert shift distance from "
9497 "`%s' to integral"),
9498 operator_string (node
), lang_printable_name (op2_type
));
9499 TREE_TYPE (node
) = error_mark_node
;
9504 /* Unary numeric promotion (5.6.1) is performed on each operand
9506 op1
= convert (promote_type (op1_type
), op1
);
9507 op2
= convert (promote_type (op2_type
), op2
);
9509 /* The type of the shift expression is the type of the promoted
9510 type of the left-hand operand */
9511 prom_type
= TREE_TYPE (op1
);
9513 /* Shift int only up to 0x1f and long up to 0x3f */
9514 if (prom_type
== int_type_node
)
9515 op2
= fold (build (BIT_AND_EXPR
, int_type_node
, op2
,
9516 build_int_2 (0x1f, 0)));
9518 op2
= fold (build (BIT_AND_EXPR
, int_type_node
, op2
,
9519 build_int_2 (0x3f, 0)));
9521 /* The >>> operator is a >> operating on unsigned quantities */
9522 if (code
== URSHIFT_EXPR
)
9524 op1
= convert (unsigned_type (prom_type
), op1
);
9525 TREE_SET_CODE (node
, RSHIFT_EXPR
);
9530 /* 15.21 Bitwise and Logical Operators */
9534 if (JINTEGRAL_TYPE_P (op1_type
) && JINTEGRAL_TYPE_P (op2_type
))
9535 /* Binary numeric promotion is performed on both operand and the
9536 expression retain that type */
9537 prom_type
= binary_numeric_promotion (op1_type
, op2_type
, &op1
, &op2
);
9539 else if (TREE_CODE (op1_type
) == BOOLEAN_TYPE
9540 && TREE_CODE (op1_type
) == BOOLEAN_TYPE
)
9541 /* The type of the bitwise operator expression is BOOLEAN */
9542 prom_type
= boolean_type_node
;
9545 if (!JINTEGRAL_TYPE_P (op1_type
))
9546 ERROR_CAST_NEEDED_TO_INTEGRAL (wfl_operator
, node
, op1_type
);
9547 if (!JINTEGRAL_TYPE_P (op2_type
) && (op1_type
!= op2_type
))
9548 ERROR_CAST_NEEDED_TO_INTEGRAL (wfl_operator
, node
, op2_type
);
9549 TREE_TYPE (node
) = error_mark_node
;
9551 /* Insert a break here if adding thing before the switch's
9552 break for this case */
9556 /* 15.22 Conditional-And Operator */
9557 case TRUTH_ANDIF_EXPR
:
9558 /* 15.23 Conditional-Or Operator */
9559 case TRUTH_ORIF_EXPR
:
9560 /* Operands must be of BOOLEAN type */
9561 if (TREE_CODE (op1_type
) != BOOLEAN_TYPE
||
9562 TREE_CODE (op2_type
) != BOOLEAN_TYPE
)
9564 if (TREE_CODE (op1_type
) != BOOLEAN_TYPE
)
9565 ERROR_CANT_CONVERT_TO_BOOLEAN (wfl_operator
, node
, op1_type
);
9566 if (TREE_CODE (op2_type
) != BOOLEAN_TYPE
&& (op1_type
!= op2_type
))
9567 ERROR_CANT_CONVERT_TO_BOOLEAN (wfl_operator
, node
, op2_type
);
9568 TREE_TYPE (node
) = boolean_type_node
;
9572 /* The type of the conditional operators is BOOLEAN */
9573 prom_type
= boolean_type_node
;
9576 /* 15.19.1 Numerical Comparison Operators <, <=, >, >= */
9581 /* The type of each of the operands must be a primitive numeric
9583 if (!JNUMERIC_TYPE_P (op1_type
) || ! JNUMERIC_TYPE_P (op2_type
))
9585 if (!JNUMERIC_TYPE_P (op1_type
))
9586 ERROR_CANT_CONVERT_TO_NUMERIC (wfl_operator
, node
, op1_type
);
9587 if (!JNUMERIC_TYPE_P (op2_type
) && (op1_type
!= op2_type
))
9588 ERROR_CANT_CONVERT_TO_NUMERIC (wfl_operator
, node
, op2_type
);
9589 TREE_TYPE (node
) = boolean_type_node
;
9593 /* Binary numeric promotion is performed on the operands */
9594 binary_numeric_promotion (op1_type
, op2_type
, &op1
, &op2
);
9595 /* The type of the relation expression is always BOOLEAN */
9596 prom_type
= boolean_type_node
;
9599 /* 15.20 Equality Operator */
9602 /* 15.20.1 Numerical Equality Operators == and != */
9603 /* Binary numeric promotion is performed on the operands */
9604 if (JPRIMITIVE_TYPE_P (op1_type
) && JPRIMITIVE_TYPE_P (op2_type
))
9605 binary_numeric_promotion (op1_type
, op2_type
, &op1
, &op2
);
9607 /* 15.20.2 Boolean Equality Operators == and != */
9608 else if (TREE_CODE (op1_type
) == BOOLEAN_TYPE
&&
9609 TREE_CODE (op2_type
) == BOOLEAN_TYPE
)
9610 ; /* Nothing to do here */
9612 /* 15.20.3 Reference Equality Operators == and != */
9613 /* Types have to be either references or the null type */
9614 else if ((op1
== null_pointer_node
|| op2
== null_pointer_node
9615 || JREFERENCE_TYPE_P (op1_type
)
9616 || JREFERENCE_TYPE_P (op2_type
))
9617 && ((op1_type
== op2_type
)
9618 /* The should use a can_cast_to_p() */
9620 ; /* Nothing to do here */
9622 /* Else we have an error figure what can't be converted into
9623 what and report the error */
9627 t1
= strdup ((char *)lang_printable_name (op1_type
));
9629 (wfl_operator
, "Incompatible type for `%s'. Can't convert `%s' "
9630 "to `%s'", operator_string (node
), t1
,
9631 lang_printable_name (op2_type
));
9633 TREE_TYPE (node
) = boolean_type_node
;
9637 prom_type
= boolean_type_node
;
9641 /* Then check the initialization of the RHS. We don't do that if
9642 we're dealing with a node that is part of a compound
9643 assignment. We then silence further error message if the variable
9644 wasn't initialized */
9645 if (not_initialized_as_it_should_p (op2
) && !COMPOUND_ASSIGN_P (node
))
9647 ERROR_VARIABLE_NOT_INITIALIZED (wfl_op2
, DECL_NAME (op2
));
9648 INITIALIZED_P (op2
) = 1;
9652 return error_mark_node
;
9654 TREE_OPERAND (node
, 0) = op1
;
9655 TREE_OPERAND (node
, 1) = op2
;
9656 TREE_TYPE (node
) = prom_type
;
9660 /* Build an incomplete unary operator expression. Unary `+' node is
9661 build as a CONV_EXPR, even though its tree code is overridden by a
9662 JAVA_UNARY_PLUS_EXPR that isn't a tree code, to differentiate it during
9666 build_unaryop (op_token
, op_location
, op1
)
9667 int op_token
, op_location
;
9674 case PLUS_TK
: op
= CONVERT_EXPR
; break;
9675 case MINUS_TK
: op
= NEGATE_EXPR
; break;
9676 case NEG_TK
: op
= TRUTH_NOT_EXPR
; break;
9677 case NOT_TK
: op
= BIT_NOT_EXPR
; break;
9678 default: fatal ("Unknown token `%d' for unary operator - build_unaryop",
9682 unaryop
= build1 (op
, NULL_TREE
, op1
);
9683 if (op_token
== PLUS_TK
)
9684 TREE_SET_CODE (unaryop
, JAVA_UNARY_PLUS_EXPR
);
9686 TREE_SIDE_EFFECTS (unaryop
) = 1;
9687 /* Store the location of the operator, for better error report. The
9688 string of the operator will be rebuild based on the OP value. */
9689 EXPR_WFL_LINECOL (unaryop
) = op_location
;
9693 /* Special case for the ++/-- operators, since they require an extra
9694 argument to build, which is set to NULL and patched
9695 later. IS_POST_P is 1 if the operator, 0 otherwise. */
9698 build_incdec (op_token
, op_location
, op1
, is_post_p
)
9699 int op_token
, op_location
;
9703 static enum tree_code lookup
[2][2] =
9705 { PREDECREMENT_EXPR
, PREINCREMENT_EXPR
, },
9706 { POSTDECREMENT_EXPR
, POSTINCREMENT_EXPR
, },
9708 tree node
= build (lookup
[is_post_p
][(op_token
- DECR_TK
)],
9709 NULL_TREE
, op1
, NULL_TREE
);
9710 TREE_SIDE_EFFECTS (node
) = 1;
9711 /* Store the location of the operator, for better error report. The
9712 string of the operator will be rebuild based on the OP value. */
9713 EXPR_WFL_LINECOL (node
) = op_location
;
9717 /* Build an incomplete cast operator, based on the use of the
9718 CONVERT_EXPR. Note that TREE_TYPE of the constructed node is
9719 set. java_complete_tree is trained to walk a CONVERT_EXPR even
9720 though its type is already set. */
9723 build_cast (location
, type
, exp
)
9727 tree node
= build1 (CONVERT_EXPR
, type
, exp
);
9728 EXPR_WFL_LINECOL (node
) = location
;
9732 /* 15.14 Unary operators. We return error_mark_node in case of error,
9733 but preserve the type of NODE if the type is fixed. */
9736 patch_unaryop (node
, wfl_op
)
9740 tree op
= TREE_OPERAND (node
, 0);
9741 tree op_type
= TREE_TYPE (op
);
9742 tree prom_type
, value
;
9743 int code
= TREE_CODE (node
);
9744 int error_found
= 0;
9746 EXPR_WFL_LINECOL (wfl_operator
) = EXPR_WFL_LINECOL (node
);
9750 /* 15.13.2 Postfix Increment Operator ++ */
9751 case POSTINCREMENT_EXPR
:
9752 /* 15.13.3 Postfix Increment Operator -- */
9753 case POSTDECREMENT_EXPR
:
9754 /* 15.14.1 Prefix Increment Operator ++ */
9755 case PREINCREMENT_EXPR
:
9756 /* 15.14.2 Prefix Decrement Operator -- */
9757 case PREDECREMENT_EXPR
:
9760 parse_error_context (wfl_operator
, "Invalid argument to `%s'",
9761 operator_string (node
));
9762 TREE_TYPE (node
) = error_mark_node
;
9765 else if (FIELD_FINAL (op
))
9768 (wfl_op
, "Can't assign a value to the final variable `%s'",
9769 IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl_op
)));
9770 TREE_TYPE (node
) = error_mark_node
;
9773 /* From now on, we know that op if a variable and that it has a
9774 valid wfl. We use wfl_op to locate errors related to the
9776 else if (!JNUMERIC_TYPE_P (op_type
))
9779 (wfl_op
, "Invalid argument type `%s' to `%s'",
9780 lang_printable_name (op_type
), operator_string (node
));
9781 TREE_TYPE (node
) = error_mark_node
;
9786 /* Before the addition, binary numeric promotion if performed on
9788 value
= integer_one_node
;
9789 prom_type
= binary_numeric_promotion (op_type
, TREE_TYPE (value
),
9791 /* And write the promoted increment back */
9792 TREE_OPERAND (node
, 1) = value
;
9796 /* 15.14.3 Unary Plus Operator + */
9797 case JAVA_UNARY_PLUS_EXPR
:
9798 /* 15.14.4 Unary Minus Operator - */
9800 if (!JNUMERIC_TYPE_P (op_type
))
9802 ERROR_CANT_CONVERT_TO_NUMERIC (wfl_operator
, node
, op_type
);
9803 TREE_TYPE (node
) = error_mark_node
;
9806 /* Unary numeric promotion is performed on operand */
9809 prom_type
= promote_type (op_type
);
9810 op
= convert (prom_type
, op
);
9811 if (code
== JAVA_UNARY_PLUS_EXPR
)
9816 /* 15.14.5 Bitwise Complement Operator ~ */
9818 if (!JINTEGRAL_TYPE_P (op_type
))
9820 ERROR_CAST_NEEDED_TO_INTEGRAL (wfl_operator
, node
, op_type
);
9821 TREE_TYPE (node
) = error_mark_node
;
9826 prom_type
= promote_type (op_type
);
9827 op
= convert (prom_type
, op
);
9831 /* 15.14.6 Logical Complement Operator ! */
9832 case TRUTH_NOT_EXPR
:
9833 if (TREE_CODE (op_type
) != BOOLEAN_TYPE
)
9835 ERROR_CANT_CONVERT_TO_BOOLEAN (wfl_operator
, node
, op_type
);
9836 TREE_TYPE (node
) = boolean_type_node
;
9840 prom_type
= boolean_type_node
;
9843 /* 15.15 Cast Expression */
9845 value
= patch_cast (node
, wfl_op
, wfl_operator
);
9846 if (value
== error_mark_node
)
9848 TREE_TYPE (node
) = error_mark_node
;
9856 /* Check variable initialization */
9857 if (not_initialized_as_it_should_p (op
))
9859 ERROR_VARIABLE_NOT_INITIALIZED (wfl_op
, DECL_NAME (op
));
9860 INITIALIZED_P (op
) = 1;
9864 return error_mark_node
;
9865 /* In the case of JAVA_UNARY_PLUS_EXPR, we replaced NODE by a new one */
9866 else if (code
!= JAVA_UNARY_PLUS_EXPR
&& code
!= CONVERT_EXPR
)
9868 TREE_OPERAND (node
, 0) = op
;
9869 TREE_TYPE (node
) = prom_type
;
9874 /* Generic type resolution that sometimes takes place during node
9875 patching. Returned the resolved type or generate an error
9876 message. Return the resolved type or NULL_TREE. */
9879 resolve_type_during_patch (type
)
9882 if (unresolved_type_p (type
, NULL
))
9884 tree type_decl
= resolve_no_layout (EXPR_WFL_NODE (type
), NULL_TREE
);
9887 parse_error_context (type
,
9888 "Class `%s' not found in type declaration",
9889 IDENTIFIER_POINTER (EXPR_WFL_NODE (type
)));
9893 return TREE_TYPE (type_decl
);
9897 /* 5.5 Casting Conversion. error_mark_node is returned if an error is
9898 found. Otherwise NODE or something meant to replace it is returned. */
9901 patch_cast (node
, wfl_op
, wfl_operator
)
9906 tree op
= TREE_OPERAND (node
, 0);
9907 tree op_type
= TREE_TYPE (op
);
9908 tree cast_type
= TREE_TYPE (node
);
9911 /* First resolve OP_TYPE if unresolved */
9912 if (!(cast_type
= resolve_type_during_patch (cast_type
)))
9913 return error_mark_node
;
9915 /* Check on cast that are proven correct at compile time */
9916 if (JNUMERIC_TYPE_P (cast_type
) && JNUMERIC_TYPE_P (op_type
))
9918 static tree
convert_narrow ();
9920 if (cast_type
== op_type
)
9923 /* Try widening/narowwing convertion. Potentially, things need
9924 to be worked out in gcc so we implement the extreme cases
9925 correctly. fold_convert() needs to be fixed. */
9926 return convert (cast_type
, op
);
9929 /* The remaining legal casts involve conversion between reference
9930 types. Check for their compile time correctness. */
9931 if (JREFERENCE_TYPE_P (op_type
) && JREFERENCE_TYPE_P (cast_type
)
9932 && valid_ref_assignconv_cast_p (op_type
, cast_type
, 1))
9934 TREE_TYPE (node
) = promote_type (cast_type
);
9935 /* Now, the case can be determined correct at compile time if
9936 OP_TYPE can be converted into CAST_TYPE by assignment
9939 if (valid_ref_assignconv_cast_p (op_type
, cast_type
, 0))
9942 /* The cast requires a run-time check */
9943 return build (CALL_EXPR
, promote_type (cast_type
),
9944 build_address_of (soft_checkcast_node
),
9945 tree_cons (NULL_TREE
, build_class_ref (cast_type
),
9946 build_tree_list (NULL_TREE
, op
)),
9950 /* Any other casts are proven incorrect at compile time */
9951 t1
= strdup ((char *)lang_printable_name (op_type
));
9952 parse_error_context (wfl_operator
, "Invalid cast from `%s' to `%s'",
9953 t1
, lang_printable_name (cast_type
));
9955 return error_mark_node
;
9958 /* Build an ARRAY_REF incomplete tree node. Note that operand 1 isn't
9959 a list of indices. */
9961 build_array_ref (location
, array
, index
)
9965 tree node
= build (ARRAY_REF
, NULL_TREE
, array
, index
);
9966 EXPR_WFL_LINECOL (node
) = location
;
9970 /* 15.12 Array Access Expression */
9973 patch_array_ref (node
, wfl_array
, wfl_index
)
9974 tree node
, wfl_array
, wfl_index
;
9976 tree array
= TREE_OPERAND (node
, 0);
9977 tree array_type
= TREE_TYPE (array
);
9978 tree index
= TREE_OPERAND (node
, 1);
9979 tree index_type
= TREE_TYPE (index
);
9980 tree promoted_index_type
;
9981 int error_found
= 0;
9983 EXPR_WFL_LINECOL (wfl_operator
) = EXPR_WFL_LINECOL (node
);
9985 if (not_initialized_as_it_should_p (array
))
9987 ERROR_VARIABLE_NOT_INITIALIZED (wfl_array
, DECL_NAME (array
));
9988 INITIALIZED_P (array
) = 1;
9990 if (! flag_emit_class_files
)
9991 array
= save_expr (array
);
9993 if (TREE_CODE (array_type
) == POINTER_TYPE
)
9994 array_type
= TREE_TYPE (array_type
);
9996 /* The array reference must be an array */
9997 if (!TYPE_ARRAY_P (array_type
))
10000 (wfl_operator
, "`[]' can only be applied to arrays. It can't be "
10001 "applied to `%s'", lang_printable_name (array_type
));
10002 TREE_TYPE (node
) = error_mark_node
;
10006 /* The array index underdoes unary numeric promotion. The promoted
10007 type must be int */
10008 promoted_index_type
= promote_type (index_type
);
10009 if (promoted_index_type
!= int_type_node
)
10011 int could_cast
= can_cast_to_p (index_type
, int_type_node
);
10012 parse_error_context
10014 (could_cast
? "Incompatible type for `[]'. Explicit cast needed to "
10015 "convert `%s' to `int'" : "Incompatible type for `[]'. "
10016 "Can't convert `%s' to `int'"),
10017 lang_printable_name (index_type
));
10018 TREE_TYPE (node
) = error_mark_node
;
10022 /* Now if the index is a var/parm decl, check on its initialization */
10023 if (not_initialized_as_it_should_p (index
))
10025 ERROR_VARIABLE_NOT_INITIALIZED (wfl_index
, DECL_NAME (index
));
10026 INITIALIZED_P (index
) = 1;
10030 return error_mark_node
;
10031 index
= convert (promoted_index_type
, index
);
10033 if (TREE_CODE (array_type
) == RECORD_TYPE
)
10034 array_type
= promote_type (TYPE_ARRAY_ELEMENT (array_type
));
10035 if (flag_emit_class_files
)
10037 TREE_OPERAND (node
, 0)= array
;
10038 TREE_OPERAND (node
, 1)= index
;
10041 node
= build_java_arrayaccess (array
, array_type
, index
);
10042 TREE_TYPE (node
) = array_type
;
10046 /* 15.9 Array Creation Expressions */
10049 build_newarray_node (type
, dims
, extra_dims
)
10055 build (CALL_EXPR
, NULL_TREE
, type
, nreverse (dims
),
10056 build_int_2 (extra_dims
, 0));
10057 TREE_SET_CODE (node
, JAVA_NEW_ARRAY_EXPR
);
10062 patch_newarray (node
)
10065 tree type
= TREE_OPERAND (node
, 0);
10066 tree dims
= TREE_OPERAND (node
, 1);
10067 tree cdim
, array_type
;
10068 int error_found
= 0;
10070 int xdims
= TREE_INT_CST_LOW (TREE_OPERAND (node
, 2));
10073 /* Dimension types are verified. It's better for the types to be
10074 verified in order. */
10075 for (cdim
= dims
, ndims
= 0; cdim
; cdim
= TREE_CHAIN (cdim
), ndims
++ )
10078 tree dim
= TREE_VALUE (cdim
);
10080 /* Dim might have been saved during its evaluation */
10081 dim
= (TREE_CODE (dim
) == SAVE_EXPR
? dim
= TREE_OPERAND (dim
, 0) : dim
);
10083 /* The type of each specified dimension must be an integral type. */
10084 if (!JINTEGRAL_TYPE_P (TREE_TYPE (dim
)))
10087 /* Each expression undergoes an unary numeric promotion (5.6.1) and the
10088 promoted type must be int. */
10091 dim
= convert (promote_type (TREE_TYPE (dim
)), dim
);
10092 if (TREE_TYPE (dim
) != int_type_node
)
10096 /* Report errors on types here */
10099 parse_error_context
10100 (TREE_PURPOSE (cdim
),
10101 "Incompatible type for dimension in array creation expression. "
10102 "%s convert `%s' to `int'",
10103 (can_cast_to_p (TREE_TYPE (dim
), int_type_node
) ?
10104 "Explicit cast needed to" : "Can't"),
10105 lang_printable_name (TREE_TYPE (dim
)));
10109 /* Check for uninitialized variables */
10110 if (not_initialized_as_it_should_p (dim
))
10112 ERROR_VARIABLE_NOT_INITIALIZED (TREE_PURPOSE (cdim
),
10114 INITIALIZED_P (dim
) = 1;
10118 TREE_PURPOSE (cdim
) = NULL_TREE
;
10121 /* Resolve array base type if unresolved */
10122 if (!(type
= resolve_type_during_patch (type
)))
10127 /* We don't want further evaluation of this bogus array creation
10129 TREE_TYPE (node
) = error_mark_node
;
10130 return error_mark_node
;
10133 /* The node is transformed into a function call. Things are done
10134 differently according to the number of dimensions. If the number
10135 of dimension is equal to 1, then the nature of the base type
10136 (primitive or not) matters. */
10137 total_dims
= xdims
+ ndims
;
10138 if (total_dims
== 1)
10140 if (JPRIMITIVE_TYPE_P (type
))
10143 if (type
== boolean_type_node
)
10145 else if (type
== char_type_node
)
10147 else if (type
== float_type_node
)
10149 else if (type
== double_type_node
)
10151 else if (type
== byte_type_node
)
10153 else if (type
== short_type_node
)
10155 else if (type
== int_type_node
)
10157 else if (type
== long_type_node
)
10160 fatal ("Can't compute type code - patch_newarray");
10161 return build_newarray (type_code
, TREE_VALUE (dims
));
10164 return build_anewarray (type
, TREE_VALUE (dims
));
10167 /* Add extra dimensions as unknown dimensions */
10170 chainon (dims
, build_tree_list (NULL_TREE
, integer_negative_one_node
));
10171 dims
= chainon (dims
, build_tree_list (NULL_TREE
, integer_zero_node
));
10173 /* Can't reuse what's already written in expr.c because it uses the
10174 JVM stack representation. Provide a build_multianewarray. FIXME */
10176 for (cdim
= TREE_CHAIN (dims
); cdim
; cdim
= TREE_CHAIN (cdim
))
10177 array_type
= build_java_array_type (promote_type (array_type
),
10178 TREE_CODE (cdim
) == INTEGER_CST
?
10179 TREE_INT_CST_LOW (cdim
) : -1);
10180 return build (CALL_EXPR
,
10181 promote_type (array_type
),
10182 build_address_of (soft_multianewarray_node
),
10183 tree_cons (NULL_TREE
, build_class_ref (array_type
),
10184 tree_cons (NULL_TREE
,
10185 build_int_2 (total_dims
, 0), dims
)),
10190 build_this (location
)
10193 tree node
= build_wfl_node (this_identifier_node
, input_filename
, 0, 0);
10194 TREE_SET_CODE (node
, JAVA_THIS_EXPR
);
10195 EXPR_WFL_LINECOL (node
) = location
;
10199 /* 14.15 The return statement. It builds a modify expression that
10200 assigns the returned value to the RESULT_DECL that hold the value
10204 build_return (location
, op
)
10208 tree node
= build1 (RETURN_EXPR
, NULL_TREE
, op
);
10209 EXPR_WFL_LINECOL (node
) = location
;
10214 patch_return (node
)
10217 tree return_exp
= TREE_OPERAND (node
, 0);
10218 tree meth
= current_function_decl
;
10219 tree mtype
= TREE_TYPE (TREE_TYPE (current_function_decl
));
10221 int error_found
= 0;
10223 TREE_TYPE (node
) = error_mark_node
;
10224 EXPR_WFL_LINECOL (wfl_operator
) = EXPR_WFL_LINECOL (node
);
10226 /* It's invalid to have a return value within a function that is
10227 declared with the keyword void or that is a constructor */
10228 if (return_exp
&& (mtype
== void_type_node
|| DECL_CONSTRUCTOR_P (meth
)))
10231 /* It's invalid to have a no return value within a function that
10232 isn't declared with the keyword `void' */
10233 if (!return_exp
&& (mtype
!= void_type_node
&& !DECL_CONSTRUCTOR_P (meth
)))
10238 char *t
= strdup ((char *)lang_printable_name (mtype
));
10239 parse_error_context (wfl_operator
, "`return' with%s value from `%s %s'",
10240 (error_found
== 1 ? "" : "out"), t
,
10241 lang_printable_name (meth
));
10243 return error_mark_node
;
10246 /* If we have a return_exp, build a modify expression and expand it */
10249 modify
= build (MODIFY_EXPR
, NULL_TREE
, DECL_RESULT (meth
), return_exp
);
10250 EXPR_WFL_LINECOL (modify
) = EXPR_WFL_LINECOL (node
);
10251 modify
= java_complete_tree (modify
);
10252 if (modify
!= error_mark_node
)
10254 TREE_SIDE_EFFECTS (modify
) = 1;
10255 TREE_OPERAND (node
, 0) = modify
;
10258 return error_mark_node
;
10260 TREE_TYPE (node
) = void_type_node
;
10261 TREE_SIDE_EFFECTS (node
) = 1;
10265 /* 14.8 The if Statement */
10268 build_if_else_statement (location
, expression
, if_body
, else_body
)
10270 tree expression
, if_body
, else_body
;
10273 /* FIXME: make else body be a void node, where this function is
10276 else_body
= build (COMPOUND_EXPR
, void_type_node
, NULL_TREE
, NULL_TREE
);
10277 node
= build (COND_EXPR
, NULL_TREE
, expression
, if_body
, else_body
);
10278 EXPR_WFL_LINECOL (node
) = location
;
10283 patch_if_else_statement (node
)
10286 tree expression
= TREE_OPERAND (node
, 0);
10288 TREE_TYPE (node
) = error_mark_node
;
10289 EXPR_WFL_LINECOL (wfl_operator
) = EXPR_WFL_LINECOL (node
);
10291 /* The type of expression must be boolean */
10292 if (TREE_TYPE (expression
) != boolean_type_node
)
10294 parse_error_context
10296 "Incompatible type for `if'. Can't convert `%s' to `boolean'",
10297 lang_printable_name (TREE_TYPE (expression
)));
10298 return error_mark_node
;
10301 TREE_TYPE (node
) = void_type_node
;
10302 TREE_SIDE_EFFECTS (node
) = 1;
10306 /* 14.6 Labeled Statements */
10308 /* Action taken when a lableled statement is parsed. a new
10309 LABELED_BLOCK_EXPR is created. No statement is attached to the
10313 build_labeled_block (location
, label
, wfl
)
10317 tree label_name
= merge_qualified_name (label_id
, label
);
10318 tree label_decl
, node
;
10320 /* Issue a warning if we try to reuse a label that was previously
10322 if (IDENTIFIER_LOCAL_VALUE (label_name
))
10324 EXPR_WFL_LINECOL (wfl_operator
) = location
;
10325 parse_warning_context (wfl_operator
, "Declaration of `%s' shadows "
10326 "a previous declaration",
10327 IDENTIFIER_POINTER (label
));
10328 EXPR_WFL_LINECOL (wfl_operator
) =
10329 EXPR_WFL_LINECOL (IDENTIFIER_LOCAL_VALUE (label_name
));
10330 parse_warning_context (wfl_operator
, "This is the location of the "
10331 "previous declaration of label `%s'",
10332 IDENTIFIER_POINTER (label
));
10333 java_warning_count
--;
10336 label_decl
= create_label_decl (label_name
);
10337 node
= build (LABELED_BLOCK_EXPR
, NULL_TREE
, label_decl
, NULL_TREE
);
10338 EXPR_WFL_LINECOL (node
) = location
;
10339 TREE_SIDE_EFFECTS (node
) = 1;
10343 /* Generate a label crafting a unique name for it. This is used to
10344 implicitely label loops that aren't the body part of labeled
10348 generate_labeled_block ()
10350 static int l_number
= 0;
10354 sprintf (buf
, "$a%d", l_number
++);
10355 return build_labeled_block (0, get_identifier (buf
), NULL_TREE
);
10358 /* A labeled statement LBE is attached a statement. If the statement
10359 happens to be a loop, a link from the loop back to the label is
10363 complete_labeled_statement (lbe
, statement
)
10364 tree lbe
; /* Labeled block expr */
10367 /* In anyways, tie the loop to its statement */
10368 LABELED_BLOCK_BODY (lbe
) = statement
;
10370 /* Ok, if statement is a for loop, we have to attach the labeled
10371 statement to the block the for loop belongs to and return the
10373 if (TREE_CODE (statement
) == LOOP_EXPR
&& IS_FOR_LOOP_P (statement
))
10375 java_method_add_stmt (current_function_decl
, lbe
);
10376 return exit_block ();
10382 /* 14.10, 14.11, 14.12 Loop Statements */
10384 /* Create an empty LOOP_EXPR and make it the last in the nested loop
10388 build_new_loop (loop_body
)
10391 tree loop
= build (LOOP_EXPR
, NULL_TREE
, loop_body
);
10392 TREE_SIDE_EFFECTS (loop
) = 1;
10397 /* Create a loop body according to the following structure:
10399 COMPOUND_EXPR (loop main body)
10400 EXIT_EXPR (this order is for while/for loops.
10401 LABELED_BLOCK_EXPR the order is reversed for do loops)
10402 LABEL_DECL (continue occurding here branche at the
10403 BODY end of this labeled block)
10406 REVERSED, if non zero, tells that the loop condition expr comes
10407 after the body, like in the do-while loop. */
10410 build_loop_body (location
, condition
, reversed
)
10415 tree first
, second
, label
, body
;
10417 condition
= build (EXIT_EXPR
, NULL_TREE
, condition
); /* Force walk */
10418 EXPR_WFL_LINECOL (condition
) = location
; /* For accurate error report */
10419 condition
= build_debugable_stmt (location
, condition
);
10420 TREE_SIDE_EFFECTS (condition
) = 1;
10422 body
= generate_labeled_block ();
10423 first
= (reversed
? body
: condition
);
10424 second
= (reversed
? condition
: body
);
10426 build (COMPOUND_EXPR
, NULL_TREE
,
10427 build (COMPOUND_EXPR
, NULL_TREE
, first
, second
), size_zero_node
);
10430 /* Install CONDITION (if any) and loop BODY (using REVERSED to tell
10431 their order) on the current loop. Unlink the current loop from the
10435 complete_loop_body (location
, condition
, body
, reversed
)
10437 tree condition
, body
;
10440 tree to_return
= ctxp
->current_loop
;
10441 tree loop_body
= LOOP_EXPR_BODY (to_return
);
10444 tree cnode
= LOOP_EXPR_BODY_CONDITION_EXPR (loop_body
, reversed
);
10445 /* We wrapped the EXIT_EXPR around a WFL so we can debug it.
10446 The real EXIT_EXPR is one operand further. */
10447 EXPR_WFL_LINECOL (cnode
) = location
;
10448 /* This one is for accurate error reports */
10449 EXPR_WFL_LINECOL (TREE_OPERAND (cnode
, 0)) = location
;
10450 TREE_OPERAND (TREE_OPERAND (cnode
, 0), 0) = condition
;
10452 LOOP_EXPR_BODY_BODY_EXPR (loop_body
, reversed
) = body
;
10457 /* Tailored version of complete_loop_body for FOR loops, when FOR
10458 loops feature the condition part */
10461 complete_for_loop (location
, condition
, update
, body
)
10463 tree condition
, update
, body
;
10465 /* Put the condition and the loop body in place */
10466 tree loop
= complete_loop_body (location
, condition
, body
, 0);
10467 /* LOOP is the current loop which has been now popped of the loop
10468 stack. Install the update block */
10469 LOOP_EXPR_BODY_UPDATE_BLOCK (LOOP_EXPR_BODY (loop
)) = update
;
10473 /* If the loop isn't surrounded by a labeled statement, create one and
10474 insert LOOP as it's body. */
10477 patch_loop_statement (loop
)
10480 tree cbl
, loop_label
, to_return_as_loop
;
10482 if (LOOP_HAS_LABEL_P (loop
))
10484 loop_label
= ctxp
->current_labeled_block
;
10485 to_return_as_loop
= loop
;
10489 loop_label
= generate_labeled_block ();
10490 LABELED_BLOCK_BODY (loop_label
) = loop
;
10491 PUSH_LABELED_BLOCK (loop_label
);
10492 to_return_as_loop
= loop_label
;
10494 TREE_TYPE (to_return_as_loop
) = void_type_node
;
10495 return to_return_as_loop
;
10498 /* 14.13, 14.14: break and continue Statements */
10500 /* Build a break or a continue statement. a null NAME indicates an
10501 unlabeled break/continue statement. */
10504 build_bc_statement (location
, is_break
, name
)
10505 int location
, is_break
;
10508 tree break_continue
, label_block_expr
= NULL_TREE
;
10512 if (!(label_block_expr
= IDENTIFIER_LOCAL_VALUE
10513 (merge_qualified_name (label_id
, EXPR_WFL_NODE (name
)))))
10514 /* Null means that we don't have a target for this named
10515 break/continue. In this case, we make the target to be the
10516 label name, so that the error can be reported accuratly in
10517 patch_bc_statement. */
10518 label_block_expr
= EXPR_WFL_NODE (name
);
10520 /* Unlabeled break/continue will be handled during the
10521 break/continue patch operation */
10523 = build (EXIT_BLOCK_EXPR
, NULL_TREE
, label_block_expr
, NULL_TREE
);
10525 IS_BREAK_STMT_P (break_continue
) = is_break
;
10526 TREE_SIDE_EFFECTS (break_continue
) = 1;
10527 EXPR_WFL_LINECOL (break_continue
) = location
;
10528 return break_continue
;
10531 /* Verification of a break/continue statement. */
10534 patch_bc_statement (node
)
10537 tree bc_label
= EXIT_BLOCK_LABELED_BLOCK (node
), target_stmt
;
10538 int is_unlabeled
= 0;
10539 EXPR_WFL_LINECOL (wfl_operator
) = EXPR_WFL_LINECOL (node
);
10541 /* Not having a target means that the break/continue statement is
10542 unlabeled. We try to find a descent label for it */
10546 /* There should be a loop to branch to */
10547 if (ctxp
->current_loop
)
10549 /* At that stage, we're in the loop body, which is
10550 encapsulated around a LABELED_BLOCK_EXPR. So searching
10551 the current loop label requires us to consider the
10552 labeled block before the current one. */
10553 if (!LOOP_HAS_LABEL_SKIP_P (ctxp
->current_loop
))
10554 fatal ("unlabeled loop has not installed label -- "
10555 "patch_bc_statement");
10556 bc_label
= TREE_CHAIN (ctxp
->current_labeled_block
);
10558 /* Not having a loop to break/continue to is an error */
10561 parse_error_context (wfl_operator
, "`%s' must be in loop%s",
10562 (IS_BREAK_STMT_P (node
) ? "break" : "continue"),
10563 (IS_BREAK_STMT_P (node
) ? " or switch" : ""));
10564 return error_mark_node
;
10567 /* Having an identifier here means that the target is unknown. */
10568 else if (TREE_CODE (bc_label
) == IDENTIFIER_NODE
)
10570 parse_error_context (wfl_operator
, "No label definition found for `%s'",
10571 IDENTIFIER_POINTER (bc_label
));
10572 return error_mark_node
;
10575 /* Find the statement we're targeting. */
10576 target_stmt
= LABELED_BLOCK_BODY (bc_label
);
10578 /* 14.13 The break Statement */
10579 if (IS_BREAK_STMT_P (node
))
10581 /* Named break are always fine, as far as they have a target
10582 (already verified). Anonymous break need to target
10583 while/do/for/switch */
10584 if (is_unlabeled
&&
10585 !(TREE_CODE (target_stmt
) == LOOP_EXPR
/* do/while/for */
10586 || 0)) /* switch FIXME */
10588 parse_error_context (wfl_operator
,
10589 "`break' must be in loop or switch");
10590 return error_mark_node
;
10592 /* If previously unlabeled, install the new found label */
10594 EXIT_BLOCK_LABELED_BLOCK (node
) = bc_label
;
10596 /* 14.14 The continue Statement */
10597 /* The continue statement must always target a loop */
10600 if (TREE_CODE (target_stmt
) != LOOP_EXPR
) /* do/while/for */
10602 parse_error_context (wfl_operator
, "`continue' must be in loop");
10603 return error_mark_node
;
10605 /* Everything looks good. We can fix the `continue' jump to go
10606 at the place in the loop were the continue is. The continue
10607 is the current labeled block, by construction. */
10608 EXIT_BLOCK_LABELED_BLOCK (node
) = ctxp
->current_labeled_block
;
10611 /* Our break/continue don't return values. */
10612 TREE_TYPE (node
) = void_type_node
;
10613 /* Encapsulate the break within a compound statement so that it's
10614 expanded all the times by expand_expr (and not clobered
10615 sometimes, like after a if statement) */
10616 node
= add_stmt_to_compound (NULL_TREE
, void_type_node
, node
);
10617 TREE_SIDE_EFFECTS (node
) = 1;
10621 /* Process the exit expression belonging to a loop. Its type must be
10625 patch_exit_expr (node
)
10628 tree expression
= TREE_OPERAND (node
, 0);
10629 TREE_TYPE (node
) = error_mark_node
;
10630 EXPR_WFL_LINECOL (wfl_operator
) = EXPR_WFL_LINECOL (node
);
10632 /* The type of expression must be boolean */
10633 if (TREE_TYPE (expression
) != boolean_type_node
)
10635 parse_error_context
10637 "Incompatible type for loop conditional. Can't convert `%s' to "
10639 lang_printable_name (TREE_TYPE (expression
)));
10640 return error_mark_node
;
10642 /* Now we know things are allright, invert the condition, fold and
10644 TREE_OPERAND (node
, 0) =
10645 fold (build1 (TRUTH_NOT_EXPR
, boolean_type_node
, expression
));
10646 TREE_TYPE (node
) = void_type_node
;