scanner.cpp

Go to the documentation of this file.
00001 #line 2 "scanner.cpp"
00002 
00003 #line 4 "scanner.cpp"
00004 
00005 #define  YY_INT_ALIGNED short int
00006 
00007 /* A lexical scanner generated by flex */
00008 
00009 #define FLEX_SCANNER
00010 #define YY_FLEX_MAJOR_VERSION 2
00011 #define YY_FLEX_MINOR_VERSION 5
00012 #define YY_FLEX_SUBMINOR_VERSION 35
00013 #if YY_FLEX_SUBMINOR_VERSION > 0
00014 #define FLEX_BETA
00015 #endif
00016 
00017 /* First, we deal with  platform-specific or compiler-specific issues. */
00018 
00019 /* begin standard C headers. */
00020 #include <stdio.h>
00021 #include <string.h>
00022 #include <errno.h>
00023 #include <stdlib.h>
00024 
00025 /* end standard C headers. */
00026 
00027 /* flex integer type definitions */
00028 
00029 #ifndef FLEXINT_H
00030 #define FLEXINT_H
00031 
00032 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
00033 
00034 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
00035 
00036 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
00037  * if you want the limit (max/min) macros for int types. 
00038  */
00039 #ifndef __STDC_LIMIT_MACROS
00040 #define __STDC_LIMIT_MACROS 1
00041 #endif
00042 
00043 #include <inttypes.h>
00044 typedef int8_t flex_int8_t;
00045 typedef uint8_t flex_uint8_t;
00046 typedef int16_t flex_int16_t;
00047 typedef uint16_t flex_uint16_t;
00048 typedef int32_t flex_int32_t;
00049 typedef uint32_t flex_uint32_t;
00050 #else
00051 typedef signed char flex_int8_t;
00052 typedef short int flex_int16_t;
00053 typedef int flex_int32_t;
00054 typedef unsigned char flex_uint8_t; 
00055 typedef unsigned short int flex_uint16_t;
00056 typedef unsigned int flex_uint32_t;
00057 
00058 /* Limits of integral types. */
00059 #ifndef INT8_MIN
00060 #define INT8_MIN               (-128)
00061 #endif
00062 #ifndef INT16_MIN
00063 #define INT16_MIN              (-32767-1)
00064 #endif
00065 #ifndef INT32_MIN
00066 #define INT32_MIN              (-2147483647-1)
00067 #endif
00068 #ifndef INT8_MAX
00069 #define INT8_MAX               (127)
00070 #endif
00071 #ifndef INT16_MAX
00072 #define INT16_MAX              (32767)
00073 #endif
00074 #ifndef INT32_MAX
00075 #define INT32_MAX              (2147483647)
00076 #endif
00077 #ifndef UINT8_MAX
00078 #define UINT8_MAX              (255U)
00079 #endif
00080 #ifndef UINT16_MAX
00081 #define UINT16_MAX             (65535U)
00082 #endif
00083 #ifndef UINT32_MAX
00084 #define UINT32_MAX             (4294967295U)
00085 #endif
00086 
00087 #endif /* ! C99 */
00088 
00089 #endif /* ! FLEXINT_H */
00090 
00091 #ifdef __cplusplus
00092 
00093 /* The "const" storage-class-modifier is valid. */
00094 #define YY_USE_CONST
00095 
00096 #else   /* ! __cplusplus */
00097 
00098 /* C99 requires __STDC__ to be defined as 1. */
00099 #if defined (__STDC__)
00100 
00101 #define YY_USE_CONST
00102 
00103 #endif  /* defined (__STDC__) */
00104 #endif  /* ! __cplusplus */
00105 
00106 #ifdef YY_USE_CONST
00107 #define yyconst const
00108 #else
00109 #define yyconst
00110 #endif
00111 
00112 /* Returned upon end-of-file. */
00113 #define YY_NULL 0
00114 
00115 /* Promotes a possibly negative, possibly signed char to an unsigned
00116  * integer for use as an array index.  If the signed char is negative,
00117  * we want to instead treat it as an 8-bit unsigned char, hence the
00118  * double cast.
00119  */
00120 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00121 
00122 /* An opaque pointer. */
00123 #ifndef YY_TYPEDEF_YY_SCANNER_T
00124 #define YY_TYPEDEF_YY_SCANNER_T
00125 typedef void* yyscan_t;
00126 #endif
00127 
00128 /* For convenience, these vars (plus the bison vars far below)
00129    are macros in the reentrant scanner. */
00130 #define yyin yyg->yyin_r
00131 #define yyout yyg->yyout_r
00132 #define yyextra yyg->yyextra_r
00133 #define yyleng yyg->yyleng_r
00134 #define yytext yyg->yytext_r
00135 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
00136 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
00137 #define yy_flex_debug yyg->yy_flex_debug_r
00138 
00139 /* Enter a start condition.  This macro really ought to take a parameter,
00140  * but we do it the disgusting crufty way forced on us by the ()-less
00141  * definition of BEGIN.
00142  */
00143 #define BEGIN yyg->yy_start = 1 + 2 *
00144 
00145 /* Translate the current start state into a value that can be later handed
00146  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00147  * compatibility.
00148  */
00149 #define YY_START ((yyg->yy_start - 1) / 2)
00150 #define YYSTATE YY_START
00151 
00152 /* Action number for EOF rule of a given start state. */
00153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00154 
00155 /* Special action meaning "start processing a new file". */
00156 #define YY_NEW_FILE yyrestart(yyin ,yyscanner )
00157 
00158 #define YY_END_OF_BUFFER_CHAR 0
00159 
00160 /* Size of default input buffer. */
00161 #ifndef YY_BUF_SIZE
00162 #define YY_BUF_SIZE 16384
00163 #endif
00164 
00165 /* The state buf must be large enough to hold one state per character in the main buffer.
00166  */
00167 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00168 
00169 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00170 #define YY_TYPEDEF_YY_BUFFER_STATE
00171 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00172 #endif
00173 
00174 #define EOB_ACT_CONTINUE_SCAN 0
00175 #define EOB_ACT_END_OF_FILE 1
00176 #define EOB_ACT_LAST_MATCH 2
00177 
00178     #define YY_LESS_LINENO(n)
00179     
00180 /* Return all but the first "n" matched characters back to the input stream. */
00181 #define yyless(n) \
00182         do \
00183                 { \
00184                 /* Undo effects of setting up yytext. */ \
00185         int yyless_macro_arg = (n); \
00186         YY_LESS_LINENO(yyless_macro_arg);\
00187                 *yy_cp = yyg->yy_hold_char; \
00188                 YY_RESTORE_YY_MORE_OFFSET \
00189                 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00190                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00191                 } \
00192         while ( 0 )
00193 
00194 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
00195 
00196 #ifndef YY_TYPEDEF_YY_SIZE_T
00197 #define YY_TYPEDEF_YY_SIZE_T
00198 typedef size_t yy_size_t;
00199 #endif
00200 
00201 #ifndef YY_STRUCT_YY_BUFFER_STATE
00202 #define YY_STRUCT_YY_BUFFER_STATE
00203 struct yy_buffer_state
00204         {
00205         FILE *yy_input_file;
00206 
00207         char *yy_ch_buf;                /* input buffer */
00208         char *yy_buf_pos;               /* current position in input buffer */
00209 
00210         /* Size of input buffer in bytes, not including room for EOB
00211          * characters.
00212          */
00213         yy_size_t yy_buf_size;
00214 
00215         /* Number of characters read into yy_ch_buf, not including EOB
00216          * characters.
00217          */
00218         int yy_n_chars;
00219 
00220         /* Whether we "own" the buffer - i.e., we know we created it,
00221          * and can realloc() it to grow it, and should free() it to
00222          * delete it.
00223          */
00224         int yy_is_our_buffer;
00225 
00226         /* Whether this is an "interactive" input source; if so, and
00227          * if we're using stdio for input, then we want to use getc()
00228          * instead of fread(), to make sure we stop fetching input after
00229          * each newline.
00230          */
00231         int yy_is_interactive;
00232 
00233         /* Whether we're considered to be at the beginning of a line.
00234          * If so, '^' rules will be active on the next match, otherwise
00235          * not.
00236          */
00237         int yy_at_bol;
00238 
00239     int yy_bs_lineno; 
00240     int yy_bs_column; 
00242         /* Whether to try to fill the input buffer when we reach the
00243          * end of it.
00244          */
00245         int yy_fill_buffer;
00246 
00247         int yy_buffer_status;
00248 
00249 #define YY_BUFFER_NEW 0
00250 #define YY_BUFFER_NORMAL 1
00251         /* When an EOF's been seen but there's still some text to process
00252          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00253          * shouldn't try reading from the input source any more.  We might
00254          * still have a bunch of tokens to match, though, because of
00255          * possible backing-up.
00256          *
00257          * When we actually see the EOF, we change the status to "new"
00258          * (via yyrestart()), so that the user can continue scanning by
00259          * just pointing yyin at a new input file.
00260          */
00261 #define YY_BUFFER_EOF_PENDING 2
00262 
00263         };
00264 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
00265 
00266 /* We provide macros for accessing buffer states in case in the
00267  * future we want to put the buffer states in a more general
00268  * "scanner state".
00269  *
00270  * Returns the top of the stack, or NULL.
00271  */
00272 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
00273                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
00274                           : NULL)
00275 
00276 /* Same as previous macro, but useful when we know that the buffer stack is not
00277  * NULL or when we need an lvalue. For internal use only.
00278  */
00279 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
00280 
00281 void yyrestart (FILE *input_file ,yyscan_t yyscanner );
00282 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
00283 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
00284 void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
00285 void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
00286 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
00287 void yypop_buffer_state (yyscan_t yyscanner );
00288 
00289 static void yyensure_buffer_stack (yyscan_t yyscanner );
00290 static void yy_load_buffer_state (yyscan_t yyscanner );
00291 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
00292 
00293 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
00294 
00295 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
00296 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
00297 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
00298 
00299 void *yyalloc (yy_size_t ,yyscan_t yyscanner );
00300 void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
00301 void yyfree (void * ,yyscan_t yyscanner );
00302 
00303 #define yy_new_buffer yy_create_buffer
00304 
00305 #define yy_set_interactive(is_interactive) \
00306         { \
00307         if ( ! YY_CURRENT_BUFFER ){ \
00308         yyensure_buffer_stack (yyscanner); \
00309                 YY_CURRENT_BUFFER_LVALUE =    \
00310             yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
00311         } \
00312         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00313         }
00314 
00315 #define yy_set_bol(at_bol) \
00316         { \
00317         if ( ! YY_CURRENT_BUFFER ){\
00318         yyensure_buffer_stack (yyscanner); \
00319                 YY_CURRENT_BUFFER_LVALUE =    \
00320             yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
00321         } \
00322         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00323         }
00324 
00325 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00326 
00327 #define yywrap(n) 1
00328 #define YY_SKIP_YYWRAP
00329 
00330 typedef unsigned char YY_CHAR;
00331 
00332 typedef int yy_state_type;
00333 
00334 #define yytext_ptr yytext_r
00335 
00336 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
00337 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
00338 static int yy_get_next_buffer (yyscan_t yyscanner );
00339 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
00340 
00341 /* Done after the current pattern has been matched and before the
00342  * corresponding action - sets up yytext.
00343  */
00344 #define YY_DO_BEFORE_ACTION \
00345         yyg->yytext_ptr = yy_bp; \
00346         yyleng = (size_t) (yy_cp - yy_bp); \
00347         yyg->yy_hold_char = *yy_cp; \
00348         *yy_cp = '\0'; \
00349         yyg->yy_c_buf_p = yy_cp;
00350 
00351 #define YY_NUM_RULES 6
00352 #define YY_END_OF_BUFFER 7
00353 /* This struct is not used in this scanner,
00354    but its presence is necessary. */
00355 struct yy_trans_info
00356         {
00357         flex_int32_t yy_verify;
00358         flex_int32_t yy_nxt;
00359         };
00360 static yyconst flex_int16_t yy_accept[32] =
00361     {   0,
00362         0,    0,    7,    5,    1,    6,    5,    5,    5,    1,
00363         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00364         0,    0,    0,    0,    0,    4,    0,    0,    3,    2,
00365         0
00366     } ;
00367 
00368 static yyconst flex_int32_t yy_ec[256] =
00369     {   0,
00370         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00371         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00372         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00373         1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
00374         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00375         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00376         1,    1,    1,    1,    4,    1,    5,    6,    7,    1,
00377         1,    1,    8,    1,    1,    9,   10,   11,   12,   13,
00378         1,    1,   14,   15,   16,   17,    1,    1,    1,    1,
00379         1,    1,    1,    1,    1,    1,   18,    1,   19,   20,
00380 
00381        21,    1,    1,    1,   22,    1,    1,   23,   24,   25,
00382        26,   27,    1,    1,   28,   29,   30,   31,    1,    1,
00383         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00384         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00385         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00386         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00387         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00388         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00389         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00390         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00391 
00392         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00393         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00394         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00395         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00396         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00397         1,    1,    1,    1,    1
00398     } ;
00399 
00400 static yyconst flex_int32_t yy_meta[32] =
00401     {   0,
00402         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00403         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00404         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00405         1
00406     } ;
00407 
00408 static yyconst flex_int16_t yy_base[33] =
00409     {   0,
00410         0,   28,    4,   81,    4,   81,    0,    1,    0,    6,
00411         1,    5,   11,   27,   28,   25,   31,   28,   40,   42,
00412        37,   46,   40,   53,   49,   81,   50,   59,   81,   81,
00413        81,    0
00414     } ;
00415 
00416 static yyconst flex_int16_t yy_def[33] =
00417     {   0,
00418        32,   32,   31,   31,   31,   31,   31,   31,   31,   31,
00419        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00420        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00421         0,   31
00422     } ;
00423 
00424 static yyconst flex_int16_t yy_nxt[113] =
00425     {   0,
00426         4,    5,    6,   31,   14,   10,   13,   10,    7,    8,
00427        31,   11,   12,    5,    9,   31,   31,   10,   14,   10,
00428        13,   15,    7,    8,   16,   11,   12,    5,    9,    5,
00429         6,   10,   17,   10,   18,   15,    7,    8,   16,   19,
00430        20,    5,    9,   21,   22,   23,   17,   24,   18,   25,
00431         7,    8,   26,   19,   20,    5,    9,   21,   22,   23,
00432        27,   24,   28,   25,   29,   30,   26,   31,   31,   31,
00433        31,   31,   31,   31,   27,   31,   28,   31,   29,   30,
00434         3,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00435        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00436 
00437        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00438        31,   31
00439     } ;
00440 
00441 static yyconst flex_int16_t yy_chk[113] =
00442     {   0,
00443        32,    1,    1,    3,   11,    5,    9,   10,    1,    1,
00444         0,    7,    8,    1,    1,    0,    0,    5,   11,   10,
00445         9,   12,    1,    1,   13,    7,    8,    1,    1,    2,
00446         2,    5,   14,   10,   15,   12,    2,    2,   13,   16,
00447        17,    2,    2,   18,   19,   20,   14,   21,   15,   22,
00448         2,    2,   23,   16,   17,    2,    2,   18,   19,   20,
00449        24,   21,   25,   22,   27,   28,   23,    0,    0,    0,
00450         0,    0,    0,    0,   24,    0,   25,    0,   27,   28,
00451        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00452        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00453 
00454        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00455        31,   31
00456     } ;
00457 
00458 /* The intent behind this definition is that it'll catch
00459  * any uses of REJECT which flex missed.
00460  */
00461 #define REJECT reject_used_but_not_detected
00462 #define yymore() yymore_used_but_not_detected
00463 #define YY_MORE_ADJ 0
00464 #define YY_RESTORE_YY_MORE_OFFSET
00465 #line 1 "scanner.lpp"
00466 #line 6 "scanner.lpp"
00467 #include "parserbase.h"
00468 #define ECHO
00469 #line 470 "scanner.cpp"
00470 
00471 #define INITIAL 0
00472 
00473 #ifndef YY_NO_UNISTD_H
00474 /* Special case for "unistd.h", since it is non-ANSI. We include it way
00475  * down here because we want the user's section 1 to have been scanned first.
00476  * The user has a chance to override it with an option.
00477  */
00478 #include <unistd.h>
00479 #endif
00480 
00481 #ifndef YY_EXTRA_TYPE
00482 #define YY_EXTRA_TYPE void *
00483 #endif
00484 
00485 /* Holds the entire state of the reentrant scanner. */
00486 struct yyguts_t
00487     {
00488 
00489     /* User-defined. Not touched by flex. */
00490     YY_EXTRA_TYPE yyextra_r;
00491 
00492     /* The rest are the same as the globals declared in the non-reentrant scanner. */
00493     FILE *yyin_r, *yyout_r;
00494     size_t yy_buffer_stack_top; 
00495     size_t yy_buffer_stack_max; 
00496     YY_BUFFER_STATE * yy_buffer_stack; 
00497     char yy_hold_char;
00498     int yy_n_chars;
00499     int yyleng_r;
00500     char *yy_c_buf_p;
00501     int yy_init;
00502     int yy_start;
00503     int yy_did_buffer_switch_on_eof;
00504     int yy_start_stack_ptr;
00505     int yy_start_stack_depth;
00506     int *yy_start_stack;
00507     yy_state_type yy_last_accepting_state;
00508     char* yy_last_accepting_cpos;
00509 
00510     int yylineno_r;
00511     int yy_flex_debug_r;
00512 
00513     char *yytext_r;
00514     int yy_more_flag;
00515     int yy_more_len;
00516 
00517     }; /* end struct yyguts_t */
00518 
00519 static int yy_init_globals (yyscan_t yyscanner );
00520 
00521 int yylex_init (yyscan_t* scanner);
00522 
00523 int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
00524 
00525 /* Accessor methods to globals.
00526    These are made visible to non-reentrant scanners for convenience. */
00527 
00528 int yylex_destroy (yyscan_t yyscanner );
00529 
00530 int yyget_debug (yyscan_t yyscanner );
00531 
00532 void yyset_debug (int debug_flag ,yyscan_t yyscanner );
00533 
00534 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner );
00535 
00536 void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
00537 
00538 FILE *yyget_in (yyscan_t yyscanner );
00539 
00540 void yyset_in  (FILE * in_str ,yyscan_t yyscanner );
00541 
00542 FILE *yyget_out (yyscan_t yyscanner );
00543 
00544 void yyset_out  (FILE * out_str ,yyscan_t yyscanner );
00545 
00546 int yyget_leng (yyscan_t yyscanner );
00547 
00548 char *yyget_text (yyscan_t yyscanner );
00549 
00550 int yyget_lineno (yyscan_t yyscanner );
00551 
00552 void yyset_lineno (int line_number ,yyscan_t yyscanner );
00553 
00554 /* Macros after this point can all be overridden by user definitions in
00555  * section 1.
00556  */
00557 
00558 #ifndef YY_SKIP_YYWRAP
00559 #ifdef __cplusplus
00560 extern "C" int yywrap (yyscan_t yyscanner );
00561 #else
00562 extern int yywrap (yyscan_t yyscanner );
00563 #endif
00564 #endif
00565 
00566     static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);
00567     
00568 #ifndef yytext_ptr
00569 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
00570 #endif
00571 
00572 #ifdef YY_NEED_STRLEN
00573 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
00574 #endif
00575 
00576 #ifndef YY_NO_INPUT
00577 
00578 #ifdef __cplusplus
00579 static int yyinput (yyscan_t yyscanner );
00580 #else
00581 static int input (yyscan_t yyscanner );
00582 #endif
00583 
00584 #endif
00585 
00586 /* Amount of stuff to slurp up with each read. */
00587 #ifndef YY_READ_BUF_SIZE
00588 #define YY_READ_BUF_SIZE 8192
00589 #endif
00590 
00591 /* Copy whatever the last rule matched to the standard output. */
00592 #ifndef ECHO
00593 /* This used to be an fputs(), but since the string might contain NUL's,
00594  * we now use fwrite().
00595  */
00596 #define ECHO fwrite( yytext, yyleng, 1, yyout )
00597 #endif
00598 
00599 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00600  * is returned in "result".
00601  */
00602 #ifndef YY_INPUT
00603 #define YY_INPUT(buf,result,max_size) \
00604         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
00605                 { \
00606                 int c = '*'; \
00607                 size_t n; \
00608                 for ( n = 0; n < max_size && \
00609                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00610                         buf[n] = (char) c; \
00611                 if ( c == '\n' ) \
00612                         buf[n++] = (char) c; \
00613                 if ( c == EOF && ferror( yyin ) ) \
00614                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
00615                 result = n; \
00616                 } \
00617         else \
00618                 { \
00619                 errno=0; \
00620                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
00621                         { \
00622                         if( errno != EINTR) \
00623                                 { \
00624                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00625                                 break; \
00626                                 } \
00627                         errno=0; \
00628                         clearerr(yyin); \
00629                         } \
00630                 }\
00631 \
00632 
00633 #endif
00634 
00635 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00636  * we don't want an extra ';' after the "return" because that will cause
00637  * some compilers to complain about unreachable statements.
00638  */
00639 #ifndef yyterminate
00640 #define yyterminate() return YY_NULL
00641 #endif
00642 
00643 /* Number of entries by which start-condition stack grows. */
00644 #ifndef YY_START_STACK_INCR
00645 #define YY_START_STACK_INCR 25
00646 #endif
00647 
00648 /* Report a fatal error. */
00649 #ifndef YY_FATAL_ERROR
00650 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
00651 #endif
00652 
00653 /* end tables serialization structures and prototypes */
00654 
00655 /* Default declaration of generated scanner - a define so the user can
00656  * easily add parameters.
00657  */
00658 #ifndef YY_DECL
00659 #define YY_DECL_IS_OURS 1
00660 
00661 extern int yylex (yyscan_t yyscanner);
00662 
00663 #define YY_DECL int yylex (yyscan_t yyscanner)
00664 #endif /* !YY_DECL */
00665 
00666 /* Code executed at the beginning of each rule, after yytext and yyleng
00667  * have been set up.
00668  */
00669 #ifndef YY_USER_ACTION
00670 #define YY_USER_ACTION
00671 #endif
00672 
00673 /* Code executed at the end of each rule. */
00674 #ifndef YY_BREAK
00675 #define YY_BREAK break;
00676 #endif
00677 
00678 #define YY_RULE_SETUP \
00679         YY_USER_ACTION
00680 
00683 YY_DECL
00684 {
00685         register yy_state_type yy_current_state;
00686         register char *yy_cp, *yy_bp;
00687         register int yy_act;
00688     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
00689 
00690 #line 17 "scanner.lpp"
00691 
00692 
00693 #line 694 "scanner.cpp"
00694 
00695         if ( !yyg->yy_init )
00696                 {
00697                 yyg->yy_init = 1;
00698 
00699 #ifdef YY_USER_INIT
00700                 YY_USER_INIT;
00701 #endif
00702 
00703                 if ( ! yyg->yy_start )
00704                         yyg->yy_start = 1;      /* first start state */
00705 
00706                 if ( ! yyin )
00707                         yyin = stdin;
00708 
00709                 if ( ! yyout )
00710                         yyout = stdout;
00711 
00712                 if ( ! YY_CURRENT_BUFFER ) {
00713                         yyensure_buffer_stack (yyscanner);
00714                         YY_CURRENT_BUFFER_LVALUE =
00715                                 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
00716                 }
00717 
00718                 yy_load_buffer_state(yyscanner );
00719                 }
00720 
00721         while ( 1 )             /* loops until end-of-file is reached */
00722                 {
00723                 yy_cp = yyg->yy_c_buf_p;
00724 
00725                 /* Support of yytext. */
00726                 *yy_cp = yyg->yy_hold_char;
00727 
00728                 /* yy_bp points to the position in yy_ch_buf of the start of
00729                  * the current run.
00730                  */
00731                 yy_bp = yy_cp;
00732 
00733                 yy_current_state = yyg->yy_start;
00734 yy_match:
00735                 do
00736                         {
00737                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00738                         if ( yy_accept[yy_current_state] )
00739                                 {
00740                                 yyg->yy_last_accepting_state = yy_current_state;
00741                                 yyg->yy_last_accepting_cpos = yy_cp;
00742                                 }
00743                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00744                                 {
00745                                 yy_current_state = (int) yy_def[yy_current_state];
00746                                 if ( yy_current_state >= 32 )
00747                                         yy_c = yy_meta[(unsigned int) yy_c];
00748                                 }
00749                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00750                         ++yy_cp;
00751                         }
00752                 while ( yy_base[yy_current_state] != 81 );
00753 
00754 yy_find_action:
00755                 yy_act = yy_accept[yy_current_state];
00756                 if ( yy_act == 0 )
00757                         { /* have to back up */
00758                         yy_cp = yyg->yy_last_accepting_cpos;
00759                         yy_current_state = yyg->yy_last_accepting_state;
00760                         yy_act = yy_accept[yy_current_state];
00761                         }
00762 
00763                 YY_DO_BEFORE_ACTION;
00764 
00765 do_action:      /* This label is used only to access EOF actions. */
00766 
00767                 switch ( yy_act )
00768         { /* beginning of action switch */
00769                         case 0: /* must back up */
00770                         /* undo the effects of YY_DO_BEFORE_ACTION */
00771                         *yy_cp = yyg->yy_hold_char;
00772                         yy_cp = yyg->yy_last_accepting_cpos;
00773                         yy_current_state = yyg->yy_last_accepting_state;
00774                         goto yy_find_action;
00775 
00776 case 1:
00777 YY_RULE_SETUP
00778 #line 19 "scanner.lpp"
00779 ;
00780         YY_BREAK
00781 case 2:
00782 YY_RULE_SETUP
00783 #line 21 "scanner.lpp"
00784 {
00785                      return ParserBase::TESTCASE;
00786                   };
00787         YY_BREAK
00788 case 3:
00789 YY_RULE_SETUP
00790 #line 25 "scanner.lpp"
00791 {
00792                     return ParserBase::MOVEUNIT;
00793                   };
00794         YY_BREAK
00795 case 4:
00796 YY_RULE_SETUP
00797 #line 29 "scanner.lpp"
00798 {
00799                     return ParserBase::LOADMAP;
00800                   };
00801         YY_BREAK
00802 case 5:
00803 YY_RULE_SETUP
00804 #line 33 "scanner.lpp"
00805 {
00806                     return yytext[0];  
00807                   };
00808         YY_BREAK
00809 case YY_STATE_EOF(INITIAL):
00810 #line 37 "scanner.lpp"
00811 {
00812                     yyterminate();
00813                   };
00814         YY_BREAK
00815 case 6:
00816 YY_RULE_SETUP
00817 #line 41 "scanner.lpp"
00818 ECHO;
00819         YY_BREAK
00820 #line 821 "scanner.cpp"
00821 
00822         case YY_END_OF_BUFFER:
00823                 {
00824                 /* Amount of text matched not including the EOB char. */
00825                 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
00826 
00827                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
00828                 *yy_cp = yyg->yy_hold_char;
00829                 YY_RESTORE_YY_MORE_OFFSET
00830 
00831                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
00832                         {
00833                         /* We're scanning a new file or input source.  It's
00834                          * possible that this happened because the user
00835                          * just pointed yyin at a new source and called
00836                          * yylex().  If so, then we have to assure
00837                          * consistency between YY_CURRENT_BUFFER and our
00838                          * globals.  Here is the right place to do so, because
00839                          * this is the first action (other than possibly a
00840                          * back-up) that will match for the new input source.
00841                          */
00842                         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
00843                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
00844                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
00845                         }
00846 
00847                 /* Note that here we test for yy_c_buf_p "<=" to the position
00848                  * of the first EOB in the buffer, since yy_c_buf_p will
00849                  * already have been incremented past the NUL character
00850                  * (since all states make transitions on EOB to the
00851                  * end-of-buffer state).  Contrast this with the test
00852                  * in input().
00853                  */
00854                 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
00855                         { /* This was really a NUL. */
00856                         yy_state_type yy_next_state;
00857 
00858                         yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
00859 
00860                         yy_current_state = yy_get_previous_state( yyscanner );
00861 
00862                         /* Okay, we're now positioned to make the NUL
00863                          * transition.  We couldn't have
00864                          * yy_get_previous_state() go ahead and do it
00865                          * for us because it doesn't know how to deal
00866                          * with the possibility of jamming (and we don't
00867                          * want to build jamming into it because then it
00868                          * will run more slowly).
00869                          */
00870 
00871                         yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
00872 
00873                         yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
00874 
00875                         if ( yy_next_state )
00876                                 {
00877                                 /* Consume the NUL. */
00878                                 yy_cp = ++yyg->yy_c_buf_p;
00879                                 yy_current_state = yy_next_state;
00880                                 goto yy_match;
00881                                 }
00882 
00883                         else
00884                                 {
00885                                 yy_cp = yyg->yy_c_buf_p;
00886                                 goto yy_find_action;
00887                                 }
00888                         }
00889 
00890                 else switch ( yy_get_next_buffer( yyscanner ) )
00891                         {
00892                         case EOB_ACT_END_OF_FILE:
00893                                 {
00894                                 yyg->yy_did_buffer_switch_on_eof = 0;
00895 
00896                                 if ( yywrap(yyscanner ) )
00897                                         {
00898                                         /* Note: because we've taken care in
00899                                          * yy_get_next_buffer() to have set up
00900                                          * yytext, we can now set up
00901                                          * yy_c_buf_p so that if some total
00902                                          * hoser (like flex itself) wants to
00903                                          * call the scanner after we return the
00904                                          * YY_NULL, it'll still work - another
00905                                          * YY_NULL will get returned.
00906                                          */
00907                                         yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
00908 
00909                                         yy_act = YY_STATE_EOF(YY_START);
00910                                         goto do_action;
00911                                         }
00912 
00913                                 else
00914                                         {
00915                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
00916                                                 YY_NEW_FILE;
00917                                         }
00918                                 break;
00919                                 }
00920 
00921                         case EOB_ACT_CONTINUE_SCAN:
00922                                 yyg->yy_c_buf_p =
00923                                         yyg->yytext_ptr + yy_amount_of_matched_text;
00924 
00925                                 yy_current_state = yy_get_previous_state( yyscanner );
00926 
00927                                 yy_cp = yyg->yy_c_buf_p;
00928                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
00929                                 goto yy_match;
00930 
00931                         case EOB_ACT_LAST_MATCH:
00932                                 yyg->yy_c_buf_p =
00933                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
00934 
00935                                 yy_current_state = yy_get_previous_state( yyscanner );
00936 
00937                                 yy_cp = yyg->yy_c_buf_p;
00938                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
00939                                 goto yy_find_action;
00940                         }
00941                 break;
00942                 }
00943 
00944         default:
00945                 YY_FATAL_ERROR(
00946                         "fatal flex scanner internal error--no action found" );
00947         } /* end of action switch */
00948                 } /* end of scanning one token */
00949 } /* end of yylex */
00950 
00951 /* yy_get_next_buffer - try to read in a new buffer
00952  *
00953  * Returns a code representing an action:
00954  *      EOB_ACT_LAST_MATCH -
00955  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
00956  *      EOB_ACT_END_OF_FILE - end of file
00957  */
00958 static int yy_get_next_buffer (yyscan_t yyscanner)
00959 {
00960     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
00961         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
00962         register char *source = yyg->yytext_ptr;
00963         register int number_to_move, i;
00964         int ret_val;
00965 
00966         if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
00967                 YY_FATAL_ERROR(
00968                 "fatal flex scanner internal error--end of buffer missed" );
00969 
00970         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
00971                 { /* Don't try to fill the buffer, so this is an EOF. */
00972                 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
00973                         {
00974                         /* We matched a single character, the EOB, so
00975                          * treat this as a final EOF.
00976                          */
00977                         return EOB_ACT_END_OF_FILE;
00978                         }
00979 
00980                 else
00981                         {
00982                         /* We matched some text prior to the EOB, first
00983                          * process it.
00984                          */
00985                         return EOB_ACT_LAST_MATCH;
00986                         }
00987                 }
00988 
00989         /* Try to read more data. */
00990 
00991         /* First move last chars to start of buffer. */
00992         number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
00993 
00994         for ( i = 0; i < number_to_move; ++i )
00995                 *(dest++) = *(source++);
00996 
00997         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
00998                 /* don't do the read, it's not guaranteed to return an EOF,
00999                  * just force an EOF
01000                  */
01001                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
01002 
01003         else
01004                 {
01005                         int num_to_read =
01006                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
01007 
01008                 while ( num_to_read <= 0 )
01009                         { /* Not enough room in the buffer - grow it. */
01010 
01011                         /* just a shorter name for the current buffer */
01012                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
01013 
01014                         int yy_c_buf_p_offset =
01015                                 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
01016 
01017                         if ( b->yy_is_our_buffer )
01018                                 {
01019                                 int new_size = b->yy_buf_size * 2;
01020 
01021                                 if ( new_size <= 0 )
01022                                         b->yy_buf_size += b->yy_buf_size / 8;
01023                                 else
01024                                         b->yy_buf_size *= 2;
01025 
01026                                 b->yy_ch_buf = (char *)
01027                                         /* Include room in for 2 EOB chars. */
01028                                         yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
01029                                 }
01030                         else
01031                                 /* Can't grow it, we don't own it. */
01032                                 b->yy_ch_buf = 0;
01033 
01034                         if ( ! b->yy_ch_buf )
01035                                 YY_FATAL_ERROR(
01036                                 "fatal error - scanner input buffer overflow" );
01037 
01038                         yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01039 
01040                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
01041                                                 number_to_move - 1;
01042 
01043                         }
01044 
01045                 if ( num_to_read > YY_READ_BUF_SIZE )
01046                         num_to_read = YY_READ_BUF_SIZE;
01047 
01048                 /* Read in more data. */
01049                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
01050                         yyg->yy_n_chars, (size_t) num_to_read );
01051 
01052                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
01053                 }
01054 
01055         if ( yyg->yy_n_chars == 0 )
01056                 {
01057                 if ( number_to_move == YY_MORE_ADJ )
01058                         {
01059                         ret_val = EOB_ACT_END_OF_FILE;
01060                         yyrestart(yyin  ,yyscanner);
01061                         }
01062 
01063                 else
01064                         {
01065                         ret_val = EOB_ACT_LAST_MATCH;
01066                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
01067                                 YY_BUFFER_EOF_PENDING;
01068                         }
01069                 }
01070 
01071         else
01072                 ret_val = EOB_ACT_CONTINUE_SCAN;
01073 
01074         if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
01075                 /* Extend the array by 50%, plus the number we really need. */
01076                 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
01077                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
01078                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
01079                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
01080         }
01081 
01082         yyg->yy_n_chars += number_to_move;
01083         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01084         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01085 
01086         yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
01087 
01088         return ret_val;
01089 }
01090 
01091 /* yy_get_previous_state - get the state just before the EOB char was reached */
01092 
01093     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
01094 {
01095         register yy_state_type yy_current_state;
01096         register char *yy_cp;
01097     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01098 
01099         yy_current_state = yyg->yy_start;
01100 
01101         for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
01102                 {
01103                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01104                 if ( yy_accept[yy_current_state] )
01105                         {
01106                         yyg->yy_last_accepting_state = yy_current_state;
01107                         yyg->yy_last_accepting_cpos = yy_cp;
01108                         }
01109                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01110                         {
01111                         yy_current_state = (int) yy_def[yy_current_state];
01112                         if ( yy_current_state >= 32 )
01113                                 yy_c = yy_meta[(unsigned int) yy_c];
01114                         }
01115                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01116                 }
01117 
01118         return yy_current_state;
01119 }
01120 
01121 /* yy_try_NUL_trans - try to make a transition on the NUL character
01122  *
01123  * synopsis
01124  *      next_state = yy_try_NUL_trans( current_state );
01125  */
01126     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
01127 {
01128         register int yy_is_jam;
01129     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
01130         register char *yy_cp = yyg->yy_c_buf_p;
01131 
01132         register YY_CHAR yy_c = 1;
01133         if ( yy_accept[yy_current_state] )
01134                 {
01135                 yyg->yy_last_accepting_state = yy_current_state;
01136                 yyg->yy_last_accepting_cpos = yy_cp;
01137                 }
01138         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01139                 {
01140                 yy_current_state = (int) yy_def[yy_current_state];
01141                 if ( yy_current_state >= 32 )
01142                         yy_c = yy_meta[(unsigned int) yy_c];
01143                 }
01144         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01145         yy_is_jam = (yy_current_state == 31);
01146 
01147         return yy_is_jam ? 0 : yy_current_state;
01148 }
01149 
01150     static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
01151 {
01152         register char *yy_cp;
01153     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01154 
01155     yy_cp = yyg->yy_c_buf_p;
01156 
01157         /* undo effects of setting up yytext */
01158         *yy_cp = yyg->yy_hold_char;
01159 
01160         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01161                 { /* need to shift things up to make room */
01162                 /* +2 for EOB chars. */
01163                 register int number_to_move = yyg->yy_n_chars + 2;
01164                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
01165                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
01166                 register char *source =
01167                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
01168 
01169                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
01170                         *--dest = *--source;
01171 
01172                 yy_cp += (int) (dest - source);
01173                 yy_bp += (int) (dest - source);
01174                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
01175                         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
01176 
01177                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01178                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
01179                 }
01180 
01181         *--yy_cp = (char) c;
01182 
01183         yyg->yytext_ptr = yy_bp;
01184         yyg->yy_hold_char = *yy_cp;
01185         yyg->yy_c_buf_p = yy_cp;
01186 }
01187 
01188 #ifndef YY_NO_INPUT
01189 #ifdef __cplusplus
01190     static int yyinput (yyscan_t yyscanner)
01191 #else
01192     static int input  (yyscan_t yyscanner)
01193 #endif
01194 
01195 {
01196         int c;
01197     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01198 
01199         *yyg->yy_c_buf_p = yyg->yy_hold_char;
01200 
01201         if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01202                 {
01203                 /* yy_c_buf_p now points to the character we want to return.
01204                  * If this occurs *before* the EOB characters, then it's a
01205                  * valid NUL; if not, then we've hit the end of the buffer.
01206                  */
01207                 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
01208                         /* This was really a NUL. */
01209                         *yyg->yy_c_buf_p = '\0';
01210 
01211                 else
01212                         { /* need more input */
01213                         int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
01214                         ++yyg->yy_c_buf_p;
01215 
01216                         switch ( yy_get_next_buffer( yyscanner ) )
01217                                 {
01218                                 case EOB_ACT_LAST_MATCH:
01219                                         /* This happens because yy_g_n_b()
01220                                          * sees that we've accumulated a
01221                                          * token and flags that we need to
01222                                          * try matching the token before
01223                                          * proceeding.  But for input(),
01224                                          * there's no matching to consider.
01225                                          * So convert the EOB_ACT_LAST_MATCH
01226                                          * to EOB_ACT_END_OF_FILE.
01227                                          */
01228 
01229                                         /* Reset buffer status. */
01230                                         yyrestart(yyin ,yyscanner);
01231 
01232                                         /*FALLTHROUGH*/
01233 
01234                                 case EOB_ACT_END_OF_FILE:
01235                                         {
01236                                         if ( yywrap(yyscanner ) )
01237                                                 return EOF;
01238 
01239                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
01240                                                 YY_NEW_FILE;
01241 #ifdef __cplusplus
01242                                         return yyinput(yyscanner);
01243 #else
01244                                         return input(yyscanner);
01245 #endif
01246                                         }
01247 
01248                                 case EOB_ACT_CONTINUE_SCAN:
01249                                         yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
01250                                         break;
01251                                 }
01252                         }
01253                 }
01254 
01255         c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
01256         *yyg->yy_c_buf_p = '\0';        /* preserve yytext */
01257         yyg->yy_hold_char = *++yyg->yy_c_buf_p;
01258 
01259         return c;
01260 }
01261 #endif  /* ifndef YY_NO_INPUT */
01262 
01268     void yyrestart  (FILE * input_file , yyscan_t yyscanner)
01269 {
01270     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01271 
01272         if ( ! YY_CURRENT_BUFFER ){
01273         yyensure_buffer_stack (yyscanner);
01274                 YY_CURRENT_BUFFER_LVALUE =
01275             yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
01276         }
01277 
01278         yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
01279         yy_load_buffer_state(yyscanner );
01280 }
01281 
01286     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
01287 {
01288     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01289 
01290         /* TODO. We should be able to replace this entire function body
01291          * with
01292          *              yypop_buffer_state();
01293          *              yypush_buffer_state(new_buffer);
01294      */
01295         yyensure_buffer_stack (yyscanner);
01296         if ( YY_CURRENT_BUFFER == new_buffer )
01297                 return;
01298 
01299         if ( YY_CURRENT_BUFFER )
01300                 {
01301                 /* Flush out information for old buffer. */
01302                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
01303                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
01304                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
01305                 }
01306 
01307         YY_CURRENT_BUFFER_LVALUE = new_buffer;
01308         yy_load_buffer_state(yyscanner );
01309 
01310         /* We don't actually know whether we did this switch during
01311          * EOF (yywrap()) processing, but the only time this flag
01312          * is looked at is after yywrap() is called, so it's safe
01313          * to go ahead and always set it.
01314          */
01315         yyg->yy_did_buffer_switch_on_eof = 1;
01316 }
01317 
01318 static void yy_load_buffer_state  (yyscan_t yyscanner)
01319 {
01320     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01321         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01322         yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
01323         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
01324         yyg->yy_hold_char = *yyg->yy_c_buf_p;
01325 }
01326 
01333     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
01334 {
01335         YY_BUFFER_STATE b;
01336     
01337         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
01338         if ( ! b )
01339                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01340 
01341         b->yy_buf_size = size;
01342 
01343         /* yy_ch_buf has to be 2 characters longer than the size given because
01344          * we need to put in 2 end-of-buffer characters.
01345          */
01346         b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner );
01347         if ( ! b->yy_ch_buf )
01348                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01349 
01350         b->yy_is_our_buffer = 1;
01351 
01352         yy_init_buffer(b,file ,yyscanner);
01353 
01354         return b;
01355 }
01356 
01361     void yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
01362 {
01363     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01364 
01365         if ( ! b )
01366                 return;
01367 
01368         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
01369                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
01370 
01371         if ( b->yy_is_our_buffer )
01372                 yyfree((void *) b->yy_ch_buf ,yyscanner );
01373 
01374         yyfree((void *) b ,yyscanner );
01375 }
01376 
01377 #ifndef __cplusplus
01378 extern int isatty (int );
01379 #endif /* __cplusplus */
01380     
01381 /* Initializes or reinitializes a buffer.
01382  * This function is sometimes called more than once on the same buffer,
01383  * such as during a yyrestart() or at EOF.
01384  */
01385     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
01386 
01387 {
01388         int oerrno = errno;
01389     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01390 
01391         yy_flush_buffer(b ,yyscanner);
01392 
01393         b->yy_input_file = file;
01394         b->yy_fill_buffer = 1;
01395 
01396     /* If b is the current buffer, then yy_init_buffer was _probably_
01397      * called from yyrestart() or through yy_get_next_buffer.
01398      * In that case, we don't want to reset the lineno or column.
01399      */
01400     if (b != YY_CURRENT_BUFFER){
01401         b->yy_bs_lineno = 1;
01402         b->yy_bs_column = 0;
01403     }
01404 
01405         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01406     
01407         errno = oerrno;
01408 }
01409 
01414     void yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
01415 {
01416     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01417         if ( ! b )
01418                 return;
01419 
01420         b->yy_n_chars = 0;
01421 
01422         /* We always need two end-of-buffer characters.  The first causes
01423          * a transition to the end-of-buffer state.  The second causes
01424          * a jam in that state.
01425          */
01426         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01427         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01428 
01429         b->yy_buf_pos = &b->yy_ch_buf[0];
01430 
01431         b->yy_at_bol = 1;
01432         b->yy_buffer_status = YY_BUFFER_NEW;
01433 
01434         if ( b == YY_CURRENT_BUFFER )
01435                 yy_load_buffer_state(yyscanner );
01436 }
01437 
01444 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
01445 {
01446     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01447         if (new_buffer == NULL)
01448                 return;
01449 
01450         yyensure_buffer_stack(yyscanner);
01451 
01452         /* This block is copied from yy_switch_to_buffer. */
01453         if ( YY_CURRENT_BUFFER )
01454                 {
01455                 /* Flush out information for old buffer. */
01456                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
01457                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
01458                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
01459                 }
01460 
01461         /* Only push if top exists. Otherwise, replace top. */
01462         if (YY_CURRENT_BUFFER)
01463                 yyg->yy_buffer_stack_top++;
01464         YY_CURRENT_BUFFER_LVALUE = new_buffer;
01465 
01466         /* copied from yy_switch_to_buffer. */
01467         yy_load_buffer_state(yyscanner );
01468         yyg->yy_did_buffer_switch_on_eof = 1;
01469 }
01470 
01475 void yypop_buffer_state (yyscan_t yyscanner)
01476 {
01477     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01478         if (!YY_CURRENT_BUFFER)
01479                 return;
01480 
01481         yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
01482         YY_CURRENT_BUFFER_LVALUE = NULL;
01483         if (yyg->yy_buffer_stack_top > 0)
01484                 --yyg->yy_buffer_stack_top;
01485 
01486         if (YY_CURRENT_BUFFER) {
01487                 yy_load_buffer_state(yyscanner );
01488                 yyg->yy_did_buffer_switch_on_eof = 1;
01489         }
01490 }
01491 
01492 /* Allocates the stack if it does not exist.
01493  *  Guarantees space for at least one push.
01494  */
01495 static void yyensure_buffer_stack (yyscan_t yyscanner)
01496 {
01497         int num_to_alloc;
01498     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01499 
01500         if (!yyg->yy_buffer_stack) {
01501 
01502                 /* First allocation is just for 2 elements, since we don't know if this
01503                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
01504                  * immediate realloc on the next call.
01505          */
01506                 num_to_alloc = 1;
01507                 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
01508                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
01509                                                                 , yyscanner);
01510                 if ( ! yyg->yy_buffer_stack )
01511                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
01512                                                                   
01513                 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
01514                                 
01515                 yyg->yy_buffer_stack_max = num_to_alloc;
01516                 yyg->yy_buffer_stack_top = 0;
01517                 return;
01518         }
01519 
01520         if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
01521 
01522                 /* Increase the buffer to prepare for a possible push. */
01523                 int grow_size = 8 /* arbitrary grow size */;
01524 
01525                 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
01526                 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
01527                                                                 (yyg->yy_buffer_stack,
01528                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
01529                                                                 , yyscanner);
01530                 if ( ! yyg->yy_buffer_stack )
01531                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
01532 
01533                 /* zero only the new slots.*/
01534                 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
01535                 yyg->yy_buffer_stack_max = num_to_alloc;
01536         }
01537 }
01538 
01545 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
01546 {
01547         YY_BUFFER_STATE b;
01548     
01549         if ( size < 2 ||
01550              base[size-2] != YY_END_OF_BUFFER_CHAR ||
01551              base[size-1] != YY_END_OF_BUFFER_CHAR )
01552                 /* They forgot to leave room for the EOB's. */
01553                 return 0;
01554 
01555         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
01556         if ( ! b )
01557                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01558 
01559         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
01560         b->yy_buf_pos = b->yy_ch_buf = base;
01561         b->yy_is_our_buffer = 0;
01562         b->yy_input_file = 0;
01563         b->yy_n_chars = b->yy_buf_size;
01564         b->yy_is_interactive = 0;
01565         b->yy_at_bol = 1;
01566         b->yy_fill_buffer = 0;
01567         b->yy_buffer_status = YY_BUFFER_NEW;
01568 
01569         yy_switch_to_buffer(b ,yyscanner );
01570 
01571         return b;
01572 }
01573 
01582 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
01583 {
01584     
01585         return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
01586 }
01587 
01595 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
01596 {
01597         YY_BUFFER_STATE b;
01598         char *buf;
01599         yy_size_t n;
01600         int i;
01601     
01602         /* Get memory for full buffer, including space for trailing EOB's. */
01603         n = _yybytes_len + 2;
01604         buf = (char *) yyalloc(n ,yyscanner );
01605         if ( ! buf )
01606                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01607 
01608         for ( i = 0; i < _yybytes_len; ++i )
01609                 buf[i] = yybytes[i];
01610 
01611         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
01612 
01613         b = yy_scan_buffer(buf,n ,yyscanner);
01614         if ( ! b )
01615                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01616 
01617         /* It's okay to grow etc. this buffer, and we should throw it
01618          * away when we're done.
01619          */
01620         b->yy_is_our_buffer = 1;
01621 
01622         return b;
01623 }
01624 
01625 #ifndef YY_EXIT_FAILURE
01626 #define YY_EXIT_FAILURE 2
01627 #endif
01628 
01629 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
01630 {
01631         (void) fprintf( stderr, "%s\n", msg );
01632         exit( YY_EXIT_FAILURE );
01633 }
01634 
01635 /* Redefine yyless() so it works in section 3 code. */
01636 
01637 #undef yyless
01638 #define yyless(n) \
01639         do \
01640                 { \
01641                 /* Undo effects of setting up yytext. */ \
01642         int yyless_macro_arg = (n); \
01643         YY_LESS_LINENO(yyless_macro_arg);\
01644                 yytext[yyleng] = yyg->yy_hold_char; \
01645                 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
01646                 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
01647                 *yyg->yy_c_buf_p = '\0'; \
01648                 yyleng = yyless_macro_arg; \
01649                 } \
01650         while ( 0 )
01651 
01652 /* Accessor  methods (get/set functions) to struct members. */
01653 
01657 YY_EXTRA_TYPE yyget_extra  (yyscan_t yyscanner)
01658 {
01659     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01660     return yyextra;
01661 }
01662 
01666 int yyget_lineno  (yyscan_t yyscanner)
01667 {
01668     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01669     
01670         if (! YY_CURRENT_BUFFER)
01671             return 0;
01672     
01673     return yylineno;
01674 }
01675 
01679 int yyget_column  (yyscan_t yyscanner)
01680 {
01681     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01682     
01683         if (! YY_CURRENT_BUFFER)
01684             return 0;
01685     
01686     return yycolumn;
01687 }
01688 
01692 FILE *yyget_in  (yyscan_t yyscanner)
01693 {
01694     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01695     return yyin;
01696 }
01697 
01701 FILE *yyget_out  (yyscan_t yyscanner)
01702 {
01703     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01704     return yyout;
01705 }
01706 
01710 int yyget_leng  (yyscan_t yyscanner)
01711 {
01712     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01713     return yyleng;
01714 }
01715 
01720 char *yyget_text  (yyscan_t yyscanner)
01721 {
01722     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01723     return yytext;
01724 }
01725 
01730 void yyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
01731 {
01732     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01733     yyextra = user_defined ;
01734 }
01735 
01740 void yyset_lineno (int  line_number , yyscan_t yyscanner)
01741 {
01742     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01743 
01744         /* lineno is only valid if an input buffer exists. */
01745         if (! YY_CURRENT_BUFFER )
01746            yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner); 
01747     
01748     yylineno = line_number;
01749 }
01750 
01755 void yyset_column (int  column_no , yyscan_t yyscanner)
01756 {
01757     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01758 
01759         /* column is only valid if an input buffer exists. */
01760         if (! YY_CURRENT_BUFFER )
01761            yy_fatal_error( "yyset_column called with no buffer" , yyscanner); 
01762     
01763     yycolumn = column_no;
01764 }
01765 
01772 void yyset_in (FILE *  in_str , yyscan_t yyscanner)
01773 {
01774     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01775     yyin = in_str ;
01776 }
01777 
01778 void yyset_out (FILE *  out_str , yyscan_t yyscanner)
01779 {
01780     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01781     yyout = out_str ;
01782 }
01783 
01784 int yyget_debug  (yyscan_t yyscanner)
01785 {
01786     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01787     return yy_flex_debug;
01788 }
01789 
01790 void yyset_debug (int  bdebug , yyscan_t yyscanner)
01791 {
01792     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01793     yy_flex_debug = bdebug ;
01794 }
01795 
01796 /* Accessor methods for yylval and yylloc */
01797 
01798 /* User-visible API */
01799 
01800 /* yylex_init is special because it creates the scanner itself, so it is
01801  * the ONLY reentrant function that doesn't take the scanner as the last argument.
01802  * That's why we explicitly handle the declaration, instead of using our macros.
01803  */
01804 
01805 int yylex_init(yyscan_t* ptr_yy_globals)
01806 
01807 {
01808     if (ptr_yy_globals == NULL){
01809         errno = EINVAL;
01810         return 1;
01811     }
01812 
01813     *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
01814 
01815     if (*ptr_yy_globals == NULL){
01816         errno = ENOMEM;
01817         return 1;
01818     }
01819 
01820     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
01821     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
01822 
01823     return yy_init_globals ( *ptr_yy_globals );
01824 }
01825 
01826 /* yylex_init_extra has the same functionality as yylex_init, but follows the
01827  * convention of taking the scanner as the last argument. Note however, that
01828  * this is a *pointer* to a scanner, as it will be allocated by this call (and
01829  * is the reason, too, why this function also must handle its own declaration).
01830  * The user defined value in the first argument will be available to yyalloc in
01831  * the yyextra field.
01832  */
01833 
01834 int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
01835 
01836 {
01837     struct yyguts_t dummy_yyguts;
01838 
01839     yyset_extra (yy_user_defined, &dummy_yyguts);
01840 
01841     if (ptr_yy_globals == NULL){
01842         errno = EINVAL;
01843         return 1;
01844     }
01845         
01846     *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
01847         
01848     if (*ptr_yy_globals == NULL){
01849         errno = ENOMEM;
01850         return 1;
01851     }
01852     
01853     /* By setting to 0xAA, we expose bugs in
01854     yy_init_globals. Leave at 0x00 for releases. */
01855     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
01856     
01857     yyset_extra (yy_user_defined, *ptr_yy_globals);
01858     
01859     return yy_init_globals ( *ptr_yy_globals );
01860 }
01861 
01862 static int yy_init_globals (yyscan_t yyscanner)
01863 {
01864     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01865     /* Initialization is the same as for the non-reentrant scanner.
01866      * This function is called from yylex_destroy(), so don't allocate here.
01867      */
01868 
01869     yyg->yy_buffer_stack = 0;
01870     yyg->yy_buffer_stack_top = 0;
01871     yyg->yy_buffer_stack_max = 0;
01872     yyg->yy_c_buf_p = (char *) 0;
01873     yyg->yy_init = 0;
01874     yyg->yy_start = 0;
01875 
01876     yyg->yy_start_stack_ptr = 0;
01877     yyg->yy_start_stack_depth = 0;
01878     yyg->yy_start_stack =  NULL;
01879 
01880 /* Defined in main.c */
01881 #ifdef YY_STDINIT
01882     yyin = stdin;
01883     yyout = stdout;
01884 #else
01885     yyin = (FILE *) 0;
01886     yyout = (FILE *) 0;
01887 #endif
01888 
01889     /* For future reference: Set errno on error, since we are called by
01890      * yylex_init()
01891      */
01892     return 0;
01893 }
01894 
01895 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
01896 int yylex_destroy  (yyscan_t yyscanner)
01897 {
01898     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01899 
01900     /* Pop the buffer stack, destroying each element. */
01901         while(YY_CURRENT_BUFFER){
01902                 yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
01903                 YY_CURRENT_BUFFER_LVALUE = NULL;
01904                 yypop_buffer_state(yyscanner);
01905         }
01906 
01907         /* Destroy the stack itself. */
01908         yyfree(yyg->yy_buffer_stack ,yyscanner);
01909         yyg->yy_buffer_stack = NULL;
01910 
01911     /* Destroy the start condition stack. */
01912         yyfree(yyg->yy_start_stack ,yyscanner );
01913         yyg->yy_start_stack = NULL;
01914 
01915     /* Reset the globals. This is important in a non-reentrant scanner so the next time
01916      * yylex() is called, initialization will occur. */
01917     yy_init_globals( yyscanner);
01918 
01919     /* Destroy the main struct (reentrant only). */
01920     yyfree ( yyscanner , yyscanner );
01921     yyscanner = NULL;
01922     return 0;
01923 }
01924 
01925 /*
01926  * Internal utility routines.
01927  */
01928 
01929 #ifndef yytext_ptr
01930 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
01931 {
01932         register int i;
01933         for ( i = 0; i < n; ++i )
01934                 s1[i] = s2[i];
01935 }
01936 #endif
01937 
01938 #ifdef YY_NEED_STRLEN
01939 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
01940 {
01941         register int n;
01942         for ( n = 0; s[n]; ++n )
01943                 ;
01944 
01945         return n;
01946 }
01947 #endif
01948 
01949 void *yyalloc (yy_size_t  size , yyscan_t yyscanner)
01950 {
01951         return (void *) malloc( size );
01952 }
01953 
01954 void *yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
01955 {
01956         /* The cast to (char *) in the following accommodates both
01957          * implementations that use char* generic pointers, and those
01958          * that use void* generic pointers.  It works with the latter
01959          * because both ANSI C and C++ allow castless assignment from
01960          * any pointer type to void*, and deal with argument conversions
01961          * as though doing an assignment.
01962          */
01963         return (void *) realloc( (char *) ptr, size );
01964 }
01965 
01966 void yyfree (void * ptr , yyscan_t yyscanner)
01967 {
01968         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
01969 }
01970 
01971 #define YYTABLES_NAME "yytables"
01972 
01973 #line 41 "scanner.lpp"

Generated on Mon May 21 01:26:37 2012 for Advanced Strategic Command by  doxygen 1.5.1