s4-heimdal: fixed the use of error_message() in heimdal
[sfrench/samba-autobuild/.git] / source4 / heimdal / lib / com_err / lex.c
1 #include "config.h"
2
3 #line 3 "heimdal/lib/com_err/lex.c"
4
5 #define  YY_INT_ALIGNED short int
6
7 /* A lexical scanner generated by flex */
8
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 35
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16
17 /* First, we deal with  platform-specific or compiler-specific issues. */
18
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
24
25 /* end standard C headers. */
26
27 /* flex integer type definitions */
28
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
31
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37  * if you want the limit (max/min) macros for int types. 
38  */
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
41 #endif
42
43 #include <inttypes.h>
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
50 #else
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t; 
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
57 #endif /* ! C99 */
58
59 /* Limits of integral types. */
60 #ifndef INT8_MIN
61 #define INT8_MIN               (-128)
62 #endif
63 #ifndef INT16_MIN
64 #define INT16_MIN              (-32767-1)
65 #endif
66 #ifndef INT32_MIN
67 #define INT32_MIN              (-2147483647-1)
68 #endif
69 #ifndef INT8_MAX
70 #define INT8_MAX               (127)
71 #endif
72 #ifndef INT16_MAX
73 #define INT16_MAX              (32767)
74 #endif
75 #ifndef INT32_MAX
76 #define INT32_MAX              (2147483647)
77 #endif
78 #ifndef UINT8_MAX
79 #define UINT8_MAX              (255U)
80 #endif
81 #ifndef UINT16_MAX
82 #define UINT16_MAX             (65535U)
83 #endif
84 #ifndef UINT32_MAX
85 #define UINT32_MAX             (4294967295U)
86 #endif
87
88 #endif /* ! FLEXINT_H */
89
90 #ifdef __cplusplus
91
92 /* The "const" storage-class-modifier is valid. */
93 #define YY_USE_CONST
94
95 #else   /* ! __cplusplus */
96
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
99
100 #define YY_USE_CONST
101
102 #endif  /* defined (__STDC__) */
103 #endif  /* ! __cplusplus */
104
105 #ifdef YY_USE_CONST
106 #define yyconst const
107 #else
108 #define yyconst
109 #endif
110
111 /* Returned upon end-of-file. */
112 #define YY_NULL 0
113
114 /* Promotes a possibly negative, possibly signed char to an unsigned
115  * integer for use as an array index.  If the signed char is negative,
116  * we want to instead treat it as an 8-bit unsigned char, hence the
117  * double cast.
118  */
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120
121 /* Enter a start condition.  This macro really ought to take a parameter,
122  * but we do it the disgusting crufty way forced on us by the ()-less
123  * definition of BEGIN.
124  */
125 #define BEGIN (yy_start) = 1 + 2 *
126
127 /* Translate the current start state into a value that can be later handed
128  * to BEGIN to return to the state.  The YYSTATE alias is for lex
129  * compatibility.
130  */
131 #define YY_START (((yy_start) - 1) / 2)
132 #define YYSTATE YY_START
133
134 /* Action number for EOF rule of a given start state. */
135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136
137 /* Special action meaning "start processing a new file". */
138 #define YY_NEW_FILE yyrestart(yyin  )
139
140 #define YY_END_OF_BUFFER_CHAR 0
141
142 /* Size of default input buffer. */
143 #ifndef YY_BUF_SIZE
144 #define YY_BUF_SIZE 16384
145 #endif
146
147 /* The state buf must be large enough to hold one state per character in the main buffer.
148  */
149 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
150
151 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
152 #define YY_TYPEDEF_YY_BUFFER_STATE
153 typedef struct yy_buffer_state *YY_BUFFER_STATE;
154 #endif
155
156 extern int yyleng;
157
158 extern FILE *yyin, *yyout;
159
160 #define EOB_ACT_CONTINUE_SCAN 0
161 #define EOB_ACT_END_OF_FILE 1
162 #define EOB_ACT_LAST_MATCH 2
163
164     #define YY_LESS_LINENO(n)
165     
166 /* Return all but the first "n" matched characters back to the input stream. */
167 #define yyless(n) \
168         do \
169                 { \
170                 /* Undo effects of setting up yytext. */ \
171         int yyless_macro_arg = (n); \
172         YY_LESS_LINENO(yyless_macro_arg);\
173                 *yy_cp = (yy_hold_char); \
174                 YY_RESTORE_YY_MORE_OFFSET \
175                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
176                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
177                 } \
178         while ( 0 )
179
180 #define unput(c) yyunput( c, (yytext_ptr)  )
181
182 #ifndef YY_TYPEDEF_YY_SIZE_T
183 #define YY_TYPEDEF_YY_SIZE_T
184 typedef size_t yy_size_t;
185 #endif
186
187 #ifndef YY_STRUCT_YY_BUFFER_STATE
188 #define YY_STRUCT_YY_BUFFER_STATE
189 struct yy_buffer_state
190         {
191         FILE *yy_input_file;
192
193         char *yy_ch_buf;                /* input buffer */
194         char *yy_buf_pos;               /* current position in input buffer */
195
196         /* Size of input buffer in bytes, not including room for EOB
197          * characters.
198          */
199         yy_size_t yy_buf_size;
200
201         /* Number of characters read into yy_ch_buf, not including EOB
202          * characters.
203          */
204         int yy_n_chars;
205
206         /* Whether we "own" the buffer - i.e., we know we created it,
207          * and can realloc() it to grow it, and should free() it to
208          * delete it.
209          */
210         int yy_is_our_buffer;
211
212         /* Whether this is an "interactive" input source; if so, and
213          * if we're using stdio for input, then we want to use getc()
214          * instead of fread(), to make sure we stop fetching input after
215          * each newline.
216          */
217         int yy_is_interactive;
218
219         /* Whether we're considered to be at the beginning of a line.
220          * If so, '^' rules will be active on the next match, otherwise
221          * not.
222          */
223         int yy_at_bol;
224
225     int yy_bs_lineno; /**< The line count. */
226     int yy_bs_column; /**< The column count. */
227     
228         /* Whether to try to fill the input buffer when we reach the
229          * end of it.
230          */
231         int yy_fill_buffer;
232
233         int yy_buffer_status;
234
235 #define YY_BUFFER_NEW 0
236 #define YY_BUFFER_NORMAL 1
237         /* When an EOF's been seen but there's still some text to process
238          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
239          * shouldn't try reading from the input source any more.  We might
240          * still have a bunch of tokens to match, though, because of
241          * possible backing-up.
242          *
243          * When we actually see the EOF, we change the status to "new"
244          * (via yyrestart()), so that the user can continue scanning by
245          * just pointing yyin at a new input file.
246          */
247 #define YY_BUFFER_EOF_PENDING 2
248
249         };
250 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
251
252 /* Stack of input buffers. */
253 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
254 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
255 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
256
257 /* We provide macros for accessing buffer states in case in the
258  * future we want to put the buffer states in a more general
259  * "scanner state".
260  *
261  * Returns the top of the stack, or NULL.
262  */
263 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
264                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
265                           : NULL)
266
267 /* Same as previous macro, but useful when we know that the buffer stack is not
268  * NULL or when we need an lvalue. For internal use only.
269  */
270 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
271
272 /* yy_hold_char holds the character lost when yytext is formed. */
273 static char yy_hold_char;
274 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
275 int yyleng;
276
277 /* Points to current character in buffer. */
278 static char *yy_c_buf_p = (char *) 0;
279 static int yy_init = 0;         /* whether we need to initialize */
280 static int yy_start = 0;        /* start state number */
281
282 /* Flag which is used to allow yywrap()'s to do buffer switches
283  * instead of setting up a fresh yyin.  A bit of a hack ...
284  */
285 static int yy_did_buffer_switch_on_eof;
286
287 void yyrestart (FILE *input_file  );
288 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
289 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
290 void yy_delete_buffer (YY_BUFFER_STATE b  );
291 void yy_flush_buffer (YY_BUFFER_STATE b  );
292 void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
293 void yypop_buffer_state (void );
294
295 static void yyensure_buffer_stack (void );
296 static void yy_load_buffer_state (void );
297 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
298
299 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
300
301 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
302 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
303 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
304
305 void *yyalloc (yy_size_t  );
306 void *yyrealloc (void *,yy_size_t  );
307 void yyfree (void *  );
308
309 #define yy_new_buffer yy_create_buffer
310
311 #define yy_set_interactive(is_interactive) \
312         { \
313         if ( ! YY_CURRENT_BUFFER ){ \
314         yyensure_buffer_stack (); \
315                 YY_CURRENT_BUFFER_LVALUE =    \
316             yy_create_buffer(yyin,YY_BUF_SIZE ); \
317         } \
318         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
319         }
320
321 #define yy_set_bol(at_bol) \
322         { \
323         if ( ! YY_CURRENT_BUFFER ){\
324         yyensure_buffer_stack (); \
325                 YY_CURRENT_BUFFER_LVALUE =    \
326             yy_create_buffer(yyin,YY_BUF_SIZE ); \
327         } \
328         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
329         }
330
331 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
332
333 /* Begin user sect3 */
334
335 typedef unsigned char YY_CHAR;
336
337 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
338
339 typedef int yy_state_type;
340
341 extern int yylineno;
342
343 int yylineno = 1;
344
345 extern char *yytext;
346 #define yytext_ptr yytext
347
348 static yy_state_type yy_get_previous_state (void );
349 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
350 static int yy_get_next_buffer (void );
351 static void yy_fatal_error (yyconst char msg[]  );
352
353 /* Done after the current pattern has been matched and before the
354  * corresponding action - sets up yytext.
355  */
356 #define YY_DO_BEFORE_ACTION \
357         (yytext_ptr) = yy_bp; \
358         yyleng = (size_t) (yy_cp - yy_bp); \
359         (yy_hold_char) = *yy_cp; \
360         *yy_cp = '\0'; \
361         (yy_c_buf_p) = yy_cp;
362
363 #define YY_NUM_RULES 16
364 #define YY_END_OF_BUFFER 17
365 /* This struct is not used in this scanner,
366    but its presence is necessary. */
367 struct yy_trans_info
368         {
369         flex_int32_t yy_verify;
370         flex_int32_t yy_nxt;
371         };
372 static yyconst flex_int16_t yy_accept[46] =
373     {   0,
374         0,    0,   17,   15,   11,   12,   13,   10,    9,   14,
375        14,   14,   14,   10,    9,   14,    3,   14,   14,    1,
376         7,   14,   14,    8,   14,   14,   14,   14,   14,   14,
377        14,    6,   14,   14,    5,   14,   14,   14,   14,   14,
378        14,    4,   14,    2,    0
379     } ;
380
381 static yyconst flex_int32_t yy_ec[256] =
382     {   0,
383         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
384         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
385         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
386         1,    2,    1,    4,    5,    1,    1,    1,    1,    1,
387         1,    1,    1,    1,    1,    1,    1,    6,    6,    6,
388         6,    6,    6,    6,    6,    6,    6,    1,    1,    1,
389         1,    1,    1,    1,    7,    7,    7,    7,    7,    7,
390         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
391         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
392         1,    1,    1,    1,    8,    1,    9,   10,   11,   12,
393
394        13,   14,    7,    7,   15,    7,    7,   16,    7,   17,
395        18,   19,    7,   20,    7,   21,    7,    7,    7,   22,
396         7,    7,    1,    1,    1,    1,    1,    1,    1,    1,
397         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
398         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
399         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
400         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
401         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
402         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
403         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
404
405         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
406         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
407         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
408         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
409         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
410         1,    1,    1,    1,    1
411     } ;
412
413 static yyconst flex_int32_t yy_meta[23] =
414     {   0,
415         1,    1,    2,    1,    1,    3,    3,    3,    3,    3,
416         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
417         3,    3
418     } ;
419
420 static yyconst flex_int16_t yy_base[48] =
421     {   0,
422         0,    0,   56,   57,   57,   57,   57,    0,   49,    0,
423        12,   13,   34,    0,   47,    0,    0,   40,   31,    0,
424         0,   38,   36,    0,   30,   34,   32,   25,   22,   28,
425        34,    0,   19,   13,    0,   22,   30,   26,   26,   18,
426        12,    0,   14,    0,   57,   34,   23
427     } ;
428
429 static yyconst flex_int16_t yy_def[48] =
430     {   0,
431        45,    1,   45,   45,   45,   45,   45,   46,   47,   47,
432        47,   47,   47,   46,   47,   47,   47,   47,   47,   47,
433        47,   47,   47,   47,   47,   47,   47,   47,   47,   47,
434        47,   47,   47,   47,   47,   47,   47,   47,   47,   47,
435        47,   47,   47,   47,    0,   45,   45
436     } ;
437
438 static yyconst flex_int16_t yy_nxt[80] =
439     {   0,
440         4,    5,    6,    7,    8,    9,   10,   10,   10,   10,
441        10,   10,   11,   10,   12,   10,   10,   10,   13,   10,
442        10,   10,   17,   36,   21,   16,   44,   43,   18,   22,
443        42,   19,   20,   37,   14,   41,   14,   40,   39,   38,
444        35,   34,   33,   32,   31,   30,   29,   28,   27,   26,
445        25,   24,   15,   23,   15,   45,    3,   45,   45,   45,
446        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
447        45,   45,   45,   45,   45,   45,   45,   45,   45
448     } ;
449
450 static yyconst flex_int16_t yy_chk[80] =
451     {   0,
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,   11,   34,   12,   47,   43,   41,   11,   12,
455        40,   11,   11,   34,   46,   39,   46,   38,   37,   36,
456        33,   31,   30,   29,   28,   27,   26,   25,   23,   22,
457        19,   18,   15,   13,    9,    3,   45,   45,   45,   45,
458        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
459        45,   45,   45,   45,   45,   45,   45,   45,   45
460     } ;
461
462 static yy_state_type yy_last_accepting_state;
463 static char *yy_last_accepting_cpos;
464
465 extern int yy_flex_debug;
466 int yy_flex_debug = 0;
467
468 /* The intent behind this definition is that it'll catch
469  * any uses of REJECT which flex missed.
470  */
471 #define REJECT reject_used_but_not_detected
472 #define yymore() yymore_used_but_not_detected
473 #define YY_MORE_ADJ 0
474 #define YY_RESTORE_YY_MORE_OFFSET
475 char *yytext;
476 #line 1 "lex.l"
477 #line 2 "lex.l"
478 /*
479  * Copyright (c) 1998 - 2000 Kungliga Tekniska Högskolan
480  * (Royal Institute of Technology, Stockholm, Sweden).
481  * All rights reserved.
482  *
483  * Redistribution and use in source and binary forms, with or without
484  * modification, are permitted provided that the following conditions
485  * are met:
486  *
487  * 1. Redistributions of source code must retain the above copyright
488  *    notice, this list of conditions and the following disclaimer.
489  *
490  * 2. Redistributions in binary form must reproduce the above copyright
491  *    notice, this list of conditions and the following disclaimer in the
492  *    documentation and/or other materials provided with the distribution.
493  *
494  * 3. Neither the name of the Institute nor the names of its contributors
495  *    may be used to endorse or promote products derived from this software
496  *    without specific prior written permission.
497  *
498  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
499  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
500  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
501  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
502  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
503  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
504  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
505  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
506  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
507  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
508  * SUCH DAMAGE.
509  */
510
511 /*
512  * This is to handle the definition of this symbol in some AIX
513  * headers, which will conflict with the definition that lex will
514  * generate for it.  It's only a problem for AIX lex.
515  */
516
517 #undef ECHO
518
519 #include "compile_et.h"
520 #include "parse.h"
521 #include "lex.h"
522
523 static unsigned lineno = 1;
524 static int getstring(void);
525
526 #define YY_NO_UNPUT
527
528 #undef ECHO
529
530 #line 530 "heimdal/lib/com_err/lex.c"
531
532 #define INITIAL 0
533
534 #ifndef YY_NO_UNISTD_H
535 /* Special case for "unistd.h", since it is non-ANSI. We include it way
536  * down here because we want the user's section 1 to have been scanned first.
537  * The user has a chance to override it with an option.
538  */
539 #include <unistd.h>
540 #endif
541
542 #ifndef YY_EXTRA_TYPE
543 #define YY_EXTRA_TYPE void *
544 #endif
545
546 static int yy_init_globals (void );
547
548 /* Accessor methods to globals.
549    These are made visible to non-reentrant scanners for convenience. */
550
551 int yylex_destroy (void );
552
553 int yyget_debug (void );
554
555 void yyset_debug (int debug_flag  );
556
557 YY_EXTRA_TYPE yyget_extra (void );
558
559 void yyset_extra (YY_EXTRA_TYPE user_defined  );
560
561 FILE *yyget_in (void );
562
563 void yyset_in  (FILE * in_str  );
564
565 FILE *yyget_out (void );
566
567 void yyset_out  (FILE * out_str  );
568
569 int yyget_leng (void );
570
571 char *yyget_text (void );
572
573 int yyget_lineno (void );
574
575 void yyset_lineno (int line_number  );
576
577 /* Macros after this point can all be overridden by user definitions in
578  * section 1.
579  */
580
581 #ifndef YY_SKIP_YYWRAP
582 #ifdef __cplusplus
583 extern "C" int yywrap (void );
584 #else
585 extern int yywrap (void );
586 #endif
587 #endif
588
589     static void yyunput (int c,char *buf_ptr  );
590     
591 #ifndef yytext_ptr
592 static void yy_flex_strncpy (char *,yyconst char *,int );
593 #endif
594
595 #ifdef YY_NEED_STRLEN
596 static int yy_flex_strlen (yyconst char * );
597 #endif
598
599 #ifndef YY_NO_INPUT
600
601 #ifdef __cplusplus
602 static int yyinput (void );
603 #else
604 static int input (void );
605 #endif
606
607 #endif
608
609 /* Amount of stuff to slurp up with each read. */
610 #ifndef YY_READ_BUF_SIZE
611 #define YY_READ_BUF_SIZE 8192
612 #endif
613
614 /* Copy whatever the last rule matched to the standard output. */
615 #ifndef ECHO
616 /* This used to be an fputs(), but since the string might contain NUL's,
617  * we now use fwrite().
618  */
619 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
620 #endif
621
622 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
623  * is returned in "result".
624  */
625 #ifndef YY_INPUT
626 #define YY_INPUT(buf,result,max_size) \
627         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
628                 { \
629                 int c = '*'; \
630                 unsigned n; \
631                 for ( n = 0; n < max_size && \
632                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
633                         buf[n] = (char) c; \
634                 if ( c == '\n' ) \
635                         buf[n++] = (char) c; \
636                 if ( c == EOF && ferror( yyin ) ) \
637                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
638                 result = n; \
639                 } \
640         else \
641                 { \
642                 errno=0; \
643                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
644                         { \
645                         if( errno != EINTR) \
646                                 { \
647                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
648                                 break; \
649                                 } \
650                         errno=0; \
651                         clearerr(yyin); \
652                         } \
653                 }\
654 \
655
656 #endif
657
658 /* No semi-colon after return; correct usage is to write "yyterminate();" -
659  * we don't want an extra ';' after the "return" because that will cause
660  * some compilers to complain about unreachable statements.
661  */
662 #ifndef yyterminate
663 #define yyterminate() return YY_NULL
664 #endif
665
666 /* Number of entries by which start-condition stack grows. */
667 #ifndef YY_START_STACK_INCR
668 #define YY_START_STACK_INCR 25
669 #endif
670
671 /* Report a fatal error. */
672 #ifndef YY_FATAL_ERROR
673 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
674 #endif
675
676 /* end tables serialization structures and prototypes */
677
678 /* Default declaration of generated scanner - a define so the user can
679  * easily add parameters.
680  */
681 #ifndef YY_DECL
682 #define YY_DECL_IS_OURS 1
683
684 extern int yylex (void);
685
686 #define YY_DECL int yylex (void)
687 #endif /* !YY_DECL */
688
689 /* Code executed at the beginning of each rule, after yytext and yyleng
690  * have been set up.
691  */
692 #ifndef YY_USER_ACTION
693 #define YY_USER_ACTION
694 #endif
695
696 /* Code executed at the end of each rule. */
697 #ifndef YY_BREAK
698 #define YY_BREAK break;
699 #endif
700
701 #define YY_RULE_SETUP \
702         YY_USER_ACTION
703
704 /** The main scanner function which does all the work.
705  */
706 YY_DECL
707 {
708         register yy_state_type yy_current_state;
709         register char *yy_cp, *yy_bp;
710         register int yy_act;
711     
712 #line 57 "lex.l"
713
714 #line 714 "heimdal/lib/com_err/lex.c"
715
716         if ( !(yy_init) )
717                 {
718                 (yy_init) = 1;
719
720 #ifdef YY_USER_INIT
721                 YY_USER_INIT;
722 #endif
723
724                 if ( ! (yy_start) )
725                         (yy_start) = 1; /* first start state */
726
727                 if ( ! yyin )
728                         yyin = stdin;
729
730                 if ( ! yyout )
731                         yyout = stdout;
732
733                 if ( ! YY_CURRENT_BUFFER ) {
734                         yyensure_buffer_stack ();
735                         YY_CURRENT_BUFFER_LVALUE =
736                                 yy_create_buffer(yyin,YY_BUF_SIZE );
737                 }
738
739                 yy_load_buffer_state( );
740                 }
741
742         while ( 1 )             /* loops until end-of-file is reached */
743                 {
744                 yy_cp = (yy_c_buf_p);
745
746                 /* Support of yytext. */
747                 *yy_cp = (yy_hold_char);
748
749                 /* yy_bp points to the position in yy_ch_buf of the start of
750                  * the current run.
751                  */
752                 yy_bp = yy_cp;
753
754                 yy_current_state = (yy_start);
755 yy_match:
756                 do
757                         {
758                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
759                         if ( yy_accept[yy_current_state] )
760                                 {
761                                 (yy_last_accepting_state) = yy_current_state;
762                                 (yy_last_accepting_cpos) = yy_cp;
763                                 }
764                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
765                                 {
766                                 yy_current_state = (int) yy_def[yy_current_state];
767                                 if ( yy_current_state >= 46 )
768                                         yy_c = yy_meta[(unsigned int) yy_c];
769                                 }
770                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
771                         ++yy_cp;
772                         }
773                 while ( yy_base[yy_current_state] != 57 );
774
775 yy_find_action:
776                 yy_act = yy_accept[yy_current_state];
777                 if ( yy_act == 0 )
778                         { /* have to back up */
779                         yy_cp = (yy_last_accepting_cpos);
780                         yy_current_state = (yy_last_accepting_state);
781                         yy_act = yy_accept[yy_current_state];
782                         }
783
784                 YY_DO_BEFORE_ACTION;
785
786 do_action:      /* This label is used only to access EOF actions. */
787
788                 switch ( yy_act )
789         { /* beginning of action switch */
790                         case 0: /* must back up */
791                         /* undo the effects of YY_DO_BEFORE_ACTION */
792                         *yy_cp = (yy_hold_char);
793                         yy_cp = (yy_last_accepting_cpos);
794                         yy_current_state = (yy_last_accepting_state);
795                         goto yy_find_action;
796
797 case 1:
798 YY_RULE_SETUP
799 #line 58 "lex.l"
800 { return ET; }
801         YY_BREAK
802 case 2:
803 YY_RULE_SETUP
804 #line 59 "lex.l"
805 { return ET; }
806         YY_BREAK
807 case 3:
808 YY_RULE_SETUP
809 #line 60 "lex.l"
810 { return EC; }
811         YY_BREAK
812 case 4:
813 YY_RULE_SETUP
814 #line 61 "lex.l"
815 { return EC; }
816         YY_BREAK
817 case 5:
818 YY_RULE_SETUP
819 #line 62 "lex.l"
820 { return PREFIX; }
821         YY_BREAK
822 case 6:
823 YY_RULE_SETUP
824 #line 63 "lex.l"
825 { return INDEX; }
826         YY_BREAK
827 case 7:
828 YY_RULE_SETUP
829 #line 64 "lex.l"
830 { return ID; }
831         YY_BREAK
832 case 8:
833 YY_RULE_SETUP
834 #line 65 "lex.l"
835 { return END; }
836         YY_BREAK
837 case 9:
838 YY_RULE_SETUP
839 #line 66 "lex.l"
840 { yylval.number = atoi(yytext); return NUMBER; }
841         YY_BREAK
842 case 10:
843 YY_RULE_SETUP
844 #line 67 "lex.l"
845 ;
846         YY_BREAK
847 case 11:
848 YY_RULE_SETUP
849 #line 68 "lex.l"
850 ;
851         YY_BREAK
852 case 12:
853 /* rule 12 can match eol */
854 YY_RULE_SETUP
855 #line 69 "lex.l"
856 { lineno++; }
857         YY_BREAK
858 case 13:
859 YY_RULE_SETUP
860 #line 70 "lex.l"
861 { return getstring(); }
862         YY_BREAK
863 case 14:
864 YY_RULE_SETUP
865 #line 71 "lex.l"
866 { yylval.string = strdup(yytext); return STRING; }
867         YY_BREAK
868 case 15:
869 YY_RULE_SETUP
870 #line 72 "lex.l"
871 { return *yytext; }
872         YY_BREAK
873 case 16:
874 YY_RULE_SETUP
875 #line 73 "lex.l"
876 ECHO;
877         YY_BREAK
878 #line 878 "heimdal/lib/com_err/lex.c"
879 case YY_STATE_EOF(INITIAL):
880         yyterminate();
881
882         case YY_END_OF_BUFFER:
883                 {
884                 /* Amount of text matched not including the EOB char. */
885                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
886
887                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
888                 *yy_cp = (yy_hold_char);
889                 YY_RESTORE_YY_MORE_OFFSET
890
891                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
892                         {
893                         /* We're scanning a new file or input source.  It's
894                          * possible that this happened because the user
895                          * just pointed yyin at a new source and called
896                          * yylex().  If so, then we have to assure
897                          * consistency between YY_CURRENT_BUFFER and our
898                          * globals.  Here is the right place to do so, because
899                          * this is the first action (other than possibly a
900                          * back-up) that will match for the new input source.
901                          */
902                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
903                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
904                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
905                         }
906
907                 /* Note that here we test for yy_c_buf_p "<=" to the position
908                  * of the first EOB in the buffer, since yy_c_buf_p will
909                  * already have been incremented past the NUL character
910                  * (since all states make transitions on EOB to the
911                  * end-of-buffer state).  Contrast this with the test
912                  * in input().
913                  */
914                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
915                         { /* This was really a NUL. */
916                         yy_state_type yy_next_state;
917
918                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
919
920                         yy_current_state = yy_get_previous_state(  );
921
922                         /* Okay, we're now positioned to make the NUL
923                          * transition.  We couldn't have
924                          * yy_get_previous_state() go ahead and do it
925                          * for us because it doesn't know how to deal
926                          * with the possibility of jamming (and we don't
927                          * want to build jamming into it because then it
928                          * will run more slowly).
929                          */
930
931                         yy_next_state = yy_try_NUL_trans( yy_current_state );
932
933                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
934
935                         if ( yy_next_state )
936                                 {
937                                 /* Consume the NUL. */
938                                 yy_cp = ++(yy_c_buf_p);
939                                 yy_current_state = yy_next_state;
940                                 goto yy_match;
941                                 }
942
943                         else
944                                 {
945                                 yy_cp = (yy_c_buf_p);
946                                 goto yy_find_action;
947                                 }
948                         }
949
950                 else switch ( yy_get_next_buffer(  ) )
951                         {
952                         case EOB_ACT_END_OF_FILE:
953                                 {
954                                 (yy_did_buffer_switch_on_eof) = 0;
955
956                                 if ( yywrap( ) )
957                                         {
958                                         /* Note: because we've taken care in
959                                          * yy_get_next_buffer() to have set up
960                                          * yytext, we can now set up
961                                          * yy_c_buf_p so that if some total
962                                          * hoser (like flex itself) wants to
963                                          * call the scanner after we return the
964                                          * YY_NULL, it'll still work - another
965                                          * YY_NULL will get returned.
966                                          */
967                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
968
969                                         yy_act = YY_STATE_EOF(YY_START);
970                                         goto do_action;
971                                         }
972
973                                 else
974                                         {
975                                         if ( ! (yy_did_buffer_switch_on_eof) )
976                                                 YY_NEW_FILE;
977                                         }
978                                 break;
979                                 }
980
981                         case EOB_ACT_CONTINUE_SCAN:
982                                 (yy_c_buf_p) =
983                                         (yytext_ptr) + yy_amount_of_matched_text;
984
985                                 yy_current_state = yy_get_previous_state(  );
986
987                                 yy_cp = (yy_c_buf_p);
988                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
989                                 goto yy_match;
990
991                         case EOB_ACT_LAST_MATCH:
992                                 (yy_c_buf_p) =
993                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
994
995                                 yy_current_state = yy_get_previous_state(  );
996
997                                 yy_cp = (yy_c_buf_p);
998                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
999                                 goto yy_find_action;
1000                         }
1001                 break;
1002                 }
1003
1004         default:
1005                 YY_FATAL_ERROR(
1006                         "fatal flex scanner internal error--no action found" );
1007         } /* end of action switch */
1008                 } /* end of scanning one token */
1009 } /* end of yylex */
1010
1011 /* yy_get_next_buffer - try to read in a new buffer
1012  *
1013  * Returns a code representing an action:
1014  *      EOB_ACT_LAST_MATCH -
1015  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1016  *      EOB_ACT_END_OF_FILE - end of file
1017  */
1018 static int yy_get_next_buffer (void)
1019 {
1020         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1021         register char *source = (yytext_ptr);
1022         register int number_to_move, i;
1023         int ret_val;
1024
1025         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1026                 YY_FATAL_ERROR(
1027                 "fatal flex scanner internal error--end of buffer missed" );
1028
1029         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1030                 { /* Don't try to fill the buffer, so this is an EOF. */
1031                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1032                         {
1033                         /* We matched a single character, the EOB, so
1034                          * treat this as a final EOF.
1035                          */
1036                         return EOB_ACT_END_OF_FILE;
1037                         }
1038
1039                 else
1040                         {
1041                         /* We matched some text prior to the EOB, first
1042                          * process it.
1043                          */
1044                         return EOB_ACT_LAST_MATCH;
1045                         }
1046                 }
1047
1048         /* Try to read more data. */
1049
1050         /* First move last chars to start of buffer. */
1051         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1052
1053         for ( i = 0; i < number_to_move; ++i )
1054                 *(dest++) = *(source++);
1055
1056         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1057                 /* don't do the read, it's not guaranteed to return an EOF,
1058                  * just force an EOF
1059                  */
1060                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1061
1062         else
1063                 {
1064                         int num_to_read =
1065                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1066
1067                 while ( num_to_read <= 0 )
1068                         { /* Not enough room in the buffer - grow it. */
1069
1070                         /* just a shorter name for the current buffer */
1071                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1072
1073                         int yy_c_buf_p_offset =
1074                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1075
1076                         if ( b->yy_is_our_buffer )
1077                                 {
1078                                 int new_size = b->yy_buf_size * 2;
1079
1080                                 if ( new_size <= 0 )
1081                                         b->yy_buf_size += b->yy_buf_size / 8;
1082                                 else
1083                                         b->yy_buf_size *= 2;
1084
1085                                 b->yy_ch_buf = (char *)
1086                                         /* Include room in for 2 EOB chars. */
1087                                         yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
1088                                 }
1089                         else
1090                                 /* Can't grow it, we don't own it. */
1091                                 b->yy_ch_buf = 0;
1092
1093                         if ( ! b->yy_ch_buf )
1094                                 YY_FATAL_ERROR(
1095                                 "fatal error - scanner input buffer overflow" );
1096
1097                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1098
1099                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1100                                                 number_to_move - 1;
1101
1102                         }
1103
1104                 if ( num_to_read > YY_READ_BUF_SIZE )
1105                         num_to_read = YY_READ_BUF_SIZE;
1106
1107                 /* Read in more data. */
1108                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1109                         (yy_n_chars), (size_t) num_to_read );
1110
1111                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1112                 }
1113
1114         if ( (yy_n_chars) == 0 )
1115                 {
1116                 if ( number_to_move == YY_MORE_ADJ )
1117                         {
1118                         ret_val = EOB_ACT_END_OF_FILE;
1119                         yyrestart(yyin  );
1120                         }
1121
1122                 else
1123                         {
1124                         ret_val = EOB_ACT_LAST_MATCH;
1125                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1126                                 YY_BUFFER_EOF_PENDING;
1127                         }
1128                 }
1129
1130         else
1131                 ret_val = EOB_ACT_CONTINUE_SCAN;
1132
1133         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1134                 /* Extend the array by 50%, plus the number we really need. */
1135                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1136                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
1137                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1138                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1139         }
1140
1141         (yy_n_chars) += number_to_move;
1142         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1143         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1144
1145         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1146
1147         return ret_val;
1148 }
1149
1150 /* yy_get_previous_state - get the state just before the EOB char was reached */
1151
1152     static yy_state_type yy_get_previous_state (void)
1153 {
1154         register yy_state_type yy_current_state;
1155         register char *yy_cp;
1156     
1157         yy_current_state = (yy_start);
1158
1159         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1160                 {
1161                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1162                 if ( yy_accept[yy_current_state] )
1163                         {
1164                         (yy_last_accepting_state) = yy_current_state;
1165                         (yy_last_accepting_cpos) = yy_cp;
1166                         }
1167                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1168                         {
1169                         yy_current_state = (int) yy_def[yy_current_state];
1170                         if ( yy_current_state >= 46 )
1171                                 yy_c = yy_meta[(unsigned int) yy_c];
1172                         }
1173                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1174                 }
1175
1176         return yy_current_state;
1177 }
1178
1179 /* yy_try_NUL_trans - try to make a transition on the NUL character
1180  *
1181  * synopsis
1182  *      next_state = yy_try_NUL_trans( current_state );
1183  */
1184     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1185 {
1186         register int yy_is_jam;
1187         register char *yy_cp = (yy_c_buf_p);
1188
1189         register YY_CHAR yy_c = 1;
1190         if ( yy_accept[yy_current_state] )
1191                 {
1192                 (yy_last_accepting_state) = yy_current_state;
1193                 (yy_last_accepting_cpos) = yy_cp;
1194                 }
1195         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1196                 {
1197                 yy_current_state = (int) yy_def[yy_current_state];
1198                 if ( yy_current_state >= 46 )
1199                         yy_c = yy_meta[(unsigned int) yy_c];
1200                 }
1201         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1202         yy_is_jam = (yy_current_state == 45);
1203
1204         return yy_is_jam ? 0 : yy_current_state;
1205 }
1206
1207     static void yyunput (int c, register char * yy_bp )
1208 {
1209         register char *yy_cp;
1210     
1211     yy_cp = (yy_c_buf_p);
1212
1213         /* undo effects of setting up yytext */
1214         *yy_cp = (yy_hold_char);
1215
1216         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1217                 { /* need to shift things up to make room */
1218                 /* +2 for EOB chars. */
1219                 register int number_to_move = (yy_n_chars) + 2;
1220                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1221                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1222                 register char *source =
1223                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1224
1225                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1226                         *--dest = *--source;
1227
1228                 yy_cp += (int) (dest - source);
1229                 yy_bp += (int) (dest - source);
1230                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1231                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1232
1233                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1234                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1235                 }
1236
1237         *--yy_cp = (char) c;
1238
1239         (yytext_ptr) = yy_bp;
1240         (yy_hold_char) = *yy_cp;
1241         (yy_c_buf_p) = yy_cp;
1242 }
1243
1244 #ifndef YY_NO_INPUT
1245 #ifdef __cplusplus
1246     static int yyinput (void)
1247 #else
1248     static int input  (void)
1249 #endif
1250
1251 {
1252         int c;
1253     
1254         *(yy_c_buf_p) = (yy_hold_char);
1255
1256         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1257                 {
1258                 /* yy_c_buf_p now points to the character we want to return.
1259                  * If this occurs *before* the EOB characters, then it's a
1260                  * valid NUL; if not, then we've hit the end of the buffer.
1261                  */
1262                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1263                         /* This was really a NUL. */
1264                         *(yy_c_buf_p) = '\0';
1265
1266                 else
1267                         { /* need more input */
1268                         int offset = (yy_c_buf_p) - (yytext_ptr);
1269                         ++(yy_c_buf_p);
1270
1271                         switch ( yy_get_next_buffer(  ) )
1272                                 {
1273                                 case EOB_ACT_LAST_MATCH:
1274                                         /* This happens because yy_g_n_b()
1275                                          * sees that we've accumulated a
1276                                          * token and flags that we need to
1277                                          * try matching the token before
1278                                          * proceeding.  But for input(),
1279                                          * there's no matching to consider.
1280                                          * So convert the EOB_ACT_LAST_MATCH
1281                                          * to EOB_ACT_END_OF_FILE.
1282                                          */
1283
1284                                         /* Reset buffer status. */
1285                                         yyrestart(yyin );
1286
1287                                         /*FALLTHROUGH*/
1288
1289                                 case EOB_ACT_END_OF_FILE:
1290                                         {
1291                                         if ( yywrap( ) )
1292                                                 return EOF;
1293
1294                                         if ( ! (yy_did_buffer_switch_on_eof) )
1295                                                 YY_NEW_FILE;
1296 #ifdef __cplusplus
1297                                         return yyinput();
1298 #else
1299                                         return input();
1300 #endif
1301                                         }
1302
1303                                 case EOB_ACT_CONTINUE_SCAN:
1304                                         (yy_c_buf_p) = (yytext_ptr) + offset;
1305                                         break;
1306                                 }
1307                         }
1308                 }
1309
1310         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
1311         *(yy_c_buf_p) = '\0';   /* preserve yytext */
1312         (yy_hold_char) = *++(yy_c_buf_p);
1313
1314         return c;
1315 }
1316 #endif  /* ifndef YY_NO_INPUT */
1317
1318 /** Immediately switch to a different input stream.
1319  * @param input_file A readable stream.
1320  * 
1321  * @note This function does not reset the start condition to @c INITIAL .
1322  */
1323     void yyrestart  (FILE * input_file )
1324 {
1325     
1326         if ( ! YY_CURRENT_BUFFER ){
1327         yyensure_buffer_stack ();
1328                 YY_CURRENT_BUFFER_LVALUE =
1329             yy_create_buffer(yyin,YY_BUF_SIZE );
1330         }
1331
1332         yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1333         yy_load_buffer_state( );
1334 }
1335
1336 /** Switch to a different input buffer.
1337  * @param new_buffer The new input buffer.
1338  * 
1339  */
1340     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1341 {
1342     
1343         /* TODO. We should be able to replace this entire function body
1344          * with
1345          *              yypop_buffer_state();
1346          *              yypush_buffer_state(new_buffer);
1347      */
1348         yyensure_buffer_stack ();
1349         if ( YY_CURRENT_BUFFER == new_buffer )
1350                 return;
1351
1352         if ( YY_CURRENT_BUFFER )
1353                 {
1354                 /* Flush out information for old buffer. */
1355                 *(yy_c_buf_p) = (yy_hold_char);
1356                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1357                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1358                 }
1359
1360         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1361         yy_load_buffer_state( );
1362
1363         /* We don't actually know whether we did this switch during
1364          * EOF (yywrap()) processing, but the only time this flag
1365          * is looked at is after yywrap() is called, so it's safe
1366          * to go ahead and always set it.
1367          */
1368         (yy_did_buffer_switch_on_eof) = 1;
1369 }
1370
1371 static void yy_load_buffer_state  (void)
1372 {
1373         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1374         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1375         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1376         (yy_hold_char) = *(yy_c_buf_p);
1377 }
1378
1379 /** Allocate and initialize an input buffer state.
1380  * @param file A readable stream.
1381  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1382  * 
1383  * @return the allocated buffer state.
1384  */
1385     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
1386 {
1387         YY_BUFFER_STATE b;
1388     
1389         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
1390         if ( ! b )
1391                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1392
1393         b->yy_buf_size = size;
1394
1395         /* yy_ch_buf has to be 2 characters longer than the size given because
1396          * we need to put in 2 end-of-buffer characters.
1397          */
1398         b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
1399         if ( ! b->yy_ch_buf )
1400                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1401
1402         b->yy_is_our_buffer = 1;
1403
1404         yy_init_buffer(b,file );
1405
1406         return b;
1407 }
1408
1409 /** Destroy the buffer.
1410  * @param b a buffer created with yy_create_buffer()
1411  * 
1412  */
1413     void yy_delete_buffer (YY_BUFFER_STATE  b )
1414 {
1415     
1416         if ( ! b )
1417                 return;
1418
1419         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1420                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1421
1422         if ( b->yy_is_our_buffer )
1423                 yyfree((void *) b->yy_ch_buf  );
1424
1425         yyfree((void *) b  );
1426 }
1427
1428 #ifndef __cplusplus
1429 extern int isatty (int );
1430 #endif /* __cplusplus */
1431     
1432 /* Initializes or reinitializes a buffer.
1433  * This function is sometimes called more than once on the same buffer,
1434  * such as during a yyrestart() or at EOF.
1435  */
1436     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1437
1438 {
1439         int oerrno = errno;
1440     
1441         yy_flush_buffer(b );
1442
1443         b->yy_input_file = file;
1444         b->yy_fill_buffer = 1;
1445
1446     /* If b is the current buffer, then yy_init_buffer was _probably_
1447      * called from yyrestart() or through yy_get_next_buffer.
1448      * In that case, we don't want to reset the lineno or column.
1449      */
1450     if (b != YY_CURRENT_BUFFER){
1451         b->yy_bs_lineno = 1;
1452         b->yy_bs_column = 0;
1453     }
1454
1455         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1456     
1457         errno = oerrno;
1458 }
1459
1460 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1461  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1462  * 
1463  */
1464     void yy_flush_buffer (YY_BUFFER_STATE  b )
1465 {
1466         if ( ! b )
1467                 return;
1468
1469         b->yy_n_chars = 0;
1470
1471         /* We always need two end-of-buffer characters.  The first causes
1472          * a transition to the end-of-buffer state.  The second causes
1473          * a jam in that state.
1474          */
1475         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1476         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1477
1478         b->yy_buf_pos = &b->yy_ch_buf[0];
1479
1480         b->yy_at_bol = 1;
1481         b->yy_buffer_status = YY_BUFFER_NEW;
1482
1483         if ( b == YY_CURRENT_BUFFER )
1484                 yy_load_buffer_state( );
1485 }
1486
1487 /** Pushes the new state onto the stack. The new state becomes
1488  *  the current state. This function will allocate the stack
1489  *  if necessary.
1490  *  @param new_buffer The new state.
1491  *  
1492  */
1493 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1494 {
1495         if (new_buffer == NULL)
1496                 return;
1497
1498         yyensure_buffer_stack();
1499
1500         /* This block is copied from yy_switch_to_buffer. */
1501         if ( YY_CURRENT_BUFFER )
1502                 {
1503                 /* Flush out information for old buffer. */
1504                 *(yy_c_buf_p) = (yy_hold_char);
1505                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1506                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1507                 }
1508
1509         /* Only push if top exists. Otherwise, replace top. */
1510         if (YY_CURRENT_BUFFER)
1511                 (yy_buffer_stack_top)++;
1512         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1513
1514         /* copied from yy_switch_to_buffer. */
1515         yy_load_buffer_state( );
1516         (yy_did_buffer_switch_on_eof) = 1;
1517 }
1518
1519 /** Removes and deletes the top of the stack, if present.
1520  *  The next element becomes the new top.
1521  *  
1522  */
1523 void yypop_buffer_state (void)
1524 {
1525         if (!YY_CURRENT_BUFFER)
1526                 return;
1527
1528         yy_delete_buffer(YY_CURRENT_BUFFER );
1529         YY_CURRENT_BUFFER_LVALUE = NULL;
1530         if ((yy_buffer_stack_top) > 0)
1531                 --(yy_buffer_stack_top);
1532
1533         if (YY_CURRENT_BUFFER) {
1534                 yy_load_buffer_state( );
1535                 (yy_did_buffer_switch_on_eof) = 1;
1536         }
1537 }
1538
1539 /* Allocates the stack if it does not exist.
1540  *  Guarantees space for at least one push.
1541  */
1542 static void yyensure_buffer_stack (void)
1543 {
1544         int num_to_alloc;
1545     
1546         if (!(yy_buffer_stack)) {
1547
1548                 /* First allocation is just for 2 elements, since we don't know if this
1549                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1550                  * immediate realloc on the next call.
1551          */
1552                 num_to_alloc = 1;
1553                 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1554                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
1555                                                                 );
1556                 if ( ! (yy_buffer_stack) )
1557                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1558                                                                   
1559                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1560                                 
1561                 (yy_buffer_stack_max) = num_to_alloc;
1562                 (yy_buffer_stack_top) = 0;
1563                 return;
1564         }
1565
1566         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1567
1568                 /* Increase the buffer to prepare for a possible push. */
1569                 int grow_size = 8 /* arbitrary grow size */;
1570
1571                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1572                 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1573                                                                 ((yy_buffer_stack),
1574                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
1575                                                                 );
1576                 if ( ! (yy_buffer_stack) )
1577                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1578
1579                 /* zero only the new slots.*/
1580                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1581                 (yy_buffer_stack_max) = num_to_alloc;
1582         }
1583 }
1584
1585 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1586  * @param base the character buffer
1587  * @param size the size in bytes of the character buffer
1588  * 
1589  * @return the newly allocated buffer state object. 
1590  */
1591 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
1592 {
1593         YY_BUFFER_STATE b;
1594     
1595         if ( size < 2 ||
1596              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1597              base[size-1] != YY_END_OF_BUFFER_CHAR )
1598                 /* They forgot to leave room for the EOB's. */
1599                 return 0;
1600
1601         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
1602         if ( ! b )
1603                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1604
1605         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1606         b->yy_buf_pos = b->yy_ch_buf = base;
1607         b->yy_is_our_buffer = 0;
1608         b->yy_input_file = 0;
1609         b->yy_n_chars = b->yy_buf_size;
1610         b->yy_is_interactive = 0;
1611         b->yy_at_bol = 1;
1612         b->yy_fill_buffer = 0;
1613         b->yy_buffer_status = YY_BUFFER_NEW;
1614
1615         yy_switch_to_buffer(b  );
1616
1617         return b;
1618 }
1619
1620 /** Setup the input buffer state to scan a string. The next call to yylex() will
1621  * scan from a @e copy of @a str.
1622  * @param yystr a NUL-terminated string to scan
1623  * 
1624  * @return the newly allocated buffer state object.
1625  * @note If you want to scan bytes that may contain NUL values, then use
1626  *       yy_scan_bytes() instead.
1627  */
1628 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1629 {
1630     
1631         return yy_scan_bytes(yystr,strlen(yystr) );
1632 }
1633
1634 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1635  * scan from a @e copy of @a bytes.
1636  * @param bytes the byte buffer to scan
1637  * @param len the number of bytes in the buffer pointed to by @a bytes.
1638  * 
1639  * @return the newly allocated buffer state object.
1640  */
1641 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
1642 {
1643         YY_BUFFER_STATE b;
1644         char *buf;
1645         yy_size_t n;
1646         int i;
1647     
1648         /* Get memory for full buffer, including space for trailing EOB's. */
1649         n = _yybytes_len + 2;
1650         buf = (char *) yyalloc(n  );
1651         if ( ! buf )
1652                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1653
1654         for ( i = 0; i < _yybytes_len; ++i )
1655                 buf[i] = yybytes[i];
1656
1657         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1658
1659         b = yy_scan_buffer(buf,n );
1660         if ( ! b )
1661                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1662
1663         /* It's okay to grow etc. this buffer, and we should throw it
1664          * away when we're done.
1665          */
1666         b->yy_is_our_buffer = 1;
1667
1668         return b;
1669 }
1670
1671 #ifndef YY_EXIT_FAILURE
1672 #define YY_EXIT_FAILURE 2
1673 #endif
1674
1675 static void yy_fatal_error (yyconst char* msg )
1676 {
1677         (void) fprintf( stderr, "%s\n", msg );
1678         exit( YY_EXIT_FAILURE );
1679 }
1680
1681 /* Redefine yyless() so it works in section 3 code. */
1682
1683 #undef yyless
1684 #define yyless(n) \
1685         do \
1686                 { \
1687                 /* Undo effects of setting up yytext. */ \
1688         int yyless_macro_arg = (n); \
1689         YY_LESS_LINENO(yyless_macro_arg);\
1690                 yytext[yyleng] = (yy_hold_char); \
1691                 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1692                 (yy_hold_char) = *(yy_c_buf_p); \
1693                 *(yy_c_buf_p) = '\0'; \
1694                 yyleng = yyless_macro_arg; \
1695                 } \
1696         while ( 0 )
1697
1698 /* Accessor  methods (get/set functions) to struct members. */
1699
1700 /** Get the current line number.
1701  * 
1702  */
1703 int yyget_lineno  (void)
1704 {
1705         
1706     return yylineno;
1707 }
1708
1709 /** Get the input stream.
1710  * 
1711  */
1712 FILE *yyget_in  (void)
1713 {
1714         return yyin;
1715 }
1716
1717 /** Get the output stream.
1718  * 
1719  */
1720 FILE *yyget_out  (void)
1721 {
1722         return yyout;
1723 }
1724
1725 /** Get the length of the current token.
1726  * 
1727  */
1728 int yyget_leng  (void)
1729 {
1730         return yyleng;
1731 }
1732
1733 /** Get the current token.
1734  * 
1735  */
1736
1737 char *yyget_text  (void)
1738 {
1739         return yytext;
1740 }
1741
1742 /** Set the current line number.
1743  * @param line_number
1744  * 
1745  */
1746 void yyset_lineno (int  line_number )
1747 {
1748     
1749     yylineno = line_number;
1750 }
1751
1752 /** Set the input stream. This does not discard the current
1753  * input buffer.
1754  * @param in_str A readable stream.
1755  * 
1756  * @see yy_switch_to_buffer
1757  */
1758 void yyset_in (FILE *  in_str )
1759 {
1760         yyin = in_str ;
1761 }
1762
1763 void yyset_out (FILE *  out_str )
1764 {
1765         yyout = out_str ;
1766 }
1767
1768 int yyget_debug  (void)
1769 {
1770         return yy_flex_debug;
1771 }
1772
1773 void yyset_debug (int  bdebug )
1774 {
1775         yy_flex_debug = bdebug ;
1776 }
1777
1778 static int yy_init_globals (void)
1779 {
1780         /* Initialization is the same as for the non-reentrant scanner.
1781      * This function is called from yylex_destroy(), so don't allocate here.
1782      */
1783
1784     (yy_buffer_stack) = 0;
1785     (yy_buffer_stack_top) = 0;
1786     (yy_buffer_stack_max) = 0;
1787     (yy_c_buf_p) = (char *) 0;
1788     (yy_init) = 0;
1789     (yy_start) = 0;
1790
1791 /* Defined in main.c */
1792 #ifdef YY_STDINIT
1793     yyin = stdin;
1794     yyout = stdout;
1795 #else
1796     yyin = (FILE *) 0;
1797     yyout = (FILE *) 0;
1798 #endif
1799
1800     /* For future reference: Set errno on error, since we are called by
1801      * yylex_init()
1802      */
1803     return 0;
1804 }
1805
1806 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
1807 int yylex_destroy  (void)
1808 {
1809     
1810     /* Pop the buffer stack, destroying each element. */
1811         while(YY_CURRENT_BUFFER){
1812                 yy_delete_buffer(YY_CURRENT_BUFFER  );
1813                 YY_CURRENT_BUFFER_LVALUE = NULL;
1814                 yypop_buffer_state();
1815         }
1816
1817         /* Destroy the stack itself. */
1818         yyfree((yy_buffer_stack) );
1819         (yy_buffer_stack) = NULL;
1820
1821     /* Reset the globals. This is important in a non-reentrant scanner so the next time
1822      * yylex() is called, initialization will occur. */
1823     yy_init_globals( );
1824
1825     return 0;
1826 }
1827
1828 /*
1829  * Internal utility routines.
1830  */
1831
1832 #ifndef yytext_ptr
1833 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1834 {
1835         register int i;
1836         for ( i = 0; i < n; ++i )
1837                 s1[i] = s2[i];
1838 }
1839 #endif
1840
1841 #ifdef YY_NEED_STRLEN
1842 static int yy_flex_strlen (yyconst char * s )
1843 {
1844         register int n;
1845         for ( n = 0; s[n]; ++n )
1846                 ;
1847
1848         return n;
1849 }
1850 #endif
1851
1852 void *yyalloc (yy_size_t  size )
1853 {
1854         return (void *) malloc( size );
1855 }
1856
1857 void *yyrealloc  (void * ptr, yy_size_t  size )
1858 {
1859         /* The cast to (char *) in the following accommodates both
1860          * implementations that use char* generic pointers, and those
1861          * that use void* generic pointers.  It works with the latter
1862          * because both ANSI C and C++ allow castless assignment from
1863          * any pointer type to void*, and deal with argument conversions
1864          * as though doing an assignment.
1865          */
1866         return (void *) realloc( (char *) ptr, size );
1867 }
1868
1869 void yyfree (void * ptr )
1870 {
1871         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
1872 }
1873
1874 #define YYTABLES_NAME "yytables"
1875
1876 #line 73 "lex.l"
1877
1878
1879
1880 #ifndef yywrap /* XXX */
1881 int
1882 yywrap ()
1883 {
1884      return 1;
1885 }
1886 #endif
1887
1888 static int
1889 getstring(void)
1890 {
1891     char x[128];
1892     int i = 0;
1893     int c;
1894     int quote = 0;
1895     while(i < sizeof(x) - 1 && (c = input()) != EOF){
1896         if(quote) {
1897             x[i++] = c;
1898             quote = 0;
1899             continue;
1900         }
1901         if(c == '\n'){
1902             lex_err_message("unterminated string");
1903             lineno++;
1904             break;
1905         }
1906         if(c == '\\'){
1907             quote++;
1908             continue;
1909         }
1910         if(c == '\"')
1911             break;
1912         x[i++] = c;
1913     }
1914     x[i] = '\0';
1915     yylval.string = strdup(x);
1916     if (yylval.string == NULL)
1917         err(1, "malloc");
1918     return STRING;
1919 }
1920
1921 void
1922 lex_err_message (const char *format, ...)
1923 {
1924      va_list args;
1925
1926      va_start (args, format);
1927      fprintf (stderr, "%s:%d:", filename, lineno);
1928      vfprintf (stderr, format, args);
1929      va_end (args);
1930      numerror++;
1931 }
1932