1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
5 * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
15 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
28 /* Use prototypes in function declarations. */
31 /* The "const" storage-class-modifier is valid. */
34 #else /* ! __cplusplus */
42 #endif /* ! __cplusplus */
61 #define YY_PROTO(proto) proto
63 #define YY_PROTO(proto) ()
66 /* Returned upon end-of-file. */
69 /* Promotes a possibly negative, possibly signed char to an unsigned
70 * integer for use as an array index. If the signed char is negative,
71 * we want to instead treat it as an 8-bit unsigned char, hence the
74 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
76 /* Enter a start condition. This macro really ought to take a parameter,
77 * but we do it the disgusting crufty way forced on us by the ()-less
78 * definition of BEGIN.
80 #define BEGIN yy_start = 1 + 2 *
82 /* Translate the current start state into a value that can be later handed
83 * to BEGIN to return to the state. The YYSTATE alias is for lex
86 #define YY_START ((yy_start - 1) / 2)
87 #define YYSTATE YY_START
89 /* Action number for EOF rule of a given start state. */
90 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
92 /* Special action meaning "start processing a new file". */
93 #define YY_NEW_FILE yyrestart( yyin )
95 #define YY_END_OF_BUFFER_CHAR 0
97 /* Size of default input buffer. */
98 #define YY_BUF_SIZE 16384
100 typedef struct yy_buffer_state *YY_BUFFER_STATE;
103 extern FILE *yyin, *yyout;
105 #define EOB_ACT_CONTINUE_SCAN 0
106 #define EOB_ACT_END_OF_FILE 1
107 #define EOB_ACT_LAST_MATCH 2
109 /* The funky do-while in the following #define is used to turn the definition
110 * int a single C statement (which needs a semi-colon terminator). This
111 * avoids problems with code like:
113 * if ( condition_holds )
116 * do_something_else();
118 * Prior to using the do-while the compiler would get upset at the
119 * "else" because it interpreted the "if" statement as being all
120 * done when it reached the ';' after the yyless() call.
123 /* Return all but the first 'n' matched characters back to the input stream. */
128 /* Undo effects of setting up yytext. */ \
129 *yy_cp = yy_hold_char; \
130 YY_RESTORE_YY_MORE_OFFSET \
131 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
132 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
136 #define unput(c) yyunput( c, yytext_ptr )
138 /* The following is because we cannot portably get our hands on size_t
139 * (without autoconf's help, which isn't available because we want
140 * flex-generated scanners to compile on their own).
142 typedef unsigned int yy_size_t;
145 struct yy_buffer_state
149 char *yy_ch_buf; /* input buffer */
150 char *yy_buf_pos; /* current position in input buffer */
152 /* Size of input buffer in bytes, not including room for EOB
155 yy_size_t yy_buf_size;
157 /* Number of characters read into yy_ch_buf, not including EOB
162 /* Whether we "own" the buffer - i.e., we know we created it,
163 * and can realloc() it to grow it, and should free() it to
166 int yy_is_our_buffer;
168 /* Whether this is an "interactive" input source; if so, and
169 * if we're using stdio for input, then we want to use getc()
170 * instead of fread(), to make sure we stop fetching input after
173 int yy_is_interactive;
175 /* Whether we're considered to be at the beginning of a line.
176 * If so, '^' rules will be active on the next match, otherwise
181 /* Whether to try to fill the input buffer when we reach the
186 int yy_buffer_status;
187 #define YY_BUFFER_NEW 0
188 #define YY_BUFFER_NORMAL 1
189 /* When an EOF's been seen but there's still some text to process
190 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
191 * shouldn't try reading from the input source any more. We might
192 * still have a bunch of tokens to match, though, because of
193 * possible backing-up.
195 * When we actually see the EOF, we change the status to "new"
196 * (via yyrestart()), so that the user can continue scanning by
197 * just pointing yyin at a new input file.
199 #define YY_BUFFER_EOF_PENDING 2
202 static YY_BUFFER_STATE yy_current_buffer = 0;
204 /* We provide macros for accessing buffer states in case in the
205 * future we want to put the buffer states in a more general
208 #define YY_CURRENT_BUFFER yy_current_buffer
211 /* yy_hold_char holds the character lost when yytext is formed. */
212 static char yy_hold_char;
214 static int yy_n_chars; /* number of characters read into yy_ch_buf */
219 /* Points to current character in buffer. */
220 static char *yy_c_buf_p = (char *) 0;
221 static int yy_init = 1; /* whether we need to initialize */
222 static int yy_start = 0; /* start state number */
224 /* Flag which is used to allow yywrap()'s to do buffer switches
225 * instead of setting up a fresh yyin. A bit of a hack ...
227 static int yy_did_buffer_switch_on_eof;
229 void yyrestart YY_PROTO(( FILE *input_file ));
231 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
232 void yy_load_buffer_state YY_PROTO(( void ));
233 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
234 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
235 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
236 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
237 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
239 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
240 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
241 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
243 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
244 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
245 static void yy_flex_free YY_PROTO(( void * ));
247 #define yy_new_buffer yy_create_buffer
249 #define yy_set_interactive(is_interactive) \
251 if ( ! yy_current_buffer ) \
252 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
253 yy_current_buffer->yy_is_interactive = is_interactive; \
256 #define yy_set_bol(at_bol) \
258 if ( ! yy_current_buffer ) \
259 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
260 yy_current_buffer->yy_at_bol = at_bol; \
263 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
266 #define YY_USES_REJECT
267 typedef unsigned char YY_CHAR;
268 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
269 typedef int yy_state_type;
271 #define yytext_ptr yytext
273 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
274 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
275 static int yy_get_next_buffer YY_PROTO(( void ));
276 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
278 /* Done after the current pattern has been matched and before the
279 * corresponding action - sets up yytext.
281 #define YY_DO_BEFORE_ACTION \
282 yytext_ptr = yy_bp; \
283 yyleng = (int) (yy_cp - yy_bp); \
284 yy_hold_char = *yy_cp; \
288 #define YY_NUM_RULES 57
289 #define YY_END_OF_BUFFER 58
290 static yyconst short int yy_acclist[386] =
292 58, 56, 57, 1, 56, 57, 1, 57, 15, 56,
293 57, 53, 56, 57, 41, 56, 57, 56, 57, 43,
294 56, 57, 44, 56, 57, 41, 56, 57, 42, 56,
295 57, 41, 56, 57, 41, 56, 57, 41, 56, 57,
296 4, 56, 57, 4, 56, 57, 41, 56, 57, 41,
297 56, 57, 41, 56, 57, 41, 56, 57, 50, 56,
298 57, 47, 56, 57, 47, 56, 57, 47, 56, 57,
299 47, 56, 57, 47, 56, 57, 47, 56, 57, 47,
300 56, 57, 47, 56, 57, 47, 56, 57, 47, 56,
301 57, 1, 56, 57, 56, 57, 16, 56, 57, 53,
303 56, 57, 41, 56, 57, 56, 57, 43, 56, 57,
304 44, 56, 57, 41, 56, 57, 42, 56, 57, 41,
305 56, 57, 41, 56, 57, 41, 56, 57, 4, 56,
306 57, 4, 56, 57, 41, 56, 57, 41, 56, 57,
307 41, 56, 57, 41, 56, 57, 50, 56, 57, 41,
308 56, 57, 47, 56, 57, 47, 56, 57, 47, 56,
309 57, 47, 56, 57, 47, 56, 57, 47, 56, 57,
310 47, 56, 57, 47, 56, 57, 47, 56, 57, 47,
311 56, 57, 56, 57, 40, 56, 57, 51, 55, 54,
312 55, 55, 35, 2, 34, 46, 46, 37, 4, 36,
314 38, 33, 39, 47, 47, 47, 47, 47, 19, 47,
315 23, 47, 47, 47, 47, 47, 28, 47, 47, 47,
316 47, 16, 51, 55, 54, 55, 55, 16, 35, 2,
317 34, 46, 46, 37, 4, 36, 38, 33, 39, 16,
318 47, 47, 47, 47, 47, 19, 47, 23, 47, 47,
319 47, 47, 47, 28, 47, 47, 47, 47,16398, 52,
320 55, 12, 12, 32, 2, 46, 46, 9, 3, 7,
321 47, 47, 49, 20, 47, 21, 47, 47, 24, 47,
322 25, 47, 26, 47, 47, 29, 47, 47, 31, 47,
323 52, 55, 16, 32, 2, 2, 16, 2, 46, 46,
325 9, 3, 7, 47, 16, 47, 49, 20, 47, 21,
326 47, 47, 24, 47, 25, 47, 26, 47, 47, 29,
327 47, 47, 31, 47, 8206, 46, 45, 46, 6, 9,
328 3, 47, 22, 47, 27, 47, 30, 47, 2, 16,
329 46, 45, 46, 6, 9, 3, 47, 22, 47, 27,
330 47, 30, 47, 48, 47, 48, 2, 2, 18, 47,
331 5, 11, 8, 18, 2, 2, 5, 11, 8, 17,
332 5, 8, 17, 2, 18, 2, 5, 8, 13, 2,
336 static yyconst short int yy_accept[364] =
338 1, 1, 1, 1, 1, 1, 1, 2, 4, 7,
339 9, 12, 15, 18, 20, 23, 26, 29, 32, 35,
340 38, 41, 44, 47, 50, 53, 56, 59, 62, 65,
341 68, 71, 74, 77, 80, 83, 86, 89, 92, 95,
342 97, 100, 103, 106, 108, 111, 114, 117, 120, 123,
343 126, 129, 132, 135, 138, 141, 144, 147, 150, 153,
344 156, 159, 162, 165, 168, 171, 174, 177, 180, 183,
345 185, 188, 188, 188, 188, 188, 188, 188, 188, 188,
346 188, 188, 188, 190, 192, 193, 193, 193, 193, 193,
347 193, 193, 193, 194, 195, 195, 196, 196, 197, 198,
349 199, 199, 199, 200, 200, 200, 201, 202, 202, 203,
350 204, 204, 204, 205, 205, 206, 206, 207, 208, 209,
351 211, 213, 214, 215, 216, 217, 219, 220, 221, 222,
352 222, 223, 223, 225, 227, 228, 228, 228, 229, 229,
353 229, 230, 231, 231, 232, 232, 233, 234, 235, 235,
354 235, 236, 236, 236, 237, 238, 238, 239, 240, 241,
355 241, 242, 242, 243, 243, 244, 245, 246, 248, 250,
356 251, 252, 253, 254, 256, 257, 258, 259, 259, 260,
357 260, 260, 260, 260, 260, 260, 262, 262, 263, 264,
358 264, 265, 266, 266, 267, 268, 268, 269, 269, 270,
360 271, 271, 272, 272, 272, 272, 273, 274, 276, 278,
361 279, 281, 283, 285, 286, 288, 289, 291, 293, 293,
362 294, 295, 296, 298, 299, 299, 300, 301, 301, 302,
363 302, 303, 304, 304, 305, 305, 305, 305, 306, 306,
364 307, 308, 310, 312, 313, 315, 317, 319, 320, 322,
365 323, 325, 325, 326, 326, 326, 326, 326, 327, 329,
366 330, 330, 330, 331, 331, 332, 332, 332, 332, 332,
367 332, 332, 332, 332, 332, 332, 332, 332, 333, 335,
368 337, 339, 339, 339, 339, 339, 341, 341, 342, 344,
369 345, 345, 345, 346, 346, 347, 347, 347, 347, 348,
371 350, 352, 354, 355, 355, 355, 355, 355, 356, 356,
372 356, 356, 356, 356, 356, 356, 357, 357, 357, 358,
373 359, 359, 359, 359, 360, 360, 360, 361, 361, 361,
374 362, 363, 363, 364, 365, 365, 366, 367, 367, 368,
375 369, 369, 370, 371, 371, 372, 372, 373, 374, 376,
376 377, 378, 378, 379, 380, 380, 382, 382, 383, 384,
380 static yyconst int yy_ec[256] =
382 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
383 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
385 1, 4, 5, 6, 7, 8, 5, 9, 10, 11,
386 12, 13, 14, 15, 16, 17, 18, 19, 20, 20,
387 20, 20, 20, 20, 20, 20, 20, 21, 22, 23,
388 24, 25, 5, 26, 30, 31, 32, 33, 34, 35,
389 36, 37, 38, 36, 36, 39, 40, 41, 42, 36,
390 36, 43, 44, 45, 46, 36, 47, 48, 36, 36,
391 27, 5, 28, 5, 29, 5, 30, 31, 32, 33,
393 34, 35, 36, 37, 38, 36, 36, 39, 40, 41,
394 42, 36, 36, 43, 44, 45, 46, 36, 47, 48,
395 36, 36, 26, 22, 26, 5, 1, 1, 1, 1,
396 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 static yyconst int yy_meta[49] =
414 1, 2, 3, 4, 5, 6, 7, 8, 5, 9,
415 5, 5, 5, 5, 5, 5, 10, 5, 11, 11,
416 9, 5, 12, 13, 14, 5, 5, 5, 15, 16,
417 16, 16, 16, 16, 16, 17, 17, 17, 17, 17,
418 17, 17, 17, 17, 17, 17, 17, 17
421 static yyconst short int yy_base[385] =
423 0, 0, 48, 0, 91, 92, 1405, 1771, 1771, 1771,
424 94, 96, 1771, 142, 1771, 1771, 1391, 1771, 1387, 189,
425 1378, 188, 194, 1377, 1376, 1374, 1361, 1771, 222, 242,
426 82, 91, 89, 196, 68, 163, 179, 97, 100, 194,
427 0, 280, 223, 328, 227, 228, 234, 229, 235, 375,
428 242, 418, 1335, 243, 463, 247, 251, 252, 254, 510,
429 168, 1343, 161, 1333, 234, 1331, 1336, 1323, 1316, 0,
430 558, 1340, 127, 258, 420, 422, 398, 1299, 1285, 1258,
431 1266, 1257, 411, 413, 0, 605, 1288, 1287, 1286, 1285,
432 119, 644, 1771, 0, 691, 1771, 0, 0, 1255, 1771,
434 0, 421, 690, 429, 0, 1771, 1771, 1244, 1771, 1771,
435 608, 696, 1771, 699, 419, 1247, 420, 422, 582, 583,
436 586, 587, 624, 625, 591, 590, 627, 628, 684, 430,
437 1771, 705, 653, 1256, 710, 1252, 731, 0, 1254, 750,
438 710, 798, 1222, 717, 802, 832, 1199, 720, 875, 730,
439 1189, 732, 892, 733, 795, 924, 796, 797, 1230, 971,
440 800, 997, 0, 876, 1183, 1191, 1176, 0, 0, 1174,
441 1151, 1150, 1097, 0, 1095, 1100, 1089, 1096, 805, 1043,
442 1047, 1043, 1023, 1016, 1010, 439, 808, 883, 1771, 1027,
443 1041, 0, 971, 0, 952, 736, 864, 614, 799, 0,
445 965, 976, 1046, 1061, 0, 1061, 1771, 714, 717, 858,
446 774, 789, 859, 1042, 860, 953, 954, 1047, 1086, 1108,
447 0, 1092, 0, 1094, 1140, 0, 950, 1182, 1091, 1110,
448 1199, 1210, 0, 1244, 981, 0, 0, 0, 1243, 1273,
449 890, 0, 0, 949, 0, 0, 0, 943, 0, 935,
450 0, 1120, 1771, 1188, 900, 1303, 895, 1771, 0, 882,
451 0, 1098, 1174, 440, 1177, 909, 421, 1048, 1093, 1102,
452 1169, 846, 818, 814, 822, 779, 792, 1249, 1190, 1191,
453 1192, 1322, 1228, 750, 1331, 1361, 0, 1106, 0, 1229,
454 1378, 0, 1325, 1326, 1349, 726, 725, 1410, 0, 0,
456 0, 0, 1771, 722, 839, 713, 644, 1369, 668, 671,
457 663, 615, 617, 576, 591, 1198, 540, 459, 456, 1440,
458 1462, 1483, 1458, 1771, 414, 0, 1517, 249, 794, 1238,
459 237, 258, 1310, 0, 203, 190, 209, 1460, 1477, 1350,
460 0, 1480, 1771, 131, 1328, 726, 1472, 0, 0, 86,
461 1516, 1523, 1522, 1385, 835, 0, 1505, 1511, 1527, 1533,
462 1549, 1771, 1571, 1587, 1592, 1608, 1622, 1639, 1642, 1649,
463 89, 187, 1656, 1672, 1689, 1701, 1707, 1718, 1720, 1736,
467 static yyconst short int yy_def[385] =
469 362, 1, 362, 3, 1, 1, 362, 362, 362, 362,
470 362, 363, 362, 362, 362, 362, 362, 362, 362, 364,
471 362, 362, 362, 362, 365, 362, 362, 362, 366, 366,
472 30, 30, 30, 30, 30, 30, 30, 30, 367, 367,
473 11, 362, 367, 362, 367, 367, 367, 367, 367, 362,
474 367, 367, 52, 367, 362, 367, 367, 367, 367, 362,
475 60, 60, 60, 60, 60, 60, 60, 60, 60, 11,
476 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
477 362, 362, 363, 363, 363, 71, 71, 71, 86, 362,
478 86, 86, 362, 368, 364, 362, 369, 370, 370, 362,
480 371, 362, 362, 362, 372, 362, 362, 373, 362, 362,
481 362, 362, 362, 374, 30, 362, 30, 30, 30, 30,
482 30, 30, 30, 30, 30, 30, 30, 30, 30, 367,
483 362, 367, 42, 42, 42, 44, 44, 86, 137, 137,
484 367, 375, 50, 367, 55, 145, 146, 367, 367, 367,
485 52, 367, 149, 367, 367, 362, 367, 367, 376, 367,
486 367, 362, 60, 367, 60, 60, 60, 60, 60, 60,
487 60, 60, 60, 60, 60, 60, 60, 92, 362, 362,
488 362, 362, 362, 362, 362, 363, 362, 362, 362, 86,
489 92, 368, 377, 370, 370, 378, 362, 362, 362, 372,
491 373, 362, 374, 362, 379, 380, 362, 30, 30, 30,
492 30, 30, 30, 30, 30, 30, 30, 42, 367, 86,
493 140, 375, 368, 375, 362, 146, 146, 149, 367, 367,
494 367, 149, 156, 367, 362, 381, 162, 204, 145, 60,
495 367, 60, 60, 60, 60, 60, 60, 60, 60, 60,
496 60, 362, 362, 362, 362, 86, 377, 362, 370, 362,
497 382, 378, 362, 362, 362, 362, 362, 362, 362, 362,
498 362, 362, 362, 362, 362, 362, 383, 380, 30, 30,
499 30, 367, 367, 86, 86, 368, 225, 367, 146, 367,
500 149, 228, 367, 367, 367, 362, 362, 362, 240, 60,
502 60, 60, 362, 86, 362, 384, 362, 362, 362, 362,
503 362, 362, 362, 362, 383, 367, 86, 86, 368, 368,
504 367, 149, 367, 362, 362, 298, 367, 86, 362, 362,
505 362, 384, 362, 86, 86, 368, 368, 367, 367, 367,
506 322, 367, 362, 86, 362, 362, 362, 86, 368, 368,
507 367, 367, 367, 362, 362, 368, 367, 362, 367, 362,
508 367, 0, 362, 362, 362, 362, 362, 362, 362, 362,
509 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
513 static yyconst short int yy_nxt[1820] =
515 8, 9, 10, 9, 8, 11, 8, 12, 13, 14,
516 15, 16, 17, 13, 18, 19, 20, 21, 22, 23,
517 24, 13, 25, 26, 27, 28, 13, 13, 29, 30,
518 29, 29, 29, 31, 29, 29, 29, 32, 29, 33,
519 34, 35, 36, 29, 37, 29, 29, 38, 8, 9,
520 10, 39, 40, 41, 40, 42, 43, 44, 45, 46,
521 47, 43, 48, 49, 50, 51, 52, 53, 54, 43,
522 55, 56, 57, 58, 59, 43, 60, 61, 60, 60,
523 60, 62, 60, 60, 60, 63, 60, 64, 65, 66,
524 67, 60, 68, 60, 60, 69, 70, 70, 115, 196,
526 71, 71, 72, 83, 196, 131, 73, 72, 115, 72,
527 126, 74, 115, 356, 84, 84, 75, 72, 76, 115,
528 119, 115, 115, 77, 190, 120, 132, 115, 188, 115,
529 122, 121, 179, 78, 79, 80, 81, 115, 129, 72,
530 354, 82, 86, 87, 87, 88, 89, 89, 89, 89,
531 89, 90, 89, 89, 89, 89, 89, 89, 89, 89,
532 89, 89, 89, 89, 89, 89, 89, 89, 91, 89,
533 89, 92, 92, 92, 92, 92, 92, 92, 92, 92,
534 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
535 95, 95, 95, 115, 101, 168, 127, 200, 165, 131,
537 101, 169, 200, 115, 102, 96, 103, 103, 166, 115,
538 102, 97, 103, 103, 350, 128, 103, 349, 99, 115,
539 132, 104, 103, 111, 111, 112, 115, 104, 131, 123,
540 348, 113, 131, 131, 131, 105, 115, 124, 114, 131,
541 131, 125, 116, 111, 111, 112, 141, 131, 131, 132,
542 142, 113, 131, 132, 132, 132, 131, 131, 114, 159,
543 132, 132, 116, 179, 331, 148, 154, 171, 132, 132,
544 346, 157, 117, 132, 158, 172, 344, 132, 132, 173,
545 132, 72, 118, 130, 130, 131, 130, 133, 130, 130,
546 130, 130, 130, 130, 130, 130, 130, 130, 134, 134,
548 130, 130, 130, 130, 130, 130, 132, 130, 135, 135,
549 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
550 135, 135, 135, 135, 135, 135, 135, 135, 86, 87,
551 87, 136, 137, 138, 137, 137, 137, 130, 137, 137,
552 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
553 137, 137, 137, 137, 139, 137, 137, 140, 140, 140,
554 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
555 140, 140, 140, 140, 140, 140, 95, 95, 143, 130,
556 131, 130, 130, 130, 130, 130, 130, 130, 130, 130,
557 130, 144, 130, 130, 130, 130, 130, 145, 130, 130,
559 130, 132, 130, 146, 147, 146, 146, 146, 146, 146,
560 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
561 146, 146, 146, 131, 149, 179, 308, 179, 180, 186,
562 186, 84, 84, 266, 150, 131, 151, 151, 181, 197,
563 197, 343, 198, 72, 132, 72, 151, 199, 199, 115,
564 115, 152, 115, 307, 209, 307, 132, 186, 186, 115,
565 115, 336, 115, 208, 335, 153, 130, 130, 131, 130,
566 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
567 130, 130, 130, 130, 130, 130, 155, 130, 130, 132,
568 130, 156, 156, 156, 156, 156, 156, 156, 156, 156,
570 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
571 156, 111, 111, 160, 130, 131, 130, 130, 130, 161,
572 130, 130, 130, 130, 130, 130, 162, 130, 163, 163,
573 164, 130, 130, 130, 130, 130, 132, 130, 163, 163,
574 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
575 163, 163, 163, 163, 163, 163, 163, 163, 86, 87,
576 87, 87, 86, 86, 86, 86, 86, 334, 86, 86,
577 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
578 86, 86, 86, 86, 86, 86, 86, 178, 178, 178,
579 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
581 178, 178, 178, 178, 178, 178, 86, 86, 86, 111,
582 111, 111, 115, 115, 187, 308, 115, 115, 266, 211,
583 115, 115, 115, 115, 114, 210, 115, 115, 116, 214,
584 115, 115, 199, 199, 86, 86, 86, 86, 86, 86,
585 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
586 86, 86, 86, 188, 115, 115, 266, 115, 115, 266,
587 135, 216, 333, 333, 115, 115, 215, 115, 115, 213,
588 212, 218, 218, 191, 191, 191, 191, 191, 191, 191,
589 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
590 191, 191, 95, 95, 95, 266, 101, 111, 111, 112,
592 203, 203, 203, 266, 204, 113, 102, 362, 103, 103,
593 159, 266, 114, 97, 115, 131, 116, 135, 103, 331,
594 99, 205, 131, 104, 115, 131, 217, 328, 135, 135,
595 325, 132, 86, 86, 137, 131, 132, 131, 131, 355,
596 219, 355, 260, 132, 115, 230, 132, 115, 229, 229,
597 231, 231, 261, 324, 115, 317, 132, 115, 132, 132,
598 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
599 137, 137, 137, 137, 137, 137, 137, 137, 137, 221,
600 221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
601 221, 221, 221, 221, 221, 221, 221, 221, 192, 192,
603 131, 131, 131, 223, 115, 131, 252, 252, 252, 254,
604 254, 254, 330, 330, 115, 253, 308, 265, 265, 115,
605 314, 132, 132, 132, 224, 130, 132, 265, 255, 115,
606 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
607 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
608 226, 226, 329, 358, 358, 313, 266, 330, 330, 312,
609 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
610 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
611 131, 131, 263, 263, 254, 254, 254, 311, 115, 115,
612 115, 279, 263, 228, 228, 131, 241, 264, 115, 115,
614 115, 132, 132, 255, 228, 228, 228, 228, 228, 228,
615 232, 232, 297, 306, 308, 305, 132, 297, 306, 258,
616 303, 232, 232, 232, 232, 232, 232, 130, 130, 131,
617 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
618 130, 130, 233, 233, 130, 130, 130, 130, 234, 130,
619 132, 130, 233, 233, 233, 233, 233, 233, 233, 233,
620 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
621 233, 233, 111, 111, 160, 302, 131, 111, 111, 112,
622 161, 301, 300, 115, 115, 113, 296, 162, 289, 202,
623 259, 164, 114, 281, 115, 258, 116, 132, 203, 203,
625 237, 130, 238, 130, 130, 130, 130, 130, 130, 130,
626 130, 130, 130, 130, 130, 130, 130, 130, 130, 239,
627 130, 130, 130, 132, 130, 240, 240, 240, 240, 240,
628 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
629 240, 240, 240, 240, 240, 256, 256, 203, 203, 203,
630 187, 204, 72, 308, 135, 72, 256, 256, 256, 256,
631 256, 256, 111, 111, 112, 218, 218, 72, 205, 266,
632 113, 266, 115, 267, 266, 72, 266, 114, 268, 72,
633 280, 116, 115, 269, 266, 270, 72, 254, 254, 282,
634 271, 131, 192, 192, 192, 192, 131, 223, 308, 286,
636 272, 273, 274, 275, 260, 187, 283, 308, 276, 293,
637 293, 131, 132, 284, 261, 131, 266, 132, 224, 293,
638 224, 252, 252, 252, 294, 266, 285, 285, 231, 231,
639 253, 251, 132, 250, 249, 248, 132, 285, 285, 285,
640 285, 285, 285, 130, 130, 131, 130, 130, 130, 130,
641 130, 130, 130, 130, 130, 130, 130, 130, 287, 287,
642 130, 130, 130, 130, 288, 130, 132, 130, 287, 287,
643 287, 287, 287, 287, 287, 287, 287, 287, 287, 287,
644 287, 287, 287, 287, 287, 287, 287, 287, 290, 254,
645 254, 254, 263, 263, 247, 265, 265, 246, 291, 309,
647 292, 292, 263, 131, 131, 265, 245, 264, 255, 310,
648 292, 292, 292, 292, 292, 292, 292, 295, 295, 244,
649 115, 115, 115, 243, 132, 132, 242, 295, 232, 232,
650 115, 115, 115, 131, 131, 235, 130, 227, 130, 232,
651 232, 232, 232, 232, 232, 111, 111, 160, 316, 131,
652 111, 111, 112, 161, 132, 132, 345, 345, 113, 220,
653 162, 219, 321, 135, 164, 114, 345, 207, 202, 116,
654 132, 298, 298, 298, 298, 298, 298, 298, 298, 298,
655 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
656 298, 299, 299, 195, 189, 188, 188, 187, 185, 184,
658 72, 299, 299, 299, 299, 299, 299, 299, 299, 299,
659 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
660 299, 304, 304, 254, 254, 282, 183, 131, 347, 347,
661 131, 131, 304, 304, 304, 304, 304, 304, 347, 323,
662 182, 323, 283, 293, 293, 179, 345, 345, 132, 318,
663 318, 132, 132, 293, 131, 131, 345, 177, 294, 176,
664 318, 318, 318, 318, 318, 318, 319, 295, 295, 175,
665 111, 111, 112, 174, 170, 132, 132, 295, 113, 320,
666 320, 167, 130, 352, 110, 114, 254, 254, 254, 116,
667 320, 320, 320, 320, 320, 320, 322, 322, 109, 107,
669 106, 100, 94, 93, 362, 255, 362, 322, 322, 322,
670 322, 322, 322, 130, 130, 131, 130, 130, 130, 130,
671 130, 130, 130, 130, 130, 130, 130, 130, 326, 326,
672 130, 130, 130, 130, 327, 130, 132, 130, 326, 326,
673 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
674 326, 326, 326, 326, 326, 326, 326, 326, 337, 337,
675 362, 362, 362, 131, 362, 131, 362, 131, 362, 337,
676 337, 337, 337, 337, 337, 338, 342, 342, 339, 339,
677 339, 339, 131, 362, 132, 131, 132, 362, 132, 340,
678 347, 347, 362, 362, 362, 351, 351, 362, 353, 353,
680 347, 341, 341, 132, 362, 351, 132, 362, 353, 362,
681 131, 341, 341, 341, 341, 341, 341, 341, 111, 111,
682 160, 131, 131, 359, 359, 362, 161, 131, 131, 360,
683 360, 132, 131, 162, 351, 351, 357, 164, 357, 360,
684 353, 353, 132, 132, 351, 361, 361, 362, 132, 132,
685 353, 360, 360, 132, 131, 361, 362, 362, 362, 362,
686 362, 360, 362, 362, 362, 362, 362, 361, 361, 362,
687 362, 362, 362, 362, 362, 132, 362, 361, 85, 362,
688 362, 85, 362, 362, 362, 85, 85, 85, 98, 98,
689 98, 362, 362, 362, 362, 362, 98, 362, 98, 362,
691 362, 98, 98, 98, 108, 362, 108, 108, 108, 115,
692 115, 115, 362, 362, 362, 362, 115, 115, 115, 362,
693 362, 362, 115, 115, 115, 130, 130, 130, 130, 130,
694 130, 130, 130, 130, 130, 130, 130, 130, 130, 192,
695 192, 362, 192, 192, 192, 192, 192, 192, 192, 192,
696 192, 192, 192, 192, 192, 192, 193, 193, 193, 194,
697 362, 362, 362, 194, 194, 194, 201, 362, 362, 201,
698 201, 201, 201, 206, 206, 206, 362, 206, 362, 362,
699 362, 362, 362, 206, 362, 362, 206, 206, 206, 222,
700 222, 362, 222, 222, 222, 222, 222, 222, 222, 222,
702 222, 222, 222, 222, 222, 222, 236, 362, 362, 362,
703 362, 236, 362, 362, 362, 362, 236, 257, 362, 362,
704 257, 257, 257, 257, 262, 362, 362, 262, 262, 362,
705 362, 362, 262, 262, 277, 277, 277, 278, 278, 278,
706 362, 362, 362, 362, 278, 278, 278, 362, 362, 362,
707 278, 278, 278, 315, 362, 362, 315, 315, 315, 315,
708 332, 362, 362, 362, 332, 362, 362, 362, 332, 332,
709 7, 362, 362, 362, 362, 362, 362, 362, 362, 362,
710 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
711 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
713 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
714 362, 362, 362, 362, 362, 362, 362, 362, 362
717 static yyconst short int yy_chk[1820] =
719 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
720 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
721 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
722 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
723 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
724 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
725 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
726 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
727 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
728 3, 3, 3, 3, 3, 3, 5, 6, 35, 371,
730 5, 6, 11, 12, 371, 39, 11, 11, 35, 11,
731 35, 11, 31, 350, 12, 12, 11, 11, 11, 33,
732 31, 32, 31, 11, 91, 32, 39, 38, 91, 33,
733 33, 32, 73, 11, 11, 11, 11, 38, 38, 73,
734 344, 11, 14, 14, 14, 14, 14, 14, 14, 14,
735 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
736 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
737 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
738 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
739 20, 20, 20, 36, 22, 63, 36, 372, 61, 40,
741 23, 63, 372, 36, 22, 20, 22, 22, 61, 37,
742 23, 20, 23, 23, 337, 37, 22, 336, 20, 37,
743 40, 22, 23, 29, 29, 29, 34, 23, 43, 34,
744 335, 29, 45, 46, 48, 22, 34, 34, 29, 47,
745 49, 34, 29, 30, 30, 30, 47, 51, 54, 43,
746 49, 30, 56, 45, 46, 48, 57, 58, 30, 59,
747 47, 49, 30, 74, 332, 51, 54, 65, 51, 54,
748 331, 56, 30, 56, 57, 65, 328, 57, 58, 65,
749 59, 74, 30, 42, 42, 42, 42, 42, 42, 42,
750 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
752 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
753 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
754 42, 42, 42, 42, 42, 42, 42, 42, 44, 44,
755 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
756 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
757 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
758 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
759 44, 44, 44, 44, 44, 44, 50, 50, 50, 50,
760 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
761 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
763 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
764 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
765 50, 50, 50, 52, 52, 75, 267, 76, 77, 83,
766 83, 84, 84, 267, 52, 130, 52, 52, 77, 102,
767 102, 325, 104, 75, 52, 76, 52, 104, 104, 115,
768 117, 52, 118, 264, 118, 264, 130, 186, 186, 115,
769 117, 319, 118, 117, 318, 52, 55, 55, 55, 55,
770 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
771 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
772 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
774 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
775 55, 60, 60, 60, 60, 60, 60, 60, 60, 60,
776 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
777 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
778 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
779 60, 60, 60, 60, 60, 60, 60, 60, 71, 71,
780 71, 71, 71, 71, 71, 71, 71, 317, 71, 71,
781 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
782 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
783 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
785 71, 71, 71, 71, 71, 71, 86, 86, 86, 111,
786 111, 111, 119, 120, 86, 315, 121, 122, 314, 122,
787 126, 125, 119, 120, 111, 119, 121, 122, 111, 125,
788 126, 125, 198, 198, 86, 86, 86, 86, 86, 86,
789 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
790 86, 86, 86, 92, 123, 124, 313, 127, 128, 312,
791 133, 128, 307, 307, 123, 124, 127, 127, 128, 124,
792 123, 133, 133, 92, 92, 92, 92, 92, 92, 92,
793 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
794 92, 92, 95, 95, 95, 311, 103, 112, 112, 112,
796 114, 114, 114, 310, 114, 112, 103, 95, 103, 103,
797 132, 309, 112, 95, 129, 141, 112, 135, 103, 306,
798 95, 114, 144, 103, 129, 148, 129, 304, 135, 135,
799 297, 132, 137, 137, 137, 150, 141, 152, 154, 346,
800 137, 346, 196, 144, 208, 152, 148, 209, 150, 150,
801 152, 152, 196, 296, 208, 284, 150, 209, 152, 154,
802 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
803 137, 137, 137, 137, 137, 137, 137, 137, 137, 140,
804 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
805 140, 140, 140, 140, 140, 140, 140, 140, 142, 142,
807 155, 157, 158, 142, 211, 161, 179, 179, 179, 187,
808 187, 187, 329, 329, 211, 179, 277, 199, 199, 212,
809 276, 155, 157, 158, 142, 145, 161, 199, 187, 212,
810 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
811 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
812 146, 146, 305, 355, 355, 275, 274, 305, 305, 273,
813 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
814 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
815 149, 164, 197, 197, 188, 188, 188, 272, 210, 213,
816 215, 210, 197, 149, 149, 241, 164, 197, 210, 213,
818 215, 149, 164, 188, 149, 149, 149, 149, 149, 149,
819 153, 153, 381, 382, 266, 260, 241, 381, 382, 257,
820 255, 153, 153, 153, 153, 153, 153, 156, 156, 156,
821 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
822 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
823 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
824 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
825 156, 156, 160, 160, 160, 250, 160, 202, 202, 202,
826 160, 248, 244, 216, 217, 202, 235, 160, 227, 201,
827 195, 160, 202, 216, 217, 193, 202, 160, 162, 162,
829 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
830 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
831 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
832 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
833 162, 162, 162, 162, 162, 190, 190, 203, 203, 203,
834 191, 203, 185, 268, 218, 184, 190, 190, 190, 190,
835 190, 190, 206, 206, 206, 218, 218, 183, 203, 204,
836 206, 268, 214, 204, 204, 182, 204, 206, 204, 181,
837 214, 206, 214, 204, 204, 204, 180, 219, 219, 219,
838 204, 219, 222, 222, 224, 224, 229, 222, 269, 224,
840 204, 204, 204, 204, 262, 178, 219, 270, 204, 229,
841 229, 288, 219, 220, 262, 230, 269, 229, 222, 229,
842 224, 252, 252, 252, 229, 270, 220, 220, 230, 230,
843 252, 177, 288, 176, 175, 173, 230, 220, 220, 220,
844 220, 220, 220, 225, 225, 225, 225, 225, 225, 225,
845 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
846 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
847 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
848 225, 225, 225, 225, 225, 225, 225, 225, 228, 254,
849 254, 254, 263, 263, 172, 265, 265, 171, 228, 271,
851 228, 228, 263, 316, 231, 265, 170, 263, 254, 271,
852 228, 228, 228, 228, 228, 228, 228, 231, 231, 167,
853 279, 280, 281, 166, 316, 231, 165, 231, 232, 232,
854 279, 280, 281, 283, 290, 159, 151, 147, 143, 232,
855 232, 232, 232, 232, 232, 234, 234, 234, 283, 234,
856 278, 278, 278, 234, 283, 290, 330, 330, 278, 139,
857 234, 136, 290, 134, 234, 278, 330, 116, 108, 278,
858 234, 239, 239, 239, 239, 239, 239, 239, 239, 239,
859 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
860 239, 240, 240, 99, 90, 89, 88, 87, 82, 81,
862 80, 240, 240, 240, 240, 240, 240, 240, 240, 240,
863 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
864 240, 256, 256, 282, 282, 282, 79, 282, 333, 333,
865 293, 294, 256, 256, 256, 256, 256, 256, 333, 294,
866 78, 294, 282, 293, 293, 72, 345, 345, 282, 285,
867 285, 293, 294, 293, 295, 340, 345, 69, 293, 68,
868 285, 285, 285, 285, 285, 285, 286, 295, 295, 67,
869 308, 308, 308, 66, 64, 295, 340, 295, 308, 286,
870 286, 62, 53, 340, 27, 308, 354, 354, 354, 308,
871 286, 286, 286, 286, 286, 286, 291, 291, 26, 25,
873 24, 21, 19, 17, 7, 354, 0, 291, 291, 291,
874 291, 291, 291, 298, 298, 298, 298, 298, 298, 298,
875 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
876 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
877 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
878 298, 298, 298, 298, 298, 298, 298, 298, 320, 320,
879 0, 0, 0, 323, 0, 338, 0, 321, 0, 320,
880 320, 320, 320, 320, 320, 321, 323, 323, 338, 338,
881 321, 321, 339, 0, 323, 342, 338, 0, 321, 322,
882 347, 347, 0, 0, 0, 339, 339, 0, 342, 342,
884 347, 322, 322, 339, 0, 339, 342, 0, 342, 0,
885 357, 322, 322, 322, 322, 322, 322, 322, 327, 327,
886 327, 351, 327, 357, 357, 0, 327, 353, 352, 358,
887 358, 357, 359, 327, 351, 351, 352, 327, 352, 358,
888 353, 353, 351, 327, 351, 359, 359, 0, 353, 352,
889 353, 360, 360, 359, 361, 359, 0, 0, 0, 0,
890 0, 360, 0, 0, 0, 0, 0, 361, 361, 0,
891 0, 0, 0, 0, 0, 361, 0, 361, 363, 0,
892 0, 363, 0, 0, 0, 363, 363, 363, 364, 364,
893 364, 0, 0, 0, 0, 0, 364, 0, 364, 0,
895 0, 364, 364, 364, 365, 0, 365, 365, 365, 366,
896 366, 366, 0, 0, 0, 0, 366, 366, 366, 0,
897 0, 0, 366, 366, 366, 367, 367, 367, 367, 367,
898 367, 367, 367, 367, 367, 367, 367, 367, 367, 368,
899 368, 0, 368, 368, 368, 368, 368, 368, 368, 368,
900 368, 368, 368, 368, 368, 368, 369, 369, 369, 370,
901 0, 0, 0, 370, 370, 370, 373, 0, 0, 373,
902 373, 373, 373, 374, 374, 374, 0, 374, 0, 0,
903 0, 0, 0, 374, 0, 0, 374, 374, 374, 375,
904 375, 0, 375, 375, 375, 375, 375, 375, 375, 375,
906 375, 375, 375, 375, 375, 375, 376, 0, 0, 0,
907 0, 376, 0, 0, 0, 0, 376, 377, 0, 0,
908 377, 377, 377, 377, 378, 0, 0, 378, 378, 0,
909 0, 0, 378, 378, 379, 379, 379, 380, 380, 380,
910 0, 0, 0, 0, 380, 380, 380, 0, 0, 0,
911 380, 380, 380, 383, 0, 0, 383, 383, 383, 383,
912 384, 0, 0, 0, 384, 0, 0, 0, 384, 384,
913 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
914 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
915 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
917 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
918 362, 362, 362, 362, 362, 362, 362, 362, 362
921 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
922 static char *yy_full_match;
924 static int yy_looking_for_trail_begin = 0;
925 static int yy_full_lp;
926 static int *yy_full_state;
927 #define YY_TRAILING_MASK 0x2000
928 #define YY_TRAILING_HEAD_MASK 0x4000
931 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
932 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
933 yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
934 yy_state_ptr = yy_full_state; /* restore orig. state */ \
935 yy_current_state = *yy_state_ptr; /* restore curr. state */ \
939 #define yymore() yymore_used_but_not_detected
940 #define YY_MORE_ADJ 0
941 #define YY_RESTORE_YY_MORE_OFFSET
943 #line 1 "./ada-lex.l"
945 /* FLEX lexer for Ada expressions, for GDB.
946 Copyright (C) 1994, 1997, 2000
947 Free Software Foundation, Inc.
949 This file is part of GDB.
951 This program is free software; you can redistribute it and/or modify
952 it under the terms of the GNU General Public License as published by
953 the Free Software Foundation; either version 2 of the License, or
954 (at your option) any later version.
956 This program is distributed in the hope that it will be useful,
957 but WITHOUT ANY WARRANTY; without even the implied warranty of
958 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
959 GNU General Public License for more details.
961 You should have received a copy of the GNU General Public License
962 along with this program; if not, write to the Free Software
963 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
964 /*----------------------------------------------------------------------*/
965 /* The converted version of this file is to be included in ada-exp.y, */
966 /* the Ada parser for gdb. The function yylex obtains characters from */
967 /* the global pointer lexptr. It returns a syntactic category for */
968 /* each successive token and places a semantic value into yylval */
969 /* (ada-lval), defined by the parser. */
970 /* Run flex with (at least) the -i option (case-insensitive), and the -I */
971 /* option (interactive---no unnecessary lookahead). */
972 #line 48 "./ada-lex.l"
973 #define NUMERAL_WIDTH 256
974 #define LONGEST_SIGN ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1))
976 /* Temporary staging for numeric literals. */
977 static char numbuf[NUMERAL_WIDTH];
978 static void canonicalizeNumeral (char* s1, const char*);
979 static int processInt (const char*, const char*, const char*);
980 static int processReal (const char*);
981 static int processId (const char*, int);
982 static int processAttribute (const char*);
983 static int find_dot_all (const char*);
986 #define YY_DECL static int yylex ( void )
989 #define YY_INPUT(BUF, RESULT, MAX_SIZE) \
990 if ( *lexptr == '\000' ) \
991 (RESULT) = YY_NULL; \
999 static char *tempbuf = NULL;
1000 static int tempbufsize = 0;
1001 static int tempbuf_len;
1002 static struct block* left_block_context;
1004 static void resize_tempbuf (unsigned int);
1006 static void block_lookup (char*, char*);
1008 static int name_lookup (char*, char*, int*);
1010 static int find_dot_all (const char*);
1013 #define BEFORE_QUAL_QUOTE 2
1016 /* Macros after this point can all be overridden by user definitions in
1020 #ifndef YY_SKIP_YYWRAP
1022 extern "C" int yywrap YY_PROTO(( void ));
1024 extern int yywrap YY_PROTO(( void ));
1029 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
1033 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1036 #ifdef YY_NEED_STRLEN
1037 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1042 static int yyinput YY_PROTO(( void ));
1044 static int input YY_PROTO(( void ));
1049 static int yy_start_stack_ptr = 0;
1050 static int yy_start_stack_depth = 0;
1051 static int *yy_start_stack = 0;
1052 #ifndef YY_NO_PUSH_STATE
1053 static void yy_push_state YY_PROTO(( int new_state ));
1055 #ifndef YY_NO_POP_STATE
1056 static void yy_pop_state YY_PROTO(( void ));
1058 #ifndef YY_NO_TOP_STATE
1059 static int yy_top_state YY_PROTO(( void ));
1063 #define YY_NO_PUSH_STATE 1
1064 #define YY_NO_POP_STATE 1
1065 #define YY_NO_TOP_STATE 1
1068 #ifdef YY_MALLOC_DECL
1076 /* Just try to get by without declaring the routines. This will fail
1077 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1078 * or sizeof(void*) != sizeof(int).
1083 /* Amount of stuff to slurp up with each read. */
1084 #ifndef YY_READ_BUF_SIZE
1085 #define YY_READ_BUF_SIZE 8192
1088 /* Copy whatever the last rule matched to the standard output. */
1091 /* This used to be an fputs(), but since the string might contain NUL's,
1092 * we now use fwrite().
1094 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1097 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1098 * is returned in "result".
1101 #define YY_INPUT(buf,result,max_size) \
1102 if ( yy_current_buffer->yy_is_interactive ) \
1105 for ( n = 0; n < max_size && \
1106 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1107 buf[n] = (char) c; \
1109 buf[n++] = (char) c; \
1110 if ( c == EOF && ferror( yyin ) ) \
1111 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1114 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1115 && ferror( yyin ) ) \
1116 YY_FATAL_ERROR( "input in flex scanner failed" );
1119 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1120 * we don't want an extra ';' after the "return" because that will cause
1121 * some compilers to complain about unreachable statements.
1124 #define yyterminate() return YY_NULL
1127 /* Number of entries by which start-condition stack grows. */
1128 #ifndef YY_START_STACK_INCR
1129 #define YY_START_STACK_INCR 25
1132 /* Report a fatal error. */
1133 #ifndef YY_FATAL_ERROR
1134 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1137 /* Default declaration of generated scanner - a define so the user can
1138 * easily add parameters.
1141 #define YY_DECL int yylex YY_PROTO(( void ))
1144 /* Code executed at the beginning of each rule, after yytext and yyleng
1147 #ifndef YY_USER_ACTION
1148 #define YY_USER_ACTION
1151 /* Code executed at the end of each rule. */
1153 #define YY_BREAK break;
1156 #define YY_RULE_SETUP \
1161 register yy_state_type yy_current_state;
1162 register char *yy_cp, *yy_bp;
1163 register int yy_act;
1165 #line 91 "./ada-lex.l"
1178 yy_start = 1; /* first start state */
1186 if ( ! yy_current_buffer )
1188 yy_create_buffer( yyin, YY_BUF_SIZE );
1190 yy_load_buffer_state();
1193 while ( 1 ) /* loops until end-of-file is reached */
1197 /* Support of yytext. */
1198 *yy_cp = yy_hold_char;
1200 /* yy_bp points to the position in yy_ch_buf of the start of
1205 yy_current_state = yy_start;
1206 yy_state_ptr = yy_state_buf;
1207 *yy_state_ptr++ = yy_current_state;
1211 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1212 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1214 yy_current_state = (int) yy_def[yy_current_state];
1215 if ( yy_current_state >= 363 )
1216 yy_c = yy_meta[(unsigned int) yy_c];
1218 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1219 *yy_state_ptr++ = yy_current_state;
1222 while ( yy_base[yy_current_state] != 1771 );
1225 yy_current_state = *--yy_state_ptr;
1226 yy_lp = yy_accept[yy_current_state];
1227 find_rule: /* we branch to this label when backing up */
1228 for ( ; ; ) /* until we find what rule we matched */
1230 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1232 yy_act = yy_acclist[yy_lp];
1233 if ( yy_act & YY_TRAILING_HEAD_MASK ||
1234 yy_looking_for_trail_begin )
1236 if ( yy_act == yy_looking_for_trail_begin )
1238 yy_looking_for_trail_begin = 0;
1239 yy_act &= ~YY_TRAILING_HEAD_MASK;
1243 else if ( yy_act & YY_TRAILING_MASK )
1245 yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
1246 yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
1250 yy_full_match = yy_cp;
1251 yy_full_state = yy_state_ptr;
1259 yy_current_state = *--yy_state_ptr;
1260 yy_lp = yy_accept[yy_current_state];
1263 YY_DO_BEFORE_ACTION;
1266 do_action: /* This label is used only to access EOF actions. */
1270 { /* beginning of action switch */
1273 #line 93 "./ada-lex.l"
1278 #line 95 "./ada-lex.l"
1283 #line 97 "./ada-lex.l"
1285 canonicalizeNumeral (numbuf, yytext);
1286 return processInt (NULL, numbuf, strrchr(numbuf, 'e')+1);
1291 #line 102 "./ada-lex.l"
1293 canonicalizeNumeral (numbuf, yytext);
1294 return processInt (NULL, numbuf, NULL);
1299 #line 107 "./ada-lex.l"
1301 canonicalizeNumeral (numbuf, yytext);
1302 return processInt (numbuf,
1303 strchr (numbuf, '#') + 1,
1304 strrchr(numbuf, '#') + 1);
1309 #line 114 "./ada-lex.l"
1311 canonicalizeNumeral (numbuf, yytext);
1312 return processInt (numbuf, strchr (numbuf, '#') + 1, NULL);
1317 #line 119 "./ada-lex.l"
1319 canonicalizeNumeral (numbuf, yytext+2);
1320 return processInt ("16#", numbuf, NULL);
1325 #line 125 "./ada-lex.l"
1327 canonicalizeNumeral (numbuf, yytext);
1328 return processReal (numbuf);
1333 #line 130 "./ada-lex.l"
1335 canonicalizeNumeral (numbuf, yytext);
1336 return processReal (numbuf);
1341 #line 135 "./ada-lex.l"
1343 error ("Based real literals not implemented yet.");
1348 #line 139 "./ada-lex.l"
1350 error ("Based real literals not implemented yet.");
1355 #line 143 "./ada-lex.l"
1357 yylval.typed_val.type = builtin_type_ada_char;
1358 yylval.typed_val.val = yytext[1];
1364 #line 149 "./ada-lex.l"
1367 yylval.typed_val.type = builtin_type_ada_char;
1368 sscanf (yytext+3, "%2x", &v);
1369 yylval.typed_val.val = v;
1375 #line 157 "./ada-lex.l"
1376 { return processId (yytext, yyleng); }
1380 #line 159 "./ada-lex.l"
1388 #line 164 "./ada-lex.l"
1390 resize_tempbuf (yyleng+tempbuf_len);
1391 strncpy (tempbuf+tempbuf_len, yytext, yyleng-1);
1392 tempbuf_len += yyleng-1;
1393 yylval.sval.ptr = tempbuf;
1394 yylval.sval.length = tempbuf_len;
1401 #line 174 "./ada-lex.l"
1404 resize_tempbuf (yyleng-5+tempbuf_len+1);
1405 strncpy (tempbuf+tempbuf_len, yytext, yyleng-6);
1406 sscanf(yytext+yyleng-4, "%2x", &n);
1407 tempbuf[yyleng-6+tempbuf_len] = (char) n;
1408 tempbuf_len += yyleng-5;
1413 #line 183 "./ada-lex.l"
1416 resize_tempbuf (yyleng-4+tempbuf_len+1);
1417 strncpy (tempbuf+tempbuf_len, yytext, yyleng-6);
1418 tempbuf[yyleng-5+tempbuf_len] = '"';
1419 tempbuf_len += yyleng-4;
1424 #line 191 "./ada-lex.l"
1426 while (*lexptr != 'i' && *lexptr != 'I')
1435 #line 200 "./ada-lex.l"
1440 #line 201 "./ada-lex.l"
1445 #line 202 "./ada-lex.l"
1450 #line 203 "./ada-lex.l"
1455 #line 204 "./ada-lex.l"
1460 #line 205 "./ada-lex.l"
1465 #line 206 "./ada-lex.l"
1470 #line 207 "./ada-lex.l"
1471 { return NULL_PTR; }
1475 #line 208 "./ada-lex.l"
1480 #line 209 "./ada-lex.l"
1485 #line 210 "./ada-lex.l"
1490 #line 211 "./ada-lex.l"
1496 #line 215 "./ada-lex.l"
1497 { return processAttribute (yytext+1); }
1502 #line 219 "./ada-lex.l"
1507 #line 220 "./ada-lex.l"
1512 #line 221 "./ada-lex.l"
1513 { return STARSTAR; }
1517 #line 222 "./ada-lex.l"
1522 #line 223 "./ada-lex.l"
1523 { return NOTEQUAL; }
1527 #line 224 "./ada-lex.l"
1532 #line 225 "./ada-lex.l"
1537 #line 227 "./ada-lex.l"
1538 { BEGIN INITIAL; return '\''; }
1542 #line 229 "./ada-lex.l"
1543 { return yytext[0]; }
1547 #line 231 "./ada-lex.l"
1548 { if (paren_depth == 0 && comma_terminates)
1560 #line 241 "./ada-lex.l"
1561 { paren_depth += 1; return '('; }
1565 #line 242 "./ada-lex.l"
1566 { if (paren_depth == 0)
1581 #line 255 "./ada-lex.l"
1586 #line 257 "./ada-lex.l"
1588 processId (yytext+1, yyleng-1);
1594 #line 262 "./ada-lex.l"
1596 int all_posn = find_dot_all (yytext);
1597 int token_type, segments, k;
1600 if (all_posn == -1 && yytext[yyleng-1] == '\'')
1605 } while (yytext[yyleng-1] == ' ');
1612 processId(yytext, yyleng);
1613 segments = name_lookup (ada_mangle (yylval.ssym.stoken.ptr),
1614 yylval.ssym.stoken.ptr, &token_type);
1615 left_block_context = NULL;
1616 for (k = yyleng; segments > 0 && k > 0; k -= 1)
1618 if (yytext[k-1] == '.')
1623 error ("confused by name %s", yytext);
1626 BEGIN BEFORE_QUAL_QUOTE;
1630 /* GDB EXPRESSION CONSTRUCTS */
1633 #line 300 "./ada-lex.l"
1635 processId(yytext, yyleng-2);
1636 block_lookup (yylval.ssym.stoken.ptr, yylval.ssym.stoken.ptr);
1642 #line 306 "./ada-lex.l"
1644 processId(yytext, yyleng-2);
1645 block_lookup (ada_mangle (yylval.ssym.stoken.ptr),
1646 yylval.ssym.stoken.ptr);
1652 #line 313 "./ada-lex.l"
1653 { return yytext[0]; }
1657 #line 315 "./ada-lex.l"
1658 { yylval.lval = -1; return LAST; }
1662 #line 316 "./ada-lex.l"
1663 { yylval.lval = -atoi(yytext+2); return LAST; }
1667 #line 317 "./ada-lex.l"
1668 { yylval.lval = 0; return LAST; }
1672 #line 318 "./ada-lex.l"
1673 { yylval.lval = atoi(yytext+1); return LAST; }
1675 /* REGISTERS AND GDB CONVENIENCE VARIABLES */
1678 #line 323 "./ada-lex.l"
1681 for (c = 0; c < NUM_REGS; c++)
1682 if (REGISTER_NAME (c) &&
1683 strcmp (yytext + 1, REGISTER_NAME (c)) == 0)
1688 yylval.sval.ptr = yytext;
1689 yylval.sval.length = yyleng;
1691 lookup_internalvar (copy_name (yylval.sval) + 1);
1692 return INTERNAL_VARIABLE;
1695 /* CATCH-ALL ERROR CASE */
1698 #line 341 "./ada-lex.l"
1699 { error ("Invalid character '%s' in expression.", yytext); }
1703 #line 342 "./ada-lex.l"
1704 YY_FATAL_ERROR( "flex scanner jammed" );
1706 case YY_STATE_EOF(INITIAL):
1707 case YY_STATE_EOF(IN_STRING):
1708 case YY_STATE_EOF(BEFORE_QUAL_QUOTE):
1711 case YY_END_OF_BUFFER:
1713 /* Amount of text matched not including the EOB char. */
1714 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1716 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1717 *yy_cp = yy_hold_char;
1718 YY_RESTORE_YY_MORE_OFFSET
1720 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1722 /* We're scanning a new file or input source. It's
1723 * possible that this happened because the user
1724 * just pointed yyin at a new source and called
1725 * yylex(). If so, then we have to assure
1726 * consistency between yy_current_buffer and our
1727 * globals. Here is the right place to do so, because
1728 * this is the first action (other than possibly a
1729 * back-up) that will match for the new input source.
1731 yy_n_chars = yy_current_buffer->yy_n_chars;
1732 yy_current_buffer->yy_input_file = yyin;
1733 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1736 /* Note that here we test for yy_c_buf_p "<=" to the position
1737 * of the first EOB in the buffer, since yy_c_buf_p will
1738 * already have been incremented past the NUL character
1739 * (since all states make transitions on EOB to the
1740 * end-of-buffer state). Contrast this with the test
1743 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1744 { /* This was really a NUL. */
1745 yy_state_type yy_next_state;
1747 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1749 yy_current_state = yy_get_previous_state();
1751 /* Okay, we're now positioned to make the NUL
1752 * transition. We couldn't have
1753 * yy_get_previous_state() go ahead and do it
1754 * for us because it doesn't know how to deal
1755 * with the possibility of jamming (and we don't
1756 * want to build jamming into it because then it
1757 * will run more slowly).
1760 yy_next_state = yy_try_NUL_trans( yy_current_state );
1762 yy_bp = yytext_ptr + YY_MORE_ADJ;
1764 if ( yy_next_state )
1766 /* Consume the NUL. */
1767 yy_cp = ++yy_c_buf_p;
1768 yy_current_state = yy_next_state;
1775 goto yy_find_action;
1779 else switch ( yy_get_next_buffer() )
1781 case EOB_ACT_END_OF_FILE:
1783 yy_did_buffer_switch_on_eof = 0;
1787 /* Note: because we've taken care in
1788 * yy_get_next_buffer() to have set up
1789 * yytext, we can now set up
1790 * yy_c_buf_p so that if some total
1791 * hoser (like flex itself) wants to
1792 * call the scanner after we return the
1793 * YY_NULL, it'll still work - another
1794 * YY_NULL will get returned.
1796 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1798 yy_act = YY_STATE_EOF(YY_START);
1804 if ( ! yy_did_buffer_switch_on_eof )
1810 case EOB_ACT_CONTINUE_SCAN:
1812 yytext_ptr + yy_amount_of_matched_text;
1814 yy_current_state = yy_get_previous_state();
1817 yy_bp = yytext_ptr + YY_MORE_ADJ;
1820 case EOB_ACT_LAST_MATCH:
1822 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1824 yy_current_state = yy_get_previous_state();
1827 yy_bp = yytext_ptr + YY_MORE_ADJ;
1828 goto yy_find_action;
1835 "fatal flex scanner internal error--no action found" );
1836 } /* end of action switch */
1837 } /* end of scanning one token */
1838 } /* end of yylex */
1841 /* yy_get_next_buffer - try to read in a new buffer
1843 * Returns a code representing an action:
1844 * EOB_ACT_LAST_MATCH -
1845 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1846 * EOB_ACT_END_OF_FILE - end of file
1849 static int yy_get_next_buffer()
1851 register char *dest = yy_current_buffer->yy_ch_buf;
1852 register char *source = yytext_ptr;
1853 register int number_to_move, i;
1856 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1858 "fatal flex scanner internal error--end of buffer missed" );
1860 if ( yy_current_buffer->yy_fill_buffer == 0 )
1861 { /* Don't try to fill the buffer, so this is an EOF. */
1862 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1864 /* We matched a single character, the EOB, so
1865 * treat this as a final EOF.
1867 return EOB_ACT_END_OF_FILE;
1872 /* We matched some text prior to the EOB, first
1875 return EOB_ACT_LAST_MATCH;
1879 /* Try to read more data. */
1881 /* First move last chars to start of buffer. */
1882 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1884 for ( i = 0; i < number_to_move; ++i )
1885 *(dest++) = *(source++);
1887 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1888 /* don't do the read, it's not guaranteed to return an EOF,
1891 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1896 yy_current_buffer->yy_buf_size - number_to_move - 1;
1898 while ( num_to_read <= 0 )
1899 { /* Not enough room in the buffer - grow it. */
1900 #ifdef YY_USES_REJECT
1902 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1905 /* just a shorter name for the current buffer */
1906 YY_BUFFER_STATE b = yy_current_buffer;
1908 int yy_c_buf_p_offset =
1909 (int) (yy_c_buf_p - b->yy_ch_buf);
1911 if ( b->yy_is_our_buffer )
1913 int new_size = b->yy_buf_size * 2;
1915 if ( new_size <= 0 )
1916 b->yy_buf_size += b->yy_buf_size / 8;
1918 b->yy_buf_size *= 2;
1920 b->yy_ch_buf = (char *)
1921 /* Include room in for 2 EOB chars. */
1922 yy_flex_realloc( (void *) b->yy_ch_buf,
1923 b->yy_buf_size + 2 );
1926 /* Can't grow it, we don't own it. */
1929 if ( ! b->yy_ch_buf )
1931 "fatal error - scanner input buffer overflow" );
1933 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1935 num_to_read = yy_current_buffer->yy_buf_size -
1940 if ( num_to_read > YY_READ_BUF_SIZE )
1941 num_to_read = YY_READ_BUF_SIZE;
1943 /* Read in more data. */
1944 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1945 yy_n_chars, num_to_read );
1947 yy_current_buffer->yy_n_chars = yy_n_chars;
1950 if ( yy_n_chars == 0 )
1952 if ( number_to_move == YY_MORE_ADJ )
1954 ret_val = EOB_ACT_END_OF_FILE;
1960 ret_val = EOB_ACT_LAST_MATCH;
1961 yy_current_buffer->yy_buffer_status =
1962 YY_BUFFER_EOF_PENDING;
1967 ret_val = EOB_ACT_CONTINUE_SCAN;
1969 yy_n_chars += number_to_move;
1970 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1971 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1973 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1979 /* yy_get_previous_state - get the state just before the EOB char was reached */
1981 static yy_state_type yy_get_previous_state()
1983 register yy_state_type yy_current_state;
1984 register char *yy_cp;
1986 yy_current_state = yy_start;
1987 yy_state_ptr = yy_state_buf;
1988 *yy_state_ptr++ = yy_current_state;
1990 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1992 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1993 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1995 yy_current_state = (int) yy_def[yy_current_state];
1996 if ( yy_current_state >= 363 )
1997 yy_c = yy_meta[(unsigned int) yy_c];
1999 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2000 *yy_state_ptr++ = yy_current_state;
2003 return yy_current_state;
2007 /* yy_try_NUL_trans - try to make a transition on the NUL character
2010 * next_state = yy_try_NUL_trans( current_state );
2013 #ifdef YY_USE_PROTOS
2014 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2016 static yy_state_type yy_try_NUL_trans( yy_current_state )
2017 yy_state_type yy_current_state;
2020 register int yy_is_jam;
2022 register YY_CHAR yy_c = 1;
2023 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2025 yy_current_state = (int) yy_def[yy_current_state];
2026 if ( yy_current_state >= 363 )
2027 yy_c = yy_meta[(unsigned int) yy_c];
2029 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2030 yy_is_jam = (yy_current_state == 362);
2032 *yy_state_ptr++ = yy_current_state;
2034 return yy_is_jam ? 0 : yy_current_state;
2039 #ifdef YY_USE_PROTOS
2040 static void yyunput( int c, register char *yy_bp )
2042 static void yyunput( c, yy_bp )
2044 register char *yy_bp;
2047 register char *yy_cp = yy_c_buf_p;
2049 /* undo effects of setting up yytext */
2050 *yy_cp = yy_hold_char;
2052 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2053 { /* need to shift things up to make room */
2054 /* +2 for EOB chars. */
2055 register int number_to_move = yy_n_chars + 2;
2056 register char *dest = &yy_current_buffer->yy_ch_buf[
2057 yy_current_buffer->yy_buf_size + 2];
2058 register char *source =
2059 &yy_current_buffer->yy_ch_buf[number_to_move];
2061 while ( source > yy_current_buffer->yy_ch_buf )
2062 *--dest = *--source;
2064 yy_cp += (int) (dest - source);
2065 yy_bp += (int) (dest - source);
2066 yy_current_buffer->yy_n_chars =
2067 yy_n_chars = yy_current_buffer->yy_buf_size;
2069 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2070 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2073 *--yy_cp = (char) c;
2077 yy_hold_char = *yy_cp;
2080 #endif /* ifndef YY_NO_UNPUT */
2084 static int yyinput()
2091 *yy_c_buf_p = yy_hold_char;
2093 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2095 /* yy_c_buf_p now points to the character we want to return.
2096 * If this occurs *before* the EOB characters, then it's a
2097 * valid NUL; if not, then we've hit the end of the buffer.
2099 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2100 /* This was really a NUL. */
2104 { /* need more input */
2105 int offset = yy_c_buf_p - yytext_ptr;
2108 switch ( yy_get_next_buffer() )
2110 case EOB_ACT_LAST_MATCH:
2111 /* This happens because yy_g_n_b()
2112 * sees that we've accumulated a
2113 * token and flags that we need to
2114 * try matching the token before
2115 * proceeding. But for input(),
2116 * there's no matching to consider.
2117 * So convert the EOB_ACT_LAST_MATCH
2118 * to EOB_ACT_END_OF_FILE.
2121 /* Reset buffer status. */
2126 case EOB_ACT_END_OF_FILE:
2131 if ( ! yy_did_buffer_switch_on_eof )
2140 case EOB_ACT_CONTINUE_SCAN:
2141 yy_c_buf_p = yytext_ptr + offset;
2147 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2148 *yy_c_buf_p = '\0'; /* preserve yytext */
2149 yy_hold_char = *++yy_c_buf_p;
2156 #ifdef YY_USE_PROTOS
2157 void yyrestart( FILE *input_file )
2159 void yyrestart( input_file )
2163 if ( ! yy_current_buffer )
2164 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2166 yy_init_buffer( yy_current_buffer, input_file );
2167 yy_load_buffer_state();
2171 #ifdef YY_USE_PROTOS
2172 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2174 void yy_switch_to_buffer( new_buffer )
2175 YY_BUFFER_STATE new_buffer;
2178 if ( yy_current_buffer == new_buffer )
2181 if ( yy_current_buffer )
2183 /* Flush out information for old buffer. */
2184 *yy_c_buf_p = yy_hold_char;
2185 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2186 yy_current_buffer->yy_n_chars = yy_n_chars;
2189 yy_current_buffer = new_buffer;
2190 yy_load_buffer_state();
2192 /* We don't actually know whether we did this switch during
2193 * EOF (yywrap()) processing, but the only time this flag
2194 * is looked at is after yywrap() is called, so it's safe
2195 * to go ahead and always set it.
2197 yy_did_buffer_switch_on_eof = 1;
2201 #ifdef YY_USE_PROTOS
2202 void yy_load_buffer_state( void )
2204 void yy_load_buffer_state()
2207 yy_n_chars = yy_current_buffer->yy_n_chars;
2208 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2209 yyin = yy_current_buffer->yy_input_file;
2210 yy_hold_char = *yy_c_buf_p;
2214 #ifdef YY_USE_PROTOS
2215 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2217 YY_BUFFER_STATE yy_create_buffer( file, size )
2224 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2226 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2228 b->yy_buf_size = size;
2230 /* yy_ch_buf has to be 2 characters longer than the size given because
2231 * we need to put in 2 end-of-buffer characters.
2233 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2234 if ( ! b->yy_ch_buf )
2235 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2237 b->yy_is_our_buffer = 1;
2239 yy_init_buffer( b, file );
2245 #ifdef YY_USE_PROTOS
2246 void yy_delete_buffer( YY_BUFFER_STATE b )
2248 void yy_delete_buffer( b )
2255 if ( b == yy_current_buffer )
2256 yy_current_buffer = (YY_BUFFER_STATE) 0;
2258 if ( b->yy_is_our_buffer )
2259 yy_flex_free( (void *) b->yy_ch_buf );
2261 yy_flex_free( (void *) b );
2265 #ifndef YY_ALWAYS_INTERACTIVE
2266 #ifndef YY_NEVER_INTERACTIVE
2267 extern int isatty YY_PROTO(( int ));
2271 #ifdef YY_USE_PROTOS
2272 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2274 void yy_init_buffer( b, file )
2281 yy_flush_buffer( b );
2283 b->yy_input_file = file;
2284 b->yy_fill_buffer = 1;
2286 #if YY_ALWAYS_INTERACTIVE
2287 b->yy_is_interactive = 1;
2289 #if YY_NEVER_INTERACTIVE
2290 b->yy_is_interactive = 0;
2292 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2298 #ifdef YY_USE_PROTOS
2299 void yy_flush_buffer( YY_BUFFER_STATE b )
2301 void yy_flush_buffer( b )
2311 /* We always need two end-of-buffer characters. The first causes
2312 * a transition to the end-of-buffer state. The second causes
2313 * a jam in that state.
2315 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2316 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2318 b->yy_buf_pos = &b->yy_ch_buf[0];
2321 b->yy_buffer_status = YY_BUFFER_NEW;
2323 if ( b == yy_current_buffer )
2324 yy_load_buffer_state();
2328 #ifndef YY_NO_SCAN_BUFFER
2329 #ifdef YY_USE_PROTOS
2330 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2332 YY_BUFFER_STATE yy_scan_buffer( base, size )
2340 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2341 base[size-1] != YY_END_OF_BUFFER_CHAR )
2342 /* They forgot to leave room for the EOB's. */
2345 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2347 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2349 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2350 b->yy_buf_pos = b->yy_ch_buf = base;
2351 b->yy_is_our_buffer = 0;
2352 b->yy_input_file = 0;
2353 b->yy_n_chars = b->yy_buf_size;
2354 b->yy_is_interactive = 0;
2356 b->yy_fill_buffer = 0;
2357 b->yy_buffer_status = YY_BUFFER_NEW;
2359 yy_switch_to_buffer( b );
2366 #ifndef YY_NO_SCAN_STRING
2367 #ifdef YY_USE_PROTOS
2368 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2370 YY_BUFFER_STATE yy_scan_string( yy_str )
2371 yyconst char *yy_str;
2375 for ( len = 0; yy_str[len]; ++len )
2378 return yy_scan_bytes( yy_str, len );
2383 #ifndef YY_NO_SCAN_BYTES
2384 #ifdef YY_USE_PROTOS
2385 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2387 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2388 yyconst char *bytes;
2397 /* Get memory for full buffer, including space for trailing EOB's. */
2399 buf = (char *) yy_flex_alloc( n );
2401 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2403 for ( i = 0; i < len; ++i )
2406 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2408 b = yy_scan_buffer( buf, n );
2410 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2412 /* It's okay to grow etc. this buffer, and we should throw it
2413 * away when we're done.
2415 b->yy_is_our_buffer = 1;
2422 #ifndef YY_NO_PUSH_STATE
2423 #ifdef YY_USE_PROTOS
2424 static void yy_push_state( int new_state )
2426 static void yy_push_state( new_state )
2430 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2434 yy_start_stack_depth += YY_START_STACK_INCR;
2435 new_size = yy_start_stack_depth * sizeof( int );
2437 if ( ! yy_start_stack )
2438 yy_start_stack = (int *) yy_flex_alloc( new_size );
2441 yy_start_stack = (int *) yy_flex_realloc(
2442 (void *) yy_start_stack, new_size );
2444 if ( ! yy_start_stack )
2446 "out of memory expanding start-condition stack" );
2449 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2456 #ifndef YY_NO_POP_STATE
2457 static void yy_pop_state()
2459 if ( --yy_start_stack_ptr < 0 )
2460 YY_FATAL_ERROR( "start-condition stack underflow" );
2462 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2467 #ifndef YY_NO_TOP_STATE
2468 static int yy_top_state()
2470 return yy_start_stack[yy_start_stack_ptr - 1];
2474 #ifndef YY_EXIT_FAILURE
2475 #define YY_EXIT_FAILURE 2
2478 #ifdef YY_USE_PROTOS
2479 static void yy_fatal_error( yyconst char msg[] )
2481 static void yy_fatal_error( msg )
2485 (void) fprintf( stderr, "%s\n", msg );
2486 exit( YY_EXIT_FAILURE );
2491 /* Redefine yyless() so it works in section 3 code. */
2497 /* Undo effects of setting up yytext. */ \
2498 yytext[yyleng] = yy_hold_char; \
2499 yy_c_buf_p = yytext + n; \
2500 yy_hold_char = *yy_c_buf_p; \
2501 *yy_c_buf_p = '\0'; \
2507 /* Internal utility routines. */
2510 #ifdef YY_USE_PROTOS
2511 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2513 static void yy_flex_strncpy( s1, s2, n )
2520 for ( i = 0; i < n; ++i )
2525 #ifdef YY_NEED_STRLEN
2526 #ifdef YY_USE_PROTOS
2527 static int yy_flex_strlen( yyconst char *s )
2529 static int yy_flex_strlen( s )
2534 for ( n = 0; s[n]; ++n )
2542 #ifdef YY_USE_PROTOS
2543 static void *yy_flex_alloc( yy_size_t size )
2545 static void *yy_flex_alloc( size )
2549 return (void *) malloc( size );
2552 #ifdef YY_USE_PROTOS
2553 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2555 static void *yy_flex_realloc( ptr, size )
2560 /* The cast to (char *) in the following accommodates both
2561 * implementations that use char* generic pointers, and those
2562 * that use void* generic pointers. It works with the latter
2563 * because both ANSI C and C++ allow castless assignment from
2564 * any pointer type to void*, and deal with argument conversions
2565 * as though doing an assignment.
2567 return (void *) realloc( (char *) ptr, size );
2570 #ifdef YY_USE_PROTOS
2571 static void yy_flex_free( void *ptr )
2573 static void yy_flex_free( ptr )
2587 #line 342 "./ada-lex.l"
2593 /* Initialize the lexer for processing new expression */
2595 lexer_init (FILE* inp)
2602 /* Make sure that tempbuf points at an array at least N characters long. */
2608 if (tempbufsize < n)
2610 tempbufsize = (n+63) & ~63;
2611 tempbuf = (char*) xrealloc (tempbuf, tempbufsize);
2615 /* Copy S2 to S1, removing all underscores, and downcasing all letters. */
2618 canonicalizeNumeral (s1,s2)
2622 for (; *s2 != '\000'; s2 += 1)
2633 #define HIGH_BYTE_POSN ((sizeof (ULONGEST) - 1) * HOST_CHAR_BIT)
2635 /* True (non-zero) iff DIGIT is a valid digit in radix BASE,
2636 where 2 <= BASE <= 16. */
2639 is_digit_in_base (digit, base)
2640 unsigned char digit;
2643 if (!isxdigit (digit))
2646 return (isdigit (digit) && digit < base + '0');
2648 return (isdigit (digit) || tolower (digit) < base - 10 + 'a');
2658 return tolower (c) - 'a' + 10;
2661 /* As for strtoul, but for ULONGEST results. */
2663 strtoulst (num, trailer, base)
2665 const char **trailer;
2668 unsigned int high_part;
2673 if (base < 2 || base > 16)
2678 lim = base - 1 + '0';
2680 result = high_part = 0;
2681 for (i = 0; is_digit_in_base (num[i], base); i += 1)
2683 result = result*base + digit_to_int (num[i]);
2684 high_part = high_part*base + (unsigned int) (result >> HIGH_BYTE_POSN);
2685 result &= ((ULONGEST) 1 << HIGH_BYTE_POSN) - 1;
2686 if (high_part > 0xff)
2689 result = high_part = 0;
2694 if (trailer != NULL)
2697 return result + ((ULONGEST) high_part << HIGH_BYTE_POSN);
2702 /* Interprets the prefix of NUM that consists of digits of the given BASE
2703 as an integer of that BASE, with the string EXP as an exponent.
2704 Puts value in yylval, and returns INT, if the string is valid. Causes
2705 an error if the number is improperly formated. BASE, if NULL, defaults
2706 to "10", and EXP to "1". The EXP does not contain a leading 'e' or 'E'. */
2709 processInt (base0, num0, exp0)
2724 base = strtol (base0, (char**) NULL, 10);
2725 if (base < 2 || base > 16)
2726 error ("Invalid base: %d.", base);
2732 exp = strtol(exp0, (char**) NULL, 10);
2735 result = strtoulst (num0, &trailer, base);
2736 if (errno == ERANGE)
2737 error ("Integer literal out of range");
2738 if (isxdigit(*trailer))
2739 error ("Invalid digit `%c' in based literal", *trailer);
2743 if (result > (ULONG_MAX / base))
2744 error ("Integer literal out of range");
2749 if ((result >> (TARGET_INT_BIT-1)) == 0)
2750 yylval.typed_val.type = builtin_type_ada_int;
2751 else if ((result >> (TARGET_LONG_BIT-1)) == 0)
2752 yylval.typed_val.type = builtin_type_ada_long;
2753 else if (((result >> (TARGET_LONG_BIT-1)) >> 1) == 0)
2755 /* We have a number representable as an unsigned integer quantity.
2756 For consistency with the C treatment, we will treat it as an
2757 anonymous modular (unsigned) quantity. Alas, the types are such
2758 that we need to store .val as a signed quantity. Sorry
2759 for the mess, but C doesn't officially guarantee that a simple
2760 assignment does the trick (no, it doesn't; read the reference manual).
2762 yylval.typed_val.type = builtin_type_unsigned_long;
2763 if (result & LONGEST_SIGN)
2764 yylval.typed_val.val =
2765 (LONGEST) (result & ~LONGEST_SIGN)
2766 - (LONGEST_SIGN>>1) - (LONGEST_SIGN>>1);
2768 yylval.typed_val.val = (LONGEST) result;
2772 yylval.typed_val.type = builtin_type_ada_long_long;
2774 yylval.typed_val.val = (LONGEST) result;
2782 if (sizeof (DOUBLEST) <= sizeof (float))
2783 sscanf (num0, "%g", &yylval.typed_val_float.dval);
2784 else if (sizeof (DOUBLEST) <= sizeof (double))
2785 sscanf (num0, "%lg", &yylval.typed_val_float.dval);
2788 #ifdef PRINTF_HAS_LONG_DOUBLE
2789 sscanf (num0, "%Lg", &yylval.typed_val_float.dval);
2791 /* Scan it into a double, then convert and assign it to the
2792 long double. This at least wins with values representable
2793 in the range of doubles. */
2795 sscanf (num0, "%lg", &temp);
2796 yylval.typed_val_float.dval = temp;
2800 yylval.typed_val_float.type = builtin_type_ada_float;
2801 if (sizeof(DOUBLEST) >= TARGET_DOUBLE_BIT / TARGET_CHAR_BIT)
2802 yylval.typed_val_float.type = builtin_type_ada_double;
2803 if (sizeof(DOUBLEST) >= TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT)
2804 yylval.typed_val_float.type = builtin_type_ada_long_double;
2810 processId (name0, len)
2814 char* name = xmalloc (len + 11);
2817 /* add_name_string_cleanup (name); */
2818 /* FIXME: add_name_string_cleanup should be defined in parse.c */
2819 while (len > 0 && isspace (name0[len-1]))
2824 if (isalnum (name0[i0]))
2826 name[i] = tolower (name0[i0]);
2829 else switch (name0[i0])
2832 name[i] = name0[i0];
2835 case ' ': case '\t':
2840 while (i0 < len && name0[i0] != '\'')
2842 name[i] = name0[i0];
2849 while (i0 < len && name0[i0] != '>')
2851 name[i] = name0[i0];
2860 yylval.ssym.sym = NULL;
2861 yylval.ssym.stoken.ptr = name;
2862 yylval.ssym.stoken.length = i;
2867 block_lookup (name, err_name)
2871 struct symbol** syms;
2872 struct block** blocks;
2874 struct symtab *symtab;
2875 nsyms = ada_lookup_symbol_list (name, left_block_context,
2876 VAR_NAMESPACE, &syms, &blocks);
2877 if (left_block_context == NULL &&
2878 (nsyms == 0 || SYMBOL_CLASS (syms[0]) != LOC_BLOCK))
2879 symtab = lookup_symtab (name);
2884 left_block_context = yylval.bval =
2885 BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK);
2886 else if (nsyms == 0 || SYMBOL_CLASS (syms[0]) != LOC_BLOCK)
2888 if (left_block_context == NULL)
2889 error ("No file or function \"%s\".", err_name);
2891 error ("No function \"%s\" in specified context.", err_name);
2895 left_block_context = yylval.bval = SYMBOL_BLOCK_VALUE (syms[0]);
2897 warning ("Function name \"%s\" ambiguous here", err_name);
2901 /* Look up NAME0 (assumed to be mangled) as a name in VAR_NAMESPACE,
2902 setting *TOKEN_TYPE to NAME or TYPENAME, depending on what is
2903 found. Try first the entire name, then the name without the last
2904 segment (i.e., after the last .id), etc., and return the number of
2905 segments that had to be removed to get a match. Calls error if no
2906 matches are found, using ERR_NAME in any error message. When
2907 exactly one symbol match is found, it is placed in yylval. */
2910 name_lookup (name0, err_name, token_type)
2915 struct symbol** syms;
2916 struct block** blocks;
2918 int len0 = strlen (name0);
2919 char* name = savestring (name0, len0);
2923 /* add_name_string_cleanup (name);*/
2924 /* FIXME: add_name_string_cleanup should be defined in parse.c */
2925 yylval.ssym.stoken.ptr = name;
2926 yylval.ssym.stoken.length = strlen (name);
2927 for (segments = 0; ; segments += 1)
2929 struct type* preferred_type;
2930 int i, preferred_index;
2932 if (left_block_context == NULL)
2933 nsyms = ada_lookup_symbol_list (name, expression_context_block,
2934 VAR_NAMESPACE, &syms, &blocks);
2936 nsyms = ada_lookup_symbol_list (name, left_block_context,
2937 VAR_NAMESPACE, &syms, &blocks);
2939 /* Check for a type definition. */
2941 /* Look for a symbol that doesn't denote void. This is (I think) a */
2942 /* temporary kludge to get around problems in GNAT output. */
2943 preferred_index = -1; preferred_type = NULL;
2944 for (i = 0; i < nsyms; i += 1)
2945 switch (SYMBOL_CLASS (syms[i]))
2948 if (ada_prefer_type (SYMBOL_TYPE (syms[i]), preferred_type))
2950 preferred_index = i;
2951 preferred_type = SYMBOL_TYPE (syms[i]);
2958 case LOC_REGPARM_ADDR:
2962 case LOC_BASEREG_ARG:
2967 if (preferred_type != NULL)
2969 /* if (TYPE_CODE (preferred_type) == TYPE_CODE_VOID)
2970 error ("`%s' matches only void type name(s)",
2971 ada_demangle (name));
2973 /* FIXME: ada_demangle should be defined in defs.h, and is located in ada-lang.c */
2974 /* else*/ if (ada_is_object_renaming (syms[preferred_index]))
2976 yylval.ssym.sym = syms[preferred_index];
2977 *token_type = OBJECT_RENAMING;
2980 else if (ada_renaming_type (SYMBOL_TYPE (syms[preferred_index]))
2984 const char* renaming =
2985 ada_simple_renamed_entity (syms[preferred_index]);
2986 char* new_name = xmalloc (strlen (renaming) + len0
2987 - yylval.ssym.stoken.length + 1);
2988 /* add_name_string_cleanup (new_name);*/
2989 /* FIXME: add_name_string_cleanup should be defined in parse.c */
2990 strcpy (new_name, renaming);
2991 strcat (new_name, name0 + yylval.ssym.stoken.length);
2992 result = name_lookup (new_name, err_name, token_type);
2993 if (result > segments)
2994 error ("Confused by renamed symbol.");
2997 else if (segments == 0)
2999 yylval.tval = preferred_type;
3000 *token_type = TYPENAME;
3007 type = lookup_primitive_typename (name);
3008 if (type == NULL && STREQ ("system__address", name))
3009 type = builtin_type_ada_system_address;
3013 *token_type = TYPENAME;
3022 yylval.ssym.sym = syms[0];
3023 yylval.ssym.msym = NULL;
3024 yylval.ssym.block = blocks[0];
3027 else if (nsyms == 0) {
3029 yylval.ssym.msym = ada_lookup_minimal_symbol (name);
3030 if (yylval.ssym.msym != NULL)
3032 yylval.ssym.sym = NULL;
3033 yylval.ssym.block = NULL;
3038 for (i = yylval.ssym.stoken.length - 1; i > 0; i -= 1)
3043 yylval.ssym.stoken.length = i;
3046 else if (name[i] == '_' && name[i-1] == '_')
3050 yylval.ssym.stoken.length = i;
3056 if (!have_full_symbols () && !have_partial_symbols ()
3057 && left_block_context == NULL)
3058 error ("No symbol table is loaded. Use the \"file\" command.");
3059 if (left_block_context == NULL)
3060 error ("No definition of \"%s\" in current context.",
3063 error ("No definition of \"%s\" in specified context.",
3070 yylval.ssym.sym = NULL;
3071 yylval.ssym.msym = NULL;
3072 if (left_block_context == NULL)
3073 yylval.ssym.block = expression_context_block;
3075 yylval.ssym.block = left_block_context;
3081 /* Returns the position within STR of the '.' in a
3082 '.{WHITE}*all' component of a dotted name, or -1 if there is none. */
3088 for (i = 0; str[i] != '\000'; i += 1)
3095 while (isspace (str[i]));
3096 if (strcmp (str+i, "all") == 0
3097 && ! isalnum (str[i+3]) && str[i+3] != '_')
3104 /* Returns non-zero iff string SUBSEQ matches a subsequence of STR, ignoring
3108 subseqMatch (subseq, str)
3112 if (subseq[0] == '\0')
3114 else if (str[0] == '\0')
3116 else if (tolower (subseq[0]) == tolower (str[0]))
3117 return subseqMatch (subseq+1, str+1) || subseqMatch (subseq, str+1);
3119 return subseqMatch (subseq, str+1);
3123 static struct { const char* name; int code; }
3125 { "address", TICK_ADDRESS },
3126 { "unchecked_access", TICK_ACCESS },
3127 { "unrestricted_access", TICK_ACCESS },
3128 { "access", TICK_ACCESS },
3129 { "first", TICK_FIRST },
3130 { "last", TICK_LAST },
3131 { "length", TICK_LENGTH },
3132 { "max", TICK_MAX },
3133 { "min", TICK_MIN },
3134 { "modulus", TICK_MODULUS },
3135 { "pos", TICK_POS },
3136 { "range", TICK_RANGE },
3137 { "size", TICK_SIZE },
3138 { "tag", TICK_TAG },
3139 { "val", TICK_VAL },
3143 /* Return the syntactic code corresponding to the attribute name or
3144 abbreviation STR. */
3147 processAttribute (str)
3152 for (i = 0; attributes[i].code != -1; i += 1)
3153 if (strcasecmp (str, attributes[i].name) == 0)
3154 return attributes[i].code;
3156 for (i = 0, k = -1; attributes[i].code != -1; i += 1)
3157 if (subseqMatch (str, attributes[i].name))
3162 error ("ambiguous attribute name: `%s'", str);
3165 error ("unrecognized attribute: `%s'", str);
3167 return attributes[k].code;