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