GDB (xrefs)
/tmp/gdb-7.10/gdb/ada-lex.c
Go to the documentation of this file.
1 #line 2 "ada-lex.c"
2 
3 #line 4 "ada-lex.c"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 39
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16 
17 /* First, we deal with platform-specific or compiler-specific issues. */
18 
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
24 
25 /* end standard C headers. */
26 
27 /* flex integer type definitions */
28 
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
31 
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35 
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37  * if you want the limit (max/min) macros for int types.
38  */
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
41 #endif
42 
43 #include <inttypes.h>
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
50 #else
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
57 
58 /* Limits of integral types. */
59 #ifndef INT8_MIN
60 #define INT8_MIN (-128)
61 #endif
62 #ifndef INT16_MIN
63 #define INT16_MIN (-32767-1)
64 #endif
65 #ifndef INT32_MIN
66 #define INT32_MIN (-2147483647-1)
67 #endif
68 #ifndef INT8_MAX
69 #define INT8_MAX (127)
70 #endif
71 #ifndef INT16_MAX
72 #define INT16_MAX (32767)
73 #endif
74 #ifndef INT32_MAX
75 #define INT32_MAX (2147483647)
76 #endif
77 #ifndef UINT8_MAX
78 #define UINT8_MAX (255U)
79 #endif
80 #ifndef UINT16_MAX
81 #define UINT16_MAX (65535U)
82 #endif
83 #ifndef UINT32_MAX
84 #define UINT32_MAX (4294967295U)
85 #endif
86 
87 #endif /* ! C99 */
88 
89 #endif /* ! FLEXINT_H */
90 
91 #ifdef __cplusplus
92 
93 /* The "const" storage-class-modifier is valid. */
94 #define YY_USE_CONST
95 
96 #else /* ! __cplusplus */
97 
98 /* C99 requires __STDC__ to be defined as 1. */
99 #if defined (__STDC__)
100 
101 #define YY_USE_CONST
102 
103 #endif /* defined (__STDC__) */
104 #endif /* ! __cplusplus */
105 
106 #ifdef YY_USE_CONST
107 #define yyconst const
108 #else
109 #define yyconst
110 #endif
111 
112 /* Returned upon end-of-file. */
113 #define YY_NULL 0
114 
115 /* Promotes a possibly negative, possibly signed char to an unsigned
116  * integer for use as an array index. If the signed char is negative,
117  * we want to instead treat it as an 8-bit unsigned char, hence the
118  * double cast.
119  */
120 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121 
122 /* Enter a start condition. This macro really ought to take a parameter,
123  * but we do it the disgusting crufty way forced on us by the ()-less
124  * definition of BEGIN.
125  */
126 #define BEGIN (yy_start) = 1 + 2 *
127 
128 /* Translate the current start state into a value that can be later handed
129  * to BEGIN to return to the state. The YYSTATE alias is for lex
130  * compatibility.
131  */
132 #define YY_START (((yy_start) - 1) / 2)
133 #define YYSTATE YY_START
134 
135 /* Action number for EOF rule of a given start state. */
136 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
137 
138 /* Special action meaning "start processing a new file". */
139 #define YY_NEW_FILE yyrestart(yyin )
140 
141 #define YY_END_OF_BUFFER_CHAR 0
142 
143 /* Size of default input buffer. */
144 #ifndef YY_BUF_SIZE
145 #ifdef __ia64__
146 /* On IA-64, the buffer size is 16k, not 8k.
147  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
148  * Ditto for the __ia64__ case accordingly.
149  */
150 #define YY_BUF_SIZE 32768
151 #else
152 #define YY_BUF_SIZE 16384
153 #endif /* __ia64__ */
154 #endif
155 
156 /* The state buf must be large enough to hold one state per character in the main buffer.
157  */
158 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
159 
160 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
161 #define YY_TYPEDEF_YY_BUFFER_STATE
163 #endif
164 
165 #ifndef YY_TYPEDEF_YY_SIZE_T
166 #define YY_TYPEDEF_YY_SIZE_T
167 typedef size_t yy_size_t;
168 #endif
169 
170 extern yy_size_t yyleng;
171 
172 extern FILE *yyin, *yyout;
173 
174 #define EOB_ACT_CONTINUE_SCAN 0
175 #define EOB_ACT_END_OF_FILE 1
176 #define EOB_ACT_LAST_MATCH 2
177 
178  #define YY_LESS_LINENO(n)
179  #define YY_LINENO_REWIND_TO(ptr)
180 
181 /* Return all but the first "n" matched characters back to the input stream. */
182 #define yyless(n) \
183  do \
184  { \
185  /* Undo effects of setting up yytext. */ \
186  int yyless_macro_arg = (n); \
187  YY_LESS_LINENO(yyless_macro_arg);\
188  *yy_cp = (yy_hold_char); \
189  YY_RESTORE_YY_MORE_OFFSET \
190  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
191  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
192  } \
193  while ( 0 )
194 
195 #define unput(c) yyunput( c, (yytext_ptr) )
196 
197 #ifndef YY_STRUCT_YY_BUFFER_STATE
198 #define YY_STRUCT_YY_BUFFER_STATE
200  {
202 
203  char *yy_ch_buf; /* input buffer */
204  char *yy_buf_pos; /* current position in input buffer */
205 
206  /* Size of input buffer in bytes, not including room for EOB
207  * characters.
208  */
209  yy_size_t yy_buf_size;
210 
211  /* Number of characters read into yy_ch_buf, not including EOB
212  * characters.
213  */
214  yy_size_t yy_n_chars;
215 
216  /* Whether we "own" the buffer - i.e., we know we created it,
217  * and can xrealloc() it to grow it, and should xfree() it to
218  * delete it.
219  */
221 
222  /* Whether this is an "interactive" input source; if so, and
223  * if we're using stdio for input, then we want to use getc()
224  * instead of fread(), to make sure we stop fetching input after
225  * each newline.
226  */
228 
229  /* Whether we're considered to be at the beginning of a line.
230  * If so, '^' rules will be active on the next match, otherwise
231  * not.
232  */
234 
238  /* Whether to try to fill the input buffer when we reach the
239  * end of it.
240  */
242 
244 
245 #define YY_BUFFER_NEW 0
246 #define YY_BUFFER_NORMAL 1
247  /* When an EOF's been seen but there's still some text to process
248  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
249  * shouldn't try reading from the input source any more. We might
250  * still have a bunch of tokens to match, though, because of
251  * possible backing-up.
252  *
253  * When we actually see the EOF, we change the status to "new"
254  * (via yyrestart()), so that the user can continue scanning by
255  * just pointing yyin at a new input file.
256  */
257 #define YY_BUFFER_EOF_PENDING 2
258 
259  };
260 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
261 
262 /* Stack of input buffers. */
263 static size_t yy_buffer_stack_top = 0;
264 static size_t yy_buffer_stack_max = 0;
265 static YY_BUFFER_STATE * yy_buffer_stack = 0;
267 /* We provide macros for accessing buffer states in case in the
268  * future we want to put the buffer states in a more general
269  * "scanner state".
270  *
271  * Returns the top of the stack, or NULL.
272  */
273 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
274  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
275  : NULL)
276 
277 /* Same as previous macro, but useful when we know that the buffer stack is not
278  * NULL or when we need an lvalue. For internal use only.
279  */
280 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
281 
282 /* yy_hold_char holds the character lost when yytext is formed. */
283 static char yy_hold_char;
284 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
285 yy_size_t yyleng;
286 
287 /* Points to current character in buffer. */
288 static char *yy_c_buf_p = (char *) 0;
289 static int yy_init = 0; /* whether we need to initialize */
290 static int yy_start = 0; /* start state number */
291 
292 /* Flag which is used to allow yywrap()'s to do buffer switches
293  * instead of setting up a fresh yyin. A bit of a hack ...
294  */
296 
297 void yyrestart (FILE *input_file );
298 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
299 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
300 void yy_delete_buffer (YY_BUFFER_STATE b );
301 void yy_flush_buffer (YY_BUFFER_STATE b );
302 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
303 void yypop_buffer_state (void );
304 
305 static void yyensure_buffer_stack (void );
306 static void yy_load_buffer_state (void );
307 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
308 
309 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
310 
311 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
312 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
313 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
314 
315 void *yyalloc (yy_size_t );
316 void *yyxrealloc (void *,yy_size_t );
317 void yyfree (void * );
318 
319 #define yy_new_buffer yy_create_buffer
320 
321 #define yy_set_interactive(is_interactive) \
322  { \
323  if ( ! YY_CURRENT_BUFFER ){ \
324  yyensure_buffer_stack (); \
325  YY_CURRENT_BUFFER_LVALUE = \
326  yy_create_buffer(yyin,YY_BUF_SIZE ); \
327  } \
328  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
329  }
330 
331 #define yy_set_bol(at_bol) \
332  { \
333  if ( ! YY_CURRENT_BUFFER ){\
334  yyensure_buffer_stack (); \
335  YY_CURRENT_BUFFER_LVALUE = \
336  yy_create_buffer(yyin,YY_BUF_SIZE ); \
337  } \
338  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
339  }
340 
341 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
342 
343 /* Begin user sect3 */
344 
345 typedef unsigned char YY_CHAR;
346 
347 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
348 
349 typedef int yy_state_type;
350 
351 extern int yylineno;
352 
353 int yylineno = 1;
354 
355 extern char *yytext;
356 #define yytext_ptr yytext
357 
358 static yy_state_type yy_get_previous_state (void );
359 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
360 static int yy_get_next_buffer (void );
361 static void yy_fatal_error (yyconst char msg[] );
362 
363 /* Done after the current pattern has been matched and before the
364  * corresponding action - sets up yytext.
365  */
366 #define YY_DO_BEFORE_ACTION \
367  (yytext_ptr) = yy_bp; \
368  yyleng = (size_t) (yy_cp - yy_bp); \
369  (yy_hold_char) = *yy_cp; \
370  *yy_cp = '\0'; \
371  (yy_c_buf_p) = yy_cp;
372 
373 #define YY_NUM_RULES 55
374 #define YY_END_OF_BUFFER 56
375 /* This struct is not used in this scanner,
376  but its presence is necessary. */
378  {
379  flex_int32_t yy_verify;
380  flex_int32_t yy_nxt;
381  };
382 static yyconst flex_int16_t yy_accept[207] =
383  { 0,
384  0, 0, 0, 0, 56, 54, 1, 1, 15, 53,
385  43, 54, 45, 46, 43, 44, 43, 43, 43, 4,
386  4, 43, 43, 43, 43, 52, 49, 49, 49, 49,
387  49, 49, 49, 49, 49, 49, 49, 42, 0, 14,
388  0, 53, 0, 0, 0, 0, 0, 0, 0, 37,
389  2, 0, 36, 0, 48, 48, 39, 0, 0, 4,
390  0, 0, 51, 38, 40, 0, 35, 41, 0, 0,
391  49, 0, 49, 49, 49, 49, 49, 16, 22, 49,
392  49, 49, 49, 27, 49, 49, 49, 49, 49, 49,
393  0, 14, 0, 12, 12, 34, 0, 2, 0, 48,
394 
395  48, 0, 9, 0, 3, 7, 0, 49, 0, 0,
396  0, 49, 19, 20, 49, 49, 23, 24, 25, 49,
397  49, 29, 49, 49, 49, 49, 31, 0, 0, 0,
398  0, 0, 0, 48, 47, 6, 0, 0, 9, 0,
399  3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
400  0, 0, 0, 49, 21, 49, 26, 49, 17, 30,
401  49, 32, 0, 50, 0, 0, 0, 0, 49, 0,
402  0, 0, 0, 0, 0, 0, 0, 33, 49, 49,
403  0, 0, 5, 11, 0, 8, 0, 0, 0, 0,
404  0, 0, 28, 49, 0, 5, 0, 8, 0, 0,
405 
406  13, 0, 18, 10, 10, 0
407  } ;
408 
409 static yyconst flex_int32_t yy_ec[256] =
410  { 0,
411  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
412  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414  1, 4, 5, 6, 7, 8, 5, 9, 10, 11,
415  12, 13, 14, 15, 16, 17, 18, 19, 20, 20,
416  20, 20, 20, 20, 20, 20, 20, 21, 22, 23,
417  24, 25, 5, 26, 27, 28, 29, 30, 31, 32,
418  33, 34, 35, 33, 36, 37, 38, 39, 40, 33,
419  33, 41, 42, 43, 44, 33, 45, 46, 33, 33,
420  47, 5, 48, 5, 49, 5, 50, 51, 29, 52,
421 
422  53, 54, 33, 55, 56, 33, 57, 58, 59, 60,
423  61, 33, 33, 62, 63, 64, 65, 33, 66, 67,
424  33, 33, 26, 22, 26, 5, 1, 1, 1, 1,
425  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432 
433  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438  1, 1, 1, 1, 1
439  } ;
440 
441 static yyconst flex_int32_t yy_meta[68] =
442  { 0,
443  1, 2, 3, 4, 5, 6, 7, 8, 5, 9,
444  5, 5, 5, 5, 5, 5, 10, 5, 11, 11,
445  5, 5, 12, 13, 14, 5, 15, 15, 15, 15,
446  15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
447  16, 16, 16, 16, 16, 16, 5, 5, 17, 15,
448  15, 15, 15, 15, 16, 16, 16, 16, 16, 16,
449  16, 16, 16, 16, 16, 16, 16
450  } ;
451 
452 static yyconst flex_int16_t yy_base[229] =
453  { 0,
454  0, 0, 649, 638, 646, 1252, 1252, 1252, 62, 0,
455  1252, 109, 1252, 1252, 623, 1252, 619, 175, 606, 174,
456  180, 48, 604, 592, 590, 1252, 204, 71, 214, 186,
457  235, 244, 304, 256, 39, 368, 40, 430, 179, 1252,
458  195, 0, 602, 595, 592, 585, 574, 497, 72, 1252,
459  0, 273, 1252, 0, 39, 0, 1252, 0, 66, 262,
460  75, 0, 1252, 1252, 1252, 557, 1252, 1252, 284, 300,
461  1252, 322, 329, 349, 358, 377, 339, 396, 412, 563,
462  566, 575, 584, 587, 569, 596, 623, 616, 576, 617,
463  571, 568, 334, 380, 1252, 562, 677, 0, 403, 0,
464 
465  40, 89, 642, 71, 163, 0, 401, 672, 401, 723,
466  0, 708, 741, 750, 637, 776, 785, 794, 797, 806,
467  775, 827, 831, 843, 818, 819, 883, 415, 0, 712,
468  399, 885, 352, 1252, 0, 191, 0, 202, 772, 170,
469  243, 334, 222, 244, 247, 259, 766, 47, 209, 216,
470  203, 251, 302, 892, 916, 890, 942, 715, 946, 958,
471  930, 974, 274, 1252, 93, 344, 278, 310, 979, 256,
472  264, 337, 270, 274, 352, 355, 215, 984, 995, 1000,
473  299, 354, 589, 355, 223, 603, 209, 204, 198, 189,
474  174, 101, 1004, 1016, 92, 634, 411, 644, 872, 1021,
475 
476  717, 373, 1252, 793, 832, 1252, 1055, 1065, 1081, 1086,
477  1102, 1119, 1136, 1139, 1146, 339, 560, 1153, 1169, 1181,
478  1186, 1197, 1200, 1216, 634, 645, 1223, 1234
479  } ;
480 
481 static yyconst flex_int16_t yy_def[229] =
482  { 0,
483  206, 1, 1, 1, 206, 206, 206, 206, 207, 208,
484  206, 206, 206, 206, 206, 206, 206, 209, 206, 206,
485  206, 206, 210, 206, 206, 206, 211, 211, 211, 211,
486  211, 211, 211, 211, 33, 211, 33, 206, 207, 206,
487  207, 208, 212, 38, 38, 212, 206, 206, 212, 206,
488  213, 209, 206, 214, 215, 215, 206, 216, 206, 206,
489  206, 217, 206, 206, 206, 218, 206, 206, 206, 206,
490  206, 219, 211, 211, 211, 211, 211, 211, 211, 211,
491  211, 211, 211, 211, 36, 211, 211, 36, 33, 36,
492  48, 220, 206, 206, 206, 48, 212, 213, 221, 215,
493 
494  215, 222, 206, 206, 206, 217, 218, 206, 219, 206,
495  223, 224, 211, 211, 33, 211, 211, 211, 211, 211,
496  33, 211, 211, 211, 33, 33, 211, 206, 225, 206,
497  206, 97, 221, 206, 215, 206, 226, 222, 206, 206,
498  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
499  206, 206, 227, 224, 211, 33, 211, 36, 211, 211,
500  36, 211, 206, 206, 212, 206, 228, 206, 206, 206,
501  206, 206, 206, 206, 206, 206, 227, 211, 211, 211,
502  212, 206, 206, 206, 228, 206, 206, 206, 206, 206,
503  206, 206, 211, 211, 212, 206, 206, 206, 206, 206,
504 
505  206, 206, 206, 206, 206, 0, 206, 206, 206, 206,
506  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
507  206, 206, 206, 206, 206, 206, 206, 206
508  } ;
509 
510 static yyconst flex_int16_t yy_nxt[1320] =
511  { 0,
512  6, 7, 8, 7, 6, 9, 6, 10, 11, 12,
513  13, 14, 15, 11, 16, 17, 18, 19, 20, 21,
514  22, 11, 23, 24, 25, 26, 27, 28, 28, 28,
515  29, 30, 28, 28, 31, 28, 28, 32, 33, 34,
516  35, 28, 36, 28, 28, 37, 11, 11, 28, 27,
517  28, 28, 29, 30, 28, 31, 28, 28, 32, 33,
518  34, 35, 28, 36, 28, 28, 37, 40, 63, 86,
519  73, 64, 69, 69, 70, 101, 135, 97, 73, 90,
520  71, 94, 73, 73, 103, 103, 172, 72, 104, 105,
521  105, 86, 73, 105, 105, 136, 101, 135, 181, 73,
522 
523  90, 201, 93, 73, 73, 137, 169, 172, 41, 43,
524  44, 44, 45, 46, 46, 46, 46, 46, 47, 46,
525  46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
526  46, 46, 46, 46, 46, 48, 48, 48, 48, 48,
527  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
528  48, 48, 48, 48, 48, 49, 46, 46, 48, 48,
529  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
530  48, 48, 48, 48, 48, 48, 52, 52, 52, 169,
531  58, 141, 141, 168, 40, 168, 58, 69, 69, 70,
532  59, 53, 60, 60, 169, 71, 59, 54, 60, 60,
533 
534  92, 55, 72, 169, 61, 69, 69, 70, 136, 169,
535  61, 141, 77, 71, 169, 69, 69, 70, 137, 62,
536  72, 166, 60, 71, 55, 41, 61, 169, 60, 184,
537  72, 74, 61, 175, 142, 77, 69, 69, 70, 169,
538  62, 41, 75, 166, 71, 69, 69, 70, 173, 169,
539  76, 72, 169, 71, 74, 175, 174, 69, 69, 70,
540  72, 141, 141, 75, 169, 71, 78, 142, 58, 173,
541  142, 76, 72, 79, 52, 52, 52, 174, 59, 169,
542  60, 60, 142, 80, 184, 69, 69, 69, 78, 206,
543  176, 141, 61, 188, 79, 54, 84, 187, 85, 55,
544 
545  72, 69, 69, 70, 80, 69, 69, 70, 93, 71,
546  60, 176, 190, 71, 61, 188, 72, 84, 187, 85,
547  72, 39, 55, 109, 109, 109, 169, 110, 186, 186,
548  69, 69, 70, 190, 81, 130, 130, 130, 71, 169,
549  69, 69, 70, 82, 111, 72, 195, 83, 71, 102,
550  69, 69, 70, 102, 131, 72, 81, 182, 71, 69,
551  69, 70, 183, 183, 82, 72, 189, 71, 83, 69,
552  69, 70, 183, 183, 72, 116, 134, 71, 69, 69,
553  70, 130, 130, 130, 72, 197, 71, 114, 189, 191,
554  113, 204, 204, 72, 87, 192, 116, 69, 69, 70,
555 
556  131, 88, 109, 109, 109, 71, 110, 197, 89, 114,
557  191, 113, 72, 69, 69, 70, 192, 87, 115, 164,
558  163, 71, 88, 111, 202, 108, 202, 134, 72, 89,
559  43, 44, 44, 44, 43, 43, 43, 43, 43, 115,
560  43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
561  43, 43, 43, 43, 43, 43, 91, 91, 91, 91,
562  91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
563  91, 91, 91, 91, 91, 91, 43, 43, 43, 91,
564  91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
565  91, 91, 91, 91, 91, 91, 91, 43, 43, 43,
566 
567  43, 43, 43, 43, 43, 43, 94, 43, 43, 43,
568  43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
569  43, 43, 43, 96, 96, 96, 96, 96, 96, 96,
570  96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
571  96, 96, 96, 43, 43, 43, 96, 96, 96, 96,
572  96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
573  96, 96, 96, 96, 69, 69, 70, 69, 69, 70,
574  106, 93, 71, 128, 106, 71, 69, 69, 70, 72,
575  93, 108, 72, 95, 71, 69, 69, 70, 69, 69,
576  70, 72, 117, 71, 94, 73, 71, 69, 69, 70,
577 
578  72, 94, 121, 72, 93, 71, 73, 196, 196, 73,
579  118, 93, 72, 68, 117, 73, 67, 119, 73, 126,
580  120, 198, 198, 121, 69, 69, 70, 65, 73, 57,
581  73, 118, 71, 122, 51, 50, 73, 196, 119, 72,
582  126, 120, 73, 73, 128, 206, 124, 38, 128, 73,
583  73, 198, 196, 196, 122, 167, 125, 127, 38, 167,
584  139, 139, 198, 198, 123, 73, 73, 155, 124, 206,
585  73, 73, 140, 69, 69, 70, 73, 125, 127, 206,
586  73, 71, 196, 206, 206, 123, 93, 206, 72, 155,
587  139, 206, 198, 206, 140, 132, 132, 73, 206, 206,
588 
589  206, 73, 206, 132, 132, 132, 132, 132, 132, 69,
590  69, 70, 206, 130, 130, 130, 206, 71, 130, 130,
591  130, 206, 206, 206, 72, 206, 132, 132, 132, 132,
592  132, 142, 131, 206, 206, 143, 142, 131, 142, 206,
593  144, 73, 69, 69, 70, 145, 142, 146, 73, 147,
594  71, 69, 69, 70, 206, 179, 206, 72, 206, 71,
595  148, 149, 150, 151, 73, 206, 72, 206, 152, 73,
596  206, 206, 147, 206, 206, 206, 179, 69, 69, 70,
597  206, 148, 149, 150, 151, 71, 69, 69, 70, 152,
598  139, 139, 72, 170, 71, 69, 69, 70, 69, 69,
599 
600  70, 72, 140, 71, 171, 158, 71, 69, 69, 70,
601  72, 205, 205, 72, 73, 71, 170, 156, 73, 206,
602  139, 206, 72, 206, 140, 171, 206, 158, 69, 69,
603  70, 206, 69, 69, 70, 73, 71, 206, 156, 73,
604  71, 205, 157, 72, 69, 69, 70, 72, 161, 162,
605  205, 205, 71, 206, 206, 206, 206, 73, 73, 72,
606  206, 73, 73, 157, 206, 206, 159, 206, 206, 206,
607  161, 162, 206, 199, 199, 199, 206, 206, 73, 73,
608  205, 160, 73, 73, 69, 69, 70, 159, 72, 206,
609  203, 203, 71, 69, 69, 70, 206, 206, 206, 72,
610 
611  206, 71, 160, 165, 165, 206, 206, 206, 72, 206,
612  206, 165, 165, 165, 165, 165, 165, 69, 69, 70,
613  178, 206, 206, 206, 206, 71, 206, 206, 206, 73,
614  206, 206, 72, 73, 165, 165, 165, 165, 165, 206,
615  206, 206, 178, 69, 69, 70, 206, 69, 69, 70,
616  73, 71, 206, 206, 73, 71, 180, 206, 72, 69,
617  69, 70, 72, 73, 206, 206, 206, 71, 206, 206,
618  73, 206, 206, 206, 72, 69, 69, 70, 206, 180,
619  69, 69, 70, 71, 73, 69, 69, 70, 71, 206,
620  72, 73, 206, 71, 206, 72, 69, 69, 70, 206,
621 
622  72, 69, 69, 70, 71, 69, 69, 70, 206, 71,
623  206, 72, 206, 71, 206, 206, 72, 199, 199, 200,
624  72, 206, 199, 199, 200, 71, 206, 206, 206, 194,
625  71, 206, 72, 206, 206, 206, 193, 72, 206, 203,
626  203, 206, 206, 206, 206, 206, 206, 206, 206, 206,
627  206, 194, 206, 206, 206, 206, 206, 193, 39, 39,
628  39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
629  39, 39, 42, 206, 206, 42, 206, 206, 206, 42,
630  42, 42, 56, 56, 56, 206, 206, 206, 206, 206,
631  56, 206, 56, 206, 206, 56, 56, 56, 66, 206,
632 
633  66, 66, 66, 73, 73, 73, 206, 206, 206, 206,
634  73, 73, 73, 206, 206, 206, 73, 73, 73, 43,
635  43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
636  43, 43, 43, 43, 43, 43, 98, 98, 206, 98,
637  98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
638  98, 98, 98, 99, 99, 99, 100, 206, 206, 206,
639  100, 100, 100, 107, 206, 206, 107, 107, 107, 107,
640  112, 112, 112, 206, 112, 206, 206, 206, 206, 206,
641  112, 206, 206, 112, 112, 112, 129, 206, 206, 206,
642  206, 129, 206, 206, 206, 129, 133, 206, 206, 133,
643 
644  133, 133, 133, 138, 206, 206, 138, 138, 206, 206,
645  206, 138, 206, 138, 153, 153, 153, 154, 154, 154,
646  206, 206, 206, 206, 154, 154, 154, 206, 206, 206,
647  154, 154, 154, 177, 206, 206, 177, 177, 177, 177,
648  185, 206, 206, 206, 185, 206, 206, 206, 185, 206,
649  185, 5, 206, 206, 206, 206, 206, 206, 206, 206,
650  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
651  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
652  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
653  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
654 
655  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
656  206, 206, 206, 206, 206, 206, 206, 206, 206
657  } ;
658 
659 static yyconst flex_int16_t yy_chk[1320] =
660  { 0,
661  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
662  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
663  1, 1, 1, 1, 1, 1, 1, 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  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
667  1, 1, 1, 1, 1, 1, 1, 9, 22, 35,
668  37, 22, 28, 28, 28, 55, 101, 49, 35, 37,
669  28, 49, 35, 37, 59, 59, 148, 28, 61, 104,
670  104, 35, 37, 61, 61, 102, 55, 101, 165, 35,
671 
672  37, 195, 165, 35, 37, 102, 192, 148, 9, 12,
673  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
674  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
675  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
676  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
677  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
678  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
679  12, 12, 12, 12, 12, 12, 18, 18, 18, 191,
680  20, 105, 105, 140, 39, 140, 21, 30, 30, 30,
681  20, 18, 20, 20, 190, 30, 21, 18, 21, 21,
682 
683  41, 18, 30, 189, 20, 27, 27, 27, 138, 188,
684  21, 105, 30, 27, 187, 29, 29, 29, 138, 20,
685  27, 136, 20, 29, 18, 39, 20, 143, 21, 185,
686  29, 27, 21, 151, 143, 30, 31, 31, 31, 177,
687  20, 41, 27, 136, 31, 32, 32, 32, 149, 144,
688  29, 31, 145, 32, 27, 151, 150, 34, 34, 34,
689  32, 141, 141, 27, 146, 34, 31, 144, 60, 149,
690  145, 29, 34, 31, 52, 52, 52, 150, 60, 174,
691  60, 60, 146, 32, 167, 69, 69, 69, 31, 52,
692  152, 141, 60, 171, 31, 52, 34, 170, 34, 52,
693 
694  69, 70, 70, 70, 32, 33, 33, 33, 181, 70,
695  60, 152, 173, 33, 60, 171, 70, 34, 170, 34,
696  33, 163, 52, 72, 72, 72, 153, 72, 168, 168,
697  73, 73, 73, 173, 33, 93, 93, 93, 73, 142,
698  77, 77, 77, 33, 72, 73, 181, 33, 77, 216,
699  74, 74, 74, 216, 93, 77, 33, 166, 74, 75,
700  75, 75, 166, 166, 33, 74, 172, 75, 33, 36,
701  36, 36, 182, 182, 75, 77, 133, 36, 76, 76,
702  76, 94, 94, 94, 36, 184, 76, 75, 172, 175,
703  74, 202, 202, 76, 36, 176, 77, 78, 78, 78,
704 
705  94, 36, 109, 109, 109, 78, 109, 184, 36, 75,
706  175, 74, 78, 79, 79, 79, 176, 36, 76, 131,
707  128, 79, 36, 109, 197, 107, 197, 99, 79, 36,
708  38, 38, 38, 38, 38, 38, 38, 38, 38, 76,
709  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
710  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
711  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
712  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
713  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
714  38, 38, 38, 38, 38, 38, 38, 48, 48, 48,
715 
716  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
717  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
718  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
719  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
720  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
721  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
722  48, 48, 48, 48, 80, 80, 80, 81, 81, 81,
723  217, 96, 80, 92, 217, 81, 82, 82, 82, 80,
724  91, 66, 81, 47, 82, 83, 83, 83, 84, 84,
725  84, 82, 80, 83, 46, 85, 84, 86, 86, 86,
726 
727  83, 45, 85, 84, 44, 86, 89, 183, 183, 85,
728  81, 43, 86, 25, 80, 89, 24, 82, 85, 89,
729  83, 186, 186, 85, 87, 87, 87, 23, 89, 19,
730  85, 81, 87, 86, 17, 15, 89, 183, 82, 87,
731  89, 83, 88, 90, 225, 5, 88, 4, 225, 88,
732  90, 186, 196, 196, 86, 226, 88, 90, 3, 226,
733  103, 103, 198, 198, 87, 88, 90, 115, 88, 0,
734  88, 90, 103, 108, 108, 108, 115, 88, 90, 0,
735  115, 108, 196, 0, 0, 87, 97, 0, 108, 115,
736  103, 0, 198, 0, 103, 97, 97, 115, 0, 0,
737 
738  0, 115, 0, 97, 97, 97, 97, 97, 97, 112,
739  112, 112, 0, 130, 130, 130, 0, 112, 201, 201,
740  201, 0, 0, 0, 112, 0, 97, 97, 97, 97,
741  97, 110, 130, 0, 0, 110, 110, 201, 110, 0,
742  110, 158, 113, 113, 113, 110, 110, 110, 158, 110,
743  113, 114, 114, 114, 0, 158, 0, 113, 0, 114,
744  110, 110, 110, 110, 158, 0, 114, 0, 110, 158,
745  0, 0, 110, 0, 0, 0, 158, 116, 116, 116,
746  0, 110, 110, 110, 110, 116, 117, 117, 117, 110,
747  139, 139, 116, 147, 117, 118, 118, 118, 119, 119,
748 
749  119, 117, 139, 118, 147, 121, 119, 120, 120, 120,
750  118, 204, 204, 119, 121, 120, 147, 116, 121, 0,
751  139, 0, 120, 0, 139, 147, 0, 121, 122, 122,
752  122, 0, 123, 123, 123, 121, 122, 0, 116, 121,
753  123, 204, 120, 122, 124, 124, 124, 123, 125, 126,
754  205, 205, 124, 0, 0, 0, 0, 125, 126, 124,
755  0, 125, 126, 120, 0, 0, 123, 0, 0, 0,
756  125, 126, 0, 199, 199, 199, 0, 0, 125, 126,
757  205, 124, 125, 126, 127, 127, 127, 123, 199, 0,
758  199, 199, 127, 154, 154, 154, 0, 0, 0, 127,
759 
760  0, 154, 124, 132, 132, 0, 0, 0, 154, 0,
761  0, 132, 132, 132, 132, 132, 132, 155, 155, 155,
762  156, 0, 0, 0, 0, 155, 0, 0, 0, 156,
763  0, 0, 155, 156, 132, 132, 132, 132, 132, 0,
764  0, 0, 156, 157, 157, 157, 0, 159, 159, 159,
765  156, 157, 0, 0, 156, 159, 161, 0, 157, 160,
766  160, 160, 159, 161, 0, 0, 0, 160, 0, 0,
767  161, 0, 0, 0, 160, 162, 162, 162, 0, 161,
768  169, 169, 169, 162, 161, 178, 178, 178, 169, 0,
769  162, 161, 0, 178, 0, 169, 179, 179, 179, 0,
770 
771  178, 180, 180, 180, 179, 193, 193, 193, 0, 180,
772  0, 179, 0, 193, 0, 0, 180, 194, 194, 194,
773  193, 0, 200, 200, 200, 194, 0, 0, 0, 180,
774  200, 0, 194, 0, 0, 0, 179, 200, 0, 200,
775  200, 0, 0, 0, 0, 0, 0, 0, 0, 0,
776  0, 180, 0, 0, 0, 0, 0, 179, 207, 207,
777  207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
778  207, 207, 208, 0, 0, 208, 0, 0, 0, 208,
779  208, 208, 209, 209, 209, 0, 0, 0, 0, 0,
780  209, 0, 209, 0, 0, 209, 209, 209, 210, 0,
781 
782  210, 210, 210, 211, 211, 211, 0, 0, 0, 0,
783  211, 211, 211, 0, 0, 0, 211, 211, 211, 212,
784  212, 212, 212, 212, 212, 212, 212, 212, 212, 212,
785  212, 212, 212, 212, 212, 212, 213, 213, 0, 213,
786  213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
787  213, 213, 213, 214, 214, 214, 215, 0, 0, 0,
788  215, 215, 215, 218, 0, 0, 218, 218, 218, 218,
789  219, 219, 219, 0, 219, 0, 0, 0, 0, 0,
790  219, 0, 0, 219, 219, 219, 220, 0, 0, 0,
791  0, 220, 0, 0, 0, 220, 221, 0, 0, 221,
792 
793  221, 221, 221, 222, 0, 0, 222, 222, 0, 0,
794  0, 222, 0, 222, 223, 223, 223, 224, 224, 224,
795  0, 0, 0, 0, 224, 224, 224, 0, 0, 0,
796  224, 224, 224, 227, 0, 0, 227, 227, 227, 227,
797  228, 0, 0, 0, 228, 0, 0, 0, 228, 0,
798  228, 206, 206, 206, 206, 206, 206, 206, 206, 206,
799  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
800  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
801  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
802  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
803 
804  206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
805  206, 206, 206, 206, 206, 206, 206, 206, 206
806  } ;
807 
808 static yy_state_type yy_last_accepting_state;
810 
811 extern int yy_flex_debug;
812 int yy_flex_debug = 0;
813 
814 /* The intent behind this definition is that it'll catch
815  * any uses of REJECT which flex missed.
816  */
817 #define REJECT reject_used_but_not_detected
818 #define yymore() yymore_used_but_not_detected
819 #define YY_MORE_ADJ 0
820 #define YY_RESTORE_YY_MORE_OFFSET
821 char *yytext;
822 #line 1 "ada-lex.l"
823 /* FLEX lexer for Ada expressions, for GDB.
824  Copyright (C) 1994-2015 Free Software Foundation, Inc.
825 
826  This file is part of GDB.
827 
828  This program is free software; you can redistribute it and/or modify
829  it under the terms of the GNU General Public License as published by
830  the Free Software Foundation; either version 3 of the License, or
831  (at your option) any later version.
832 
833  This program is distributed in the hope that it will be useful,
834  but WITHOUT ANY WARRANTY; without even the implied warranty of
835  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
836  GNU General Public License for more details.
837 
838  You should have received a copy of the GNU General Public License
839  along with this program. If not, see <http://www.gnu.org/licenses/>. */
840 /*----------------------------------------------------------------------*/
841 /* The converted version of this file is to be included in ada-exp.y, */
842 /* the Ada parser for gdb. The function yylex obtains characters from */
843 /* the global pointer lexptr. It returns a syntactic category for */
844 /* each successive token and places a semantic value into yylval */
845 /* (ada-lval), defined by the parser. */
846 #line 43 "ada-lex.l"
847 
848 #define NUMERAL_WIDTH 256
849 #define LONGEST_SIGN ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1))
850 
851 /* Temporary staging for numeric literals. */
852 static char numbuf[NUMERAL_WIDTH];
853  static void canonicalizeNumeral (char *s1, const char *);
854 static struct stoken processString (const char*, int);
855 static int processInt (struct parser_state *, const char *, const char *,
856  const char *);
857 static int processReal (struct parser_state *, const char *);
858 static struct stoken processId (const char *, int);
859 static int processAttribute (const char *);
860 static int find_dot_all (const char *);
861 static void rewind_to_char (int);
862 
863 #undef YY_DECL
864 #define YY_DECL static int yylex ( void )
865 
866 /* Flex generates a static function "input" which is not used.
867  Defining YY_NO_INPUT comments it out. */
868 #define YY_NO_INPUT
869 
870 #undef YY_INPUT
871 #define YY_INPUT(BUF, RESULT, MAX_SIZE) \
872  if ( *lexptr == '\000' ) \
873  (RESULT) = YY_NULL; \
874  else \
875  { \
876  *(BUF) = *lexptr; \
877  (RESULT) = 1; \
878  lexptr += 1; \
879  }
880 
881 static int find_dot_all (const char *);
882 
883 
884 #line 885 "ada-lex.c"
885 
886 #define INITIAL 0
887 #define BEFORE_QUAL_QUOTE 1
888 
889 #ifndef YY_NO_UNISTD_H
890 /* Special case for "unistd.h", since it is non-ANSI. We include it way
891  * down here because we want the user's section 1 to have been scanned first.
892  * The user has a chance to override it with an option.
893  */
894 #include <unistd.h>
895 #endif
896 
897 #ifndef YY_EXTRA_TYPE
898 #define YY_EXTRA_TYPE void *
899 #endif
900 
901 static int yy_init_globals (void );
902 
903 /* Accessor methods to globals.
904  These are made visible to non-reentrant scanners for convenience. */
905 
906 int yylex_destroy (void );
907 
908 int yyget_debug (void );
909 
910 void yyset_debug (int debug_flag );
911 
912 YY_EXTRA_TYPE yyget_extra (void );
913 
914 void yyset_extra (YY_EXTRA_TYPE user_defined );
915 
916 FILE *yyget_in (void );
917 
918 void yyset_in (FILE * in_str );
919 
920 FILE *yyget_out (void );
921 
922 void yyset_out (FILE * out_str );
923 
924 yy_size_t yyget_leng (void );
925 
926 char *yyget_text (void );
927 
928 int yyget_lineno (void );
929 
930 void yyset_lineno (int line_number );
931 
932 /* Macros after this point can all be overridden by user definitions in
933  * section 1.
934  */
935 
936 #ifndef YY_SKIP_YYWRAP
937 #ifdef __cplusplus
938 extern "C" int yywrap (void );
939 #else
940 extern int yywrap (void );
941 #endif
942 #endif
943 
944  static void yyunput (int c,char *buf_ptr );
945 
946 #ifndef yytext_ptr
947 static void yy_flex_strncpy (char *,yyconst char *,int );
948 #endif
949 
950 #ifdef YY_NEED_STRLEN
951 static int yy_flex_strlen (yyconst char * );
952 #endif
953 
954 #ifndef YY_NO_INPUT
955 
956 #ifdef __cplusplus
957 static int yyinput (void );
958 #else
959 static int input (void );
960 #endif
961 
962 #endif
963 
964 /* Amount of stuff to slurp up with each read. */
965 #ifndef YY_READ_BUF_SIZE
966 #ifdef __ia64__
967 /* On IA-64, the buffer size is 16k, not 8k */
968 #define YY_READ_BUF_SIZE 16384
969 #else
970 #define YY_READ_BUF_SIZE 8192
971 #endif /* __ia64__ */
972 #endif
973 
974 /* Copy whatever the last rule matched to the standard output. */
975 #ifndef ECHO
976 /* This used to be an fputs(), but since the string might contain NUL's,
977  * we now use fwrite().
978  */
979 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
980 #endif
981 
982 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
983  * is returned in "result".
984  */
985 #ifndef YY_INPUT
986 #define YY_INPUT(buf,result,max_size) \
987  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
988  { \
989  int c = '*'; \
990  size_t n; \
991  for ( n = 0; n < max_size && \
992  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
993  buf[n] = (char) c; \
994  if ( c == '\n' ) \
995  buf[n++] = (char) c; \
996  if ( c == EOF && ferror( yyin ) ) \
997  YY_FATAL_ERROR( "input in flex scanner failed" ); \
998  result = n; \
999  } \
1000  else \
1001  { \
1002  errno=0; \
1003  while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1004  { \
1005  if( errno != EINTR) \
1006  { \
1007  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1008  break; \
1009  } \
1010  errno=0; \
1011  clearerr(yyin); \
1012  } \
1013  }\
1014 \
1015 
1016 #endif
1017 
1018 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1019  * we don't want an extra ';' after the "return" because that will cause
1020  * some compilers to complain about unreachable statements.
1021  */
1022 #ifndef yyterminate
1023 #define yyterminate() return YY_NULL
1024 #endif
1025 
1026 /* Number of entries by which start-condition stack grows. */
1027 #ifndef YY_START_STACK_INCR
1028 #define YY_START_STACK_INCR 25
1029 #endif
1030 
1031 /* Report a fatal error. */
1032 #ifndef YY_FATAL_ERROR
1033 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1034 #endif
1035 
1036 /* end tables serialization structures and prototypes */
1037 
1038 /* Default declaration of generated scanner - a define so the user can
1039  * easily add parameters.
1040  */
1041 #ifndef YY_DECL
1042 #define YY_DECL_IS_OURS 1
1043 
1044 extern int yylex (void);
1045 
1046 #define YY_DECL int yylex (void)
1047 #endif /* !YY_DECL */
1048 
1049 /* Code executed at the beginning of each rule, after yytext and yyleng
1050  * have been set up.
1051  */
1052 #ifndef YY_USER_ACTION
1053 #define YY_USER_ACTION
1054 #endif
1055 
1056 /* Code executed at the end of each rule. */
1057 #ifndef YY_BREAK
1058 #define YY_BREAK break;
1059 #endif
1060 
1061 #define YY_RULE_SETUP \
1062  YY_USER_ACTION
1063 
1066 YY_DECL
1068  register yy_state_type yy_current_state;
1069  register char *yy_cp, *yy_bp;
1070  register int yy_act;
1071 
1072  if ( !(yy_init) )
1073  {
1074  (yy_init) = 1;
1075 
1076 #ifdef YY_USER_INIT
1077  YY_USER_INIT;
1078 #endif
1079 
1080  if ( ! (yy_start) )
1081  (yy_start) = 1; /* first start state */
1082 
1083  if ( ! yyin )
1084  yyin = stdin;
1085 
1086  if ( ! yyout )
1087  yyout = stdout;
1088 
1089  if ( ! YY_CURRENT_BUFFER ) {
1093  }
1094 
1096  }
1097 
1098  {
1099 #line 85 "ada-lex.l"
1100 
1101 
1102 #line 1103 "ada-lex.c"
1103 
1104  while ( 1 ) /* loops until end-of-file is reached */
1105  {
1106  yy_cp = (yy_c_buf_p);
1107 
1108  /* Support of yytext. */
1109  *yy_cp = (yy_hold_char);
1110 
1111  /* yy_bp points to the position in yy_ch_buf of the start of
1112  * the current run.
1113  */
1114  yy_bp = yy_cp;
1115 
1116  yy_current_state = (yy_start);
1117 yy_match:
1118  do
1119  {
1120  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1121  if ( yy_accept[yy_current_state] )
1122  {
1123  (yy_last_accepting_state) = yy_current_state;
1124  (yy_last_accepting_cpos) = yy_cp;
1125  }
1126  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1127  {
1128  yy_current_state = (int) yy_def[yy_current_state];
1129  if ( yy_current_state >= 207 )
1130  yy_c = yy_meta[(unsigned int) yy_c];
1131  }
1132  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1133  ++yy_cp;
1134  }
1135  while ( yy_base[yy_current_state] != 1252 );
1136 
1137 yy_find_action:
1138  yy_act = yy_accept[yy_current_state];
1139  if ( yy_act == 0 )
1140  { /* have to back up */
1141  yy_cp = (yy_last_accepting_cpos);
1142  yy_current_state = (yy_last_accepting_state);
1143  yy_act = yy_accept[yy_current_state];
1144  }
1145 
1147 
1148 do_action: /* This label is used only to access EOF actions. */
1149 
1150  switch ( yy_act )
1151  { /* beginning of action switch */
1152  case 0: /* must back up */
1153  /* undo the effects of YY_DO_BEFORE_ACTION */
1154  *yy_cp = (yy_hold_char);
1155  yy_cp = (yy_last_accepting_cpos);
1156  yy_current_state = (yy_last_accepting_state);
1157  goto yy_find_action;
1158 
1159 case 1:
1160 /* rule 1 can match eol */
1162 #line 87 "ada-lex.l"
1163 { }
1164  YY_BREAK
1165 case 2:
1167 #line 89 "ada-lex.l"
1168 { yyterminate(); }
1169  YY_BREAK
1170 case 3:
1172 #line 91 "ada-lex.l"
1173 {
1174  canonicalizeNumeral (numbuf, yytext);
1175  return processInt (pstate, NULL, numbuf,
1176  strrchr (numbuf, 'e') + 1);
1177  }
1178  YY_BREAK
1179 case 4:
1181 #line 97 "ada-lex.l"
1182 {
1183  canonicalizeNumeral (numbuf, yytext);
1184  return processInt (pstate, NULL, numbuf, NULL);
1185  }
1186  YY_BREAK
1187 case 5:
1189 #line 102 "ada-lex.l"
1190 {
1191  canonicalizeNumeral (numbuf, yytext);
1192  return processInt (pstate, numbuf,
1193  strchr (numbuf, '#') + 1,
1194  strrchr(numbuf, '#') + 1);
1195  }
1196  YY_BREAK
1197 case 6:
1199 #line 109 "ada-lex.l"
1200 {
1201  canonicalizeNumeral (numbuf, yytext);
1202  return processInt (pstate, numbuf, strchr (numbuf, '#') + 1,
1203  NULL);
1204  }
1205  YY_BREAK
1206 case 7:
1208 #line 115 "ada-lex.l"
1209 {
1210  canonicalizeNumeral (numbuf, yytext+2);
1211  return processInt (pstate, "16#", numbuf, NULL);
1212  }
1213  YY_BREAK
1214 case 8:
1216 #line 121 "ada-lex.l"
1217 {
1218  canonicalizeNumeral (numbuf, yytext);
1219  return processReal (pstate, numbuf);
1220  }
1221  YY_BREAK
1222 case 9:
1224 #line 126 "ada-lex.l"
1225 {
1226  canonicalizeNumeral (numbuf, yytext);
1227  return processReal (pstate, numbuf);
1228  }
1229  YY_BREAK
1230 case 10:
1232 #line 131 "ada-lex.l"
1233 {
1234  error (_("Based real literals not implemented yet."));
1235  }
1236  YY_BREAK
1237 case 11:
1239 #line 135 "ada-lex.l"
1240 {
1241  error (_("Based real literals not implemented yet."));
1242  }
1243  YY_BREAK
1244 case 12:
1246 #line 139 "ada-lex.l"
1247 {
1248  yylval.typed_val.type = type_char (pstate);
1249  yylval.typed_val.val = yytext[1];
1250  return CHARLIT;
1251  }
1252  YY_BREAK
1253 case 13:
1255 #line 145 "ada-lex.l"
1256 {
1257  int v;
1258  yylval.typed_val.type = type_char (pstate);
1259  sscanf (yytext+3, "%2x", &v);
1260  yylval.typed_val.val = v;
1261  return CHARLIT;
1262  }
1263  YY_BREAK
1264 case 14:
1266 #line 153 "ada-lex.l"
1267 {
1268  yylval.sval = processString (yytext+1, yyleng-2);
1269  return STRING;
1270  }
1271  YY_BREAK
1272 case 15:
1274 #line 158 "ada-lex.l"
1275 {
1276  error (_("ill-formed or non-terminated string literal"));
1277  }
1278  YY_BREAK
1279 case 16:
1281 #line 163 "ada-lex.l"
1282 {
1283  rewind_to_char ('i');
1284  return 0;
1285  }
1286  YY_BREAK
1287 case 17:
1289 #line 168 "ada-lex.l"
1290 {
1291  rewind_to_char ('t');
1292  return 0;
1293  }
1294  YY_BREAK
1295 case 18:
1296 /* rule 18 can match eol */
1298 #line 173 "ada-lex.l"
1299 {
1300  /* This keyword signals the end of the expression and
1301  will be processed separately. */
1302  rewind_to_char ('t');
1303  return 0;
1304  }
1305  YY_BREAK
1306 /* ADA KEYWORDS */
1307 case 19:
1309 #line 182 "ada-lex.l"
1310 { return ABS; }
1311  YY_BREAK
1312 case 20:
1314 #line 183 "ada-lex.l"
1315 { return _AND_; }
1316  YY_BREAK
1317 case 21:
1319 #line 184 "ada-lex.l"
1320 { return ELSE; }
1321  YY_BREAK
1322 case 22:
1324 #line 185 "ada-lex.l"
1325 { return IN; }
1326  YY_BREAK
1327 case 23:
1329 #line 186 "ada-lex.l"
1330 { return MOD; }
1331  YY_BREAK
1332 case 24:
1334 #line 187 "ada-lex.l"
1335 { return NEW; }
1336  YY_BREAK
1337 case 25:
1339 #line 188 "ada-lex.l"
1340 { return NOT; }
1341  YY_BREAK
1342 case 26:
1344 #line 189 "ada-lex.l"
1345 { return NULL_PTR; }
1346  YY_BREAK
1347 case 27:
1349 #line 190 "ada-lex.l"
1350 { return OR; }
1351  YY_BREAK
1352 case 28:
1354 #line 191 "ada-lex.l"
1355 { return OTHERS; }
1356  YY_BREAK
1357 case 29:
1359 #line 192 "ada-lex.l"
1360 { return REM; }
1361  YY_BREAK
1362 case 30:
1364 #line 193 "ada-lex.l"
1365 { return THEN; }
1366  YY_BREAK
1367 case 31:
1369 #line 194 "ada-lex.l"
1370 { return XOR; }
1371  YY_BREAK
1372 /* BOOLEAN "KEYWORDS" */
1373 /* True and False are not keywords in Ada, but rather enumeration constants.
1374  However, the boolean type is no longer represented as an enum, so True
1375  and False are no longer defined in symbol tables. We compromise by
1376  making them keywords (when bare). */
1377 case 32:
1379 #line 203 "ada-lex.l"
1380 { return TRUEKEYWORD; }
1381  YY_BREAK
1382 case 33:
1384 #line 204 "ada-lex.l"
1385 { return FALSEKEYWORD; }
1386  YY_BREAK
1387 /* ATTRIBUTES */
1388 case 34:
1389 /* rule 34 can match eol */
1391 #line 208 "ada-lex.l"
1392 { return processAttribute (yytext+1); }
1393  YY_BREAK
1394 /* PUNCTUATION */
1395 case 35:
1397 #line 212 "ada-lex.l"
1398 { return ARROW; }
1399  YY_BREAK
1400 case 36:
1402 #line 213 "ada-lex.l"
1403 { return DOTDOT; }
1404  YY_BREAK
1405 case 37:
1407 #line 214 "ada-lex.l"
1408 { return STARSTAR; }
1409  YY_BREAK
1410 case 38:
1412 #line 215 "ada-lex.l"
1413 { return ASSIGN; }
1414  YY_BREAK
1415 case 39:
1417 #line 216 "ada-lex.l"
1418 { return NOTEQUAL; }
1419  YY_BREAK
1420 case 40:
1422 #line 217 "ada-lex.l"
1423 { return LEQ; }
1424  YY_BREAK
1425 case 41:
1427 #line 218 "ada-lex.l"
1428 { return GEQ; }
1429  YY_BREAK
1430 case 42:
1432 #line 220 "ada-lex.l"
1433 { BEGIN INITIAL; return '\''; }
1434  YY_BREAK
1435 case 43:
1437 #line 222 "ada-lex.l"
1438 { return yytext[0]; }
1439  YY_BREAK
1440 case 44:
1442 #line 224 "ada-lex.l"
1443 { if (paren_depth == 0 && comma_terminates)
1444  {
1445  rewind_to_char (',');
1446  return 0;
1447  }
1448  else
1449  return ',';
1450  }
1451  YY_BREAK
1452 case 45:
1454 #line 233 "ada-lex.l"
1455 { paren_depth += 1; return '('; }
1456  YY_BREAK
1457 case 46:
1459 #line 234 "ada-lex.l"
1460 { if (paren_depth == 0)
1461  {
1462  rewind_to_char (')');
1463  return 0;
1464  }
1465  else
1466  {
1467  paren_depth -= 1;
1468  return ')';
1469  }
1470  }
1471  YY_BREAK
1472 case 47:
1473 /* rule 47 can match eol */
1475 #line 246 "ada-lex.l"
1476 { return DOT_ALL; }
1477  YY_BREAK
1478 case 48:
1479 /* rule 48 can match eol */
1481 #line 248 "ada-lex.l"
1482 {
1483  yylval.sval = processId (yytext+1, yyleng-1);
1484  return DOT_ID;
1485  }
1486  YY_BREAK
1487 case 49:
1488 /* rule 49 can match eol */
1490 #line 253 "ada-lex.l"
1491 {
1492  int all_posn = find_dot_all (yytext);
1493 
1494  if (all_posn == -1 && yytext[yyleng-1] == '\'')
1495  {
1497  yyless (yyleng-1);
1498  }
1499  else if (all_posn >= 0)
1500  yyless (all_posn);
1501  yylval.sval = processId (yytext, yyleng);
1502  return NAME;
1503  }
1504  YY_BREAK
1505 /* GDB EXPRESSION CONSTRUCTS */
1506 case 50:
1507 /* rule 50 can match eol */
1509 #line 270 "ada-lex.l"
1510 {
1511  yyless (yyleng - 2);
1512  yylval.sval = processId (yytext, yyleng);
1513  return NAME;
1514  }
1515  YY_BREAK
1516 case 51:
1518 #line 276 "ada-lex.l"
1519 { return COLONCOLON; }
1520  YY_BREAK
1521 case 52:
1523 #line 278 "ada-lex.l"
1524 { return yytext[0]; }
1525  YY_BREAK
1526 /* REGISTERS AND GDB CONVENIENCE VARIABLES */
1527 case 53:
1529 #line 282 "ada-lex.l"
1530 {
1531  yylval.sval.ptr = yytext;
1532  yylval.sval.length = yyleng;
1533  return SPECIAL_VARIABLE;
1534  }
1535  YY_BREAK
1536 /* CATCH-ALL ERROR CASE */
1537 case 54:
1539 #line 290 "ada-lex.l"
1540 { error (_("Invalid character '%s' in expression."), yytext); }
1541  YY_BREAK
1542 case 55:
1544 #line 291 "ada-lex.l"
1545 YY_FATAL_ERROR( "flex scanner jammed" );
1546  YY_BREAK
1547 #line 1548 "ada-lex.c"
1548 case YY_STATE_EOF(INITIAL):
1549 case YY_STATE_EOF(BEFORE_QUAL_QUOTE):
1550  yyterminate();
1551 
1552  case YY_END_OF_BUFFER:
1553  {
1554  /* Amount of text matched not including the EOB char. */
1555  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1556 
1557  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1558  *yy_cp = (yy_hold_char);
1560 
1561  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1562  {
1563  /* We're scanning a new file or input source. It's
1564  * possible that this happened because the user
1565  * just pointed yyin at a new source and called
1566  * yylex(). If so, then we have to assure
1567  * consistency between YY_CURRENT_BUFFER and our
1568  * globals. Here is the right place to do so, because
1569  * this is the first action (other than possibly a
1570  * back-up) that will match for the new input source.
1571  */
1572  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1573  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1574  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1575  }
1576 
1577  /* Note that here we test for yy_c_buf_p "<=" to the position
1578  * of the first EOB in the buffer, since yy_c_buf_p will
1579  * already have been incremented past the NUL character
1580  * (since all states make transitions on EOB to the
1581  * end-of-buffer state). Contrast this with the test
1582  * in input().
1583  */
1584  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1585  { /* This was really a NUL. */
1586  yy_state_type yy_next_state;
1587 
1588  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1589 
1590  yy_current_state = yy_get_previous_state( );
1591 
1592  /* Okay, we're now positioned to make the NUL
1593  * transition. We couldn't have
1594  * yy_get_previous_state() go ahead and do it
1595  * for us because it doesn't know how to deal
1596  * with the possibility of jamming (and we don't
1597  * want to build jamming into it because then it
1598  * will run more slowly).
1599  */
1600 
1601  yy_next_state = yy_try_NUL_trans( yy_current_state );
1602 
1603  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1604 
1605  if ( yy_next_state )
1606  {
1607  /* Consume the NUL. */
1608  yy_cp = ++(yy_c_buf_p);
1609  yy_current_state = yy_next_state;
1610  goto yy_match;
1611  }
1612 
1613  else
1614  {
1615  yy_cp = (yy_c_buf_p);
1616  goto yy_find_action;
1617  }
1618  }
1619 
1620  else switch ( yy_get_next_buffer( ) )
1621  {
1622  case EOB_ACT_END_OF_FILE:
1623  {
1625 
1626  if ( yywrap( ) )
1627  {
1628  /* Note: because we've taken care in
1629  * yy_get_next_buffer() to have set up
1630  * yytext, we can now set up
1631  * yy_c_buf_p so that if some total
1632  * hoser (like flex itself) wants to
1633  * call the scanner after we return the
1634  * YY_NULL, it'll still work - another
1635  * YY_NULL will get returned.
1636  */
1638 
1639  yy_act = YY_STATE_EOF(YY_START);
1640  goto do_action;
1641  }
1642 
1643  else
1644  {
1645  if ( ! (yy_did_buffer_switch_on_eof) )
1646  YY_NEW_FILE;
1647  }
1648  break;
1649  }
1650 
1651  case EOB_ACT_CONTINUE_SCAN:
1652  (yy_c_buf_p) =
1653  (yytext_ptr) + yy_amount_of_matched_text;
1654 
1655  yy_current_state = yy_get_previous_state( );
1656 
1657  yy_cp = (yy_c_buf_p);
1658  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1659  goto yy_match;
1660 
1661  case EOB_ACT_LAST_MATCH:
1662  (yy_c_buf_p) =
1663  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1664 
1665  yy_current_state = yy_get_previous_state( );
1666 
1667  yy_cp = (yy_c_buf_p);
1668  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1669  goto yy_find_action;
1670  }
1671  break;
1672  }
1673 
1674  default:
1676  "fatal flex scanner internal error--no action found" );
1677  } /* end of action switch */
1678  } /* end of scanning one token */
1679  } /* end of user's declarations */
1680 } /* end of yylex */
1681 
1682 /* yy_get_next_buffer - try to read in a new buffer
1683  *
1684  * Returns a code representing an action:
1685  * EOB_ACT_LAST_MATCH -
1686  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1687  * EOB_ACT_END_OF_FILE - end of file
1688  */
1689 static int yy_get_next_buffer (void)
1690 {
1691  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1692  register char *source = (yytext_ptr);
1693  register int number_to_move, i;
1694  int ret_val;
1695 
1696  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1698  "fatal flex scanner internal error--end of buffer missed" );
1699 
1700  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1701  { /* Don't try to fill the buffer, so this is an EOF. */
1702  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1703  {
1704  /* We matched a single character, the EOB, so
1705  * treat this as a final EOF.
1706  */
1707  return EOB_ACT_END_OF_FILE;
1708  }
1709 
1710  else
1711  {
1712  /* We matched some text prior to the EOB, first
1713  * process it.
1714  */
1715  return EOB_ACT_LAST_MATCH;
1716  }
1717  }
1718 
1719  /* Try to read more data. */
1720 
1721  /* First move last chars to start of buffer. */
1722  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1723 
1724  for ( i = 0; i < number_to_move; ++i )
1725  *(dest++) = *(source++);
1726 
1727  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1728  /* don't do the read, it's not guaranteed to return an EOF,
1729  * just force an EOF
1730  */
1731  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1732 
1733  else
1734  {
1735  yy_size_t num_to_read =
1736  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1737 
1738  while ( num_to_read <= 0 )
1739  { /* Not enough room in the buffer - grow it. */
1740 
1741  /* just a shorter name for the current buffer */
1742  YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1743 
1744  int yy_c_buf_p_offset =
1745  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1746 
1747  if ( b->yy_is_our_buffer )
1748  {
1749  yy_size_t new_size = b->yy_buf_size * 2;
1750 
1751  if ( new_size <= 0 )
1752  b->yy_buf_size += b->yy_buf_size / 8;
1753  else
1754  b->yy_buf_size *= 2;
1755 
1756  b->yy_ch_buf = (char *)
1757  /* Include room in for 2 EOB chars. */
1758  yyxrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1759  }
1760  else
1761  /* Can't grow it, we don't own it. */
1762  b->yy_ch_buf = 0;
1763 
1764  if ( ! b->yy_ch_buf )
1766  "fatal error - scanner input buffer overflow" );
1767 
1768  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1769 
1770  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1771  number_to_move - 1;
1772 
1773  }
1774 
1775  if ( num_to_read > YY_READ_BUF_SIZE )
1776  num_to_read = YY_READ_BUF_SIZE;
1777 
1778  /* Read in more data. */
1779  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1780  (yy_n_chars), num_to_read );
1781 
1782  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1783  }
1784 
1785  if ( (yy_n_chars) == 0 )
1786  {
1787  if ( number_to_move == YY_MORE_ADJ )
1788  {
1789  ret_val = EOB_ACT_END_OF_FILE;
1790  yyrestart(yyin );
1791  }
1792 
1793  else
1794  {
1795  ret_val = EOB_ACT_LAST_MATCH;
1796  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1798  }
1799  }
1800 
1801  else
1802  ret_val = EOB_ACT_CONTINUE_SCAN;
1803 
1804  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1805  /* Extend the array by 50%, plus the number we really need. */
1806  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1807  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyxrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1808  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1809  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1810  }
1811 
1812  (yy_n_chars) += number_to_move;
1815 
1816  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1817 
1818  return ret_val;
1819 }
1820 
1821 /* yy_get_previous_state - get the state just before the EOB char was reached */
1822 
1823  static yy_state_type yy_get_previous_state (void)
1824 {
1825  register yy_state_type yy_current_state;
1826  register char *yy_cp;
1827 
1828  yy_current_state = (yy_start);
1829 
1830  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1831  {
1832  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1833  if ( yy_accept[yy_current_state] )
1834  {
1835  (yy_last_accepting_state) = yy_current_state;
1836  (yy_last_accepting_cpos) = yy_cp;
1837  }
1838  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1839  {
1840  yy_current_state = (int) yy_def[yy_current_state];
1841  if ( yy_current_state >= 207 )
1842  yy_c = yy_meta[(unsigned int) yy_c];
1843  }
1844  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1845  }
1846 
1847  return yy_current_state;
1848 }
1849 
1850 /* yy_try_NUL_trans - try to make a transition on the NUL character
1851  *
1852  * synopsis
1853  * next_state = yy_try_NUL_trans( current_state );
1854  */
1855  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1856 {
1857  register int yy_is_jam;
1858  register char *yy_cp = (yy_c_buf_p);
1859 
1860  register YY_CHAR yy_c = 1;
1861  if ( yy_accept[yy_current_state] )
1862  {
1863  (yy_last_accepting_state) = yy_current_state;
1864  (yy_last_accepting_cpos) = yy_cp;
1865  }
1866  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1867  {
1868  yy_current_state = (int) yy_def[yy_current_state];
1869  if ( yy_current_state >= 207 )
1870  yy_c = yy_meta[(unsigned int) yy_c];
1871  }
1872  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1873  yy_is_jam = (yy_current_state == 206);
1874 
1875  return yy_is_jam ? 0 : yy_current_state;
1876 }
1877 
1878  static void yyunput (int c, register char * yy_bp )
1879 {
1880  register char *yy_cp;
1881 
1882  yy_cp = (yy_c_buf_p);
1883 
1884  /* undo effects of setting up yytext */
1885  *yy_cp = (yy_hold_char);
1886 
1887  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1888  { /* need to shift things up to make room */
1889  /* +2 for EOB chars. */
1890  register yy_size_t number_to_move = (yy_n_chars) + 2;
1891  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1892  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1893  register char *source =
1894  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1895 
1896  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1897  *--dest = *--source;
1898 
1899  yy_cp += (int) (dest - source);
1900  yy_bp += (int) (dest - source);
1901  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1902  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1903 
1904  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1905  YY_FATAL_ERROR( "flex scanner push-back overflow" );
1906  }
1907 
1908  *--yy_cp = (char) c;
1909 
1910  (yytext_ptr) = yy_bp;
1911  (yy_hold_char) = *yy_cp;
1912  (yy_c_buf_p) = yy_cp;
1913 }
1914 
1915 #ifndef YY_NO_INPUT
1916 #ifdef __cplusplus
1917  static int yyinput (void)
1918 #else
1919  static int input (void)
1920 #endif
1921 
1922 {
1923  int c;
1924 
1925  *(yy_c_buf_p) = (yy_hold_char);
1926 
1927  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1928  {
1929  /* yy_c_buf_p now points to the character we want to return.
1930  * If this occurs *before* the EOB characters, then it's a
1931  * valid NUL; if not, then we've hit the end of the buffer.
1932  */
1933  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1934  /* This was really a NUL. */
1935  *(yy_c_buf_p) = '\0';
1936 
1937  else
1938  { /* need more input */
1939  yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1940  ++(yy_c_buf_p);
1941 
1942  switch ( yy_get_next_buffer( ) )
1943  {
1944  case EOB_ACT_LAST_MATCH:
1945  /* This happens because yy_g_n_b()
1946  * sees that we've accumulated a
1947  * token and flags that we need to
1948  * try matching the token before
1949  * proceeding. But for input(),
1950  * there's no matching to consider.
1951  * So convert the EOB_ACT_LAST_MATCH
1952  * to EOB_ACT_END_OF_FILE.
1953  */
1954 
1955  /* Reset buffer status. */
1956  yyrestart(yyin );
1957 
1958  /*FALLTHROUGH*/
1959 
1960  case EOB_ACT_END_OF_FILE:
1961  {
1962  if ( yywrap( ) )
1963  return EOF;
1964 
1965  if ( ! (yy_did_buffer_switch_on_eof) )
1966  YY_NEW_FILE;
1967 #ifdef __cplusplus
1968  return yyinput();
1969 #else
1970  return input();
1971 #endif
1972  }
1973 
1974  case EOB_ACT_CONTINUE_SCAN:
1975  (yy_c_buf_p) = (yytext_ptr) + offset;
1976  break;
1977  }
1978  }
1979  }
1980 
1981  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1982  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1983  (yy_hold_char) = *++(yy_c_buf_p);
1984 
1985  return c;
1986 }
1987 #endif /* ifndef YY_NO_INPUT */
1988 
1994  void yyrestart (FILE * input_file )
1995 {
1996 
1997  if ( ! YY_CURRENT_BUFFER ){
2001  }
2002 
2003  yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2005 }
2006 
2011  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2012 {
2013 
2014  /* TODO. We should be able to replace this entire function body
2015  * with
2016  * yypop_buffer_state();
2017  * yypush_buffer_state(new_buffer);
2018  */
2020  if ( YY_CURRENT_BUFFER == new_buffer )
2021  return;
2022 
2023  if ( YY_CURRENT_BUFFER )
2024  {
2025  /* Flush out information for old buffer. */
2026  *(yy_c_buf_p) = (yy_hold_char);
2027  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2028  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2029  }
2030 
2031  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2033 
2034  /* We don't actually know whether we did this switch during
2035  * EOF (yywrap()) processing, but the only time this flag
2036  * is looked at is after yywrap() is called, so it's safe
2037  * to go ahead and always set it.
2038  */
2040 }
2041 
2042 static void yy_load_buffer_state (void)
2043 {
2044  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2045  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2046  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2047  (yy_hold_char) = *(yy_c_buf_p);
2048 }
2049 
2056  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2057 {
2058  YY_BUFFER_STATE b;
2059 
2060  b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2061  if ( ! b )
2062  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2063 
2064  b->yy_buf_size = size;
2065 
2066  /* yy_ch_buf has to be 2 characters longer than the size given because
2067  * we need to put in 2 end-of-buffer characters.
2068  */
2069  b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2070  if ( ! b->yy_ch_buf )
2071  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2072 
2073  b->yy_is_our_buffer = 1;
2074 
2075  yy_init_buffer(b,file );
2076 
2077  return b;
2078 }
2079 
2084  void yy_delete_buffer (YY_BUFFER_STATE b )
2085 {
2086 
2087  if ( ! b )
2088  return;
2089 
2090  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2092 
2093  if ( b->yy_is_our_buffer )
2094  yyfree((void *) b->yy_ch_buf );
2095 
2096  yyfree((void *) b );
2097 }
2098 
2099 /* Initializes or reinitializes a buffer.
2100  * This function is sometimes called more than once on the same buffer,
2101  * such as during a yyrestart() or at EOF.
2102  */
2103  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2104 
2105 {
2106  int oerrno = errno;
2107 
2108  yy_flush_buffer(b );
2109 
2110  b->yy_input_file = file;
2111  b->yy_fill_buffer = 1;
2112 
2113  /* If b is the current buffer, then yy_init_buffer was _probably_
2114  * called from yyrestart() or through yy_get_next_buffer.
2115  * In that case, we don't want to reset the lineno or column.
2116  */
2117  if (b != YY_CURRENT_BUFFER){
2118  b->yy_bs_lineno = 1;
2119  b->yy_bs_column = 0;
2120  }
2121 
2122  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2123 
2124  errno = oerrno;
2125 }
2126 
2131  void yy_flush_buffer (YY_BUFFER_STATE b )
2132 {
2133  if ( ! b )
2134  return;
2135 
2136  b->yy_n_chars = 0;
2137 
2138  /* We always need two end-of-buffer characters. The first causes
2139  * a transition to the end-of-buffer state. The second causes
2140  * a jam in that state.
2141  */
2144 
2145  b->yy_buf_pos = &b->yy_ch_buf[0];
2146 
2147  b->yy_at_bol = 1;
2149 
2150  if ( b == YY_CURRENT_BUFFER )
2152 }
2153 
2160 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2161 {
2162  if (new_buffer == NULL)
2163  return;
2164 
2166 
2167  /* This block is copied from yy_switch_to_buffer. */
2168  if ( YY_CURRENT_BUFFER )
2169  {
2170  /* Flush out information for old buffer. */
2171  *(yy_c_buf_p) = (yy_hold_char);
2172  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2173  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2174  }
2175 
2176  /* Only push if top exists. Otherwise, replace top. */
2177  if (YY_CURRENT_BUFFER)
2178  (yy_buffer_stack_top)++;
2179  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2180 
2181  /* copied from yy_switch_to_buffer. */
2184 }
2185 
2190 void yypop_buffer_state (void)
2191 {
2192  if (!YY_CURRENT_BUFFER)
2193  return;
2194 
2196  YY_CURRENT_BUFFER_LVALUE = NULL;
2197  if ((yy_buffer_stack_top) > 0)
2198  --(yy_buffer_stack_top);
2199 
2200  if (YY_CURRENT_BUFFER) {
2203  }
2204 }
2205 
2206 /* Allocates the stack if it does not exist.
2207  * Guarantees space for at least one push.
2208  */
2209 static void yyensure_buffer_stack (void)
2210 {
2211  yy_size_t num_to_alloc;
2212 
2213  if (!(yy_buffer_stack)) {
2214 
2215  /* First allocation is just for 2 elements, since we don't know if this
2216  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2217  * immediate xrealloc on the next call.
2218  */
2219  num_to_alloc = 1;
2221  (num_to_alloc * sizeof(struct yy_buffer_state*)
2222  );
2223  if ( ! (yy_buffer_stack) )
2224  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2225 
2226  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2227 
2228  (yy_buffer_stack_max) = num_to_alloc;
2229  (yy_buffer_stack_top) = 0;
2230  return;
2231  }
2232 
2233  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2234 
2235  /* Increase the buffer to prepare for a possible push. */
2236  int grow_size = 8 /* arbitrary grow size */;
2237 
2238  num_to_alloc = (yy_buffer_stack_max) + grow_size;
2240  ((yy_buffer_stack),
2241  num_to_alloc * sizeof(struct yy_buffer_state*)
2242  );
2243  if ( ! (yy_buffer_stack) )
2244  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2245 
2246  /* zero only the new slots.*/
2247  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2248  (yy_buffer_stack_max) = num_to_alloc;
2249  }
2250 }
2251 
2258 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2259 {
2260  YY_BUFFER_STATE b;
2261 
2262  if ( size < 2 ||
2263  base[size-2] != YY_END_OF_BUFFER_CHAR ||
2264  base[size-1] != YY_END_OF_BUFFER_CHAR )
2265  /* They forgot to leave room for the EOB's. */
2266  return 0;
2267 
2268  b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2269  if ( ! b )
2270  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2271 
2272  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2273  b->yy_buf_pos = b->yy_ch_buf = base;
2274  b->yy_is_our_buffer = 0;
2275  b->yy_input_file = 0;
2276  b->yy_n_chars = b->yy_buf_size;
2277  b->yy_is_interactive = 0;
2278  b->yy_at_bol = 1;
2279  b->yy_fill_buffer = 0;
2281 
2282  yy_switch_to_buffer(b );
2283 
2284  return b;
2285 }
2286 
2295 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
2296 {
2297 
2298  return yy_scan_bytes(yystr,strlen(yystr) );
2299 }
2300 
2308 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
2309 {
2310  YY_BUFFER_STATE b;
2311  char *buf;
2312  yy_size_t n;
2313  yy_size_t i;
2314 
2315  /* Get memory for full buffer, including space for trailing EOB's. */
2316  n = _yybytes_len + 2;
2317  buf = (char *) yyalloc(n );
2318  if ( ! buf )
2319  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2320 
2321  for ( i = 0; i < _yybytes_len; ++i )
2322  buf[i] = yybytes[i];
2323 
2324  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2325 
2326  b = yy_scan_buffer(buf,n );
2327  if ( ! b )
2328  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2329 
2330  /* It's okay to grow etc. this buffer, and we should throw it
2331  * away when we're done.
2332  */
2333  b->yy_is_our_buffer = 1;
2334 
2335  return b;
2336 }
2337 
2338 #ifndef YY_EXIT_FAILURE
2339 #define YY_EXIT_FAILURE 2
2340 #endif
2341 
2342 static void yy_fatal_error (yyconst char* msg )
2343 {
2344  (void) fprintf( stderr, "%s\n", msg );
2345  exit( YY_EXIT_FAILURE );
2346 }
2347 
2348 /* Redefine yyless() so it works in section 3 code. */
2349 
2350 #undef yyless
2351 #define yyless(n) \
2352  do \
2353  { \
2354  /* Undo effects of setting up yytext. */ \
2355  int yyless_macro_arg = (n); \
2356  YY_LESS_LINENO(yyless_macro_arg);\
2357  yytext[yyleng] = (yy_hold_char); \
2358  (yy_c_buf_p) = yytext + yyless_macro_arg; \
2359  (yy_hold_char) = *(yy_c_buf_p); \
2360  *(yy_c_buf_p) = '\0'; \
2361  yyleng = yyless_macro_arg; \
2362  } \
2363  while ( 0 )
2364 
2365 /* Accessor methods (get/set functions) to struct members. */
2366 
2370 int yyget_lineno (void)
2371 {
2372 
2373  return yylineno;
2374 }
2375 
2379 FILE *yyget_in (void)
2380 {
2381  return yyin;
2382 }
2383 
2387 FILE *yyget_out (void)
2388 {
2389  return yyout;
2390 }
2391 
2395 yy_size_t yyget_leng (void)
2396 {
2397  return yyleng;
2398 }
2399 
2404 char *yyget_text (void)
2405 {
2406  return yytext;
2407 }
2408 
2413 void yyset_lineno (int line_number )
2414 {
2415 
2416  yylineno = line_number;
2417 }
2418 
2425 void yyset_in (FILE * in_str )
2426 {
2427  yyin = in_str ;
2428 }
2429 
2430 void yyset_out (FILE * out_str )
2431 {
2432  yyout = out_str ;
2433 }
2434 
2435 int yyget_debug (void)
2436 {
2437  return yy_flex_debug;
2438 }
2439 
2440 void yyset_debug (int bdebug )
2441 {
2442  yy_flex_debug = bdebug ;
2443 }
2444 
2445 static int yy_init_globals (void)
2446 {
2447  /* Initialization is the same as for the non-reentrant scanner.
2448  * This function is called from yylex_destroy(), so don't allocate here.
2449  */
2450 
2451  (yy_buffer_stack) = 0;
2452  (yy_buffer_stack_top) = 0;
2453  (yy_buffer_stack_max) = 0;
2454  (yy_c_buf_p) = (char *) 0;
2455  (yy_init) = 0;
2456  (yy_start) = 0;
2457 
2458 /* Defined in main.c */
2459 #ifdef YY_STDINIT
2460  yyin = stdin;
2461  yyout = stdout;
2462 #else
2463  yyin = (FILE *) 0;
2464  yyout = (FILE *) 0;
2465 #endif
2466 
2467  /* For future reference: Set errno on error, since we are called by
2468  * yylex_init()
2469  */
2470  return 0;
2471 }
2472 
2473 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2474 int yylex_destroy (void)
2475 {
2476 
2477  /* Pop the buffer stack, destroying each element. */
2478  while(YY_CURRENT_BUFFER){
2480  YY_CURRENT_BUFFER_LVALUE = NULL;
2482  }
2483 
2484  /* Destroy the stack itself. */
2485  yyfree((yy_buffer_stack) );
2486  (yy_buffer_stack) = NULL;
2487 
2488  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2489  * yylex() is called, initialization will occur. */
2490  yy_init_globals( );
2491 
2492  return 0;
2493 }
2494 
2495 /*
2496  * Internal utility routines.
2497  */
2498 
2499 #ifndef yytext_ptr
2500 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2501 {
2502  register int i;
2503  for ( i = 0; i < n; ++i )
2504  s1[i] = s2[i];
2505 }
2506 #endif
2507 
2508 #ifdef YY_NEED_STRLEN
2509 static int yy_flex_strlen (yyconst char * s )
2510 {
2511  register int n;
2512  for ( n = 0; s[n]; ++n )
2513  ;
2514 
2515  return n;
2516 }
2517 #endif
2518 
2519 void *yyalloc (yy_size_t size )
2520 {
2521  return (void *) xmalloc( size );
2522 }
2523 
2524 void *yyxrealloc (void * ptr, yy_size_t size )
2525 {
2526  /* The cast to (char *) in the following accommodates both
2527  * implementations that use char* generic pointers, and those
2528  * that use void* generic pointers. It works with the latter
2529  * because both ANSI C and C++ allow castless assignment from
2530  * any pointer type to void*, and deal with argument conversions
2531  * as though doing an assignment.
2532  */
2533  return (void *) xrealloc( (char *) ptr, size );
2534 }
2535 
2536 void yyfree (void * ptr )
2537 {
2538  xfree( (char *) ptr ); /* see yyxrealloc() for (char *) cast */
2539 }
2540 
2541 #define YYTABLES_NAME "yytables"
2542 
2543 #line 290 "ada-lex.l"
2544 
2545 
2546 
2547 #include <ctype.h>
2548 /* Initialize the lexer for processing new expression. */
2549 
2550 static void
2551 lexer_init (FILE *inp)
2552 {
2553  BEGIN INITIAL;
2554  yyrestart (inp);
2555 }
2556 
2557 
2558 /* Copy S2 to S1, removing all underscores, and downcasing all letters. */
2559 
2560 static void
2561 canonicalizeNumeral (char *s1, const char *s2)
2562 {
2563  for (; *s2 != '\000'; s2 += 1)
2564  {
2565  if (*s2 != '_')
2566  {
2567  *s1 = tolower(*s2);
2568  s1 += 1;
2569  }
2570  }
2571  s1[0] = '\000';
2572 }
2573 
2574 /* Interprets the prefix of NUM that consists of digits of the given BASE
2575  as an integer of that BASE, with the string EXP as an exponent.
2576  Puts value in yylval, and returns INT, if the string is valid. Causes
2577  an error if the number is improperly formated. BASE, if NULL, defaults
2578  to "10", and EXP to "1". The EXP does not contain a leading 'e' or 'E'.
2579  */
2580 
2581 static int
2582 processInt (struct parser_state *par_state, const char *base0,
2583  const char *num0, const char *exp0)
2584 {
2585  ULONGEST result;
2586  long exp;
2587  int base;
2588  const char *trailer;
2589 
2590  if (base0 == NULL)
2591  base = 10;
2592  else
2593  {
2594  base = strtol (base0, (char **) NULL, 10);
2595  if (base < 2 || base > 16)
2596  error (_("Invalid base: %d."), base);
2597  }
2598 
2599  if (exp0 == NULL)
2600  exp = 0;
2601  else
2602  exp = strtol(exp0, (char **) NULL, 10);
2603 
2604  errno = 0;
2605  result = strtoulst (num0, &trailer, base);
2606  if (errno == ERANGE)
2607  error (_("Integer literal out of range"));
2608  if (isxdigit(*trailer))
2609  error (_("Invalid digit `%c' in based literal"), *trailer);
2610 
2611  while (exp > 0)
2612  {
2613  if (result > (ULONG_MAX / base))
2614  error (_("Integer literal out of range"));
2615  result *= base;
2616  exp -= 1;
2617  }
2618 
2619  if ((result >> (gdbarch_int_bit (parse_gdbarch (par_state))-1)) == 0)
2620  yylval.typed_val.type = type_int (par_state);
2621  else if ((result >> (gdbarch_long_bit (parse_gdbarch (par_state))-1)) == 0)
2622  yylval.typed_val.type = type_long (par_state);
2623  else if (((result >> (gdbarch_long_bit (parse_gdbarch (par_state))-1)) >> 1) == 0)
2624  {
2625  /* We have a number representable as an unsigned integer quantity.
2626  For consistency with the C treatment, we will treat it as an
2627  anonymous modular (unsigned) quantity. Alas, the types are such
2628  that we need to store .val as a signed quantity. Sorry
2629  for the mess, but C doesn't officially guarantee that a simple
2630  assignment does the trick (no, it doesn't; read the reference manual).
2631  */
2632  yylval.typed_val.type
2634  if (result & LONGEST_SIGN)
2635  yylval.typed_val.val =
2636  (LONGEST) (result & ~LONGEST_SIGN)
2637  - (LONGEST_SIGN>>1) - (LONGEST_SIGN>>1);
2638  else
2639  yylval.typed_val.val = (LONGEST) result;
2640  return INT;
2641  }
2642  else
2643  yylval.typed_val.type = type_long_long (par_state);
2644 
2645  yylval.typed_val.val = (LONGEST) result;
2646  return INT;
2647 }
2648 
2649 static int
2650 processReal (struct parser_state *par_state, const char *num0)
2651 {
2652  sscanf (num0, "%" DOUBLEST_SCAN_FORMAT, &yylval.typed_val_float.dval);
2653 
2654  yylval.typed_val_float.type = type_float (par_state);
2655  if (sizeof(DOUBLEST) >= gdbarch_double_bit (parse_gdbarch (par_state))
2656  / TARGET_CHAR_BIT)
2657  yylval.typed_val_float.type = type_double (par_state);
2658  if (sizeof(DOUBLEST) >= gdbarch_long_double_bit (parse_gdbarch (par_state))
2659  / TARGET_CHAR_BIT)
2660  yylval.typed_val_float.type = type_long_double (par_state);
2661 
2662  return FLOAT;
2663 }
2664 
2665 
2666 /* Store a canonicalized version of NAME0[0..LEN-1] in yylval.ssym. The
2667  resulting string is valid until the next call to ada_parse. If
2668  NAME0 contains the substring "___", it is assumed to be already
2669  encoded and the resulting name is equal to it. Otherwise, it differs
2670  from NAME0 in that:
2671  + Characters between '...' or <...> are transfered verbatim to
2672  yylval.ssym.
2673  + <, >, and trailing "'" characters in quoted sequences are removed
2674  (a leading quote is preserved to indicate that the name is not to be
2675  GNAT-encoded).
2676  + Unquoted whitespace is removed.
2677  + Unquoted alphabetic characters are mapped to lower case.
2678  Result is returned as a struct stoken, but for convenience, the string
2679  is also null-terminated. Result string valid until the next call of
2680  ada_parse.
2681  */
2682 static struct stoken
2683 processId (const char *name0, int len)
2684 {
2685  char *name = obstack_alloc (&temp_parse_space, len + 11);
2686  int i0, i;
2687  struct stoken result;
2688 
2689  result.ptr = name;
2690  while (len > 0 && isspace (name0[len-1]))
2691  len -= 1;
2692 
2693  if (strstr (name0, "___") != NULL)
2694  {
2695  strncpy (name, name0, len);
2696  name[len] = '\000';
2697  result.length = len;
2698  return result;
2699  }
2700 
2701  i = i0 = 0;
2702  while (i0 < len)
2703  {
2704  if (isalnum (name0[i0]))
2705  {
2706  name[i] = tolower (name0[i0]);
2707  i += 1; i0 += 1;
2708  }
2709  else switch (name0[i0])
2710  {
2711  default:
2712  name[i] = name0[i0];
2713  i += 1; i0 += 1;
2714  break;
2715  case ' ': case '\t':
2716  i0 += 1;
2717  break;
2718  case '\'':
2719  do
2720  {
2721  name[i] = name0[i0];
2722  i += 1; i0 += 1;
2723  }
2724  while (i0 < len && name0[i0] != '\'');
2725  i0 += 1;
2726  break;
2727  case '<':
2728  i0 += 1;
2729  while (i0 < len && name0[i0] != '>')
2730  {
2731  name[i] = name0[i0];
2732  i += 1; i0 += 1;
2733  }
2734  i0 += 1;
2735  break;
2736  }
2737  }
2738  name[i] = '\000';
2739 
2740  result.length = i;
2741  return result;
2742 }
2743 
2744 /* Return TEXT[0..LEN-1], a string literal without surrounding quotes,
2745  with special hex character notations replaced with characters.
2746  Result valid until the next call to ada_parse. */
2747 
2748 static struct stoken
2749 processString (const char *text, int len)
2750 {
2751  const char *p;
2752  char *q;
2753  const char *lim = text + len;
2754  struct stoken result;
2755 
2756  q = obstack_alloc (&temp_parse_space, len);
2757  result.ptr = q;
2758  p = text;
2759  while (p < lim)
2760  {
2761  if (p[0] == '[' && p[1] == '"' && p+2 < lim)
2762  {
2763  if (p[2] == '"') /* "...["""]... */
2764  {
2765  *q = '"';
2766  p += 4;
2767  }
2768  else
2769  {
2770  int chr;
2771  sscanf (p+2, "%2x", &chr);
2772  *q = (char) chr;
2773  p += 5;
2774  }
2775  }
2776  else
2777  *q = *p;
2778  q += 1;
2779  p += 1;
2780  }
2781  result.length = q - result.ptr;
2782  return result;
2783 }
2784 
2785 /* Returns the position within STR of the '.' in a
2786  '.{WHITE}*all' component of a dotted name, or -1 if there is none.
2787  Note: we actually don't need this routine, since 'all' can never be an
2788  Ada identifier. Thus, looking up foo.all or foo.all.x as a name
2789  must fail, and will eventually be interpreted as (foo).all or
2790  (foo).all.x. However, this does avoid an extraneous lookup. */
2791 
2792 static int
2793 find_dot_all (const char *str)
2794 {
2795  int i;
2796 
2797  for (i = 0; str[i] != '\000'; i++)
2798  if (str[i] == '.')
2799  {
2800  int i0 = i;
2801 
2802  do
2803  i += 1;
2804  while (isspace (str[i]));
2805 
2806  if (strncasecmp (str + i, "all", 3) == 0
2807  && !isalnum (str[i + 3]) && str[i + 3] != '_')
2808  return i0;
2809  }
2810  return -1;
2811 }
2812 
2813 /* Returns non-zero iff string SUBSEQ matches a subsequence of STR, ignoring
2814  case. */
2815 
2816 static int
2817 subseqMatch (const char *subseq, const char *str)
2818 {
2819  if (subseq[0] == '\0')
2820  return 1;
2821  else if (str[0] == '\0')
2822  return 0;
2823  else if (tolower (subseq[0]) == tolower (str[0]))
2824  return subseqMatch (subseq+1, str+1) || subseqMatch (subseq, str+1);
2825  else
2826  return subseqMatch (subseq, str+1);
2827 }
2828 
2829 
2830 static struct { const char *name; int code; }
2831 attributes[] = {
2832  { "address", TICK_ADDRESS },
2833  { "unchecked_access", TICK_ACCESS },
2834  { "unrestricted_access", TICK_ACCESS },
2835  { "access", TICK_ACCESS },
2836  { "first", TICK_FIRST },
2837  { "last", TICK_LAST },
2838  { "length", TICK_LENGTH },
2839  { "max", TICK_MAX },
2840  { "min", TICK_MIN },
2841  { "modulus", TICK_MODULUS },
2842  { "pos", TICK_POS },
2843  { "range", TICK_RANGE },
2844  { "size", TICK_SIZE },
2845  { "tag", TICK_TAG },
2846  { "val", TICK_VAL },
2847  { NULL, -1 }
2848 };
2849 
2850 /* Return the syntactic code corresponding to the attribute name or
2851  abbreviation STR. */
2852 
2853 static int
2854 processAttribute (const char *str)
2855 {
2856  int i, k;
2857 
2858  for (i = 0; attributes[i].code != -1; i += 1)
2859  if (strcasecmp (str, attributes[i].name) == 0)
2860  return attributes[i].code;
2861 
2862  for (i = 0, k = -1; attributes[i].code != -1; i += 1)
2863  if (subseqMatch (str, attributes[i].name))
2864  {
2865  if (k == -1)
2866  k = i;
2867  else
2868  error (_("ambiguous attribute name: `%s'"), str);
2869  }
2870  if (k == -1)
2871  error (_("unrecognized attribute: `%s'"), str);
2872 
2873  return attributes[k].code;
2874 }
2875 
2876 /* Back up lexptr by yyleng and then to the rightmost occurrence of
2877  character CH, case-folded (there must be one). WARNING: since
2878  lexptr points to the next input character that Flex has not yet
2879  transferred to its internal buffer, the use of this function
2880  depends on the assumption that Flex calls YY_INPUT only when it is
2881  logically necessary to do so (thus, there is no reading ahead
2882  farther than needed to identify the next token.) */
2883 
2884 static void
2886 {
2887  lexptr -= yyleng;
2888  while (toupper (*lexptr) != toupper (ch))
2889  lexptr -= 1;
2890  yyrestart (NULL);
2891 }
2892 
2893 int
2894 yywrap(void)
2895 {
2896  return 1;
2897 }
2898 
2899 /* Dummy definition to suppress warnings about unused static definitions. */
2900 typedef void (*dummy_function) ();
2901 dummy_function ada_flex_use[] =
2902 {
2904 };
2905 
#define yylval
Definition: ada-exp.c:99
static int processAttribute(const char *)
Definition: ada-lex.c:2854
int yylex_destroy(void)
unsigned char YY_CHAR
Definition: ada-lex.c:345
void * yyalloc(yy_size_t)
#define YY_MORE_ADJ
Definition: ada-lex.c:819
unsigned char flex_uint8_t
Definition: ada-lex.c:54
int yywrap(void)
Definition: ada-lex.c:2894
yy_size_t yyget_leng(void)
#define parse_gdbarch(ps)
Definition: parser-defs.h:36
#define EOB_ACT_LAST_MATCH
Definition: ada-lex.c:176
#define TRUEKEYWORD
Definition: ada-exp.c:288
char * yytext
Definition: ada-lex.c:821
const char * ptr
Definition: parser-defs.h:79
void xfree(void *)
Definition: common-utils.c:97
static YY_BUFFER_STATE * yy_buffer_stack
Definition: ada-lex.c:265
static void canonicalizeNumeral(char *s1, const char *)
#define YY_SC_TO_UI(c)
Definition: ada-lex.c:120
int comma_terminates
Definition: parse.c:75
#define YY_RESTORE_YY_MORE_OFFSET
Definition: ada-lex.c:820
int yy_fill_buffer
Definition: ada-lex.c:241
int gdbarch_int_bit(struct gdbarch *gdbarch)
Definition: gdbarch.c:1490
if(!(yy_init))
Definition: ada-lex.c:1072
#define ULONG_MAX
Definition: defs.h:517
struct type ** const(pascal_builtin_types[])
#define YY_BUFFER_NORMAL
Definition: ada-lex.c:246
size_t yy_size_t
Definition: ada-lex.c:167
void yyset_out(FILE *out_str)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
Definition: gdbtypes.c:4766
static yy_state_type yy_get_previous_state(void)
YY_EXTRA_TYPE yyget_extra(void)
#define FALSEKEYWORD
Definition: ada-exp.c:289
char * yyget_text(void)
int gdbarch_long_bit(struct gdbarch *gdbarch)
Definition: gdbarch.c:1507
int yy_bs_lineno
Definition: ada-lex.c:235
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
#define NOTEQUAL
Definition: ada-exp.c:302
static struct type * type_float(struct parser_state *)
Definition: ada-exp.c:3460
#define _(String)
Definition: gdb_locale.h:40
#define NUMERAL_WIDTH
Definition: ada-lex.c:848
void yy_flush_buffer(YY_BUFFER_STATE b)
char * yy_buf_pos
Definition: ada-lex.c:204
#define IN
Definition: ada-exp.c:305
static char * yy_c_buf_p
Definition: ada-lex.c:288
yy_size_t yy_buf_size
Definition: ada-lex.c:209
static void rewind_to_char(int)
Definition: ada-lex.c:2885
YY_BUFFER_STATE yy_scan_bytes(yyconst char *bytes, yy_size_t len)
#define EOB_ACT_CONTINUE_SCAN
Definition: ada-lex.c:174
yy_size_t yy_n_chars
Definition: ada-lex.c:214
static yy_state_type yy_last_accepting_state
Definition: ada-lex.c:808
const char *const name
Definition: aarch64-tdep.c:68
void yyrestart(FILE *input_file)
#define YY_DECL
Definition: ada-lex.c:864
#define STARSTAR
Definition: ada-exp.c:310
void yyset_extra(YY_EXTRA_TYPE user_defined)
Definition: ada-exp.c:251
static char yy_hold_char
Definition: ada-lex.c:283
void yyfree(void *)
FILE * yyget_out(void)
#define FLOAT
Definition: ada-exp.c:287
struct type * builtin_unsigned_long
Definition: gdbtypes.h:1489
#define YY_EXIT_FAILURE
YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size)
static struct parser_state * pstate
Definition: ada-exp.c:149
static struct stoken processId(const char *, int)
void yyset_debug(int debug_flag)
#define YY_CURRENT_BUFFER
Definition: ada-lex.c:273
static void yyensure_buffer_stack(void)
#define INITIAL
Definition: ada-lex.c:886
static void yy_load_buffer_state(void)
static int yy_get_next_buffer(void)
#define yytext_ptr
Definition: ada-lex.c:356
int yy_bs_column
Definition: ada-lex.c:236
yy_size_t yyleng
Definition: ada-lex.c:285
double DOUBLEST
Definition: doublest.h:24
#define YY_FATAL_ERROR(msg)
Definition: ada-lex.c:1033
static void yy_fatal_error(yyconst char msg[])
void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)
#define YY_READ_BUF_SIZE
Definition: ada-lex.c:970
#define TARGET_CHAR_BIT
Definition: host-defs.h:29
struct yy_buffer_state * YY_BUFFER_STATE
Definition: ada-lex.c:162
static int processInt(struct parser_state *, const char *, const char *, const char *)
static struct obstack temp_parse_space
Definition: ada-exp.c:2743
#define NEW
Definition: ada-exp.c:328
FILE * yyin
Definition: ada-lex.c:347
static char * yy_last_accepting_cpos
Definition: ada-lex.c:809
#define YY_BUFFER_EOF_PENDING
Definition: ada-lex.c:257
int gdbarch_double_bit(struct gdbarch *gdbarch)
Definition: gdbarch.c:1624
static int yy_init_globals(void)
#define YY_BUFFER_NEW
Definition: ada-lex.c:245
#define BEGIN
Definition: ada-lex.c:126
#define OR
Definition: ada-exp.c:298
#define yyconst
Definition: ada-lex.c:109
ULONGEST strtoulst(const char *num, const char **trailer, int base)
Definition: common-utils.c:188
void yyset_lineno(int line_number)
static int processReal(struct parser_state *, const char *)
static size_t yy_buffer_stack_max
Definition: ada-lex.c:264
register int yy_act
Definition: ada-lex.c:1070
void * xmalloc(YYSIZE_T)
#define YY_BREAK
Definition: ada-lex.c:1058
#define YY_EXTRA_TYPE
Definition: ada-lex.c:898
int paren_depth
Definition: parse.c:74
YY_BUFFER_STATE yy_scan_string(yyconst char *yy_str)
#define DOUBLEST_SCAN_FORMAT
Definition: doublest.h:55
#define YY_INPUT(BUF, RESULT, MAX_SIZE)
Definition: ada-lex.c:871
#define YY_NEW_FILE
Definition: ada-lex.c:139
#define yylex
Definition: ada-exp.c:97
int yy_is_our_buffer
Definition: ada-lex.c:220
YY_BUFFER_STATE yy_create_buffer(FILE *file, int size)
unsigned short int flex_uint16_t
Definition: ada-lex.c:55
PTR xrealloc(PTR ptr, size_t size)
Definition: common-utils.c:51
static int yy_init
Definition: ada-lex.c:289
static struct type * type_long_double(struct parser_state *)
Definition: ada-exp.c:3472
static const char * lexptr
const char const char int
Definition: command.h:229
Definition: ada-exp.c:248
char * yy_ch_buf
Definition: ada-lex.c:203
#define COLONCOLON
Definition: ada-exp.c:290
#define XOR
Definition: ada-exp.c:299
#define YY_END_OF_BUFFER_CHAR
Definition: ada-lex.c:141
#define ARROW
Definition: ada-exp.c:314
#define ASSIGN
Definition: ada-exp.c:296
static yy_size_t yy_n_chars
Definition: ada-lex.c:284
short int flex_int16_t
Definition: ada-lex.c:52
Definition: ada-exp.c:260
#define NAME
Definition: ada-exp.c:292
#define YY_BUF_SIZE
Definition: ada-lex.c:152
flex_int32_t yy_verify
Definition: ada-lex.c:379
#define ABS
Definition: ada-exp.c:311
int offset
Definition: agent.c:65
#define INT
Definition: ada-exp.c:284
int code
Definition: ser-unix.c:684
static struct type * type_int(struct parser_state *)
Definition: ada-exp.c:3442
int yy_state_type
Definition: ada-lex.c:349
int yyget_lineno(void)
static struct type * type_long(struct parser_state *)
Definition: ada-exp.c:3448
int yyget_debug(void)
#define yyterminate()
Definition: ada-lex.c:1023
#define yyless(n)
Definition: ada-lex.c:182
#define YY_END_OF_BUFFER
Definition: ada-lex.c:374
void(* dummy_function)()
Definition: ada-lex.c:2900
FILE * yy_input_file
Definition: ada-lex.c:201
flex_int32_t yy_nxt
Definition: ada-lex.c:380
#define LEQ
Definition: ada-exp.c:303
static struct type * type_double(struct parser_state *)
Definition: ada-exp.c:3466
unsigned long long ULONGEST
Definition: common-types.h:53
void yypop_buffer_state(void)
int yy_is_interactive
Definition: ada-lex.c:227
static void yyunput(int c, char *buf_ptr)
#define DOTDOT
Definition: ada-exp.c:306
#define NOT
Definition: ada-exp.c:312
#define YY_DO_BEFORE_ACTION
Definition: ada-lex.c:366
void yy_delete_buffer(YY_BUFFER_STATE b)
#define YY_STATE_EOF(state)
Definition: ada-lex.c:136
static int yy_did_buffer_switch_on_eof
Definition: ada-lex.c:295
#define YY_CURRENT_BUFFER_LVALUE
Definition: ada-lex.c:280
#define YY_START
Definition: ada-lex.c:132
signed char flex_int8_t
Definition: ada-lex.c:51
#define STRING
Definition: ada-exp.c:291
static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file)
static struct type * type_char(struct parser_state *)
Definition: ada-exp.c:3478
static int find_dot_all(const char *)
void yypush_buffer_state(YY_BUFFER_STATE new_buffer)
void * yyxrealloc(void *, yy_size_t)
unsigned int flex_uint32_t
Definition: ada-lex.c:56
#define EOB_ACT_END_OF_FILE
Definition: ada-lex.c:175
#define BEFORE_QUAL_QUOTE
Definition: ada-lex.c:887
int gdbarch_long_double_bit(struct gdbarch *gdbarch)
Definition: gdbarch.c:1657
Definition: ada-exp.c:252
#define GEQ
Definition: ada-exp.c:304
int yy_flex_debug
Definition: ada-lex.c:812
int flex_int32_t
Definition: ada-lex.c:53
FILE * yyget_in(void)
int yy_buffer_status
Definition: ada-lex.c:243
void yyset_in(FILE *in_str)
void error(const char *fmt,...)
Definition: errors.c:38
size_t size
Definition: go32-nat.c:242
static int yy_start
Definition: ada-lex.c:290
#define YY_RULE_SETUP
Definition: ada-lex.c:1061
FILE * yyout
Definition: ada-lex.c:347
int yylineno
Definition: ada-lex.c:353
long long LONGEST
Definition: common-types.h:52
static struct stoken processString(const char *, int)
register char * yy_bp
Definition: ada-lex.c:1069
static struct type * type_long_long(struct parser_state *)
Definition: ada-exp.c:3454
int length
Definition: parser-defs.h:81
register char * yy_cp
Definition: ada-lex.c:1069
static size_t yy_buffer_stack_top
Definition: ada-lex.c:263
#define MOD
Definition: ada-exp.c:308
const ULONGEST const LONGEST len
Definition: target.h:309