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