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