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