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