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