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