Imported Upstream version 0.155
[platform/upstream/elfutils.git] / src / ldlex.c
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 elfutils.
1079    Written by Ulrich Drepper <drepper@redhat.com>, 2001.
1080
1081    This file is free software; you can redistribute it and/or modify
1082    it under the terms of the GNU General Public License as published by
1083    the Free Software Foundation; either version 3 of the License, or
1084    (at your option) any later version.
1085
1086    elfutils is distributed in the hope that it will be useful, but
1087    WITHOUT ANY WARRANTY; without even the implied warranty of
1088    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1089    GNU General Public License for more details.
1090
1091    You should have received a copy of the GNU General Public License
1092    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
1093
1094 #ifdef HAVE_CONFIG_H
1095 # include <config.h>
1096 #endif
1097
1098 #include <assert.h>
1099 #include <ctype.h>
1100 #include <elf.h>
1101 #include <error.h>
1102 #include <inttypes.h>
1103 #include <libintl.h>
1104 #include <stdbool.h>
1105 #include <stdio.h>
1106 #include <string.h>
1107
1108 #include <system.h>
1109 #include <ld.h>
1110 #include "ldscript.h"
1111
1112 /* We sure use no threads to read the stream, so use the _unlocked
1113    variants of the functions.  */
1114 #undef getc
1115 #define getc(s) getc_unlocked (s)
1116 #undef ferror
1117 #define ferror(s) ferror_unlocked (s)
1118 #undef fread
1119 #define fread(b, m, n, s) fread_unlocked (b, m, n, s)
1120 #undef fwrite
1121 #define fwrite(b, m, n, s) fwrite_unlocked (b, m, n, s)
1122
1123 /* ECHO must be redefined since the default implementation ignores
1124    the return value of fwrite_unlocked.  */
1125 #define ECHO do { size_t n__ __attribute__ ((unused)) \
1126                            = fwrite (ldtext, ldleng, 1, ldout); } while (0)
1127
1128 /* Defined in ld.c.  */
1129 extern int ld_scan_version_script;
1130
1131 #define MAX_PREPDEPTH 20
1132 static enum prepstate
1133 {
1134   prep_normal,
1135   skip_if,
1136   skip_to_endif
1137 } prepstate[MAX_PREPDEPTH];
1138 static int prepdepth;
1139
1140 static void eat_comment (void);
1141 static void eat_to_eol (bool empty);
1142 static int attrib_convert (int c);
1143 static void push_state (enum prepstate);
1144 static int pop_state (void);
1145 static int handle_ifdef (void);
1146 static void invalid_char (int ch);
1147
1148 #line 1149 "ldlex.c"
1149
1150 #define INITIAL 0
1151 #define IGNORE 1
1152
1153 #ifndef YY_NO_UNISTD_H
1154 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1155  * down here because we want the user's section 1 to have been scanned first.
1156  * The user has a chance to override it with an option.
1157  */
1158 #include <unistd.h>
1159 #endif
1160
1161 #ifndef YY_EXTRA_TYPE
1162 #define YY_EXTRA_TYPE void *
1163 #endif
1164
1165 static int yy_init_globals (void );
1166
1167 /* Accessor methods to globals.
1168    These are made visible to non-reentrant scanners for convenience. */
1169
1170 int ldlex_destroy (void );
1171
1172 int ldget_debug (void );
1173
1174 void ldset_debug (int debug_flag  );
1175
1176 YY_EXTRA_TYPE ldget_extra (void );
1177
1178 void ldset_extra (YY_EXTRA_TYPE user_defined  );
1179
1180 FILE *ldget_in (void );
1181
1182 void ldset_in  (FILE * in_str  );
1183
1184 FILE *ldget_out (void );
1185
1186 void ldset_out  (FILE * out_str  );
1187
1188 int ldget_leng (void );
1189
1190 char *ldget_text (void );
1191
1192 int ldget_lineno (void );
1193
1194 void ldset_lineno (int line_number  );
1195
1196 /* Macros after this point can all be overridden by user definitions in
1197  * section 1.
1198  */
1199
1200 #ifndef YY_SKIP_YYWRAP
1201 #ifdef __cplusplus
1202 extern "C" int ldwrap (void );
1203 #else
1204 extern int ldwrap (void );
1205 #endif
1206 #endif
1207
1208     static void yyunput (int c,char *buf_ptr  );
1209     
1210 #ifndef yytext_ptr
1211 static void yy_flex_strncpy (char *,yyconst char *,int );
1212 #endif
1213
1214 #ifdef YY_NEED_STRLEN
1215 static int yy_flex_strlen (yyconst char * );
1216 #endif
1217
1218 #ifndef YY_NO_INPUT
1219
1220 #ifdef __cplusplus
1221 static int yyinput (void );
1222 #else
1223 static int input (void );
1224 #endif
1225
1226 #endif
1227
1228 /* Amount of stuff to slurp up with each read. */
1229 #ifndef YY_READ_BUF_SIZE
1230 #define YY_READ_BUF_SIZE 8192
1231 #endif
1232
1233 /* Copy whatever the last rule matched to the standard output. */
1234 #ifndef ECHO
1235 /* This used to be an fputs(), but since the string might contain NUL's,
1236  * we now use fwrite().
1237  */
1238 #define ECHO do { if (fwrite( ldtext, ldleng, 1, ldout )) {} } while (0)
1239 #endif
1240
1241 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1242  * is returned in "result".
1243  */
1244 #ifndef YY_INPUT
1245 #define YY_INPUT(buf,result,max_size) \
1246         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1247                 { \
1248                 int c = '*'; \
1249                 unsigned n; \
1250                 for ( n = 0; n < max_size && \
1251                              (c = getc( ldin )) != EOF && c != '\n'; ++n ) \
1252                         buf[n] = (char) c; \
1253                 if ( c == '\n' ) \
1254                         buf[n++] = (char) c; \
1255                 if ( c == EOF && ferror( ldin ) ) \
1256                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
1257                 result = n; \
1258                 } \
1259         else \
1260                 { \
1261                 errno=0; \
1262                 while ( (result = fread(buf, 1, max_size, ldin))==0 && ferror(ldin)) \
1263                         { \
1264                         if( errno != EINTR) \
1265                                 { \
1266                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1267                                 break; \
1268                                 } \
1269                         errno=0; \
1270                         clearerr(ldin); \
1271                         } \
1272                 }\
1273 \
1274
1275 #endif
1276
1277 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1278  * we don't want an extra ';' after the "return" because that will cause
1279  * some compilers to complain about unreachable statements.
1280  */
1281 #ifndef yyterminate
1282 #define yyterminate() return YY_NULL
1283 #endif
1284
1285 /* Number of entries by which start-condition stack grows. */
1286 #ifndef YY_START_STACK_INCR
1287 #define YY_START_STACK_INCR 25
1288 #endif
1289
1290 /* Report a fatal error. */
1291 #ifndef YY_FATAL_ERROR
1292 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1293 #endif
1294
1295 /* end tables serialization structures and prototypes */
1296
1297 /* Default declaration of generated scanner - a define so the user can
1298  * easily add parameters.
1299  */
1300 #ifndef YY_DECL
1301 #define YY_DECL_IS_OURS 1
1302
1303 extern int ldlex (void);
1304
1305 #define YY_DECL int ldlex (void)
1306 #endif /* !YY_DECL */
1307
1308 /* Code executed at the beginning of each rule, after ldtext and ldleng
1309  * have been set up.
1310  */
1311 #ifndef YY_USER_ACTION
1312 #define YY_USER_ACTION
1313 #endif
1314
1315 /* Code executed at the end of each rule. */
1316 #ifndef YY_BREAK
1317 #define YY_BREAK break;
1318 #endif
1319
1320 #define YY_RULE_SETUP \
1321         if ( ldleng > 0 ) \
1322                 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1323                                 (ldtext[ldleng - 1] == '\n'); \
1324         YY_USER_ACTION
1325
1326 /** The main scanner function which does all the work.
1327  */
1328 YY_DECL
1329 {
1330         register yy_state_type yy_current_state;
1331         register char *yy_cp, *yy_bp;
1332         register int yy_act;
1333     
1334 #line 88 "ldlex.l"
1335
1336                                 if (unlikely (ld_scan_version_script))
1337                                   {
1338                                     ld_scan_version_script = -1;
1339                                     return kVERSION_SCRIPT;
1340                                   }
1341
1342 #line 1343 "ldlex.c"
1343
1344         if ( !(yy_init) )
1345                 {
1346                 (yy_init) = 1;
1347
1348 #ifdef YY_USER_INIT
1349                 YY_USER_INIT;
1350 #endif
1351
1352                 if ( ! (yy_start) )
1353                         (yy_start) = 1; /* first start state */
1354
1355                 if ( ! ldin )
1356                         ldin = stdin;
1357
1358                 if ( ! ldout )
1359                         ldout = stdout;
1360
1361                 if ( ! YY_CURRENT_BUFFER ) {
1362                         ldensure_buffer_stack ();
1363                         YY_CURRENT_BUFFER_LVALUE =
1364                                 ld_create_buffer(ldin,YY_BUF_SIZE );
1365                 }
1366
1367                 ld_load_buffer_state( );
1368                 }
1369
1370         while ( 1 )             /* loops until end-of-file is reached */
1371                 {
1372                 yy_cp = (yy_c_buf_p);
1373
1374                 /* Support of ldtext. */
1375                 *yy_cp = (yy_hold_char);
1376
1377                 /* yy_bp points to the position in yy_ch_buf of the start of
1378                  * the current run.
1379                  */
1380                 yy_bp = yy_cp;
1381
1382                 yy_current_state = (yy_start);
1383                 yy_current_state += YY_AT_BOL();
1384 yy_match:
1385                 do
1386                         {
1387                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1388                         if ( yy_accept[yy_current_state] )
1389                                 {
1390                                 (yy_last_accepting_state) = yy_current_state;
1391                                 (yy_last_accepting_cpos) = yy_cp;
1392                                 }
1393                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1394                                 {
1395                                 yy_current_state = (int) yy_def[yy_current_state];
1396                                 if ( yy_current_state >= 219 )
1397                                         yy_c = yy_meta[(unsigned int) yy_c];
1398                                 }
1399                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1400                         ++yy_cp;
1401                         }
1402                 while ( yy_current_state != 218 );
1403                 yy_cp = (yy_last_accepting_cpos);
1404                 yy_current_state = (yy_last_accepting_state);
1405
1406 yy_find_action:
1407                 yy_act = yy_accept[yy_current_state];
1408
1409                 YY_DO_BEFORE_ACTION;
1410
1411                 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1412                         {
1413                         int yyl;
1414                         for ( yyl = 0; yyl < ldleng; ++yyl )
1415                                 if ( ldtext[yyl] == '\n' )
1416                                            
1417     ldlineno++;
1418 ;
1419                         }
1420
1421 do_action:      /* This label is used only to access EOF actions. */
1422
1423                 switch ( yy_act )
1424         { /* beginning of action switch */
1425                         case 0: /* must back up */
1426                         /* undo the effects of YY_DO_BEFORE_ACTION */
1427                         *yy_cp = (yy_hold_char);
1428                         yy_cp = (yy_last_accepting_cpos);
1429                         yy_current_state = (yy_last_accepting_state);
1430                         goto yy_find_action;
1431
1432 case 1:
1433 /* rule 1 can match eol */
1434 *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */
1435 (yy_c_buf_p) = yy_cp = yy_bp + 6;
1436 YY_DO_BEFORE_ACTION; /* set up ldtext again */
1437 YY_RULE_SETUP
1438 #line 95 "ldlex.l"
1439 { BEGIN (handle_ifdef ()); }
1440         YY_BREAK
1441 case 2:
1442 /* rule 2 can match eol */
1443 *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */
1444 (yy_c_buf_p) = yy_cp = yy_bp + 5;
1445 YY_DO_BEFORE_ACTION; /* set up ldtext again */
1446 YY_RULE_SETUP
1447 #line 96 "ldlex.l"
1448 { eat_to_eol (true);
1449                                   push_state (skip_to_endif);
1450                                   BEGIN (IGNORE); }
1451         YY_BREAK
1452 case 3:
1453 /* rule 3 can match eol */
1454 *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */
1455 (yy_c_buf_p) = yy_cp = yy_bp + 8;
1456 YY_DO_BEFORE_ACTION; /* set up ldtext again */
1457 YY_RULE_SETUP
1458 #line 99 "ldlex.l"
1459 { eat_to_eol (false);
1460                                   push_state (skip_to_endif);
1461                                   BEGIN (IGNORE); }
1462         YY_BREAK
1463 case 4:
1464 /* rule 4 can match eol */
1465 *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */
1466 (yy_c_buf_p) = yy_cp = yy_bp + 6;
1467 YY_DO_BEFORE_ACTION; /* set up ldtext again */
1468 YY_RULE_SETUP
1469 #line 102 "ldlex.l"
1470 { eat_to_eol (true) ; }
1471         YY_BREAK
1472 case 5:
1473 /* rule 5 can match eol */
1474 *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */
1475 (yy_c_buf_p) = yy_cp = yy_bp + 6;
1476 YY_DO_BEFORE_ACTION; /* set up ldtext again */
1477 YY_RULE_SETUP
1478 #line 104 "ldlex.l"
1479 { eat_to_eol (false);
1480                                   push_state (skip_to_endif); }
1481         YY_BREAK
1482 case 6:
1483 /* rule 6 can match eol */
1484 *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */
1485 (yy_c_buf_p) = yy_cp = yy_bp + 5;
1486 YY_DO_BEFORE_ACTION; /* set up ldtext again */
1487 YY_RULE_SETUP
1488 #line 106 "ldlex.l"
1489 { eat_to_eol (true);
1490                                   assert (prepdepth > 0);
1491                                   if (prepstate[prepdepth - 1] == skip_if)
1492                                     {
1493                                       /* Back to normal processing.  */
1494                                       assert (prepdepth == 1);
1495                                       BEGIN (pop_state ());
1496                                     }
1497                                 }
1498         YY_BREAK
1499 case 7:
1500 /* rule 7 can match eol */
1501 *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */
1502 (yy_c_buf_p) = yy_cp = yy_bp + 8;
1503 YY_DO_BEFORE_ACTION; /* set up ldtext again */
1504 YY_RULE_SETUP
1505 #line 115 "ldlex.l"
1506 { assert (prepdepth > 0);
1507                                   if (prepstate[prepdepth - 1] == skip_if)
1508                                     {
1509                                       /* Maybe this symbol is defined.  */
1510                                       pop_state ();
1511                                       BEGIN (handle_ifdef ());
1512                                     }
1513                                 }
1514         YY_BREAK
1515 case 8:
1516 /* rule 8 can match eol */
1517 *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */
1518 (yy_c_buf_p) = yy_cp = yy_bp + 6;
1519 YY_DO_BEFORE_ACTION; /* set up ldtext again */
1520 YY_RULE_SETUP
1521 #line 123 "ldlex.l"
1522 { eat_to_eol (true);
1523                                   BEGIN (pop_state ()); }
1524         YY_BREAK
1525 case 9:
1526 /* rule 9 can match eol */
1527 YY_RULE_SETUP
1528 #line 125 "ldlex.l"
1529 { /* nothing */ }
1530         YY_BREAK
1531 case 10:
1532 YY_RULE_SETUP
1533 #line 128 "ldlex.l"
1534 { eat_comment (); }
1535         YY_BREAK
1536 case 11:
1537 YY_RULE_SETUP
1538 #line 130 "ldlex.l"
1539 { return kALIGN; }
1540         YY_BREAK
1541 case 12:
1542 YY_RULE_SETUP
1543 #line 131 "ldlex.l"
1544 { return kAS_NEEDED; }
1545         YY_BREAK
1546 case 13:
1547 YY_RULE_SETUP
1548 #line 132 "ldlex.l"
1549 { return kENTRY; }
1550         YY_BREAK
1551 case 14:
1552 YY_RULE_SETUP
1553 #line 133 "ldlex.l"
1554 { return kEXCLUDE_FILE; }
1555         YY_BREAK
1556 case 15:
1557 YY_RULE_SETUP
1558 #line 134 "ldlex.l"
1559 { return kGLOBAL; }
1560         YY_BREAK
1561 case 16:
1562 YY_RULE_SETUP
1563 #line 135 "ldlex.l"
1564 { return kGROUP; }
1565         YY_BREAK
1566 case 17:
1567 YY_RULE_SETUP
1568 #line 136 "ldlex.l"
1569 { return kINPUT; }
1570         YY_BREAK
1571 case 18:
1572 YY_RULE_SETUP
1573 #line 137 "ldlex.l"
1574 { return kINTERP; }
1575         YY_BREAK
1576 case 19:
1577 YY_RULE_SETUP
1578 #line 138 "ldlex.l"
1579 { return kKEEP; }
1580         YY_BREAK
1581 case 20:
1582 YY_RULE_SETUP
1583 #line 139 "ldlex.l"
1584 { return kLOCAL; }
1585         YY_BREAK
1586 case 21:
1587 YY_RULE_SETUP
1588 #line 140 "ldlex.l"
1589 { return kOUTPUT_FORMAT; }
1590         YY_BREAK
1591 case 22:
1592 YY_RULE_SETUP
1593 #line 141 "ldlex.l"
1594 { return kPAGESIZE; }
1595         YY_BREAK
1596 case 23:
1597 YY_RULE_SETUP
1598 #line 142 "ldlex.l"
1599 { return kPROVIDE; }
1600         YY_BREAK
1601 case 24:
1602 YY_RULE_SETUP
1603 #line 143 "ldlex.l"
1604 { return kSEARCH_DIR; }
1605         YY_BREAK
1606 case 25:
1607 YY_RULE_SETUP
1608 #line 144 "ldlex.l"
1609 { return kSEGMENT; }
1610         YY_BREAK
1611 case 26:
1612 YY_RULE_SETUP
1613 #line 145 "ldlex.l"
1614 { return kSIZEOF_HEADERS; }
1615         YY_BREAK
1616 case 27:
1617 YY_RULE_SETUP
1618 #line 146 "ldlex.l"
1619 { return kSORT; }
1620         YY_BREAK
1621 case 28:
1622 YY_RULE_SETUP
1623 #line 147 "ldlex.l"
1624 { return kVERSION; }
1625         YY_BREAK
1626 case 29:
1627 YY_RULE_SETUP
1628 #line 149 "ldlex.l"
1629 { int cnt = 1 ;
1630                                   ldlval.num = 0;
1631                                   while (cnt < ldleng - 1)
1632                                     ldlval.num |= attrib_convert (ldtext[cnt++]);
1633                                   return kMODE; }
1634         YY_BREAK
1635 case 30:
1636 YY_RULE_SETUP
1637 #line 155 "ldlex.l"
1638 { return '{'; }
1639         YY_BREAK
1640 case 31:
1641 YY_RULE_SETUP
1642 #line 156 "ldlex.l"
1643 { return '}'; }
1644         YY_BREAK
1645 case 32:
1646 YY_RULE_SETUP
1647 #line 157 "ldlex.l"
1648 { return '('; }
1649         YY_BREAK
1650 case 33:
1651 YY_RULE_SETUP
1652 #line 158 "ldlex.l"
1653 { return ')'; }
1654         YY_BREAK
1655 case 34:
1656 YY_RULE_SETUP
1657 #line 159 "ldlex.l"
1658 { return ':'; }
1659         YY_BREAK
1660 case 35:
1661 YY_RULE_SETUP
1662 #line 160 "ldlex.l"
1663 { return ';'; }
1664         YY_BREAK
1665 case 36:
1666 YY_RULE_SETUP
1667 #line 161 "ldlex.l"
1668 { return '='; }
1669         YY_BREAK
1670 case 37:
1671 YY_RULE_SETUP
1672 #line 162 "ldlex.l"
1673 { ldlval.op = exp_plus; return kADD_OP; }
1674         YY_BREAK
1675 case 38:
1676 YY_RULE_SETUP
1677 #line 163 "ldlex.l"
1678 { ldlval.op = exp_minus; return kADD_OP; }
1679         YY_BREAK
1680 case 39:
1681 YY_RULE_SETUP
1682 #line 164 "ldlex.l"
1683 { return '*'; }
1684         YY_BREAK
1685 case 40:
1686 YY_RULE_SETUP
1687 #line 165 "ldlex.l"
1688 { ldlval.op = exp_div; return kMUL_OP; }
1689         YY_BREAK
1690 case 41:
1691 YY_RULE_SETUP
1692 #line 166 "ldlex.l"
1693 { ldlval.op = exp_mod; return kMUL_OP; }
1694         YY_BREAK
1695 case 42:
1696 YY_RULE_SETUP
1697 #line 167 "ldlex.l"
1698 { return '&'; }
1699         YY_BREAK
1700 case 43:
1701 YY_RULE_SETUP
1702 #line 168 "ldlex.l"
1703 { return '|'; }
1704         YY_BREAK
1705 case 44:
1706 YY_RULE_SETUP
1707 #line 170 "ldlex.l"
1708 { return ','; }
1709         YY_BREAK
1710 case 45:
1711 YY_RULE_SETUP
1712 #line 172 "ldlex.l"
1713 { char *endp;
1714                                   ldlval.num = strtoumax (ldtext, &endp, 0);
1715                                   if (*endp != '\0')
1716                                     {
1717                                       if (tolower (*endp) == 'k')
1718                                         ldlval.num *= 1024;
1719                                       else
1720                                         {
1721                                           assert (tolower (*endp) == 'm');
1722                                           ldlval.num *= 1024 * 1024;
1723                                         }
1724                                     }
1725                                   return kNUM; }
1726         YY_BREAK
1727 case 46:
1728 YY_RULE_SETUP
1729 #line 186 "ldlex.l"
1730 { ldlval.str = obstack_strndup (&ld_state.smem,
1731                                                                 ldtext, ldleng);
1732                                   return kID; }
1733         YY_BREAK
1734 case 47:
1735 YY_RULE_SETUP
1736 #line 190 "ldlex.l"
1737 { ldlval.str = obstack_strndup (&ld_state.smem,
1738                                                                 ldtext, ldleng);
1739                                   return kFILENAME; }
1740         YY_BREAK
1741 case 48:
1742 /* rule 48 can match eol */
1743 YY_RULE_SETUP
1744 #line 194 "ldlex.l"
1745 { /* IGNORE */ }
1746         YY_BREAK
1747 case 49:
1748 YY_RULE_SETUP
1749 #line 196 "ldlex.l"
1750 { invalid_char (*ldtext); }
1751         YY_BREAK
1752 case 50:
1753 YY_RULE_SETUP
1754 #line 198 "ldlex.l"
1755 ECHO;
1756         YY_BREAK
1757 #line 1758 "ldlex.c"
1758 case YY_STATE_EOF(INITIAL):
1759 case YY_STATE_EOF(IGNORE):
1760         yyterminate();
1761
1762         case YY_END_OF_BUFFER:
1763                 {
1764                 /* Amount of text matched not including the EOB char. */
1765                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1766
1767                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1768                 *yy_cp = (yy_hold_char);
1769                 YY_RESTORE_YY_MORE_OFFSET
1770
1771                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1772                         {
1773                         /* We're scanning a new file or input source.  It's
1774                          * possible that this happened because the user
1775                          * just pointed ldin at a new source and called
1776                          * ldlex().  If so, then we have to assure
1777                          * consistency between YY_CURRENT_BUFFER and our
1778                          * globals.  Here is the right place to do so, because
1779                          * this is the first action (other than possibly a
1780                          * back-up) that will match for the new input source.
1781                          */
1782                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1783                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = ldin;
1784                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1785                         }
1786
1787                 /* Note that here we test for yy_c_buf_p "<=" to the position
1788                  * of the first EOB in the buffer, since yy_c_buf_p will
1789                  * already have been incremented past the NUL character
1790                  * (since all states make transitions on EOB to the
1791                  * end-of-buffer state).  Contrast this with the test
1792                  * in input().
1793                  */
1794                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1795                         { /* This was really a NUL. */
1796                         yy_state_type yy_next_state;
1797
1798                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1799
1800                         yy_current_state = yy_get_previous_state(  );
1801
1802                         /* Okay, we're now positioned to make the NUL
1803                          * transition.  We couldn't have
1804                          * yy_get_previous_state() go ahead and do it
1805                          * for us because it doesn't know how to deal
1806                          * with the possibility of jamming (and we don't
1807                          * want to build jamming into it because then it
1808                          * will run more slowly).
1809                          */
1810
1811                         yy_next_state = yy_try_NUL_trans( yy_current_state );
1812
1813                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1814
1815                         if ( yy_next_state )
1816                                 {
1817                                 /* Consume the NUL. */
1818                                 yy_cp = ++(yy_c_buf_p);
1819                                 yy_current_state = yy_next_state;
1820                                 goto yy_match;
1821                                 }
1822
1823                         else
1824                                 {
1825                                 yy_cp = (yy_last_accepting_cpos);
1826                                 yy_current_state = (yy_last_accepting_state);
1827                                 goto yy_find_action;
1828                                 }
1829                         }
1830
1831                 else switch ( yy_get_next_buffer(  ) )
1832                         {
1833                         case EOB_ACT_END_OF_FILE:
1834                                 {
1835                                 (yy_did_buffer_switch_on_eof) = 0;
1836
1837                                 if ( ldwrap( ) )
1838                                         {
1839                                         /* Note: because we've taken care in
1840                                          * yy_get_next_buffer() to have set up
1841                                          * ldtext, we can now set up
1842                                          * yy_c_buf_p so that if some total
1843                                          * hoser (like flex itself) wants to
1844                                          * call the scanner after we return the
1845                                          * YY_NULL, it'll still work - another
1846                                          * YY_NULL will get returned.
1847                                          */
1848                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1849
1850                                         yy_act = YY_STATE_EOF(YY_START);
1851                                         goto do_action;
1852                                         }
1853
1854                                 else
1855                                         {
1856                                         if ( ! (yy_did_buffer_switch_on_eof) )
1857                                                 YY_NEW_FILE;
1858                                         }
1859                                 break;
1860                                 }
1861
1862                         case EOB_ACT_CONTINUE_SCAN:
1863                                 (yy_c_buf_p) =
1864                                         (yytext_ptr) + yy_amount_of_matched_text;
1865
1866                                 yy_current_state = yy_get_previous_state(  );
1867
1868                                 yy_cp = (yy_c_buf_p);
1869                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1870                                 goto yy_match;
1871
1872                         case EOB_ACT_LAST_MATCH:
1873                                 (yy_c_buf_p) =
1874                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1875
1876                                 yy_current_state = yy_get_previous_state(  );
1877
1878                                 yy_cp = (yy_c_buf_p);
1879                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1880                                 goto yy_find_action;
1881                         }
1882                 break;
1883                 }
1884
1885         default:
1886                 YY_FATAL_ERROR(
1887                         "fatal flex scanner internal error--no action found" );
1888         } /* end of action switch */
1889                 } /* end of scanning one token */
1890 } /* end of ldlex */
1891
1892 /* yy_get_next_buffer - try to read in a new buffer
1893  *
1894  * Returns a code representing an action:
1895  *      EOB_ACT_LAST_MATCH -
1896  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1897  *      EOB_ACT_END_OF_FILE - end of file
1898  */
1899 static int yy_get_next_buffer (void)
1900 {
1901         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1902         register char *source = (yytext_ptr);
1903         register int number_to_move, i;
1904         int ret_val;
1905
1906         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1907                 YY_FATAL_ERROR(
1908                 "fatal flex scanner internal error--end of buffer missed" );
1909
1910         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1911                 { /* Don't try to fill the buffer, so this is an EOF. */
1912                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1913                         {
1914                         /* We matched a single character, the EOB, so
1915                          * treat this as a final EOF.
1916                          */
1917                         return EOB_ACT_END_OF_FILE;
1918                         }
1919
1920                 else
1921                         {
1922                         /* We matched some text prior to the EOB, first
1923                          * process it.
1924                          */
1925                         return EOB_ACT_LAST_MATCH;
1926                         }
1927                 }
1928
1929         /* Try to read more data. */
1930
1931         /* First move last chars to start of buffer. */
1932         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1933
1934         for ( i = 0; i < number_to_move; ++i )
1935                 *(dest++) = *(source++);
1936
1937         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1938                 /* don't do the read, it's not guaranteed to return an EOF,
1939                  * just force an EOF
1940                  */
1941                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1942
1943         else
1944                 {
1945                         int num_to_read =
1946                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1947
1948                 while ( num_to_read <= 0 )
1949                         { /* Not enough room in the buffer - grow it. */
1950
1951                         /* just a shorter name for the current buffer */
1952                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1953
1954                         int yy_c_buf_p_offset =
1955                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1956
1957                         if ( b->yy_is_our_buffer )
1958                                 {
1959                                 int new_size = b->yy_buf_size * 2;
1960
1961                                 if ( new_size <= 0 )
1962                                         b->yy_buf_size += b->yy_buf_size / 8;
1963                                 else
1964                                         b->yy_buf_size *= 2;
1965
1966                                 b->yy_ch_buf = (char *)
1967                                         /* Include room in for 2 EOB chars. */
1968                                         ldrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
1969                                 }
1970                         else
1971                                 /* Can't grow it, we don't own it. */
1972                                 b->yy_ch_buf = 0;
1973
1974                         if ( ! b->yy_ch_buf )
1975                                 YY_FATAL_ERROR(
1976                                 "fatal error - scanner input buffer overflow" );
1977
1978                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1979
1980                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1981                                                 number_to_move - 1;
1982
1983                         }
1984
1985                 if ( num_to_read > YY_READ_BUF_SIZE )
1986                         num_to_read = YY_READ_BUF_SIZE;
1987
1988                 /* Read in more data. */
1989                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1990                         (yy_n_chars), (size_t) num_to_read );
1991
1992                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1993                 }
1994
1995         if ( (yy_n_chars) == 0 )
1996                 {
1997                 if ( number_to_move == YY_MORE_ADJ )
1998                         {
1999                         ret_val = EOB_ACT_END_OF_FILE;
2000                         ldrestart(ldin  );
2001                         }
2002
2003                 else
2004                         {
2005                         ret_val = EOB_ACT_LAST_MATCH;
2006                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2007                                 YY_BUFFER_EOF_PENDING;
2008                         }
2009                 }
2010
2011         else
2012                 ret_val = EOB_ACT_CONTINUE_SCAN;
2013
2014         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2015                 /* Extend the array by 50%, plus the number we really need. */
2016                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2017                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ldrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
2018                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2019                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2020         }
2021
2022         (yy_n_chars) += number_to_move;
2023         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2024         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2025
2026         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2027
2028         return ret_val;
2029 }
2030
2031 /* yy_get_previous_state - get the state just before the EOB char was reached */
2032
2033     static yy_state_type yy_get_previous_state (void)
2034 {
2035         register yy_state_type yy_current_state;
2036         register char *yy_cp;
2037     
2038         yy_current_state = (yy_start);
2039         yy_current_state += YY_AT_BOL();
2040
2041         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2042                 {
2043                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2044                 if ( yy_accept[yy_current_state] )
2045                         {
2046                         (yy_last_accepting_state) = yy_current_state;
2047                         (yy_last_accepting_cpos) = yy_cp;
2048                         }
2049                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2050                         {
2051                         yy_current_state = (int) yy_def[yy_current_state];
2052                         if ( yy_current_state >= 219 )
2053                                 yy_c = yy_meta[(unsigned int) yy_c];
2054                         }
2055                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2056                 }
2057
2058         return yy_current_state;
2059 }
2060
2061 /* yy_try_NUL_trans - try to make a transition on the NUL character
2062  *
2063  * synopsis
2064  *      next_state = yy_try_NUL_trans( current_state );
2065  */
2066     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
2067 {
2068         register int yy_is_jam;
2069         register char *yy_cp = (yy_c_buf_p);
2070
2071         register YY_CHAR yy_c = 1;
2072         if ( yy_accept[yy_current_state] )
2073                 {
2074                 (yy_last_accepting_state) = yy_current_state;
2075                 (yy_last_accepting_cpos) = yy_cp;
2076                 }
2077         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2078                 {
2079                 yy_current_state = (int) yy_def[yy_current_state];
2080                 if ( yy_current_state >= 219 )
2081                         yy_c = yy_meta[(unsigned int) yy_c];
2082                 }
2083         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2084         yy_is_jam = (yy_current_state == 218);
2085
2086         return yy_is_jam ? 0 : yy_current_state;
2087 }
2088
2089     static void yyunput (int c, register char * yy_bp )
2090 {
2091         register char *yy_cp;
2092     
2093     yy_cp = (yy_c_buf_p);
2094
2095         /* undo effects of setting up ldtext */
2096         *yy_cp = (yy_hold_char);
2097
2098         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2099                 { /* need to shift things up to make room */
2100                 /* +2 for EOB chars. */
2101                 register int number_to_move = (yy_n_chars) + 2;
2102                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2103                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2104                 register char *source =
2105                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2106
2107                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2108                         *--dest = *--source;
2109
2110                 yy_cp += (int) (dest - source);
2111                 yy_bp += (int) (dest - source);
2112                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2113                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2114
2115                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2116                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
2117                 }
2118
2119         *--yy_cp = (char) c;
2120
2121     if ( c == '\n' ){
2122         --ldlineno;
2123     }
2124
2125         (yytext_ptr) = yy_bp;
2126         (yy_hold_char) = *yy_cp;
2127         (yy_c_buf_p) = yy_cp;
2128 }
2129
2130 #ifndef YY_NO_INPUT
2131 #ifdef __cplusplus
2132     static int yyinput (void)
2133 #else
2134     static int input  (void)
2135 #endif
2136
2137 {
2138         int c;
2139     
2140         *(yy_c_buf_p) = (yy_hold_char);
2141
2142         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2143                 {
2144                 /* yy_c_buf_p now points to the character we want to return.
2145                  * If this occurs *before* the EOB characters, then it's a
2146                  * valid NUL; if not, then we've hit the end of the buffer.
2147                  */
2148                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2149                         /* This was really a NUL. */
2150                         *(yy_c_buf_p) = '\0';
2151
2152                 else
2153                         { /* need more input */
2154                         int offset = (yy_c_buf_p) - (yytext_ptr);
2155                         ++(yy_c_buf_p);
2156
2157                         switch ( yy_get_next_buffer(  ) )
2158                                 {
2159                                 case EOB_ACT_LAST_MATCH:
2160                                         /* This happens because yy_g_n_b()
2161                                          * sees that we've accumulated a
2162                                          * token and flags that we need to
2163                                          * try matching the token before
2164                                          * proceeding.  But for input(),
2165                                          * there's no matching to consider.
2166                                          * So convert the EOB_ACT_LAST_MATCH
2167                                          * to EOB_ACT_END_OF_FILE.
2168                                          */
2169
2170                                         /* Reset buffer status. */
2171                                         ldrestart(ldin );
2172
2173                                         /*FALLTHROUGH*/
2174
2175                                 case EOB_ACT_END_OF_FILE:
2176                                         {
2177                                         if ( ldwrap( ) )
2178                                                 return EOF;
2179
2180                                         if ( ! (yy_did_buffer_switch_on_eof) )
2181                                                 YY_NEW_FILE;
2182 #ifdef __cplusplus
2183                                         return yyinput();
2184 #else
2185                                         return input();
2186 #endif
2187                                         }
2188
2189                                 case EOB_ACT_CONTINUE_SCAN:
2190                                         (yy_c_buf_p) = (yytext_ptr) + offset;
2191                                         break;
2192                                 }
2193                         }
2194                 }
2195
2196         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
2197         *(yy_c_buf_p) = '\0';   /* preserve ldtext */
2198         (yy_hold_char) = *++(yy_c_buf_p);
2199
2200         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2201         if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
2202                    
2203     ldlineno++;
2204 ;
2205
2206         return c;
2207 }
2208 #endif  /* ifndef YY_NO_INPUT */
2209
2210 /** Immediately switch to a different input stream.
2211  * @param input_file A readable stream.
2212  * 
2213  * @note This function does not reset the start condition to @c INITIAL .
2214  */
2215     void ldrestart  (FILE * input_file )
2216 {
2217     
2218         if ( ! YY_CURRENT_BUFFER ){
2219         ldensure_buffer_stack ();
2220                 YY_CURRENT_BUFFER_LVALUE =
2221             ld_create_buffer(ldin,YY_BUF_SIZE );
2222         }
2223
2224         ld_init_buffer(YY_CURRENT_BUFFER,input_file );
2225         ld_load_buffer_state( );
2226 }
2227
2228 /** Switch to a different input buffer.
2229  * @param new_buffer The new input buffer.
2230  * 
2231  */
2232     void ld_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
2233 {
2234     
2235         /* TODO. We should be able to replace this entire function body
2236          * with
2237          *              ldpop_buffer_state();
2238          *              ldpush_buffer_state(new_buffer);
2239      */
2240         ldensure_buffer_stack ();
2241         if ( YY_CURRENT_BUFFER == new_buffer )
2242                 return;
2243
2244         if ( YY_CURRENT_BUFFER )
2245                 {
2246                 /* Flush out information for old buffer. */
2247                 *(yy_c_buf_p) = (yy_hold_char);
2248                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2249                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2250                 }
2251
2252         YY_CURRENT_BUFFER_LVALUE = new_buffer;
2253         ld_load_buffer_state( );
2254
2255         /* We don't actually know whether we did this switch during
2256          * EOF (ldwrap()) processing, but the only time this flag
2257          * is looked at is after ldwrap() is called, so it's safe
2258          * to go ahead and always set it.
2259          */
2260         (yy_did_buffer_switch_on_eof) = 1;
2261 }
2262
2263 static void ld_load_buffer_state  (void)
2264 {
2265         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2266         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2267         ldin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2268         (yy_hold_char) = *(yy_c_buf_p);
2269 }
2270
2271 /** Allocate and initialize an input buffer state.
2272  * @param file A readable stream.
2273  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2274  * 
2275  * @return the allocated buffer state.
2276  */
2277     YY_BUFFER_STATE ld_create_buffer  (FILE * file, int  size )
2278 {
2279         YY_BUFFER_STATE b;
2280     
2281         b = (YY_BUFFER_STATE) ldalloc(sizeof( struct yy_buffer_state )  );
2282         if ( ! b )
2283                 YY_FATAL_ERROR( "out of dynamic memory in ld_create_buffer()" );
2284
2285         b->yy_buf_size = size;
2286
2287         /* yy_ch_buf has to be 2 characters longer than the size given because
2288          * we need to put in 2 end-of-buffer characters.
2289          */
2290         b->yy_ch_buf = (char *) ldalloc(b->yy_buf_size + 2  );
2291         if ( ! b->yy_ch_buf )
2292                 YY_FATAL_ERROR( "out of dynamic memory in ld_create_buffer()" );
2293
2294         b->yy_is_our_buffer = 1;
2295
2296         ld_init_buffer(b,file );
2297
2298         return b;
2299 }
2300
2301 /** Destroy the buffer.
2302  * @param b a buffer created with ld_create_buffer()
2303  * 
2304  */
2305     void ld_delete_buffer (YY_BUFFER_STATE  b )
2306 {
2307     
2308         if ( ! b )
2309                 return;
2310
2311         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2312                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2313
2314         if ( b->yy_is_our_buffer )
2315                 ldfree((void *) b->yy_ch_buf  );
2316
2317         ldfree((void *) b  );
2318 }
2319
2320 /* Initializes or reinitializes a buffer.
2321  * This function is sometimes called more than once on the same buffer,
2322  * such as during a ldrestart() or at EOF.
2323  */
2324     static void ld_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
2325
2326 {
2327         int oerrno = errno;
2328     
2329         ld_flush_buffer(b );
2330
2331         b->yy_input_file = file;
2332         b->yy_fill_buffer = 1;
2333
2334     /* If b is the current buffer, then ld_init_buffer was _probably_
2335      * called from ldrestart() or through yy_get_next_buffer.
2336      * In that case, we don't want to reset the lineno or column.
2337      */
2338     if (b != YY_CURRENT_BUFFER){
2339         b->yy_bs_lineno = 1;
2340         b->yy_bs_column = 0;
2341     }
2342
2343         b->yy_is_interactive = 0;
2344     
2345         errno = oerrno;
2346 }
2347
2348 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2349  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2350  * 
2351  */
2352     void ld_flush_buffer (YY_BUFFER_STATE  b )
2353 {
2354         if ( ! b )
2355                 return;
2356
2357         b->yy_n_chars = 0;
2358
2359         /* We always need two end-of-buffer characters.  The first causes
2360          * a transition to the end-of-buffer state.  The second causes
2361          * a jam in that state.
2362          */
2363         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2364         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2365
2366         b->yy_buf_pos = &b->yy_ch_buf[0];
2367
2368         b->yy_at_bol = 1;
2369         b->yy_buffer_status = YY_BUFFER_NEW;
2370
2371         if ( b == YY_CURRENT_BUFFER )
2372                 ld_load_buffer_state( );
2373 }
2374
2375 /** Pushes the new state onto the stack. The new state becomes
2376  *  the current state. This function will allocate the stack
2377  *  if necessary.
2378  *  @param new_buffer The new state.
2379  *  
2380  */
2381 void ldpush_buffer_state (YY_BUFFER_STATE new_buffer )
2382 {
2383         if (new_buffer == NULL)
2384                 return;
2385
2386         ldensure_buffer_stack();
2387
2388         /* This block is copied from ld_switch_to_buffer. */
2389         if ( YY_CURRENT_BUFFER )
2390                 {
2391                 /* Flush out information for old buffer. */
2392                 *(yy_c_buf_p) = (yy_hold_char);
2393                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2394                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2395                 }
2396
2397         /* Only push if top exists. Otherwise, replace top. */
2398         if (YY_CURRENT_BUFFER)
2399                 (yy_buffer_stack_top)++;
2400         YY_CURRENT_BUFFER_LVALUE = new_buffer;
2401
2402         /* copied from ld_switch_to_buffer. */
2403         ld_load_buffer_state( );
2404         (yy_did_buffer_switch_on_eof) = 1;
2405 }
2406
2407 /** Removes and deletes the top of the stack, if present.
2408  *  The next element becomes the new top.
2409  *  
2410  */
2411 void ldpop_buffer_state (void)
2412 {
2413         if (!YY_CURRENT_BUFFER)
2414                 return;
2415
2416         ld_delete_buffer(YY_CURRENT_BUFFER );
2417         YY_CURRENT_BUFFER_LVALUE = NULL;
2418         if ((yy_buffer_stack_top) > 0)
2419                 --(yy_buffer_stack_top);
2420
2421         if (YY_CURRENT_BUFFER) {
2422                 ld_load_buffer_state( );
2423                 (yy_did_buffer_switch_on_eof) = 1;
2424         }
2425 }
2426
2427 /* Allocates the stack if it does not exist.
2428  *  Guarantees space for at least one push.
2429  */
2430 static void ldensure_buffer_stack (void)
2431 {
2432         int num_to_alloc;
2433     
2434         if (!(yy_buffer_stack)) {
2435
2436                 /* First allocation is just for 2 elements, since we don't know if this
2437                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2438                  * immediate realloc on the next call.
2439          */
2440                 num_to_alloc = 1;
2441                 (yy_buffer_stack) = (struct yy_buffer_state**)ldalloc
2442                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
2443                                                                 );
2444                 if ( ! (yy_buffer_stack) )
2445                         YY_FATAL_ERROR( "out of dynamic memory in ldensure_buffer_stack()" );
2446                                                                   
2447                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2448                                 
2449                 (yy_buffer_stack_max) = num_to_alloc;
2450                 (yy_buffer_stack_top) = 0;
2451                 return;
2452         }
2453
2454         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2455
2456                 /* Increase the buffer to prepare for a possible push. */
2457                 int grow_size = 8 /* arbitrary grow size */;
2458
2459                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2460                 (yy_buffer_stack) = (struct yy_buffer_state**)ldrealloc
2461                                                                 ((yy_buffer_stack),
2462                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
2463                                                                 );
2464                 if ( ! (yy_buffer_stack) )
2465                         YY_FATAL_ERROR( "out of dynamic memory in ldensure_buffer_stack()" );
2466
2467                 /* zero only the new slots.*/
2468                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2469                 (yy_buffer_stack_max) = num_to_alloc;
2470         }
2471 }
2472
2473 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2474  * @param base the character buffer
2475  * @param size the size in bytes of the character buffer
2476  * 
2477  * @return the newly allocated buffer state object. 
2478  */
2479 YY_BUFFER_STATE ld_scan_buffer  (char * base, yy_size_t  size )
2480 {
2481         YY_BUFFER_STATE b;
2482     
2483         if ( size < 2 ||
2484              base[size-2] != YY_END_OF_BUFFER_CHAR ||
2485              base[size-1] != YY_END_OF_BUFFER_CHAR )
2486                 /* They forgot to leave room for the EOB's. */
2487                 return 0;
2488
2489         b = (YY_BUFFER_STATE) ldalloc(sizeof( struct yy_buffer_state )  );
2490         if ( ! b )
2491                 YY_FATAL_ERROR( "out of dynamic memory in ld_scan_buffer()" );
2492
2493         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
2494         b->yy_buf_pos = b->yy_ch_buf = base;
2495         b->yy_is_our_buffer = 0;
2496         b->yy_input_file = 0;
2497         b->yy_n_chars = b->yy_buf_size;
2498         b->yy_is_interactive = 0;
2499         b->yy_at_bol = 1;
2500         b->yy_fill_buffer = 0;
2501         b->yy_buffer_status = YY_BUFFER_NEW;
2502
2503         ld_switch_to_buffer(b  );
2504
2505         return b;
2506 }
2507
2508 /** Setup the input buffer state to scan a string. The next call to ldlex() will
2509  * scan from a @e copy of @a str.
2510  * @param yystr a NUL-terminated string to scan
2511  * 
2512  * @return the newly allocated buffer state object.
2513  * @note If you want to scan bytes that may contain NUL values, then use
2514  *       ld_scan_bytes() instead.
2515  */
2516 YY_BUFFER_STATE ld_scan_string (yyconst char * yystr )
2517 {
2518     
2519         return ld_scan_bytes(yystr,strlen(yystr) );
2520 }
2521
2522 /** Setup the input buffer state to scan the given bytes. The next call to ldlex() will
2523  * scan from a @e copy of @a bytes.
2524  * @param bytes the byte buffer to scan
2525  * @param len the number of bytes in the buffer pointed to by @a bytes.
2526  * 
2527  * @return the newly allocated buffer state object.
2528  */
2529 YY_BUFFER_STATE ld_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
2530 {
2531         YY_BUFFER_STATE b;
2532         char *buf;
2533         yy_size_t n;
2534         int i;
2535     
2536         /* Get memory for full buffer, including space for trailing EOB's. */
2537         n = _yybytes_len + 2;
2538         buf = (char *) ldalloc(n  );
2539         if ( ! buf )
2540                 YY_FATAL_ERROR( "out of dynamic memory in ld_scan_bytes()" );
2541
2542         for ( i = 0; i < _yybytes_len; ++i )
2543                 buf[i] = yybytes[i];
2544
2545         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2546
2547         b = ld_scan_buffer(buf,n );
2548         if ( ! b )
2549                 YY_FATAL_ERROR( "bad buffer in ld_scan_bytes()" );
2550
2551         /* It's okay to grow etc. this buffer, and we should throw it
2552          * away when we're done.
2553          */
2554         b->yy_is_our_buffer = 1;
2555
2556         return b;
2557 }
2558
2559 #ifndef YY_EXIT_FAILURE
2560 #define YY_EXIT_FAILURE 2
2561 #endif
2562
2563 static void yy_fatal_error (yyconst char* msg )
2564 {
2565         (void) fprintf( stderr, "%s\n", msg );
2566         exit( YY_EXIT_FAILURE );
2567 }
2568
2569 /* Redefine yyless() so it works in section 3 code. */
2570
2571 #undef yyless
2572 #define yyless(n) \
2573         do \
2574                 { \
2575                 /* Undo effects of setting up ldtext. */ \
2576         int yyless_macro_arg = (n); \
2577         YY_LESS_LINENO(yyless_macro_arg);\
2578                 ldtext[ldleng] = (yy_hold_char); \
2579                 (yy_c_buf_p) = ldtext + yyless_macro_arg; \
2580                 (yy_hold_char) = *(yy_c_buf_p); \
2581                 *(yy_c_buf_p) = '\0'; \
2582                 ldleng = yyless_macro_arg; \
2583                 } \
2584         while ( 0 )
2585
2586 /* Accessor  methods (get/set functions) to struct members. */
2587
2588 /** Get the current line number.
2589  * 
2590  */
2591 int ldget_lineno  (void)
2592 {
2593         
2594     return ldlineno;
2595 }
2596
2597 /** Get the input stream.
2598  * 
2599  */
2600 FILE *ldget_in  (void)
2601 {
2602         return ldin;
2603 }
2604
2605 /** Get the output stream.
2606  * 
2607  */
2608 FILE *ldget_out  (void)
2609 {
2610         return ldout;
2611 }
2612
2613 /** Get the length of the current token.
2614  * 
2615  */
2616 int ldget_leng  (void)
2617 {
2618         return ldleng;
2619 }
2620
2621 /** Get the current token.
2622  * 
2623  */
2624
2625 char *ldget_text  (void)
2626 {
2627         return ldtext;
2628 }
2629
2630 /** Set the current line number.
2631  * @param line_number
2632  * 
2633  */
2634 void ldset_lineno (int  line_number )
2635 {
2636     
2637     ldlineno = line_number;
2638 }
2639
2640 /** Set the input stream. This does not discard the current
2641  * input buffer.
2642  * @param in_str A readable stream.
2643  * 
2644  * @see ld_switch_to_buffer
2645  */
2646 void ldset_in (FILE *  in_str )
2647 {
2648         ldin = in_str ;
2649 }
2650
2651 void ldset_out (FILE *  out_str )
2652 {
2653         ldout = out_str ;
2654 }
2655
2656 int ldget_debug  (void)
2657 {
2658         return ld_flex_debug;
2659 }
2660
2661 void ldset_debug (int  bdebug )
2662 {
2663         ld_flex_debug = bdebug ;
2664 }
2665
2666 static int yy_init_globals (void)
2667 {
2668         /* Initialization is the same as for the non-reentrant scanner.
2669      * This function is called from ldlex_destroy(), so don't allocate here.
2670      */
2671
2672     /* We do not touch ldlineno unless the option is enabled. */
2673     ldlineno =  1;
2674     
2675     (yy_buffer_stack) = 0;
2676     (yy_buffer_stack_top) = 0;
2677     (yy_buffer_stack_max) = 0;
2678     (yy_c_buf_p) = (char *) 0;
2679     (yy_init) = 0;
2680     (yy_start) = 0;
2681
2682 /* Defined in main.c */
2683 #ifdef YY_STDINIT
2684     ldin = stdin;
2685     ldout = stdout;
2686 #else
2687     ldin = (FILE *) 0;
2688     ldout = (FILE *) 0;
2689 #endif
2690
2691     /* For future reference: Set errno on error, since we are called by
2692      * ldlex_init()
2693      */
2694     return 0;
2695 }
2696
2697 /* ldlex_destroy is for both reentrant and non-reentrant scanners. */
2698 int ldlex_destroy  (void)
2699 {
2700     
2701     /* Pop the buffer stack, destroying each element. */
2702         while(YY_CURRENT_BUFFER){
2703                 ld_delete_buffer(YY_CURRENT_BUFFER  );
2704                 YY_CURRENT_BUFFER_LVALUE = NULL;
2705                 ldpop_buffer_state();
2706         }
2707
2708         /* Destroy the stack itself. */
2709         ldfree((yy_buffer_stack) );
2710         (yy_buffer_stack) = NULL;
2711
2712     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2713      * ldlex() is called, initialization will occur. */
2714     yy_init_globals( );
2715
2716     return 0;
2717 }
2718
2719 /*
2720  * Internal utility routines.
2721  */
2722
2723 #ifndef yytext_ptr
2724 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2725 {
2726         register int i;
2727         for ( i = 0; i < n; ++i )
2728                 s1[i] = s2[i];
2729 }
2730 #endif
2731
2732 #ifdef YY_NEED_STRLEN
2733 static int yy_flex_strlen (yyconst char * s )
2734 {
2735         register int n;
2736         for ( n = 0; s[n]; ++n )
2737                 ;
2738
2739         return n;
2740 }
2741 #endif
2742
2743 void *ldalloc (yy_size_t  size )
2744 {
2745         return (void *) malloc( size );
2746 }
2747
2748 void *ldrealloc  (void * ptr, yy_size_t  size )
2749 {
2750         /* The cast to (char *) in the following accommodates both
2751          * implementations that use char* generic pointers, and those
2752          * that use void* generic pointers.  It works with the latter
2753          * because both ANSI C and C++ allow castless assignment from
2754          * any pointer type to void*, and deal with argument conversions
2755          * as though doing an assignment.
2756          */
2757         return (void *) realloc( (char *) ptr, size );
2758 }
2759
2760 void ldfree (void * ptr )
2761 {
2762         free( (char *) ptr );   /* see ldrealloc() for (char *) cast */
2763 }
2764
2765 #define YYTABLES_NAME "yytables"
2766
2767 #line 198 "ldlex.l"
2768
2769
2770
2771 static void
2772 eat_comment (void)
2773 {
2774   while (1)
2775     {
2776       int c = input ();
2777
2778       while (c != '*' && c != EOF)
2779         c = input ();
2780
2781       if (c == '*')
2782         {
2783           c = input ();
2784           while (c == '*')
2785             c = input ();
2786           if (c == '/')
2787             break;
2788         }
2789
2790       if (c == EOF)
2791         {
2792           /* XXX Use the setjmp buffer and signal EOF in comment */
2793           error (0, 0, gettext ("EOF in comment"));
2794           break;
2795         }
2796     }
2797 }
2798
2799
2800 static void
2801 eat_to_eol (bool empty)
2802 {
2803   bool warned = false;
2804
2805   while (1)
2806     {
2807       int c = input ();
2808
2809       if (c == EOF)
2810         break;
2811       if (c == '\n')
2812         {
2813           ++ldlineno;
2814           break;
2815         }
2816
2817       if (empty && ! isspace (c) && ! warned)
2818         {
2819           error (0, 0, gettext ("%d: garbage at end of line"), ldlineno);
2820           warned = true;
2821         }
2822     }
2823 }
2824
2825
2826 static int
2827 attrib_convert (int c)
2828 {
2829   if (c == 'X')
2830     return PF_X;
2831   if (c == 'W')
2832     return PF_W;
2833   assert (c == 'R');
2834   return PF_R;
2835 }
2836
2837
2838 static void
2839 push_state (enum prepstate state)
2840 {
2841   if (prepdepth >= MAX_PREPDEPTH)
2842     error (EXIT_FAILURE, 0, gettext ("%d: conditionals nested too deep"),
2843            ldlineno);
2844
2845   prepstate[prepdepth++] = state;
2846 }
2847
2848
2849 static int
2850 pop_state (void)
2851 {
2852   if (prepdepth == 0)
2853     error (0, 0, gettext ("%d: unexpected #endif"), ldlineno);
2854   else
2855     --prepdepth;
2856
2857   return prepdepth == 0 ? INITIAL : IGNORE;
2858 }
2859
2860
2861 static int
2862 handle_ifdef (void)
2863 {
2864   char idbuf[50];
2865   char *id = idbuf;
2866   size_t idlen = 0;
2867   size_t idmax = sizeof (idbuf);
2868   bool ignore_ws = true;
2869   bool defined = false;
2870   int result;
2871
2872   while (1)
2873     {
2874       int c = input ();
2875
2876       if (isspace (c) && ignore_ws)
2877         continue;
2878
2879       if (c != '_' && (c < 'a' || c > 'z') && (c < 'A' || c > 'Z')
2880           && (idlen == 0 || c < '0' || c > '9'))
2881         {
2882           unput (c);
2883           break;
2884         }
2885
2886       if (idlen == idmax)
2887         {
2888           char *newp = (char *) alloca (idmax *= 2);
2889           id = memcpy (newp, id, idlen);
2890         }
2891
2892       id[idlen++] = c;
2893       ignore_ws = false;
2894     }
2895
2896   /* XXX Compare in a better way.  */
2897   if (idlen == 6 && strncmp (id, "SHARED", 6) == 0)
2898     defined = ld_state.file_type == dso_file_type;
2899
2900   if (defined)
2901     result = INITIAL;
2902   else
2903     {
2904       push_state (skip_if);
2905       result = IGNORE;
2906     }
2907
2908   return result;
2909 }
2910
2911
2912 static void
2913 invalid_char (int ch)
2914 {
2915   error (0, 0, (isascii (ch)
2916                 ? gettext ("invalid character '%c' at line %d; ignored")
2917                 : gettext ("invalid character '\\%o' at line %d; ignored")),
2918          ch, ldlineno);
2919 }
2920
2921
2922 // Local Variables:
2923 // mode: C
2924 // End:
2925