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