• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

contrib/maloc/src/vsh/vlex.c

00001 
00002 #line 3 "vlex.c"
00003 
00004 #define  YY_INT_ALIGNED short int
00005 
00006 /* A lexical scanner generated by flex */
00007 
00008 #define FLEX_SCANNER
00009 #define YY_FLEX_MAJOR_VERSION 2
00010 #define YY_FLEX_MINOR_VERSION 5
00011 #define YY_FLEX_SUBMINOR_VERSION 33
00012 #if YY_FLEX_SUBMINOR_VERSION > 0
00013 #define FLEX_BETA
00014 #endif
00015 
00016 /* First, we deal with  platform-specific or compiler-specific issues. */
00017 
00018 /* begin standard C headers. */
00019 #include <stdio.h>
00020 #include <string.h>
00021 #include <errno.h>
00022 #include <stdlib.h>
00023 
00024 /* end standard C headers. */
00025 
00026 /* flex integer type definitions */
00027 
00028 #ifndef FLEXINT_H
00029 #define FLEXINT_H
00030 
00031 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
00032 
00033 #if __STDC_VERSION__ >= 199901L
00034 
00035 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
00036  * if you want the limit (max/min) macros for int types. 
00037  */
00038 #ifndef __STDC_LIMIT_MACROS
00039 #define __STDC_LIMIT_MACROS 1
00040 #endif
00041 
00042 #include <inttypes.h>
00043 typedef int8_t flex_int8_t;
00044 typedef uint8_t flex_uint8_t;
00045 typedef int16_t flex_int16_t;
00046 typedef uint16_t flex_uint16_t;
00047 typedef int32_t flex_int32_t;
00048 typedef uint32_t flex_uint32_t;
00049 #else
00050 typedef signed char flex_int8_t;
00051 typedef short int flex_int16_t;
00052 typedef int flex_int32_t;
00053 typedef unsigned char flex_uint8_t; 
00054 typedef unsigned short int flex_uint16_t;
00055 typedef unsigned int flex_uint32_t;
00056 #endif /* ! C99 */
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 /* ! FLEXINT_H */
00088 
00089 #ifdef __cplusplus
00090 
00091 /* The "const" storage-class-modifier is valid. */
00092 #define YY_USE_CONST
00093 
00094 #else      /* ! __cplusplus */
00095 
00096 #if __STDC__
00097 
00098 #define YY_USE_CONST
00099 
00100 #endif     /* __STDC__ */
00101 #endif     /* ! __cplusplus */
00102 
00103 #ifdef YY_USE_CONST
00104 #define yyconst const
00105 #else
00106 #define yyconst
00107 #endif
00108 
00109 /* Returned upon end-of-file. */
00110 #define YY_NULL 0
00111 
00112 /* Promotes a possibly negative, possibly signed char to an unsigned
00113  * integer for use as an array index.  If the signed char is negative,
00114  * we want to instead treat it as an 8-bit unsigned char, hence the
00115  * double cast.
00116  */
00117 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00118 
00119 /* Enter a start condition.  This macro really ought to take a parameter,
00120  * but we do it the disgusting crufty way forced on us by the ()-less
00121  * definition of BEGIN.
00122  */
00123 #define BEGIN (yy_start) = 1 + 2 *
00124 
00125 /* Translate the current start state into a value that can be later handed
00126  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00127  * compatibility.
00128  */
00129 #define YY_START (((yy_start) - 1) / 2)
00130 #define YYSTATE YY_START
00131 
00132 /* Action number for EOF rule of a given start state. */
00133 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00134 
00135 /* Special action meaning "start processing a new file". */
00136 #define YY_NEW_FILE yyrestart(yyin  )
00137 
00138 #define YY_END_OF_BUFFER_CHAR 0
00139 
00140 /* Size of default input buffer. */
00141 #ifndef YY_BUF_SIZE
00142 #define YY_BUF_SIZE 16384
00143 #endif
00144 
00145 /* The state buf must be large enough to hold one state per character in the main buffer.
00146  */
00147 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00148 
00149 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00150 #define YY_TYPEDEF_YY_BUFFER_STATE
00151 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00152 #endif
00153 
00154 extern int yyleng;
00155 
00156 extern FILE *yyin, *yyout;
00157 
00158 #define EOB_ACT_CONTINUE_SCAN 0
00159 #define EOB_ACT_END_OF_FILE 1
00160 #define EOB_ACT_LAST_MATCH 2
00161 
00162     #define YY_LESS_LINENO(n)
00163     
00164 /* Return all but the first "n" matched characters back to the input stream. */
00165 #define yyless(n) \
00166            do \
00167                       { \
00168                       /* Undo effects of setting up yytext. */ \
00169         int yyless_macro_arg = (n); \
00170         YY_LESS_LINENO(yyless_macro_arg);\
00171                       *yy_cp = (yy_hold_char); \
00172                       YY_RESTORE_YY_MORE_OFFSET \
00173                       (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00174                       YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00175                       } \
00176            while ( 0 )
00177 
00178 #define unput(c) yyunput( c, (yytext_ptr)  )
00179 
00180 /* The following is because we cannot portably get our hands on size_t
00181  * (without autoconf's help, which isn't available because we want
00182  * flex-generated scanners to compile on their own).
00183  */
00184 
00185 #ifndef YY_TYPEDEF_YY_SIZE_T
00186 #define YY_TYPEDEF_YY_SIZE_T
00187 typedef unsigned int yy_size_t;
00188 #endif
00189 
00190 #ifndef YY_STRUCT_YY_BUFFER_STATE
00191 #define YY_STRUCT_YY_BUFFER_STATE
00192 struct yy_buffer_state
00193            {
00194            FILE *yy_input_file;
00195 
00196            char *yy_ch_buf;                 /* input buffer */
00197            char *yy_buf_pos;                /* current position in input buffer */
00198 
00199            /* Size of input buffer in bytes, not including room for EOB
00200             * characters.
00201             */
00202            yy_size_t yy_buf_size;
00203 
00204            /* Number of characters read into yy_ch_buf, not including EOB
00205             * characters.
00206             */
00207            int yy_n_chars;
00208 
00209            /* Whether we "own" the buffer - i.e., we know we created it,
00210             * and can realloc() it to grow it, and should free() it to
00211             * delete it.
00212             */
00213            int yy_is_our_buffer;
00214 
00215            /* Whether this is an "interactive" input source; if so, and
00216             * if we're using stdio for input, then we want to use getc()
00217             * instead of fread(), to make sure we stop fetching input after
00218             * each newline.
00219             */
00220            int yy_is_interactive;
00221 
00222            /* Whether we're considered to be at the beginning of a line.
00223             * If so, '^' rules will be active on the next match, otherwise
00224             * not.
00225             */
00226            int yy_at_bol;
00227 
00228     int yy_bs_lineno; 
00229     int yy_bs_column; 
00231            /* Whether to try to fill the input buffer when we reach the
00232             * end of it.
00233             */
00234            int yy_fill_buffer;
00235 
00236            int yy_buffer_status;
00237 
00238 #define YY_BUFFER_NEW 0
00239 #define YY_BUFFER_NORMAL 1
00240            /* When an EOF's been seen but there's still some text to process
00241             * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00242             * shouldn't try reading from the input source any more.  We might
00243             * still have a bunch of tokens to match, though, because of
00244             * possible backing-up.
00245             *
00246             * When we actually see the EOF, we change the status to "new"
00247             * (via yyrestart()), so that the user can continue scanning by
00248             * just pointing yyin at a new input file.
00249             */
00250 #define YY_BUFFER_EOF_PENDING 2
00251 
00252            };
00253 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
00254 
00255 /* Stack of input buffers. */
00256 static size_t yy_buffer_stack_top = 0; 
00257 static size_t yy_buffer_stack_max = 0; 
00258 static YY_BUFFER_STATE * yy_buffer_stack = 0; 
00260 /* We provide macros for accessing buffer states in case in the
00261  * future we want to put the buffer states in a more general
00262  * "scanner state".
00263  *
00264  * Returns the top of the stack, or NULL.
00265  */
00266 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
00267                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
00268                           : NULL)
00269 
00270 /* Same as previous macro, but useful when we know that the buffer stack is not
00271  * NULL or when we need an lvalue. For internal use only.
00272  */
00273 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
00274 
00275 /* yy_hold_char holds the character lost when yytext is formed. */
00276 static char yy_hold_char;
00277 static int yy_n_chars;                      /* number of characters read into yy_ch_buf */
00278 int yyleng;
00279 
00280 /* Points to current character in buffer. */
00281 static char *yy_c_buf_p = (char *) 0;
00282 static int yy_init = 0;                     /* whether we need to initialize */
00283 static int yy_start = 0;         /* start state number */
00284 
00285 /* Flag which is used to allow yywrap()'s to do buffer switches
00286  * instead of setting up a fresh yyin.  A bit of a hack ...
00287  */
00288 static int yy_did_buffer_switch_on_eof;
00289 
00290 void yyrestart (FILE *input_file  );
00291 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
00292 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
00293 void yy_delete_buffer (YY_BUFFER_STATE b  );
00294 void yy_flush_buffer (YY_BUFFER_STATE b  );
00295 void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
00296 void yypop_buffer_state (void );
00297 
00298 static void yyensure_buffer_stack (void );
00299 static void yy_load_buffer_state (void );
00300 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
00301 
00302 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
00303 
00304 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
00305 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
00306 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
00307 
00308 void *yyalloc (yy_size_t  );
00309 void *yyrealloc (void *,yy_size_t  );
00310 void yyfree (void *  );
00311 
00312 #define yy_new_buffer yy_create_buffer
00313 
00314 #define yy_set_interactive(is_interactive) \
00315            { \
00316            if ( ! YY_CURRENT_BUFFER ){ \
00317         yyensure_buffer_stack (); \
00318                       YY_CURRENT_BUFFER_LVALUE =    \
00319             yy_create_buffer(yyin,YY_BUF_SIZE ); \
00320            } \
00321            YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00322            }
00323 
00324 #define yy_set_bol(at_bol) \
00325            { \
00326            if ( ! YY_CURRENT_BUFFER ){\
00327         yyensure_buffer_stack (); \
00328                       YY_CURRENT_BUFFER_LVALUE =    \
00329             yy_create_buffer(yyin,YY_BUF_SIZE ); \
00330            } \
00331            YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00332            }
00333 
00334 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00335 
00336 /* Begin user sect3 */
00337 
00338 typedef unsigned char YY_CHAR;
00339 
00340 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00341 
00342 typedef int yy_state_type;
00343 
00344 extern int yylineno;
00345 
00346 int yylineno = 1;
00347 
00348 extern char *yytext;
00349 #define yytext_ptr yytext
00350 
00351 static yy_state_type yy_get_previous_state (void );
00352 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
00353 static int yy_get_next_buffer (void );
00354 static void yy_fatal_error (yyconst char msg[]  );
00355 
00356 /* Done after the current pattern has been matched and before the
00357  * corresponding action - sets up yytext.
00358  */
00359 #define YY_DO_BEFORE_ACTION \
00360            (yytext_ptr) = yy_bp; \
00361            yyleng = (size_t) (yy_cp - yy_bp); \
00362            (yy_hold_char) = *yy_cp; \
00363            *yy_cp = '\0'; \
00364            (yy_c_buf_p) = yy_cp;
00365 
00366 #define YY_NUM_RULES 47
00367 #define YY_END_OF_BUFFER 48
00368 /* This struct is not used in this scanner,
00369    but its presence is necessary. */
00370 struct yy_trans_info
00371            {
00372            flex_int32_t yy_verify;
00373            flex_int32_t yy_nxt;
00374            };
00375 static yyconst flex_int16_t yy_accept[103] =
00376     {   0,
00377         0,    0,   48,   46,    1,   24,   46,   45,   45,   22,
00378        46,   17,   18,   23,   19,   16,   20,   45,   46,   45,
00379        46,   45,   45,   45,   45,   45,   45,   45,   45,   38,
00380        21,   39,    2,    1,    1,    0,   41,    0,    0,    4,
00381        45,   45,    6,   12,    0,   40,    0,    5,   10,    8,
00382        13,   11,    9,   14,   45,   44,   45,    0,    0,   43,
00383         3,    0,    0,   42,   45,   36,   45,   45,   29,   45,
00384        25,   31,   45,   45,   45,    7,    2,    1,   41,   40,
00385        15,   42,   45,   45,   45,   45,   45,   33,   45,   45,
00386        45,   30,   37,   28,   27,   32,   26,   45,   45,   35,
00387 
00388        34,    0
00389     } ;
00390 
00391 static yyconst flex_int32_t yy_ec[256] =
00392     {   0,
00393         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00394         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00395         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00396         1,    4,    1,    5,    6,    7,    7,    8,    9,   10,
00397        11,    7,    7,    1,   12,    7,    7,   13,   13,   13,
00398        13,   13,   13,   13,   13,   13,   13,    7,   14,   15,
00399        16,   17,    1,    7,   18,   18,   18,   18,   18,   18,
00400        18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
00401        18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
00402        19,   20,   21,    7,   18,   22,   23,   18,   24,   25,
00403 
00404        26,   27,   18,   28,   29,   18,   18,   30,   18,   31,
00405        32,   18,   18,   33,   34,   35,   36,   18,   37,   18,
00406        18,   18,   38,   39,   40,    7,    1,    1,    1,    1,
00407         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00408         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00409         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00410         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00411         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00412         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00413         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00414 
00415         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00416         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00417         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00418         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00419         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00420         1,    1,    1,    1,    1
00421     } ;
00422 
00423 static yyconst flex_int32_t yy_meta[41] =
00424     {   0,
00425         1,    1,    1,    1,    1,    2,    2,    1,    1,    1,
00426         1,    2,    2,    1,    2,    3,    2,    2,    4,    2,
00427         1,    1,    2,    2,    2,    2,    2,    2,    2,    2,
00428         2,    2,    2,    2,    2,    2,    2,    2,    2,    2
00429     } ;
00430 
00431 static yyconst flex_int16_t yy_base[111] =
00432     {   0,
00433         0,   38,  220,  221,   41,  221,   39,   59,    0,   38,
00434        38,  221,  221,  205,   57,  221,   40,   76,   29,  187,
00435        31,  166,  156,   22,   55,   59,  159,  155,  157,    0,
00436       145,    0,  221,  115,   93,  115,  221,  116,  180,  221,
00437       136,    0,  221,  221,   57,  221,  113,  221,  221,  170,
00438         0,  221,    0,    0,  153,  221,    0,  103,  106,  108,
00439       221,  110,  129,  221,  147,  149,   42,  156,    0,  145,
00440         0,    0,  151,  141,  146,    0,  221,  159,  151,  122,
00441         0,  144,  148,  146,  140,  128,  129,    0,  117,  114,
00442       104,    0,    0,    0,    0,    0,    0,   68,   59,    0,
00443 
00444         0,  221,  193,  197,   52,  201,  205,  208,  212,  215
00445     } ;
00446 
00447 static yyconst flex_int16_t yy_def[111] =
00448     {   0,
00449       102,    1,  102,  102,  102,  102,  103,  104,  105,  102,
00450       106,  102,  102,  102,  105,  102,  105,  102,  107,  105,
00451       108,   18,   18,   18,   18,   18,   18,   18,   18,  105,
00452       105,  105,  102,  102,  102,  103,  102,  103,  109,  102,
00453       104,  105,  102,  102,  106,  102,  106,  102,  102,  105,
00454       105,  102,  105,  105,  110,  102,   18,  107,  107,  107,
00455       102,  108,  108,  102,   18,   18,   18,   18,   18,   18,
00456        18,   18,   18,   18,   18,  105,  102,  102,  103,  106,
00457       105,  108,   18,   18,   18,   18,   18,   18,   18,   18,
00458        18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
00459 
00460        18,    0,  102,  102,  102,  102,  102,  102,  102,  102
00461     } ;
00462 
00463 static yyconst flex_int16_t yy_nxt[262] =
00464     {   0,
00465         4,    5,    6,    5,    7,    8,    9,   10,   11,   12,
00466        13,    9,    9,   14,   15,   16,   17,   18,   19,   20,
00467         4,   21,   18,   22,   23,   24,   25,   18,   26,   18,
00468        18,   18,   18,   18,   27,   28,   29,   30,   31,   32,
00469        33,   34,   35,   37,   35,   43,   46,   52,   59,   60,
00470        63,   67,   64,   42,   44,   68,   53,   47,   38,   39,
00471        39,   40,   39,   39,   49,   46,   39,   39,   39,   39,
00472        85,   50,   39,   51,   39,   86,   47,   39,   54,   39,
00473        39,   42,   42,   69,  101,   71,   70,   42,   55,   72,
00474        42,   56,   42,   57,   35,   42,   35,  100,   57,   57,
00475 
00476        57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
00477        57,   57,   57,   42,   42,   42,   35,   77,   78,   37,
00478        79,   80,   59,   60,   58,   59,   60,   59,   60,   63,
00479        46,   64,   47,   99,   38,   38,   39,   39,   40,   39,
00480        39,   47,   98,   39,   39,   39,   39,   97,   63,   39,
00481        82,   39,   96,   95,   39,   37,   39,   39,   42,   42,
00482        35,   77,   78,   63,   42,   64,   94,   42,   56,   42,
00483        38,   93,   42,   92,   91,   90,   89,   88,   87,   84,
00484        83,   81,   40,   76,   75,   74,   73,   66,   65,   61,
00485        42,   42,   42,   36,   36,   36,   36,   41,   41,   41,
00486 
00487        41,   45,   45,   45,   45,   58,   58,   58,   62,   62,
00488        62,   62,   39,   39,   39,   39,   55,   55,   48,  102,
00489         3,  102,  102,  102,  102,  102,  102,  102,  102,  102,
00490       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
00491       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
00492       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
00493       102
00494     } ;
00495 
00496 static yyconst flex_int16_t yy_chk[262] =
00497     {   0,
00498         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00499         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00500         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00501         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00502         2,    2,    5,    7,    5,   10,   11,   17,   19,   19,
00503        21,   24,   21,  105,   10,   24,   17,   11,    7,    8,
00504         8,    8,    8,    8,   15,   45,    8,    8,    8,    8,
00505        67,   15,    8,   15,    8,   67,   45,    8,   17,    8,
00506         8,   18,   18,   25,   99,   26,   25,   18,   18,   26,
00507        18,   18,   18,   18,   35,   18,   35,   98,   18,   18,
00508 
00509        18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
00510        18,   18,   18,   18,   18,   18,   34,   34,   34,   36,
00511        38,   47,   58,   58,   59,   59,   59,   60,   60,   62,
00512        80,   62,   47,   91,   36,   38,   41,   41,   41,   41,
00513        41,   80,   90,   41,   41,   41,   41,   89,   63,   41,
00514        63,   41,   87,   86,   41,   79,   41,   41,   55,   55,
00515        78,   78,   78,   82,   55,   82,   85,   55,   55,   55,
00516        79,   84,   55,   83,   75,   74,   73,   70,   68,   66,
00517        65,   50,   39,   31,   29,   28,   27,   23,   22,   20,
00518        55,   55,   55,  103,  103,  103,  103,  104,  104,  104,
00519 
00520       104,  106,  106,  106,  106,  107,  107,  107,  108,  108,
00521       108,  108,  109,  109,  109,  109,  110,  110,   14,    3,
00522       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
00523       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
00524       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
00525       102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
00526       102
00527     } ;
00528 
00529 static yy_state_type yy_last_accepting_state;
00530 static char *yy_last_accepting_cpos;
00531 
00532 extern int yy_flex_debug;
00533 int yy_flex_debug = 0;
00534 
00535 /* The intent behind this definition is that it'll catch
00536  * any uses of REJECT which flex missed.
00537  */
00538 #define REJECT reject_used_but_not_detected
00539 #define yymore() yymore_used_but_not_detected
00540 #define YY_MORE_ADJ 0
00541 #define YY_RESTORE_YY_MORE_OFFSET
00542 char *yytext;
00543 /*
00544  * ***************************************************************************
00545  * MALOC = < Minimal Abstraction Layer for Object-oriented C >
00546  * Copyright (C) 1994--2008 Michael Holst
00547  *
00548  * This library is free software; you can redistribute it and/or
00549  * modify it under the terms of the GNU Lesser General Public
00550  * License as published by the Free Software Foundation; either
00551  * version 2.1 of the License, or (at your option) any later version.
00552  *
00553  * This library is distributed in the hope that it will be useful,
00554  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00555  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00556  * Lesser General Public License for more details.
00557  *
00558  * You should have received a copy of the GNU Lesser General Public
00559  * License along with this library; if not, write to the Free Software
00560  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00561  *
00562  * rcsid="$Id: vlex.l,v 1.7 2008/03/12 05:13:58 fetk Exp $"
00563  * ***************************************************************************
00564  */
00565 /*
00566  * ***************************************************************************
00567  * File:     vlex.l
00568  *
00569  * Purpose:  Class Vsh: LEX Specification
00570  *
00571  * Author:   Michael Holst
00572  * ***************************************************************************
00573  */
00574 
00575 #include "vsh_p.h"
00576 
00577 VEMBED(rcsid="$Id: vlex.l,v 1.7 2008/03/12 05:13:58 fetk Exp $")
00578 
00579 #define YY_NO_UNPUT 1
00580 #undef YY_INPUT
00581 #define YY_INPUT(buf,result,max_size) VSH_INPUT(buf,result,max_size)
00582 
00583 #include "vyacc.h"
00584 
00585 /*
00586  * ***************************************************************************
00587  * Initial states
00588  * ***************************************************************************
00589  */
00590 /*
00591  * ***************************************************************************
00592  * LEX Analyzer rules
00593  * ***************************************************************************
00594  */
00595 
00596 #define INITIAL 0
00597 
00598 #ifndef YY_NO_UNISTD_H
00599 /* Special case for "unistd.h", since it is non-ANSI. We include it way
00600  * down here because we want the user's section 1 to have been scanned first.
00601  * The user has a chance to override it with an option.
00602  */
00603 #include <unistd.h>
00604 #endif
00605 
00606 #ifndef YY_EXTRA_TYPE
00607 #define YY_EXTRA_TYPE void *
00608 #endif
00609 
00610 static int yy_init_globals (void );
00611 
00612 /* Macros after this point can all be overridden by user definitions in
00613  * section 1.
00614  */
00615 
00616 #ifndef YY_SKIP_YYWRAP
00617 #ifdef __cplusplus
00618 extern "C" int yywrap (void );
00619 #else
00620 extern int yywrap (void );
00621 #endif
00622 #endif
00623 
00624     static void yyunput (int c,char *buf_ptr  );
00625     
00626 #ifndef yytext_ptr
00627 static void yy_flex_strncpy (char *,yyconst char *,int );
00628 #endif
00629 
00630 #ifdef YY_NEED_STRLEN
00631 static int yy_flex_strlen (yyconst char * );
00632 #endif
00633 
00634 #ifndef YY_NO_INPUT
00635 
00636 #ifdef __cplusplus
00637 static int yyinput (void );
00638 #else
00639 static int input (void );
00640 #endif
00641 
00642 #endif
00643 
00644 /* Amount of stuff to slurp up with each read. */
00645 #ifndef YY_READ_BUF_SIZE
00646 #define YY_READ_BUF_SIZE 8192
00647 #endif
00648 
00649 /* Copy whatever the last rule matched to the standard output. */
00650 #ifndef ECHO
00651 /* This used to be an fputs(), but since the string might contain NUL's,
00652  * we now use fwrite().
00653  */
00654 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00655 #endif
00656 
00657 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00658  * is returned in "result".
00659  */
00660 #ifndef YY_INPUT
00661 #define YY_INPUT(buf,result,max_size) \
00662            if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
00663                       { \
00664                       int c = '*'; \
00665                       size_t n; \
00666                       for ( n = 0; n < max_size && \
00667                                       (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00668                                  buf[n] = (char) c; \
00669                       if ( c == '\n' ) \
00670                                  buf[n++] = (char) c; \
00671                       if ( c == EOF && ferror( yyin ) ) \
00672                                  YY_FATAL_ERROR( "input in flex scanner failed" ); \
00673                       result = n; \
00674                       } \
00675            else \
00676                       { \
00677                       errno=0; \
00678                       while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
00679                                  { \
00680                                  if( errno != EINTR) \
00681                                             { \
00682                                             YY_FATAL_ERROR( "input in flex scanner failed" ); \
00683                                             break; \
00684                                             } \
00685                                  errno=0; \
00686                                  clearerr(yyin); \
00687                                  } \
00688                       }\
00689 \
00690 
00691 #endif
00692 
00693 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00694  * we don't want an extra ';' after the "return" because that will cause
00695  * some compilers to complain about unreachable statements.
00696  */
00697 #ifndef yyterminate
00698 #define yyterminate() return YY_NULL
00699 #endif
00700 
00701 /* Number of entries by which start-condition stack grows. */
00702 #ifndef YY_START_STACK_INCR
00703 #define YY_START_STACK_INCR 25
00704 #endif
00705 
00706 /* Report a fatal error. */
00707 #ifndef YY_FATAL_ERROR
00708 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00709 #endif
00710 
00711 /* end tables serialization structures and prototypes */
00712 
00713 /* Default declaration of generated scanner - a define so the user can
00714  * easily add parameters.
00715  */
00716 #ifndef YY_DECL
00717 #define YY_DECL_IS_OURS 1
00718 
00719 extern int yylex (void);
00720 
00721 #define YY_DECL int yylex (void)
00722 #endif /* !YY_DECL */
00723 
00724 /* Code executed at the beginning of each rule, after yytext and yyleng
00725  * have been set up.
00726  */
00727 #ifndef YY_USER_ACTION
00728 #define YY_USER_ACTION
00729 #endif
00730 
00731 /* Code executed at the end of each rule. */
00732 #ifndef YY_BREAK
00733 #define YY_BREAK break;
00734 #endif
00735 
00736 #define YY_RULE_SETUP \
00737            if ( yyleng > 0 ) \
00738                       YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
00739                                             (yytext[yyleng - 1] == '\n'); \
00740            YY_USER_ACTION
00741 
00744 YY_DECL
00745 {
00746            register yy_state_type yy_current_state;
00747            register char *yy_cp, *yy_bp;
00748            register int yy_act;
00749     
00750     /*
00751      * ***********************************************************************
00752      * Whitespace
00753      * ***********************************************************************
00754      */
00755 
00756            if ( !(yy_init) )
00757                       {
00758                       (yy_init) = 1;
00759 
00760 #ifdef YY_USER_INIT
00761                       YY_USER_INIT;
00762 #endif
00763 
00764                       if ( ! (yy_start) )
00765                                  (yy_start) = 1;       /* first start state */
00766 
00767                       if ( ! yyin )
00768                                  yyin = stdin;
00769 
00770                       if ( ! yyout )
00771                                  yyout = stdout;
00772 
00773                       if ( ! YY_CURRENT_BUFFER ) {
00774                                  yyensure_buffer_stack ();
00775                                  YY_CURRENT_BUFFER_LVALUE =
00776                                             yy_create_buffer(yyin,YY_BUF_SIZE );
00777                       }
00778 
00779                       yy_load_buffer_state( );
00780                       }
00781 
00782            while ( 1 )                      /* loops until end-of-file is reached */
00783                       {
00784                       yy_cp = (yy_c_buf_p);
00785 
00786                       /* Support of yytext. */
00787                       *yy_cp = (yy_hold_char);
00788 
00789                       /* yy_bp points to the position in yy_ch_buf of the start of
00790                        * the current run.
00791                        */
00792                       yy_bp = yy_cp;
00793 
00794                       yy_current_state = (yy_start);
00795                       yy_current_state += YY_AT_BOL();
00796 yy_match:
00797                       do
00798                                  {
00799                                  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00800                                  if ( yy_accept[yy_current_state] )
00801                                             {
00802                                             (yy_last_accepting_state) = yy_current_state;
00803                                             (yy_last_accepting_cpos) = yy_cp;
00804                                             }
00805                                  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00806                                             {
00807                                             yy_current_state = (int) yy_def[yy_current_state];
00808                                             if ( yy_current_state >= 103 )
00809                                                        yy_c = yy_meta[(unsigned int) yy_c];
00810                                             }
00811                                  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00812                                  ++yy_cp;
00813                                  }
00814                       while ( yy_base[yy_current_state] != 221 );
00815 
00816 yy_find_action:
00817                       yy_act = yy_accept[yy_current_state];
00818                       if ( yy_act == 0 )
00819                                  { /* have to back up */
00820                                  yy_cp = (yy_last_accepting_cpos);
00821                                  yy_current_state = (yy_last_accepting_state);
00822                                  yy_act = yy_accept[yy_current_state];
00823                                  }
00824 
00825                       YY_DO_BEFORE_ACTION;
00826 
00827 do_action: /* This label is used only to access EOF actions. */
00828 
00829                       switch ( yy_act )
00830            { /* beginning of action switch */
00831                                  case 0: /* must back up */
00832                                  /* undo the effects of YY_DO_BEFORE_ACTION */
00833                                  *yy_cp = (yy_hold_char);
00834                                  yy_cp = (yy_last_accepting_cpos);
00835                                  yy_current_state = (yy_last_accepting_state);
00836                                  goto yy_find_action;
00837 
00838 case 1:
00839 YY_RULE_SETUP
00840 { /* no-op: ignore white space between tokens */ }
00841            YY_BREAK
00842 case 2:
00843 /* rule 2 can match eol */
00844 YY_RULE_SETUP
00845 { Vsh_trace("Lex","line of zero or more blanks with a newline"); }
00846            YY_BREAK
00847 case 3:
00848 /* rule 3 can match eol */
00849 YY_RULE_SETUP
00850 { Vsh_trace("Lex","an escaped newline"); }
00851            YY_BREAK
00852 /*
00853      * ***********************************************************************
00854      * Comments
00855      * ***********************************************************************
00856      */
00857 /* ignore shell-style "to-end-of-line" comments (OReilly, page 31) */
00858 case 4:
00859 /* rule 4 can match eol */
00860 YY_RULE_SETUP
00861 { Vsh_trace("Lex","single-line ``#'' comment"); }
00862            YY_BREAK
00863 /*
00864      * ***********************************************************************
00865      * Legal 2-character symbol tokens (must encode them...)
00866      * ***********************************************************************
00867      */
00868 case 5:
00869 YY_RULE_SETUP
00870 {
00871     Vsh_trace("Lex",yytext);
00872     return SEMI_SEMI;
00873 }
00874            YY_BREAK
00875 case 6:
00876 YY_RULE_SETUP
00877 {
00878     Vsh_trace("Lex",yytext);
00879     return AND_AND;
00880 }
00881            YY_BREAK
00882 case 7:
00883 YY_RULE_SETUP
00884 {
00885     Vsh_trace("Lex",yytext);
00886     return OR_OR;
00887 }
00888            YY_BREAK
00889 case 8:
00890 YY_RULE_SETUP
00891 {
00892     Vsh_trace("Lex",yytext);
00893     return LESS_LESS;
00894 }
00895            YY_BREAK
00896 case 9:
00897 YY_RULE_SETUP
00898 {
00899     Vsh_trace("Lex",yytext);
00900     return GREATER_GREATER;
00901 }
00902            YY_BREAK
00903 case 10:
00904 YY_RULE_SETUP
00905 {
00906     Vsh_trace("Lex",yytext);
00907     return LESS_AND;
00908 }
00909            YY_BREAK
00910 case 11:
00911 YY_RULE_SETUP
00912 {
00913     Vsh_trace("Lex",yytext);
00914     return GREATER_AND;
00915 }
00916            YY_BREAK
00917 case 12:
00918 YY_RULE_SETUP
00919 {
00920     Vsh_trace("Lex",yytext);
00921     return AND_GREATER;
00922 }
00923            YY_BREAK
00924 case 13:
00925 YY_RULE_SETUP
00926 {
00927     Vsh_trace("Lex",yytext);
00928     return LESS_GREATER;
00929 }
00930            YY_BREAK
00931 case 14:
00932 YY_RULE_SETUP
00933 {
00934     Vsh_trace("Lex",yytext);
00935     return GREATER_BAR;
00936 }
00937            YY_BREAK
00938 /*
00939      * ***********************************************************************
00940      * Legal 3-character symbol tokens (must encode them...)
00941      * ***********************************************************************
00942      */
00943 case 15:
00944 YY_RULE_SETUP
00945 {
00946     Vsh_trace("Lex",yytext);
00947     return LESS_LESS_MINUS;
00948 }
00949            YY_BREAK
00950 /*
00951      * ***********************************************************************
00952      * Legal 1-character symbol tokens (just forward them to the parser...)
00953      * ***********************************************************************
00954      */
00955 case 16:
00956 case 17:
00957 case 18:
00958 case 19:
00959 case 20:
00960 case 21:
00961 case 22:
00962 case 23:
00963 case 24:
00964 /* rule 24 can match eol */
00965 YY_RULE_SETUP
00966 {
00967     Vsh_trace("Lex",yytext);
00968     return yytext[0];
00969 }
00970            YY_BREAK
00971 /*
00972      * ***********************************************************************
00973      * Reserved words
00974      * ***********************************************************************
00975      */
00976 case 25:
00977 YY_RULE_SETUP
00978 {
00979     Vsh_trace("Lex","IF");
00980     return IF;
00981 }
00982            YY_BREAK
00983 case 26:
00984 YY_RULE_SETUP
00985 {
00986     Vsh_trace("Lex","THEN");
00987     return THEN;
00988 }
00989            YY_BREAK
00990 case 27:
00991 YY_RULE_SETUP
00992 {
00993     Vsh_trace("Lex","ELSE");
00994     return ELSE;
00995 }
00996            YY_BREAK
00997 case 28:
00998 YY_RULE_SETUP
00999 {
01000     Vsh_trace("Lex","ELIF");
01001     return ELIF;
01002 }
01003            YY_BREAK
01004 case 29:
01005 YY_RULE_SETUP
01006 {
01007     Vsh_trace("Lex","FI");
01008     return FI;
01009 }
01010            YY_BREAK
01011 case 30:
01012 YY_RULE_SETUP
01013 {
01014     Vsh_trace("Lex","CASE");
01015     return CASE;
01016 }
01017            YY_BREAK
01018 case 31:
01019 YY_RULE_SETUP
01020 {
01021     Vsh_trace("Lex","IN");
01022     return IN;
01023 }
01024            YY_BREAK
01025 case 32:
01026 YY_RULE_SETUP
01027 {
01028     Vsh_trace("Lex","ESAC");
01029     return ESAC;
01030 }
01031            YY_BREAK
01032 case 33:
01033 YY_RULE_SETUP
01034 {
01035     Vsh_trace("Lex","FOR");
01036     return FOR;
01037 }
01038            YY_BREAK
01039 case 34:
01040 YY_RULE_SETUP
01041 {
01042     Vsh_trace("Lex","WHILE");
01043     return WHILE;
01044 }
01045            YY_BREAK
01046 case 35:
01047 YY_RULE_SETUP
01048 {
01049     Vsh_trace("Lex","UNTIL");
01050     return UNTIL;
01051 }
01052            YY_BREAK
01053 case 36:
01054 YY_RULE_SETUP
01055 {
01056     Vsh_trace("Lex","DO");
01057     return DO;
01058 }
01059            YY_BREAK
01060 case 37:
01061 YY_RULE_SETUP
01062 {
01063     Vsh_trace("Lex","DONE");
01064     return DONE;
01065 }
01066            YY_BREAK
01067 case 38:
01068 YY_RULE_SETUP
01069 {
01070     Vsh_trace("Lex",yytext);
01071     return yytext[0];
01072 }
01073            YY_BREAK
01074 case 39:
01075 YY_RULE_SETUP
01076 {
01077     Vsh_trace("Lex",yytext);
01078     return yytext[0];
01079 }
01080            YY_BREAK
01081 /*
01082      * ***********************************************************************
01083      * Tokens
01084      * ***********************************************************************
01085      */
01086 case 40:
01087 /* rule 40 can match eol */
01088 YY_RULE_SETUP
01089 {
01090     Vsh_trace("Lex","WORD-SSTRING");
01091     yylval.word = (WORD_DESC*)malloc(sizeof(WORD_DESC));
01092     yylval.word->word = (char*)malloc(1024*sizeof(char));
01093     strcpy(yylval.word->word,yytext);
01094     yylval.word->dollar_present = 0;
01095     yylval.word->quoted         = 1;
01096     yylval.word->assignment     = 0;
01097     return WORD;
01098 }
01099            YY_BREAK
01100 case 41:
01101 /* rule 41 can match eol */
01102 YY_RULE_SETUP
01103 {
01104     Vsh_trace("Lex","WORD-DSTRING");
01105     yylval.word = (WORD_DESC*)malloc(sizeof(WORD_DESC));
01106     yylval.word->word = (char*)malloc(1024*sizeof(char));
01107     strcpy(yylval.word->word,yytext);
01108     yylval.word->dollar_present = 0;
01109     yylval.word->quoted         = 1;
01110     yylval.word->assignment     = 0;
01111     return WORD;
01112 }
01113            YY_BREAK
01114 case 42:
01115 /* rule 42 can match eol */
01116 YY_RULE_SETUP
01117 {
01118     Vsh_trace("Lex","WORD-EXEC");
01119     yylval.word = (WORD_DESC*)malloc(sizeof(WORD_DESC));
01120     yylval.word->word = (char*)malloc(1024*sizeof(char));
01121     strcpy(yylval.word->word,yytext);
01122     yylval.word->dollar_present = 0;
01123     yylval.word->quoted         = 1;
01124     yylval.word->assignment     = 0;
01125     return WORD;
01126 }
01127            YY_BREAK
01128 case 43:
01129 /* rule 43 can match eol */
01130 YY_RULE_SETUP
01131 {
01132     Vsh_trace("Lex","WORD-CONDITION");
01133     yylval.word = (WORD_DESC*)malloc(sizeof(WORD_DESC));
01134     yylval.word->word = (char*)malloc(1024*sizeof(char));
01135     strcpy(yylval.word->word,yytext);
01136     yylval.word->dollar_present = 0;
01137     yylval.word->quoted         = 0;
01138     yylval.word->assignment     = 0;
01139     return WORD;
01140 }
01141            YY_BREAK
01142 case 44:
01143 YY_RULE_SETUP
01144 {
01145     /* struct symtab *sp = symlook(yytext); */
01146     /* yylval.symp = sp; */
01147     Vsh_trace("Lex","WORD-ASSIGN");
01148     yylval.word = (WORD_DESC*)malloc(sizeof(WORD_DESC));
01149     yylval.word->word = (char*)malloc(1024*sizeof(char));
01150     strcpy(yylval.word->word,yytext);
01151     VASSERT( yylval.word->word[strlen(yylval.word->word)-1] == '=' );
01152     yylval.word->word[strlen(yylval.word->word)-1] = '\0';
01153     yylval.word->dollar_present = 0;
01154     yylval.word->quoted         = 0;
01155     yylval.word->assignment     = 1;
01156     return ASSIGNMENT_WORD;
01157 }
01158            YY_BREAK
01159 case 45:
01160 YY_RULE_SETUP
01161 {
01162     /* struct symtab *sp = symlook(yytext); */
01163     /* yylval.symp = sp; */
01164     Vsh_trace("Lex","WORD");
01165     yylval.word = (WORD_DESC*)malloc(sizeof(WORD_DESC));
01166     yylval.word->word = (char*)malloc(1024*sizeof(char));
01167     strcpy(yylval.word->word,yytext);
01168     yylval.word->dollar_present = 0;
01169     yylval.word->quoted         = 0;
01170     yylval.word->assignment     = 0;
01171     return WORD;
01172 }
01173            YY_BREAK
01174 case YY_STATE_EOF(INITIAL):
01175 {
01176     Vsh_trace("Lex","vsh_EOF");
01177     return vsh_EOF;
01178 }
01179            YY_BREAK
01180 /*
01181      * ***********************************************************************
01182      * Catchall (error exit)
01183      * ***********************************************************************
01184      */
01185 case 46:
01186 YY_RULE_SETUP
01187 {
01188     yyerror("bad token");
01189 }
01190            YY_BREAK
01191 case 47:
01192 YY_RULE_SETUP
01193 ECHO;
01194            YY_BREAK
01195 
01196            case YY_END_OF_BUFFER:
01197                       {
01198                       /* Amount of text matched not including the EOB char. */
01199                       int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
01200 
01201                       /* Undo the effects of YY_DO_BEFORE_ACTION. */
01202                       *yy_cp = (yy_hold_char);
01203                       YY_RESTORE_YY_MORE_OFFSET
01204 
01205                       if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
01206                                  {
01207                                  /* We're scanning a new file or input source.  It's
01208                                   * possible that this happened because the user
01209                                   * just pointed yyin at a new source and called
01210                                   * yylex().  If so, then we have to assure
01211                                   * consistency between YY_CURRENT_BUFFER and our
01212                                   * globals.  Here is the right place to do so, because
01213                                   * this is the first action (other than possibly a
01214                                   * back-up) that will match for the new input source.
01215                                   */
01216                                  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01217                                  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
01218                                  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
01219                                  }
01220 
01221                       /* Note that here we test for yy_c_buf_p "<=" to the position
01222                        * of the first EOB in the buffer, since yy_c_buf_p will
01223                        * already have been incremented past the NUL character
01224                        * (since all states make transitions on EOB to the
01225                        * end-of-buffer state).  Contrast this with the test
01226                        * in input().
01227                        */
01228                       if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
01229                                  { /* This was really a NUL. */
01230                                  yy_state_type yy_next_state;
01231 
01232                                  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
01233 
01234                                  yy_current_state = yy_get_previous_state(  );
01235 
01236                                  /* Okay, we're now positioned to make the NUL
01237                                   * transition.  We couldn't have
01238                                   * yy_get_previous_state() go ahead and do it
01239                                   * for us because it doesn't know how to deal
01240                                   * with the possibility of jamming (and we don't
01241                                   * want to build jamming into it because then it
01242                                   * will run more slowly).
01243                                   */
01244 
01245                                  yy_next_state = yy_try_NUL_trans( yy_current_state );
01246 
01247                                  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01248 
01249                                  if ( yy_next_state )
01250                                             {
01251                                             /* Consume the NUL. */
01252                                             yy_cp = ++(yy_c_buf_p);
01253                                             yy_current_state = yy_next_state;
01254                                             goto yy_match;
01255                                             }
01256 
01257                                  else
01258                                             {
01259                                             yy_cp = (yy_c_buf_p);
01260                                             goto yy_find_action;
01261                                             }
01262                                  }
01263 
01264                       else switch ( yy_get_next_buffer(  ) )
01265                                  {
01266                                  case EOB_ACT_END_OF_FILE:
01267                                             {
01268                                             (yy_did_buffer_switch_on_eof) = 0;
01269 
01270                                             if ( yywrap( ) )
01271                                                        {
01272                                                        /* Note: because we've taken care in
01273                                                         * yy_get_next_buffer() to have set up
01274                                                         * yytext, we can now set up
01275                                                         * yy_c_buf_p so that if some total
01276                                                         * hoser (like flex itself) wants to
01277                                                         * call the scanner after we return the
01278                                                         * YY_NULL, it'll still work - another
01279                                                         * YY_NULL will get returned.
01280                                                         */
01281                                                        (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
01282 
01283                                                        yy_act = YY_STATE_EOF(YY_START);
01284                                                        goto do_action;
01285                                                        }
01286 
01287                                             else
01288                                                        {
01289                                                        if ( ! (yy_did_buffer_switch_on_eof) )
01290                                                                   YY_NEW_FILE;
01291                                                        }
01292                                             break;
01293                                             }
01294 
01295                                  case EOB_ACT_CONTINUE_SCAN:
01296                                             (yy_c_buf_p) =
01297                                                        (yytext_ptr) + yy_amount_of_matched_text;
01298 
01299                                             yy_current_state = yy_get_previous_state(  );
01300 
01301                                             yy_cp = (yy_c_buf_p);
01302                                             yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01303                                             goto yy_match;
01304 
01305                                  case EOB_ACT_LAST_MATCH:
01306                                             (yy_c_buf_p) =
01307                                             &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
01308 
01309                                             yy_current_state = yy_get_previous_state(  );
01310 
01311                                             yy_cp = (yy_c_buf_p);
01312                                             yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01313                                             goto yy_find_action;
01314                                  }
01315                       break;
01316                       }
01317 
01318            default:
01319                       YY_FATAL_ERROR(
01320                                  "fatal flex scanner internal error--no action found" );
01321            } /* end of action switch */
01322                       } /* end of scanning one token */
01323 } /* end of yylex */
01324 
01325 /* yy_get_next_buffer - try to read in a new buffer
01326  *
01327  * Returns a code representing an action:
01328  *         EOB_ACT_LAST_MATCH -
01329  *         EOB_ACT_CONTINUE_SCAN - continue scanning from current position
01330  *         EOB_ACT_END_OF_FILE - end of file
01331  */
01332 static int yy_get_next_buffer (void)
01333 {
01334            register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
01335            register char *source = (yytext_ptr);
01336            register int number_to_move, i;
01337            int ret_val;
01338 
01339            if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
01340                       YY_FATAL_ERROR(
01341                       "fatal flex scanner internal error--end of buffer missed" );
01342 
01343            if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
01344                       { /* Don't try to fill the buffer, so this is an EOF. */
01345                       if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
01346                                  {
01347                                  /* We matched a single character, the EOB, so
01348                                   * treat this as a final EOF.
01349                                   */
01350                                  return EOB_ACT_END_OF_FILE;
01351                                  }
01352 
01353                       else
01354                                  {
01355                                  /* We matched some text prior to the EOB, first
01356                                   * process it.
01357                                   */
01358                                  return EOB_ACT_LAST_MATCH;
01359                                  }
01360                       }
01361 
01362            /* Try to read more data. */
01363 
01364            /* First move last chars to start of buffer. */
01365            number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
01366 
01367            for ( i = 0; i < number_to_move; ++i )
01368                       *(dest++) = *(source++);
01369 
01370            if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01371                       /* don't do the read, it's not guaranteed to return an EOF,
01372                        * just force an EOF
01373                        */
01374                       YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
01375 
01376            else
01377                       {
01378                                  int num_to_read =
01379                                  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
01380 
01381                       while ( num_to_read <= 0 )
01382                                  { /* Not enough room in the buffer - grow it. */
01383 
01384                                  /* just a shorter name for the current buffer */
01385                                  YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
01386 
01387                                  int yy_c_buf_p_offset =
01388                                             (int) ((yy_c_buf_p) - b->yy_ch_buf);
01389 
01390                                  if ( b->yy_is_our_buffer )
01391                                             {
01392                                             int new_size = b->yy_buf_size * 2;
01393 
01394                                             if ( new_size <= 0 )
01395                                                        b->yy_buf_size += b->yy_buf_size / 8;
01396                                             else
01397                                                        b->yy_buf_size *= 2;
01398 
01399                                             b->yy_ch_buf = (char *)
01400                                                        /* Include room in for 2 EOB chars. */
01401                                                        yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
01402                                             }
01403                                  else
01404                                             /* Can't grow it, we don't own it. */
01405                                             b->yy_ch_buf = 0;
01406 
01407                                  if ( ! b->yy_ch_buf )
01408                                             YY_FATAL_ERROR(
01409                                             "fatal error - scanner input buffer overflow" );
01410 
01411                                  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
01412 
01413                                  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
01414                                                                   number_to_move - 1;
01415 
01416                                  }
01417 
01418                       if ( num_to_read > YY_READ_BUF_SIZE )
01419                                  num_to_read = YY_READ_BUF_SIZE;
01420 
01421                       /* Read in more data. */
01422                       YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
01423                                  (yy_n_chars), num_to_read );
01424 
01425                       YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01426                       }
01427 
01428            if ( (yy_n_chars) == 0 )
01429                       {
01430                       if ( number_to_move == YY_MORE_ADJ )
01431                                  {
01432                                  ret_val = EOB_ACT_END_OF_FILE;
01433                                  yyrestart(yyin  );
01434                                  }
01435 
01436                       else
01437                                  {
01438                                  ret_val = EOB_ACT_LAST_MATCH;
01439                                  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
01440                                             YY_BUFFER_EOF_PENDING;
01441                                  }
01442                       }
01443 
01444            else
01445                       ret_val = EOB_ACT_CONTINUE_SCAN;
01446 
01447            (yy_n_chars) += number_to_move;
01448            YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
01449            YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
01450 
01451            (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
01452 
01453            return ret_val;
01454 }
01455 
01456 /* yy_get_previous_state - get the state just before the EOB char was reached */
01457 
01458     static yy_state_type yy_get_previous_state (void)
01459 {
01460            register yy_state_type yy_current_state;
01461            register char *yy_cp;
01462     
01463            yy_current_state = (yy_start);
01464            yy_current_state += YY_AT_BOL();
01465 
01466            for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
01467                       {
01468                       register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01469                       if ( yy_accept[yy_current_state] )
01470                                  {
01471                                  (yy_last_accepting_state) = yy_current_state;
01472                                  (yy_last_accepting_cpos) = yy_cp;
01473                                  }
01474                       while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01475                                  {
01476                                  yy_current_state = (int) yy_def[yy_current_state];
01477                                  if ( yy_current_state >= 103 )
01478                                             yy_c = yy_meta[(unsigned int) yy_c];
01479                                  }
01480                       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01481                       }
01482 
01483            return yy_current_state;
01484 }
01485 
01486 /* yy_try_NUL_trans - try to make a transition on the NUL character
01487  *
01488  * synopsis
01489  *         next_state = yy_try_NUL_trans( current_state );
01490  */
01491     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
01492 {
01493            register int yy_is_jam;
01494            register char *yy_cp = (yy_c_buf_p);
01495 
01496            register YY_CHAR yy_c = 1;
01497            if ( yy_accept[yy_current_state] )
01498                       {
01499                       (yy_last_accepting_state) = yy_current_state;
01500                       (yy_last_accepting_cpos) = yy_cp;
01501                       }
01502            while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01503                       {
01504                       yy_current_state = (int) yy_def[yy_current_state];
01505                       if ( yy_current_state >= 103 )
01506                                  yy_c = yy_meta[(unsigned int) yy_c];
01507                       }
01508            yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01509            yy_is_jam = (yy_current_state == 102);
01510 
01511            return yy_is_jam ? 0 : yy_current_state;
01512 }
01513 
01514     static void yyunput (int c, register char * yy_bp )
01515 {
01516            register char *yy_cp;
01517     
01518     yy_cp = (yy_c_buf_p);
01519 
01520            /* undo effects of setting up yytext */
01521            *yy_cp = (yy_hold_char);
01522 
01523            if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01524                       { /* need to shift things up to make room */
01525                       /* +2 for EOB chars. */
01526                       register int number_to_move = (yy_n_chars) + 2;
01527                       register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
01528                                                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
01529                       register char *source =
01530                                             &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
01531 
01532                       while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
01533                                  *--dest = *--source;
01534 
01535                       yy_cp += (int) (dest - source);
01536                       yy_bp += (int) (dest - source);
01537                       YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
01538                                  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
01539 
01540                       if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01541                                  YY_FATAL_ERROR( "flex scanner push-back overflow" );
01542                       }
01543 
01544            *--yy_cp = (char) c;
01545 
01546            (yytext_ptr) = yy_bp;
01547            (yy_hold_char) = *yy_cp;
01548            (yy_c_buf_p) = yy_cp;
01549 }
01550 
01551 #ifndef YY_NO_INPUT
01552 #ifdef __cplusplus
01553     static int yyinput (void)
01554 #else
01555     static int input  (void)
01556 #endif
01557 
01558 {
01559            int c;
01560     
01561            *(yy_c_buf_p) = (yy_hold_char);
01562 
01563            if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
01564                       {
01565                       /* yy_c_buf_p now points to the character we want to return.
01566                        * If this occurs *before* the EOB characters, then it's a
01567                        * valid NUL; if not, then we've hit the end of the buffer.
01568                        */
01569                       if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
01570                                  /* This was really a NUL. */
01571                                  *(yy_c_buf_p) = '\0';
01572 
01573                       else
01574                                  { /* need more input */
01575                                  int offset = (yy_c_buf_p) - (yytext_ptr);
01576                                  ++(yy_c_buf_p);
01577 
01578                                  switch ( yy_get_next_buffer(  ) )
01579                                             {
01580                                             case EOB_ACT_LAST_MATCH:
01581                                                        /* This happens because yy_g_n_b()
01582                                                         * sees that we've accumulated a
01583                                                         * token and flags that we need to
01584                                                         * try matching the token before
01585                                                         * proceeding.  But for input(),
01586                                                         * there's no matching to consider.
01587                                                         * So convert the EOB_ACT_LAST_MATCH
01588                                                         * to EOB_ACT_END_OF_FILE.
01589                                                         */
01590 
01591                                                        /* Reset buffer status. */
01592                                                        yyrestart(yyin );
01593 
01594                                                        /*FALLTHROUGH*/
01595 
01596                                             case EOB_ACT_END_OF_FILE:
01597                                                        {
01598                                                        if ( yywrap( ) )
01599                                                                   return 0;
01600 
01601                                                        if ( ! (yy_did_buffer_switch_on_eof) )
01602                                                                   YY_NEW_FILE;
01603 #ifdef __cplusplus
01604                                                        return yyinput();
01605 #else
01606                                                        return input();
01607 #endif
01608                                                        }
01609 
01610                                             case EOB_ACT_CONTINUE_SCAN:
01611                                                        (yy_c_buf_p) = (yytext_ptr) + offset;
01612                                                        break;
01613                                             }
01614                                  }
01615                       }
01616 
01617            c = *(unsigned char *) (yy_c_buf_p);        /* cast for 8-bit char's */
01618            *(yy_c_buf_p) = '\0'; /* preserve yytext */
01619            (yy_hold_char) = *++(yy_c_buf_p);
01620 
01621            YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
01622 
01623            return c;
01624 }
01625 #endif     /* ifndef YY_NO_INPUT */
01626 
01632     void yyrestart  (FILE * input_file )
01633 {
01634     
01635            if ( ! YY_CURRENT_BUFFER ){
01636         yyensure_buffer_stack ();
01637                       YY_CURRENT_BUFFER_LVALUE =
01638             yy_create_buffer(yyin,YY_BUF_SIZE );
01639            }
01640 
01641            yy_init_buffer(YY_CURRENT_BUFFER,input_file );
01642            yy_load_buffer_state( );
01643 }
01644 
01649     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
01650 {
01651     
01652            /* TODO. We should be able to replace this entire function body
01653             * with
01654             *                    yypop_buffer_state();
01655             *                    yypush_buffer_state(new_buffer);
01656      */
01657            yyensure_buffer_stack ();
01658            if ( YY_CURRENT_BUFFER == new_buffer )
01659                       return;
01660 
01661            if ( YY_CURRENT_BUFFER )
01662                       {
01663                       /* Flush out information for old buffer. */
01664                       *(yy_c_buf_p) = (yy_hold_char);
01665                       YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01666                       YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01667                       }
01668 
01669            YY_CURRENT_BUFFER_LVALUE = new_buffer;
01670            yy_load_buffer_state( );
01671 
01672            /* We don't actually know whether we did this switch during
01673             * EOF (yywrap()) processing, but the only time this flag
01674             * is looked at is after yywrap() is called, so it's safe
01675             * to go ahead and always set it.
01676             */
01677            (yy_did_buffer_switch_on_eof) = 1;
01678 }
01679 
01680 static void yy_load_buffer_state  (void)
01681 {
01682            (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01683            (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
01684            yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
01685            (yy_hold_char) = *(yy_c_buf_p);
01686 }
01687 
01694     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
01695 {
01696            YY_BUFFER_STATE b;
01697     
01698            b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
01699            if ( ! b )
01700                       YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01701 
01702            b->yy_buf_size = size;
01703 
01704            /* yy_ch_buf has to be 2 characters longer than the size given because
01705             * we need to put in 2 end-of-buffer characters.
01706             */
01707            b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
01708            if ( ! b->yy_ch_buf )
01709                       YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01710 
01711            b->yy_is_our_buffer = 1;
01712 
01713            yy_init_buffer(b,file );
01714 
01715            return b;
01716 }
01717 
01722     void yy_delete_buffer (YY_BUFFER_STATE  b )
01723 {
01724     
01725            if ( ! b )
01726                       return;
01727 
01728            if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
01729                       YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
01730 
01731            if ( b->yy_is_our_buffer )
01732                       yyfree((void *) b->yy_ch_buf  );
01733 
01734            yyfree((void *) b  );
01735 }
01736 
01737 #ifndef __cplusplus
01738 extern int isatty (int );
01739 #endif /* __cplusplus */
01740     
01741 /* Initializes or reinitializes a buffer.
01742  * This function is sometimes called more than once on the same buffer,
01743  * such as during a yyrestart() or at EOF.
01744  */
01745     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
01746 
01747 {
01748            int oerrno = errno;
01749     
01750            yy_flush_buffer(b );
01751 
01752            b->yy_input_file = file;
01753            b->yy_fill_buffer = 1;
01754 
01755     /* If b is the current buffer, then yy_init_buffer was _probably_
01756      * called from yyrestart() or through yy_get_next_buffer.
01757      * In that case, we don't want to reset the lineno or column.
01758      */
01759     if (b != YY_CURRENT_BUFFER){
01760         b->yy_bs_lineno = 1;
01761         b->yy_bs_column = 0;
01762     }
01763 
01764         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01765     
01766            errno = oerrno;
01767 }
01768 
01773     void yy_flush_buffer (YY_BUFFER_STATE  b )
01774 {
01775            if ( ! b )
01776                       return;
01777 
01778            b->yy_n_chars = 0;
01779 
01780            /* We always need two end-of-buffer characters.  The first causes
01781             * a transition to the end-of-buffer state.  The second causes
01782             * a jam in that state.
01783             */
01784            b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01785            b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01786 
01787            b->yy_buf_pos = &b->yy_ch_buf[0];
01788 
01789            b->yy_at_bol = 1;
01790            b->yy_buffer_status = YY_BUFFER_NEW;
01791 
01792            if ( b == YY_CURRENT_BUFFER )
01793                       yy_load_buffer_state( );
01794 }
01795 
01802 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
01803 {
01804            if (new_buffer == NULL)
01805                       return;
01806 
01807            yyensure_buffer_stack();
01808 
01809            /* This block is copied from yy_switch_to_buffer. */
01810            if ( YY_CURRENT_BUFFER )
01811                       {
01812                       /* Flush out information for old buffer. */
01813                       *(yy_c_buf_p) = (yy_hold_char);
01814                       YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01815                       YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01816                       }
01817 
01818            /* Only push if top exists. Otherwise, replace top. */
01819            if (YY_CURRENT_BUFFER)
01820                       (yy_buffer_stack_top)++;
01821            YY_CURRENT_BUFFER_LVALUE = new_buffer;
01822 
01823            /* copied from yy_switch_to_buffer. */
01824            yy_load_buffer_state( );
01825            (yy_did_buffer_switch_on_eof) = 1;
01826 }
01827 
01832 void yypop_buffer_state (void)
01833 {
01834            if (!YY_CURRENT_BUFFER)
01835                       return;
01836 
01837            yy_delete_buffer(YY_CURRENT_BUFFER );
01838            YY_CURRENT_BUFFER_LVALUE = NULL;
01839            if ((yy_buffer_stack_top) > 0)
01840                       --(yy_buffer_stack_top);
01841 
01842            if (YY_CURRENT_BUFFER) {
01843                       yy_load_buffer_state( );
01844                       (yy_did_buffer_switch_on_eof) = 1;
01845            }
01846 }
01847 
01848 /* Allocates the stack if it does not exist.
01849  *  Guarantees space for at least one push.
01850  */
01851 static void yyensure_buffer_stack (void)
01852 {
01853            int num_to_alloc;
01854     
01855            if (!(yy_buffer_stack)) {
01856 
01857                       /* First allocation is just for 2 elements, since we don't know if this
01858                        * scanner will even need a stack. We use 2 instead of 1 to avoid an
01859                        * immediate realloc on the next call.
01860          */
01861                       num_to_alloc = 1;
01862                       (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
01863                                                                                         (num_to_alloc * sizeof(struct yy_buffer_state*)
01864                                                                                         );
01865                       
01866                       memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
01867                                             
01868                       (yy_buffer_stack_max) = num_to_alloc;
01869                       (yy_buffer_stack_top) = 0;
01870                       return;
01871            }
01872 
01873            if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
01874 
01875                       /* Increase the buffer to prepare for a possible push. */
01876                       int grow_size = 8 /* arbitrary grow size */;
01877 
01878                       num_to_alloc = (yy_buffer_stack_max) + grow_size;
01879                       (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
01880                                                                                         ((yy_buffer_stack),
01881                                                                                         num_to_alloc * sizeof(struct yy_buffer_state*)
01882                                                                                         );
01883 
01884                       /* zero only the new slots.*/
01885                       memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
01886                       (yy_buffer_stack_max) = num_to_alloc;
01887            }
01888 }
01889 
01896 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
01897 {
01898            YY_BUFFER_STATE b;
01899     
01900            if ( size < 2 ||
01901                 base[size-2] != YY_END_OF_BUFFER_CHAR ||
01902                 base[size-1] != YY_END_OF_BUFFER_CHAR )
01903                       /* They forgot to leave room for the EOB's. */
01904                       return 0;
01905 
01906            b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
01907            if ( ! b )
01908                       YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01909 
01910            b->yy_buf_size = size - 2;       /* "- 2" to take care of EOB's */
01911            b->yy_buf_pos = b->yy_ch_buf = base;
01912            b->yy_is_our_buffer = 0;
01913            b->yy_input_file = 0;
01914            b->yy_n_chars = b->yy_buf_size;
01915            b->yy_is_interactive = 0;
01916            b->yy_at_bol = 1;
01917            b->yy_fill_buffer = 0;
01918            b->yy_buffer_status = YY_BUFFER_NEW;
01919 
01920            yy_switch_to_buffer(b  );
01921 
01922            return b;
01923 }
01924 
01933 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
01934 {
01935     
01936            return yy_scan_bytes(yystr,strlen(yystr) );
01937 }
01938 
01946 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
01947 {
01948            YY_BUFFER_STATE b;
01949            char *buf;
01950            yy_size_t n;
01951            int i;
01952     
01953            /* Get memory for full buffer, including space for trailing EOB's. */
01954            n = _yybytes_len + 2;
01955            buf = (char *) yyalloc(n  );
01956            if ( ! buf )
01957                       YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01958 
01959            for ( i = 0; i < _yybytes_len; ++i )
01960                       buf[i] = yybytes[i];
01961 
01962            buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
01963 
01964            b = yy_scan_buffer(buf,n );
01965            if ( ! b )
01966                       YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01967 
01968            /* It's okay to grow etc. this buffer, and we should throw it
01969             * away when we're done.
01970             */
01971            b->yy_is_our_buffer = 1;
01972 
01973            return b;
01974 }
01975 
01976 #ifndef YY_EXIT_FAILURE
01977 #define YY_EXIT_FAILURE 2
01978 #endif
01979 
01980 static void yy_fatal_error (yyconst char* msg )
01981 {
01982            (void) fprintf( stderr, "%s\n", msg );
01983            exit( YY_EXIT_FAILURE );
01984 }
01985 
01986 /* Redefine yyless() so it works in section 3 code. */
01987 
01988 #undef yyless
01989 #define yyless(n) \
01990            do \
01991                       { \
01992                       /* Undo effects of setting up yytext. */ \
01993         int yyless_macro_arg = (n); \
01994         YY_LESS_LINENO(yyless_macro_arg);\
01995                       yytext[yyleng] = (yy_hold_char); \
01996                       (yy_c_buf_p) = yytext + yyless_macro_arg; \
01997                       (yy_hold_char) = *(yy_c_buf_p); \
01998                       *(yy_c_buf_p) = '\0'; \
01999                       yyleng = yyless_macro_arg; \
02000                       } \
02001            while ( 0 )
02002 
02003 /* Accessor  methods (get/set functions) to struct members. */
02004 
02008 int yyget_lineno  (void)
02009 {
02010         
02011     return yylineno;
02012 }
02013 
02017 FILE *yyget_in  (void)
02018 {
02019         return yyin;
02020 }
02021 
02025 FILE *yyget_out  (void)
02026 {
02027         return yyout;
02028 }
02029 
02033 int yyget_leng  (void)
02034 {
02035         return yyleng;
02036 }
02037 
02042 char *yyget_text  (void)
02043 {
02044         return yytext;
02045 }
02046 
02051 void yyset_lineno (int  line_number )
02052 {
02053     
02054     yylineno = line_number;
02055 }
02056 
02063 void yyset_in (FILE *  in_str )
02064 {
02065         yyin = in_str ;
02066 }
02067 
02068 void yyset_out (FILE *  out_str )
02069 {
02070         yyout = out_str ;
02071 }
02072 
02073 int yyget_debug  (void)
02074 {
02075         return yy_flex_debug;
02076 }
02077 
02078 void yyset_debug (int  bdebug )
02079 {
02080         yy_flex_debug = bdebug ;
02081 }
02082 
02083 static int yy_init_globals (void)
02084 {
02085         /* Initialization is the same as for the non-reentrant scanner.
02086      * This function is called from yylex_destroy(), so don't allocate here.
02087      */
02088 
02089     (yy_buffer_stack) = 0;
02090     (yy_buffer_stack_top) = 0;
02091     (yy_buffer_stack_max) = 0;
02092     (yy_c_buf_p) = (char *) 0;
02093     (yy_init) = 0;
02094     (yy_start) = 0;
02095 
02096 /* Defined in main.c */
02097 #ifdef YY_STDINIT
02098     yyin = stdin;
02099     yyout = stdout;
02100 #else
02101     yyin = (FILE *) 0;
02102     yyout = (FILE *) 0;
02103 #endif
02104 
02105     /* For future reference: Set errno on error, since we are called by
02106      * yylex_init()
02107      */
02108     return 0;
02109 }
02110 
02111 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
02112 int yylex_destroy  (void)
02113 {
02114     
02115     /* Pop the buffer stack, destroying each element. */
02116            while(YY_CURRENT_BUFFER){
02117                       yy_delete_buffer(YY_CURRENT_BUFFER  );
02118                       YY_CURRENT_BUFFER_LVALUE = NULL;
02119                       yypop_buffer_state();
02120            }
02121 
02122            /* Destroy the stack itself. */
02123            yyfree((yy_buffer_stack) );
02124            (yy_buffer_stack) = NULL;
02125 
02126     /* Reset the globals. This is important in a non-reentrant scanner so the next time
02127      * yylex() is called, initialization will occur. */
02128     yy_init_globals( );
02129 
02130     return 0;
02131 }
02132 
02133 /*
02134  * Internal utility routines.
02135  */
02136 
02137 #ifndef yytext_ptr
02138 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
02139 {
02140            register int i;
02141            for ( i = 0; i < n; ++i )
02142                       s1[i] = s2[i];
02143 }
02144 #endif
02145 
02146 #ifdef YY_NEED_STRLEN
02147 static int yy_flex_strlen (yyconst char * s )
02148 {
02149            register int n;
02150            for ( n = 0; s[n]; ++n )
02151                       ;
02152 
02153            return n;
02154 }
02155 #endif
02156 
02157 void *yyalloc (yy_size_t  size )
02158 {
02159            return (void *) malloc( size );
02160 }
02161 
02162 void *yyrealloc  (void * ptr, yy_size_t  size )
02163 {
02164            /* The cast to (char *) in the following accommodates both
02165             * implementations that use char* generic pointers, and those
02166             * that use void* generic pointers.  It works with the latter
02167             * because both ANSI C and C++ allow castless assignment from
02168             * any pointer type to void*, and deal with argument conversions
02169             * as though doing an assignment.
02170             */
02171            return (void *) realloc( (char *) ptr, size );
02172 }
02173 
02174 void yyfree (void * ptr )
02175 {
02176            free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
02177 }
02178 
02179 #define YYTABLES_NAME "yytables"
02180 

Generated on Wed Oct 20 2010 11:12:15 for APBS by  doxygen 1.7.2