libnl  3.2.11
ematch_grammar.c
1 #line 2 "route/cls/ematch_grammar.c"
2 
3 #line 4 "route/cls/ematch_grammar.c"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 35
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16 
17 /* First, we deal with platform-specific or compiler-specific issues. */
18 
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
24 
25 /* end standard C headers. */
26 
27 /* flex integer type definitions */
28 
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
31 
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35 
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37  * if you want the limit (max/min) macros for int types.
38  */
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
41 #endif
42 
43 #include <inttypes.h>
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
50 #else
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
57 #endif /* ! C99 */
58 
59 /* Limits of integral types. */
60 #ifndef INT8_MIN
61 #define INT8_MIN (-128)
62 #endif
63 #ifndef INT16_MIN
64 #define INT16_MIN (-32767-1)
65 #endif
66 #ifndef INT32_MIN
67 #define INT32_MIN (-2147483647-1)
68 #endif
69 #ifndef INT8_MAX
70 #define INT8_MAX (127)
71 #endif
72 #ifndef INT16_MAX
73 #define INT16_MAX (32767)
74 #endif
75 #ifndef INT32_MAX
76 #define INT32_MAX (2147483647)
77 #endif
78 #ifndef UINT8_MAX
79 #define UINT8_MAX (255U)
80 #endif
81 #ifndef UINT16_MAX
82 #define UINT16_MAX (65535U)
83 #endif
84 #ifndef UINT32_MAX
85 #define UINT32_MAX (4294967295U)
86 #endif
87 
88 #endif /* ! FLEXINT_H */
89 
90 #ifdef __cplusplus
91 
92 /* The "const" storage-class-modifier is valid. */
93 #define YY_USE_CONST
94 
95 #else /* ! __cplusplus */
96 
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
99 
100 #define YY_USE_CONST
101 
102 #endif /* defined (__STDC__) */
103 #endif /* ! __cplusplus */
104 
105 #ifdef YY_USE_CONST
106 #define yyconst const
107 #else
108 #define yyconst
109 #endif
110 
111 /* Returned upon end-of-file. */
112 #define YY_NULL 0
113 
114 /* Promotes a possibly negative, possibly signed char to an unsigned
115  * integer for use as an array index. If the signed char is negative,
116  * we want to instead treat it as an 8-bit unsigned char, hence the
117  * double cast.
118  */
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120 
121 /* An opaque pointer. */
122 #ifndef YY_TYPEDEF_YY_SCANNER_T
123 #define YY_TYPEDEF_YY_SCANNER_T
124 typedef void* yyscan_t;
125 #endif
126 
127 /* For convenience, these vars (plus the bison vars far below)
128  are macros in the reentrant scanner. */
129 #define yyin yyg->yyin_r
130 #define yyout yyg->yyout_r
131 #define yyextra yyg->yyextra_r
132 #define yyleng yyg->yyleng_r
133 #define yytext yyg->yytext_r
134 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
135 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
136 #define yy_flex_debug yyg->yy_flex_debug_r
137 
138 /* Enter a start condition. This macro really ought to take a parameter,
139  * but we do it the disgusting crufty way forced on us by the ()-less
140  * definition of BEGIN.
141  */
142 #define BEGIN yyg->yy_start = 1 + 2 *
143 
144 /* Translate the current start state into a value that can be later handed
145  * to BEGIN to return to the state. The YYSTATE alias is for lex
146  * compatibility.
147  */
148 #define YY_START ((yyg->yy_start - 1) / 2)
149 #define YYSTATE YY_START
150 
151 /* Action number for EOF rule of a given start state. */
152 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
153 
154 /* Special action meaning "start processing a new file". */
155 #define YY_NEW_FILE ematch_restart(yyin ,yyscanner )
156 
157 #define YY_END_OF_BUFFER_CHAR 0
158 
159 /* Size of default input buffer. */
160 #ifndef YY_BUF_SIZE
161 #define YY_BUF_SIZE 16384
162 #endif
163 
164 /* The state buf must be large enough to hold one state per character in the main buffer.
165  */
166 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
167 
168 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
169 #define YY_TYPEDEF_YY_BUFFER_STATE
170 typedef struct yy_buffer_state *YY_BUFFER_STATE;
171 #endif
172 
173 #define EOB_ACT_CONTINUE_SCAN 0
174 #define EOB_ACT_END_OF_FILE 1
175 #define EOB_ACT_LAST_MATCH 2
176 
177  #define YY_LESS_LINENO(n)
178 
179 /* Return all but the first "n" matched characters back to the input stream. */
180 #define yyless(n) \
181  do \
182  { \
183  /* Undo effects of setting up yytext. */ \
184  int yyless_macro_arg = (n); \
185  YY_LESS_LINENO(yyless_macro_arg);\
186  *yy_cp = yyg->yy_hold_char; \
187  YY_RESTORE_YY_MORE_OFFSET \
188  yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
189  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
190  } \
191  while ( 0 )
192 
193 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
194 
195 #ifndef YY_TYPEDEF_YY_SIZE_T
196 #define YY_TYPEDEF_YY_SIZE_T
197 typedef size_t yy_size_t;
198 #endif
199 
200 #ifndef YY_STRUCT_YY_BUFFER_STATE
201 #define YY_STRUCT_YY_BUFFER_STATE
203  {
204  FILE *yy_input_file;
205 
206  char *yy_ch_buf; /* input buffer */
207  char *yy_buf_pos; /* current position in input buffer */
208 
209  /* Size of input buffer in bytes, not including room for EOB
210  * characters.
211  */
212  yy_size_t yy_buf_size;
213 
214  /* Number of characters read into yy_ch_buf, not including EOB
215  * characters.
216  */
217  int yy_n_chars;
218 
219  /* Whether we "own" the buffer - i.e., we know we created it,
220  * and can realloc() it to grow it, and should free() it to
221  * delete it.
222  */
223  int yy_is_our_buffer;
224 
225  /* Whether this is an "interactive" input source; if so, and
226  * if we're using stdio for input, then we want to use getc()
227  * instead of fread(), to make sure we stop fetching input after
228  * each newline.
229  */
230  int yy_is_interactive;
231 
232  /* Whether we're considered to be at the beginning of a line.
233  * If so, '^' rules will be active on the next match, otherwise
234  * not.
235  */
236  int yy_at_bol;
237 
238  int yy_bs_lineno; /**< The line count. */
239  int yy_bs_column; /**< The column count. */
240 
241  /* Whether to try to fill the input buffer when we reach the
242  * end of it.
243  */
244  int yy_fill_buffer;
245 
246  int yy_buffer_status;
247 
248 #define YY_BUFFER_NEW 0
249 #define YY_BUFFER_NORMAL 1
250  /* When an EOF's been seen but there's still some text to process
251  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
252  * shouldn't try reading from the input source any more. We might
253  * still have a bunch of tokens to match, though, because of
254  * possible backing-up.
255  *
256  * When we actually see the EOF, we change the status to "new"
257  * (via ematch_restart()), so that the user can continue scanning by
258  * just pointing yyin at a new input file.
259  */
260 #define YY_BUFFER_EOF_PENDING 2
261 
262  };
263 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
264 
265 /* We provide macros for accessing buffer states in case in the
266  * future we want to put the buffer states in a more general
267  * "scanner state".
268  *
269  * Returns the top of the stack, or NULL.
270  */
271 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
272  ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
273  : NULL)
274 
275 /* Same as previous macro, but useful when we know that the buffer stack is not
276  * NULL or when we need an lvalue. For internal use only.
277  */
278 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
279 
280 void ematch_restart (FILE *input_file ,yyscan_t yyscanner );
281 void ematch__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
282 YY_BUFFER_STATE ematch__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
283 void ematch__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
284 void ematch__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
285 void ematch_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
286 void ematch_pop_buffer_state (yyscan_t yyscanner );
287 
288 static void ematch_ensure_buffer_stack (yyscan_t yyscanner );
289 static void ematch__load_buffer_state (yyscan_t yyscanner );
290 static void ematch__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
291 
292 #define YY_FLUSH_BUFFER ematch__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
293 
294 YY_BUFFER_STATE ematch__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
295 YY_BUFFER_STATE ematch__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
296 YY_BUFFER_STATE ematch__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
297 
298 void *ematch_alloc (yy_size_t ,yyscan_t yyscanner );
299 void *ematch_realloc (void *,yy_size_t ,yyscan_t yyscanner );
300 void ematch_free (void * ,yyscan_t yyscanner );
301 
302 #define yy_new_buffer ematch__create_buffer
303 
304 #define yy_set_interactive(is_interactive) \
305  { \
306  if ( ! YY_CURRENT_BUFFER ){ \
307  ematch_ensure_buffer_stack (yyscanner); \
308  YY_CURRENT_BUFFER_LVALUE = \
309  ematch__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
310  } \
311  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
312  }
313 
314 #define yy_set_bol(at_bol) \
315  { \
316  if ( ! YY_CURRENT_BUFFER ){\
317  ematch_ensure_buffer_stack (yyscanner); \
318  YY_CURRENT_BUFFER_LVALUE = \
319  ematch__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
320  } \
321  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
322  }
323 
324 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
325 
326 #define ematch_wrap(n) 1
327 #define YY_SKIP_YYWRAP
328 
329 typedef unsigned char YY_CHAR;
330 
331 typedef int yy_state_type;
332 
333 #define yytext_ptr yytext_r
334 
335 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
336 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
337 static int yy_get_next_buffer (yyscan_t yyscanner );
338 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
339 
340 /* Done after the current pattern has been matched and before the
341  * corresponding action - sets up yytext.
342  */
343 #define YY_DO_BEFORE_ACTION \
344  yyg->yytext_ptr = yy_bp; \
345  yyleng = (size_t) (yy_cp - yy_bp); \
346  yyg->yy_hold_char = *yy_cp; \
347  *yy_cp = '\0'; \
348  yyg->yy_c_buf_p = yy_cp;
349 
350 #define YY_NUM_RULES 91
351 #define YY_END_OF_BUFFER 92
352 /* This struct is not used in this scanner,
353  but its presence is necessary. */
355  {
356  flex_int32_t yy_verify;
357  flex_int32_t yy_nxt;
358  };
359 static yyconst flex_int16_t yy_accept[393] =
360  { 0,
361  0, 0, 0, 0, 92, 90, 1, 18, 2, 26,
362  23, 24, 30, 5, 5, 12, 8, 10, 90, 90,
363  90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
364  90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
365  90, 91, 3, 91, 4, 90, 1, 14, 5, 90,
366  28, 90, 29, 90, 90, 90, 40, 90, 90, 90,
367  90, 90, 15, 90, 90, 90, 90, 32, 90, 90,
368  90, 33, 90, 90, 7, 9, 90, 11, 90, 90,
369  90, 90, 90, 90, 90, 90, 90, 16, 3, 6,
370  13, 19, 37, 90, 39, 90, 90, 90, 38, 17,
371 
372  90, 90, 42, 90, 90, 34, 35, 90, 47, 90,
373  90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
374  90, 90, 31, 36, 25, 22, 90, 90, 21, 90,
375  90, 90, 90, 90, 54, 90, 90, 48, 90, 90,
376  90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
377  90, 90, 90, 90, 90, 90, 86, 90, 27, 90,
378  90, 90, 90, 90, 90, 90, 49, 90, 90, 57,
379  90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
380  90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
381  90, 90, 90, 90, 90, 90, 90, 90, 53, 51,
382 
383  90, 43, 90, 87, 90, 90, 90, 90, 90, 90,
384  90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
385  90, 90, 90, 90, 90, 90, 90, 90, 20, 90,
386  52, 88, 90, 50, 90, 90, 90, 90, 90, 90,
387  90, 76, 90, 90, 80, 90, 90, 90, 90, 90,
388  90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
389  66, 90, 90, 55, 90, 90, 90, 90, 90, 90,
390  90, 90, 90, 90, 90, 65, 90, 90, 90, 90,
391  90, 60, 90, 90, 90, 90, 90, 90, 90, 59,
392  90, 90, 41, 44, 45, 46, 56, 90, 74, 90,
393 
394  90, 58, 90, 90, 90, 90, 62, 90, 90, 61,
395  90, 90, 90, 90, 90, 63, 90, 90, 90, 90,
396  90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
397  90, 90, 90, 90, 90, 90, 90, 90, 90, 89,
398  72, 90, 90, 90, 70, 81, 82, 90, 90, 90,
399  64, 71, 83, 90, 90, 90, 90, 90, 90, 90,
400  90, 90, 90, 90, 90, 90, 90, 90, 77, 90,
401  67, 75, 90, 68, 90, 90, 78, 90, 90, 84,
402  69, 90, 90, 90, 90, 90, 90, 85, 73, 90,
403  79, 0
404 
405  } ;
406 
407 static yyconst flex_int32_t yy_ec[256] =
408  { 0,
409  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
410  1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
411  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412  1, 2, 4, 5, 1, 1, 1, 6, 1, 7,
413  8, 1, 9, 1, 1, 1, 1, 10, 11, 12,
414  13, 14, 14, 15, 14, 16, 14, 1, 1, 17,
415  18, 19, 1, 1, 20, 21, 22, 23, 24, 25,
416  1, 26, 27, 1, 28, 29, 30, 31, 32, 33,
417  1, 34, 35, 36, 37, 1, 1, 38, 1, 1,
418  1, 39, 1, 1, 40, 1, 41, 42, 43, 44,
419 
420  45, 46, 47, 48, 49, 1, 50, 51, 52, 53,
421  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
422  64, 1, 1, 65, 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  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 
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, 1, 1, 1, 1, 1,
434  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436  1, 1, 1, 1, 1
437  } ;
438 
439 static yyconst flex_int32_t yy_meta[66] =
440  { 0,
441  1, 2, 3, 1, 3, 2, 2, 2, 2, 1,
442  1, 1, 1, 1, 1, 1, 2, 2, 2, 1,
443  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444  1, 1, 1, 1, 1, 1, 1, 1, 4, 1,
445  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447  1, 1, 1, 1, 2
448  } ;
449 
450 static yyconst flex_int16_t yy_base[396] =
451  { 0,
452  0, 0, 63, 64, 537, 0, 68, 0, 538, 530,
453  538, 538, 538, 62, 69, 538, 538, 516, 55, 57,
454  52, 55, 60, 67, 72, 73, 64, 79, 75, 100,
455  115, 65, 83, 475, 102, 117, 118, 89, 121, 131,
456  482, 467, 0, 538, 538, 0, 133, 538, 167, 179,
457  538, 123, 0, 111, 124, 132, 516, 153, 138, 151,
458  169, 171, 0, 172, 170, 178, 171, 0, 129, 515,
459  517, 0, 469, 466, 0, 0, 485, 0, 183, 466,
460  41, 471, 186, 475, 482, 183, 480, 538, 0, 0,
461  0, 0, 0, 184, 0, 187, 189, 207, 0, 0,
462 
463  206, 218, 0, 208, 215, 0, 0, 479, 466, 474,
464  466, 466, 194, 461, 455, 469, 461, 462, 469, 228,
465  456, 455, 0, 0, 0, 0, 226, 213, 0, 217,
466  456, 465, 464, 459, 0, 458, 438, 0, 447, 446,
467  458, 452, 439, 204, 442, 438, 237, 453, 444, 451,
468  434, 249, 236, 426, 199, 445, 0, 220, 0, 227,
469  443, 435, 425, 432, 431, 428, 0, 430, 423, 0,
470  432, 429, 427, 417, 419, 423, 417, 415, 419, 408,
471  208, 409, 152, 424, 408, 414, 406, 421, 423, 408,
472  417, 412, 415, 235, 261, 406, 413, 410, 0, 0,
473 
474  411, 0, 397, 0, 414, 399, 399, 411, 401, 387,
475  400, 400, 406, 391, 385, 257, 400, 384, 389, 381,
476  395, 379, 258, 378, 391, 383, 375, 370, 0, 262,
477  0, 0, 392, 0, 382, 388, 386, 384, 371, 375,
478  384, 0, 379, 382, 0, 368, 365, 360, 365, 369,
479  364, 371, 375, 369, 361, 368, 355, 350, 360, 363,
480  0, 367, 361, 0, 266, 294, 361, 363, 345, 362,
481  350, 336, 342, 341, 354, 0, 345, 349, 332, 341,
482  333, 0, 350, 350, 331, 334, 336, 340, 333, 0,
483  266, 344, 0, 0, 0, 0, 0, 340, 0, 333,
484 
485  336, 0, 336, 320, 328, 332, 0, 335, 330, 0,
486  323, 330, 325, 309, 325, 0, 324, 317, 307, 311,
487  315, 318, 310, 322, 312, 320, 306, 299, 303, 305,
488  314, 314, 300, 299, 297, 299, 304, 303, 296, 0,
489  0, 305, 293, 302, 0, 0, 0, 289, 287, 287,
490  0, 0, 0, 286, 279, 285, 283, 285, 287, 290,
491  281, 265, 275, 277, 273, 270, 266, 261, 0, 268,
492  0, 0, 264, 0, 265, 214, 0, 207, 209, 0,
493  0, 205, 170, 109, 93, 75, 53, 0, 0, 57,
494  0, 538, 325, 329, 333
495 
496  } ;
497 
498 static yyconst flex_int16_t yy_def[396] =
499  { 0,
500  392, 1, 393, 393, 392, 394, 392, 394, 392, 392,
501  392, 392, 392, 394, 394, 392, 392, 392, 394, 394,
502  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
503  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
504  394, 392, 395, 392, 392, 394, 392, 392, 394, 394,
505  392, 394, 394, 394, 394, 394, 394, 394, 394, 394,
506  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
507  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
508  394, 394, 394, 394, 394, 394, 394, 392, 395, 50,
509  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
510 
511  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
512  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
513  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
514  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
515  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
516  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
517  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
518  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
519  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
520  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
521 
522  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
523  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
524  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
525  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
526  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
527  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
528  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
529  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
530  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
531  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
532 
533  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
534  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
535  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
536  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
537  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
538  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
539  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
540  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
541  394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
542  394, 0, 392, 392, 392
543 
544  } ;
545 
546 static yyconst flex_int16_t yy_nxt[604] =
547  { 0,
548  6, 7, 7, 8, 9, 10, 11, 12, 13, 14,
549  15, 15, 15, 15, 15, 15, 16, 17, 18, 19,
550  6, 20, 6, 21, 22, 6, 23, 6, 24, 25,
551  26, 27, 28, 6, 29, 30, 31, 6, 6, 6,
552  19, 6, 20, 32, 33, 22, 34, 6, 23, 6,
553  35, 36, 26, 27, 37, 6, 38, 39, 40, 31,
554  41, 6, 6, 6, 42, 44, 44, 45, 45, 47,
555  47, 49, 49, 49, 49, 49, 49, 49, 49, 49,
556  49, 49, 49, 49, 49, 52, 54, 55, 56, 114,
557  53, 59, 57, 58, 115, 60, 61, 63, 64, 50,
558 
559  65, 44, 44, 391, 62, 73, 390, 52, 54, 74,
560  55, 56, 59, 53, 57, 58, 60, 61, 55, 64,
561  63, 66, 65, 67, 50, 70, 62, 71, 58, 82,
562  72, 68, 389, 69, 47, 47, 59, 64, 75, 388,
563  60, 55, 66, 92, 67, 91, 65, 83, 105, 93,
564  58, 84, 66, 68, 67, 77, 69, 79, 64, 387,
565  78, 60, 68, 94, 69, 92, 91, 80, 65, 105,
566  85, 93, 97, 86, 81, 67, 49, 49, 49, 49,
567  49, 49, 49, 96, 68, 94, 98, 69, 90, 90,
568  90, 90, 90, 90, 90, 97, 102, 217, 90, 90,
569 
570  90, 90, 90, 90, 99, 96, 100, 101, 104, 98,
571  103, 218, 386, 123, 124, 103, 125, 97, 102, 90,
572  90, 90, 90, 90, 90, 111, 126, 99, 117, 100,
573  101, 121, 103, 104, 118, 123, 124, 103, 125, 112,
574  97, 127, 128, 129, 136, 130, 172, 126, 159, 158,
575  191, 160, 137, 194, 173, 192, 214, 385, 384, 195,
576  383, 215, 382, 128, 127, 229, 129, 130, 144, 145,
577  158, 159, 146, 147, 160, 148, 194, 176, 149, 150,
578  186, 195, 151, 187, 152, 153, 154, 229, 188, 155,
579  177, 182, 230, 183, 189, 265, 247, 257, 248, 258,
580 
581  184, 293, 185, 294, 295, 296, 318, 249, 381, 380,
582  379, 378, 377, 376, 230, 250, 259, 375, 265, 374,
583  373, 319, 372, 371, 293, 43, 43, 43, 43, 46,
584  370, 369, 46, 89, 89, 368, 367, 366, 365, 364,
585  363, 362, 361, 360, 359, 358, 357, 356, 355, 354,
586  353, 352, 351, 350, 349, 348, 347, 346, 345, 344,
587  343, 342, 341, 340, 339, 338, 337, 336, 335, 334,
588  333, 332, 331, 330, 329, 328, 327, 326, 325, 324,
589  323, 322, 321, 320, 317, 316, 315, 314, 313, 312,
590  311, 310, 309, 308, 307, 306, 305, 304, 303, 302,
591 
592  301, 300, 299, 298, 297, 292, 291, 290, 289, 288,
593  287, 286, 285, 284, 283, 282, 281, 280, 279, 278,
594  277, 276, 275, 274, 273, 272, 271, 270, 269, 268,
595  267, 266, 264, 263, 262, 261, 260, 256, 255, 254,
596  253, 252, 251, 246, 245, 244, 243, 242, 241, 240,
597  239, 238, 237, 236, 235, 234, 233, 232, 231, 228,
598  227, 226, 225, 224, 223, 222, 221, 220, 219, 216,
599  213, 212, 211, 210, 209, 208, 207, 206, 205, 204,
600  203, 202, 201, 200, 199, 198, 197, 196, 193, 190,
601  181, 180, 179, 178, 175, 174, 171, 170, 169, 168,
602 
603  167, 166, 165, 164, 163, 162, 161, 157, 156, 143,
604  142, 141, 140, 139, 138, 135, 134, 133, 132, 131,
605  122, 120, 119, 116, 113, 110, 109, 108, 107, 106,
606  95, 88, 87, 76, 51, 48, 392, 5, 392, 392,
607  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
608  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
609  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
610  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
611  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
612  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
613 
614  392, 392, 392
615  } ;
616 
617 static yyconst flex_int16_t yy_chk[604] =
618  { 0,
619  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
620  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
621  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
622  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
623  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
624  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
625  1, 1, 1, 1, 1, 3, 4, 3, 4, 7,
626  7, 14, 14, 14, 14, 14, 14, 14, 15, 15,
627  15, 15, 15, 15, 15, 19, 20, 21, 22, 81,
628  19, 25, 23, 24, 81, 25, 26, 27, 28, 14,
629 
630  29, 3, 4, 390, 26, 32, 387, 19, 20, 32,
631  21, 22, 25, 19, 23, 24, 25, 26, 33, 28,
632  27, 30, 29, 30, 14, 31, 26, 31, 35, 38,
633  31, 30, 386, 30, 47, 47, 36, 37, 33, 385,
634  36, 33, 30, 54, 30, 52, 39, 38, 69, 55,
635  35, 38, 40, 30, 40, 35, 30, 36, 37, 384,
636  35, 36, 40, 56, 40, 54, 52, 37, 39, 69,
637  39, 55, 59, 40, 37, 40, 49, 49, 49, 49,
638  49, 49, 49, 58, 40, 56, 60, 40, 50, 50,
639  50, 50, 50, 50, 50, 59, 65, 183, 50, 50,
640 
641  50, 50, 50, 50, 61, 58, 62, 64, 67, 60,
642  66, 183, 383, 94, 96, 86, 97, 79, 65, 50,
643  50, 50, 50, 50, 50, 79, 98, 61, 83, 62,
644  64, 86, 66, 67, 83, 94, 96, 86, 97, 79,
645  79, 101, 102, 104, 113, 105, 144, 98, 128, 127,
646  155, 130, 113, 158, 144, 155, 181, 382, 379, 160,
647  378, 181, 376, 102, 101, 194, 104, 105, 120, 120,
648  127, 128, 120, 120, 130, 120, 158, 147, 120, 120,
649  153, 160, 120, 153, 120, 120, 120, 194, 153, 120,
650  147, 152, 195, 152, 153, 230, 216, 223, 216, 223,
651 
652  152, 265, 152, 266, 266, 266, 291, 216, 375, 373,
653  370, 368, 367, 366, 195, 216, 223, 365, 230, 364,
654  363, 291, 362, 361, 265, 393, 393, 393, 393, 394,
655  360, 359, 394, 395, 395, 358, 357, 356, 355, 354,
656  350, 349, 348, 344, 343, 342, 339, 338, 337, 336,
657  335, 334, 333, 332, 331, 330, 329, 328, 327, 326,
658  325, 324, 323, 322, 321, 320, 319, 318, 317, 315,
659  314, 313, 312, 311, 309, 308, 306, 305, 304, 303,
660  301, 300, 298, 292, 289, 288, 287, 286, 285, 284,
661  283, 281, 280, 279, 278, 277, 275, 274, 273, 272,
662 
663  271, 270, 269, 268, 267, 263, 262, 260, 259, 258,
664  257, 256, 255, 254, 253, 252, 251, 250, 249, 248,
665  247, 246, 244, 243, 241, 240, 239, 238, 237, 236,
666  235, 233, 228, 227, 226, 225, 224, 222, 221, 220,
667  219, 218, 217, 215, 214, 213, 212, 211, 210, 209,
668  208, 207, 206, 205, 203, 201, 198, 197, 196, 193,
669  192, 191, 190, 189, 188, 187, 186, 185, 184, 182,
670  180, 179, 178, 177, 176, 175, 174, 173, 172, 171,
671  169, 168, 166, 165, 164, 163, 162, 161, 156, 154,
672  151, 150, 149, 148, 146, 145, 143, 142, 141, 140,
673 
674  139, 137, 136, 134, 133, 132, 131, 122, 121, 119,
675  118, 117, 116, 115, 114, 112, 111, 110, 109, 108,
676  87, 85, 84, 82, 80, 77, 74, 73, 71, 70,
677  57, 42, 41, 34, 18, 10, 5, 392, 392, 392,
678  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
679  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
680  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
681  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
682  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
683  392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
684 
685  392, 392, 392
686  } ;
687 
688 /* The intent behind this definition is that it'll catch
689  * any uses of REJECT which flex missed.
690  */
691 #define REJECT reject_used_but_not_detected
692 #define yymore() yymore_used_but_not_detected
693 #define YY_MORE_ADJ 0
694 #define YY_RESTORE_YY_MORE_OFFSET
695 #line 1 "route/cls/ematch_grammar.l"
696 /*
697  * lib/route/cls/ematch_grammar.l ematch expression grammar
698  *
699  * This library is free software; you can redistribute it and/or
700  * modify it under the terms of the GNU Lesser General Public
701  * License as published by the Free Software Foundation version 2.1
702  * of the License.
703  *
704  * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
705  */
706 #line 13 "route/cls/ematch_grammar.l"
707  #include <netlink-local.h>
708  #include <netlink-tc.h>
709  #include <netlink/netlink.h>
710  #include <netlink/route/cls/ematch.h>
711  #include <netlink/route/cls/ematch/cmp.h>
712  #include "ematch_syntax.h"
713 #define YY_NO_INPUT 1
714 
715 #line 716 "route/cls/ematch_grammar.c"
716 
717 #define INITIAL 0
718 #define QUOTE 1
719 
720 #ifndef YY_NO_UNISTD_H
721 /* Special case for "unistd.h", since it is non-ANSI. We include it way
722  * down here because we want the user's section 1 to have been scanned first.
723  * The user has a chance to override it with an option.
724  */
725 #include <unistd.h>
726 #endif
727 
728 #ifndef YY_EXTRA_TYPE
729 #define YY_EXTRA_TYPE void *
730 #endif
731 
732 /* Holds the entire state of the reentrant scanner. */
733 struct yyguts_t
734  {
735 
736  /* User-defined. Not touched by flex. */
737  YY_EXTRA_TYPE yyextra_r;
738 
739  /* The rest are the same as the globals declared in the non-reentrant scanner. */
740  FILE *yyin_r, *yyout_r;
741  size_t yy_buffer_stack_top; /**< index of top of stack. */
742  size_t yy_buffer_stack_max; /**< capacity of stack. */
743  YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
744  char yy_hold_char;
745  int yy_n_chars;
746  int yyleng_r;
747  char *yy_c_buf_p;
748  int yy_init;
749  int yy_start;
750  int yy_did_buffer_switch_on_eof;
751  int yy_start_stack_ptr;
752  int yy_start_stack_depth;
753  int *yy_start_stack;
754  yy_state_type yy_last_accepting_state;
755  char* yy_last_accepting_cpos;
756 
757  int yylineno_r;
758  int yy_flex_debug_r;
759 
760  char *yytext_r;
761  int yy_more_flag;
762  int yy_more_len;
763 
764  YYSTYPE * yylval_r;
765 
766  }; /* end struct yyguts_t */
767 
768 static int yy_init_globals (yyscan_t yyscanner );
769 
770  /* This must go here because YYSTYPE and YYLTYPE are included
771  * from bison output in section 1.*/
772  # define yylval yyg->yylval_r
773 
774 int ematch_lex_init (yyscan_t* scanner);
775 
776 int ematch_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
777 
778 /* Accessor methods to globals.
779  These are made visible to non-reentrant scanners for convenience. */
780 
781 int ematch_lex_destroy (yyscan_t yyscanner );
782 
783 int ematch_get_debug (yyscan_t yyscanner );
784 
785 void ematch_set_debug (int debug_flag ,yyscan_t yyscanner );
786 
787 YY_EXTRA_TYPE ematch_get_extra (yyscan_t yyscanner );
788 
789 void ematch_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
790 
791 FILE *ematch_get_in (yyscan_t yyscanner );
792 
793 void ematch_set_in (FILE * in_str ,yyscan_t yyscanner );
794 
795 FILE *ematch_get_out (yyscan_t yyscanner );
796 
797 void ematch_set_out (FILE * out_str ,yyscan_t yyscanner );
798 
799 int ematch_get_leng (yyscan_t yyscanner );
800 
801 char *ematch_get_text (yyscan_t yyscanner );
802 
803 int ematch_get_lineno (yyscan_t yyscanner );
804 
805 void ematch_set_lineno (int line_number ,yyscan_t yyscanner );
806 
807 YYSTYPE * ematch_get_lval (yyscan_t yyscanner );
808 
809 void ematch_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
810 
811 /* Macros after this point can all be overridden by user definitions in
812  * section 1.
813  */
814 
815 #ifndef YY_SKIP_YYWRAP
816 #ifdef __cplusplus
817 extern "C" int ematch_wrap (yyscan_t yyscanner );
818 #else
819 extern int ematch_wrap (yyscan_t yyscanner );
820 #endif
821 #endif
822 
823 #ifndef yytext_ptr
824 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
825 #endif
826 
827 #ifdef YY_NEED_STRLEN
828 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
829 #endif
830 
831 #ifndef YY_NO_INPUT
832 
833 #ifdef __cplusplus
834 static int yyinput (yyscan_t yyscanner );
835 #else
836 static int input (yyscan_t yyscanner );
837 #endif
838 
839 #endif
840 
841 /* Amount of stuff to slurp up with each read. */
842 #ifndef YY_READ_BUF_SIZE
843 #define YY_READ_BUF_SIZE 8192
844 #endif
845 
846 /* Copy whatever the last rule matched to the standard output. */
847 #ifndef ECHO
848 /* This used to be an fputs(), but since the string might contain NUL's,
849  * we now use fwrite().
850  */
851 #define ECHO fwrite( yytext, yyleng, 1, yyout )
852 #endif
853 
854 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
855  * is returned in "result".
856  */
857 #ifndef YY_INPUT
858 #define YY_INPUT(buf,result,max_size) \
859  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
860  { \
861  int c = '*'; \
862  int n; \
863  for ( n = 0; n < max_size && \
864  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
865  buf[n] = (char) c; \
866  if ( c == '\n' ) \
867  buf[n++] = (char) c; \
868  if ( c == EOF && ferror( yyin ) ) \
869  YY_FATAL_ERROR( "input in flex scanner failed" ); \
870  result = n; \
871  } \
872  else \
873  { \
874  errno=0; \
875  while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
876  { \
877  if( errno != EINTR) \
878  { \
879  YY_FATAL_ERROR( "input in flex scanner failed" ); \
880  break; \
881  } \
882  errno=0; \
883  clearerr(yyin); \
884  } \
885  }\
886 \
887 
888 #endif
889 
890 /* No semi-colon after return; correct usage is to write "yyterminate();" -
891  * we don't want an extra ';' after the "return" because that will cause
892  * some compilers to complain about unreachable statements.
893  */
894 #ifndef yyterminate
895 #define yyterminate() return YY_NULL
896 #endif
897 
898 /* Number of entries by which start-condition stack grows. */
899 #ifndef YY_START_STACK_INCR
900 #define YY_START_STACK_INCR 25
901 #endif
902 
903 /* Report a fatal error. */
904 #ifndef YY_FATAL_ERROR
905 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
906 #endif
907 
908 /* end tables serialization structures and prototypes */
909 
910 /* Default declaration of generated scanner - a define so the user can
911  * easily add parameters.
912  */
913 #ifndef YY_DECL
914 #define YY_DECL_IS_OURS 1
915 
916 extern int ematch_lex \
917  (YYSTYPE * yylval_param ,yyscan_t yyscanner);
918 
919 #define YY_DECL int ematch_lex \
920  (YYSTYPE * yylval_param , yyscan_t yyscanner)
921 #endif /* !YY_DECL */
922 
923 /* Code executed at the beginning of each rule, after yytext and yyleng
924  * have been set up.
925  */
926 #ifndef YY_USER_ACTION
927 #define YY_USER_ACTION
928 #endif
929 
930 /* Code executed at the end of each rule. */
931 #ifndef YY_BREAK
932 #define YY_BREAK break;
933 #endif
934 
935 #define YY_RULE_SETUP \
936  YY_USER_ACTION
937 
938 /** The main scanner function which does all the work.
939  */
940 YY_DECL
941 {
942  register yy_state_type yy_current_state;
943  register char *yy_cp, *yy_bp;
944  register int yy_act;
945  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
946 
947 #line 32 "route/cls/ematch_grammar.l"
948 
949 
950 #line 951 "route/cls/ematch_grammar.c"
951 
952  yylval = yylval_param;
953 
954  if ( !yyg->yy_init )
955  {
956  yyg->yy_init = 1;
957 
958 #ifdef YY_USER_INIT
959  YY_USER_INIT;
960 #endif
961 
962  if ( ! yyg->yy_start )
963  yyg->yy_start = 1; /* first start state */
964 
965  if ( ! yyin )
966  yyin = stdin;
967 
968  if ( ! yyout )
969  yyout = stdout;
970 
971  if ( ! YY_CURRENT_BUFFER ) {
972  ematch_ensure_buffer_stack (yyscanner);
973  YY_CURRENT_BUFFER_LVALUE =
974  ematch__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
975  }
976 
977  ematch__load_buffer_state(yyscanner );
978  }
979 
980  while ( 1 ) /* loops until end-of-file is reached */
981  {
982  yy_cp = yyg->yy_c_buf_p;
983 
984  /* Support of yytext. */
985  *yy_cp = yyg->yy_hold_char;
986 
987  /* yy_bp points to the position in yy_ch_buf of the start of
988  * the current run.
989  */
990  yy_bp = yy_cp;
991 
992  yy_current_state = yyg->yy_start;
993 yy_match:
994  do
995  {
996  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
997  if ( yy_accept[yy_current_state] )
998  {
999  yyg->yy_last_accepting_state = yy_current_state;
1000  yyg->yy_last_accepting_cpos = yy_cp;
1001  }
1002  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1003  {
1004  yy_current_state = (int) yy_def[yy_current_state];
1005  if ( yy_current_state >= 393 )
1006  yy_c = yy_meta[(unsigned int) yy_c];
1007  }
1008  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1009  ++yy_cp;
1010  }
1011  while ( yy_base[yy_current_state] != 538 );
1012 
1013 yy_find_action:
1014  yy_act = yy_accept[yy_current_state];
1015  if ( yy_act == 0 )
1016  { /* have to back up */
1017  yy_cp = yyg->yy_last_accepting_cpos;
1018  yy_current_state = yyg->yy_last_accepting_state;
1019  yy_act = yy_accept[yy_current_state];
1020  }
1021 
1022  YY_DO_BEFORE_ACTION;
1023 
1024 do_action: /* This label is used only to access EOF actions. */
1025 
1026  switch ( yy_act )
1027  { /* beginning of action switch */
1028  case 0: /* must back up */
1029  /* undo the effects of YY_DO_BEFORE_ACTION */
1030  *yy_cp = yyg->yy_hold_char;
1031  yy_cp = yyg->yy_last_accepting_cpos;
1032  yy_current_state = yyg->yy_last_accepting_state;
1033  goto yy_find_action;
1034 
1035 case 1:
1036 /* rule 1 can match eol */
1037 YY_RULE_SETUP
1038 #line 34 "route/cls/ematch_grammar.l"
1039 
1040  YY_BREAK
1041 case 2:
1042 YY_RULE_SETUP
1043 #line 36 "route/cls/ematch_grammar.l"
1044 {
1045  NL_DBG(4, "Beginning of quote\n");
1046  yylval->q.len = 32;
1047  if (!(yylval->q.data = calloc(1, yylval->q.len)))
1048  return ERROR;
1049 
1050  yylval->q.index = 0;
1051  BEGIN(QUOTE);
1052  }
1053  YY_BREAK
1054 case 3:
1055 YY_RULE_SETUP
1056 #line 46 "route/cls/ematch_grammar.l"
1057 {
1058  memcpy(yylval->q.data + yylval->q.index, yytext,
1059  strlen(yytext));
1060  yylval->q.index += strlen(yytext);
1061  }
1062  YY_BREAK
1063 case 4:
1064 YY_RULE_SETUP
1065 #line 52 "route/cls/ematch_grammar.l"
1066 {
1067  BEGIN(0);
1068  return QUOTED;
1069  }
1070  YY_BREAK
1071 case 5:
1072 #line 59 "route/cls/ematch_grammar.l"
1073 case 6:
1074 YY_RULE_SETUP
1075 #line 59 "route/cls/ematch_grammar.l"
1076 {
1077  yylval->i = strtoul(yytext, NULL, 0);
1078  return NUMBER;
1079  }
1080  YY_BREAK
1081 case 7:
1082 #line 65 "route/cls/ematch_grammar.l"
1083 case 8:
1084 YY_RULE_SETUP
1085 #line 65 "route/cls/ematch_grammar.l"
1086 return KW_EQ;
1087  YY_BREAK
1088 case 9:
1089 #line 67 "route/cls/ematch_grammar.l"
1090 case 10:
1091 YY_RULE_SETUP
1092 #line 67 "route/cls/ematch_grammar.l"
1093 return KW_GT;
1094  YY_BREAK
1095 case 11:
1096 #line 69 "route/cls/ematch_grammar.l"
1097 case 12:
1098 YY_RULE_SETUP
1099 #line 69 "route/cls/ematch_grammar.l"
1100 return KW_LT;
1101  YY_BREAK
1102 case 13:
1103 #line 72 "route/cls/ematch_grammar.l"
1104 case 14:
1105 YY_RULE_SETUP
1106 #line 72 "route/cls/ematch_grammar.l"
1107 { yylval->i = TCF_EM_REL_AND; return LOGIC; }
1108  YY_BREAK
1109 case 15:
1110 #line 74 "route/cls/ematch_grammar.l"
1111 case 16:
1112 YY_RULE_SETUP
1113 #line 74 "route/cls/ematch_grammar.l"
1114 { yylval->i = TCF_EM_REL_OR; return LOGIC; }
1115  YY_BREAK
1116 case 17:
1117 #line 76 "route/cls/ematch_grammar.l"
1118 case 18:
1119 YY_RULE_SETUP
1120 #line 76 "route/cls/ematch_grammar.l"
1121 return NOT;
1122  YY_BREAK
1123 case 19:
1124 YY_RULE_SETUP
1125 #line 78 "route/cls/ematch_grammar.l"
1126 { yylval->i = TCF_EM_CMP; return EMATCH_CMP; }
1127  YY_BREAK
1128 case 20:
1129 YY_RULE_SETUP
1130 #line 79 "route/cls/ematch_grammar.l"
1131 { yylval->i = TCF_EM_NBYTE; return EMATCH_NBYTE; }
1132  YY_BREAK
1133 case 21:
1134 YY_RULE_SETUP
1135 #line 80 "route/cls/ematch_grammar.l"
1136 { yylval->i = TCF_EM_TEXT; return EMATCH_TEXT; }
1137  YY_BREAK
1138 case 22:
1139 YY_RULE_SETUP
1140 #line 81 "route/cls/ematch_grammar.l"
1141 { yylval->i = TCF_EM_META; return EMATCH_META; }
1142  YY_BREAK
1143 case 23:
1144 YY_RULE_SETUP
1145 #line 83 "route/cls/ematch_grammar.l"
1146 return KW_OPEN;
1147  YY_BREAK
1148 case 24:
1149 YY_RULE_SETUP
1150 #line 84 "route/cls/ematch_grammar.l"
1151 return KW_CLOSE;
1152  YY_BREAK
1153 case 25:
1154 #line 86 "route/cls/ematch_grammar.l"
1155 case 26:
1156 YY_RULE_SETUP
1157 #line 86 "route/cls/ematch_grammar.l"
1158 return KW_MASK;
1159  YY_BREAK
1160 case 27:
1161 #line 88 "route/cls/ematch_grammar.l"
1162 case 28:
1163 YY_RULE_SETUP
1164 #line 88 "route/cls/ematch_grammar.l"
1165 return KW_SHIFT;
1166  YY_BREAK
1167 case 29:
1168 YY_RULE_SETUP
1169 #line 89 "route/cls/ematch_grammar.l"
1170 return KW_AT;
1171  YY_BREAK
1172 case 30:
1173 YY_RULE_SETUP
1174 #line 90 "route/cls/ematch_grammar.l"
1175 return KW_PLUS;
1176  YY_BREAK
1177 case 31:
1178 YY_RULE_SETUP
1179 #line 91 "route/cls/ematch_grammar.l"
1180 return KW_FROM;
1181  YY_BREAK
1182 case 32:
1183 YY_RULE_SETUP
1184 #line 92 "route/cls/ematch_grammar.l"
1185 return KW_TO;
1186  YY_BREAK
1187 case 33:
1188 YY_RULE_SETUP
1189 #line 94 "route/cls/ematch_grammar.l"
1190 { yylval->i = TCF_EM_ALIGN_U8; return ALIGN; }
1191  YY_BREAK
1192 case 34:
1193 YY_RULE_SETUP
1194 #line 95 "route/cls/ematch_grammar.l"
1195 { yylval->i = TCF_EM_ALIGN_U16; return ALIGN; }
1196  YY_BREAK
1197 case 35:
1198 YY_RULE_SETUP
1199 #line 96 "route/cls/ematch_grammar.l"
1200 { yylval->i = TCF_EM_ALIGN_U32; return ALIGN; }
1201  YY_BREAK
1202 case 36:
1203 #line 99 "route/cls/ematch_grammar.l"
1204 case 37:
1205 YY_RULE_SETUP
1206 #line 99 "route/cls/ematch_grammar.l"
1207 { yylval->i = TCF_LAYER_LINK; return LAYER; }
1208  YY_BREAK
1209 case 38:
1210 #line 101 "route/cls/ematch_grammar.l"
1211 case 39:
1212 #line 102 "route/cls/ematch_grammar.l"
1213 case 40:
1214 YY_RULE_SETUP
1215 #line 102 "route/cls/ematch_grammar.l"
1216 { yylval->i = TCF_LAYER_NETWORK; return LAYER; }
1217  YY_BREAK
1218 case 41:
1219 #line 104 "route/cls/ematch_grammar.l"
1220 case 42:
1221 YY_RULE_SETUP
1222 #line 104 "route/cls/ematch_grammar.l"
1223 { yylval->i = TCF_LAYER_TRANSPORT; return LAYER; }
1224  YY_BREAK
1225 case 43:
1226 YY_RULE_SETUP
1227 #line 106 "route/cls/ematch_grammar.l"
1228 return META_RANDOM;
1229  YY_BREAK
1230 case 44:
1231 YY_RULE_SETUP
1232 #line 107 "route/cls/ematch_grammar.l"
1233 return META_LOADAVG_0;
1234  YY_BREAK
1235 case 45:
1236 YY_RULE_SETUP
1237 #line 108 "route/cls/ematch_grammar.l"
1238 return META_LOADAVG_1;
1239  YY_BREAK
1240 case 46:
1241 YY_RULE_SETUP
1242 #line 109 "route/cls/ematch_grammar.l"
1243 return META_LOADAVG_2;
1244  YY_BREAK
1245 case 47:
1246 YY_RULE_SETUP
1247 #line 110 "route/cls/ematch_grammar.l"
1248 return META_DEV;
1249  YY_BREAK
1250 case 48:
1251 YY_RULE_SETUP
1252 #line 111 "route/cls/ematch_grammar.l"
1253 return META_PRIO;
1254  YY_BREAK
1255 case 49:
1256 YY_RULE_SETUP
1257 #line 112 "route/cls/ematch_grammar.l"
1258 return META_PROTO;
1259  YY_BREAK
1260 case 50:
1261 YY_RULE_SETUP
1262 #line 113 "route/cls/ematch_grammar.l"
1263 return META_PKTTYPE;
1264  YY_BREAK
1265 case 51:
1266 YY_RULE_SETUP
1267 #line 114 "route/cls/ematch_grammar.l"
1268 return META_PKTLEN;
1269  YY_BREAK
1270 case 52:
1271 YY_RULE_SETUP
1272 #line 115 "route/cls/ematch_grammar.l"
1273 return META_DATALEN;
1274  YY_BREAK
1275 case 53:
1276 YY_RULE_SETUP
1277 #line 116 "route/cls/ematch_grammar.l"
1278 return META_MACLEN;
1279  YY_BREAK
1280 case 54:
1281 YY_RULE_SETUP
1282 #line 117 "route/cls/ematch_grammar.l"
1283 return META_MARK;
1284  YY_BREAK
1285 case 55:
1286 YY_RULE_SETUP
1287 #line 118 "route/cls/ematch_grammar.l"
1288 return META_TCINDEX;
1289  YY_BREAK
1290 case 56:
1291 YY_RULE_SETUP
1292 #line 119 "route/cls/ematch_grammar.l"
1293 return META_RTCLASSID;
1294  YY_BREAK
1295 case 57:
1296 YY_RULE_SETUP
1297 #line 120 "route/cls/ematch_grammar.l"
1298 return META_RTIIF;
1299  YY_BREAK
1300 case 58:
1301 YY_RULE_SETUP
1302 #line 121 "route/cls/ematch_grammar.l"
1303 return META_SK_FAMILY;
1304  YY_BREAK
1305 case 59:
1306 YY_RULE_SETUP
1307 #line 122 "route/cls/ematch_grammar.l"
1308 return META_SK_STATE;
1309  YY_BREAK
1310 case 60:
1311 YY_RULE_SETUP
1312 #line 123 "route/cls/ematch_grammar.l"
1313 return META_SK_REUSE;
1314  YY_BREAK
1315 case 61:
1316 YY_RULE_SETUP
1317 #line 124 "route/cls/ematch_grammar.l"
1318 return META_SK_REFCNT;
1319  YY_BREAK
1320 case 62:
1321 YY_RULE_SETUP
1322 #line 125 "route/cls/ematch_grammar.l"
1323 return META_SK_RCVBUF;
1324  YY_BREAK
1325 case 63:
1326 YY_RULE_SETUP
1327 #line 126 "route/cls/ematch_grammar.l"
1328 return META_SK_SNDBUF;
1329  YY_BREAK
1330 case 64:
1331 YY_RULE_SETUP
1332 #line 127 "route/cls/ematch_grammar.l"
1333 return META_SK_SHUTDOWN;
1334  YY_BREAK
1335 case 65:
1336 YY_RULE_SETUP
1337 #line 128 "route/cls/ematch_grammar.l"
1338 return META_SK_PROTO;
1339  YY_BREAK
1340 case 66:
1341 YY_RULE_SETUP
1342 #line 129 "route/cls/ematch_grammar.l"
1343 return META_SK_TYPE;
1344  YY_BREAK
1345 case 67:
1346 YY_RULE_SETUP
1347 #line 130 "route/cls/ematch_grammar.l"
1348 return META_SK_RMEM_ALLOC;
1349  YY_BREAK
1350 case 68:
1351 YY_RULE_SETUP
1352 #line 131 "route/cls/ematch_grammar.l"
1353 return META_SK_WMEM_ALLOC;
1354  YY_BREAK
1355 case 69:
1356 YY_RULE_SETUP
1357 #line 132 "route/cls/ematch_grammar.l"
1358 return META_SK_WMEM_QUEUED;
1359  YY_BREAK
1360 case 70:
1361 YY_RULE_SETUP
1362 #line 133 "route/cls/ematch_grammar.l"
1363 return META_SK_RCV_QLEN;
1364  YY_BREAK
1365 case 71:
1366 YY_RULE_SETUP
1367 #line 134 "route/cls/ematch_grammar.l"
1368 return META_SK_SND_QLEN;
1369  YY_BREAK
1370 case 72:
1371 YY_RULE_SETUP
1372 #line 135 "route/cls/ematch_grammar.l"
1373 return META_SK_ERR_QLEN;
1374  YY_BREAK
1375 case 73:
1376 YY_RULE_SETUP
1377 #line 136 "route/cls/ematch_grammar.l"
1378 return META_SK_FORWARD_ALLOCS;
1379  YY_BREAK
1380 case 74:
1381 YY_RULE_SETUP
1382 #line 137 "route/cls/ematch_grammar.l"
1383 return META_SK_ALLOCS;
1384  YY_BREAK
1385 case 75:
1386 YY_RULE_SETUP
1387 #line 138 "route/cls/ematch_grammar.l"
1388 return META_SK_ROUTE_CAPS;
1389  YY_BREAK
1390 case 76:
1391 YY_RULE_SETUP
1392 #line 139 "route/cls/ematch_grammar.l"
1393 return META_SK_HASH;
1394  YY_BREAK
1395 case 77:
1396 YY_RULE_SETUP
1397 #line 140 "route/cls/ematch_grammar.l"
1398 return META_SK_LINGERTIME;
1399  YY_BREAK
1400 case 78:
1401 YY_RULE_SETUP
1402 #line 141 "route/cls/ematch_grammar.l"
1403 return META_SK_ACK_BACKLOG;
1404  YY_BREAK
1405 case 79:
1406 YY_RULE_SETUP
1407 #line 142 "route/cls/ematch_grammar.l"
1408 return META_SK_MAX_ACK_BACKLOG;
1409  YY_BREAK
1410 case 80:
1411 YY_RULE_SETUP
1412 #line 143 "route/cls/ematch_grammar.l"
1413 return META_SK_PRIO;
1414  YY_BREAK
1415 case 81:
1416 YY_RULE_SETUP
1417 #line 144 "route/cls/ematch_grammar.l"
1418 return META_SK_RCVLOWAT;
1419  YY_BREAK
1420 case 82:
1421 YY_RULE_SETUP
1422 #line 145 "route/cls/ematch_grammar.l"
1423 return META_SK_RCVTIMEO;
1424  YY_BREAK
1425 case 83:
1426 YY_RULE_SETUP
1427 #line 146 "route/cls/ematch_grammar.l"
1428 return META_SK_SNDTIMEO;
1429  YY_BREAK
1430 case 84:
1431 YY_RULE_SETUP
1432 #line 147 "route/cls/ematch_grammar.l"
1433 return META_SK_SENDMSG_OFF;
1434  YY_BREAK
1435 case 85:
1436 YY_RULE_SETUP
1437 #line 148 "route/cls/ematch_grammar.l"
1438 return META_SK_WRITE_PENDING;
1439  YY_BREAK
1440 case 86:
1441 YY_RULE_SETUP
1442 #line 149 "route/cls/ematch_grammar.l"
1443 return META_VLAN;
1444  YY_BREAK
1445 case 87:
1446 YY_RULE_SETUP
1447 #line 150 "route/cls/ematch_grammar.l"
1448 return META_RXHASH;
1449  YY_BREAK
1450 case 88:
1451 YY_RULE_SETUP
1452 #line 152 "route/cls/ematch_grammar.l"
1453 return META_DEVNAME;
1454  YY_BREAK
1455 case 89:
1456 YY_RULE_SETUP
1457 #line 153 "route/cls/ematch_grammar.l"
1458 return META_SK_BOUND_IF;
1459  YY_BREAK
1460 case 90:
1461 YY_RULE_SETUP
1462 #line 156 "route/cls/ematch_grammar.l"
1463 {
1464  yylval->s = strdup(yytext);
1465  if (yylval->s == NULL)
1466  return ERROR;
1467  NL_DBG(4, "lex STR=%s\n", yylval->s);
1468  return STR;
1469  }
1470  YY_BREAK
1471 case 91:
1472 YY_RULE_SETUP
1473 #line 163 "route/cls/ematch_grammar.l"
1474 ECHO;
1475  YY_BREAK
1476 #line 1477 "route/cls/ematch_grammar.c"
1477 case YY_STATE_EOF(INITIAL):
1478 case YY_STATE_EOF(QUOTE):
1479  yyterminate();
1480 
1481  case YY_END_OF_BUFFER:
1482  {
1483  /* Amount of text matched not including the EOB char. */
1484  int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1485 
1486  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1487  *yy_cp = yyg->yy_hold_char;
1488  YY_RESTORE_YY_MORE_OFFSET
1489 
1490  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1491  {
1492  /* We're scanning a new file or input source. It's
1493  * possible that this happened because the user
1494  * just pointed yyin at a new source and called
1495  * ematch_lex(). If so, then we have to assure
1496  * consistency between YY_CURRENT_BUFFER and our
1497  * globals. Here is the right place to do so, because
1498  * this is the first action (other than possibly a
1499  * back-up) that will match for the new input source.
1500  */
1501  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1502  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1503  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1504  }
1505 
1506  /* Note that here we test for yy_c_buf_p "<=" to the position
1507  * of the first EOB in the buffer, since yy_c_buf_p will
1508  * already have been incremented past the NUL character
1509  * (since all states make transitions on EOB to the
1510  * end-of-buffer state). Contrast this with the test
1511  * in input().
1512  */
1513  if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1514  { /* This was really a NUL. */
1515  yy_state_type yy_next_state;
1516 
1517  yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1518 
1519  yy_current_state = yy_get_previous_state( yyscanner );
1520 
1521  /* Okay, we're now positioned to make the NUL
1522  * transition. We couldn't have
1523  * yy_get_previous_state() go ahead and do it
1524  * for us because it doesn't know how to deal
1525  * with the possibility of jamming (and we don't
1526  * want to build jamming into it because then it
1527  * will run more slowly).
1528  */
1529 
1530  yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1531 
1532  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1533 
1534  if ( yy_next_state )
1535  {
1536  /* Consume the NUL. */
1537  yy_cp = ++yyg->yy_c_buf_p;
1538  yy_current_state = yy_next_state;
1539  goto yy_match;
1540  }
1541 
1542  else
1543  {
1544  yy_cp = yyg->yy_c_buf_p;
1545  goto yy_find_action;
1546  }
1547  }
1548 
1549  else switch ( yy_get_next_buffer( yyscanner ) )
1550  {
1551  case EOB_ACT_END_OF_FILE:
1552  {
1553  yyg->yy_did_buffer_switch_on_eof = 0;
1554 
1555  if ( ematch_wrap(yyscanner ) )
1556  {
1557  /* Note: because we've taken care in
1558  * yy_get_next_buffer() to have set up
1559  * yytext, we can now set up
1560  * yy_c_buf_p so that if some total
1561  * hoser (like flex itself) wants to
1562  * call the scanner after we return the
1563  * YY_NULL, it'll still work - another
1564  * YY_NULL will get returned.
1565  */
1566  yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1567 
1568  yy_act = YY_STATE_EOF(YY_START);
1569  goto do_action;
1570  }
1571 
1572  else
1573  {
1574  if ( ! yyg->yy_did_buffer_switch_on_eof )
1575  YY_NEW_FILE;
1576  }
1577  break;
1578  }
1579 
1580  case EOB_ACT_CONTINUE_SCAN:
1581  yyg->yy_c_buf_p =
1582  yyg->yytext_ptr + yy_amount_of_matched_text;
1583 
1584  yy_current_state = yy_get_previous_state( yyscanner );
1585 
1586  yy_cp = yyg->yy_c_buf_p;
1587  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1588  goto yy_match;
1589 
1590  case EOB_ACT_LAST_MATCH:
1591  yyg->yy_c_buf_p =
1592  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1593 
1594  yy_current_state = yy_get_previous_state( yyscanner );
1595 
1596  yy_cp = yyg->yy_c_buf_p;
1597  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1598  goto yy_find_action;
1599  }
1600  break;
1601  }
1602 
1603  default:
1604  YY_FATAL_ERROR(
1605  "fatal flex scanner internal error--no action found" );
1606  } /* end of action switch */
1607  } /* end of scanning one token */
1608 } /* end of ematch_lex */
1609 
1610 /* yy_get_next_buffer - try to read in a new buffer
1611  *
1612  * Returns a code representing an action:
1613  * EOB_ACT_LAST_MATCH -
1614  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1615  * EOB_ACT_END_OF_FILE - end of file
1616  */
1617 static int yy_get_next_buffer (yyscan_t yyscanner)
1618 {
1619  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1620  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1621  register char *source = yyg->yytext_ptr;
1622  register int number_to_move, i;
1623  int ret_val;
1624 
1625  if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1626  YY_FATAL_ERROR(
1627  "fatal flex scanner internal error--end of buffer missed" );
1628 
1629  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1630  { /* Don't try to fill the buffer, so this is an EOF. */
1631  if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1632  {
1633  /* We matched a single character, the EOB, so
1634  * treat this as a final EOF.
1635  */
1636  return EOB_ACT_END_OF_FILE;
1637  }
1638 
1639  else
1640  {
1641  /* We matched some text prior to the EOB, first
1642  * process it.
1643  */
1644  return EOB_ACT_LAST_MATCH;
1645  }
1646  }
1647 
1648  /* Try to read more data. */
1649 
1650  /* First move last chars to start of buffer. */
1651  number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1652 
1653  for ( i = 0; i < number_to_move; ++i )
1654  *(dest++) = *(source++);
1655 
1656  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1657  /* don't do the read, it's not guaranteed to return an EOF,
1658  * just force an EOF
1659  */
1660  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1661 
1662  else
1663  {
1664  int num_to_read =
1665  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1666 
1667  while ( num_to_read <= 0 )
1668  { /* Not enough room in the buffer - grow it. */
1669 
1670  /* just a shorter name for the current buffer */
1671  YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1672 
1673  int yy_c_buf_p_offset =
1674  (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1675 
1676  if ( b->yy_is_our_buffer )
1677  {
1678  int new_size = b->yy_buf_size * 2;
1679 
1680  if ( new_size <= 0 )
1681  b->yy_buf_size += b->yy_buf_size / 8;
1682  else
1683  b->yy_buf_size *= 2;
1684 
1685  b->yy_ch_buf = (char *)
1686  /* Include room in for 2 EOB chars. */
1687  ematch_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1688  }
1689  else
1690  /* Can't grow it, we don't own it. */
1691  b->yy_ch_buf = 0;
1692 
1693  if ( ! b->yy_ch_buf )
1694  YY_FATAL_ERROR(
1695  "fatal error - scanner input buffer overflow" );
1696 
1697  yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1698 
1699  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1700  number_to_move - 1;
1701 
1702  }
1703 
1704  if ( num_to_read > YY_READ_BUF_SIZE )
1705  num_to_read = YY_READ_BUF_SIZE;
1706 
1707  /* Read in more data. */
1708  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1709  yyg->yy_n_chars, (size_t) num_to_read );
1710 
1711  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1712  }
1713 
1714  if ( yyg->yy_n_chars == 0 )
1715  {
1716  if ( number_to_move == YY_MORE_ADJ )
1717  {
1718  ret_val = EOB_ACT_END_OF_FILE;
1719  ematch_restart(yyin ,yyscanner);
1720  }
1721 
1722  else
1723  {
1724  ret_val = EOB_ACT_LAST_MATCH;
1725  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1726  YY_BUFFER_EOF_PENDING;
1727  }
1728  }
1729 
1730  else
1731  ret_val = EOB_ACT_CONTINUE_SCAN;
1732 
1733  if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1734  /* Extend the array by 50%, plus the number we really need. */
1735  yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1736  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ematch_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1737  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1738  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1739  }
1740 
1741  yyg->yy_n_chars += number_to_move;
1742  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1743  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1744 
1745  yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1746 
1747  return ret_val;
1748 }
1749 
1750 /* yy_get_previous_state - get the state just before the EOB char was reached */
1751 
1752  static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1753 {
1754  register yy_state_type yy_current_state;
1755  register char *yy_cp;
1756  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1757 
1758  yy_current_state = yyg->yy_start;
1759 
1760  for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1761  {
1762  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1763  if ( yy_accept[yy_current_state] )
1764  {
1765  yyg->yy_last_accepting_state = yy_current_state;
1766  yyg->yy_last_accepting_cpos = yy_cp;
1767  }
1768  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1769  {
1770  yy_current_state = (int) yy_def[yy_current_state];
1771  if ( yy_current_state >= 393 )
1772  yy_c = yy_meta[(unsigned int) yy_c];
1773  }
1774  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1775  }
1776 
1777  return yy_current_state;
1778 }
1779 
1780 /* yy_try_NUL_trans - try to make a transition on the NUL character
1781  *
1782  * synopsis
1783  * next_state = yy_try_NUL_trans( current_state );
1784  */
1785  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1786 {
1787  register int yy_is_jam;
1788  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1789  register char *yy_cp = yyg->yy_c_buf_p;
1790 
1791  register YY_CHAR yy_c = 1;
1792  if ( yy_accept[yy_current_state] )
1793  {
1794  yyg->yy_last_accepting_state = yy_current_state;
1795  yyg->yy_last_accepting_cpos = yy_cp;
1796  }
1797  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1798  {
1799  yy_current_state = (int) yy_def[yy_current_state];
1800  if ( yy_current_state >= 393 )
1801  yy_c = yy_meta[(unsigned int) yy_c];
1802  }
1803  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1804  yy_is_jam = (yy_current_state == 392);
1805 
1806  return yy_is_jam ? 0 : yy_current_state;
1807 }
1808 
1809 #ifndef YY_NO_INPUT
1810 #ifdef __cplusplus
1811  static int yyinput (yyscan_t yyscanner)
1812 #else
1813  static int input (yyscan_t yyscanner)
1814 #endif
1815 
1816 {
1817  int c;
1818  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1819 
1820  *yyg->yy_c_buf_p = yyg->yy_hold_char;
1821 
1822  if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1823  {
1824  /* yy_c_buf_p now points to the character we want to return.
1825  * If this occurs *before* the EOB characters, then it's a
1826  * valid NUL; if not, then we've hit the end of the buffer.
1827  */
1828  if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1829  /* This was really a NUL. */
1830  *yyg->yy_c_buf_p = '\0';
1831 
1832  else
1833  { /* need more input */
1834  int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1835  ++yyg->yy_c_buf_p;
1836 
1837  switch ( yy_get_next_buffer( yyscanner ) )
1838  {
1839  case EOB_ACT_LAST_MATCH:
1840  /* This happens because yy_g_n_b()
1841  * sees that we've accumulated a
1842  * token and flags that we need to
1843  * try matching the token before
1844  * proceeding. But for input(),
1845  * there's no matching to consider.
1846  * So convert the EOB_ACT_LAST_MATCH
1847  * to EOB_ACT_END_OF_FILE.
1848  */
1849 
1850  /* Reset buffer status. */
1851  ematch_restart(yyin ,yyscanner);
1852 
1853  /*FALLTHROUGH*/
1854 
1855  case EOB_ACT_END_OF_FILE:
1856  {
1857  if ( ematch_wrap(yyscanner ) )
1858  return EOF;
1859 
1860  if ( ! yyg->yy_did_buffer_switch_on_eof )
1861  YY_NEW_FILE;
1862 #ifdef __cplusplus
1863  return yyinput(yyscanner);
1864 #else
1865  return input(yyscanner);
1866 #endif
1867  }
1868 
1869  case EOB_ACT_CONTINUE_SCAN:
1870  yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1871  break;
1872  }
1873  }
1874  }
1875 
1876  c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1877  *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1878  yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1879 
1880  return c;
1881 }
1882 #endif /* ifndef YY_NO_INPUT */
1883 
1884 /** Immediately switch to a different input stream.
1885  * @param input_file A readable stream.
1886  * @param yyscanner The scanner object.
1887  * @note This function does not reset the start condition to @c INITIAL .
1888  */
1889  void ematch_restart (FILE * input_file , yyscan_t yyscanner)
1890 {
1891  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1892 
1893  if ( ! YY_CURRENT_BUFFER ){
1894  ematch_ensure_buffer_stack (yyscanner);
1895  YY_CURRENT_BUFFER_LVALUE =
1896  ematch__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1897  }
1898 
1899  ematch__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1900  ematch__load_buffer_state(yyscanner );
1901 }
1902 
1903 /** Switch to a different input buffer.
1904  * @param new_buffer The new input buffer.
1905  * @param yyscanner The scanner object.
1906  */
1907  void ematch__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1908 {
1909  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1910 
1911  /* TODO. We should be able to replace this entire function body
1912  * with
1913  * ematch_pop_buffer_state();
1914  * ematch_push_buffer_state(new_buffer);
1915  */
1916  ematch_ensure_buffer_stack (yyscanner);
1917  if ( YY_CURRENT_BUFFER == new_buffer )
1918  return;
1919 
1920  if ( YY_CURRENT_BUFFER )
1921  {
1922  /* Flush out information for old buffer. */
1923  *yyg->yy_c_buf_p = yyg->yy_hold_char;
1924  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1925  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1926  }
1927 
1928  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1929  ematch__load_buffer_state(yyscanner );
1930 
1931  /* We don't actually know whether we did this switch during
1932  * EOF (ematch_wrap()) processing, but the only time this flag
1933  * is looked at is after ematch_wrap() is called, so it's safe
1934  * to go ahead and always set it.
1935  */
1936  yyg->yy_did_buffer_switch_on_eof = 1;
1937 }
1938 
1939 static void ematch__load_buffer_state (yyscan_t yyscanner)
1940 {
1941  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1942  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1943  yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1944  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1945  yyg->yy_hold_char = *yyg->yy_c_buf_p;
1946 }
1947 
1948 /** Allocate and initialize an input buffer state.
1949  * @param file A readable stream.
1950  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1951  * @param yyscanner The scanner object.
1952  * @return the allocated buffer state.
1953  */
1954  YY_BUFFER_STATE ematch__create_buffer (FILE * file, int size , yyscan_t yyscanner)
1955 {
1956  YY_BUFFER_STATE b;
1957 
1958  b = (YY_BUFFER_STATE) ematch_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1959  if ( ! b )
1960  YY_FATAL_ERROR( "out of dynamic memory in ematch__create_buffer()" );
1961 
1962  b->yy_buf_size = size;
1963 
1964  /* yy_ch_buf has to be 2 characters longer than the size given because
1965  * we need to put in 2 end-of-buffer characters.
1966  */
1967  b->yy_ch_buf = (char *) ematch_alloc(b->yy_buf_size + 2 ,yyscanner );
1968  if ( ! b->yy_ch_buf )
1969  YY_FATAL_ERROR( "out of dynamic memory in ematch__create_buffer()" );
1970 
1971  b->yy_is_our_buffer = 1;
1972 
1973  ematch__init_buffer(b,file ,yyscanner);
1974 
1975  return b;
1976 }
1977 
1978 /** Destroy the buffer.
1979  * @param b a buffer created with ematch__create_buffer()
1980  * @param yyscanner The scanner object.
1981  */
1982  void ematch__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1983 {
1984  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1985 
1986  if ( ! b )
1987  return;
1988 
1989  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1990  YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1991 
1992  if ( b->yy_is_our_buffer )
1993  ematch_free((void *) b->yy_ch_buf ,yyscanner );
1994 
1995  ematch_free((void *) b ,yyscanner );
1996 }
1997 
1998 #ifndef __cplusplus
1999 extern int isatty (int );
2000 #endif /* __cplusplus */
2001 
2002 /* Initializes or reinitializes a buffer.
2003  * This function is sometimes called more than once on the same buffer,
2004  * such as during a ematch_restart() or at EOF.
2005  */
2006  static void ematch__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2007 
2008 {
2009  int oerrno = errno;
2010  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2011 
2012  ematch__flush_buffer(b ,yyscanner);
2013 
2014  b->yy_input_file = file;
2015  b->yy_fill_buffer = 1;
2016 
2017  /* If b is the current buffer, then ematch__init_buffer was _probably_
2018  * called from ematch_restart() or through yy_get_next_buffer.
2019  * In that case, we don't want to reset the lineno or column.
2020  */
2021  if (b != YY_CURRENT_BUFFER){
2022  b->yy_bs_lineno = 1;
2023  b->yy_bs_column = 0;
2024  }
2025 
2026  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2027 
2028  errno = oerrno;
2029 }
2030 
2031 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2032  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2033  * @param yyscanner The scanner object.
2034  */
2035  void ematch__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2036 {
2037  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2038  if ( ! b )
2039  return;
2040 
2041  b->yy_n_chars = 0;
2042 
2043  /* We always need two end-of-buffer characters. The first causes
2044  * a transition to the end-of-buffer state. The second causes
2045  * a jam in that state.
2046  */
2047  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2048  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2049 
2050  b->yy_buf_pos = &b->yy_ch_buf[0];
2051 
2052  b->yy_at_bol = 1;
2053  b->yy_buffer_status = YY_BUFFER_NEW;
2054 
2055  if ( b == YY_CURRENT_BUFFER )
2056  ematch__load_buffer_state(yyscanner );
2057 }
2058 
2059 /** Pushes the new state onto the stack. The new state becomes
2060  * the current state. This function will allocate the stack
2061  * if necessary.
2062  * @param new_buffer The new state.
2063  * @param yyscanner The scanner object.
2064  */
2065 void ematch_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2066 {
2067  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2068  if (new_buffer == NULL)
2069  return;
2070 
2071  ematch_ensure_buffer_stack(yyscanner);
2072 
2073  /* This block is copied from ematch__switch_to_buffer. */
2074  if ( YY_CURRENT_BUFFER )
2075  {
2076  /* Flush out information for old buffer. */
2077  *yyg->yy_c_buf_p = yyg->yy_hold_char;
2078  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2079  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2080  }
2081 
2082  /* Only push if top exists. Otherwise, replace top. */
2083  if (YY_CURRENT_BUFFER)
2084  yyg->yy_buffer_stack_top++;
2085  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2086 
2087  /* copied from ematch__switch_to_buffer. */
2088  ematch__load_buffer_state(yyscanner );
2089  yyg->yy_did_buffer_switch_on_eof = 1;
2090 }
2091 
2092 /** Removes and deletes the top of the stack, if present.
2093  * The next element becomes the new top.
2094  * @param yyscanner The scanner object.
2095  */
2096 void ematch_pop_buffer_state (yyscan_t yyscanner)
2097 {
2098  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2099  if (!YY_CURRENT_BUFFER)
2100  return;
2101 
2102  ematch__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
2103  YY_CURRENT_BUFFER_LVALUE = NULL;
2104  if (yyg->yy_buffer_stack_top > 0)
2105  --yyg->yy_buffer_stack_top;
2106 
2107  if (YY_CURRENT_BUFFER) {
2108  ematch__load_buffer_state(yyscanner );
2109  yyg->yy_did_buffer_switch_on_eof = 1;
2110  }
2111 }
2112 
2113 /* Allocates the stack if it does not exist.
2114  * Guarantees space for at least one push.
2115  */
2116 static void ematch_ensure_buffer_stack (yyscan_t yyscanner)
2117 {
2118  int num_to_alloc;
2119  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2120 
2121  if (!yyg->yy_buffer_stack) {
2122 
2123  /* First allocation is just for 2 elements, since we don't know if this
2124  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2125  * immediate realloc on the next call.
2126  */
2127  num_to_alloc = 1;
2128  yyg->yy_buffer_stack = (struct yy_buffer_state**)ematch_alloc
2129  (num_to_alloc * sizeof(struct yy_buffer_state*)
2130  , yyscanner);
2131  if ( ! yyg->yy_buffer_stack )
2132  YY_FATAL_ERROR( "out of dynamic memory in ematch_ensure_buffer_stack()" );
2133 
2134  memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2135 
2136  yyg->yy_buffer_stack_max = num_to_alloc;
2137  yyg->yy_buffer_stack_top = 0;
2138  return;
2139  }
2140 
2141  if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2142 
2143  /* Increase the buffer to prepare for a possible push. */
2144  int grow_size = 8 /* arbitrary grow size */;
2145 
2146  num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2147  yyg->yy_buffer_stack = (struct yy_buffer_state**)ematch_realloc
2148  (yyg->yy_buffer_stack,
2149  num_to_alloc * sizeof(struct yy_buffer_state*)
2150  , yyscanner);
2151  if ( ! yyg->yy_buffer_stack )
2152  YY_FATAL_ERROR( "out of dynamic memory in ematch_ensure_buffer_stack()" );
2153 
2154  /* zero only the new slots.*/
2155  memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2156  yyg->yy_buffer_stack_max = num_to_alloc;
2157  }
2158 }
2159 
2160 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2161  * @param base the character buffer
2162  * @param size the size in bytes of the character buffer
2163  * @param yyscanner The scanner object.
2164  * @return the newly allocated buffer state object.
2165  */
2166 YY_BUFFER_STATE ematch__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2167 {
2168  YY_BUFFER_STATE b;
2169 
2170  if ( size < 2 ||
2171  base[size-2] != YY_END_OF_BUFFER_CHAR ||
2172  base[size-1] != YY_END_OF_BUFFER_CHAR )
2173  /* They forgot to leave room for the EOB's. */
2174  return 0;
2175 
2176  b = (YY_BUFFER_STATE) ematch_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2177  if ( ! b )
2178  YY_FATAL_ERROR( "out of dynamic memory in ematch__scan_buffer()" );
2179 
2180  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2181  b->yy_buf_pos = b->yy_ch_buf = base;
2182  b->yy_is_our_buffer = 0;
2183  b->yy_input_file = 0;
2184  b->yy_n_chars = b->yy_buf_size;
2185  b->yy_is_interactive = 0;
2186  b->yy_at_bol = 1;
2187  b->yy_fill_buffer = 0;
2188  b->yy_buffer_status = YY_BUFFER_NEW;
2189 
2190  ematch__switch_to_buffer(b ,yyscanner );
2191 
2192  return b;
2193 }
2194 
2195 /** Setup the input buffer state to scan a string. The next call to ematch_lex() will
2196  * scan from a @e copy of @a str.
2197  * @param yystr a NUL-terminated string to scan
2198  * @param yyscanner The scanner object.
2199  * @return the newly allocated buffer state object.
2200  * @note If you want to scan bytes that may contain NUL values, then use
2201  * ematch__scan_bytes() instead.
2202  */
2203 YY_BUFFER_STATE ematch__scan_string (yyconst char * yystr , yyscan_t yyscanner)
2204 {
2205 
2206  return ematch__scan_bytes(yystr,strlen(yystr) ,yyscanner);
2207 }
2208 
2209 /** Setup the input buffer state to scan the given bytes. The next call to ematch_lex() will
2210  * scan from a @e copy of @a bytes.
2211  * @param bytes the byte buffer to scan
2212  * @param len the number of bytes in the buffer pointed to by @a bytes.
2213  * @param yyscanner The scanner object.
2214  * @return the newly allocated buffer state object.
2215  */
2216 YY_BUFFER_STATE ematch__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2217 {
2218  YY_BUFFER_STATE b;
2219  char *buf;
2220  yy_size_t n;
2221  int i;
2222 
2223  /* Get memory for full buffer, including space for trailing EOB's. */
2224  n = _yybytes_len + 2;
2225  buf = (char *) ematch_alloc(n ,yyscanner );
2226  if ( ! buf )
2227  YY_FATAL_ERROR( "out of dynamic memory in ematch__scan_bytes()" );
2228 
2229  for ( i = 0; i < _yybytes_len; ++i )
2230  buf[i] = yybytes[i];
2231 
2232  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2233 
2234  b = ematch__scan_buffer(buf,n ,yyscanner);
2235  if ( ! b )
2236  YY_FATAL_ERROR( "bad buffer in ematch__scan_bytes()" );
2237 
2238  /* It's okay to grow etc. this buffer, and we should throw it
2239  * away when we're done.
2240  */
2241  b->yy_is_our_buffer = 1;
2242 
2243  return b;
2244 }
2245 
2246 #ifndef YY_EXIT_FAILURE
2247 #define YY_EXIT_FAILURE 2
2248 #endif
2249 
2250 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
2251 {
2252  (void) fprintf( stderr, "%s\n", msg );
2253  exit( YY_EXIT_FAILURE );
2254 }
2255 
2256 /* Redefine yyless() so it works in section 3 code. */
2257 
2258 #undef yyless
2259 #define yyless(n) \
2260  do \
2261  { \
2262  /* Undo effects of setting up yytext. */ \
2263  int yyless_macro_arg = (n); \
2264  YY_LESS_LINENO(yyless_macro_arg);\
2265  yytext[yyleng] = yyg->yy_hold_char; \
2266  yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2267  yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2268  *yyg->yy_c_buf_p = '\0'; \
2269  yyleng = yyless_macro_arg; \
2270  } \
2271  while ( 0 )
2272 
2273 /* Accessor methods (get/set functions) to struct members. */
2274 
2275 /** Get the user-defined data for this scanner.
2276  * @param yyscanner The scanner object.
2277  */
2278 YY_EXTRA_TYPE ematch_get_extra (yyscan_t yyscanner)
2279 {
2280  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2281  return yyextra;
2282 }
2283 
2284 /** Get the current line number.
2285  * @param yyscanner The scanner object.
2286  */
2287 int ematch_get_lineno (yyscan_t yyscanner)
2288 {
2289  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2290 
2291  if (! YY_CURRENT_BUFFER)
2292  return 0;
2293 
2294  return yylineno;
2295 }
2296 
2297 /** Get the current column number.
2298  * @param yyscanner The scanner object.
2299  */
2300 int ematch_get_column (yyscan_t yyscanner)
2301 {
2302  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2303 
2304  if (! YY_CURRENT_BUFFER)
2305  return 0;
2306 
2307  return yycolumn;
2308 }
2309 
2310 /** Get the input stream.
2311  * @param yyscanner The scanner object.
2312  */
2313 FILE *ematch_get_in (yyscan_t yyscanner)
2314 {
2315  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2316  return yyin;
2317 }
2318 
2319 /** Get the output stream.
2320  * @param yyscanner The scanner object.
2321  */
2322 FILE *ematch_get_out (yyscan_t yyscanner)
2323 {
2324  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2325  return yyout;
2326 }
2327 
2328 /** Get the length of the current token.
2329  * @param yyscanner The scanner object.
2330  */
2331 int ematch_get_leng (yyscan_t yyscanner)
2332 {
2333  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2334  return yyleng;
2335 }
2336 
2337 /** Get the current token.
2338  * @param yyscanner The scanner object.
2339  */
2340 
2341 char *ematch_get_text (yyscan_t yyscanner)
2342 {
2343  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2344  return yytext;
2345 }
2346 
2347 /** Set the user-defined data. This data is never touched by the scanner.
2348  * @param user_defined The data to be associated with this scanner.
2349  * @param yyscanner The scanner object.
2350  */
2351 void ematch_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2352 {
2353  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2354  yyextra = user_defined ;
2355 }
2356 
2357 /** Set the current line number.
2358  * @param line_number
2359  * @param yyscanner The scanner object.
2360  */
2361 void ematch_set_lineno (int line_number , yyscan_t yyscanner)
2362 {
2363  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2364 
2365  /* lineno is only valid if an input buffer exists. */
2366  if (! YY_CURRENT_BUFFER )
2367  yy_fatal_error( "ematch_set_lineno called with no buffer" , yyscanner);
2368 
2369  yylineno = line_number;
2370 }
2371 
2372 /** Set the current column.
2373  * @param line_number
2374  * @param yyscanner The scanner object.
2375  */
2376 void ematch_set_column (int column_no , yyscan_t yyscanner)
2377 {
2378  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2379 
2380  /* column is only valid if an input buffer exists. */
2381  if (! YY_CURRENT_BUFFER )
2382  yy_fatal_error( "ematch_set_column called with no buffer" , yyscanner);
2383 
2384  yycolumn = column_no;
2385 }
2386 
2387 /** Set the input stream. This does not discard the current
2388  * input buffer.
2389  * @param in_str A readable stream.
2390  * @param yyscanner The scanner object.
2391  * @see ematch__switch_to_buffer
2392  */
2393 void ematch_set_in (FILE * in_str , yyscan_t yyscanner)
2394 {
2395  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2396  yyin = in_str ;
2397 }
2398 
2399 void ematch_set_out (FILE * out_str , yyscan_t yyscanner)
2400 {
2401  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2402  yyout = out_str ;
2403 }
2404 
2405 int ematch_get_debug (yyscan_t yyscanner)
2406 {
2407  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2408  return yy_flex_debug;
2409 }
2410 
2411 void ematch_set_debug (int bdebug , yyscan_t yyscanner)
2412 {
2413  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2414  yy_flex_debug = bdebug ;
2415 }
2416 
2417 /* Accessor methods for yylval and yylloc */
2418 
2419 YYSTYPE * ematch_get_lval (yyscan_t yyscanner)
2420 {
2421  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2422  return yylval;
2423 }
2424 
2425 void ematch_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
2426 {
2427  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2428  yylval = yylval_param;
2429 }
2430 
2431 /* User-visible API */
2432 
2433 /* ematch_lex_init is special because it creates the scanner itself, so it is
2434  * the ONLY reentrant function that doesn't take the scanner as the last argument.
2435  * That's why we explicitly handle the declaration, instead of using our macros.
2436  */
2437 
2438 int ematch_lex_init(yyscan_t* ptr_yy_globals)
2439 
2440 {
2441  if (ptr_yy_globals == NULL){
2442  errno = EINVAL;
2443  return 1;
2444  }
2445 
2446  *ptr_yy_globals = (yyscan_t) ematch_alloc ( sizeof( struct yyguts_t ), NULL );
2447 
2448  if (*ptr_yy_globals == NULL){
2449  errno = ENOMEM;
2450  return 1;
2451  }
2452 
2453  /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2454  memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2455 
2456  return yy_init_globals ( *ptr_yy_globals );
2457 }
2458 
2459 /* ematch_lex_init_extra has the same functionality as ematch_lex_init, but follows the
2460  * convention of taking the scanner as the last argument. Note however, that
2461  * this is a *pointer* to a scanner, as it will be allocated by this call (and
2462  * is the reason, too, why this function also must handle its own declaration).
2463  * The user defined value in the first argument will be available to ematch_alloc in
2464  * the yyextra field.
2465  */
2466 
2467 int ematch_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2468 
2469 {
2470  struct yyguts_t dummy_yyguts;
2471 
2472  ematch_set_extra (yy_user_defined, &dummy_yyguts);
2473 
2474  if (ptr_yy_globals == NULL){
2475  errno = EINVAL;
2476  return 1;
2477  }
2478 
2479  *ptr_yy_globals = (yyscan_t) ematch_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2480 
2481  if (*ptr_yy_globals == NULL){
2482  errno = ENOMEM;
2483  return 1;
2484  }
2485 
2486  /* By setting to 0xAA, we expose bugs in
2487  yy_init_globals. Leave at 0x00 for releases. */
2488  memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2489 
2490  ematch_set_extra (yy_user_defined, *ptr_yy_globals);
2491 
2492  return yy_init_globals ( *ptr_yy_globals );
2493 }
2494 
2495 static int yy_init_globals (yyscan_t yyscanner)
2496 {
2497  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2498  /* Initialization is the same as for the non-reentrant scanner.
2499  * This function is called from ematch_lex_destroy(), so don't allocate here.
2500  */
2501 
2502  yyg->yy_buffer_stack = 0;
2503  yyg->yy_buffer_stack_top = 0;
2504  yyg->yy_buffer_stack_max = 0;
2505  yyg->yy_c_buf_p = (char *) 0;
2506  yyg->yy_init = 0;
2507  yyg->yy_start = 0;
2508 
2509  yyg->yy_start_stack_ptr = 0;
2510  yyg->yy_start_stack_depth = 0;
2511  yyg->yy_start_stack = NULL;
2512 
2513 /* Defined in main.c */
2514 #ifdef YY_STDINIT
2515  yyin = stdin;
2516  yyout = stdout;
2517 #else
2518  yyin = (FILE *) 0;
2519  yyout = (FILE *) 0;
2520 #endif
2521 
2522  /* For future reference: Set errno on error, since we are called by
2523  * ematch_lex_init()
2524  */
2525  return 0;
2526 }
2527 
2528 /* ematch_lex_destroy is for both reentrant and non-reentrant scanners. */
2529 int ematch_lex_destroy (yyscan_t yyscanner)
2530 {
2531  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2532 
2533  /* Pop the buffer stack, destroying each element. */
2534  while(YY_CURRENT_BUFFER){
2535  ematch__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2536  YY_CURRENT_BUFFER_LVALUE = NULL;
2537  ematch_pop_buffer_state(yyscanner);
2538  }
2539 
2540  /* Destroy the stack itself. */
2541  ematch_free(yyg->yy_buffer_stack ,yyscanner);
2542  yyg->yy_buffer_stack = NULL;
2543 
2544  /* Destroy the start condition stack. */
2545  ematch_free(yyg->yy_start_stack ,yyscanner );
2546  yyg->yy_start_stack = NULL;
2547 
2548  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2549  * ematch_lex() is called, initialization will occur. */
2550  yy_init_globals( yyscanner);
2551 
2552  /* Destroy the main struct (reentrant only). */
2553  ematch_free ( yyscanner , yyscanner );
2554  yyscanner = NULL;
2555  return 0;
2556 }
2557 
2558 /*
2559  * Internal utility routines.
2560  */
2561 
2562 #ifndef yytext_ptr
2563 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2564 {
2565  register int i;
2566  for ( i = 0; i < n; ++i )
2567  s1[i] = s2[i];
2568 }
2569 #endif
2570 
2571 #ifdef YY_NEED_STRLEN
2572 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2573 {
2574  register int n;
2575  for ( n = 0; s[n]; ++n )
2576  ;
2577 
2578  return n;
2579 }
2580 #endif
2581 
2582 void *ematch_alloc (yy_size_t size , yyscan_t yyscanner)
2583 {
2584  return (void *) malloc( size );
2585 }
2586 
2587 void *ematch_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2588 {
2589  /* The cast to (char *) in the following accommodates both
2590  * implementations that use char* generic pointers, and those
2591  * that use void* generic pointers. It works with the latter
2592  * because both ANSI C and C++ allow castless assignment from
2593  * any pointer type to void*, and deal with argument conversions
2594  * as though doing an assignment.
2595  */
2596  return (void *) realloc( (char *) ptr, size );
2597 }
2598 
2599 void ematch_free (void * ptr , yyscan_t yyscanner)
2600 {
2601  free( (char *) ptr ); /* see ematch_realloc() for (char *) cast */
2602 }
2603 
2604 #define YYTABLES_NAME "yytables"
2605 
2606 #line 163 "route/cls/ematch_grammar.l"