development-curl is a virtual target
[AROS-Contrib.git] / regina / contrib / flex.skl
blob6328f4e787fb3a54b8f15fa8b5ecd4e97ca6009b
1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
4  * Removed.
5  */
7 #define FLEX_SCANNER
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
12 #include <stdio.h>
14 #line 15 "flex.skl"
17 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
18 #ifdef c_plusplus
19 #ifndef __cplusplus
20 #define __cplusplus
21 #endif
22 #endif
25 #ifdef __cplusplus
27 #include <stdlib.h>
29 #line 30 "flex.skl"
30 class istream;
32 #line 33 "flex.skl"
33 #include <unistd.h>
35 /* Use prototypes in function declarations. */
36 #define YY_USE_PROTOS
38 /* The "const" storage-class-modifier is valid. */
39 #define YY_USE_CONST
41 #else   /* ! __cplusplus */
43 #if __STDC__
45 #define YY_USE_PROTOS
46 #define YY_USE_CONST
48 #endif  /* __STDC__ */
49 #endif  /* ! __cplusplus */
51 #ifdef __TURBOC__
52  #pragma warn -rch
53  #pragma warn -use
54 #include <io.h>
55 #include <stdlib.h>
56 #define YY_USE_CONST
57 #define YY_USE_PROTOS
58 #endif
60 #ifdef YY_USE_CONST
61 #define yyconst const
62 #else
63 #define yyconst
64 #endif
67 #ifdef YY_USE_PROTOS
68 #define YY_PROTO(proto) proto
69 #else
70 #define YY_PROTO(proto) ()
71 #endif
73 /* Returned upon end-of-file. */
74 #define YY_NULL 0
76 /* Promotes a possibly negative, possibly signed char to an unsigned
77  * integer for use as an array index.  If the signed char is negative,
78  * we want to instead treat it as an 8-bit unsigned char, hence the
79  * double cast.
80  */
81 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
83 /* Enter a start condition.  This macro really ought to take a parameter,
84  * but we do it the disgusting crufty way forced on us by the ()-less
85  * definition of BEGIN.
86  */
87 #define BEGIN yy_start = 1 + 2 *
89 /* Translate the current start state into a value that can be later handed
90  * to BEGIN to return to the state.  The YYSTATE alias is for lex
91  * compatibility.
92  */
93 #define YY_START ((yy_start - 1) / 2)
94 #define YYSTATE YY_START
96 /* Action number for EOF rule of a given start state. */
97 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
99 /* Special action meaning "start processing a new file". */
100 #define YY_NEW_FILE yyrestart( yyin )
102 #define YY_END_OF_BUFFER_CHAR 0
104 /* Size of default input buffer. */
105 #define YY_BUF_SIZE 16384
107 typedef struct yy_buffer_state *YY_BUFFER_STATE;
109 extern int yyleng;
111 #line 112 "flex.skl"
112 extern FILE *yyin, *yyout;
114 #line 115 "flex.skl"
116 #define EOB_ACT_CONTINUE_SCAN 0
117 #define EOB_ACT_END_OF_FILE 1
118 #define EOB_ACT_LAST_MATCH 2
120 /* The funky do-while in the following #define is used to turn the definition
121  * int a single C statement (which needs a semi-colon terminator).  This
122  * avoids problems with code like:
124  *      if ( condition_holds )
125  *              yyless( 5 );
126  *      else
127  *              do_something_else();
129  * Prior to using the do-while the compiler would get upset at the
130  * "else" because it interpreted the "if" statement as being all
131  * done when it reached the ';' after the yyless() call.
132  */
134 /* Return all but the first 'n' matched characters back to the input stream. */
136 #define yyless(n) \
137         do \
138                 { \
139                 /* Undo effects of setting up yytext. */ \
140                 *yy_cp = yy_hold_char; \
141                 YY_RESTORE_YY_MORE_OFFSET \
142                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
143                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
144                 } \
145         while ( 0 )
147 #define unput(c) yyunput( c, yytext_ptr )
149 /* The following is because we cannot portably get our hands on size_t
150  * (without autoconf's help, which isn't available because we want
151  * flex-generated scanners to compile on their own).
152  */
153 typedef unsigned int yy_size_t;
156 struct yy_buffer_state
157         {
159 #line 160 "flex.skl"
160         FILE *yy_input_file;
162 #line 163 "flex.skl"
163         istream* yy_input_file;
165 #line 166 "flex.skl"
167         char *yy_ch_buf;                /* input buffer */
168         char *yy_buf_pos;               /* current position in input buffer */
170         /* Size of input buffer in bytes, not including room for EOB
171          * characters.
172          */
173         yy_size_t yy_buf_size;
175         /* Number of characters read into yy_ch_buf, not including EOB
176          * characters.
177          */
178         int yy_n_chars;
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;
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;
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;
199         /* Whether to try to fill the input buffer when we reach the
200          * end of it.
201          */
202         int yy_fill_buffer;
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         };
220 %- Standard (non-C++) definition
221 #line 222 "flex.skl"
222 static YY_BUFFER_STATE yy_current_buffer = 0;
224 #line 225 "flex.skl"
226 /* We provide macros for accessing buffer states in case in the
227  * future we want to put the buffer states in a more general
228  * "scanner state".
229  */
230 #define YY_CURRENT_BUFFER yy_current_buffer
233 %- Standard (non-C++) definition
234 #line 235 "flex.skl"
235 /* yy_hold_char holds the character lost when yytext is formed. */
236 static char yy_hold_char;
238 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
241 int yyleng;
243 /* Points to current character in buffer. */
244 static char *yy_c_buf_p = (char *) 0;
245 static int yy_init = 1;         /* whether we need to initialize */
246 static int yy_start = 0;        /* start state number */
248 /* Flag which is used to allow yywrap()'s to do buffer switches
249  * instead of setting up a fresh yyin.  A bit of a hack ...
250  */
251 static int yy_did_buffer_switch_on_eof;
253 void yyrestart YY_PROTO(( FILE *input_file ));
255 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
256 void yy_load_buffer_state YY_PROTO(( void ));
257 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
258 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
259 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
260 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
261 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
263 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
264 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
265 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
267 #line 268 "flex.skl"
269 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
270 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
271 static void yy_flex_free YY_PROTO(( void * ));
273 #define yy_new_buffer yy_create_buffer
275 #define yy_set_interactive(is_interactive) \
276         { \
277         if ( ! yy_current_buffer ) \
278                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
279         yy_current_buffer->yy_is_interactive = is_interactive; \
280         }
282 #define yy_set_bol(at_bol) \
283         { \
284         if ( ! yy_current_buffer ) \
285                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
286         yy_current_buffer->yy_at_bol = at_bol; \
287         }
289 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
291 %% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
292 #line 293 "flex.skl"
294 %- Standard (non-C++) definition
295 #line 296 "flex.skl"
296 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
297 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
298 static int yy_get_next_buffer YY_PROTO(( void ));
299 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
301 #line 302 "flex.skl"
303 /* Done after the current pattern has been matched and before the
304  * corresponding action - sets up yytext.
305  */
306 #define YY_DO_BEFORE_ACTION \
307         yytext_ptr = yy_bp; \
308 %% code to fiddle yytext and yyleng for yymore() goes here
309         yy_hold_char = *yy_cp; \
310         *yy_cp = '\0'; \
311 %% code to copy yytext_ptr to yytext[] goes here, if %array
312         yy_c_buf_p = yy_cp;
313 #line 314 "flex.skl"
314 #line 315 "flex.skl"
316 %% data tables for the DFA and the user's section 1 definitions go here
317 #line 318 "flex.skl"
319 /* Macros after this point can all be overridden by user definitions in
320  * section 1.
321  */
323 #ifndef YY_SKIP_YYWRAP
324 #ifdef __cplusplus
325 extern "C" int yywrap YY_PROTO(( void ));
326 #else
327 extern int yywrap YY_PROTO(( void ));
328 #endif
329 #endif
332 #line 333 "flex.skl"
333 #ifndef YY_NO_UNPUT
334 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
335 #endif
337 #line 338 "flex.skl"
339 #ifndef yytext_ptr
340 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
341 #endif
343 #ifdef YY_NEED_STRLEN
344 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
345 #endif
347 #ifndef YY_NO_INPUT
348 %- Standard (non-C++) definition
349 #line 350 "flex.skl"
350 #ifdef __cplusplus
351 static int yyinput YY_PROTO(( void ));
352 #else
353 static int input YY_PROTO(( void ));
354 #endif
356 #endif
357 #line 358 "flex.skl"
359 #if YY_STACK_USED
360 static int yy_start_stack_ptr = 0;
361 static int yy_start_stack_depth = 0;
362 static int *yy_start_stack = 0;
363 #ifndef YY_NO_PUSH_STATE
364 static void yy_push_state YY_PROTO(( int new_state ));
365 #endif
366 #ifndef YY_NO_POP_STATE
367 static void yy_pop_state YY_PROTO(( void ));
368 #endif
369 #ifndef YY_NO_TOP_STATE
370 static int yy_top_state YY_PROTO(( void ));
371 #endif
373 #else
374 #define YY_NO_PUSH_STATE 1
375 #define YY_NO_POP_STATE 1
376 #define YY_NO_TOP_STATE 1
377 #endif
379 #ifdef YY_MALLOC_DECL
380 YY_MALLOC_DECL
381 #else
382 #if __STDC__
383 #ifndef __cplusplus
384 #include <stdlib.h>
385 #endif
386 #else
387 /* Just try to get by without declaring the routines..  This will fail
388  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
389  * or sizeof(void*) != sizeof(int).
390  */
391 #endif
392 #endif
394 /* Amount of stuff to slurp up with each read. */
395 #ifndef YY_READ_BUF_SIZE
396 #define YY_READ_BUF_SIZE 8192
397 #endif
399 /* Copy whatever the last rule matched to the standard output. */
401 #ifndef ECHO
402 %- Standard (non-C++) definition
403 #line 404 "flex.skl"
404 /* This used to be an fputs(), but since the string might contain NUL's,
405  * we now use fwrite().
406  */
407 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
408 %+ C++ definition
409 #line 410 "flex.skl"
410 #define ECHO LexerOutput( yytext, yyleng )
412 #endif
413 #line 414 "flex.skl"
415 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
416  * is returned in "result".
417  */
418 #ifndef YY_INPUT
419 #define YY_INPUT(buf,result,max_size) \
420 %% fread()/read() definition of YY_INPUT goes here unless we're doing C++
421 #line 422 "flex.skl"
422 %+ C++ definition
423 #line 424 "flex.skl"
424         if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
425                 YY_FATAL_ERROR( "input in flex scanner failed" );
427 #endif
428 #line 429 "flex.skl"
430 /* No semi-colon after return; correct usage is to write "yyterminate();" -
431  * we don't want an extra ';' after the "return" because that will cause
432  * some compilers to complain about unreachable statements.
433  */
434 #ifndef yyterminate
435 #define yyterminate() return YY_NULL
436 #endif
438 /* Number of entries by which start-condition stack grows. */
439 #ifndef YY_START_STACK_INCR
440 #define YY_START_STACK_INCR 25
441 #endif
443 /* Report a fatal error. */
444 #ifndef YY_FATAL_ERROR
446 #line 447 "flex.skl"
447 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
449 #line 450 "flex.skl"
450 #define YY_FATAL_ERROR(msg) LexerError( msg )
452 #endif
453 #line 454 "flex.skl"
455 /* Default declaration of generated scanner - a define so the user can
456  * easily add parameters.
457  */
458 #ifndef YY_DECL
459 %- Standard (non-C++) definition
460 #line 461 "flex.skl"
461 #define YY_DECL int yylex YY_PROTO(( void ))
462 %+ C++ definition
463 #line 464 "flex.skl"
464 #define YY_DECL int yyFlexLexer::yylex()
466 #endif
467 #line 468 "flex.skl"
469 /* Code executed at the beginning of each rule, after yytext and yyleng
470  * have been set up.
471  */
472 #ifndef YY_USER_ACTION
473 #define YY_USER_ACTION
474 #endif
476 /* Code executed at the end of each rule. */
477 #ifndef YY_BREAK
478 #define YY_BREAK break;
479 #endif
481 %% YY_RULE_SETUP definition goes here
482 #line 483 "flex.skl"
484 YY_DECL
485         {
486         register yy_state_type yy_current_state;
487         register char *yy_cp, *yy_bp;
488         register int yy_act;
490 %% user's declarations go here
491 #line 492 "flex.skl"
493         if ( yy_init )
494                 {
495                 yy_init = 0;
497 #ifdef YY_USER_INIT
498                 YY_USER_INIT;
499 #endif
501                 if ( ! yy_start )
502                         yy_start = 1;   /* first start state */
504                 if ( ! yyin )
506 #line 507 "flex.skl"
507                         yyin = stdin;
509 #line 510 "flex.skl"
510                         yyin = &cin;
512 #line 513 "flex.skl"
514                 if ( ! yyout )
516 #line 517 "flex.skl"
517                         yyout = stdout;
519 #line 520 "flex.skl"
520                         yyout = &cout;
522 #line 523 "flex.skl"
524                 if ( ! yy_current_buffer )
525                         yy_current_buffer =
526                                 yy_create_buffer( yyin, YY_BUF_SIZE );
528                 yy_load_buffer_state();
529                 }
531         while ( 1 )             /* loops until end-of-file is reached */
532                 {
533 %% yymore()-related code goes here
534 #line 535 "flex.skl"
535                 yy_cp = yy_c_buf_p;
537                 /* Support of yytext. */
538                 *yy_cp = yy_hold_char;
540                 /* yy_bp points to the position in yy_ch_buf of the start of
541                  * the current run.
542                  */
543                 yy_bp = yy_cp;
545 %% code to set up and find next match goes here
546 #line 547 "flex.skl"
548 yy_find_action:
549 %% code to find the action number goes here
550 #line 551 "flex.skl"
552                 YY_DO_BEFORE_ACTION;
554 %% code for yylineno update goes here
555 #line 556 "flex.skl"
557 do_action:      /* This label is used only to access EOF actions. */
559 %% debug code goes here
560 #line 561 "flex.skl"
562                 switch ( yy_act )
563         { /* beginning of action switch */
564 %% actions go here
565 #line 566 "flex.skl"
567         case YY_END_OF_BUFFER:
568                 {
569                 /* Amount of text matched not including the EOB char. */
570                 int yy_amount_of_matched_text = (int) (yy_cp - (char *) yytext_ptr) - 1;
572                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
573                 *yy_cp = yy_hold_char;
574                 YY_RESTORE_YY_MORE_OFFSET
576                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
577                         {
578                         /* We're scanning a new file or input source.  It's
579                          * possible that this happened because the user
580                          * just pointed yyin at a new source and called
581                          * yylex().  If so, then we have to assure
582                          * consistency between yy_current_buffer and our
583                          * globals.  Here is the right place to do so, because
584                          * this is the first action (other than possibly a
585                          * back-up) that will match for the new input source.
586                          */
587                         yy_n_chars = yy_current_buffer->yy_n_chars;
588                         yy_current_buffer->yy_input_file = yyin;
589                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
590                         }
592                 /* Note that here we test for yy_c_buf_p "<=" to the position
593                  * of the first EOB in the buffer, since yy_c_buf_p will
594                  * already have been incremented past the NUL character
595                  * (since all states make transitions on EOB to the
596                  * end-of-buffer state).  Contrast this with the test
597                  * in input().
598                  */
599                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
600                         { /* This was really a NUL. */
601                         yy_state_type yy_next_state;
603                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
605                         yy_current_state = yy_get_previous_state();
607                         /* Okay, we're now positioned to make the NUL
608                          * transition.  We couldn't have
609                          * yy_get_previous_state() go ahead and do it
610                          * for us because it doesn't know how to deal
611                          * with the possibility of jamming (and we don't
612                          * want to build jamming into it because then it
613                          * will run more slowly).
614                          */
616                         yy_next_state = yy_try_NUL_trans( yy_current_state );
618                         yy_bp = yytext_ptr + YY_MORE_ADJ;
620                         if ( yy_next_state )
621                                 {
622                                 /* Consume the NUL. */
623                                 yy_cp = ++yy_c_buf_p;
624                                 yy_current_state = yy_next_state;
625                                 goto yy_match;
626                                 }
628                         else
629                                 {
630 %% code to do back-up for compressed tables and set up yy_cp goes here
631 #line 632 "flex.skl"
632                                 goto yy_find_action;
633                                 }
634                         }
636                 else switch ( yy_get_next_buffer() )
637                         {
638                         case EOB_ACT_END_OF_FILE:
639                                 {
640                                 yy_did_buffer_switch_on_eof = 0;
642                                 if ( yywrap() )
643                                         {
644                                         /* Note: because we've taken care in
645                                          * yy_get_next_buffer() to have set up
646                                          * yytext, we can now set up
647                                          * yy_c_buf_p so that if some total
648                                          * hoser (like flex itself) wants to
649                                          * call the scanner after we return the
650                                          * YY_NULL, it'll still work - another
651                                          * YY_NULL will get returned.
652                                          */
653                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
655                                         yy_act = YY_STATE_EOF(YY_START);
656                                         goto do_action;
657                                         }
659                                 else
660                                         {
661                                         if ( ! yy_did_buffer_switch_on_eof )
662                                                 YY_NEW_FILE;
663                                         }
664                                 break;
665                                 }
667                         case EOB_ACT_CONTINUE_SCAN:
668                                 yy_c_buf_p =
669                                         yytext_ptr + yy_amount_of_matched_text;
671                                 yy_current_state = yy_get_previous_state();
673                                 yy_cp = yy_c_buf_p;
674                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
675                                 goto yy_match;
677                         case EOB_ACT_LAST_MATCH:
678                                 yy_c_buf_p =
679                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
681                                 yy_current_state = yy_get_previous_state();
683                                 yy_cp = yy_c_buf_p;
684                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
685                                 goto yy_find_action;
686                         }
687                 break;
688                 }
690         default:
691                 YY_FATAL_ERROR(
692                         "fatal flex scanner internal error--no action found" );
693         } /* end of action switch */
694                 } /* end of scanning one token */
695         } /* end of yylex */
698 #line 699 "flex.skl"
699 yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )
700         {
701         yyin = arg_yyin;
702         yyout = arg_yyout;
703         yy_c_buf_p = 0;
704         yy_init = 1;
705         yy_start = 0;
706         yy_flex_debug = 0;
707         yylineno = 1;   // this will only get updated if %option yylineno
709         yy_did_buffer_switch_on_eof = 0;
711         yy_looking_for_trail_begin = 0;
712         yy_more_flag = 0;
713         yy_more_len = 0;
714         yy_more_offset = yy_prev_more_offset = 0;
716         yy_start_stack_ptr = yy_start_stack_depth = 0;
717         yy_start_stack = 0;
719         yy_current_buffer = 0;
721 #ifdef YY_USES_REJECT
722         yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];
723 #else
724         yy_state_buf = 0;
725 #endif
726         }
728 yyFlexLexer::~yyFlexLexer()
729         {
730         delete yy_state_buf;
731         yy_delete_buffer( yy_current_buffer );
732         }
734 void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )
735         {
736         if ( new_in )
737                 {
738                 yy_delete_buffer( yy_current_buffer );
739                 yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
740                 }
742         if ( new_out )
743                 yyout = new_out;
744         }
746 #ifdef YY_INTERACTIVE
747 int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
748 #else
749 int yyFlexLexer::LexerInput( char* buf, int max_size )
750 #endif
751         {
752         if ( yyin->eof() || yyin->fail() )
753                 return 0;
755 #ifdef YY_INTERACTIVE
756         yyin->get( buf[0] );
758         if ( yyin->eof() )
759                 return 0;
761         if ( yyin->bad() )
762                 return -1;
764         return 1;
766 #else
767         (void) yyin->read( buf, max_size );
769         if ( yyin->bad() )
770                 return -1;
771         else
772                 return yyin->gcount();
773 #endif
774         }
776 void yyFlexLexer::LexerOutput( const char* buf, int size )
777         {
778         (void) yyout->write( buf, size );
779         }
781 #line 782 "flex.skl"
783 /* yy_get_next_buffer - try to read in a new buffer
785  * Returns a code representing an action:
786  *      EOB_ACT_LAST_MATCH -
787  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
788  *      EOB_ACT_END_OF_FILE - end of file
789  */
792 #line 793 "flex.skl"
793 static int yy_get_next_buffer()
795 #line 796 "flex.skl"
796 int yyFlexLexer::yy_get_next_buffer()
798 #line 799 "flex.skl"
799         {
800         register char *dest = yy_current_buffer->yy_ch_buf;
801         register char *source = yytext_ptr;
802         register int number_to_move, i;
803         int ret_val;
805         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
806                 YY_FATAL_ERROR(
807                 "fatal flex scanner internal error--end of buffer missed" );
809         if ( yy_current_buffer->yy_fill_buffer == 0 )
810                 { /* Don't try to fill the buffer, so this is an EOF. */
811                 if ( yy_c_buf_p - (char *) yytext_ptr - YY_MORE_ADJ == 1 )
812                         {
813                         /* We matched a single character, the EOB, so
814                          * treat this as a final EOF.
815                          */
816                         return EOB_ACT_END_OF_FILE;
817                         }
819                 else
820                         {
821                         /* We matched some text prior to the EOB, first
822                          * process it.
823                          */
824                         return EOB_ACT_LAST_MATCH;
825                         }
826                 }
828         /* Try to read more data. */
830         /* First move last chars to start of buffer. */
831         number_to_move = (int) (yy_c_buf_p - (char *) yytext_ptr) - 1;
833         for ( i = 0; i < number_to_move; ++i )
834                 *(dest++) = *(source++);
836         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
837                 /* don't do the read, it's not guaranteed to return an EOF,
838                  * just force an EOF
839                  */
840                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
842         else
843                 {
844                 int num_to_read =
845                         yy_current_buffer->yy_buf_size - number_to_move - 1;
847                 while ( num_to_read <= 0 )
848                         { /* Not enough room in the buffer - grow it. */
849 #ifdef YY_USES_REJECT
850                         YY_FATAL_ERROR(
851 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
852 #else
854                         /* just a shorter name for the current buffer */
855                         YY_BUFFER_STATE b = yy_current_buffer;
857                         int yy_c_buf_p_offset =
858                                 (int) (yy_c_buf_p - b->yy_ch_buf);
860                         if ( b->yy_is_our_buffer )
861                                 {
862                                 int new_size = b->yy_buf_size * 2;
864                                 if ( new_size <= 0 )
865                                         b->yy_buf_size += b->yy_buf_size / 8;
866                                 else
867                                         b->yy_buf_size *= 2;
869                                 b->yy_ch_buf = (char *)
870                                         /* Include room in for 2 EOB chars. */
871                                         yy_flex_realloc( (void *) b->yy_ch_buf,
872                                                          b->yy_buf_size + 2 );
873                                 }
874                         else
875                                 /* Can't grow it, we don't own it. */
876                                 b->yy_ch_buf = 0;
878                         if ( ! b->yy_ch_buf )
879                                 YY_FATAL_ERROR(
880                                 "fatal error - scanner input buffer overflow" );
882                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
884                         num_to_read = yy_current_buffer->yy_buf_size -
885                                                 number_to_move - 1;
886 #endif
887                         }
889                 if ( num_to_read > YY_READ_BUF_SIZE )
890                         num_to_read = YY_READ_BUF_SIZE;
892                 /* Read in more data. */
893                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
894                         yy_n_chars, num_to_read );
896                 yy_current_buffer->yy_n_chars = yy_n_chars;
897                 }
899         if ( yy_n_chars == 0 )
900                 {
901                 if ( number_to_move == YY_MORE_ADJ )
902                         {
903                         ret_val = EOB_ACT_END_OF_FILE;
904                         yyrestart( yyin );
905                         }
907                 else
908                         {
909                         ret_val = EOB_ACT_LAST_MATCH;
910                         yy_current_buffer->yy_buffer_status =
911                                 YY_BUFFER_EOF_PENDING;
912                         }
913                 }
915         else
916                 ret_val = EOB_ACT_CONTINUE_SCAN;
918         yy_n_chars += number_to_move;
919         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
920         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
922         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
924         return ret_val;
925         }
928 /* yy_get_previous_state - get the state just before the EOB char was reached */
931 #line 932 "flex.skl"
932 static yy_state_type yy_get_previous_state()
934 #line 935 "flex.skl"
935 yy_state_type yyFlexLexer::yy_get_previous_state()
937 #line 938 "flex.skl"
938         {
939         register yy_state_type yy_current_state;
940         register char *yy_cp;
942 %% code to get the start state into yy_current_state goes here
943 #line 944 "flex.skl"
945         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
946                 {
947 %% code to find the next state goes here
948 #line 949 "flex.skl"
949                 }
951         return yy_current_state;
952         }
955 /* yy_try_NUL_trans - try to make a transition on the NUL character
957  * synopsis
958  *      next_state = yy_try_NUL_trans( current_state );
959  */
962 #line 963 "flex.skl"
963 #ifdef YY_USE_PROTOS
964 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
965 #else
966 static yy_state_type yy_try_NUL_trans( yy_current_state )
967 yy_state_type yy_current_state;
968 #endif
970 #line 971 "flex.skl"
971 yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
973 #line 974 "flex.skl"
974         {
975         register int yy_is_jam;
976 %% code to find the next state, and perhaps do backing up, goes here
977 #line 978 "flex.skl"
979         return yy_is_jam ? 0 : yy_current_state;
980         }
984 #line 985 "flex.skl"
985 #ifndef YY_NO_UNPUT
986 #ifdef YY_USE_PROTOS
987 static void yyunput( int c, register char *yy_bp )
988 #else
989 static void yyunput( c, yy_bp )
990 int c;
991 register char *yy_bp;
992 #endif
994 #line 995 "flex.skl"
995 void yyFlexLexer::yyunput( int c, register char* yy_bp )
997 #line 998 "flex.skl"
998         {
999         register char *yy_cp = yy_c_buf_p;
1001         /* undo effects of setting up yytext */
1002         *yy_cp = yy_hold_char;
1004         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1005                 { /* need to shift things up to make room */
1006                 /* +2 for EOB chars. */
1007                 register int number_to_move = yy_n_chars + 2;
1008                 register char *dest = &yy_current_buffer->yy_ch_buf[
1009                                         yy_current_buffer->yy_buf_size + 2];
1010                 register char *source =
1011                                 &yy_current_buffer->yy_ch_buf[number_to_move];
1013                 while ( source > yy_current_buffer->yy_ch_buf )
1014                         *--dest = *--source;
1016                 yy_cp += (int) (dest - source);
1017                 yy_bp += (int) (dest - source);
1018                 yy_current_buffer->yy_n_chars =
1019                         yy_n_chars = yy_current_buffer->yy_buf_size;
1021                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1022                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1023                 }
1025         *--yy_cp = (char) c;
1027 %% update yylineno here
1028 #line 1029 "flex.skl"
1030         yytext_ptr = yy_bp;
1031         yy_hold_char = *yy_cp;
1032         yy_c_buf_p = yy_cp;
1033         }
1035 #line 1036 "flex.skl"
1036 #endif  /* ifndef YY_NO_UNPUT */
1038 #line 1039 "flex.skl"
1042 #line 1043 "flex.skl"
1043 #ifdef __cplusplus
1044 static int yyinput()
1045 #else
1046 static int input()
1047 #endif
1049 #line 1050 "flex.skl"
1050 int yyFlexLexer::yyinput()
1052 #line 1053 "flex.skl"
1053         {
1054         int c;
1056         *yy_c_buf_p = yy_hold_char;
1058         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1059                 {
1060                 /* yy_c_buf_p now points to the character we want to return.
1061                  * If this occurs *before* the EOB characters, then it's a
1062                  * valid NUL; if not, then we've hit the end of the buffer.
1063                  */
1064                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1065                         /* This was really a NUL. */
1066                         *yy_c_buf_p = '\0';
1068                 else
1069                         { /* need more input */
1070                         int offset = yy_c_buf_p - (char *) yytext_ptr;
1071                         ++yy_c_buf_p;
1073                         switch ( yy_get_next_buffer() )
1074                                 {
1075                                 case EOB_ACT_LAST_MATCH:
1076                                         /* This happens because yy_g_n_b()
1077                                          * sees that we've accumulated a
1078                                          * token and flags that we need to
1079                                          * try matching the token before
1080                                          * proceeding.  But for input(),
1081                                          * there's no matching to consider.
1082                                          * So convert the EOB_ACT_LAST_MATCH
1083                                          * to EOB_ACT_END_OF_FILE.
1084                                          */
1086                                         /* Reset buffer status. */
1087                                         yyrestart( yyin );
1089                                         /* fall through */
1091                                 case EOB_ACT_END_OF_FILE:
1092                                         {
1093                                         if ( yywrap() )
1094                                                 return EOF;
1096                                         if ( ! yy_did_buffer_switch_on_eof )
1097                                                 YY_NEW_FILE;
1098 #ifdef __cplusplus
1099                                         return yyinput();
1100 #else
1101                                         return input();
1102 #endif
1103                                         }
1105                                 case EOB_ACT_CONTINUE_SCAN:
1106                                         yy_c_buf_p = yytext_ptr + offset;
1107                                         break;
1108                                 }
1109                         }
1110                 }
1112         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1113         *yy_c_buf_p = '\0';     /* preserve yytext */
1114         yy_hold_char = *++yy_c_buf_p;
1116 %% update BOL and yylineno
1117 #line 1118 "flex.skl"
1119         return c;
1120         }
1124 #line 1125 "flex.skl"
1125 #ifdef YY_USE_PROTOS
1126 void yyrestart( FILE *input_file )
1127 #else
1128 void yyrestart( input_file )
1129 FILE *input_file;
1130 #endif
1132 #line 1133 "flex.skl"
1133 void yyFlexLexer::yyrestart( istream* input_file )
1135 #line 1136 "flex.skl"
1136         {
1137         if ( ! yy_current_buffer )
1138                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1140         yy_init_buffer( yy_current_buffer, input_file );
1141         yy_load_buffer_state();
1142         }
1146 #line 1147 "flex.skl"
1147 #ifdef YY_USE_PROTOS
1148 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1149 #else
1150 void yy_switch_to_buffer( new_buffer )
1151 YY_BUFFER_STATE new_buffer;
1152 #endif
1154 #line 1155 "flex.skl"
1155 void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1157 #line 1158 "flex.skl"
1158         {
1159         if ( yy_current_buffer == new_buffer )
1160                 return;
1162         if ( yy_current_buffer )
1163                 {
1164                 /* Flush out information for old buffer. */
1165                 *yy_c_buf_p = yy_hold_char;
1166                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1167                 yy_current_buffer->yy_n_chars = yy_n_chars;
1168                 }
1170         yy_current_buffer = new_buffer;
1171         yy_load_buffer_state();
1173         /* We don't actually know whether we did this switch during
1174          * EOF (yywrap()) processing, but the only time this flag
1175          * is looked at is after yywrap() is called, so it's safe
1176          * to go ahead and always set it.
1177          */
1178         yy_did_buffer_switch_on_eof = 1;
1179         }
1183 #line 1184 "flex.skl"
1184 #ifdef YY_USE_PROTOS
1185 void yy_load_buffer_state( void )
1186 #else
1187 void yy_load_buffer_state()
1188 #endif
1190 #line 1191 "flex.skl"
1191 void yyFlexLexer::yy_load_buffer_state()
1193 #line 1194 "flex.skl"
1194         {
1195         yy_n_chars = yy_current_buffer->yy_n_chars;
1196         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1197         yyin = yy_current_buffer->yy_input_file;
1198         yy_hold_char = *yy_c_buf_p;
1199         }
1203 #line 1204 "flex.skl"
1204 #ifdef YY_USE_PROTOS
1205 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1206 #else
1207 YY_BUFFER_STATE yy_create_buffer( file, size )
1208 FILE *file;
1209 int size;
1210 #endif
1212 #line 1213 "flex.skl"
1213 YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )
1215 #line 1216 "flex.skl"
1216         {
1217         YY_BUFFER_STATE b;
1219         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1220         if ( ! b )
1221                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1223         b->yy_buf_size = size;
1225         /* yy_ch_buf has to be 2 characters longer than the size given because
1226          * we need to put in 2 end-of-buffer characters.
1227          */
1228         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1229         if ( ! b->yy_ch_buf )
1230                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1232         b->yy_is_our_buffer = 1;
1234         yy_init_buffer( b, file );
1236         return b;
1237         }
1241 #line 1242 "flex.skl"
1242 #ifdef YY_USE_PROTOS
1243 void yy_delete_buffer( YY_BUFFER_STATE b )
1244 #else
1245 void yy_delete_buffer( b )
1246 YY_BUFFER_STATE b;
1247 #endif
1249 #line 1250 "flex.skl"
1250 void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
1252 #line 1253 "flex.skl"
1253         {
1254         if ( ! b )
1255                 return;
1257         if ( b == yy_current_buffer )
1258                 yy_current_buffer = (YY_BUFFER_STATE) 0;
1260         if ( b->yy_is_our_buffer )
1261                 yy_flex_free( (void *) b->yy_ch_buf );
1263         yy_flex_free( (void *) b );
1264         }
1268 #line 1269 "flex.skl"
1269 #ifndef YY_ALWAYS_INTERACTIVE
1270 #ifndef YY_NEVER_INTERACTIVE
1271 extern int isatty YY_PROTO(( int ));
1272 #endif
1273 #endif
1275 #ifdef YY_USE_PROTOS
1276 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1277 #else
1278 void yy_init_buffer( b, file )
1279 YY_BUFFER_STATE b;
1280 FILE *file;
1281 #endif
1284 #line 1285 "flex.skl"
1285 extern "C" int isatty YY_PROTO(( int ));
1286 void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
1288 #line 1289 "flex.skl"
1290         {
1291 #line 1292 "flex.skl"
1292         yy_flush_buffer( b );
1294         b->yy_input_file = file;
1295         b->yy_fill_buffer = 1;
1298 #line 1299 "flex.skl"
1299 #if YY_ALWAYS_INTERACTIVE
1300         b->yy_is_interactive = 1;
1301 #else
1302 #if YY_NEVER_INTERACTIVE
1303         b->yy_is_interactive = 0;
1304 #else
1305         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1306 #endif
1307 #endif
1309 #line 1310 "flex.skl"
1310         b->yy_is_interactive = 0;
1312 #line 1313 "flex.skl"
1313         }
1317 #line 1318 "flex.skl"
1318 #ifdef YY_USE_PROTOS
1319 void yy_flush_buffer( YY_BUFFER_STATE b )
1320 #else
1321 void yy_flush_buffer( b )
1322 YY_BUFFER_STATE b;
1323 #endif
1326 #line 1327 "flex.skl"
1327 void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
1329 #line 1330 "flex.skl"
1330         {
1331         if ( ! b )
1332                 return;
1334         b->yy_n_chars = 0;
1336         /* We always need two end-of-buffer characters.  The first causes
1337          * a transition to the end-of-buffer state.  The second causes
1338          * a jam in that state.
1339          */
1340         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1341         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1343         b->yy_buf_pos = &b->yy_ch_buf[0];
1345         b->yy_at_bol = 1;
1346         b->yy_buffer_status = YY_BUFFER_NEW;
1348         if ( b == yy_current_buffer )
1349                 yy_load_buffer_state();
1350         }
1352 #line 1353 "flex.skl"
1355 #ifndef YY_NO_SCAN_BUFFER
1357 #line 1358 "flex.skl"
1358 #ifdef YY_USE_PROTOS
1359 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1360 #else
1361 YY_BUFFER_STATE yy_scan_buffer( base, size )
1362 char *base;
1363 yy_size_t size;
1364 #endif
1365         {
1366         YY_BUFFER_STATE b;
1368         if ( size < 2 ||
1369              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1370              base[size-1] != YY_END_OF_BUFFER_CHAR )
1371                 /* They forgot to leave room for the EOB's. */
1372                 return 0;
1374         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1375         if ( ! b )
1376                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1378         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1379         b->yy_buf_pos = b->yy_ch_buf = base;
1380         b->yy_is_our_buffer = 0;
1381         b->yy_input_file = 0;
1382         b->yy_n_chars = b->yy_buf_size;
1383         b->yy_is_interactive = 0;
1384         b->yy_at_bol = 1;
1385         b->yy_fill_buffer = 0;
1386         b->yy_buffer_status = YY_BUFFER_NEW;
1388         yy_switch_to_buffer( b );
1390         return b;
1391         }
1393 #endif
1394 #line 1395 "flex.skl"
1397 #ifndef YY_NO_SCAN_STRING
1399 #line 1400 "flex.skl"
1400 #ifdef YY_USE_PROTOS
1401 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1402 #else
1403 YY_BUFFER_STATE yy_scan_string( yy_str )
1404 yyconst char *yy_str;
1405 #endif
1406         {
1407         int len;
1408         for ( len = 0; yy_str[len]; ++len )
1409                 ;
1411         return yy_scan_bytes( yy_str, len );
1412         }
1414 #endif
1415 #line 1416 "flex.skl"
1418 #ifndef YY_NO_SCAN_BYTES
1420 #line 1421 "flex.skl"
1421 #ifdef YY_USE_PROTOS
1422 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1423 #else
1424 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1425 yyconst char *bytes;
1426 int len;
1427 #endif
1428         {
1429         YY_BUFFER_STATE b;
1430         char *buf;
1431         yy_size_t n;
1432         int i;
1434         /* Get memory for full buffer, including space for trailing EOB's. */
1435         n = len + 2;
1436         buf = (char *) yy_flex_alloc( n );
1437         if ( ! buf )
1438                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1440         for ( i = 0; i < len; ++i )
1441                 buf[i] = bytes[i];
1443         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1445         b = yy_scan_buffer( buf, n );
1446         if ( ! b )
1447                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1449         /* It's okay to grow etc. this buffer, and we should throw it
1450          * away when we're done.
1451          */
1452         b->yy_is_our_buffer = 1;
1454         return b;
1455         }
1457 #endif
1458 #line 1459 "flex.skl"
1461 #ifndef YY_NO_PUSH_STATE
1463 #line 1464 "flex.skl"
1464 #ifdef YY_USE_PROTOS
1465 static void yy_push_state( int new_state )
1466 #else
1467 static void yy_push_state( new_state )
1468 int new_state;
1469 #endif
1471 #line 1472 "flex.skl"
1472 void yyFlexLexer::yy_push_state( int new_state )
1474 #line 1475 "flex.skl"
1475         {
1476         if ( yy_start_stack_ptr >= yy_start_stack_depth )
1477                 {
1478                 yy_size_t new_size;
1480                 yy_start_stack_depth += YY_START_STACK_INCR;
1481                 new_size = yy_start_stack_depth * sizeof( int );
1483                 if ( ! yy_start_stack )
1484                         yy_start_stack = (int *) yy_flex_alloc( new_size );
1486                 else
1487                         yy_start_stack = (int *) yy_flex_realloc(
1488                                         (void *) yy_start_stack, new_size );
1490                 if ( ! yy_start_stack )
1491                         YY_FATAL_ERROR(
1492                         "out of memory expanding start-condition stack" );
1493                 }
1495         yy_start_stack[yy_start_stack_ptr++] = YY_START;
1497         BEGIN(new_state);
1498         }
1499 #endif
1502 #ifndef YY_NO_POP_STATE
1504 #line 1505 "flex.skl"
1505 static void yy_pop_state()
1507 #line 1508 "flex.skl"
1508 void yyFlexLexer::yy_pop_state()
1510 #line 1511 "flex.skl"
1511         {
1512         if ( --yy_start_stack_ptr < 0 )
1513                 YY_FATAL_ERROR( "start-condition stack underflow" );
1515         BEGIN(yy_start_stack[yy_start_stack_ptr]);
1516         }
1517 #endif
1520 #ifndef YY_NO_TOP_STATE
1522 #line 1523 "flex.skl"
1523 static int yy_top_state()
1525 #line 1526 "flex.skl"
1526 int yyFlexLexer::yy_top_state()
1528 #line 1529 "flex.skl"
1529         {
1530         return yy_start_stack[yy_start_stack_ptr - 1];
1531         }
1532 #endif
1534 #ifndef YY_EXIT_FAILURE
1535 #define YY_EXIT_FAILURE 2
1536 #endif
1539 #line 1540 "flex.skl"
1540 #ifdef YY_USE_PROTOS
1541 static void yy_fatal_error( yyconst char msg[] )
1542 #else
1543 static void yy_fatal_error( msg )
1544 char msg[];
1545 #endif
1546         {
1547         (void) fprintf( stderr, "%s\n", msg );
1548         exit( YY_EXIT_FAILURE );
1549         }
1552 #line 1553 "flex.skl"
1554 void yyFlexLexer::LexerError( yyconst char msg[] )
1555         {
1556         cerr << msg << '\n';
1557         exit( YY_EXIT_FAILURE );
1558         }
1560 #line 1561 "flex.skl"
1563 /* Redefine yyless() so it works in section 3 code. */
1565 #undef yyless
1566 #define yyless(n) \
1567         do \
1568                 { \
1569                 /* Undo effects of setting up yytext. */ \
1570                 yytext[yyleng] = yy_hold_char; \
1571                 yy_c_buf_p = yytext + n; \
1572                 yy_hold_char = *yy_c_buf_p; \
1573                 *yy_c_buf_p = '\0'; \
1574                 yyleng = n; \
1575                 } \
1576         while ( 0 )
1579 /* Internal utility routines. */
1581 #ifndef yytext_ptr
1582 #ifdef YY_USE_PROTOS
1583 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1584 #else
1585 static void yy_flex_strncpy( s1, s2, n )
1586 char *s1;
1587 yyconst char *s2;
1588 int n;
1589 #endif
1590         {
1591         register int i;
1592         for ( i = 0; i < n; ++i )
1593                 s1[i] = s2[i];
1594         }
1595 #endif
1597 #ifdef YY_NEED_STRLEN
1598 #ifdef YY_USE_PROTOS
1599 static int yy_flex_strlen( yyconst char *s )
1600 #else
1601 static int yy_flex_strlen( s )
1602 yyconst char *s;
1603 #endif
1604         {
1605         register int n;
1606         for ( n = 0; s[n]; ++n )
1607                 ;
1609         return n;
1610         }
1611 #endif
1614 #ifdef YY_USE_PROTOS
1615 static void *yy_flex_alloc( yy_size_t size )
1616 #else
1617 static void *yy_flex_alloc( size )
1618 yy_size_t size;
1619 #endif
1620         {
1621         return (void *) malloc( size );
1622         }
1624 #ifdef YY_USE_PROTOS
1625 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1626 #else
1627 static void *yy_flex_realloc( ptr, size )
1628 void *ptr;
1629 yy_size_t size;
1630 #endif
1631         {
1632         /* The cast to (char *) in the following accommodates both
1633          * implementations that use char* generic pointers, and those
1634          * that use void* generic pointers.  It works with the latter
1635          * because both ANSI C and C++ allow castless assignment from
1636          * any pointer type to void*, and deal with argument conversions
1637          * as though doing an assignment.
1638          */
1639         return (void *) realloc( (char *) ptr, size );
1640         }
1642 #ifdef YY_USE_PROTOS
1643 static void yy_flex_free( void *ptr )
1644 #else
1645 static void yy_flex_free( ptr )
1646 void *ptr;
1647 #endif
1648         {
1649         free( ptr );
1650         }
1652 #if YY_MAIN
1653 int main()
1654         {
1655         yylex();
1656         return 0;
1657         }
1658 #endif