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