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