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