1#line 2 "ada-lex.c"
2/* A lexical scanner generated by flex */
3
4/* Scanner skeleton version:
5 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
6 */
7
8#define FLEX_SCANNER
9#define YY_FLEX_MAJOR_VERSION 2
10#define YY_FLEX_MINOR_VERSION 5
11
12#include <stdio.h>
13#include <unistd.h>
14
15
16/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
17#ifdef c_plusplus
18#ifndef __cplusplus
19#define __cplusplus
20#endif
21#endif
22
23
24#ifdef __cplusplus
25
26#include <stdlib.h>
27
28/* Use prototypes in function declarations. */
29#define YY_USE_PROTOS
30
31/* The "const" storage-class-modifier is valid. */
32#define YY_USE_CONST
33
34#else	/* ! __cplusplus */
35
36#if __STDC__
37
38#define YY_USE_PROTOS
39#define YY_USE_CONST
40
41#endif	/* __STDC__ */
42#endif	/* ! __cplusplus */
43
44#ifdef __TURBOC__
45 #pragma warn -rch
46 #pragma warn -use
47#include <io.h>
48#include <stdlib.h>
49#define YY_USE_CONST
50#define YY_USE_PROTOS
51#endif
52
53#ifdef YY_USE_CONST
54#define yyconst const
55#else
56#define yyconst
57#endif
58
59
60#ifdef YY_USE_PROTOS
61#define YY_PROTO(proto) proto
62#else
63#define YY_PROTO(proto) ()
64#endif
65
66/* Returned upon end-of-file. */
67#define YY_NULL 0
68
69/* Promotes a possibly negative, possibly signed char to an unsigned
70 * integer for use as an array index.  If the signed char is negative,
71 * we want to instead treat it as an 8-bit unsigned char, hence the
72 * double cast.
73 */
74#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
75
76/* Enter a start condition.  This macro really ought to take a parameter,
77 * but we do it the disgusting crufty way forced on us by the ()-less
78 * definition of BEGIN.
79 */
80#define BEGIN yy_start = 1 + 2 *
81
82/* Translate the current start state into a value that can be later handed
83 * to BEGIN to return to the state.  The YYSTATE alias is for lex
84 * compatibility.
85 */
86#define YY_START ((yy_start - 1) / 2)
87#define YYSTATE YY_START
88
89/* Action number for EOF rule of a given start state. */
90#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91
92/* Special action meaning "start processing a new file". */
93#define YY_NEW_FILE yyrestart( yyin )
94
95#define YY_END_OF_BUFFER_CHAR 0
96
97/* Size of default input buffer. */
98#define YY_BUF_SIZE 16384
99
100typedef struct yy_buffer_state *YY_BUFFER_STATE;
101
102extern int yyleng;
103extern FILE *yyin, *yyout;
104
105#define EOB_ACT_CONTINUE_SCAN 0
106#define EOB_ACT_END_OF_FILE 1
107#define EOB_ACT_LAST_MATCH 2
108
109/* The funky do-while in the following #define is used to turn the definition
110 * int a single C statement (which needs a semi-colon terminator).  This
111 * avoids problems with code like:
112 *
113 * 	if ( condition_holds )
114 *		yyless( 5 );
115 *	else
116 *		do_something_else();
117 *
118 * Prior to using the do-while the compiler would get upset at the
119 * "else" because it interpreted the "if" statement as being all
120 * done when it reached the ';' after the yyless() call.
121 */
122
123/* Return all but the first 'n' matched characters back to the input stream. */
124
125#define yyless(n) \
126	do \
127		{ \
128		/* Undo effects of setting up yytext. */ \
129		*yy_cp = yy_hold_char; \
130		YY_RESTORE_YY_MORE_OFFSET \
131		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
132		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
133		} \
134	while ( 0 )
135
136#define unput(c) yyunput( c, yytext_ptr )
137
138/* The following is because we cannot portably get our hands on size_t
139 * (without autoconf's help, which isn't available because we want
140 * flex-generated scanners to compile on their own).
141 */
142typedef unsigned int yy_size_t;
143
144
145struct yy_buffer_state
146	{
147	FILE *yy_input_file;
148
149	char *yy_ch_buf;		/* input buffer */
150	char *yy_buf_pos;		/* current position in input buffer */
151
152	/* Size of input buffer in bytes, not including room for EOB
153	 * characters.
154	 */
155	yy_size_t yy_buf_size;
156
157	/* Number of characters read into yy_ch_buf, not including EOB
158	 * characters.
159	 */
160	int yy_n_chars;
161
162	/* Whether we "own" the buffer - i.e., we know we created it,
163	 * and can xrealloc() it to grow it, and should free() it to
164	 * delete it.
165	 */
166	int yy_is_our_buffer;
167
168	/* Whether this is an "interactive" input source; if so, and
169	 * if we're using stdio for input, then we want to use getc()
170	 * instead of fread(), to make sure we stop fetching input after
171	 * each newline.
172	 */
173	int yy_is_interactive;
174
175	/* Whether we're considered to be at the beginning of a line.
176	 * If so, '^' rules will be active on the next match, otherwise
177	 * not.
178	 */
179	int yy_at_bol;
180
181	/* Whether to try to fill the input buffer when we reach the
182	 * end of it.
183	 */
184	int yy_fill_buffer;
185
186	int yy_buffer_status;
187#define YY_BUFFER_NEW 0
188#define YY_BUFFER_NORMAL 1
189	/* When an EOF's been seen but there's still some text to process
190	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
191	 * shouldn't try reading from the input source any more.  We might
192	 * still have a bunch of tokens to match, though, because of
193	 * possible backing-up.
194	 *
195	 * When we actually see the EOF, we change the status to "new"
196	 * (via yyrestart()), so that the user can continue scanning by
197	 * just pointing yyin at a new input file.
198	 */
199#define YY_BUFFER_EOF_PENDING 2
200	};
201
202static YY_BUFFER_STATE yy_current_buffer = 0;
203
204/* We provide macros for accessing buffer states in case in the
205 * future we want to put the buffer states in a more general
206 * "scanner state".
207 */
208#define YY_CURRENT_BUFFER yy_current_buffer
209
210
211/* yy_hold_char holds the character lost when yytext is formed. */
212static char yy_hold_char;
213
214static int yy_n_chars;		/* number of characters read into yy_ch_buf */
215
216
217int yyleng;
218
219/* Points to current character in buffer. */
220static char *yy_c_buf_p = (char *) 0;
221static int yy_init = 1;		/* whether we need to initialize */
222static int yy_start = 0;	/* start state number */
223
224/* Flag which is used to allow yywrap()'s to do buffer switches
225 * instead of setting up a fresh yyin.  A bit of a hack ...
226 */
227static int yy_did_buffer_switch_on_eof;
228
229void yyrestart YY_PROTO(( FILE *input_file ));
230
231void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
232void yy_load_buffer_state YY_PROTO(( void ));
233YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
234void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
235void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
236void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
237#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238
239YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
240YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
241YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
242
243static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
244static void *yyxrealloc YY_PROTO(( void *, yy_size_t ));
245static void yy_flex_free YY_PROTO(( void * ));
246
247#define yy_new_buffer yy_create_buffer
248
249#define yy_set_interactive(is_interactive) \
250	{ \
251	if ( ! yy_current_buffer ) \
252		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
253	yy_current_buffer->yy_is_interactive = is_interactive; \
254	}
255
256#define yy_set_bol(at_bol) \
257	{ \
258	if ( ! yy_current_buffer ) \
259		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
260	yy_current_buffer->yy_at_bol = at_bol; \
261	}
262
263#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
264
265typedef unsigned char YY_CHAR;
266FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
267typedef int yy_state_type;
268extern char *yytext;
269#define yytext_ptr yytext
270
271static yy_state_type yy_get_previous_state YY_PROTO(( void ));
272static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
273static int yy_get_next_buffer YY_PROTO(( void ));
274static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
275
276/* Done after the current pattern has been matched and before the
277 * corresponding action - sets up yytext.
278 */
279#define YY_DO_BEFORE_ACTION \
280	yytext_ptr = yy_bp; \
281	yyleng = (int) (yy_cp - yy_bp); \
282	yy_hold_char = *yy_cp; \
283	*yy_cp = '\0'; \
284	yy_c_buf_p = yy_cp;
285
286#define YY_NUM_RULES 51
287#define YY_END_OF_BUFFER 52
288static yyconst short int yy_accept[182] =
289    {   0,
290        0,    0,    0,    0,   52,   50,    1,    1,   15,   49,
291       39,   50,   41,   42,   39,   40,   39,   39,   39,    4,
292        4,   39,   39,   39,   39,   48,   45,   45,   45,   45,
293       45,   45,   45,   45,   45,   45,   38,    0,   14,    0,
294       49,    0,    0,    0,    0,    0,    0,    0,   33,    2,
295        0,   32,    0,   44,   44,   35,    0,    0,    4,    0,
296        0,   47,   34,   36,    0,   31,   37,    0,    0,   45,
297        0,   45,   45,   45,   45,   16,   20,   45,   45,   45,
298       45,   25,   45,   45,   45,   45,    0,   14,    0,   12,
299       12,    0,   30,    2,    0,   44,   44,    0,    9,    0,
300
301        3,    7,    0,   45,    0,    0,    0,   45,   17,   18,
302       45,   21,   22,   23,   45,   45,   27,   45,   29,    0,
303        0,    0,    0,    0,    0,   44,   43,    6,    0,    0,
304        9,    0,    3,    0,    0,    0,    0,    0,    0,    0,
305        0,    0,    0,    0,    0,   45,   19,   24,   45,   28,
306        0,   46,    0,    0,    0,    0,   45,    0,    0,    0,
307        0,    0,    0,    0,   45,    0,    0,    5,   11,    0,
308        8,   26,    0,    5,    0,    8,   13,    0,   10,   10,
309        0
310    } ;
311
312static yyconst int yy_ec[256] =
313    {   0,
314        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
315        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
316        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
317        1,    4,    5,    6,    7,    8,    5,    9,   10,   11,
318       12,   13,   14,   15,   16,   17,   18,   19,   20,   20,
319       20,   20,   20,   20,   20,   20,   20,   21,   22,   23,
320       24,   25,    5,   26,   30,   31,   32,   33,   34,   35,
321       36,   37,   38,   36,   36,   39,   40,   41,   42,   36,
322       36,   43,   44,   45,   46,   36,   47,   48,   36,   36,
323       27,    5,   28,    5,   29,    5,   30,   31,   32,   33,
324
325       34,   35,   36,   37,   38,   36,   36,   39,   40,   41,
326       42,   36,   36,   43,   44,   45,   46,   36,   47,   48,
327       36,   36,   26,   22,   26,    5,    1,    1,    1,    1,
328        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
329        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
330        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
331        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
332        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
333        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
334        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
335
336        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
337        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
338        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
339        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
340        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
341        1,    1,    1,    1,    1
342    } ;
343
344static yyconst int yy_meta[49] =
345    {   0,
346        1,    2,    3,    4,    5,    6,    7,    8,    5,    9,
347        5,    5,    5,    5,    5,    5,   10,    5,   11,   11,
348        5,    5,   12,   13,   14,    5,    5,    5,   15,   16,
349       16,   16,   16,   16,   16,   17,   17,   17,   17,   17,
350       17,   17,   17,   17,   17,   17,   17,   17
351    } ;
352
353static yyconst short int yy_base[203] =
354    {   0,
355        0,    0,  575,  568,  573,  712,  712,  712,   43,    0,
356      712,   70,  712,  712,  559,  712,  554,  117,  544,  116,
357      122,   29,  543,  541,  541,  712,   52,  150,   20,   91,
358       26,  124,  118,   96,  107,  131,  191,  119,  712,  151,
359        0,  238,  554,  546,  545,  543,   54,  277,  712,    0,
360      324,  712,    0,    0,  495,  712,    0,   46,  323,  155,
361        0,  712,  712,  712,  508,  712,  712,  184,  241,  712,
362      330,  148,  215,  149,  216,  221,  222,  257,  258,  261,
363      262,  223,  224,  298,  263,  315,  522,  525,  346,  357,
364      712,  360,  511,    0,  485,    0,  469,  328,  343,  157,
365
366      345,    0,  479,  366,  382,  397,    0,  397,  340,  356,
367      378,  367,  385,  387,  392,  401,  393,  405,  410,  490,
368        0,  445,  450,  448,  431,  712,    0,  418,    0,  436,
369      435,  169,  441,  444,  118,  243,  331,  438,  432,  383,
370      375,  361,  362,  347,  357,  455,  443,  444,  445,  446,
371      338,  712,  345,  475,  337,  276,  488,  287,  267,  258,
372      221,  210,  141,  146,  462,  140,  383,  480,  109,  121,
373      482,  466,   42,  493,  359,  495,  514,  410,  500,  507,
374      712,  533,  543,  559,  564,  580,  597,  600,  607,   47,
375      512,  614,  630,  642,  648,  659,  661,  677,  514,  541,
376
377      684,  695
378    } ;
379
380static yyconst short int yy_def[203] =
381    {   0,
382      181,    1,    1,    1,  181,  181,  181,  181,  182,  183,
383      181,  181,  181,  181,  181,  181,  181,  184,  181,  181,
384      181,  181,  185,  181,  181,  181,  186,  186,   28,   28,
385       28,   28,   28,   28,   28,   28,  181,  182,  181,  182,
386      183,   37,   37,   37,   42,  181,   42,   42,  181,  187,
387      184,  181,  188,  189,  189,  181,  190,  181,  181,  181,
388      191,  181,  181,  181,  192,  181,  181,  181,  181,  181,
389      193,   28,   28,   28,   28,   28,   28,   28,   28,   28,
390       28,   28,   28,   28,   28,   28,   48,  194,  181,  181,
391      181,   42,   48,  187,  195,  189,  189,  196,  181,  181,
392
393      181,  191,  192,  181,  193,  181,  197,  198,   28,   28,
394       28,   28,   28,   28,   28,   28,   28,   28,   28,  181,
395      199,  181,  181,   42,  195,  181,  189,  181,  200,  196,
396      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
397      181,  181,  181,  181,  201,  198,   28,   28,   28,   28,
398      181,  181,   42,  181,  202,  181,  181,  181,  181,  181,
399      181,  181,  181,  201,   28,   42,  181,  181,  181,  202,
400      181,   28,   42,  181,  181,  181,  181,  181,  181,  181,
401        0,  181,  181,  181,  181,  181,  181,  181,  181,  181,
402      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
403
404      181,  181
405    } ;
406
407static yyconst short int yy_nxt[761] =
408    {   0,
409        6,    7,    8,    7,    6,    9,    6,   10,   11,   12,
410       13,   14,   15,   11,   16,   17,   18,   19,   20,   21,
411       22,   11,   23,   24,   25,   26,   11,   11,   27,   28,
412       27,   27,   27,   29,   27,   27,   27,   30,   27,   31,
413       32,   33,   34,   27,   35,   27,   27,   36,   39,   62,
414       72,  177,   63,   68,   68,   69,   72,   98,   75,   92,
415       72,   70,   98,   90,   99,   99,   72,   78,   71,   40,
416       42,   43,   43,   44,   45,   45,   45,   45,   45,   46,
417       45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
418       45,   45,   45,   45,   45,   45,   47,   45,   45,   48,
419
420       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
421       48,   48,   48,   48,   48,   48,   48,   48,   51,   51,
422       51,   72,   57,  157,   39,   76,   72,  169,   57,   84,
423      134,   77,   58,   52,   59,   59,   72,   72,   58,   53,
424       59,   59,  175,   85,   59,   40,   55,   72,   72,   60,
425       59,   68,   68,   69,   72,   60,   88,   79,   72,   70,
426       82,   72,   83,   61,   72,   80,   71,  173,  100,   81,
427      157,   72,   86,  101,  101,  101,  101,   40,   72,   72,
428       73,  110,  156,  134,  156,   68,   68,   68,   72,   72,
429       74,   42,   43,   43,   43,   42,   42,   42,   42,   42,
430
431       71,   42,   42,   42,   42,   42,   42,   42,   42,   42,
432       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
433       87,   87,   87,   87,   87,   87,   87,   87,   87,   87,
434       87,   87,   87,   87,   87,   87,   87,   87,   87,   42,
435       42,   42,   68,   68,   69,   72,   72,   89,  157,  134,
436       70,   72,   72,   72,   72,   72,   72,   71,  109,  111,
437      116,   72,   72,   72,   72,  134,  134,   42,   42,   42,
438       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
439       42,   42,   42,   42,   42,   42,   90,   72,   72,  112,
440      134,   72,   72,   72,  171,  171,  118,   72,   72,  134,
441
442      115,   72,   72,   72,  113,  114,   93,   93,   93,   93,
443       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
444       93,   93,   93,   93,   93,   51,   51,   51,   72,   57,
445      134,  105,  105,  105,  128,  106,  157,  117,   72,   58,
446      181,   59,   59,  169,  129,   72,   53,  122,  122,  122,
447      166,   59,  107,   55,  134,   72,   60,  119,  122,  122,
448      122,  131,  131,  133,  133,   38,  123,   68,   68,   69,
449       72,  131,  178,  133,  178,   70,  132,  123,  124,  124,
450       72,  157,   71,  105,  105,  105,   72,  106,  163,  124,
451      124,  124,  124,  124,  124,  162,   72,   72,   68,   68,
452
453       69,  168,  168,  134,  107,  134,   70,   72,   72,  135,
454      134,  147,  134,   71,  136,   72,  161,   72,   72,  137,
455      134,  138,   72,   72,  160,   72,  139,   72,  179,  179,
456      148,   72,   72,   72,  149,   72,  140,  141,  142,  143,
457       72,   72,  128,  157,  144,  150,  122,  122,  122,  157,
458       72,  154,  129,  131,  131,  126,   68,   68,   69,  133,
459      133,  134,  158,  131,   70,  123,  153,  153,  132,  133,
460      152,   71,  159,   72,   72,   72,   72,  153,  153,  153,
461      153,  153,  153,   72,   72,   72,   72,  165,  167,   68,
462       68,   69,   72,  168,  168,  151,   72,   70,  174,  174,
463
464      176,  176,   72,  104,   71,  172,   72,  127,  174,  126,
465      176,  174,  174,  176,  176,  122,  122,  122,  180,  180,
466       89,  174,  102,  176,  120,  180,  180,  102,  180,  120,
467      120,   89,  104,   97,  123,  180,   38,   38,   38,   38,
468       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
469       41,  155,   91,   41,   90,   90,  155,   41,   41,   41,
470       54,   54,   54,   89,   67,   66,   64,   56,   54,   50,
471       54,   49,  181,   54,   54,   54,   65,   37,   65,   65,
472       65,   72,   72,   72,   37,  181,  181,  181,   72,   72,
473       72,  181,  181,  181,   72,   72,   72,   94,   94,  181,
474
475       94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
476       94,   94,   94,   94,   95,   95,   95,   96,  181,  181,
477      181,   96,   96,   96,  103,  181,  181,  103,  103,  103,
478      103,  108,  108,  108,  181,  108,  181,  181,  181,  181,
479      181,  108,  181,  181,  108,  108,  108,  121,  181,  181,
480      181,  181,  121,  181,  181,  181,  181,  121,  125,  181,
481      181,  125,  125,  125,  125,  130,  181,  181,  130,  130,
482      181,  181,  181,  130,  130,  145,  145,  145,  146,  146,
483      146,  181,  181,  181,  181,  146,  146,  146,  181,  181,
484      181,  146,  146,  146,  164,  181,  181,  164,  164,  164,
485
486      164,  170,  181,  181,  181,  170,  181,  181,  181,  170,
487      170,    5,  181,  181,  181,  181,  181,  181,  181,  181,
488      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
489      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
490      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
491      181,  181,  181,  181,  181,  181,  181,  181,  181,  181
492    } ;
493
494static yyconst short int yy_chk[761] =
495    {   0,
496        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
497        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
498        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
499        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
500        1,    1,    1,    1,    1,    1,    1,    1,    9,   22,
501       29,  173,   22,   27,   27,   27,   31,  190,   29,   47,
502       29,   27,  190,   47,   58,   58,   31,   31,   27,    9,
503       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
504       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
505       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
506
507       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
508       12,   12,   12,   12,   12,   12,   12,   12,   18,   18,
509       18,   30,   20,  135,   38,   30,   34,  170,   21,   34,
510      135,   30,   20,   18,   20,   20,   34,   35,   21,   18,
511       21,   21,  169,   35,   20,   38,   18,   35,   33,   20,
512       21,   28,   28,   28,   32,   21,   40,   32,   33,   28,
513       33,   36,   33,   20,   32,   32,   28,  166,   60,   32,
514      164,   36,   36,   60,   60,  100,  100,   40,   72,   74,
515       28,   74,  132,  163,  132,   68,   68,   68,   72,   74,
516       28,   37,   37,   37,   37,   37,   37,   37,   37,   37,
517
518       68,   37,   37,   37,   37,   37,   37,   37,   37,   37,
519       37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
520       37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
521       37,   37,   37,   37,   37,   37,   37,   37,   37,   42,
522       42,   42,   69,   69,   69,   73,   75,   42,  136,  162,
523       69,   76,   77,   82,   83,   73,   75,   69,   73,   75,
524       83,   76,   77,   82,   83,  161,  136,   42,   42,   42,
525       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
526       42,   42,   42,   42,   42,   42,   48,   78,   79,   78,
527      160,   80,   81,   85,  156,  156,   85,   78,   79,  159,
528
529       81,   80,   81,   85,   79,   80,   48,   48,   48,   48,
530       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
531       48,   48,   48,   48,   48,   51,   51,   51,   84,   59,
532      158,   71,   71,   71,   98,   71,  137,   84,   84,   59,
533       51,   59,   59,  155,   98,   86,   51,   89,   89,   89,
534      153,   59,   71,   51,  137,   86,   59,   86,   90,   90,
535       90,   99,   99,  101,  101,  151,   89,  104,  104,  104,
536      109,   99,  175,  101,  175,  104,   99,   90,   92,   92,
537      109,  145,  104,  105,  105,  105,  110,  105,  144,   92,
538       92,   92,   92,   92,   92,  143,  110,  112,  108,  108,
539
540      108,  167,  167,  142,  105,  106,  108,  112,  111,  106,
541      106,  111,  106,  108,  106,  113,  141,  114,  111,  106,
542      106,  106,  115,  117,  140,  113,  106,  114,  178,  178,
543      115,  116,  115,  117,  116,  118,  106,  106,  106,  106,
544      119,  116,  130,  138,  106,  118,  122,  122,  122,  134,
545      119,  128,  130,  131,  131,  125,  146,  146,  146,  133,
546      133,  138,  139,  131,  146,  122,  124,  124,  131,  133,
547      123,  146,  139,  147,  148,  149,  150,  124,  124,  124,
548      124,  124,  124,  147,  148,  149,  150,  149,  154,  157,
549      157,  157,  165,  154,  154,  120,  172,  157,  168,  168,
550
551      171,  171,  165,  103,  157,  165,  172,   97,  168,   95,
552      171,  174,  174,  176,  176,  177,  177,  177,  179,  179,
553       93,  174,  191,  176,  199,  180,  180,  191,  179,  199,
554       88,   87,   65,   55,  177,  180,  182,  182,  182,  182,
555      182,  182,  182,  182,  182,  182,  182,  182,  182,  182,
556      183,  200,   46,  183,   45,   44,  200,  183,  183,  183,
557      184,  184,  184,   43,   25,   24,   23,   19,  184,   17,
558      184,   15,    5,  184,  184,  184,  185,    4,  185,  185,
559      185,  186,  186,  186,    3,    0,    0,    0,  186,  186,
560      186,    0,    0,    0,  186,  186,  186,  187,  187,    0,
561
562      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
563      187,  187,  187,  187,  188,  188,  188,  189,    0,    0,
564        0,  189,  189,  189,  192,    0,    0,  192,  192,  192,
565      192,  193,  193,  193,    0,  193,    0,    0,    0,    0,
566        0,  193,    0,    0,  193,  193,  193,  194,    0,    0,
567        0,    0,  194,    0,    0,    0,    0,  194,  195,    0,
568        0,  195,  195,  195,  195,  196,    0,    0,  196,  196,
569        0,    0,    0,  196,  196,  197,  197,  197,  198,  198,
570      198,    0,    0,    0,    0,  198,  198,  198,    0,    0,
571        0,  198,  198,  198,  201,    0,    0,  201,  201,  201,
572
573      201,  202,    0,    0,    0,  202,    0,    0,    0,  202,
574      202,  181,  181,  181,  181,  181,  181,  181,  181,  181,
575      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
576      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
577      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
578      181,  181,  181,  181,  181,  181,  181,  181,  181,  181
579    } ;
580
581static yy_state_type yy_last_accepting_state;
582static char *yy_last_accepting_cpos;
583
584/* The intent behind this definition is that it'll catch
585 * any uses of REJECT which flex missed.
586 */
587#define REJECT reject_used_but_not_detected
588#define yymore() yymore_used_but_not_detected
589#define YY_MORE_ADJ 0
590#define YY_RESTORE_YY_MORE_OFFSET
591char *yytext;
592#line 1 "ada-lex.l"
593#define INITIAL 0
594/* FLEX lexer for Ada expressions, for GDB.
595   Copyright (C) 1994, 1997, 1998, 2000, 2001, 2002, 2003, 2007
596   Free Software Foundation, Inc.
597
598This file is part of GDB.
599
600This program is free software; you can redistribute it and/or modify
601it under the terms of the GNU General Public License as published by
602the Free Software Foundation; either version 2 of the License, or
603(at your option) any later version.
604
605This program is distributed in the hope that it will be useful,
606but WITHOUT ANY WARRANTY; without even the implied warranty of
607MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
608GNU General Public License for more details.
609
610You should have received a copy of the GNU General Public License
611along with this program; if not, write to the Free Software
612Foundation, Inc., 51 Franklin Street, Fifth Floor,
613Boston, MA 02110-1301, USA.  */
614/*----------------------------------------------------------------------*/
615/* The converted version of this file is to be included in ada-exp.y, */
616/* the Ada parser for gdb.  The function yylex obtains characters from */
617/* the global pointer lexptr.  It returns a syntactic category for */
618/* each successive token and places a semantic value into yylval */
619/* (ada-lval), defined by the parser.   */
620#line 46 "ada-lex.l"
621
622#define NUMERAL_WIDTH 256
623#define LONGEST_SIGN ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1))
624
625/* Temporary staging for numeric literals.  */
626static char numbuf[NUMERAL_WIDTH];
627 static void canonicalizeNumeral (char *s1, const char *);
628static struct stoken processString (const char*, int);
629static int processInt (const char *, const char *, const char *);
630static int processReal (const char *);
631static struct stoken processId (const char *, int);
632static int processAttribute (const char *);
633static int find_dot_all (const char *);
634
635#undef YY_DECL
636#define YY_DECL static int yylex ( void )
637
638#undef YY_INPUT
639#define YY_INPUT(BUF, RESULT, MAX_SIZE) \
640    if ( *lexptr == '\000' ) \
641      (RESULT) = YY_NULL; \
642    else \
643      { \
644        *(BUF) = *lexptr; \
645        (RESULT) = 1; \
646	lexptr += 1; \
647      }
648
649static int find_dot_all (const char *);
650
651#define BEFORE_QUAL_QUOTE 1
652
653#line 654 "ada-lex.c"
654
655/* Macros after this point can all be overridden by user definitions in
656 * section 1.
657 */
658
659#ifndef YY_SKIP_YYWRAP
660#ifdef __cplusplus
661extern "C" int yywrap YY_PROTO(( void ));
662#else
663extern int yywrap YY_PROTO(( void ));
664#endif
665#endif
666
667#ifndef YY_NO_UNPUT
668static void yyunput YY_PROTO(( int c, char *buf_ptr ));
669#endif
670
671#ifndef yytext_ptr
672static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
673#endif
674
675#ifdef YY_NEED_STRLEN
676static int yy_flex_strlen YY_PROTO(( yyconst char * ));
677#endif
678
679#ifndef YY_NO_INPUT
680#ifdef __cplusplus
681static int yyinput YY_PROTO(( void ));
682#else
683static int input YY_PROTO(( void ));
684#endif
685#endif
686
687#if YY_STACK_USED
688static int yy_start_stack_ptr = 0;
689static int yy_start_stack_depth = 0;
690static int *yy_start_stack = 0;
691#ifndef YY_NO_PUSH_STATE
692static void yy_push_state YY_PROTO(( int new_state ));
693#endif
694#ifndef YY_NO_POP_STATE
695static void yy_pop_state YY_PROTO(( void ));
696#endif
697#ifndef YY_NO_TOP_STATE
698static int yy_top_state YY_PROTO(( void ));
699#endif
700
701#else
702#define YY_NO_PUSH_STATE 1
703#define YY_NO_POP_STATE 1
704#define YY_NO_TOP_STATE 1
705#endif
706
707#ifdef YY_MALLOC_DECL
708YY_MALLOC_DECL
709#else
710#if __STDC__
711#ifndef __cplusplus
712#include <stdlib.h>
713#endif
714#else
715/* Just try to get by without declaring the routines.  This will fail
716 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
717 * or sizeof(void*) != sizeof(int).
718 */
719#endif
720#endif
721
722/* Amount of stuff to slurp up with each read. */
723#ifndef YY_READ_BUF_SIZE
724#define YY_READ_BUF_SIZE 8192
725#endif
726
727/* Copy whatever the last rule matched to the standard output. */
728
729#ifndef ECHO
730/* This used to be an fputs(), but since the string might contain NUL's,
731 * we now use fwrite().
732 */
733#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
734#endif
735
736/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
737 * is returned in "result".
738 */
739#ifndef YY_INPUT
740#define YY_INPUT(buf,result,max_size) \
741	if ( yy_current_buffer->yy_is_interactive ) \
742		{ \
743		int c = '*', n; \
744		for ( n = 0; n < max_size && \
745			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
746			buf[n] = (char) c; \
747		if ( c == '\n' ) \
748			buf[n++] = (char) c; \
749		if ( c == EOF && ferror( yyin ) ) \
750			YY_FATAL_ERROR( "input in flex scanner failed" ); \
751		result = n; \
752		} \
753	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
754		  && ferror( yyin ) ) \
755		YY_FATAL_ERROR( "input in flex scanner failed" );
756#endif
757
758/* No semi-colon after return; correct usage is to write "yyterminate();" -
759 * we don't want an extra ';' after the "return" because that will cause
760 * some compilers to complain about unreachable statements.
761 */
762#ifndef yyterminate
763#define yyterminate() return YY_NULL
764#endif
765
766/* Number of entries by which start-condition stack grows. */
767#ifndef YY_START_STACK_INCR
768#define YY_START_STACK_INCR 25
769#endif
770
771/* Report a fatal error. */
772#ifndef YY_FATAL_ERROR
773#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
774#endif
775
776/* Default declaration of generated scanner - a define so the user can
777 * easily add parameters.
778 */
779#ifndef YY_DECL
780#define YY_DECL int yylex YY_PROTO(( void ))
781#endif
782
783/* Code executed at the beginning of each rule, after yytext and yyleng
784 * have been set up.
785 */
786#ifndef YY_USER_ACTION
787#define YY_USER_ACTION
788#endif
789
790/* Code executed at the end of each rule. */
791#ifndef YY_BREAK
792#define YY_BREAK break;
793#endif
794
795#define YY_RULE_SETUP \
796	YY_USER_ACTION
797
798YY_DECL
799	{
800	register yy_state_type yy_current_state;
801	register char *yy_cp = NULL, *yy_bp = NULL;
802	register int yy_act;
803
804#line 82 "ada-lex.l"
805
806
807#line 808 "ada-lex.c"
808
809	if ( yy_init )
810		{
811		yy_init = 0;
812
813#ifdef YY_USER_INIT
814		YY_USER_INIT;
815#endif
816
817		if ( ! yy_start )
818			yy_start = 1;	/* first start state */
819
820		if ( ! yyin )
821			yyin = stdin;
822
823		if ( ! yyout )
824			yyout = stdout;
825
826		if ( ! yy_current_buffer )
827			yy_current_buffer =
828				yy_create_buffer( yyin, YY_BUF_SIZE );
829
830		yy_load_buffer_state();
831		}
832
833	while ( 1 )		/* loops until end-of-file is reached */
834		{
835		yy_cp = yy_c_buf_p;
836
837		/* Support of yytext. */
838		*yy_cp = yy_hold_char;
839
840		/* yy_bp points to the position in yy_ch_buf of the start of
841		 * the current run.
842		 */
843		yy_bp = yy_cp;
844
845		yy_current_state = yy_start;
846yy_match:
847		do
848			{
849			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
850			if ( yy_accept[yy_current_state] )
851				{
852				yy_last_accepting_state = yy_current_state;
853				yy_last_accepting_cpos = yy_cp;
854				}
855			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
856				{
857				yy_current_state = (int) yy_def[yy_current_state];
858				if ( yy_current_state >= 182 )
859					yy_c = yy_meta[(unsigned int) yy_c];
860				}
861			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
862			++yy_cp;
863			}
864		while ( yy_base[yy_current_state] != 712 );
865
866yy_find_action:
867		yy_act = yy_accept[yy_current_state];
868		if ( yy_act == 0 )
869			{ /* have to back up */
870			yy_cp = yy_last_accepting_cpos;
871			yy_current_state = yy_last_accepting_state;
872			yy_act = yy_accept[yy_current_state];
873			}
874
875		YY_DO_BEFORE_ACTION;
876
877
878do_action:	/* This label is used only to access EOF actions. */
879
880
881		switch ( yy_act )
882	{ /* beginning of action switch */
883			case 0: /* must back up */
884			/* undo the effects of YY_DO_BEFORE_ACTION */
885			*yy_cp = yy_hold_char;
886			yy_cp = yy_last_accepting_cpos;
887			yy_current_state = yy_last_accepting_state;
888			goto yy_find_action;
889
890case 1:
891YY_RULE_SETUP
892#line 84 "ada-lex.l"
893{ }
894	YY_BREAK
895case 2:
896YY_RULE_SETUP
897#line 86 "ada-lex.l"
898{ yyterminate(); }
899	YY_BREAK
900case 3:
901YY_RULE_SETUP
902#line 88 "ada-lex.l"
903{
904		   canonicalizeNumeral (numbuf, yytext);
905		   return processInt (NULL, numbuf, strrchr(numbuf, 'e')+1);
906		 }
907	YY_BREAK
908case 4:
909YY_RULE_SETUP
910#line 93 "ada-lex.l"
911{
912		   canonicalizeNumeral (numbuf, yytext);
913		   return processInt (NULL, numbuf, NULL);
914		 }
915	YY_BREAK
916case 5:
917YY_RULE_SETUP
918#line 98 "ada-lex.l"
919{
920		   canonicalizeNumeral (numbuf, yytext);
921    		   return processInt (numbuf,
922				      strchr (numbuf, '#') + 1,
923				      strrchr(numbuf, '#') + 1);
924		 }
925	YY_BREAK
926case 6:
927YY_RULE_SETUP
928#line 105 "ada-lex.l"
929{
930		   canonicalizeNumeral (numbuf, yytext);
931    		   return processInt (numbuf, strchr (numbuf, '#') + 1, NULL);
932		 }
933	YY_BREAK
934case 7:
935YY_RULE_SETUP
936#line 110 "ada-lex.l"
937{
938		  canonicalizeNumeral (numbuf, yytext+2);
939		  return processInt ("16#", numbuf, NULL);
940		}
941	YY_BREAK
942case 8:
943YY_RULE_SETUP
944#line 116 "ada-lex.l"
945{
946		   canonicalizeNumeral (numbuf, yytext);
947		   return processReal (numbuf);
948		}
949	YY_BREAK
950case 9:
951YY_RULE_SETUP
952#line 121 "ada-lex.l"
953{
954		   canonicalizeNumeral (numbuf, yytext);
955		   return processReal (numbuf);
956		}
957	YY_BREAK
958case 10:
959YY_RULE_SETUP
960#line 126 "ada-lex.l"
961{
962                   error (_("Based real literals not implemented yet."));
963		}
964	YY_BREAK
965case 11:
966YY_RULE_SETUP
967#line 130 "ada-lex.l"
968{
969                   error (_("Based real literals not implemented yet."));
970		}
971	YY_BREAK
972case 12:
973YY_RULE_SETUP
974#line 134 "ada-lex.l"
975{
976		   yylval.typed_val.type = type_char ();
977		   yylval.typed_val.val = yytext[1];
978		   return CHARLIT;
979		}
980	YY_BREAK
981case 13:
982YY_RULE_SETUP
983#line 140 "ada-lex.l"
984{
985                   int v;
986                   yylval.typed_val.type = type_char ();
987		   sscanf (yytext+3, "%2x", &v);
988		   yylval.typed_val.val = v;
989		   return CHARLIT;
990		}
991	YY_BREAK
992case 14:
993YY_RULE_SETUP
994#line 148 "ada-lex.l"
995{
996	           yylval.sval = processString (yytext+1, yyleng-2);
997		   return STRING;
998		}
999	YY_BREAK
1000case 15:
1001YY_RULE_SETUP
1002#line 153 "ada-lex.l"
1003{
1004                   error (_("ill-formed or non-terminated string literal"));
1005		}
1006	YY_BREAK
1007case 16:
1008YY_RULE_SETUP
1009#line 158 "ada-lex.l"
1010{
1011		  while (*lexptr != 'i' && *lexptr != 'I')
1012		    lexptr -= 1;
1013		  yyrestart(NULL);
1014		  return 0;
1015		}
1016	YY_BREAK
1017/* ADA KEYWORDS */
1018case 17:
1019YY_RULE_SETUP
1020#line 167 "ada-lex.l"
1021{ return ABS; }
1022	YY_BREAK
1023case 18:
1024YY_RULE_SETUP
1025#line 168 "ada-lex.l"
1026{ return _AND_; }
1027	YY_BREAK
1028case 19:
1029YY_RULE_SETUP
1030#line 169 "ada-lex.l"
1031{ return ELSE; }
1032	YY_BREAK
1033case 20:
1034YY_RULE_SETUP
1035#line 170 "ada-lex.l"
1036{ return IN; }
1037	YY_BREAK
1038case 21:
1039YY_RULE_SETUP
1040#line 171 "ada-lex.l"
1041{ return MOD; }
1042	YY_BREAK
1043case 22:
1044YY_RULE_SETUP
1045#line 172 "ada-lex.l"
1046{ return NEW; }
1047	YY_BREAK
1048case 23:
1049YY_RULE_SETUP
1050#line 173 "ada-lex.l"
1051{ return NOT; }
1052	YY_BREAK
1053case 24:
1054YY_RULE_SETUP
1055#line 174 "ada-lex.l"
1056{ return NULL_PTR; }
1057	YY_BREAK
1058case 25:
1059YY_RULE_SETUP
1060#line 175 "ada-lex.l"
1061{ return OR; }
1062	YY_BREAK
1063case 26:
1064YY_RULE_SETUP
1065#line 176 "ada-lex.l"
1066{ return OTHERS; }
1067	YY_BREAK
1068case 27:
1069YY_RULE_SETUP
1070#line 177 "ada-lex.l"
1071{ return REM; }
1072	YY_BREAK
1073case 28:
1074YY_RULE_SETUP
1075#line 178 "ada-lex.l"
1076{ return THEN; }
1077	YY_BREAK
1078case 29:
1079YY_RULE_SETUP
1080#line 179 "ada-lex.l"
1081{ return XOR; }
1082	YY_BREAK
1083/* ATTRIBUTES */
1084case 30:
1085YY_RULE_SETUP
1086#line 183 "ada-lex.l"
1087{ return processAttribute (yytext+1); }
1088	YY_BREAK
1089/* PUNCTUATION */
1090case 31:
1091YY_RULE_SETUP
1092#line 187 "ada-lex.l"
1093{ return ARROW; }
1094	YY_BREAK
1095case 32:
1096YY_RULE_SETUP
1097#line 188 "ada-lex.l"
1098{ return DOTDOT; }
1099	YY_BREAK
1100case 33:
1101YY_RULE_SETUP
1102#line 189 "ada-lex.l"
1103{ return STARSTAR; }
1104	YY_BREAK
1105case 34:
1106YY_RULE_SETUP
1107#line 190 "ada-lex.l"
1108{ return ASSIGN; }
1109	YY_BREAK
1110case 35:
1111YY_RULE_SETUP
1112#line 191 "ada-lex.l"
1113{ return NOTEQUAL; }
1114	YY_BREAK
1115case 36:
1116YY_RULE_SETUP
1117#line 192 "ada-lex.l"
1118{ return LEQ; }
1119	YY_BREAK
1120case 37:
1121YY_RULE_SETUP
1122#line 193 "ada-lex.l"
1123{ return GEQ; }
1124	YY_BREAK
1125case 38:
1126YY_RULE_SETUP
1127#line 195 "ada-lex.l"
1128{ BEGIN INITIAL; return '\''; }
1129	YY_BREAK
1130case 39:
1131YY_RULE_SETUP
1132#line 197 "ada-lex.l"
1133{ return yytext[0]; }
1134	YY_BREAK
1135case 40:
1136YY_RULE_SETUP
1137#line 199 "ada-lex.l"
1138{ if (paren_depth == 0 && comma_terminates)
1139		    {
1140		      lexptr -= 1;
1141		      yyrestart(NULL);
1142		      return 0;
1143		    }
1144		  else
1145		    return ',';
1146		}
1147	YY_BREAK
1148case 41:
1149YY_RULE_SETUP
1150#line 209 "ada-lex.l"
1151{ paren_depth += 1; return '('; }
1152	YY_BREAK
1153case 42:
1154YY_RULE_SETUP
1155#line 210 "ada-lex.l"
1156{ if (paren_depth == 0)
1157		    {
1158		      lexptr -= 1;
1159		      yyrestart(NULL);
1160		      return 0;
1161		    }
1162		  else
1163 		    {
1164		      paren_depth -= 1;
1165		      return ')';
1166		    }
1167		}
1168	YY_BREAK
1169case 43:
1170YY_RULE_SETUP
1171#line 223 "ada-lex.l"
1172{ return DOT_ALL; }
1173	YY_BREAK
1174case 44:
1175YY_RULE_SETUP
1176#line 225 "ada-lex.l"
1177{
1178	 	  yylval.sval = processId (yytext+1, yyleng-1);
1179	          return DOT_ID;
1180		}
1181	YY_BREAK
1182case 45:
1183YY_RULE_SETUP
1184#line 230 "ada-lex.l"
1185{
1186                  int all_posn = find_dot_all (yytext);
1187
1188                  if (all_posn == -1 && yytext[yyleng-1] == '\'')
1189		    {
1190		      BEGIN BEFORE_QUAL_QUOTE;
1191		      yyless (yyleng-1);
1192		    }
1193                  else if (all_posn >= 0)
1194		    yyless (all_posn);
1195                  yylval.sval = processId (yytext, yyleng);
1196                  return NAME;
1197               }
1198	YY_BREAK
1199/* GDB EXPRESSION CONSTRUCTS  */
1200case 46:
1201YY_RULE_SETUP
1202#line 247 "ada-lex.l"
1203{
1204                  yyless (yyleng - 2);
1205		  yylval.sval = processId (yytext, yyleng);
1206		  return NAME;
1207		}
1208	YY_BREAK
1209case 47:
1210YY_RULE_SETUP
1211#line 253 "ada-lex.l"
1212{ return COLONCOLON; }
1213	YY_BREAK
1214case 48:
1215YY_RULE_SETUP
1216#line 255 "ada-lex.l"
1217{ return yytext[0]; }
1218	YY_BREAK
1219/* REGISTERS AND GDB CONVENIENCE VARIABLES */
1220case 49:
1221YY_RULE_SETUP
1222#line 259 "ada-lex.l"
1223{
1224		  yylval.sval.ptr = yytext;
1225		  yylval.sval.length = yyleng;
1226		  return SPECIAL_VARIABLE;
1227		}
1228	YY_BREAK
1229/* CATCH-ALL ERROR CASE */
1230case 50:
1231YY_RULE_SETUP
1232#line 267 "ada-lex.l"
1233{ error (_("Invalid character '%s' in expression."), yytext); }
1234	YY_BREAK
1235case 51:
1236YY_RULE_SETUP
1237#line 268 "ada-lex.l"
1238YY_FATAL_ERROR( "flex scanner jammed" );
1239	YY_BREAK
1240#line 1241 "ada-lex.c"
1241case YY_STATE_EOF(INITIAL):
1242case YY_STATE_EOF(BEFORE_QUAL_QUOTE):
1243	yyterminate();
1244
1245	case YY_END_OF_BUFFER:
1246		{
1247		/* Amount of text matched not including the EOB char. */
1248		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1249
1250		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1251		*yy_cp = yy_hold_char;
1252		YY_RESTORE_YY_MORE_OFFSET
1253
1254		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1255			{
1256			/* We're scanning a new file or input source.  It's
1257			 * possible that this happened because the user
1258			 * just pointed yyin at a new source and called
1259			 * yylex().  If so, then we have to assure
1260			 * consistency between yy_current_buffer and our
1261			 * globals.  Here is the right place to do so, because
1262			 * this is the first action (other than possibly a
1263			 * back-up) that will match for the new input source.
1264			 */
1265			yy_n_chars = yy_current_buffer->yy_n_chars;
1266			yy_current_buffer->yy_input_file = yyin;
1267			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1268			}
1269
1270		/* Note that here we test for yy_c_buf_p "<=" to the position
1271		 * of the first EOB in the buffer, since yy_c_buf_p will
1272		 * already have been incremented past the NUL character
1273		 * (since all states make transitions on EOB to the
1274		 * end-of-buffer state).  Contrast this with the test
1275		 * in input().
1276		 */
1277		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1278			{ /* This was really a NUL. */
1279			yy_state_type yy_next_state;
1280
1281			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1282
1283			yy_current_state = yy_get_previous_state();
1284
1285			/* Okay, we're now positioned to make the NUL
1286			 * transition.  We couldn't have
1287			 * yy_get_previous_state() go ahead and do it
1288			 * for us because it doesn't know how to deal
1289			 * with the possibility of jamming (and we don't
1290			 * want to build jamming into it because then it
1291			 * will run more slowly).
1292			 */
1293
1294			yy_next_state = yy_try_NUL_trans( yy_current_state );
1295
1296			yy_bp = yytext_ptr + YY_MORE_ADJ;
1297
1298			if ( yy_next_state )
1299				{
1300				/* Consume the NUL. */
1301				yy_cp = ++yy_c_buf_p;
1302				yy_current_state = yy_next_state;
1303				goto yy_match;
1304				}
1305
1306			else
1307				{
1308				yy_cp = yy_c_buf_p;
1309				goto yy_find_action;
1310				}
1311			}
1312
1313		else switch ( yy_get_next_buffer() )
1314			{
1315			case EOB_ACT_END_OF_FILE:
1316				{
1317				yy_did_buffer_switch_on_eof = 0;
1318
1319				if ( yywrap() )
1320					{
1321					/* Note: because we've taken care in
1322					 * yy_get_next_buffer() to have set up
1323					 * yytext, we can now set up
1324					 * yy_c_buf_p so that if some total
1325					 * hoser (like flex itself) wants to
1326					 * call the scanner after we return the
1327					 * YY_NULL, it'll still work - another
1328					 * YY_NULL will get returned.
1329					 */
1330					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1331
1332					yy_act = YY_STATE_EOF(YY_START);
1333					goto do_action;
1334					}
1335
1336				else
1337					{
1338					if ( ! yy_did_buffer_switch_on_eof )
1339						YY_NEW_FILE;
1340					}
1341				break;
1342				}
1343
1344			case EOB_ACT_CONTINUE_SCAN:
1345				yy_c_buf_p =
1346					yytext_ptr + yy_amount_of_matched_text;
1347
1348				yy_current_state = yy_get_previous_state();
1349
1350				yy_cp = yy_c_buf_p;
1351				yy_bp = yytext_ptr + YY_MORE_ADJ;
1352				goto yy_match;
1353
1354			case EOB_ACT_LAST_MATCH:
1355				yy_c_buf_p =
1356				&yy_current_buffer->yy_ch_buf[yy_n_chars];
1357
1358				yy_current_state = yy_get_previous_state();
1359
1360				yy_cp = yy_c_buf_p;
1361				yy_bp = yytext_ptr + YY_MORE_ADJ;
1362				goto yy_find_action;
1363			}
1364		break;
1365		}
1366
1367	default:
1368		YY_FATAL_ERROR(
1369			"fatal flex scanner internal error--no action found" );
1370	} /* end of action switch */
1371		} /* end of scanning one token */
1372	} /* end of yylex */
1373
1374
1375/* yy_get_next_buffer - try to read in a new buffer
1376 *
1377 * Returns a code representing an action:
1378 *	EOB_ACT_LAST_MATCH -
1379 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1380 *	EOB_ACT_END_OF_FILE - end of file
1381 */
1382
1383static int yy_get_next_buffer()
1384	{
1385	register char *dest = yy_current_buffer->yy_ch_buf;
1386	register char *source = yytext_ptr;
1387	register int number_to_move, i;
1388	int ret_val;
1389
1390	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1391		YY_FATAL_ERROR(
1392		"fatal flex scanner internal error--end of buffer missed" );
1393
1394	if ( yy_current_buffer->yy_fill_buffer == 0 )
1395		{ /* Don't try to fill the buffer, so this is an EOF. */
1396		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1397			{
1398			/* We matched a single character, the EOB, so
1399			 * treat this as a final EOF.
1400			 */
1401			return EOB_ACT_END_OF_FILE;
1402			}
1403
1404		else
1405			{
1406			/* We matched some text prior to the EOB, first
1407			 * process it.
1408			 */
1409			return EOB_ACT_LAST_MATCH;
1410			}
1411		}
1412
1413	/* Try to read more data. */
1414
1415	/* First move last chars to start of buffer. */
1416	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1417
1418	for ( i = 0; i < number_to_move; ++i )
1419		*(dest++) = *(source++);
1420
1421	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1422		/* don't do the read, it's not guaranteed to return an EOF,
1423		 * just force an EOF
1424		 */
1425		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1426
1427	else
1428		{
1429		int num_to_read =
1430			yy_current_buffer->yy_buf_size - number_to_move - 1;
1431
1432		while ( num_to_read <= 0 )
1433			{ /* Not enough room in the buffer - grow it. */
1434#ifdef YY_USES_REJECT
1435			YY_FATAL_ERROR(
1436"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1437#else
1438
1439			/* just a shorter name for the current buffer */
1440			YY_BUFFER_STATE b = yy_current_buffer;
1441
1442			int yy_c_buf_p_offset =
1443				(int) (yy_c_buf_p - b->yy_ch_buf);
1444
1445			if ( b->yy_is_our_buffer )
1446				{
1447				int new_size = b->yy_buf_size * 2;
1448
1449				if ( new_size <= 0 )
1450					b->yy_buf_size += b->yy_buf_size / 8;
1451				else
1452					b->yy_buf_size *= 2;
1453
1454				b->yy_ch_buf = (char *)
1455					/* Include room in for 2 EOB chars. */
1456					yyxrealloc( (void *) b->yy_ch_buf,
1457							 b->yy_buf_size + 2 );
1458				}
1459			else
1460				/* Can't grow it, we don't own it. */
1461				b->yy_ch_buf = 0;
1462
1463			if ( ! b->yy_ch_buf )
1464				YY_FATAL_ERROR(
1465				"fatal error - scanner input buffer overflow" );
1466
1467			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1468
1469			num_to_read = yy_current_buffer->yy_buf_size -
1470						number_to_move - 1;
1471#endif
1472			}
1473
1474		if ( num_to_read > YY_READ_BUF_SIZE )
1475			num_to_read = YY_READ_BUF_SIZE;
1476
1477		/* Read in more data. */
1478		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1479			yy_n_chars, num_to_read );
1480
1481		yy_current_buffer->yy_n_chars = yy_n_chars;
1482		}
1483
1484	if ( yy_n_chars == 0 )
1485		{
1486		if ( number_to_move == YY_MORE_ADJ )
1487			{
1488			ret_val = EOB_ACT_END_OF_FILE;
1489			yyrestart( yyin );
1490			}
1491
1492		else
1493			{
1494			ret_val = EOB_ACT_LAST_MATCH;
1495			yy_current_buffer->yy_buffer_status =
1496				YY_BUFFER_EOF_PENDING;
1497			}
1498		}
1499
1500	else
1501		ret_val = EOB_ACT_CONTINUE_SCAN;
1502
1503	yy_n_chars += number_to_move;
1504	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1505	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1506
1507	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1508
1509	return ret_val;
1510	}
1511
1512
1513/* yy_get_previous_state - get the state just before the EOB char was reached */
1514
1515static yy_state_type yy_get_previous_state()
1516	{
1517	register yy_state_type yy_current_state;
1518	register char *yy_cp;
1519
1520	yy_current_state = yy_start;
1521
1522	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1523		{
1524		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1525		if ( yy_accept[yy_current_state] )
1526			{
1527			yy_last_accepting_state = yy_current_state;
1528			yy_last_accepting_cpos = yy_cp;
1529			}
1530		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1531			{
1532			yy_current_state = (int) yy_def[yy_current_state];
1533			if ( yy_current_state >= 182 )
1534				yy_c = yy_meta[(unsigned int) yy_c];
1535			}
1536		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1537		}
1538
1539	return yy_current_state;
1540	}
1541
1542
1543/* yy_try_NUL_trans - try to make a transition on the NUL character
1544 *
1545 * synopsis
1546 *	next_state = yy_try_NUL_trans( current_state );
1547 */
1548
1549#ifdef YY_USE_PROTOS
1550static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1551#else
1552static yy_state_type yy_try_NUL_trans( yy_current_state )
1553yy_state_type yy_current_state;
1554#endif
1555	{
1556	register int yy_is_jam;
1557	register char *yy_cp = yy_c_buf_p;
1558
1559	register YY_CHAR yy_c = 1;
1560	if ( yy_accept[yy_current_state] )
1561		{
1562		yy_last_accepting_state = yy_current_state;
1563		yy_last_accepting_cpos = yy_cp;
1564		}
1565	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1566		{
1567		yy_current_state = (int) yy_def[yy_current_state];
1568		if ( yy_current_state >= 182 )
1569			yy_c = yy_meta[(unsigned int) yy_c];
1570		}
1571	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1572	yy_is_jam = (yy_current_state == 181);
1573
1574	return yy_is_jam ? 0 : yy_current_state;
1575	}
1576
1577
1578#ifndef YY_NO_UNPUT
1579#ifdef YY_USE_PROTOS
1580static void yyunput( int c, register char *yy_bp )
1581#else
1582static void yyunput( c, yy_bp )
1583int c;
1584register char *yy_bp;
1585#endif
1586	{
1587	register char *yy_cp = yy_c_buf_p;
1588
1589	/* undo effects of setting up yytext */
1590	*yy_cp = yy_hold_char;
1591
1592	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1593		{ /* need to shift things up to make room */
1594		/* +2 for EOB chars. */
1595		register int number_to_move = yy_n_chars + 2;
1596		register char *dest = &yy_current_buffer->yy_ch_buf[
1597					yy_current_buffer->yy_buf_size + 2];
1598		register char *source =
1599				&yy_current_buffer->yy_ch_buf[number_to_move];
1600
1601		while ( source > yy_current_buffer->yy_ch_buf )
1602			*--dest = *--source;
1603
1604		yy_cp += (int) (dest - source);
1605		yy_bp += (int) (dest - source);
1606		yy_current_buffer->yy_n_chars =
1607			yy_n_chars = yy_current_buffer->yy_buf_size;
1608
1609		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1610			YY_FATAL_ERROR( "flex scanner push-back overflow" );
1611		}
1612
1613	*--yy_cp = (char) c;
1614
1615
1616	yytext_ptr = yy_bp;
1617	yy_hold_char = *yy_cp;
1618	yy_c_buf_p = yy_cp;
1619	}
1620#endif	/* ifndef YY_NO_UNPUT */
1621
1622
1623#ifndef YY_NO_INPUT
1624#ifdef __cplusplus
1625static int yyinput()
1626#else
1627static int input()
1628#endif
1629	{
1630	int c;
1631
1632	*yy_c_buf_p = yy_hold_char;
1633
1634	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1635		{
1636		/* yy_c_buf_p now points to the character we want to return.
1637		 * If this occurs *before* the EOB characters, then it's a
1638		 * valid NUL; if not, then we've hit the end of the buffer.
1639		 */
1640		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1641			/* This was really a NUL. */
1642			*yy_c_buf_p = '\0';
1643
1644		else
1645			{ /* need more input */
1646			int offset = yy_c_buf_p - yytext_ptr;
1647			++yy_c_buf_p;
1648
1649			switch ( yy_get_next_buffer() )
1650				{
1651				case EOB_ACT_LAST_MATCH:
1652					/* This happens because yy_g_n_b()
1653					 * sees that we've accumulated a
1654					 * token and flags that we need to
1655					 * try matching the token before
1656					 * proceeding.  But for input(),
1657					 * there's no matching to consider.
1658					 * So convert the EOB_ACT_LAST_MATCH
1659					 * to EOB_ACT_END_OF_FILE.
1660					 */
1661
1662					/* Reset buffer status. */
1663					yyrestart( yyin );
1664
1665					/* fall through */
1666
1667				case EOB_ACT_END_OF_FILE:
1668					{
1669					if ( yywrap() )
1670						return EOF;
1671
1672					if ( ! yy_did_buffer_switch_on_eof )
1673						YY_NEW_FILE;
1674#ifdef __cplusplus
1675					return yyinput();
1676#else
1677					return input();
1678#endif
1679					}
1680
1681				case EOB_ACT_CONTINUE_SCAN:
1682					yy_c_buf_p = yytext_ptr + offset;
1683					break;
1684				}
1685			}
1686		}
1687
1688	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
1689	*yy_c_buf_p = '\0';	/* preserve yytext */
1690	yy_hold_char = *++yy_c_buf_p;
1691
1692
1693	return c;
1694	}
1695#endif /* YY_NO_INPUT */
1696
1697#ifdef YY_USE_PROTOS
1698void yyrestart( FILE *input_file )
1699#else
1700void yyrestart( input_file )
1701FILE *input_file;
1702#endif
1703	{
1704	if ( ! yy_current_buffer )
1705		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1706
1707	yy_init_buffer( yy_current_buffer, input_file );
1708	yy_load_buffer_state();
1709	}
1710
1711
1712#ifdef YY_USE_PROTOS
1713void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1714#else
1715void yy_switch_to_buffer( new_buffer )
1716YY_BUFFER_STATE new_buffer;
1717#endif
1718	{
1719	if ( yy_current_buffer == new_buffer )
1720		return;
1721
1722	if ( yy_current_buffer )
1723		{
1724		/* Flush out information for old buffer. */
1725		*yy_c_buf_p = yy_hold_char;
1726		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1727		yy_current_buffer->yy_n_chars = yy_n_chars;
1728		}
1729
1730	yy_current_buffer = new_buffer;
1731	yy_load_buffer_state();
1732
1733	/* We don't actually know whether we did this switch during
1734	 * EOF (yywrap()) processing, but the only time this flag
1735	 * is looked at is after yywrap() is called, so it's safe
1736	 * to go ahead and always set it.
1737	 */
1738	yy_did_buffer_switch_on_eof = 1;
1739	}
1740
1741
1742#ifdef YY_USE_PROTOS
1743void yy_load_buffer_state( void )
1744#else
1745void yy_load_buffer_state()
1746#endif
1747	{
1748	yy_n_chars = yy_current_buffer->yy_n_chars;
1749	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1750	yyin = yy_current_buffer->yy_input_file;
1751	yy_hold_char = *yy_c_buf_p;
1752	}
1753
1754
1755#ifdef YY_USE_PROTOS
1756YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1757#else
1758YY_BUFFER_STATE yy_create_buffer( file, size )
1759FILE *file;
1760int size;
1761#endif
1762	{
1763	YY_BUFFER_STATE b;
1764
1765	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1766	if ( ! b )
1767		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1768
1769	b->yy_buf_size = size;
1770
1771	/* yy_ch_buf has to be 2 characters longer than the size given because
1772	 * we need to put in 2 end-of-buffer characters.
1773	 */
1774	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1775	if ( ! b->yy_ch_buf )
1776		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1777
1778	b->yy_is_our_buffer = 1;
1779
1780	yy_init_buffer( b, file );
1781
1782	return b;
1783	}
1784
1785
1786#ifdef YY_USE_PROTOS
1787void yy_delete_buffer( YY_BUFFER_STATE b )
1788#else
1789void yy_delete_buffer( b )
1790YY_BUFFER_STATE b;
1791#endif
1792	{
1793	if ( ! b )
1794		return;
1795
1796	if ( b == yy_current_buffer )
1797		yy_current_buffer = (YY_BUFFER_STATE) 0;
1798
1799	if ( b->yy_is_our_buffer )
1800		yy_flex_free( (void *) b->yy_ch_buf );
1801
1802	yy_flex_free( (void *) b );
1803	}
1804
1805
1806
1807#ifdef YY_USE_PROTOS
1808void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1809#else
1810void yy_init_buffer( b, file )
1811YY_BUFFER_STATE b;
1812FILE *file;
1813#endif
1814
1815
1816	{
1817	yy_flush_buffer( b );
1818
1819	b->yy_input_file = file;
1820	b->yy_fill_buffer = 1;
1821
1822#if YY_ALWAYS_INTERACTIVE
1823	b->yy_is_interactive = 1;
1824#else
1825#if YY_NEVER_INTERACTIVE
1826	b->yy_is_interactive = 0;
1827#else
1828	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1829#endif
1830#endif
1831	}
1832
1833
1834#ifdef YY_USE_PROTOS
1835void yy_flush_buffer( YY_BUFFER_STATE b )
1836#else
1837void yy_flush_buffer( b )
1838YY_BUFFER_STATE b;
1839#endif
1840
1841	{
1842	if ( ! b )
1843		return;
1844
1845	b->yy_n_chars = 0;
1846
1847	/* We always need two end-of-buffer characters.  The first causes
1848	 * a transition to the end-of-buffer state.  The second causes
1849	 * a jam in that state.
1850	 */
1851	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1852	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1853
1854	b->yy_buf_pos = &b->yy_ch_buf[0];
1855
1856	b->yy_at_bol = 1;
1857	b->yy_buffer_status = YY_BUFFER_NEW;
1858
1859	if ( b == yy_current_buffer )
1860		yy_load_buffer_state();
1861	}
1862
1863
1864#ifndef YY_NO_SCAN_BUFFER
1865#ifdef YY_USE_PROTOS
1866YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1867#else
1868YY_BUFFER_STATE yy_scan_buffer( base, size )
1869char *base;
1870yy_size_t size;
1871#endif
1872	{
1873	YY_BUFFER_STATE b;
1874
1875	if ( size < 2 ||
1876	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
1877	     base[size-1] != YY_END_OF_BUFFER_CHAR )
1878		/* They forgot to leave room for the EOB's. */
1879		return 0;
1880
1881	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1882	if ( ! b )
1883		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1884
1885	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
1886	b->yy_buf_pos = b->yy_ch_buf = base;
1887	b->yy_is_our_buffer = 0;
1888	b->yy_input_file = 0;
1889	b->yy_n_chars = b->yy_buf_size;
1890	b->yy_is_interactive = 0;
1891	b->yy_at_bol = 1;
1892	b->yy_fill_buffer = 0;
1893	b->yy_buffer_status = YY_BUFFER_NEW;
1894
1895	yy_switch_to_buffer( b );
1896
1897	return b;
1898	}
1899#endif
1900
1901
1902#ifndef YY_NO_SCAN_STRING
1903#ifdef YY_USE_PROTOS
1904YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1905#else
1906YY_BUFFER_STATE yy_scan_string( yy_str )
1907yyconst char *yy_str;
1908#endif
1909	{
1910	int len;
1911	for ( len = 0; yy_str[len]; ++len )
1912		;
1913
1914	return yy_scan_bytes( yy_str, len );
1915	}
1916#endif
1917
1918
1919#ifndef YY_NO_SCAN_BYTES
1920#ifdef YY_USE_PROTOS
1921YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1922#else
1923YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1924yyconst char *bytes;
1925int len;
1926#endif
1927	{
1928	YY_BUFFER_STATE b;
1929	char *buf;
1930	yy_size_t n;
1931	int i;
1932
1933	/* Get memory for full buffer, including space for trailing EOB's. */
1934	n = len + 2;
1935	buf = (char *) yy_flex_alloc( n );
1936	if ( ! buf )
1937		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1938
1939	for ( i = 0; i < len; ++i )
1940		buf[i] = bytes[i];
1941
1942	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1943
1944	b = yy_scan_buffer( buf, n );
1945	if ( ! b )
1946		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1947
1948	/* It's okay to grow etc. this buffer, and we should throw it
1949	 * away when we're done.
1950	 */
1951	b->yy_is_our_buffer = 1;
1952
1953	return b;
1954	}
1955#endif
1956
1957
1958#ifndef YY_NO_PUSH_STATE
1959#ifdef YY_USE_PROTOS
1960static void yy_push_state( int new_state )
1961#else
1962static void yy_push_state( new_state )
1963int new_state;
1964#endif
1965	{
1966	if ( yy_start_stack_ptr >= yy_start_stack_depth )
1967		{
1968		yy_size_t new_size;
1969
1970		yy_start_stack_depth += YY_START_STACK_INCR;
1971		new_size = yy_start_stack_depth * sizeof( int );
1972
1973		if ( ! yy_start_stack )
1974			yy_start_stack = (int *) yy_flex_alloc( new_size );
1975
1976		else
1977			yy_start_stack = (int *) yyxrealloc(
1978					(void *) yy_start_stack, new_size );
1979
1980		if ( ! yy_start_stack )
1981			YY_FATAL_ERROR(
1982			"out of memory expanding start-condition stack" );
1983		}
1984
1985	yy_start_stack[yy_start_stack_ptr++] = YY_START;
1986
1987	BEGIN(new_state);
1988	}
1989#endif
1990
1991
1992#ifndef YY_NO_POP_STATE
1993static void yy_pop_state()
1994	{
1995	if ( --yy_start_stack_ptr < 0 )
1996		YY_FATAL_ERROR( "start-condition stack underflow" );
1997
1998	BEGIN(yy_start_stack[yy_start_stack_ptr]);
1999	}
2000#endif
2001
2002
2003#ifndef YY_NO_TOP_STATE
2004static int yy_top_state()
2005	{
2006	return yy_start_stack[yy_start_stack_ptr - 1];
2007	}
2008#endif
2009
2010#ifndef YY_EXIT_FAILURE
2011#define YY_EXIT_FAILURE 2
2012#endif
2013
2014#ifdef YY_USE_PROTOS
2015static void yy_fatal_error( yyconst char msg[] )
2016#else
2017static void yy_fatal_error( msg )
2018char msg[];
2019#endif
2020	{
2021	(void) fprintf( stderr, "%s\n", msg );
2022	exit( YY_EXIT_FAILURE );
2023	}
2024
2025
2026
2027/* Redefine yyless() so it works in section 3 code. */
2028
2029#undef yyless
2030#define yyless(n) \
2031	do \
2032		{ \
2033		/* Undo effects of setting up yytext. */ \
2034		yytext[yyleng] = yy_hold_char; \
2035		yy_c_buf_p = yytext + n; \
2036		yy_hold_char = *yy_c_buf_p; \
2037		*yy_c_buf_p = '\0'; \
2038		yyleng = n; \
2039		} \
2040	while ( 0 )
2041
2042
2043/* Internal utility routines. */
2044
2045#ifndef yytext_ptr
2046#ifdef YY_USE_PROTOS
2047static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2048#else
2049static void yy_flex_strncpy( s1, s2, n )
2050char *s1;
2051yyconst char *s2;
2052int n;
2053#endif
2054	{
2055	register int i;
2056	for ( i = 0; i < n; ++i )
2057		s1[i] = s2[i];
2058	}
2059#endif
2060
2061#ifdef YY_NEED_STRLEN
2062#ifdef YY_USE_PROTOS
2063static int yy_flex_strlen( yyconst char *s )
2064#else
2065static int yy_flex_strlen( s )
2066yyconst char *s;
2067#endif
2068	{
2069	register int n;
2070	for ( n = 0; s[n]; ++n )
2071		;
2072
2073	return n;
2074	}
2075#endif
2076
2077
2078#ifdef YY_USE_PROTOS
2079static void *yy_flex_alloc( yy_size_t size )
2080#else
2081static void *yy_flex_alloc( size )
2082yy_size_t size;
2083#endif
2084	{
2085	return (void *) xmalloc( size );
2086	}
2087
2088#ifdef YY_USE_PROTOS
2089static void *yyxrealloc( void *ptr, yy_size_t size )
2090#else
2091static void *yyxrealloc( ptr, size )
2092void *ptr;
2093yy_size_t size;
2094#endif
2095	{
2096	/* The cast to (char *) in the following accommodates both
2097	 * implementations that use char* generic pointers, and those
2098	 * that use void* generic pointers.  It works with the latter
2099	 * because both ANSI C and C++ allow castless assignment from
2100	 * any pointer type to void*, and deal with argument conversions
2101	 * as though doing an assignment.
2102	 */
2103	return (void *) xrealloc( (char *) ptr, size );
2104	}
2105
2106#ifdef YY_USE_PROTOS
2107static void yy_flex_free( void *ptr )
2108#else
2109static void yy_flex_free( ptr )
2110void *ptr;
2111#endif
2112	{
2113	free( ptr );
2114	}
2115
2116#if YY_MAIN
2117int main()
2118	{
2119	yylex();
2120	return 0;
2121	}
2122#endif
2123#line 268 "ada-lex.l"
2124
2125
2126#include <ctype.h>
2127#include "gdb_string.h"
2128
2129/* Initialize the lexer for processing new expression. */
2130
2131void
2132lexer_init (FILE *inp)
2133{
2134  BEGIN INITIAL;
2135  yyrestart (inp);
2136}
2137
2138
2139/* Copy S2 to S1, removing all underscores, and downcasing all letters.  */
2140
2141static void
2142canonicalizeNumeral (char *s1, const char *s2)
2143{
2144  for (; *s2 != '\000'; s2 += 1)
2145    {
2146      if (*s2 != '_')
2147	{
2148	  *s1 = tolower(*s2);
2149	  s1 += 1;
2150	}
2151    }
2152  s1[0] = '\000';
2153}
2154
2155/* Interprets the prefix of NUM that consists of digits of the given BASE
2156   as an integer of that BASE, with the string EXP as an exponent.
2157   Puts value in yylval, and returns INT, if the string is valid.  Causes
2158   an error if the number is improperly formated.   BASE, if NULL, defaults
2159   to "10", and EXP to "1".  The EXP does not contain a leading 'e' or 'E'.
2160 */
2161
2162static int
2163processInt (const char *base0, const char *num0, const char *exp0)
2164{
2165  ULONGEST result;
2166  long exp;
2167  int base;
2168
2169  char *trailer;
2170
2171  if (base0 == NULL)
2172    base = 10;
2173  else
2174    {
2175      base = strtol (base0, (char **) NULL, 10);
2176      if (base < 2 || base > 16)
2177	error (_("Invalid base: %d."), base);
2178    }
2179
2180  if (exp0 == NULL)
2181    exp = 0;
2182  else
2183    exp = strtol(exp0, (char **) NULL, 10);
2184
2185  errno = 0;
2186  result = strtoulst (num0, (const char **) &trailer, base);
2187  if (errno == ERANGE)
2188    error (_("Integer literal out of range"));
2189  if (isxdigit(*trailer))
2190    error (_("Invalid digit `%c' in based literal"), *trailer);
2191
2192  while (exp > 0)
2193    {
2194      if (result > (ULONG_MAX / base))
2195	error (_("Integer literal out of range"));
2196      result *= base;
2197      exp -= 1;
2198    }
2199
2200  if ((result >> (gdbarch_int_bit (current_gdbarch)-1)) == 0)
2201    yylval.typed_val.type = type_int ();
2202  else if ((result >> (gdbarch_long_bit (current_gdbarch)-1)) == 0)
2203    yylval.typed_val.type = type_long ();
2204  else if (((result >> (gdbarch_long_bit (current_gdbarch)-1)) >> 1) == 0)
2205    {
2206      /* We have a number representable as an unsigned integer quantity.
2207         For consistency with the C treatment, we will treat it as an
2208	 anonymous modular (unsigned) quantity.  Alas, the types are such
2209	 that we need to store .val as a signed quantity.  Sorry
2210         for the mess, but C doesn't officially guarantee that a simple
2211         assignment does the trick (no, it doesn't; read the reference manual).
2212       */
2213      yylval.typed_val.type = builtin_type_unsigned_long;
2214      if (result & LONGEST_SIGN)
2215	yylval.typed_val.val =
2216	  (LONGEST) (result & ~LONGEST_SIGN)
2217	  - (LONGEST_SIGN>>1) - (LONGEST_SIGN>>1);
2218      else
2219	yylval.typed_val.val = (LONGEST) result;
2220      return INT;
2221    }
2222  else
2223    yylval.typed_val.type = type_long_long ();
2224
2225  yylval.typed_val.val = (LONGEST) result;
2226  return INT;
2227}
2228
2229static int
2230processReal (const char *num0)
2231{
2232  sscanf (num0, DOUBLEST_SCAN_FORMAT, &yylval.typed_val_float.dval);
2233
2234  yylval.typed_val_float.type = type_float ();
2235  if (sizeof(DOUBLEST) >= gdbarch_double_bit (current_gdbarch)
2236			    / TARGET_CHAR_BIT)
2237    yylval.typed_val_float.type = type_double ();
2238  if (sizeof(DOUBLEST) >= gdbarch_long_double_bit (current_gdbarch)
2239			    / TARGET_CHAR_BIT)
2240    yylval.typed_val_float.type = type_long_double ();
2241
2242  return FLOAT;
2243}
2244
2245
2246/* Store a canonicalized version of NAME0[0..LEN-1] in yylval.ssym.  The
2247   resulting string is valid until the next call to ada_parse.  It differs
2248   from NAME0 in that:
2249    + Characters between '...' or <...> are transfered verbatim to
2250      yylval.ssym.
2251    + <, >, and trailing "'" characters in quoted sequences are removed
2252      (a leading quote is preserved to indicate that the name is not to be
2253      GNAT-encoded).
2254    + Unquoted whitespace is removed.
2255    + Unquoted alphabetic characters are mapped to lower case.
2256   Result is returned as a struct stoken, but for convenience, the string
2257   is also null-terminated.  Result string valid until the next call of
2258   ada_parse.
2259 */
2260static struct stoken
2261processId (const char *name0, int len)
2262{
2263  char *name = obstack_alloc (&temp_parse_space, len + 11);
2264  int i0, i;
2265  struct stoken result;
2266
2267  while (len > 0 && isspace (name0[len-1]))
2268    len -= 1;
2269  i = i0 = 0;
2270  while (i0 < len)
2271    {
2272      if (isalnum (name0[i0]))
2273	{
2274	  name[i] = tolower (name0[i0]);
2275	  i += 1; i0 += 1;
2276	}
2277      else switch (name0[i0])
2278	{
2279	default:
2280	  name[i] = name0[i0];
2281	  i += 1; i0 += 1;
2282	  break;
2283	case ' ': case '\t':
2284	  i0 += 1;
2285	  break;
2286	case '\'':
2287	  do
2288	    {
2289	      name[i] = name0[i0];
2290	      i += 1; i0 += 1;
2291	    }
2292	  while (i0 < len && name0[i0] != '\'');
2293	  i0 += 1;
2294	  break;
2295	case '<':
2296	  i0 += 1;
2297	  while (i0 < len && name0[i0] != '>')
2298	    {
2299	      name[i] = name0[i0];
2300	      i += 1; i0 += 1;
2301	    }
2302	  i0 += 1;
2303	  break;
2304	}
2305    }
2306  name[i] = '\000';
2307
2308  result.ptr = name;
2309  result.length = i;
2310  return result;
2311}
2312
2313/* Return TEXT[0..LEN-1], a string literal without surrounding quotes,
2314   with special hex character notations replaced with characters.
2315   Result valid until the next call to ada_parse.  */
2316
2317static struct stoken
2318processString (const char *text, int len)
2319{
2320  const char *p;
2321  char *q;
2322  const char *lim = text + len;
2323  struct stoken result;
2324
2325  q = result.ptr = obstack_alloc (&temp_parse_space, len);
2326  p = text;
2327  while (p < lim)
2328    {
2329      if (p[0] == '[' && p[1] == '"' && p+2 < lim)
2330         {
2331           if (p[2] == '"')  /* "...["""]... */
2332             {
2333               *q = '"';
2334	       p += 4;
2335	     }
2336           else
2337	     {
2338               int chr;
2339	       sscanf (p+2, "%2x", &chr);
2340	       *q = (char) chr;
2341	       p += 5;
2342	     }
2343         }
2344       else
2345         *q = *p;
2346       q += 1;
2347       p += 1;
2348     }
2349  result.length = q - result.ptr;
2350  return result;
2351}
2352
2353/* Returns the position within STR of the '.' in a
2354   '.{WHITE}*all' component of a dotted name, or -1 if there is none.
2355   Note: we actually don't need this routine, since 'all' can never be an
2356   Ada identifier.  Thus, looking up foo.all or foo.all.x as a name
2357   must fail, and will eventually be interpreted as (foo).all or
2358   (foo).all.x.  However, this does avoid an extraneous lookup. */
2359
2360static int
2361find_dot_all (const char *str)
2362{
2363  int i;
2364  for (i = 0; str[i] != '\000'; i += 1)
2365    {
2366      if (str[i] == '.')
2367	{
2368	  int i0 = i;
2369	  do
2370	    i += 1;
2371	  while (isspace (str[i]));
2372	  if (strncmp (str+i, "all", 3) == 0
2373	      && ! isalnum (str[i+3]) && str[i+3] != '_')
2374	    return i0;
2375	}
2376    }
2377  return -1;
2378}
2379
2380/* Returns non-zero iff string SUBSEQ matches a subsequence of STR, ignoring
2381   case.  */
2382
2383static int
2384subseqMatch (const char *subseq, const char *str)
2385{
2386  if (subseq[0] == '\0')
2387    return 1;
2388  else if (str[0] == '\0')
2389    return 0;
2390  else if (tolower (subseq[0]) == tolower (str[0]))
2391    return subseqMatch (subseq+1, str+1) || subseqMatch (subseq, str+1);
2392  else
2393    return subseqMatch (subseq, str+1);
2394}
2395
2396
2397static struct { const char *name; int code; }
2398attributes[] = {
2399  { "address", TICK_ADDRESS },
2400  { "unchecked_access", TICK_ACCESS },
2401  { "unrestricted_access", TICK_ACCESS },
2402  { "access", TICK_ACCESS },
2403  { "first", TICK_FIRST },
2404  { "last", TICK_LAST },
2405  { "length", TICK_LENGTH },
2406  { "max", TICK_MAX },
2407  { "min", TICK_MIN },
2408  { "modulus", TICK_MODULUS },
2409  { "pos", TICK_POS },
2410  { "range", TICK_RANGE },
2411  { "size", TICK_SIZE },
2412  { "tag", TICK_TAG },
2413  { "val", TICK_VAL },
2414  { NULL, -1 }
2415};
2416
2417/* Return the syntactic code corresponding to the attribute name or
2418   abbreviation STR.  */
2419
2420static int
2421processAttribute (const char *str)
2422{
2423  int i, k;
2424
2425  for (i = 0; attributes[i].code != -1; i += 1)
2426    if (strcasecmp (str, attributes[i].name) == 0)
2427      return attributes[i].code;
2428
2429  for (i = 0, k = -1; attributes[i].code != -1; i += 1)
2430    if (subseqMatch (str, attributes[i].name))
2431      {
2432	if (k == -1)
2433	  k = i;
2434	else
2435	  error (_("ambiguous attribute name: `%s'"), str);
2436      }
2437  if (k == -1)
2438    error (_("unrecognized attribute: `%s'"), str);
2439
2440  return attributes[k].code;
2441}
2442
2443int
2444yywrap(void)
2445{
2446  return 1;
2447}
2448
2449/* Dummy definition to suppress warnings about unused static definitions. */
2450typedef void (*dummy_function) ();
2451dummy_function ada_flex_use[] =
2452{
2453  (dummy_function) yyunput
2454};
2455