Debian Codegraph @

examples/test.c

raw
1 #line 2 "test.c"
2 /* A lexical scanner generated by flex */
3
4 /* Scanner skeleton version:
5 * $Header: /cvsroot/flexml/flexml/examples/test.c,v 1.1 2001/08/30 00:36:10 shack Exp $
6 */
7
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11
12 #include <stdio.h>
13
14
15 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
16 #ifdef c_plusplus
17 #ifndef __cplusplus
18 #define __cplusplus
19 #endif
20 #endif
21
22
23 #ifdef __cplusplus
24
25 #include <stdlib.h>
26 #include <unistd.h>
27
28 /* Use prototypes in function declarations. */
29 #define YY_USE_PROTOS
30
31 /* The "const" storage-class-modifier is valid. */
32 #define YY_USE_CONST
33
34 #else /* ! __cplusplus */
35
36 #if __STDC__
37
38 #define YY_USE_PROTOS
39 #define YY_USE_CONST
40
41 #endif /* __STDC__ */
42 #endif /* ! __cplusplus */
43
44 #ifdef __TURBOC__
45 #pragma warn -rch
46 #pragma warn -use
47 #include <io.h>
48 #include <stdlib.h>
49 #define YY_USE_CONST
50 #define YY_USE_PROTOS
51 #endif
52
53 #ifdef YY_USE_CONST
54 #define yyconst const
55 #else
56 #define yyconst
57 #endif
58
59
60 #ifdef YY_USE_PROTOS
61 #define YY_PROTO(proto) proto
62 #else
63 #define YY_PROTO(proto) ()
64 #endif
65
66 /* Returned upon end-of-file. */
67 #define YY_NULL 0
68
69 /* Promotes a possibly negative, possibly signed char to an unsigned
70 * integer for use as an array index. If the signed char is negative,
71 * we want to instead treat it as an 8-bit unsigned char, hence the
72 * double cast.
73 */
74 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
75
76 /* Enter a start condition. This macro really ought to take a parameter,
77 * but we do it the disgusting crufty way forced on us by the ()-less
78 * definition of BEGIN.
79 */
80 #define BEGIN yy_start = 1 + 2 *
81
82 /* Translate the current start state into a value that can be later handed
83 * to BEGIN to return to the state. The YYSTATE alias is for lex
84 * compatibility.
85 */
86 #define YY_START ((yy_start - 1) / 2)
87 #define YYSTATE YY_START
88
89 /* Action number for EOF rule of a given start state. */
90 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91
92 /* Special action meaning "start processing a new file". */
93 #define YY_NEW_FILE yyrestart( yyin )
94
95 #define YY_END_OF_BUFFER_CHAR 0
96
97 /* Size of default input buffer. */
98 #define YY_BUF_SIZE 16384
99
100 typedef struct yy_buffer_state *YY_BUFFER_STATE;
101
102 extern int yyleng;
103 extern FILE *yyin, *yyout;
104
105 #define EOB_ACT_CONTINUE_SCAN 0
106 #define EOB_ACT_END_OF_FILE 1
107 #define EOB_ACT_LAST_MATCH 2
108
109 /* The funky do-while in the following #define is used to turn the definition
110 * int a single C statement (which needs a semi-colon terminator). This
111 * avoids problems with code like:
112 *
113 * if ( condition_holds )
114 * yyless( 5 );
115 * else
116 * do_something_else();
117 *
118 * Prior to using the do-while the compiler would get upset at the
119 * "else" because it interpreted the "if" statement as being all
120 * done when it reached the ';' after the yyless() call.
121 */
122
123 /* Return all but the first 'n' matched characters back to the input stream. */
124
125 #define yyless(n) \
126 do \
127 { \
128 /* Undo effects of setting up yytext. */ \
129 *yy_cp = yy_hold_char; \
130 YY_RESTORE_YY_MORE_OFFSET \
131 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
132 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
133 } \
134 while ( 0 )
135
136 #define unput(c) yyunput( c, yytext_ptr )
137
138 /* The following is because we cannot portably get our hands on size_t
139 * (without autoconf's help, which isn't available because we want
140 * flex-generated scanners to compile on their own).
141 */
142 typedef unsigned int yy_size_t;
143
144
145 struct yy_buffer_state
146 {
147 FILE *yy_input_file;
148
149 char *yy_ch_buf; /* input buffer */
150 char *yy_buf_pos; /* current position in input buffer */
151
152 /* Size of input buffer in bytes, not including room for EOB
153 * characters.
154 */
155 yy_size_t yy_buf_size;
156
157 /* Number of characters read into yy_ch_buf, not including EOB
158 * characters.
159 */
160 int yy_n_chars;
161
162 /* Whether we "own" the buffer - i.e., we know we created it,
163 * and can realloc() it to grow it, and should free() it to
164 * delete it.
165 */
166 int yy_is_our_buffer;
167
168 /* Whether this is an "interactive" input source; if so, and
169 * if we're using stdio for input, then we want to use getc()
170 * instead of fread(), to make sure we stop fetching input after
171 * each newline.
172 */
173 int yy_is_interactive;
174
175 /* Whether we're considered to be at the beginning of a line.
176 * If so, '^' rules will be active on the next match, otherwise
177 * not.
178 */
179 int yy_at_bol;
180
181 /* Whether to try to fill the input buffer when we reach the
182 * end of it.
183 */
184 int yy_fill_buffer;
185
186 int yy_buffer_status;
187 #define YY_BUFFER_NEW 0
188 #define YY_BUFFER_NORMAL 1
189 /* When an EOF's been seen but there's still some text to process
190 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
191 * shouldn't try reading from the input source any more. We might
192 * still have a bunch of tokens to match, though, because of
193 * possible backing-up.
194 *
195 * When we actually see the EOF, we change the status to "new"
196 * (via yyrestart()), so that the user can continue scanning by
197 * just pointing yyin at a new input file.
198 */
199 #define YY_BUFFER_EOF_PENDING 2
200 };
201
202 static YY_BUFFER_STATE yy_current_buffer = 0;
203
204 /* We provide macros for accessing buffer states in case in the
205 * future we want to put the buffer states in a more general
206 * "scanner state".
207 */
208 #define YY_CURRENT_BUFFER yy_current_buffer
209
210
211 /* yy_hold_char holds the character lost when yytext is formed. */
212 static char yy_hold_char;
213
214 static int yy_n_chars; /* number of characters read into yy_ch_buf */
215
216
217 int yyleng;
218
219 /* Points to current character in buffer. */
220 static char *yy_c_buf_p = (char *) 0;
221 static int yy_init = 1; /* whether we need to initialize */
222 static int yy_start = 0; /* start state number */
223
224 /* Flag which is used to allow yywrap()'s to do buffer switches
225 * instead of setting up a fresh yyin. A bit of a hack ...
226 */
227 static int yy_did_buffer_switch_on_eof;
228
229 void yyrestart YY_PROTO(( FILE *input_file ));
230
231 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
232 void yy_load_buffer_state YY_PROTO(( void ));
233 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
234 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
235 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
236 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
237 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238
239 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
240 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
241 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
242
243 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
244 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
245 static void yy_flex_free YY_PROTO(( void * ));
246
247 #define yy_new_buffer yy_create_buffer
248
249 #define yy_set_interactive(is_interactive) \
250 { \
251 if ( ! yy_current_buffer ) \
252 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
253 yy_current_buffer->yy_is_interactive = is_interactive; \
254 }
255
256 #define yy_set_bol(at_bol) \
257 { \
258 if ( ! yy_current_buffer ) \
259 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
260 yy_current_buffer->yy_at_bol = at_bol; \
261 }
262
263 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
264
265 typedef unsigned char YY_CHAR;
266 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
267 typedef int yy_state_type;
268 extern char *yytext;
269 #define yytext_ptr yytext
270
271 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
272 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
273 static int yy_get_next_buffer YY_PROTO(( void ));
274 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
275
276 /* Done after the current pattern has been matched and before the
277 * corresponding action - sets up yytext.
278 */
279 #define YY_DO_BEFORE_ACTION \
280 yytext_ptr = yy_bp; \
281 yyleng = (int) (yy_cp - yy_bp); \
282 yy_hold_char = *yy_cp; \
283 *yy_cp = '\0'; \
284 yy_c_buf_p = yy_cp;
285
286 #define YY_NUM_RULES 2
287 #define YY_END_OF_BUFFER 3
288 static yyconst short int yy_accept[9] =
289 { 0,
290 0, 0, 3, 2, 2, 0, 1, 0
291 } ;
292
293 static yyconst int yy_ec[256] =
294 { 0,
295 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
296 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
297 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
298 1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
299 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
300 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
301 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
302 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
303 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
304 1, 1, 1, 1, 1, 1, 3, 1, 1, 1,
305
306 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
307 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
308 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
309 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
310 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
311 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
312 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
313 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
314 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
316
317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
321 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
322 1, 1, 1, 1, 1
323 } ;
324
325 static yyconst int yy_meta[4] =
326 { 0,
327 1, 2, 3
328 } ;
329
330 static yyconst short int yy_base[12] =
331 { 0,
332 6, 5, 6, 9, 0, 0, 9, 9, 0, 2,
333 2
334 } ;
335
336 static yyconst short int yy_def[12] =
337 { 0,
338 9, 9, 8, 8, 10, 11, 8, 0, 8, 8,
339 8
340 } ;
341
342 static yyconst short int yy_nxt[13] =
343 { 0,
344 4, 4, 4, 7, 6, 8, 5, 5, 3, 8,
345 8, 8
346 } ;
347
348 static yyconst short int yy_chk[13] =
349 { 0,
350 9, 9, 9, 11, 10, 3, 2, 1, 8, 8,
351 8, 8
352 } ;
353
354 static yy_state_type yy_last_accepting_state;
355 static char *yy_last_accepting_cpos;
356
357 /* The intent behind this definition is that it'll catch
358 * any uses of REJECT which flex missed.
359 */
360 #define REJECT reject_used_but_not_detected
361 #define yymore() yymore_used_but_not_detected
362 #define YY_MORE_ADJ 0
363 #define YY_RESTORE_YY_MORE_OFFSET
364 char *yytext;
365 #line 1 "test.l"
366 #define INITIAL 0
367 #line 368 "test.c"
368
369 /* Macros after this point can all be overridden by user definitions in
370 * section 1.
371 */
372
373 #ifndef YY_SKIP_YYWRAP
374 #ifdef __cplusplus
375 extern "C" int yywrap YY_PROTO(( void ));
376 #else
377 extern int yywrap YY_PROTO(( void ));
378 #endif
379 #endif
380
381 #ifndef YY_NO_UNPUT
382 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
383 #endif
384
385 #ifndef yytext_ptr
386 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
387 #endif
388
389 #ifdef YY_NEED_STRLEN
390 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
391 #endif
392
393 #ifndef YY_NO_INPUT
394 #ifdef __cplusplus
395 static int yyinput YY_PROTO(( void ));
396 #else
397 static int input YY_PROTO(( void ));
398 #endif
399 #endif
400
401 #if YY_STACK_USED
402 static int yy_start_stack_ptr = 0;
403 static int yy_start_stack_depth = 0;
404 static int *yy_start_stack = 0;
405 #ifndef YY_NO_PUSH_STATE
406 static void yy_push_state YY_PROTO(( int new_state ));
407 #endif
408 #ifndef YY_NO_POP_STATE
409 static void yy_pop_state YY_PROTO(( void ));
410 #endif
411 #ifndef YY_NO_TOP_STATE
412 static int yy_top_state YY_PROTO(( void ));
413 #endif
414
415 #else
416 #define YY_NO_PUSH_STATE 1
417 #define YY_NO_POP_STATE 1
418 #define YY_NO_TOP_STATE 1
419 #endif
420
421 #ifdef YY_MALLOC_DECL
422 YY_MALLOC_DECL
423 #else
424 #if __STDC__
425 #ifndef __cplusplus
426 #include <stdlib.h>
427 #endif
428 #else
429 /* Just try to get by without declaring the routines. This will fail
430 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
431 * or sizeof(void*) != sizeof(int).
432 */
433 #endif
434 #endif
435
436 /* Amount of stuff to slurp up with each read. */
437 #ifndef YY_READ_BUF_SIZE
438 #define YY_READ_BUF_SIZE 8192
439 #endif
440
441 /* Copy whatever the last rule matched to the standard output. */
442
443 #ifndef ECHO
444 /* This used to be an fputs(), but since the string might contain NUL's,
445 * we now use fwrite().
446 */
447 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
448 #endif
449
450 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
451 * is returned in "result".
452 */
453 #ifndef YY_INPUT
454 #define YY_INPUT(buf,result,max_size) \
455 if ( yy_current_buffer->yy_is_interactive ) \
456 { \
457 int c = '*', n; \
458 for ( n = 0; n < max_size && \
459 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
460 buf[n] = (char) c; \
461 if ( c == '\n' ) \
462 buf[n++] = (char) c; \
463 if ( c == EOF && ferror( yyin ) ) \
464 YY_FATAL_ERROR( "input in flex scanner failed" ); \
465 result = n; \
466 } \
467 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
468 && ferror( yyin ) ) \
469 YY_FATAL_ERROR( "input in flex scanner failed" );
470 #endif
471
472 /* No semi-colon after return; correct usage is to write "yyterminate();" -
473 * we don't want an extra ';' after the "return" because that will cause
474 * some compilers to complain about unreachable statements.
475 */
476 #ifndef yyterminate
477 #define yyterminate() return YY_NULL
478 #endif
479
480 /* Number of entries by which start-condition stack grows. */
481 #ifndef YY_START_STACK_INCR
482 #define YY_START_STACK_INCR 25
483 #endif
484
485 /* Report a fatal error. */
486 #ifndef YY_FATAL_ERROR
487 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
488 #endif
489
490 /* Default declaration of generated scanner - a define so the user can
491 * easily add parameters.
492 */
493 #ifndef YY_DECL
494 #define YY_DECL int yylex YY_PROTO(( void ))
495 #endif
496
497 /* Code executed at the beginning of each rule, after yytext and yyleng
498 * have been set up.
499 */
500 #ifndef YY_USER_ACTION
501 #define YY_USER_ACTION
502 #endif
503
504 /* Code executed at the end of each rule. */
505 #ifndef YY_BREAK
506 #define YY_BREAK break;
507 #endif
508
509 #define YY_RULE_SETUP \
510 YY_USER_ACTION
511
512 YY_DECL
513 {
514 register yy_state_type yy_current_state;
515 register char *yy_cp, *yy_bp;
516 register int yy_act;
517
518 #line 1 "test.l"
519
520
521 #line 522 "test.c"
522
523 if ( yy_init )
524 {
525 yy_init = 0;
526
527 #ifdef YY_USER_INIT
528 YY_USER_INIT;
529 #endif
530
531 if ( ! yy_start )
532 yy_start = 1; /* first start state */
533
534 if ( ! yyin )
535 yyin = stdin;
536
537 if ( ! yyout )
538 yyout = stdout;
539
540 if ( ! yy_current_buffer )
541 yy_current_buffer =
542 yy_create_buffer( yyin, YY_BUF_SIZE );
543
544 yy_load_buffer_state();
545 }
546
547 while ( 1 ) /* loops until end-of-file is reached */
548 {
549 yy_cp = yy_c_buf_p;
550
551 /* Support of yytext. */
552 *yy_cp = yy_hold_char;
553
554 /* yy_bp points to the position in yy_ch_buf of the start of
555 * the current run.
556 */
557 yy_bp = yy_cp;
558
559 yy_current_state = yy_start;
560 yy_match:
561 do
562 {
563 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
564 if ( yy_accept[yy_current_state] )
565 {
566 yy_last_accepting_state = yy_current_state;
567 yy_last_accepting_cpos = yy_cp;
568 }
569 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
570 {
571 yy_current_state = (int) yy_def[yy_current_state];
572 if ( yy_current_state >= 9 )
573 yy_c = yy_meta[(unsigned int) yy_c];
574 }
575 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
576 ++yy_cp;
577 }
578 while ( yy_base[yy_current_state] != 9 );
579
580 yy_find_action:
581 yy_act = yy_accept[yy_current_state];
582 if ( yy_act == 0 )
583 { /* have to back up */
584 yy_cp = yy_last_accepting_cpos;
585 yy_current_state = yy_last_accepting_state;
586 yy_act = yy_accept[yy_current_state];
587 }
588
589 YY_DO_BEFORE_ACTION;
590
591
592 do_action: /* This label is used only to access EOF actions. */
593
594
595 switch ( yy_act )
596 { /* beginning of action switch */
597 case 0: /* must back up */
598 /* undo the effects of YY_DO_BEFORE_ACTION */
599 *yy_cp = yy_hold_char;
600 yy_cp = yy_last_accepting_cpos;
601 yy_current_state = yy_last_accepting_state;
602 goto yy_find_action;
603
604 case 1:
605 YY_RULE_SETUP
606 #line 3 "test.l"
607 printf("<<'a'>>");
608 YY_BREAK
609 case 2:
610 YY_RULE_SETUP
611 #line 5 "test.l"
612 ECHO;
613 YY_BREAK
614 #line 615 "test.c"
615 case YY_STATE_EOF(INITIAL):
616 yyterminate();
617
618 case YY_END_OF_BUFFER:
619 {
620 /* Amount of text matched not including the EOB char. */
621 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
622
623 /* Undo the effects of YY_DO_BEFORE_ACTION. */
624 *yy_cp = yy_hold_char;
625 YY_RESTORE_YY_MORE_OFFSET
626
627 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
628 {
629 /* We're scanning a new file or input source. It's
630 * possible that this happened because the user
631 * just pointed yyin at a new source and called
632 * yylex(). If so, then we have to assure
633 * consistency between yy_current_buffer and our
634 * globals. Here is the right place to do so, because
635 * this is the first action (other than possibly a
636 * back-up) that will match for the new input source.
637 */
638 yy_n_chars = yy_current_buffer->yy_n_chars;
639 yy_current_buffer->yy_input_file = yyin;
640 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
641 }
642
643 /* Note that here we test for yy_c_buf_p "<=" to the position
644 * of the first EOB in the buffer, since yy_c_buf_p will
645 * already have been incremented past the NUL character
646 * (since all states make transitions on EOB to the
647 * end-of-buffer state). Contrast this with the test
648 * in input().
649 */
650 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
651 { /* This was really a NUL. */
652 yy_state_type yy_next_state;
653
654 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
655
656 yy_current_state = yy_get_previous_state();
657
658 /* Okay, we're now positioned to make the NUL
659 * transition. We couldn't have
660 * yy_get_previous_state() go ahead and do it
661 * for us because it doesn't know how to deal
662 * with the possibility of jamming (and we don't
663 * want to build jamming into it because then it
664 * will run more slowly).
665 */
666
667 yy_next_state = yy_try_NUL_trans( yy_current_state );
668
669 yy_bp = yytext_ptr + YY_MORE_ADJ;
670
671 if ( yy_next_state )
672 {
673 /* Consume the NUL. */
674 yy_cp = ++yy_c_buf_p;
675 yy_current_state = yy_next_state;
676 goto yy_match;
677 }
678
679 else
680 {
681 yy_cp = yy_c_buf_p;
682 goto yy_find_action;
683 }
684 }
685
686 else switch ( yy_get_next_buffer() )
687 {
688 case EOB_ACT_END_OF_FILE:
689 {
690 yy_did_buffer_switch_on_eof = 0;
691
692 if ( yywrap() )
693 {
694 /* Note: because we've taken care in
695 * yy_get_next_buffer() to have set up
696 * yytext, we can now set up
697 * yy_c_buf_p so that if some total
698 * hoser (like flex itself) wants to
699 * call the scanner after we return the
700 * YY_NULL, it'll still work - another
701 * YY_NULL will get returned.
702 */
703 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
704
705 yy_act = YY_STATE_EOF(YY_START);
706 goto do_action;
707 }
708
709 else
710 {
711 if ( ! yy_did_buffer_switch_on_eof )
712 YY_NEW_FILE;
713 }
714 break;
715 }
716
717 case EOB_ACT_CONTINUE_SCAN:
718 yy_c_buf_p =
719 yytext_ptr + yy_amount_of_matched_text;
720
721 yy_current_state = yy_get_previous_state();
722
723 yy_cp = yy_c_buf_p;
724 yy_bp = yytext_ptr + YY_MORE_ADJ;
725 goto yy_match;
726
727 case EOB_ACT_LAST_MATCH:
728 yy_c_buf_p =
729 &yy_current_buffer->yy_ch_buf[yy_n_chars];
730
731 yy_current_state = yy_get_previous_state();
732
733 yy_cp = yy_c_buf_p;
734 yy_bp = yytext_ptr + YY_MORE_ADJ;
735 goto yy_find_action;
736 }
737 break;
738 }
739
740 default:
741 YY_FATAL_ERROR(
742 "fatal flex scanner internal error--no action found" );
743 } /* end of action switch */
744 } /* end of scanning one token */
745 } /* end of yylex */
746
747
748 /* yy_get_next_buffer - try to read in a new buffer
749 *
750 * Returns a code representing an action:
751 * EOB_ACT_LAST_MATCH -
752 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
753 * EOB_ACT_END_OF_FILE - end of file
754 */
755
756 static int yy_get_next_buffer()
757 {
758 register char *dest = yy_current_buffer->yy_ch_buf;
759 register char *source = yytext_ptr;
760 register int number_to_move, i;
761 int ret_val;
762
763 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
764 YY_FATAL_ERROR(
765 "fatal flex scanner internal error--end of buffer missed" );
766
767 if ( yy_current_buffer->yy_fill_buffer == 0 )
768 { /* Don't try to fill the buffer, so this is an EOF. */
769 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
770 {
771 /* We matched a single character, the EOB, so
772 * treat this as a final EOF.
773 */
774 return EOB_ACT_END_OF_FILE;
775 }
776
777 else
778 {
779 /* We matched some text prior to the EOB, first
780 * process it.
781 */
782 return EOB_ACT_LAST_MATCH;
783 }
784 }
785
786 /* Try to read more data. */
787
788 /* First move last chars to start of buffer. */
789 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
790
791 for ( i = 0; i < number_to_move; ++i )
792 *(dest++) = *(source++);
793
794 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
795 /* don't do the read, it's not guaranteed to return an EOF,
796 * just force an EOF
797 */
798 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
799
800 else
801 {
802 int num_to_read =
803 yy_current_buffer->yy_buf_size - number_to_move - 1;
804
805 while ( num_to_read <= 0 )
806 { /* Not enough room in the buffer - grow it. */
807 #ifdef YY_USES_REJECT
808 YY_FATAL_ERROR(
809 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
810 #else
811
812 /* just a shorter name for the current buffer */
813 YY_BUFFER_STATE b = yy_current_buffer;
814
815 int yy_c_buf_p_offset =
816 (int) (yy_c_buf_p - b->yy_ch_buf);
817
818 if ( b->yy_is_our_buffer )
819 {
820 int new_size = b->yy_buf_size * 2;
821
822 if ( new_size <= 0 )
823 b->yy_buf_size += b->yy_buf_size / 8;
824 else
825 b->yy_buf_size *= 2;
826
827 b->yy_ch_buf = (char *)
828 /* Include room in for 2 EOB chars. */
829 yy_flex_realloc( (void *) b->yy_ch_buf,
830 b->yy_buf_size + 2 );
831 }
832 else
833 /* Can't grow it, we don't own it. */
834 b->yy_ch_buf = 0;
835
836 if ( ! b->yy_ch_buf )
837 YY_FATAL_ERROR(
838 "fatal error - scanner input buffer overflow" );
839
840 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
841
842 num_to_read = yy_current_buffer->yy_buf_size -
843 number_to_move - 1;
844 #endif
845 }
846
847 if ( num_to_read > YY_READ_BUF_SIZE )
848 num_to_read = YY_READ_BUF_SIZE;
849
850 /* Read in more data. */
851 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
852 yy_n_chars, num_to_read );
853
854 yy_current_buffer->yy_n_chars = yy_n_chars;
855 }
856
857 if ( yy_n_chars == 0 )
858 {
859 if ( number_to_move == YY_MORE_ADJ )
860 {
861 ret_val = EOB_ACT_END_OF_FILE;
862 yyrestart( yyin );
863 }
864
865 else
866 {
867 ret_val = EOB_ACT_LAST_MATCH;
868 yy_current_buffer->yy_buffer_status =
869 YY_BUFFER_EOF_PENDING;
870 }
871 }
872
873 else
874 ret_val = EOB_ACT_CONTINUE_SCAN;
875
876 yy_n_chars += number_to_move;
877 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
878 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
879
880 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
881
882 return ret_val;
883 }
884
885
886 /* yy_get_previous_state - get the state just before the EOB char was reached */
887
888 static yy_state_type yy_get_previous_state()
889 {
890 register yy_state_type yy_current_state;
891 register char *yy_cp;
892
893 yy_current_state = yy_start;
894
895 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
896 {
897 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
898 if ( yy_accept[yy_current_state] )
899 {
900 yy_last_accepting_state = yy_current_state;
901 yy_last_accepting_cpos = yy_cp;
902 }
903 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
904 {
905 yy_current_state = (int) yy_def[yy_current_state];
906 if ( yy_current_state >= 9 )
907 yy_c = yy_meta[(unsigned int) yy_c];
908 }
909 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
910 }
911
912 return yy_current_state;
913 }
914
915
916 /* yy_try_NUL_trans - try to make a transition on the NUL character
917 *
918 * synopsis
919 * next_state = yy_try_NUL_trans( current_state );
920 */
921
922 #ifdef YY_USE_PROTOS
923 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
924 #else
925 static yy_state_type yy_try_NUL_trans( yy_current_state )
926 yy_state_type yy_current_state;
927 #endif
928 {
929 register int yy_is_jam;
930 register char *yy_cp = yy_c_buf_p;
931
932 register YY_CHAR yy_c = 1;
933 if ( yy_accept[yy_current_state] )
934 {
935 yy_last_accepting_state = yy_current_state;
936 yy_last_accepting_cpos = yy_cp;
937 }
938 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
939 {
940 yy_current_state = (int) yy_def[yy_current_state];
941 if ( yy_current_state >= 9 )
942 yy_c = yy_meta[(unsigned int) yy_c];
943 }
944 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
945 yy_is_jam = (yy_current_state == 8);
946
947 return yy_is_jam ? 0 : yy_current_state;
948 }
949
950
951 #ifndef YY_NO_UNPUT
952 #ifdef YY_USE_PROTOS
953 static void yyunput( int c, register char *yy_bp )
954 #else
955 static void yyunput( c, yy_bp )
956 int c;
957 register char *yy_bp;
958 #endif
959 {
960 register char *yy_cp = yy_c_buf_p;
961
962 /* undo effects of setting up yytext */
963 *yy_cp = yy_hold_char;
964
965 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
966 { /* need to shift things up to make room */
967 /* +2 for EOB chars. */
968 register int number_to_move = yy_n_chars + 2;
969 register char *dest = &yy_current_buffer->yy_ch_buf[
970 yy_current_buffer->yy_buf_size + 2];
971 register char *source =
972 &yy_current_buffer->yy_ch_buf[number_to_move];
973
974 while ( source > yy_current_buffer->yy_ch_buf )
975 *--dest = *--source;
976
977 yy_cp += (int) (dest - source);
978 yy_bp += (int) (dest - source);
979 yy_current_buffer->yy_n_chars =
980 yy_n_chars = yy_current_buffer->yy_buf_size;
981
982 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
983 YY_FATAL_ERROR( "flex scanner push-back overflow" );
984 }
985
986 *--yy_cp = (char) c;
987
988
989 yytext_ptr = yy_bp;
990 yy_hold_char = *yy_cp;
991 yy_c_buf_p = yy_cp;
992 }
993 #endif /* ifndef YY_NO_UNPUT */
994
995
996 #ifdef __cplusplus
997 static int yyinput()
998 #else
999 static int input()
1000 #endif
1001 {
1002 int c;
1003
1004 *yy_c_buf_p = yy_hold_char;
1005
1006 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1007 {
1008 /* yy_c_buf_p now points to the character we want to return.
1009 * If this occurs *before* the EOB characters, then it's a
1010 * valid NUL; if not, then we've hit the end of the buffer.
1011 */
1012 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1013 /* This was really a NUL. */
1014 *yy_c_buf_p = '\0';
1015
1016 else
1017 { /* need more input */
1018 int offset = yy_c_buf_p - yytext_ptr;
1019 ++yy_c_buf_p;
1020
1021 switch ( yy_get_next_buffer() )
1022 {
1023 case EOB_ACT_LAST_MATCH:
1024 /* This happens because yy_g_n_b()
1025 * sees that we've accumulated a
1026 * token and flags that we need to
1027 * try matching the token before
1028 * proceeding. But for input(),
1029 * there's no matching to consider.
1030 * So convert the EOB_ACT_LAST_MATCH
1031 * to EOB_ACT_END_OF_FILE.
1032 */
1033
1034 /* Reset buffer status. */
1035 yyrestart( yyin );
1036
1037 /* fall through */
1038
1039 case EOB_ACT_END_OF_FILE:
1040 {
1041 if ( yywrap() )
1042 return EOF;
1043
1044 if ( ! yy_did_buffer_switch_on_eof )
1045 YY_NEW_FILE;
1046 #ifdef __cplusplus
1047 return yyinput();
1048 #else
1049 return input();
1050 #endif
1051 }
1052
1053 case EOB_ACT_CONTINUE_SCAN:
1054 yy_c_buf_p = yytext_ptr + offset;
1055 break;
1056 }
1057 }
1058 }
1059
1060 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1061 *yy_c_buf_p = '\0'; /* preserve yytext */
1062 yy_hold_char = *++yy_c_buf_p;
1063
1064
1065 return c;
1066 }
1067
1068
1069 #ifdef YY_USE_PROTOS
1070 void yyrestart( FILE *input_file )
1071 #else
1072 void yyrestart( input_file )
1073 FILE *input_file;
1074 #endif
1075 {
1076 if ( ! yy_current_buffer )
1077 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1078
1079 yy_init_buffer( yy_current_buffer, input_file );
1080 yy_load_buffer_state();
1081 }
1082
1083
1084 #ifdef YY_USE_PROTOS
1085 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1086 #else
1087 void yy_switch_to_buffer( new_buffer )
1088 YY_BUFFER_STATE new_buffer;
1089 #endif
1090 {
1091 if ( yy_current_buffer == new_buffer )
1092 return;
1093
1094 if ( yy_current_buffer )
1095 {
1096 /* Flush out information for old buffer. */
1097 *yy_c_buf_p = yy_hold_char;
1098 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1099 yy_current_buffer->yy_n_chars = yy_n_chars;
1100 }
1101
1102 yy_current_buffer = new_buffer;
1103 yy_load_buffer_state();
1104
1105 /* We don't actually know whether we did this switch during
1106 * EOF (yywrap()) processing, but the only time this flag
1107 * is looked at is after yywrap() is called, so it's safe
1108 * to go ahead and always set it.
1109 */
1110 yy_did_buffer_switch_on_eof = 1;
1111 }
1112
1113
1114 #ifdef YY_USE_PROTOS
1115 void yy_load_buffer_state( void )
1116 #else
1117 void yy_load_buffer_state()
1118 #endif
1119 {
1120 yy_n_chars = yy_current_buffer->yy_n_chars;
1121 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1122 yyin = yy_current_buffer->yy_input_file;
1123 yy_hold_char = *yy_c_buf_p;
1124 }
1125
1126
1127 #ifdef YY_USE_PROTOS
1128 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1129 #else
1130 YY_BUFFER_STATE yy_create_buffer( file, size )
1131 FILE *file;
1132 int size;
1133 #endif
1134 {
1135 YY_BUFFER_STATE b;
1136
1137 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1138 if ( ! b )
1139 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1140
1141 b->yy_buf_size = size;
1142
1143 /* yy_ch_buf has to be 2 characters longer than the size given because
1144 * we need to put in 2 end-of-buffer characters.
1145 */
1146 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1147 if ( ! b->yy_ch_buf )
1148 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1149
1150 b->yy_is_our_buffer = 1;
1151
1152 yy_init_buffer( b, file );
1153
1154 return b;
1155 }
1156
1157
1158 #ifdef YY_USE_PROTOS
1159 void yy_delete_buffer( YY_BUFFER_STATE b )
1160 #else
1161 void yy_delete_buffer( b )
1162 YY_BUFFER_STATE b;
1163 #endif
1164 {
1165 if ( ! b )
1166 return;
1167
1168 if ( b == yy_current_buffer )
1169 yy_current_buffer = (YY_BUFFER_STATE) 0;
1170
1171 if ( b->yy_is_our_buffer )
1172 yy_flex_free( (void *) b->yy_ch_buf );
1173
1174 yy_flex_free( (void *) b );
1175 }
1176
1177
1178 #ifndef YY_ALWAYS_INTERACTIVE
1179 #ifndef YY_NEVER_INTERACTIVE
1180 extern int isatty YY_PROTO(( int ));
1181 #endif
1182 #endif
1183
1184 #ifdef YY_USE_PROTOS
1185 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1186 #else
1187 void yy_init_buffer( b, file )
1188 YY_BUFFER_STATE b;
1189 FILE *file;
1190 #endif
1191
1192
1193 {
1194 yy_flush_buffer( b );
1195
1196 b->yy_input_file = file;
1197 b->yy_fill_buffer = 1;
1198
1199 #if YY_ALWAYS_INTERACTIVE
1200 b->yy_is_interactive = 1;
1201 #else
1202 #if YY_NEVER_INTERACTIVE
1203 b->yy_is_interactive = 0;
1204 #else
1205 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1206 #endif
1207 #endif
1208 }
1209
1210
1211 #ifdef YY_USE_PROTOS
1212 void yy_flush_buffer( YY_BUFFER_STATE b )
1213 #else
1214 void yy_flush_buffer( b )
1215 YY_BUFFER_STATE b;
1216 #endif
1217
1218 {
1219 if ( ! b )
1220 return;
1221
1222 b->yy_n_chars = 0;
1223
1224 /* We always need two end-of-buffer characters. The first causes
1225 * a transition to the end-of-buffer state. The second causes
1226 * a jam in that state.
1227 */
1228 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1229 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1230
1231 b->yy_buf_pos = &b->yy_ch_buf[0];
1232
1233 b->yy_at_bol = 1;
1234 b->yy_buffer_status = YY_BUFFER_NEW;
1235
1236 if ( b == yy_current_buffer )
1237 yy_load_buffer_state();
1238 }
1239
1240
1241 #ifndef YY_NO_SCAN_BUFFER
1242 #ifdef YY_USE_PROTOS
1243 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1244 #else
1245 YY_BUFFER_STATE yy_scan_buffer( base, size )
1246 char *base;
1247 yy_size_t size;
1248 #endif
1249 {
1250 YY_BUFFER_STATE b;
1251
1252 if ( size < 2 ||
1253 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1254 base[size-1] != YY_END_OF_BUFFER_CHAR )
1255 /* They forgot to leave room for the EOB's. */
1256 return 0;
1257
1258 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1259 if ( ! b )
1260 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1261
1262 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1263 b->yy_buf_pos = b->yy_ch_buf = base;
1264 b->yy_is_our_buffer = 0;
1265 b->yy_input_file = 0;
1266 b->yy_n_chars = b->yy_buf_size;
1267 b->yy_is_interactive = 0;
1268 b->yy_at_bol = 1;
1269 b->yy_fill_buffer = 0;
1270 b->yy_buffer_status = YY_BUFFER_NEW;
1271
1272 yy_switch_to_buffer( b );
1273
1274 return b;
1275 }
1276 #endif
1277
1278
1279 #ifndef YY_NO_SCAN_STRING
1280 #ifdef YY_USE_PROTOS
1281 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1282 #else
1283 YY_BUFFER_STATE yy_scan_string( yy_str )
1284 yyconst char *yy_str;
1285 #endif
1286 {
1287 int len;
1288 for ( len = 0; yy_str[len]; ++len )
1289 ;
1290
1291 return yy_scan_bytes( yy_str, len );
1292 }
1293 #endif
1294
1295
1296 #ifndef YY_NO_SCAN_BYTES
1297 #ifdef YY_USE_PROTOS
1298 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1299 #else
1300 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1301 yyconst char *bytes;
1302 int len;
1303 #endif
1304 {
1305 YY_BUFFER_STATE b;
1306 char *buf;
1307 yy_size_t n;
1308 int i;
1309
1310 /* Get memory for full buffer, including space for trailing EOB's. */
1311 n = len + 2;
1312 buf = (char *) yy_flex_alloc( n );
1313 if ( ! buf )
1314 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1315
1316 for ( i = 0; i < len; ++i )
1317 buf[i] = bytes[i];
1318
1319 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1320
1321 b = yy_scan_buffer( buf, n );
1322 if ( ! b )
1323 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1324
1325 /* It's okay to grow etc. this buffer, and we should throw it
1326 * away when we're done.
1327 */
1328 b->yy_is_our_buffer = 1;
1329
1330 return b;
1331 }
1332 #endif
1333
1334
1335 #ifndef YY_NO_PUSH_STATE
1336 #ifdef YY_USE_PROTOS
1337 static void yy_push_state( int new_state )
1338 #else
1339 static void yy_push_state( new_state )
1340 int new_state;
1341 #endif
1342 {
1343 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1344 {
1345 yy_size_t new_size;
1346
1347 yy_start_stack_depth += YY_START_STACK_INCR;
1348 new_size = yy_start_stack_depth * sizeof( int );
1349
1350 if ( ! yy_start_stack )
1351 yy_start_stack = (int *) yy_flex_alloc( new_size );
1352
1353 else
1354 yy_start_stack = (int *) yy_flex_realloc(
1355 (void *) yy_start_stack, new_size );
1356
1357 if ( ! yy_start_stack )
1358 YY_FATAL_ERROR(
1359 "out of memory expanding start-condition stack" );
1360 }
1361
1362 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1363
1364 BEGIN(new_state);
1365 }
1366 #endif
1367
1368
1369 #ifndef YY_NO_POP_STATE
1370 static void yy_pop_state()
1371 {
1372 if ( --yy_start_stack_ptr < 0 )
1373 YY_FATAL_ERROR( "start-condition stack underflow" );
1374
1375 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1376 }
1377 #endif
1378
1379
1380 #ifndef YY_NO_TOP_STATE
1381 static int yy_top_state()
1382 {
1383 return yy_start_stack[yy_start_stack_ptr - 1];
1384 }
1385 #endif
1386
1387 #ifndef YY_EXIT_FAILURE
1388 #define YY_EXIT_FAILURE 2
1389 #endif
1390
1391 #ifdef YY_USE_PROTOS
1392 static void yy_fatal_error( yyconst char msg[] )
1393 #else
1394 static void yy_fatal_error( msg )
1395 char msg[];
1396 #endif
1397 {
1398 (void) fprintf( stderr, "%s\n", msg );
1399 exit( YY_EXIT_FAILURE );
1400 }
1401
1402
1403
1404 /* Redefine yyless() so it works in section 3 code. */
1405
1406 #undef yyless
1407 #define yyless(n) \
1408 do \
1409 { \
1410 /* Undo effects of setting up yytext. */ \
1411 yytext[yyleng] = yy_hold_char; \
1412 yy_c_buf_p = yytext + n; \
1413 yy_hold_char = *yy_c_buf_p; \
1414 *yy_c_buf_p = '\0'; \
1415 yyleng = n; \
1416 } \
1417 while ( 0 )
1418
1419
1420 /* Internal utility routines. */
1421
1422 #ifndef yytext_ptr
1423 #ifdef YY_USE_PROTOS
1424 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1425 #else
1426 static void yy_flex_strncpy( s1, s2, n )
1427 char *s1;
1428 yyconst char *s2;
1429 int n;
1430 #endif
1431 {
1432 register int i;
1433 for ( i = 0; i < n; ++i )
1434 s1[i] = s2[i];
1435 }
1436 #endif
1437
1438 #ifdef YY_NEED_STRLEN
1439 #ifdef YY_USE_PROTOS
1440 static int yy_flex_strlen( yyconst char *s )
1441 #else
1442 static int yy_flex_strlen( s )
1443 yyconst char *s;
1444 #endif
1445 {
1446 register int n;
1447 for ( n = 0; s[n]; ++n )
1448 ;
1449
1450 return n;
1451 }
1452 #endif
1453
1454
1455 #ifdef YY_USE_PROTOS
1456 static void *yy_flex_alloc( yy_size_t size )
1457 #else
1458 static void *yy_flex_alloc( size )
1459 yy_size_t size;
1460 #endif
1461 {
1462 return (void *) malloc( size );
1463 }
1464
1465 #ifdef YY_USE_PROTOS
1466 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1467 #else
1468 static void *yy_flex_realloc( ptr, size )
1469 void *ptr;
1470 yy_size_t size;
1471 #endif
1472 {
1473 /* The cast to (char *) in the following accommodates both
1474 * implementations that use char* generic pointers, and those
1475 * that use void* generic pointers. It works with the latter
1476 * because both ANSI C and C++ allow castless assignment from
1477 * any pointer type to void*, and deal with argument conversions
1478 * as though doing an assignment.
1479 */
1480 return (void *) realloc( (char *) ptr, size );
1481 }
1482
1483 #ifdef YY_USE_PROTOS
1484 static void yy_flex_free( void *ptr )
1485 #else
1486 static void yy_flex_free( ptr )
1487 void *ptr;
1488 #endif
1489 {
1490 free( ptr );
1491 }
1492
1493 #if YY_MAIN
1494 int main()
1495 {
1496 yylex();
1497 return 0;
1498 }
1499 #endif
1500 #line 5 "test.l"