modules/rpsl/filter.lex.c

/* [<][>]
[^][v][top][bottom][index][help] */

FUNCTIONS

This source file includes following functions.
  1. YY_PROTO
  2. YY_PROTO
  3. YY_SC_TO_UI
  4. YY_STATE_EOF
  5. yyless
  6. unput
  7. yy_set_interactive
  8. yy_set_bol
  9. YY_AT_BOL
  10. yymore
  11. YY_INPUT
  12. YY_INPUT
  13. yyterminate
  14. YY_FATAL_ERROR
  15. yy_get_next_buffer
  16. yy_get_previous_state
  17. yy_try_NUL_trans
  18. yyunput
  19. yyinput
  20. yyrestart
  21. yy_switch_to_buffer
  22. yy_load_buffer_state
  23. yy_create_buffer
  24. yy_delete_buffer
  25. yy_init_buffer
  26. yy_flush_buffer
  27. yy_scan_buffer
  28. yy_scan_string
  29. yy_scan_bytes
  30. yy_push_state
  31. yy_pop_state
  32. yy_top_state
  33. yy_fatal_error
  34. yyless
  35. yy_flex_strncpy
  36. yy_flex_strlen
  37. yy_flex_alloc
  38. yy_flex_realloc
  39. yy_flex_free
  40. main
  41. filter_reset

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

/* [<][>][^][v][top][bottom][index][help] */