ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

lex.yy.c
Go to the documentation of this file.
00001 #line 2 "lex.yy.c"
00002 #line 125 "ppl.l"
00003 #include "config.h"
00004 #include "wine/port.h"
00005 
00006 
00007 
00008 #line 9 "lex.yy.c"
00009 
00010 #define  YY_INT_ALIGNED short int
00011 
00012 /* A lexical scanner generated by flex */
00013 
00014 #define yy_create_buffer ppy__create_buffer
00015 #define yy_delete_buffer ppy__delete_buffer
00016 #define yy_flex_debug ppy__flex_debug
00017 #define yy_init_buffer ppy__init_buffer
00018 #define yy_flush_buffer ppy__flush_buffer
00019 #define yy_load_buffer_state ppy__load_buffer_state
00020 #define yy_switch_to_buffer ppy__switch_to_buffer
00021 #define yyin ppy_in
00022 #define yyleng ppy_leng
00023 #define yylex ppy_lex
00024 #define yylineno ppy_lineno
00025 #define yyout ppy_out
00026 #define yyrestart ppy_restart
00027 #define yytext ppy_text
00028 #define yywrap ppy_wrap
00029 #define yyalloc ppy_alloc
00030 #define yyrealloc ppy_realloc
00031 #define yyfree ppy_free
00032 
00033 #define FLEX_SCANNER
00034 #define YY_FLEX_MAJOR_VERSION 2
00035 #define YY_FLEX_MINOR_VERSION 5
00036 #define YY_FLEX_SUBMINOR_VERSION 35
00037 #if YY_FLEX_SUBMINOR_VERSION > 0
00038 #define FLEX_BETA
00039 #endif
00040 
00041 /* First, we deal with  platform-specific or compiler-specific issues. */
00042 
00043 /* begin standard C headers. */
00044 #include <stdio.h>
00045 #include <string.h>
00046 #include <errno.h>
00047 #include <stdlib.h>
00048 
00049 /* end standard C headers. */
00050 
00051 /* flex integer type definitions */
00052 
00053 #ifndef FLEXINT_H
00054 #define FLEXINT_H
00055 
00056 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
00057 
00058 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
00059 
00060 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
00061  * if you want the limit (max/min) macros for int types. 
00062  */
00063 #ifndef __STDC_LIMIT_MACROS
00064 #define __STDC_LIMIT_MACROS 1
00065 #endif
00066 
00067 #include <inttypes.h>
00068 typedef int8_t flex_int8_t;
00069 typedef uint8_t flex_uint8_t;
00070 typedef int16_t flex_int16_t;
00071 typedef uint16_t flex_uint16_t;
00072 typedef int32_t flex_int32_t;
00073 typedef uint32_t flex_uint32_t;
00074 #else
00075 typedef signed char flex_int8_t;
00076 typedef short int flex_int16_t;
00077 typedef int flex_int32_t;
00078 typedef unsigned char flex_uint8_t; 
00079 typedef unsigned short int flex_uint16_t;
00080 typedef unsigned int flex_uint32_t;
00081 
00082 /* Limits of integral types. */
00083 #ifndef INT8_MIN
00084 #define INT8_MIN               (-128)
00085 #endif
00086 #ifndef INT16_MIN
00087 #define INT16_MIN              (-32767-1)
00088 #endif
00089 #ifndef INT32_MIN
00090 #define INT32_MIN              (-2147483647-1)
00091 #endif
00092 #ifndef INT8_MAX
00093 #define INT8_MAX               (127)
00094 #endif
00095 #ifndef INT16_MAX
00096 #define INT16_MAX              (32767)
00097 #endif
00098 #ifndef INT32_MAX
00099 #define INT32_MAX              (2147483647)
00100 #endif
00101 #ifndef UINT8_MAX
00102 #define UINT8_MAX              (255U)
00103 #endif
00104 #ifndef UINT16_MAX
00105 #define UINT16_MAX             (65535U)
00106 #endif
00107 #ifndef UINT32_MAX
00108 #define UINT32_MAX             (4294967295U)
00109 #endif
00110 
00111 #endif /* ! C99 */
00112 
00113 #endif /* ! FLEXINT_H */
00114 
00115 #ifdef __cplusplus
00116 
00117 /* The "const" storage-class-modifier is valid. */
00118 #define YY_USE_CONST
00119 
00120 #else   /* ! __cplusplus */
00121 
00122 /* C99 requires __STDC__ to be defined as 1. */
00123 #if defined (__STDC__)
00124 
00125 #define YY_USE_CONST
00126 
00127 #endif  /* defined (__STDC__) */
00128 #endif  /* ! __cplusplus */
00129 
00130 #ifdef YY_USE_CONST
00131 #define yyconst const
00132 #else
00133 #define yyconst
00134 #endif
00135 
00136 /* Returned upon end-of-file. */
00137 #define YY_NULL 0
00138 
00139 /* Promotes a possibly negative, possibly signed char to an unsigned
00140  * integer for use as an array index.  If the signed char is negative,
00141  * we want to instead treat it as an 8-bit unsigned char, hence the
00142  * double cast.
00143  */
00144 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00145 
00146 /* Enter a start condition.  This macro really ought to take a parameter,
00147  * but we do it the disgusting crufty way forced on us by the ()-less
00148  * definition of BEGIN.
00149  */
00150 #define BEGIN (yy_start) = 1 + 2 *
00151 
00152 /* Translate the current start state into a value that can be later handed
00153  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00154  * compatibility.
00155  */
00156 #define YY_START (((yy_start) - 1) / 2)
00157 #define YYSTATE YY_START
00158 
00159 /* Action number for EOF rule of a given start state. */
00160 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00161 
00162 /* Special action meaning "start processing a new file". */
00163 #define YY_NEW_FILE ppy_restart(ppy_in  )
00164 
00165 #define YY_END_OF_BUFFER_CHAR 0
00166 
00167 /* Size of default input buffer. */
00168 #ifndef YY_BUF_SIZE
00169 #ifdef __ia64__
00170 /* On IA-64, the buffer size is 16k, not 8k.
00171  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
00172  * Ditto for the __ia64__ case accordingly.
00173  */
00174 #define YY_BUF_SIZE 32768
00175 #else
00176 #define YY_BUF_SIZE 16384
00177 #endif /* __ia64__ */
00178 #endif
00179 
00180 /* The state buf must be large enough to hold one state per character in the main buffer.
00181  */
00182 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00183 
00184 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00185 #define YY_TYPEDEF_YY_BUFFER_STATE
00186 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00187 #endif
00188 
00189 extern int ppy_leng;
00190 
00191 extern FILE *ppy_in, *ppy_out;
00192 
00193 #define EOB_ACT_CONTINUE_SCAN 0
00194 #define EOB_ACT_END_OF_FILE 1
00195 #define EOB_ACT_LAST_MATCH 2
00196 
00197     #define YY_LESS_LINENO(n)
00198     
00199 /* Return all but the first "n" matched characters back to the input stream. */
00200 #define yyless(n) \
00201     do \
00202         { \
00203         /* Undo effects of setting up ppy_text. */ \
00204         int yyless_macro_arg = (n); \
00205         YY_LESS_LINENO(yyless_macro_arg);\
00206         *yy_cp = (yy_hold_char); \
00207         YY_RESTORE_YY_MORE_OFFSET \
00208         (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00209         YY_DO_BEFORE_ACTION; /* set up ppy_text again */ \
00210         } \
00211     while ( 0 )
00212 
00213 #define unput(c) yyunput( c, (yytext_ptr)  )
00214 
00215 #ifndef YY_TYPEDEF_YY_SIZE_T
00216 #define YY_TYPEDEF_YY_SIZE_T
00217 typedef size_t yy_size_t;
00218 #endif
00219 
00220 #ifndef YY_STRUCT_YY_BUFFER_STATE
00221 #define YY_STRUCT_YY_BUFFER_STATE
00222 struct yy_buffer_state
00223     {
00224     FILE *yy_input_file;
00225 
00226     char *yy_ch_buf;        /* input buffer */
00227     char *yy_buf_pos;       /* current position in input buffer */
00228 
00229     /* Size of input buffer in bytes, not including room for EOB
00230      * characters.
00231      */
00232     yy_size_t yy_buf_size;
00233 
00234     /* Number of characters read into yy_ch_buf, not including EOB
00235      * characters.
00236      */
00237     int yy_n_chars;
00238 
00239     /* Whether we "own" the buffer - i.e., we know we created it,
00240      * and can realloc() it to grow it, and should free() it to
00241      * delete it.
00242      */
00243     int yy_is_our_buffer;
00244 
00245     /* Whether this is an "interactive" input source; if so, and
00246      * if we're using stdio for input, then we want to use getc()
00247      * instead of fread(), to make sure we stop fetching input after
00248      * each newline.
00249      */
00250     int yy_is_interactive;
00251 
00252     /* Whether we're considered to be at the beginning of a line.
00253      * If so, '^' rules will be active on the next match, otherwise
00254      * not.
00255      */
00256     int yy_at_bol;
00257 
00258     int yy_bs_lineno; 
00259     int yy_bs_column; 
00261     /* Whether to try to fill the input buffer when we reach the
00262      * end of it.
00263      */
00264     int yy_fill_buffer;
00265 
00266     int yy_buffer_status;
00267 
00268 #define YY_BUFFER_NEW 0
00269 #define YY_BUFFER_NORMAL 1
00270     /* When an EOF's been seen but there's still some text to process
00271      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00272      * shouldn't try reading from the input source any more.  We might
00273      * still have a bunch of tokens to match, though, because of
00274      * possible backing-up.
00275      *
00276      * When we actually see the EOF, we change the status to "new"
00277      * (via ppy_restart()), so that the user can continue scanning by
00278      * just pointing ppy_in at a new input file.
00279      */
00280 #define YY_BUFFER_EOF_PENDING 2
00281 
00282     };
00283 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
00284 
00285 /* Stack of input buffers. */
00286 static size_t yy_buffer_stack_top = 0; 
00287 static size_t yy_buffer_stack_max = 0; 
00288 static YY_BUFFER_STATE * yy_buffer_stack = 0; 
00290 /* We provide macros for accessing buffer states in case in the
00291  * future we want to put the buffer states in a more general
00292  * "scanner state".
00293  *
00294  * Returns the top of the stack, or NULL.
00295  */
00296 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
00297                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
00298                           : NULL)
00299 
00300 /* Same as previous macro, but useful when we know that the buffer stack is not
00301  * NULL or when we need an lvalue. For internal use only.
00302  */
00303 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
00304 
00305 /* yy_hold_char holds the character lost when ppy_text is formed. */
00306 static char yy_hold_char;
00307 static int yy_n_chars;      /* number of characters read into yy_ch_buf */
00308 int ppy_leng;
00309 
00310 /* Points to current character in buffer. */
00311 static char *yy_c_buf_p = (char *) 0;
00312 static int yy_init = 0;     /* whether we need to initialize */
00313 static int yy_start = 0;    /* start state number */
00314 
00315 /* Flag which is used to allow ppy_wrap()'s to do buffer switches
00316  * instead of setting up a fresh ppy_in.  A bit of a hack ...
00317  */
00318 static int yy_did_buffer_switch_on_eof;
00319 
00320 void ppy_restart (FILE *input_file  );
00321 void ppy__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
00322 YY_BUFFER_STATE ppy__create_buffer (FILE *file,int size  );
00323 void ppy__delete_buffer (YY_BUFFER_STATE b  );
00324 void ppy__flush_buffer (YY_BUFFER_STATE b  );
00325 void ppy_push_buffer_state (YY_BUFFER_STATE new_buffer  );
00326 void ppy_pop_buffer_state (void );
00327 
00328 static void ppy_ensure_buffer_stack (void );
00329 static void ppy__load_buffer_state (void );
00330 static void ppy__init_buffer (YY_BUFFER_STATE b,FILE *file  );
00331 
00332 #define YY_FLUSH_BUFFER ppy__flush_buffer(YY_CURRENT_BUFFER )
00333 
00334 YY_BUFFER_STATE ppy__scan_buffer (char *base,yy_size_t size  );
00335 YY_BUFFER_STATE ppy__scan_string (yyconst char *yy_str  );
00336 YY_BUFFER_STATE ppy__scan_bytes (yyconst char *bytes,int len  );
00337 
00338 void *ppy_alloc (yy_size_t  );
00339 void *ppy_realloc (void *,yy_size_t  );
00340 void ppy_free (void *  );
00341 
00342 #define yy_new_buffer ppy__create_buffer
00343 
00344 #define yy_set_interactive(is_interactive) \
00345     { \
00346     if ( ! YY_CURRENT_BUFFER ){ \
00347         ppy_ensure_buffer_stack (); \
00348         YY_CURRENT_BUFFER_LVALUE =    \
00349             ppy__create_buffer(ppy_in,YY_BUF_SIZE ); \
00350     } \
00351     YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00352     }
00353 
00354 #define yy_set_bol(at_bol) \
00355     { \
00356     if ( ! YY_CURRENT_BUFFER ){\
00357         ppy_ensure_buffer_stack (); \
00358         YY_CURRENT_BUFFER_LVALUE =    \
00359             ppy__create_buffer(ppy_in,YY_BUF_SIZE ); \
00360     } \
00361     YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00362     }
00363 
00364 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00365 
00366 /* Begin user sect3 */
00367 
00368 typedef unsigned char YY_CHAR;
00369 
00370 FILE *ppy_in = (FILE *) 0, *ppy_out = (FILE *) 0;
00371 
00372 typedef int yy_state_type;
00373 
00374 extern int ppy_lineno;
00375 
00376 int ppy_lineno = 1;
00377 
00378 extern char *ppy_text;
00379 #define yytext_ptr ppy_text
00380 
00381 static yy_state_type yy_get_previous_state (void );
00382 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
00383 static int yy_get_next_buffer (void );
00384 static void yy_fatal_error (yyconst char msg[]  );
00385 
00386 /* Done after the current pattern has been matched and before the
00387  * corresponding action - sets up ppy_text.
00388  */
00389 #define YY_DO_BEFORE_ACTION \
00390     (yytext_ptr) = yy_bp; \
00391     ppy_leng = (size_t) (yy_cp - yy_bp); \
00392     (yy_hold_char) = *yy_cp; \
00393     *yy_cp = '\0'; \
00394     (yy_c_buf_p) = yy_cp;
00395 
00396 #define YY_NUM_RULES 143
00397 #define YY_END_OF_BUFFER 144
00398 /* This struct is not used in this scanner,
00399    but its presence is necessary. */
00400 struct yy_trans_info
00401     {
00402     flex_int32_t yy_verify;
00403     flex_int32_t yy_nxt;
00404     };
00405 static yyconst flex_int16_t yy_accept[416] =
00406     {   0,
00407         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00408         0,    0,    0,    0,  117,  117,    0,    0,    0,    0,
00409         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00410         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00411         0,    0,    0,    0,  144,  133,  134,  135,  121,  142,
00412       122,  133,  132,  133,  134,    1,   21,   16,   18,   16,
00413        21,   20,   17,   17,   17,   17,   17,   17,   17,   17,
00414        68,   71,   69,   70,   28,   25,   26,   24,   28,   23,
00415        28,   28,  123,  131,  124,  142,  125,  126,  142,  127,
00416       128,  117,  118,  117,   77,   75,   77,   77,   74,   77,
00417 
00418        78,   82,   84,   83,  142,   79,   90,   86,   90,   85,
00419        88,   90,   90,   87,   90,   92,  100,  102,   95,  101,
00420        97,   96,   93,   97,   92,  106,  106,  104,  103,  106,
00421       114,  113,  110,  111,  107,  108,  109,  114,  114,  133,
00422       134,  138,  121,  138,  122,  133,  132,  133,   53,   50,
00423        47,   53,   52,   53,   51,   53,   33,   35,   53,   53,
00424        53,   53,   49,   53,   53,   58,   55,   56,   58,   54,
00425        58,   62,   59,   60,   62,   62,   22,   67,   64,   67,
00426        65,   67,   63,   67,   29,   30,   32,   32,   32,   29,
00427         1,  140,  143,  141,  139,  139,  133,  134,  133,  116,
00428 
00429       120,  132,  136,  137,  134,    1,   16,   17,   17,   17,
00430        17,   17,   17,   17,   17,   18,   19,   20,   17,   17,
00431        17,   17,   17,   11,   17,   17,   17,   17,   17,   68,
00432        69,   70,   72,   70,   25,   27,   28,  123,  130,  129,
00433       130,  125,  127,  117,  117,  117,  119,   75,   73,   74,
00434        76,   77,   78,   79,   81,   79,   86,   85,   90,   87,
00435        91,   90,   92,   94,   97,   96,   96,   93,   99,   97,
00436        92,  106,  104,  103,  106,  105,  106,  114,  114,  112,
00437       115,  114,  133,  138,  138,   50,   44,   41,   33,   34,
00438        33,   33,   37,   35,   35,   35,   39,   45,   43,   46,
00439 
00440        40,   48,   49,  132,   42,   55,   54,   57,   58,   59,
00441        61,    0,   22,   64,   63,   67,   66,   67,   29,   31,
00442        32,   29,  140,  139,  120,  120,   17,   17,   17,   17,
00443        17,   17,   11,   17,   17,   17,   17,   17,   17,   17,
00444        69,   80,   89,   98,   34,   34,   33,   33,   33,   36,
00445        35,   35,   35,  132,  120,   17,   12,   13,   17,   17,
00446        17,   17,   17,   17,   15,   17,   17,   17,   34,   34,
00447        34,   33,   36,   36,   35,  132,   17,   12,   13,   14,
00448         4,    7,    9,   17,   17,   15,   17,    8,   17,   34,
00449        36,   36,   36,  132,    3,   14,    4,    7,    9,   10,
00450 
00451        17,    6,    8,   17,   36,  132,    3,   10,    2,    6,
00452         5,   38,    2,    5,    0
00453     } ;
00454 
00455 static yyconst flex_int32_t yy_ec[256] =
00456     {   0,
00457         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00458         2,    2,    4,    1,    1,    1,    1,    1,    1,    1,
00459         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00460         1,    2,    5,    6,    7,    1,    1,    8,    9,   10,
00461        11,   12,    1,   13,    1,   14,   15,   16,   17,   17,
00462        17,   17,   17,   17,   17,   18,   18,    1,    1,   19,
00463        20,   21,    1,    1,   22,   22,   22,   22,   22,   22,
00464        23,   23,   23,   23,   23,   24,   23,   23,   23,   23,
00465        23,   23,   23,   23,   25,   23,   23,   26,   23,   23,
00466         1,   27,    1,    1,   28,    1,   29,   30,   31,   32,
00467 
00468        33,   34,   35,   36,   37,   36,   36,   38,   39,   40,
00469        41,   42,   36,   43,   44,   45,   46,   36,   47,   48,
00470        36,   36,    1,   49,    1,    1,    1,    1,    1,    1,
00471         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00472         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00473         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00474         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00475         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00476         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00477         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00478 
00479         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00480         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00481         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00482         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00483         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00484         1,    1,    1,    1,    1
00485     } ;
00486 
00487 static yyconst flex_int32_t yy_meta[50] =
00488     {   0,
00489         1,    2,    3,    2,    1,    4,    5,    1,    6,    7,
00490         8,    9,    8,   10,   11,   12,   12,   12,    1,    1,
00491        13,   14,   15,   15,   15,   15,   16,   17,   14,   14,
00492        14,   14,   14,   14,   15,   15,   15,   15,   15,   15,
00493        15,   15,   15,   15,   15,   15,   15,   15,    1
00494     } ;
00495 
00496 static yyconst flex_int16_t yy_base[460] =
00497     {   0,
00498         0,   48,   55,    0,  102,  103,  130,    0,  177,  178,
00499       179,  182,  186,  187,  104,  107,  214,    0,  261,  262,
00500       289,    0,  338,    0,  386,  389,  414,  439,  466,    0,
00501       515,    0,  564,    0,  399,  403,  612,  638,  665,    0,
00502       428,  618,  714,  763, 1130,    0,   49, 1886, 1886, 1886,
00503      1886,   96,    0,  109,  118, 1886, 1886,  811, 1886, 1126,
00504       111,  111,  858, 1095,  154,  161, 1090, 1083, 1085, 1095,
00505         0, 1886,  184,  124, 1886,  196, 1886, 1886,  254, 1886,
00506         0,  199,    0, 1886, 1886,  269,    0, 1886, 1120,    0,
00507      1886,    0, 1886,  263, 1886,  208, 1886,  267, 1112,  277,
00508 
00509         0, 1886, 1886, 1886,  271,  281, 1886,  393, 1886,  396,
00510      1886, 1107,  396,    0,  406,    0, 1886, 1886, 1113, 1886,
00511       400,  905,    0,  418,  954, 1886,  430, 1886, 1886,  433,
00512         0, 1886, 1886, 1886, 1886, 1886, 1886,  432,  435,    0,
00513       449, 1886, 1886, 1886, 1886,  444,    0, 1003, 1886,  456,
00514      1886, 1099, 1886, 1110, 1886,  449, 1037,  714,  443, 1097,
00515       603,    0,  623, 1083, 1066, 1886,  615, 1886,  619,    0,
00516       632, 1886,  644, 1886,  635,  634,  635, 1886,  655, 1886,
00517      1886,  646,    0,  659,    0, 1886, 1886,  725,  738,  741,
00518      1886,  742, 1886, 1886,    0,  735,    0,  747,  741, 1886,
00519 
00520         0,    0, 1886, 1111,  755, 1886,    0,    0, 1079,  747,
00521       754, 1074, 1067, 1069, 1079, 1886, 1886, 1104, 1069,  717,
00522      1070, 1058, 1067,  777, 1063, 1052, 1062, 1056, 1041,    0,
00523         0, 1886, 1886, 1079,  787, 1886, 1078,    0, 1886, 1886,
00524      1077,    0,    0,    0,  743,  765, 1886,  791, 1886, 1069,
00525      1886, 1075,    0, 1886,  794, 1074,  795,  798, 1062,    0,
00526      1886, 1071,    0, 1886,  789,    0, 1085,    0,  801, 1070,
00527         0,  804, 1886, 1886,  807, 1886, 1069,    0,  804, 1886,
00528      1886, 1068,  806, 1886,    0,  818, 1886, 1886,  847,  843,
00529       874,  799,    0,  905,  903,  800, 1886, 1886, 1886, 1886,
00530 
00531      1886, 1886, 1066, 1026, 1886,  823,    0, 1886, 1048,  824,
00532      1886, 1047,  816,  871,    0, 1886, 1886, 1027,    0, 1886,
00533      1006,  872,  876,    0, 1134,    0,  969,  971,  948,  943,
00534       906,  897,  880,  875,  871,  864,  844,  835,  833,  799,
00535         0,  884, 1886,  890,  907,  845,  618,  863,  873,  914,
00536       889,  910,  912,  799, 1183,  795,  938,  942,  796,  786,
00537       747,  702,  695,  614,  959,  610,  598,  428,  932,  945,
00538       946, 1886,  947,  952, 1886,  406,  395,  975,  984,  985,
00539       990,  993,  994,  385,  372,  997,  365,  998,  247, 1886,
00540       966,  991,  994,  241, 1023, 1024, 1029, 1032, 1033, 1036,
00541 
00542       153, 1037, 1040,   74, 1886,   22, 1041, 1044, 1045, 1054,
00543      1055,    0, 1062, 1063, 1886, 1232, 1249, 1266, 1283, 1300,
00544      1317, 1334, 1351, 1368, 1385, 1402, 1419, 1436, 1449, 1451,
00545      1468, 1485, 1502, 1519, 1536, 1553, 1570, 1587, 1598, 1615,
00546      1632, 1638, 1655, 1672, 1689, 1695, 1712, 1729, 1746, 1752,
00547      1758, 1775, 1792, 1800, 1817, 1834, 1851, 1056, 1868
00548     } ;
00549 
00550 static yyconst flex_int16_t yy_def[460] =
00551     {   0,
00552       415,    1,  415,    3,  416,  416,  415,    7,  417,  417,
00553       418,  418,  419,  419,  420,  420,  415,   17,  421,  421,
00554       415,   21,  415,   23,  422,  422,  423,  423,  415,   29,
00555       415,   31,  415,   33,  424,  424,  425,  425,  415,   39,
00556       426,  426,  427,  427,  415,  428,  415,  415,  415,  415,
00557       415,  429,  430,  429,  415,  415,  415,  415,  415,   58,
00558       415,  415,   58,   63,   63,   63,   63,   63,   63,   63,
00559       431,  415,  432,  415,  415,  415,  415,  415,  415,  415,
00560       430,  415,  433,  415,  415,  434,  435,  415,  434,  436,
00561       415,  437,  415,  438,  415,  415,  415,  415,  439,  415,
00562 
00563       440,  415,  415,  415,  441,  415,  415,  415,  415,  415,
00564       415,  415,  415,  442,  415,  443,  415,  415,  415,  415,
00565       444,  445,  446,  415,  446,  415,  415,  415,  415,  415,
00566       447,  415,  415,  415,  415,  415,  415,  448,  415,  428,
00567       415,  415,  415,  415,  415,  429,  430,  449,  415,  415,
00568       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00569       415,  430,  415,  430,  415,  415,  415,  415,  415,  450,
00570       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00571       415,  415,  451,  452,  453,  415,  415,  415,  415,  453,
00572       415,  415,  415,  415,  454,  454,  428,  415,  429,  415,
00573 
00574       455,  430,  415,  415,  415,  415,   58,   63,   63,   63,
00575        63,   63,   63,   63,   63,  415,  415,  415,   63,   63,
00576        63,   63,   63,   63,   63,   63,   63,   63,   63,  431,
00577       456,  415,  415,  415,  415,  415,  415,  433,  415,  415,
00578       415,  435,  436,  437,  438,  438,  415,  415,  415,  439,
00579       415,  415,  440,  415,  415,  415,  415,  415,  415,  442,
00580       415,  415,  443,  415,  444,  457,  445,  446,  415,  415,
00581       125,  415,  415,  415,  415,  415,  415,  447,  448,  415,
00582       415,  415,  429,  415,  449,  415,  415,  415,  415,  415,
00583       415,  415,  458,  415,  415,  415,  415,  415,  415,  415,
00584 
00585       415,  415,  415,  430,  415,  415,  450,  415,  415,  415,
00586       415,  415,  415,  415,  451,  415,  415,  415,  453,  415,
00587       415,  453,  415,  454,  459,  455,   63,   63,   63,   63,
00588        63,   63,  415,   63,   63,   63,   63,   63,   63,   63,
00589       456,  415,  415,  415,  415,  415,  415,  415,  415,  458,
00590       415,  415,  415,  430,  459,   63,   63,   63,   63,   63,
00591        63,   63,   63,   63,   63,   63,   63,   63,  415,  415,
00592       415,  415,  415,  415,  415,  430,   63,  415,  415,   63,
00593        63,   63,   63,   63,   63,  415,   63,   63,   63,  415,
00594       415,  415,  415,  430,   63,  415,  415,  415,  415,   63,
00595 
00596        63,   63,  415,   63,  415,  430,  415,  415,   63,  415,
00597        63,  430,  415,  415,    0,  415,  415,  415,  415,  415,
00598       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00599       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00600       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00601       415,  415,  415,  415,  415,  415,  415,  415,  415
00602     } ;
00603 
00604 static yyconst flex_int16_t yy_nxt[1936] =
00605     {   0,
00606        46,   47,   48,   47,   46,   49,   50,   46,   51,   46,
00607        46,   46,   46,   46,   52,   46,   46,   46,   46,   46,
00608        46,   53,   53,   53,   53,   53,   54,   53,   53,   53,
00609        53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
00610        53,   53,   53,   53,   53,   53,   53,   53,   46,   55,
00611       198,   55,  198,  412,   56,   57,   58,   59,   60,   57,
00612        57,   57,   57,   57,   57,   57,   57,   57,   57,   61,
00613        57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
00614        57,   62,   57,   63,   63,   63,   64,   65,   63,   63,
00615        63,   66,   67,   63,   63,   63,   68,   63,   63,   63,
00616 
00617        69,   70,   63,   57,   72,   72,   93,  200,  411,   93,
00618       201,  203,  204,  217,  218,   94,   73,   73,   94,  205,
00619       415,  205,  200,  415,  206,  201,  233,  234,   74,   74,
00620        75,   76,   77,   76,   75,   78,   75,   75,   75,   75,
00621        75,   75,   75,   75,   79,   75,   75,   75,   80,   75,
00622        75,   81,   81,   81,   81,   81,   82,   81,   81,   81,
00623        81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
00624        81,   81,   81,   81,   81,   81,   81,   81,   75,   84,
00625        84,   84,   85,   85,   84,  409,  232,   88,   84,   84,
00626        88,  220,  223,  221,  224,  200,  222,  235,  201,  235,
00627 
00628       225,  236,  237,   86,   86,   89,   91,   91,   89,  248,
00629       232,  248,   89,   89,   95,   96,   97,   96,   95,   95,
00630        95,   95,   95,   95,   95,   95,   95,   95,   98,   95,
00631        95,   95,   95,   95,   95,   99,   99,   99,   99,   99,
00632       100,   99,   99,   99,   99,   99,   99,   99,   99,   99,
00633        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
00634        99,   99,   95,  102,  102,  200,  103,  103,  201,  104,
00635       104,  240,  241,  406,  246,  105,  105,  247,  200,  251,
00636       252,  201,  200,  255,  256,  201,  404,  106,  106,  107,
00637       108,  109,  108,  107,  107,  107,  107,  107,  107,  110,
00638 
00639       107,  111,  112,  113,  107,  107,  107,  107,  107,  107,
00640       114,  114,  114,  114,  114,  115,  114,  114,  114,  114,
00641       114,  114,  114,  114,  114,  114,  114,  114,  114,  114,
00642       114,  114,  114,  114,  114,  114,  114,  107,  116,  116,
00643       117,  116,  116,  118,  119,  116,  120,  116,  116,  116,
00644       116,  116,  121,  122,  122,  122,  116,  116,  116,  123,
00645       123,  123,  123,  123,  124,  125,  123,  123,  123,  123,
00646       123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
00647       123,  123,  123,  123,  123,  123,  116,  127,  128,  127,
00648       127,  128,  127,  402,  257,  129,  257,  258,  129,  258,
00649 
00650       173,  174,  173,  401,  173,  174,  173,  200,  261,  262,
00651       201,  200,  130,  175,  201,  130,  132,  175,  400,  133,
00652       269,  270,  134,  135,  136,  176,  137,  395,  138,  176,
00653       186,  272,  273,  272,  187,  276,  277,  281,  282,  274,
00654       139,  132,  188,  280,  133,  394,  201,  134,  135,  136,
00655       198,  137,  198,  138,  189,  415,  275,  286,  415,  286,
00656       200,  297,  298,  201,  389,  139,  140,  141,  142,  141,
00657       140,  143,  144,  140,  145,  140,  140,  140,  140,  140,
00658       146,  140,  140,  140,  140,  140,  140,  147,  147,  147,
00659       147,  147,  148,  147,  147,  147,  147,  147,  147,  147,
00660 
00661       147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
00662       147,  147,  147,  147,  140,  149,  150,  151,  150,  152,
00663       153,  149,  154,  155,  149,  149,  149,  149,  149,  156,
00664       157,  158,  158,  159,  160,  161,  162,  162,  162,  162,
00665       162,  163,  162,  162,  162,  162,  164,  162,  162,  162,
00666       162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
00667       162,  162,  162,  165,  166,  167,  168,  167,  166,  166,
00668       166,  166,  166,  166,  166,  166,  166,  166,  169,  166,
00669       166,  166,  166,  166,  166,  170,  170,  170,  170,  170,
00670       171,  170,  170,  170,  170,  170,  170,  170,  170,  170,
00671 
00672       170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
00673       170,  170,  166,   76,   77,   76,  306,   78,  306,  190,
00674       186,  190,  300,  301,  191,  302,  303,  177,  177,  177,
00675       200,  388,  188,  201,  308,  309,  311,  312,   82,   76,
00676        77,   76,  372,   78,  189,  310,  200,  310,  387,  201,
00677       313,  313,  313,  177,  177,  177,  314,  200,  314,  385,
00678       201,  317,  318,  372,   82,  178,  179,  180,  179,  178,
00679       178,  178,  178,  178,  181,  181,  178,  178,  178,  182,
00680       178,  178,  178,  178,  178,  178,  183,  183,  183,  183,
00681       183,  184,  183,  183,  183,  183,  183,  183,  183,  183,
00682 
00683       183,  183,  183,  183,  183,  183,  183,  183,  183,  183,
00684       183,  183,  183,  178,   50,  192,  193,  192,   50,  194,
00685        50,   50,   50,   50,   50,   50,   50,  384,  196,  294,
00686       294,  294,   50,   50,   50,  383,  200,  295,  296,  201,
00687       320,  321,  322,  323,  322,  323,  200,  206,  198,  325,
00688       198,  295,  415,  328,  415,  415,  205,  415,  205,  296,
00689       329,  206,   50,   50,  192,  193,  192,   50,  194,   50,
00690        50,   50,   50,   50,   50,   50,  246,  196,  333,  247,
00691       333,   50,   50,   50,  220,  223,  221,  224,  235,  222,
00692       235,  382,  248,  225,  248,  342,  257,  342,  257,  258,
00693 
00694       415,  258,  344,  415,  344,  272,  273,  272,  334,  276,
00695       277,   50,  207,  274,  207,  415,  335,  415,  415,  286,
00696       415,  286,  349,  353,  306,  310,  306,  310,  381,  380,
00697       275,  313,  313,  313,  377,  376,  349,  353,  368,  208,
00698       208,  208,  209,  210,  208,  208,  208,  211,  212,  208,
00699       208,  208,  213,  208,  208,  208,  214,  215,  208,  415,
00700       290,  415,  289,  289,  290,  367,  345,  346,  371,  366,
00701       291,  292,  314,  322,  314,  322,  365,  323,  206,  323,
00702       345,  333,  371,  333,  291,  342,  372,  342,  346,  208,
00703       208,  344,  292,  344,  208,  208,  372,  347,  348,  208,
00704 
00705       372,  364,  363,  208,  208,  266,  266,  362,  266,  266,
00706       372,  347,  266,  375,  266,  266,  266,  266,  266,  348,
00707       294,  294,  294,  266,  266,  266,  351,  352,  295,  296,
00708       369,  370,  266,  375,  375,  375,  361,  373,  374,  378,
00709       351,  378,  295,  379,  369,  379,  360,  375,  352,  375,
00710       296,  373,  370,  266,  263,  263,  390,  263,  263,  374,
00711       386,  263,  386,  263,  263,  263,  263,  263,  390,  390,
00712       391,  392,  263,  263,  263,  393,  378,  390,  378,  359,
00713       358,  271,  390,  390,  391,  379,  396,  379,  396,  393,
00714       405,  397,  392,  397,  398,  399,  398,  399,  386,  403,
00715 
00716       386,  403,  263,  283,  357,  356,  285,  283,  320,  283,
00717       283,  405,  283,  283,  405,  283,  283,  405,  283,  283,
00718       283,  283,  283,  283,  407,  396,  407,  396,  405,  317,
00719       397,  405,  397,  398,  399,  398,  399,  408,  410,  408,
00720       410,  403,  407,  403,  407,  408,  413,  408,  413,  311,
00721       308,  283,  289,  289,  290,  410,  414,  410,  414,  354,
00722       291,  292,  293,  413,  414,  413,  414,  350,  302,  350,
00723       281,  276,  269,  261,  291,  343,  255,  251,  249,  240,
00724       236,  233,  292,  340,  293,  266,  266,  339,  266,  266,
00725       338,  337,  266,  336,  266,  266,  266,  266,  266,  332,
00726 
00727       331,  330,  327,  266,  266,  266,  217,  229,  228,  227,
00728       226,  219,  266,  203,  305,  304,  299,  288,  287,  264,
00729       259,  249,  415,  229,  228,  227,  226,  219,  216,  415,
00730       415,  415,  415,  266,  326,  326,  415,  326,  326,  326,
00731       326,  326,  326,  326,  326,  326,  326,  415,  415,  415,
00732       415,  415,  326,  326,  326,  415,  415,  415,  415,  415,
00733       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00734       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00735       415,  415,  326,  326,  326,  415,  326,  326,  326,  326,
00736       326,  326,  326,  326,  326,  326,  415,  415,  415,  415,
00737 
00738       415,  326,  326,  326,  415,  415,  415,  415,  415,  415,
00739       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00740       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00741       415,  326,   71,   71,   71,   71,   71,   71,   71,   71,
00742        71,   71,   71,   71,   71,   71,   71,   71,   71,   83,
00743        83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
00744        83,   83,   83,   83,   83,   83,   87,   87,   87,   87,
00745        87,   87,   87,   87,   87,   87,   87,   87,   87,   87,
00746        87,   87,   87,   90,   90,   90,   90,   90,   90,   90,
00747        90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
00748 
00749        92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
00750        92,   92,   92,   92,   92,   92,   92,  101,  101,  101,
00751       101,  101,  101,  101,  101,  101,  101,  101,  101,  101,
00752       101,  101,  101,  101,  126,  126,  126,  126,  126,  126,
00753       126,  126,  126,  126,  126,  126,  126,  126,  126,  126,
00754       126,  131,  131,  131,  131,  131,  131,  131,  131,  131,
00755       131,  131,  131,  131,  131,  131,  131,  131,  172,  172,
00756       172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
00757       172,  172,  172,  172,  172,   75,   75,   75,   75,   75,
00758        75,   75,   75,   75,   75,   75,   75,   75,   75,   75,
00759 
00760        75,   75,  185,  185,  185,  185,  185,  185,  185,  185,
00761       185,  185,  185,  185,  185,  185,  185,  185,  185,  195,
00762       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00763       195,  195,  195,  195,  195,  195,  197,  415,  415,  415,
00764       415,  415,  197,  197,  197,  197,  415,  197,  197,  199,
00765       415,  415,  415,  199,  415,  199,  199,  199,  199,  199,
00766       199,  199,  202,  415,  202,  202,  415,  202,  230,  230,
00767       415,  230,  230,  230,  230,  230,  230,  230,  415,  230,
00768       230,  230,  230,  415,  230,  231,  231,  231,  231,  231,
00769       231,  231,  231,  231,  231,  231,  231,  231,  231,  231,
00770 
00771       231,  231,  238,  238,  415,  415,  238,  238,  238,  238,
00772       238,  238,  238,  238,  238,  238,  238,  415,  238,  239,
00773       239,  239,  239,  239,  239,  239,  239,  239,  239,  239,
00774       239,  239,  239,  239,  239,  239,  242,  242,  415,  242,
00775       242,  415,  242,  242,  242,  242,  242,  242,  242,  242,
00776       242,  415,  242,  243,  243,  415,  243,  243,  243,  243,
00777       243,  243,  243,  243,  243,  415,  243,  243,  415,  243,
00778       244,  244,  415,  244,  244,  244,  244,  244,  415,  244,
00779       244,  244,  244,  244,  244,  244,  244,  245,  245,  415,
00780       245,  245,  245,  245,  245,  245,  245,  245,  245,  245,
00781 
00782       245,  245,  245,  245,  250,  415,  415,  415,  415,  250,
00783       415,  250,  250,  415,  250,  253,  253,  415,  415,  253,
00784       415,  253,  253,  253,  253,  415,  253,  253,  253,  253,
00785       415,  253,  254,  254,  254,  254,  254,  254,  254,  254,
00786       254,  254,  254,  254,  254,  254,  254,  254,  254,  260,
00787       415,  260,  260,  415,  260,  263,  263,  415,  415,  415,
00788       415,  263,  263,  263,  263,  415,  415,  263,  415,  415,
00789       415,  263,  265,  265,  415,  415,  415,  415,  265,  265,
00790       265,  265,  265,  265,  265,  265,  265,  415,  265,  267,
00791       267,  415,  415,  415,  415,  267,  267,  267,  267,  415,
00792 
00793       267,  267,  267,  267,  415,  267,  268,  415,  268,  268,
00794       415,  268,  278,  278,  415,  415,  278,  415,  415,  415,
00795       278,  278,  415,  278,  278,  278,  278,  415,  278,  279,
00796       279,  415,  415,  279,  415,  415,  415,  279,  279,  279,
00797       279,  279,  279,  279,  415,  279,  284,  284,  284,  284,
00798       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00799       284,  284,  284,  307,  415,  307,  307,  415,  307,  315,
00800       415,  315,  315,  415,  315,  316,  316,  316,  316,  316,
00801       316,  316,  316,  316,  316,  316,  316,  316,  316,  316,
00802       316,  316,  319,  319,  415,  319,  415,  319,  319,  319,
00803 
00804       319,  319,  415,  319,  319,  319,  319,  415,  319,  324,
00805       324,  324,  415,  324,  324,  324,  324,  326,  326,  415,
00806       326,  326,  326,  326,  326,  326,  326,  326,  326,  326,
00807       326,  326,  326,  326,  341,  341,  415,  341,  341,  341,
00808       341,  341,  415,  341,  415,  341,  341,  341,  341,  415,
00809       341,  266,  266,  415,  415,  415,  415,  266,  266,  266,
00810       266,  415,  415,  266,  415,  415,  415,  266,  355,  355,
00811       415,  355,  355,  355,  355,  355,  355,  355,  355,  355,
00812       355,  355,  355,  355,  355,   45,  415,  415,  415,  415,
00813       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00814 
00815       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00816       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00817       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
00818       415,  415,  415,  415,  415
00819     } ;
00820 
00821 static yyconst flex_int16_t yy_chk[1936] =
00822     {   0,
00823         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00824         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00825         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00826         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00827         1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
00828        47,    2,   47,  406,    2,    3,    3,    3,    3,    3,
00829         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
00830         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
00831         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
00832         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
00833 
00834         3,    3,    3,    3,    5,    6,   15,   52,  404,   16,
00835        52,   54,   54,   62,   62,   15,    5,    6,   16,   55,
00836        54,   55,   61,   54,   55,   61,   74,   74,    5,    6,
00837         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
00838         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
00839         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
00840         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
00841         7,    7,    7,    7,    7,    7,    7,    7,    7,    9,
00842        10,   11,    9,   10,   12,  401,   73,   11,   13,   14,
00843        12,   65,   66,   65,   66,   73,   65,   76,   73,   76,
00844 
00845        66,   82,   82,    9,   10,   11,   13,   14,   12,   96,
00846        73,   96,   13,   14,   17,   17,   17,   17,   17,   17,
00847        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
00848        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
00849        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
00850        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
00851        17,   17,   17,   19,   20,   79,   19,   20,   79,   19,
00852        20,   86,   86,  394,   94,   19,   20,   94,   98,  100,
00853       100,   98,  105,  106,  106,  105,  389,   19,   20,   21,
00854        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00855 
00856        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00857        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00858        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00859        21,   21,   21,   21,   21,   21,   21,   21,   23,   23,
00860        23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
00861        23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
00862        23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
00863        23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
00864        23,   23,   23,   23,   23,   23,   23,   25,   25,   25,
00865        26,   26,   26,  387,  108,   25,  108,  110,   26,  110,
00866 
00867        35,   35,   35,  385,   36,   36,   36,  113,  115,  115,
00868       113,  121,   25,   35,  121,   26,   27,   36,  384,   27,
00869       124,  124,   27,   27,   27,   35,   27,  377,   27,   36,
00870        41,  127,  127,  127,   41,  130,  130,  139,  139,  127,
00871        27,   28,   41,  138,   28,  376,  138,   28,   28,   28,
00872       141,   28,  141,   28,   41,  146,  127,  150,  146,  150,
00873       156,  159,  159,  156,  368,   28,   29,   29,   29,   29,
00874        29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
00875        29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
00876        29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
00877 
00878        29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
00879        29,   29,   29,   29,   29,   31,   31,   31,   31,   31,
00880        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00881        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00882        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00883        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
00884        31,   31,   31,   31,   33,   33,   33,   33,   33,   33,
00885        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
00886        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
00887        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
00888 
00889        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
00890        33,   33,   33,   37,   37,   37,  167,   37,  167,   42,
00891        42,   42,  161,  161,   42,  163,  163,   37,   37,   37,
00892       169,  367,   42,  169,  171,  171,  176,  176,   37,   38,
00893        38,   38,  347,   38,   42,  173,  175,  173,  366,  175,
00894       177,  177,  177,   38,   38,   38,  179,  182,  179,  364,
00895       182,  184,  184,  347,   38,   39,   39,   39,   39,   39,
00896        39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
00897        39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
00898        39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
00899 
00900        39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
00901        39,   39,   39,   39,   43,   43,   43,   43,   43,   43,
00902        43,   43,   43,   43,   43,   43,   43,  363,   43,  158,
00903       158,  158,   43,   43,   43,  362,  188,  158,  158,  188,
00904       189,  189,  190,  192,  190,  192,  196,  190,  198,  196,
00905       198,  158,  199,  220,  245,  199,  205,  245,  205,  158,
00906       220,  205,   43,   44,   44,   44,   44,   44,   44,   44,
00907        44,   44,   44,   44,   44,   44,  246,   44,  224,  246,
00908       224,   44,   44,   44,  210,  211,  210,  211,  235,  210,
00909       235,  361,  248,  211,  248,  255,  257,  255,  257,  258,
00910 
00911       265,  258,  269,  265,  269,  272,  272,  272,  224,  275,
00912       275,   44,   58,  272,   58,  279,  224,  283,  279,  286,
00913       283,  286,  292,  296,  306,  310,  306,  310,  360,  359,
00914       272,  313,  313,  313,  356,  354,  292,  296,  340,   58,
00915        58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
00916        58,   58,   58,   58,   58,   58,   58,   58,   58,   63,
00917       290,   63,  289,  289,  289,  339,  290,  290,  346,  338,
00918       289,  289,  314,  322,  314,  322,  337,  323,  322,  323,
00919       290,  333,  346,  333,  289,  342,  348,  342,  290,   63,
00920        63,  344,  289,  344,   63,   63,  349,  291,  291,   63,
00921 
00922       348,  336,  335,   63,   63,  122,  122,  334,  122,  122,
00923       349,  291,  122,  351,  122,  122,  122,  122,  122,  291,
00924       294,  294,  294,  122,  122,  122,  295,  295,  294,  294,
00925       345,  345,  122,  352,  351,  353,  332,  350,  350,  357,
00926       295,  357,  294,  358,  345,  358,  331,  352,  295,  353,
00927       294,  350,  345,  122,  125,  125,  369,  125,  125,  350,
00928       365,  125,  365,  125,  125,  125,  125,  125,  370,  371,
00929       373,  373,  125,  125,  125,  374,  378,  369,  378,  330,
00930       329,  125,  370,  371,  373,  379,  380,  379,  380,  374,
00931       391,  381,  373,  381,  382,  383,  382,  383,  386,  388,
00932 
00933       386,  388,  125,  148,  328,  327,  148,  148,  321,  148,
00934       148,  391,  148,  148,  392,  148,  148,  393,  148,  148,
00935       148,  148,  148,  148,  395,  396,  395,  396,  392,  318,
00936       397,  393,  397,  398,  399,  398,  399,  400,  402,  400,
00937       402,  403,  407,  403,  407,  408,  409,  408,  409,  312,
00938       309,  148,  157,  157,  157,  410,  411,  410,  411,  304,
00939       157,  157,  157,  413,  414,  413,  414,  458,  303,  458,
00940       282,  277,  270,  262,  157,  259,  256,  252,  250,  241,
00941       237,  234,  157,  229,  157,  267,  267,  228,  267,  267,
00942       227,  226,  267,  225,  267,  267,  267,  267,  267,  223,
00943 
00944       222,  221,  219,  267,  267,  267,  218,  215,  214,  213,
00945       212,  209,  267,  204,  165,  164,  160,  154,  152,  119,
00946       112,   99,   89,   70,   69,   68,   67,   64,   60,   45,
00947         0,    0,    0,  267,  325,  325,    0,  325,  325,  325,
00948       325,  325,  325,  325,  325,  325,  325,    0,    0,    0,
00949         0,    0,  325,  325,  325,    0,    0,    0,    0,    0,
00950         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00951         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00952         0,    0,  325,  355,  355,    0,  355,  355,  355,  355,
00953       355,  355,  355,  355,  355,  355,    0,    0,    0,    0,
00954 
00955         0,  355,  355,  355,    0,    0,    0,    0,    0,    0,
00956         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00957         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00958         0,  355,  416,  416,  416,  416,  416,  416,  416,  416,
00959       416,  416,  416,  416,  416,  416,  416,  416,  416,  417,
00960       417,  417,  417,  417,  417,  417,  417,  417,  417,  417,
00961       417,  417,  417,  417,  417,  417,  418,  418,  418,  418,
00962       418,  418,  418,  418,  418,  418,  418,  418,  418,  418,
00963       418,  418,  418,  419,  419,  419,  419,  419,  419,  419,
00964       419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
00965 
00966       420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
00967       420,  420,  420,  420,  420,  420,  420,  421,  421,  421,
00968       421,  421,  421,  421,  421,  421,  421,  421,  421,  421,
00969       421,  421,  421,  421,  422,  422,  422,  422,  422,  422,
00970       422,  422,  422,  422,  422,  422,  422,  422,  422,  422,
00971       422,  423,  423,  423,  423,  423,  423,  423,  423,  423,
00972       423,  423,  423,  423,  423,  423,  423,  423,  424,  424,
00973       424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
00974       424,  424,  424,  424,  424,  425,  425,  425,  425,  425,
00975       425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
00976 
00977       425,  425,  426,  426,  426,  426,  426,  426,  426,  426,
00978       426,  426,  426,  426,  426,  426,  426,  426,  426,  427,
00979       427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
00980       427,  427,  427,  427,  427,  427,  428,    0,    0,    0,
00981         0,    0,  428,  428,  428,  428,    0,  428,  428,  429,
00982         0,    0,    0,  429,    0,  429,  429,  429,  429,  429,
00983       429,  429,  430,    0,  430,  430,    0,  430,  431,  431,
00984         0,  431,  431,  431,  431,  431,  431,  431,    0,  431,
00985       431,  431,  431,    0,  431,  432,  432,  432,  432,  432,
00986       432,  432,  432,  432,  432,  432,  432,  432,  432,  432,
00987 
00988       432,  432,  433,  433,    0,    0,  433,  433,  433,  433,
00989       433,  433,  433,  433,  433,  433,  433,    0,  433,  434,
00990       434,  434,  434,  434,  434,  434,  434,  434,  434,  434,
00991       434,  434,  434,  434,  434,  434,  435,  435,    0,  435,
00992       435,    0,  435,  435,  435,  435,  435,  435,  435,  435,
00993       435,    0,  435,  436,  436,    0,  436,  436,  436,  436,
00994       436,  436,  436,  436,  436,    0,  436,  436,    0,  436,
00995       437,  437,    0,  437,  437,  437,  437,  437,    0,  437,
00996       437,  437,  437,  437,  437,  437,  437,  438,  438,    0,
00997       438,  438,  438,  438,  438,  438,  438,  438,  438,  438,
00998 
00999       438,  438,  438,  438,  439,    0,    0,    0,    0,  439,
01000         0,  439,  439,    0,  439,  440,  440,    0,    0,  440,
01001         0,  440,  440,  440,  440,    0,  440,  440,  440,  440,
01002         0,  440,  441,  441,  441,  441,  441,  441,  441,  441,
01003       441,  441,  441,  441,  441,  441,  441,  441,  441,  442,
01004         0,  442,  442,    0,  442,  443,  443,    0,    0,    0,
01005         0,  443,  443,  443,  443,    0,    0,  443,    0,    0,
01006         0,  443,  444,  444,    0,    0,    0,    0,  444,  444,
01007       444,  444,  444,  444,  444,  444,  444,    0,  444,  445,
01008       445,    0,    0,    0,    0,  445,  445,  445,  445,    0,
01009 
01010       445,  445,  445,  445,    0,  445,  446,    0,  446,  446,
01011         0,  446,  447,  447,    0,    0,  447,    0,    0,    0,
01012       447,  447,    0,  447,  447,  447,  447,    0,  447,  448,
01013       448,    0,    0,  448,    0,    0,    0,  448,  448,  448,
01014       448,  448,  448,  448,    0,  448,  449,  449,  449,  449,
01015       449,  449,  449,  449,  449,  449,  449,  449,  449,  449,
01016       449,  449,  449,  450,    0,  450,  450,    0,  450,  451,
01017         0,  451,  451,    0,  451,  452,  452,  452,  452,  452,
01018       452,  452,  452,  452,  452,  452,  452,  452,  452,  452,
01019       452,  452,  453,  453,    0,  453,    0,  453,  453,  453,
01020 
01021       453,  453,    0,  453,  453,  453,  453,    0,  453,  454,
01022       454,  454,    0,  454,  454,  454,  454,  455,  455,    0,
01023       455,  455,  455,  455,  455,  455,  455,  455,  455,  455,
01024       455,  455,  455,  455,  456,  456,    0,  456,  456,  456,
01025       456,  456,    0,  456,    0,  456,  456,  456,  456,    0,
01026       456,  457,  457,    0,    0,    0,    0,  457,  457,  457,
01027       457,    0,    0,  457,    0,    0,    0,  457,  459,  459,
01028         0,  459,  459,  459,  459,  459,  459,  459,  459,  459,
01029       459,  459,  459,  459,  459,  415,  415,  415,  415,  415,
01030       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
01031 
01032       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
01033       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
01034       415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
01035       415,  415,  415,  415,  415
01036     } ;
01037 
01038 static yy_state_type yy_last_accepting_state;
01039 static char *yy_last_accepting_cpos;
01040 
01041 extern int ppy__flex_debug;
01042 int ppy__flex_debug = 0;
01043 
01044 /* The intent behind this definition is that it'll catch
01045  * any uses of REJECT which flex missed.
01046  */
01047 #define REJECT reject_used_but_not_detected
01048 #define yymore() yymore_used_but_not_detected
01049 #define YY_MORE_ADJ 0
01050 #define YY_RESTORE_YY_MORE_OFFSET
01051 char *ppy_text;
01052 #line 1 "ppl.l"
01053 /* -*-C-*-
01054  * Wrc preprocessor lexical analysis
01055  *
01056  * Copyright 1999-2000  Bertho A. Stultiens (BS)
01057  *
01058  * This library is free software; you can redistribute it and/or
01059  * modify it under the terms of the GNU Lesser General Public
01060  * License as published by the Free Software Foundation; either
01061  * version 2.1 of the License, or (at your option) any later version.
01062  *
01063  * This library is distributed in the hope that it will be useful,
01064  * but WITHOUT ANY WARRANTY; without even the implied warranty of
01065  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01066  * Lesser General Public License for more details.
01067  *
01068  * You should have received a copy of the GNU Lesser General Public
01069  * License along with this library; if not, write to the Free Software
01070  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
01071  *
01072  * History:
01073  * 24-Apr-2000 BS   - Started from scratch to restructure everything
01074  *            and reintegrate the source into the wine-tree.
01075  * 04-Jan-2000 BS   - Added comments about the lexicographical
01076  *            grammar to give some insight in the complexity.
01077  * 28-Dec-1999 BS   - Eliminated backing-up of the flexer by running
01078  *            `flex -b' on the source. This results in some
01079  *            weirdo extra rules, but a much faster scanner.
01080  * 23-Dec-1999 BS   - Started this file
01081  *
01082  *-------------------------------------------------------------------------
01083  * The preprocessor's lexographical grammar (approximately):
01084  *
01085  * pp       := {ws} # {ws} if {ws} {expr} {ws} \n
01086  *      |  {ws} # {ws} ifdef {ws} {id} {ws} \n
01087  *      |  {ws} # {ws} ifndef {ws} {id} {ws} \n
01088  *      |  {ws} # {ws} elif {ws} {expr} {ws} \n
01089  *      |  {ws} # {ws} else {ws} \n
01090  *      |  {ws} # {ws} endif {ws} \n
01091  *      |  {ws} # {ws} include {ws} < {anytext} > \n
01092  *      |  {ws} # {ws} include {ws} " {anytext} " \n
01093  *      |  {ws} # {ws} define {ws} {anytext} \n
01094  *      |  {ws} # {ws} define( {arglist} ) {ws} {expansion} \n
01095  *      |  {ws} # {ws} pragma {ws} {anytext} \n
01096  *      |  {ws} # {ws} ident {ws} {anytext} \n
01097  *      |  {ws} # {ws} error {ws} {anytext} \n
01098  *      |  {ws} # {ws} warning {ws} {anytext} \n
01099  *      |  {ws} # {ws} line {ws} " {anytext} " {number} \n
01100  *      |  {ws} # {ws} {number} " {anytext} " {number} [ {number} [{number}] ] \n
01101  *      |  {ws} # {ws} \n
01102  *
01103  * ws       := [ \t\r\f\v]*
01104  *
01105  * expr     := {expr} [+-*%^/|&] {expr}
01106  *      |  {expr} {logor|logand} {expr}
01107  *      |  [!~+-] {expr}
01108  *      |  {expr} ? {expr} : {expr}
01109  *
01110  * logor    := ||
01111  *
01112  * logand   := &&
01113  *
01114  * id       := [a-zA-Z_][a-zA-Z0-9_]*
01115  *
01116  * anytext  := [^\n]*   (see note)
01117  *
01118  * arglist  :=
01119  *      |  {id}
01120  *      |  {arglist} , {id}
01121  *      |  {arglist} , {id} ...
01122  *
01123  * expansion    := {id}
01124  *      |  # {id}
01125  *      |  {anytext}
01126  *      |  {anytext} ## {anytext}
01127  *
01128  * number   := [0-9]+
01129  *
01130  * Note: "anytext" is not always "[^\n]*". This is because the
01131  *   trailing context must be considered as well.
01132  *
01133  * The only certain assumption for the preprocessor to make is that
01134  * directives start at the beginning of the line, followed by a '#'
01135  * and end with a newline.
01136  * Any directive may be suffixed with a line-continuation. Also
01137  * classical comment / *...* / (note: no comments within comments,
01138  * therefore spaces) is considered to be a line-continuation
01139  * (according to gcc and egcs AFAIK, ANSI is a bit vague).
01140  * Comments have not been added to the above grammar for simplicity
01141  * reasons. However, it is allowed to enter comment anywhere within
01142  * the directives as long as they do not interfere with the context.
01143  * All comments are considered to be deletable whitespace (both
01144  * classical form "/ *...* /" and C++ form "//...\n").
01145  *
01146  * All recursive scans, except for macro-expansion, are done by the
01147  * parser, whereas the simple state transitions of non-recursive
01148  * directives are done in the scanner. This results in the many
01149  * exclusive start-conditions of the scanner.
01150  *
01151  * Macro expansions are slightly more difficult because they have to
01152  * prescan the arguments. Parameter substitution is literal if the
01153  * substitution is # or ## (either side). This enables new identifiers
01154  * to be created (see 'info cpp' node Macro|Pitfalls|Prescan for more
01155  * information).
01156  *
01157  * FIXME: Variable macro parameters is recognized, but not yet
01158  * expanded. I have to reread the ANSI standard on the subject (yes,
01159  * ANSI defines it).
01160  *
01161  * The following special defines are supported:
01162  * __FILE__ -> "thissource.c"
01163  * __LINE__ -> 123
01164  * __DATE__ -> "May  1 2000"
01165  * __TIME__ -> "23:59:59"
01166  * These macros expand, as expected, into their ANSI defined values.
01167  *
01168  * The same include prevention is implemented as gcc and egcs does.
01169  * This results in faster processing because we do not read the text
01170  * at all. Some wine-sources attempt to include the same file 4 or 5
01171  * times. This strategy also saves a lot blank output-lines, which in
01172  * its turn improves the real resource scanner/parser.
01173  *
01174  */
01175 
01176 /*
01177  * Special flex options and exclusive scanner start-conditions
01178  */
01179 #define YY_NO_INPUT 1
01180 
01181 
01182 
01183 
01184 
01185 
01186 
01187 
01188 
01189 
01190 
01191 
01192 
01193 
01194 
01195 
01196 
01197 
01198 
01199 
01200 
01201 #line 164 "ppl.l"
01202 #include <stdio.h>
01203 #include <stdlib.h>
01204 #include <string.h>
01205 #include <ctype.h>
01206 #include <assert.h>
01207 #include <errno.h>
01208 #include <limits.h>
01209 
01210 #ifndef LLONG_MAX
01211 # define LLONG_MAX  ((long long)0x7fffffff << 32 | 0xffffffff)
01212 # define LLONG_MIN  (-LLONG_MAX - 1)
01213 #endif
01214 #ifndef ULLONG_MAX
01215 # define ULLONG_MAX ((long long)0xffffffff << 32 | 0xffffffff)
01216 #endif
01217 
01218 #ifndef HAVE_UNISTD_H
01219 #define YY_NO_UNISTD_H
01220 #endif
01221 
01222 #include "wine/wpp.h"
01223 #include "wpp_private.h"
01224 #include "ppy.tab.h"
01225 
01226 /*
01227  * Make sure that we are running an appropriate version of flex.
01228  */
01229 #if !defined(YY_FLEX_MAJOR_VERSION) || (1000 * YY_FLEX_MAJOR_VERSION + YY_FLEX_MINOR_VERSION < 2005)
01230 #error Must use flex version 2.5.1 or higher (yy_scan_* routines are required).
01231 #endif
01232 
01233 #define YY_READ_BUF_SIZE    65536       /* So we read most of a file at once */
01234 
01235 #define yy_current_state()  YY_START
01236 #define yy_pp_state(x)      yy_pop_state(); yy_push_state(x)
01237 
01238 /*
01239  * Always update the current character position within a line
01240  */
01241 #define YY_USER_ACTION  pp_status.char_number+=ppy_leng;
01242 
01243 /*
01244  * Buffer management for includes and expansions
01245  */
01246 #define MAXBUFFERSTACK  128 /* Nesting more than 128 includes or macro expansion textss is insane */
01247 
01248 typedef struct bufferstackentry {
01249     YY_BUFFER_STATE bufferstate;    /* Buffer to switch back to */
01250     void        *filehandle;    /* Handle to be used with wpp_callbacks->read */
01251     pp_entry_t  *define;    /* Points to expanding define or NULL if handling includes */
01252     int     line_number;    /* Line that we were handling */
01253     int     char_number;    /* The current position on that line */
01254     const char  *filename;  /* Filename that we were handling */
01255     int     if_depth;   /* How many #if:s deep to check matching #endif:s */
01256     int     ncontinuations; /* Remember the continuation state */
01257     int     should_pop; /* Set if we must pop the start-state on EOF */
01258     /* Include management */
01259         include_state_t incl;
01260     char        *include_filename;
01261 } bufferstackentry_t;
01262 
01263 #define ALLOCBLOCKSIZE  (1 << 10)   /* Allocate these chunks at a time for string-buffers */
01264 
01265 /*
01266  * Macro expansion nesting
01267  * We need the stack to handle expansions while scanning
01268  * a macro's arguments. The TOS must always be the macro
01269  * that receives the current expansion from the scanner.
01270  */
01271 #define MAXMACEXPSTACK  128 /* Nesting more than 128 macro expansions is insane */
01272 
01273 typedef struct macexpstackentry {
01274     pp_entry_t  *ppp;       /* This macro we are scanning */
01275     char        **args;     /* With these arguments */
01276     char        **ppargs;   /* Resulting in these preprocessed arguments */
01277     int     *nnls;      /* Number of newlines per argument */
01278     int     nargs;      /* And this many arguments scanned */
01279     int     parentheses;    /* Nesting level of () */
01280     int     curargsize; /* Current scanning argument's size */
01281     int     curargalloc;    /* Current scanning argument's block allocated */
01282     char        *curarg;    /* Current scanning argument's content */
01283 } macexpstackentry_t;
01284 
01285 #define MACROPARENTHESES()  (top_macro()->parentheses)
01286 
01287 /*
01288  * Prototypes
01289  */
01290 static void newline(int);
01291 static int make_number(int radix, YYSTYPE *val, const char *str, int len);
01292 static void put_buffer(const char *s, int len);
01293 /* Buffer management */
01294 static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop);
01295 static bufferstackentry_t *pop_buffer(void);
01296 /* String functions */
01297 static void new_string(void);
01298 static void add_string(const char *str, int len);
01299 static char *get_string(void);
01300 static void put_string(void);
01301 static int string_start(void);
01302 /* Macro functions */
01303 static void push_macro(pp_entry_t *ppp);
01304 static macexpstackentry_t *top_macro(void);
01305 static macexpstackentry_t *pop_macro(void);
01306 static void free_macro(macexpstackentry_t *mep);
01307 static void add_text_to_macro(const char *text, int len);
01308 static void macro_add_arg(int last);
01309 static void macro_add_expansion(void);
01310 /* Expansion */
01311 static void expand_special(pp_entry_t *ppp);
01312 static void expand_define(pp_entry_t *ppp);
01313 static void expand_macro(macexpstackentry_t *mep);
01314 
01315 /*
01316  * Local variables
01317  */
01318 static int ncontinuations;
01319 
01320 static int strbuf_idx = 0;
01321 static int strbuf_alloc = 0;
01322 static char *strbuffer = NULL;
01323 static int str_startline;
01324 
01325 static macexpstackentry_t *macexpstack[MAXMACEXPSTACK];
01326 static int macexpstackidx = 0;
01327 
01328 static bufferstackentry_t bufferstack[MAXBUFFERSTACK];
01329 static int bufferstackidx = 0;
01330 
01331 /*
01332  * Global variables
01333  */
01334 include_state_t pp_incl_state =
01335 {
01336     -1,    /* state */
01337     NULL,  /* ppp */
01338     0,     /* ifdepth */
01339     0      /* seen_junk */
01340 };
01341 
01342 includelogicentry_t *pp_includelogiclist = NULL;
01343 
01344 #define YY_INPUT(buf,result,max_size)                        \
01345     {                                    \
01346         result = wpp_callbacks->read(pp_status.file, buf, max_size); \
01347     }
01348 
01349 #define BUFFERINITIALCAPACITY 256
01350 
01351 void pp_writestring(const char *format, ...)
01352 {
01353     va_list valist;
01354     int len;
01355     static char *buffer;
01356     static int buffercapacity;
01357     char *new_buffer;
01358 
01359     if(buffercapacity == 0)
01360     {
01361         buffer = pp_xmalloc(BUFFERINITIALCAPACITY);
01362         if(buffer == NULL)
01363             return;
01364         buffercapacity = BUFFERINITIALCAPACITY;
01365     }
01366 
01367     va_start(valist, format);
01368     len = vsnprintf(buffer, buffercapacity,
01369             format, valist);
01370         /* If the string is longer than buffersize, vsnprintf returns
01371          * the string length with glibc >= 2.1, -1 with glibc < 2.1 */
01372     while(len > buffercapacity || len < 0)
01373     {
01374         do
01375         {
01376             buffercapacity *= 2;
01377         } while(len > buffercapacity);
01378 
01379         new_buffer = pp_xrealloc(buffer, buffercapacity);
01380         if(new_buffer == NULL)
01381         {
01382             va_end(valist);
01383             return;
01384         }
01385         buffer = new_buffer;
01386         len = vsnprintf(buffer, buffercapacity,
01387                 format, valist);
01388     }
01389     va_end(valist);
01390 
01391     wpp_callbacks->write(buffer, len);
01392 }
01393 
01394 /*
01395  **************************************************************************
01396  * The scanner starts here
01397  **************************************************************************
01398  */
01399 #line 1400 "lex.yy.c"
01400 
01401 #define INITIAL 0
01402 #define pp_pp 1
01403 #define pp_eol 2
01404 #define pp_inc 3
01405 #define pp_dqs 4
01406 #define pp_sqs 5
01407 #define pp_iqs 6
01408 #define pp_comment 7
01409 #define pp_def 8
01410 #define pp_define 9
01411 #define pp_macro 10
01412 #define pp_mbody 11
01413 #define pp_macign 12
01414 #define pp_macscan 13
01415 #define pp_macexp 14
01416 #define pp_if 15
01417 #define pp_ifd 16
01418 #define pp_endif 17
01419 #define pp_line 18
01420 #define pp_defined 19
01421 #define pp_ignore 20
01422 #define RCINCL 21
01423 
01424 #ifndef YY_NO_UNISTD_H
01425 /* Special case for "unistd.h", since it is non-ANSI. We include it way
01426  * down here because we want the user's section 1 to have been scanned first.
01427  * The user has a chance to override it with an option.
01428  */
01429 #include <unistd.h>
01430 #endif
01431 
01432 #ifndef YY_EXTRA_TYPE
01433 #define YY_EXTRA_TYPE void *
01434 #endif
01435 
01436 static int yy_init_globals (void );
01437 
01438 /* Accessor methods to globals.
01439    These are made visible to non-reentrant scanners for convenience. */
01440 
01441 int ppy_lex_destroy (void );
01442 
01443 int ppy_get_debug (void );
01444 
01445 void ppy_set_debug (int debug_flag  );
01446 
01447 YY_EXTRA_TYPE ppy_get_extra (void );
01448 
01449 void ppy_set_extra (YY_EXTRA_TYPE user_defined  );
01450 
01451 FILE *ppy_get_in (void );
01452 
01453 void ppy_set_in  (FILE * in_str  );
01454 
01455 FILE *ppy_get_out (void );
01456 
01457 void ppy_set_out  (FILE * out_str  );
01458 
01459 int ppy_get_leng (void );
01460 
01461 char *ppy_get_text (void );
01462 
01463 int ppy_get_lineno (void );
01464 
01465 void ppy_set_lineno (int line_number  );
01466 
01467 /* Macros after this point can all be overridden by user definitions in
01468  * section 1.
01469  */
01470 
01471 #ifndef YY_SKIP_YYWRAP
01472 #ifdef __cplusplus
01473 extern "C" int ppy_wrap (void );
01474 #else
01475 extern int ppy_wrap (void );
01476 #endif
01477 #endif
01478 
01479 #ifndef yytext_ptr
01480 static void yy_flex_strncpy (char *,yyconst char *,int );
01481 #endif
01482 
01483 #ifdef YY_NEED_STRLEN
01484 static int yy_flex_strlen (yyconst char * );
01485 #endif
01486 
01487 #ifndef YY_NO_INPUT
01488 
01489 #ifdef __cplusplus
01490 static int yyinput (void );
01491 #else
01492 static int input (void );
01493 #endif
01494 
01495 #endif
01496 
01497         static int yy_start_stack_ptr = 0;
01498         static int yy_start_stack_depth = 0;
01499         static int *yy_start_stack = NULL;
01500     
01501     static void yy_push_state (int new_state );
01502     
01503     static void yy_pop_state (void );
01504     
01505     static int yy_top_state (void );
01506     
01507 /* Amount of stuff to slurp up with each read. */
01508 #ifndef YY_READ_BUF_SIZE
01509 #ifdef __ia64__
01510 /* On IA-64, the buffer size is 16k, not 8k */
01511 #define YY_READ_BUF_SIZE 16384
01512 #else
01513 #define YY_READ_BUF_SIZE 8192
01514 #endif /* __ia64__ */
01515 #endif
01516 
01517 /* Copy whatever the last rule matched to the standard output. */
01518 #ifndef ECHO
01519 /* This used to be an fputs(), but since the string might contain NUL's,
01520  * we now use fwrite().
01521  */
01522 #define ECHO do { if (fwrite( ppy_text, ppy_leng, 1, ppy_out )) {} } while (0)
01523 #endif
01524 
01525 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
01526  * is returned in "result".
01527  */
01528 #ifndef YY_INPUT
01529 #define YY_INPUT(buf,result,max_size) \
01530     if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
01531         { \
01532         int c = '*'; \
01533         size_t n; \
01534         for ( n = 0; n < max_size && \
01535                  (c = getc( ppy_in )) != EOF && c != '\n'; ++n ) \
01536             buf[n] = (char) c; \
01537         if ( c == '\n' ) \
01538             buf[n++] = (char) c; \
01539         if ( c == EOF && ferror( ppy_in ) ) \
01540             YY_FATAL_ERROR( "input in flex scanner failed" ); \
01541         result = n; \
01542         } \
01543     else \
01544         { \
01545         errno=0; \
01546         while ( (result = fread(buf, 1, max_size, ppy_in))==0 && ferror(ppy_in)) \
01547             { \
01548             if( errno != EINTR) \
01549                 { \
01550                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
01551                 break; \
01552                 } \
01553             errno=0; \
01554             clearerr(ppy_in); \
01555             } \
01556         }\
01557 \
01558 
01559 #endif
01560 
01561 /* No semi-colon after return; correct usage is to write "yyterminate();" -
01562  * we don't want an extra ';' after the "return" because that will cause
01563  * some compilers to complain about unreachable statements.
01564  */
01565 #ifndef yyterminate
01566 #define yyterminate() return YY_NULL
01567 #endif
01568 
01569 /* Number of entries by which start-condition stack grows. */
01570 #ifndef YY_START_STACK_INCR
01571 #define YY_START_STACK_INCR 25
01572 #endif
01573 
01574 /* Report a fatal error. */
01575 #ifndef YY_FATAL_ERROR
01576 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
01577 #endif
01578 
01579 /* end tables serialization structures and prototypes */
01580 
01581 /* Default declaration of generated scanner - a define so the user can
01582  * easily add parameters.
01583  */
01584 #ifndef YY_DECL
01585 #define YY_DECL_IS_OURS 1
01586 
01587 extern int ppy_lex (void);
01588 
01589 #define YY_DECL int ppy_lex (void)
01590 #endif /* !YY_DECL */
01591 
01592 /* Code executed at the beginning of each rule, after ppy_text and ppy_leng
01593  * have been set up.
01594  */
01595 #ifndef YY_USER_ACTION
01596 #define YY_USER_ACTION
01597 #endif
01598 
01599 /* Code executed at the end of each rule. */
01600 #ifndef YY_BREAK
01601 #define YY_BREAK break;
01602 #endif
01603 
01604 #define YY_RULE_SETUP \
01605     if ( ppy_leng > 0 ) \
01606         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
01607                 (ppy_text[ppy_leng - 1] == '\n'); \
01608     YY_USER_ACTION
01609 
01612 YY_DECL
01613 {
01614     register yy_state_type yy_current_state;
01615     register char *yy_cp, *yy_bp;
01616     register int yy_act;
01617     
01618 #line 364 "ppl.l"
01619 
01620     /*
01621      * Catch line-continuations.
01622      * Note: Gcc keeps the line-continuations in, for example, strings
01623      * intact. However, I prefer to remove them all so that the next
01624      * scanner will not need to reduce the continuation state.
01625      *
01626      * <*>\\\n      newline(0);
01627      */
01628 
01629     /*
01630      * Detect the leading # of a preprocessor directive.
01631      */
01632 #line 1633 "lex.yy.c"
01633 
01634     if ( !(yy_init) )
01635         {
01636         (yy_init) = 1;
01637 
01638 #ifdef YY_USER_INIT
01639         YY_USER_INIT;
01640 #endif
01641 
01642         if ( ! (yy_start) )
01643             (yy_start) = 1; /* first start state */
01644 
01645         if ( ! ppy_in )
01646             ppy_in = stdin;
01647 
01648         if ( ! ppy_out )
01649             ppy_out = stdout;
01650 
01651         if ( ! YY_CURRENT_BUFFER ) {
01652             ppy_ensure_buffer_stack ();
01653             YY_CURRENT_BUFFER_LVALUE =
01654                 ppy__create_buffer(ppy_in,YY_BUF_SIZE );
01655         }
01656 
01657         ppy__load_buffer_state( );
01658         }
01659 
01660     while ( 1 )     /* loops until end-of-file is reached */
01661         {
01662         yy_cp = (yy_c_buf_p);
01663 
01664         /* Support of ppy_text. */
01665         *yy_cp = (yy_hold_char);
01666 
01667         /* yy_bp points to the position in yy_ch_buf of the start of
01668          * the current run.
01669          */
01670         yy_bp = yy_cp;
01671 
01672         yy_current_state = (yy_start);
01673         yy_current_state += YY_AT_BOL();
01674 yy_match:
01675         do
01676             {
01677             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
01678             if ( yy_accept[yy_current_state] )
01679                 {
01680                 (yy_last_accepting_state) = yy_current_state;
01681                 (yy_last_accepting_cpos) = yy_cp;
01682                 }
01683             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01684                 {
01685                 yy_current_state = (int) yy_def[yy_current_state];
01686                 if ( yy_current_state >= 416 )
01687                     yy_c = yy_meta[(unsigned int) yy_c];
01688                 }
01689             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01690             ++yy_cp;
01691             }
01692         while ( yy_current_state != 415 );
01693         yy_cp = (yy_last_accepting_cpos);
01694         yy_current_state = (yy_last_accepting_state);
01695 
01696 yy_find_action:
01697         yy_act = yy_accept[yy_current_state];
01698 
01699         YY_DO_BEFORE_ACTION;
01700 
01701 do_action:  /* This label is used only to access EOF actions. */
01702 
01703         switch ( yy_act )
01704     { /* beginning of action switch */
01705             case 0: /* must back up */
01706             /* undo the effects of YY_DO_BEFORE_ACTION */
01707             *yy_cp = (yy_hold_char);
01708             yy_cp = (yy_last_accepting_cpos);
01709             yy_current_state = (yy_last_accepting_state);
01710             goto yy_find_action;
01711 
01712 case 1:
01713 YY_RULE_SETUP
01714 #line 377 "ppl.l"
01715 pp_incl_state.seen_junk++; yy_push_state(pp_pp);
01716     YY_BREAK
01717 /*
01718      * Scan for the preprocessor directives
01719      */
01720 case 2:
01721 YY_RULE_SETUP
01722 #line 382 "ppl.l"
01723 if(yy_top_state() != pp_ignore) {yy_pp_state(pp_inc); return tINCLUDE;} else {yy_pp_state(pp_eol);}
01724     YY_BREAK
01725 case 3:
01726 YY_RULE_SETUP
01727 #line 383 "ppl.l"
01728 yy_pp_state(yy_current_state() != pp_ignore ? pp_def : pp_eol);
01729     YY_BREAK
01730 case 4:
01731 YY_RULE_SETUP
01732 #line 384 "ppl.l"
01733 yy_pp_state(pp_eol);    if(yy_top_state() != pp_ignore) return tERROR;
01734     YY_BREAK
01735 case 5:
01736 YY_RULE_SETUP
01737 #line 385 "ppl.l"
01738 yy_pp_state(pp_eol);    if(yy_top_state() != pp_ignore) return tWARNING;
01739     YY_BREAK
01740 case 6:
01741 YY_RULE_SETUP
01742 #line 386 "ppl.l"
01743 yy_pp_state(pp_eol);    if(yy_top_state() != pp_ignore) return tPRAGMA;
01744     YY_BREAK
01745 case 7:
01746 YY_RULE_SETUP
01747 #line 387 "ppl.l"
01748 yy_pp_state(pp_eol);    if(yy_top_state() != pp_ignore) return tPPIDENT;
01749     YY_BREAK
01750 case 8:
01751 YY_RULE_SETUP
01752 #line 388 "ppl.l"
01753 if(yy_top_state() != pp_ignore) {yy_pp_state(pp_ifd); return tUNDEF;} else {yy_pp_state(pp_eol);}
01754     YY_BREAK
01755 case 9:
01756 YY_RULE_SETUP
01757 #line 389 "ppl.l"
01758 yy_pp_state(pp_ifd);    return tIFDEF;
01759     YY_BREAK
01760 case 10:
01761 YY_RULE_SETUP
01762 #line 390 "ppl.l"
01763 pp_incl_state.seen_junk--; yy_pp_state(pp_ifd); return tIFNDEF;
01764     YY_BREAK
01765 case 11:
01766 YY_RULE_SETUP
01767 #line 391 "ppl.l"
01768 yy_pp_state(pp_if); return tIF;
01769     YY_BREAK
01770 case 12:
01771 YY_RULE_SETUP
01772 #line 392 "ppl.l"
01773 yy_pp_state(pp_if); return tELIF;
01774     YY_BREAK
01775 case 13:
01776 YY_RULE_SETUP
01777 #line 393 "ppl.l"
01778 yy_pp_state(pp_endif);  return tELSE;
01779     YY_BREAK
01780 case 14:
01781 YY_RULE_SETUP
01782 #line 394 "ppl.l"
01783 yy_pp_state(pp_endif);  return tENDIF;
01784     YY_BREAK
01785 case 15:
01786 YY_RULE_SETUP
01787 #line 395 "ppl.l"
01788 if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tLINE;} else {yy_pp_state(pp_eol);}
01789     YY_BREAK
01790 case 16:
01791 YY_RULE_SETUP
01792 #line 396 "ppl.l"
01793 if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tGCCLINE;} else {yy_pp_state(pp_eol);}
01794     YY_BREAK
01795 case 17:
01796 YY_RULE_SETUP
01797 #line 397 "ppl.l"
01798 ppy_error("Invalid preprocessor token '%s'", ppy_text);
01799     YY_BREAK
01800 case 18:
01801 /* rule 18 can match eol */
01802 YY_RULE_SETUP
01803 #line 398 "ppl.l"
01804 newline(1); yy_pop_state(); return tNL; /* This could be the null-token */
01805     YY_BREAK
01806 case 19:
01807 /* rule 19 can match eol */
01808 YY_RULE_SETUP
01809 #line 399 "ppl.l"
01810 newline(0);
01811     YY_BREAK
01812 case 20:
01813 YY_RULE_SETUP
01814 #line 400 "ppl.l"
01815 ppy_error("Preprocessor junk '%s'", ppy_text);
01816     YY_BREAK
01817 case 21:
01818 YY_RULE_SETUP
01819 #line 401 "ppl.l"
01820 return *ppy_text;
01821     YY_BREAK
01822 /*
01823      * Handle #include and #line
01824      */
01825 case 22:
01826 YY_RULE_SETUP
01827 #line 406 "ppl.l"
01828 return make_number(10, &ppy_lval, ppy_text, ppy_leng);
01829     YY_BREAK
01830 case 23:
01831 YY_RULE_SETUP
01832 #line 407 "ppl.l"
01833 new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_iqs);
01834     YY_BREAK
01835 case 24:
01836 YY_RULE_SETUP
01837 #line 408 "ppl.l"
01838 new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs);
01839     YY_BREAK
01840 case 25:
01841 YY_RULE_SETUP
01842 #line 409 "ppl.l"
01843 ;
01844     YY_BREAK
01845 case 26:
01846 /* rule 26 can match eol */
01847 YY_RULE_SETUP
01848 #line 410 "ppl.l"
01849 newline(1); yy_pop_state(); return tNL;
01850     YY_BREAK
01851 case 27:
01852 /* rule 27 can match eol */
01853 YY_RULE_SETUP
01854 #line 411 "ppl.l"
01855 newline(0);
01856     YY_BREAK
01857 case 28:
01858 YY_RULE_SETUP
01859 #line 412 "ppl.l"
01860 ppy_error(yy_current_state() == pp_inc ? "Trailing junk in #include" : "Trailing junk in #line");
01861     YY_BREAK
01862 /*
01863      * Ignore all input when a false clause is parsed
01864      */
01865 case 29:
01866 YY_RULE_SETUP
01867 #line 417 "ppl.l"
01868 ;
01869     YY_BREAK
01870 case 30:
01871 /* rule 30 can match eol */
01872 YY_RULE_SETUP
01873 #line 418 "ppl.l"
01874 newline(1);
01875     YY_BREAK
01876 case 31:
01877 /* rule 31 can match eol */
01878 YY_RULE_SETUP
01879 #line 419 "ppl.l"
01880 newline(0);
01881     YY_BREAK
01882 case 32:
01883 YY_RULE_SETUP
01884 #line 420 "ppl.l"
01885 ;
01886     YY_BREAK
01887 /*
01888      * Handle #if and #elif.
01889      * These require conditionals to be evaluated, but we do not
01890      * want to jam the scanner normally when we see these tokens.
01891      * Note: tIDENT is handled below.
01892      */
01893 case 33:
01894 YY_RULE_SETUP
01895 #line 429 "ppl.l"
01896 return make_number(8, &ppy_lval, ppy_text, ppy_leng);
01897     YY_BREAK
01898 case 34:
01899 YY_RULE_SETUP
01900 #line 430 "ppl.l"
01901 ppy_error("Invalid octal digit");
01902     YY_BREAK
01903 case 35:
01904 YY_RULE_SETUP
01905 #line 431 "ppl.l"
01906 return make_number(10, &ppy_lval, ppy_text, ppy_leng);
01907     YY_BREAK
01908 case 36:
01909 YY_RULE_SETUP
01910 #line 432 "ppl.l"
01911 return make_number(16, &ppy_lval, ppy_text, ppy_leng);
01912     YY_BREAK
01913 case 37:
01914 YY_RULE_SETUP
01915 #line 433 "ppl.l"
01916 ppy_error("Invalid hex number");
01917     YY_BREAK
01918 case 38:
01919 YY_RULE_SETUP
01920 #line 434 "ppl.l"
01921 yy_push_state(pp_defined); return tDEFINED;
01922     YY_BREAK
01923 case 39:
01924 YY_RULE_SETUP
01925 #line 435 "ppl.l"
01926 return tLSHIFT;
01927     YY_BREAK
01928 case 40:
01929 YY_RULE_SETUP
01930 #line 436 "ppl.l"
01931 return tRSHIFT;
01932     YY_BREAK
01933 case 41:
01934 YY_RULE_SETUP
01935 #line 437 "ppl.l"
01936 return tLOGAND;
01937     YY_BREAK
01938 case 42:
01939 YY_RULE_SETUP
01940 #line 438 "ppl.l"
01941 return tLOGOR;
01942     YY_BREAK
01943 case 43:
01944 YY_RULE_SETUP
01945 #line 439 "ppl.l"
01946 return tEQ;
01947     YY_BREAK
01948 case 44:
01949 YY_RULE_SETUP
01950 #line 440 "ppl.l"
01951 return tNE;
01952     YY_BREAK
01953 case 45:
01954 YY_RULE_SETUP
01955 #line 441 "ppl.l"
01956 return tLTE;
01957     YY_BREAK
01958 case 46:
01959 YY_RULE_SETUP
01960 #line 442 "ppl.l"
01961 return tGTE;
01962     YY_BREAK
01963 case 47:
01964 /* rule 47 can match eol */
01965 YY_RULE_SETUP
01966 #line 443 "ppl.l"
01967 newline(1); yy_pop_state(); return tNL;
01968     YY_BREAK
01969 case 48:
01970 /* rule 48 can match eol */
01971 YY_RULE_SETUP
01972 #line 444 "ppl.l"
01973 newline(0);
01974     YY_BREAK
01975 case 49:
01976 YY_RULE_SETUP
01977 #line 445 "ppl.l"
01978 ppy_error("Junk in conditional expression");
01979     YY_BREAK
01980 case 50:
01981 YY_RULE_SETUP
01982 #line 446 "ppl.l"
01983 ;
01984     YY_BREAK
01985 case 51:
01986 YY_RULE_SETUP
01987 #line 447 "ppl.l"
01988 new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs);
01989     YY_BREAK
01990 case 52:
01991 YY_RULE_SETUP
01992 #line 448 "ppl.l"
01993 ppy_error("String constants not allowed in conditionals");
01994     YY_BREAK
01995 case 53:
01996 YY_RULE_SETUP
01997 #line 449 "ppl.l"
01998 return *ppy_text;
01999     YY_BREAK
02000 /*
02001      * Handle #ifdef, #ifndef and #undef
02002      * to get only an untranslated/unexpanded identifier
02003      */
02004 case 54:
02005 YY_RULE_SETUP
02006 #line 455 "ppl.l"
02007 ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT;
02008     YY_BREAK
02009 case 55:
02010 YY_RULE_SETUP
02011 #line 456 "ppl.l"
02012 ;
02013     YY_BREAK
02014 case 56:
02015 /* rule 56 can match eol */
02016 YY_RULE_SETUP
02017 #line 457 "ppl.l"
02018 newline(1); yy_pop_state(); return tNL;
02019     YY_BREAK
02020 case 57:
02021 /* rule 57 can match eol */
02022 YY_RULE_SETUP
02023 #line 458 "ppl.l"
02024 newline(0);
02025     YY_BREAK
02026 case 58:
02027 YY_RULE_SETUP
02028 #line 459 "ppl.l"
02029 ppy_error("Identifier expected");
02030     YY_BREAK
02031 /*
02032      * Handle #else and #endif.
02033      */
02034 case 59:
02035 YY_RULE_SETUP
02036 #line 464 "ppl.l"
02037 ;
02038     YY_BREAK
02039 case 60:
02040 /* rule 60 can match eol */
02041 YY_RULE_SETUP
02042 #line 465 "ppl.l"
02043 newline(1); yy_pop_state(); return tNL;
02044     YY_BREAK
02045 case 61:
02046 /* rule 61 can match eol */
02047 YY_RULE_SETUP
02048 #line 466 "ppl.l"
02049 newline(0);
02050     YY_BREAK
02051 case 62:
02052 YY_RULE_SETUP
02053 #line 467 "ppl.l"
02054 ppy_error("Garbage after #else or #endif.");
02055     YY_BREAK
02056 /*
02057      * Handle the special 'defined' keyword.
02058      * This is necessary to get the identifier prior to any
02059      * substitutions.
02060      */
02061 case 63:
02062 YY_RULE_SETUP
02063 #line 474 "ppl.l"
02064 yy_pop_state(); ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT;
02065     YY_BREAK
02066 case 64:
02067 YY_RULE_SETUP
02068 #line 475 "ppl.l"
02069 ;
02070     YY_BREAK
02071 case 65:
02072 YY_RULE_SETUP
02073 #line 476 "ppl.l"
02074 return *ppy_text;
02075     YY_BREAK
02076 case 66:
02077 /* rule 66 can match eol */
02078 YY_RULE_SETUP
02079 #line 477 "ppl.l"
02080 newline(0);
02081     YY_BREAK
02082 case 67:
02083 /* rule 67 can match eol */
02084 YY_RULE_SETUP
02085 #line 478 "ppl.l"
02086 ppy_error("Identifier expected");
02087     YY_BREAK
02088 /*
02089      * Handle #error, #warning, #pragma and #ident.
02090      * Pass everything literally to the parser, which
02091      * will act appropriately.
02092      * Comments are stripped from the literal text.
02093      */
02094 case 68:
02095 YY_RULE_SETUP
02096 #line 486 "ppl.l"
02097 if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; }
02098     YY_BREAK
02099 case 69:
02100 YY_RULE_SETUP
02101 #line 487 "ppl.l"
02102 if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; }
02103     YY_BREAK
02104 case 70:
02105 /* rule 70 can match eol */
02106 YY_RULE_SETUP
02107 #line 488 "ppl.l"
02108 if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; }
02109     YY_BREAK
02110 case 71:
02111 /* rule 71 can match eol */
02112 YY_RULE_SETUP
02113 #line 489 "ppl.l"
02114 newline(1); yy_pop_state(); if(yy_current_state() != pp_ignore) { return tNL; }
02115     YY_BREAK
02116 case 72:
02117 /* rule 72 can match eol */
02118 YY_RULE_SETUP
02119 #line 490 "ppl.l"
02120 newline(0);
02121     YY_BREAK
02122 /*
02123      * Handle left side of #define
02124      */
02125 case 73:
02126 YY_RULE_SETUP
02127 #line 495 "ppl.l"
02128 ppy_lval.cptr = pp_xstrdup(ppy_text); if(ppy_lval.cptr) ppy_lval.cptr[ppy_leng-1] = '\0'; yy_pp_state(pp_macro);  return tMACRO;
02129     YY_BREAK
02130 case 74:
02131 YY_RULE_SETUP
02132 #line 496 "ppl.l"
02133 ppy_lval.cptr = pp_xstrdup(ppy_text); yy_pp_state(pp_define); return tDEFINE;
02134     YY_BREAK
02135 case 75:
02136 YY_RULE_SETUP
02137 #line 497 "ppl.l"
02138 ;
02139     YY_BREAK
02140 case 76:
02141 /* rule 76 can match eol */
02142 YY_RULE_SETUP
02143 #line 498 "ppl.l"
02144 newline(0);
02145     YY_BREAK
02146 case 77:
02147 /* rule 77 can match eol */
02148 YY_RULE_SETUP
02149 #line 499 "ppl.l"
02150 perror("Identifier expected");
02151     YY_BREAK
02152 /*
02153      * Scan the substitution of a define
02154      */
02155 case 78:
02156 YY_RULE_SETUP
02157 #line 504 "ppl.l"
02158 ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL;
02159     YY_BREAK
02160 case 79:
02161 /* rule 79 can match eol */
02162 YY_RULE_SETUP
02163 #line 505 "ppl.l"
02164 ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL;
02165     YY_BREAK
02166 case 80:
02167 /* rule 80 can match eol */
02168 YY_RULE_SETUP
02169 #line 506 "ppl.l"
02170 newline(0); ppy_lval.cptr = pp_xstrdup(" "); return tLITERAL;
02171     YY_BREAK
02172 case 81:
02173 /* rule 81 can match eol */
02174 YY_RULE_SETUP
02175 #line 507 "ppl.l"
02176 newline(0);
02177     YY_BREAK
02178 case 82:
02179 /* rule 82 can match eol */
02180 YY_RULE_SETUP
02181 #line 508 "ppl.l"
02182 newline(1); yy_pop_state(); return tNL;
02183     YY_BREAK
02184 case 83:
02185 YY_RULE_SETUP
02186 #line 509 "ppl.l"
02187 new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs);
02188     YY_BREAK
02189 case 84:
02190 YY_RULE_SETUP
02191 #line 510 "ppl.l"
02192 new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs);
02193     YY_BREAK
02194 /*
02195      * Scan the definition macro arguments
02196      */
02197 case 85:
02198 YY_RULE_SETUP
02199 #line 515 "ppl.l"
02200 yy_pp_state(pp_mbody); return tMACROEND;
02201     YY_BREAK
02202 case 86:
02203 YY_RULE_SETUP
02204 #line 516 "ppl.l"
02205 ;
02206     YY_BREAK
02207 case 87:
02208 YY_RULE_SETUP
02209 #line 517 "ppl.l"
02210 ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT;
02211     YY_BREAK
02212 case 88:
02213 YY_RULE_SETUP
02214 #line 518 "ppl.l"
02215 return ',';
02216     YY_BREAK
02217 case 89:
02218 YY_RULE_SETUP
02219 #line 519 "ppl.l"
02220 return tELIPSIS;
02221     YY_BREAK
02222 case 90:
02223 /* rule 90 can match eol */
02224 YY_RULE_SETUP
02225 #line 520 "ppl.l"
02226 ppy_error("Argument identifier expected");
02227     YY_BREAK
02228 case 91:
02229 /* rule 91 can match eol */
02230 YY_RULE_SETUP
02231 #line 521 "ppl.l"
02232 newline(0);
02233     YY_BREAK
02234 /*
02235      * Scan the substitution of a macro
02236      */
02237 case 92:
02238 YY_RULE_SETUP
02239 #line 526 "ppl.l"
02240 ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL;
02241     YY_BREAK
02242 case 93:
02243 YY_RULE_SETUP
02244 #line 527 "ppl.l"
02245 ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT;
02246     YY_BREAK
02247 case 94:
02248 YY_RULE_SETUP
02249 #line 528 "ppl.l"
02250 return tCONCAT;
02251     YY_BREAK
02252 case 95:
02253 YY_RULE_SETUP
02254 #line 529 "ppl.l"
02255 return tSTRINGIZE;
02256     YY_BREAK
02257 case 96:
02258 YY_RULE_SETUP
02259 #line 530 "ppl.l"
02260 ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL;
02261     YY_BREAK
02262 case 97:
02263 YY_RULE_SETUP
02264 #line 531 "ppl.l"
02265 ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL;
02266     YY_BREAK
02267 case 98:
02268 /* rule 98 can match eol */
02269 YY_RULE_SETUP
02270 #line 532 "ppl.l"
02271 newline(0); ppy_lval.cptr = pp_xstrdup(" "); return tLITERAL;
02272     YY_BREAK
02273 case 99:
02274 /* rule 99 can match eol */
02275 YY_RULE_SETUP
02276 #line 533 "ppl.l"
02277 newline(0);
02278     YY_BREAK
02279 case 100:
02280 /* rule 100 can match eol */
02281 YY_RULE_SETUP
02282 #line 534 "ppl.l"
02283 newline(1); yy_pop_state(); return tNL;
02284     YY_BREAK
02285 case 101:
02286 YY_RULE_SETUP
02287 #line 535 "ppl.l"
02288 new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs);
02289     YY_BREAK
02290 case 102:
02291 YY_RULE_SETUP
02292 #line 536 "ppl.l"
02293 new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs);
02294     YY_BREAK
02295 /*
02296      * Macro expansion text scanning.
02297      * This state is active just after the identifier is scanned
02298      * that triggers an expansion. We *must* delete the leading
02299      * whitespace before we can start scanning for arguments.
02300      *
02301      * If we do not see a '(' as next trailing token, then we have
02302      * a false alarm. We just continue with a nose-bleed...
02303      */
02304 case 103:
02305 *yy_cp = (yy_hold_char); /* undo effects of setting up ppy_text */
02306 (yy_c_buf_p) = yy_cp -= 1;
02307 YY_DO_BEFORE_ACTION; /* set up ppy_text again */
02308 YY_RULE_SETUP
02309 #line 547 "ppl.l"
02310 yy_pp_state(pp_macscan);
02311     YY_BREAK
02312 case 104:
02313 /* rule 104 can match eol */
02314 YY_RULE_SETUP
02315 #line 548 "ppl.l"
02316 {
02317         if(yy_top_state() != pp_macscan)
02318             newline(0);
02319     }
02320     YY_BREAK
02321 case 105:
02322 /* rule 105 can match eol */
02323 YY_RULE_SETUP
02324 #line 552 "ppl.l"
02325 newline(0);
02326     YY_BREAK
02327 case 106:
02328 YY_RULE_SETUP
02329 #line 553 "ppl.l"
02330 {
02331         macexpstackentry_t *mac = pop_macro();
02332         yy_pop_state();
02333         put_buffer(mac->ppp->ident, strlen(mac->ppp->ident));
02334         put_buffer(ppy_text, ppy_leng);
02335         free_macro(mac);
02336     }
02337     YY_BREAK
02338 /*
02339      * Macro expansion argument text scanning.
02340      * This state is active when a macro's arguments are being read for expansion.
02341      */
02342 case 107:
02343 YY_RULE_SETUP
02344 #line 565 "ppl.l"
02345 {
02346         if(++MACROPARENTHESES() > 1)
02347             add_text_to_macro(ppy_text, ppy_leng);
02348     }
02349     YY_BREAK
02350 case 108:
02351 YY_RULE_SETUP
02352 #line 569 "ppl.l"
02353 {
02354         if(--MACROPARENTHESES() == 0)
02355         {
02356             yy_pop_state();
02357             macro_add_arg(1);
02358         }
02359         else
02360             add_text_to_macro(ppy_text, ppy_leng);
02361     }
02362     YY_BREAK
02363 case 109:
02364 YY_RULE_SETUP
02365 #line 578 "ppl.l"
02366 {
02367         if(MACROPARENTHESES() > 1)
02368             add_text_to_macro(ppy_text, ppy_leng);
02369         else
02370             macro_add_arg(0);
02371     }
02372     YY_BREAK
02373 case 110:
02374 YY_RULE_SETUP
02375 #line 584 "ppl.l"
02376 new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs);
02377     YY_BREAK
02378 case 111:
02379 YY_RULE_SETUP
02380 #line 585 "ppl.l"
02381 new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs);
02382     YY_BREAK
02383 case 112:
02384 YY_RULE_SETUP
02385 #line 586 "ppl.l"
02386 yy_push_state(pp_comment); add_text_to_macro(" ", 1);
02387     YY_BREAK
02388 case 113:
02389 /* rule 113 can match eol */
02390 YY_RULE_SETUP
02391 #line 587 "ppl.l"
02392 pp_status.line_number++; pp_status.char_number = 1; add_text_to_macro(ppy_text, ppy_leng);
02393     YY_BREAK
02394 case 114:
02395 YY_RULE_SETUP
02396 #line 588 "ppl.l"
02397 add_text_to_macro(ppy_text, ppy_leng);
02398     YY_BREAK
02399 case 115:
02400 /* rule 115 can match eol */
02401 YY_RULE_SETUP
02402 #line 589 "ppl.l"
02403 newline(0);
02404     YY_BREAK
02405 /*
02406      * Comment handling (almost all start-conditions)
02407      */
02408 case 116:
02409 YY_RULE_SETUP
02410 #line 594 "ppl.l"
02411 yy_push_state(pp_comment);
02412     YY_BREAK
02413 case 117:
02414 YY_RULE_SETUP
02415 #line 595 "ppl.l"
02416 ;
02417     YY_BREAK
02418 case 118:
02419 /* rule 118 can match eol */
02420 YY_RULE_SETUP
02421 #line 596 "ppl.l"
02422 newline(0);
02423     YY_BREAK
02424 case 119:
02425 YY_RULE_SETUP
02426 #line 597 "ppl.l"
02427 yy_pop_state();
02428     YY_BREAK
02429 /*
02430      * Remove C++ style comment (almost all start-conditions)
02431      */
02432 case 120:
02433 YY_RULE_SETUP
02434 #line 602 "ppl.l"
02435 {
02436         if(ppy_text[ppy_leng-1] == '\\')
02437             ppy_warning("C++ style comment ends with an escaped newline (escape ignored)");
02438     }
02439     YY_BREAK
02440 /*
02441      * Single, double and <> quoted constants
02442      */
02443 case 121:
02444 YY_RULE_SETUP
02445 #line 610 "ppl.l"
02446 pp_incl_state.seen_junk++; new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs);
02447     YY_BREAK
02448 case 122:
02449 YY_RULE_SETUP
02450 #line 611 "ppl.l"
02451 pp_incl_state.seen_junk++; new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs);
02452     YY_BREAK
02453 case 123:
02454 YY_RULE_SETUP
02455 #line 612 "ppl.l"
02456 add_string(ppy_text, ppy_leng);
02457     YY_BREAK
02458 case 124:
02459 YY_RULE_SETUP
02460 #line 613 "ppl.l"
02461 {
02462         add_string(ppy_text, ppy_leng);
02463         yy_pop_state();
02464         switch(yy_current_state())
02465         {
02466         case pp_pp:
02467         case pp_define:
02468         case pp_mbody:
02469         case pp_inc:
02470         case RCINCL:
02471             if (yy_current_state()==RCINCL) yy_pop_state();
02472             ppy_lval.cptr = get_string();
02473             return tDQSTRING;
02474         case pp_line:
02475             ppy_lval.cptr = get_string();
02476             return tDQSTRING;
02477         default:
02478             put_string();
02479         }
02480     }
02481     YY_BREAK
02482 case 125:
02483 YY_RULE_SETUP
02484 #line 633 "ppl.l"
02485 add_string(ppy_text, ppy_leng);
02486     YY_BREAK
02487 case 126:
02488 YY_RULE_SETUP
02489 #line 634 "ppl.l"
02490 {
02491         add_string(ppy_text, ppy_leng);
02492         yy_pop_state();
02493         switch(yy_current_state())
02494         {
02495         case pp_if:
02496         case pp_define:
02497         case pp_mbody:
02498             ppy_lval.cptr = get_string();
02499             return tSQSTRING;
02500         default:
02501             put_string();
02502         }
02503     }
02504     YY_BREAK
02505 case 127:
02506 YY_RULE_SETUP
02507 #line 648 "ppl.l"
02508 add_string(ppy_text, ppy_leng);
02509     YY_BREAK
02510 case 128:
02511 YY_RULE_SETUP
02512 #line 649 "ppl.l"
02513 {
02514         add_string(ppy_text, ppy_leng);
02515         yy_pop_state();
02516         ppy_lval.cptr = get_string();
02517         return tIQSTRING;
02518     }
02519     YY_BREAK
02520 case 129:
02521 /* rule 129 can match eol */
02522 YY_RULE_SETUP
02523 #line 655 "ppl.l"
02524 {
02525         /*
02526          * This is tricky; we need to remove the line-continuation
02527          * from preprocessor strings, but OTOH retain them in all
02528          * other strings. This is because the resource grammar is
02529          * even more braindead than initially analysed and line-
02530          * continuations in strings introduce, sigh, newlines in
02531          * the output. There goes the concept of non-breaking, non-
02532          * spacing whitespace.
02533          */
02534         switch(yy_top_state())
02535         {
02536         case pp_pp:
02537         case pp_define:
02538         case pp_mbody:
02539         case pp_inc:
02540         case pp_line:
02541             newline(0);
02542             break;
02543         default:
02544             add_string(ppy_text, ppy_leng);
02545             newline(-1);
02546         }
02547     }
02548     YY_BREAK
02549 case 130:
02550 YY_RULE_SETUP
02551 #line 679 "ppl.l"
02552 add_string(ppy_text, ppy_leng);
02553     YY_BREAK
02554 case 131:
02555 /* rule 131 can match eol */
02556 YY_RULE_SETUP
02557 #line 680 "ppl.l"
02558 {
02559         newline(1);
02560         add_string(ppy_text, ppy_leng);
02561         ppy_warning("Newline in string constant encounterd (started line %d)", string_start());
02562     }
02563     YY_BREAK
02564 /*
02565      * Identifier scanning
02566      */
02567 case 132:
02568 YY_RULE_SETUP
02569 #line 689 "ppl.l"
02570 {
02571         pp_entry_t *ppp;
02572         pp_incl_state.seen_junk++;
02573         if(!(ppp = pplookup(ppy_text)))
02574         {
02575             if(yy_current_state() == pp_inc)
02576                 ppy_error("Expected include filename");
02577 
02578             else if(yy_current_state() == pp_if)
02579             {
02580                 ppy_lval.cptr = pp_xstrdup(ppy_text);
02581                 return tIDENT;
02582             }
02583             else {
02584                 if((yy_current_state()==INITIAL) && (strcasecmp(ppy_text,"RCINCLUDE")==0)){
02585                     yy_push_state(RCINCL);
02586                     return tRCINCLUDE;
02587                 }
02588                 else put_buffer(ppy_text, ppy_leng);
02589             }
02590         }
02591         else if(!ppp->expanding)
02592         {
02593             switch(ppp->type)
02594             {
02595             case def_special:
02596                 expand_special(ppp);
02597                 break;
02598             case def_define:
02599                 expand_define(ppp);
02600                 break;
02601             case def_macro:
02602                 yy_push_state(pp_macign);
02603                 push_macro(ppp);
02604                 break;
02605             default:
02606                 pp_internal_error(__FILE__, __LINE__, "Invalid define type %d\n", ppp->type);
02607             }
02608         }
02609         else put_buffer(ppy_text, ppy_leng);
02610     }
02611     YY_BREAK
02612 /*
02613      * Everything else that needs to be passed and
02614      * newline and continuation handling
02615      */
02616 case 133:
02617 YY_RULE_SETUP
02618 #line 735 "ppl.l"
02619 pp_incl_state.seen_junk++; put_buffer(ppy_text, ppy_leng);
02620     YY_BREAK
02621 case 134:
02622 YY_RULE_SETUP
02623 #line 736 "ppl.l"
02624 put_buffer(ppy_text, ppy_leng);
02625     YY_BREAK
02626 case 135:
02627 /* rule 135 can match eol */
02628 YY_RULE_SETUP
02629 #line 737 "ppl.l"
02630 newline(1);
02631     YY_BREAK
02632 case 136:
02633 /* rule 136 can match eol */
02634 YY_RULE_SETUP
02635 #line 738 "ppl.l"
02636 newline(0);
02637     YY_BREAK
02638 case 137:
02639 YY_RULE_SETUP
02640 #line 739 "ppl.l"
02641 pp_incl_state.seen_junk++; put_buffer(ppy_text, ppy_leng);
02642     YY_BREAK
02643 /*
02644      * Special catcher for macro argmument expansion to prevent
02645      * newlines to propagate to the output or admin.
02646      */
02647 case 138:
02648 /* rule 138 can match eol */
02649 YY_RULE_SETUP
02650 #line 745 "ppl.l"
02651 put_buffer(ppy_text, ppy_leng);
02652     YY_BREAK
02653 case 139:
02654 YY_RULE_SETUP
02655 #line 747 "ppl.l"
02656 {
02657         ppy_lval.cptr=pp_xstrdup(ppy_text);
02658             yy_pop_state();
02659         return tRCINCLUDEPATH;
02660     }
02661     YY_BREAK
02662 case 140:
02663 YY_RULE_SETUP
02664 #line 753 "ppl.l"
02665 ;
02666     YY_BREAK
02667 case 141:
02668 YY_RULE_SETUP
02669 #line 755 "ppl.l"
02670 {
02671         new_string(); add_string(ppy_text,ppy_leng);yy_push_state(pp_dqs);
02672     }
02673     YY_BREAK
02674 /*
02675      * This is a 'catch-all' rule to discover errors in the scanner
02676      * in an orderly manner.
02677      */
02678 case 142:
02679 YY_RULE_SETUP
02680 #line 763 "ppl.l"
02681 pp_incl_state.seen_junk++; ppy_warning("Unmatched text '%c' (0x%02x); please report\n", isprint(*ppy_text & 0xff) ? *ppy_text : ' ', *ppy_text);
02682     YY_BREAK
02683 case YY_STATE_EOF(INITIAL):
02684 case YY_STATE_EOF(pp_pp):
02685 case YY_STATE_EOF(pp_eol):
02686 case YY_STATE_EOF(pp_inc):
02687 case YY_STATE_EOF(pp_dqs):
02688 case YY_STATE_EOF(pp_sqs):
02689 case YY_STATE_EOF(pp_iqs):
02690 case YY_STATE_EOF(pp_comment):
02691 case YY_STATE_EOF(pp_def):
02692 case YY_STATE_EOF(pp_define):
02693 case YY_STATE_EOF(pp_macro):
02694 case YY_STATE_EOF(pp_mbody):
02695 case YY_STATE_EOF(pp_macign):
02696 case YY_STATE_EOF(pp_macscan):
02697 case YY_STATE_EOF(pp_macexp):
02698 case YY_STATE_EOF(pp_if):
02699 case YY_STATE_EOF(pp_ifd):
02700 case YY_STATE_EOF(pp_endif):
02701 case YY_STATE_EOF(pp_line):
02702 case YY_STATE_EOF(pp_defined):
02703 case YY_STATE_EOF(pp_ignore):
02704 case YY_STATE_EOF(RCINCL):
02705 #line 765 "ppl.l"
02706 {
02707         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
02708         bufferstackentry_t *bep = pop_buffer();
02709 
02710         if((!bep && pp_get_if_depth()) || (bep && pp_get_if_depth() != bep->if_depth))
02711             ppy_warning("Unmatched #if/#endif at end of file");
02712 
02713         if(!bep)
02714         {
02715             if(YY_START != INITIAL)
02716                 ppy_error("Unexpected end of file during preprocessing");
02717             yyterminate();
02718         }
02719         else if(bep->should_pop == 2)
02720         {
02721             macexpstackentry_t *mac;
02722             mac = pop_macro();
02723             expand_macro(mac);
02724         }
02725         ppy__delete_buffer(b);
02726     }
02727     YY_BREAK
02728 case 143:
02729 YY_RULE_SETUP
02730 #line 787 "ppl.l"
02731 ECHO;
02732     YY_BREAK
02733 #line 2734 "lex.yy.c"
02734 
02735     case YY_END_OF_BUFFER:
02736         {
02737         /* Amount of text matched not including the EOB char. */
02738         int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
02739 
02740         /* Undo the effects of YY_DO_BEFORE_ACTION. */
02741         *yy_cp = (yy_hold_char);
02742         YY_RESTORE_YY_MORE_OFFSET
02743 
02744         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
02745             {
02746             /* We're scanning a new file or input source.  It's
02747              * possible that this happened because the user
02748              * just pointed ppy_in at a new source and called
02749              * ppy_lex().  If so, then we have to assure
02750              * consistency between YY_CURRENT_BUFFER and our
02751              * globals.  Here is the right place to do so, because
02752              * this is the first action (other than possibly a
02753              * back-up) that will match for the new input source.
02754              */
02755             (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
02756             YY_CURRENT_BUFFER_LVALUE->yy_input_file = ppy_in;
02757             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
02758             }
02759 
02760         /* Note that here we test for yy_c_buf_p "<=" to the position
02761          * of the first EOB in the buffer, since yy_c_buf_p will
02762          * already have been incremented past the NUL character
02763          * (since all states make transitions on EOB to the
02764          * end-of-buffer state).  Contrast this with the test
02765          * in input().
02766          */
02767         if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
02768             { /* This was really a NUL. */
02769             yy_state_type yy_next_state;
02770 
02771             (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
02772 
02773             yy_current_state = yy_get_previous_state(  );
02774 
02775             /* Okay, we're now positioned to make the NUL
02776              * transition.  We couldn't have
02777              * yy_get_previous_state() go ahead and do it
02778              * for us because it doesn't know how to deal
02779              * with the possibility of jamming (and we don't
02780              * want to build jamming into it because then it
02781              * will run more slowly).
02782              */
02783 
02784             yy_next_state = yy_try_NUL_trans( yy_current_state );
02785 
02786             yy_bp = (yytext_ptr) + YY_MORE_ADJ;
02787 
02788             if ( yy_next_state )
02789                 {
02790                 /* Consume the NUL. */
02791                 yy_cp = ++(yy_c_buf_p);
02792                 yy_current_state = yy_next_state;
02793                 goto yy_match;
02794                 }
02795 
02796             else
02797                 {
02798                 yy_cp = (yy_last_accepting_cpos);
02799                 yy_current_state = (yy_last_accepting_state);
02800                 goto yy_find_action;
02801                 }
02802             }
02803 
02804         else switch ( yy_get_next_buffer(  ) )
02805             {
02806             case EOB_ACT_END_OF_FILE:
02807                 {
02808                 (yy_did_buffer_switch_on_eof) = 0;
02809 
02810                 if ( ppy_wrap( ) )
02811                     {
02812                     /* Note: because we've taken care in
02813                      * yy_get_next_buffer() to have set up
02814                      * ppy_text, we can now set up
02815                      * yy_c_buf_p so that if some total
02816                      * hoser (like flex itself) wants to
02817                      * call the scanner after we return the
02818                      * YY_NULL, it'll still work - another
02819                      * YY_NULL will get returned.
02820                      */
02821                     (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
02822 
02823                     yy_act = YY_STATE_EOF(YY_START);
02824                     goto do_action;
02825                     }
02826 
02827                 else
02828                     {
02829                     if ( ! (yy_did_buffer_switch_on_eof) )
02830                         YY_NEW_FILE;
02831                     }
02832                 break;
02833                 }
02834 
02835             case EOB_ACT_CONTINUE_SCAN:
02836                 (yy_c_buf_p) =
02837                     (yytext_ptr) + yy_amount_of_matched_text;
02838 
02839                 yy_current_state = yy_get_previous_state(  );
02840 
02841                 yy_cp = (yy_c_buf_p);
02842                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
02843                 goto yy_match;
02844 
02845             case EOB_ACT_LAST_MATCH:
02846                 (yy_c_buf_p) =
02847                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
02848 
02849                 yy_current_state = yy_get_previous_state(  );
02850 
02851                 yy_cp = (yy_c_buf_p);
02852                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
02853                 goto yy_find_action;
02854             }
02855         break;
02856         }
02857 
02858     default:
02859         YY_FATAL_ERROR(
02860             "fatal flex scanner internal error--no action found" );
02861     } /* end of action switch */
02862         } /* end of scanning one token */
02863 } /* end of ppy_lex */
02864 
02865 /* yy_get_next_buffer - try to read in a new buffer
02866  *
02867  * Returns a code representing an action:
02868  *  EOB_ACT_LAST_MATCH -
02869  *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
02870  *  EOB_ACT_END_OF_FILE - end of file
02871  */
02872 static int yy_get_next_buffer (void)
02873 {
02874         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
02875     register char *source = (yytext_ptr);
02876     register int number_to_move, i;
02877     int ret_val;
02878 
02879     if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
02880         YY_FATAL_ERROR(
02881         "fatal flex scanner internal error--end of buffer missed" );
02882 
02883     if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
02884         { /* Don't try to fill the buffer, so this is an EOF. */
02885         if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
02886             {
02887             /* We matched a single character, the EOB, so
02888              * treat this as a final EOF.
02889              */
02890             return EOB_ACT_END_OF_FILE;
02891             }
02892 
02893         else
02894             {
02895             /* We matched some text prior to the EOB, first
02896              * process it.
02897              */
02898             return EOB_ACT_LAST_MATCH;
02899             }
02900         }
02901 
02902     /* Try to read more data. */
02903 
02904     /* First move last chars to start of buffer. */
02905     number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
02906 
02907     for ( i = 0; i < number_to_move; ++i )
02908         *(dest++) = *(source++);
02909 
02910     if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
02911         /* don't do the read, it's not guaranteed to return an EOF,
02912          * just force an EOF
02913          */
02914         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
02915 
02916     else
02917         {
02918             int num_to_read =
02919             YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
02920 
02921         while ( num_to_read <= 0 )
02922             { /* Not enough room in the buffer - grow it. */
02923 
02924             /* just a shorter name for the current buffer */
02925             YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
02926 
02927             int yy_c_buf_p_offset =
02928                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
02929 
02930             if ( b->yy_is_our_buffer )
02931                 {
02932                 int new_size = b->yy_buf_size * 2;
02933 
02934                 if ( new_size <= 0 )
02935                     b->yy_buf_size += b->yy_buf_size / 8;
02936                 else
02937                     b->yy_buf_size *= 2;
02938 
02939                 b->yy_ch_buf = (char *)
02940                     /* Include room in for 2 EOB chars. */
02941                     ppy_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
02942                 }
02943             else
02944                 /* Can't grow it, we don't own it. */
02945                 b->yy_ch_buf = 0;
02946 
02947             if ( ! b->yy_ch_buf )
02948                 YY_FATAL_ERROR(
02949                 "fatal error - scanner input buffer overflow" );
02950 
02951             (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
02952 
02953             num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
02954                         number_to_move - 1;
02955 
02956             }
02957 
02958         if ( num_to_read > YY_READ_BUF_SIZE )
02959             num_to_read = YY_READ_BUF_SIZE;
02960 
02961         /* Read in more data. */
02962         YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
02963             (yy_n_chars), (size_t) num_to_read );
02964 
02965         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
02966         }
02967 
02968     if ( (yy_n_chars) == 0 )
02969         {
02970         if ( number_to_move == YY_MORE_ADJ )
02971             {
02972             ret_val = EOB_ACT_END_OF_FILE;
02973             ppy_restart(ppy_in  );
02974             }
02975 
02976         else
02977             {
02978             ret_val = EOB_ACT_LAST_MATCH;
02979             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
02980                 YY_BUFFER_EOF_PENDING;
02981             }
02982         }
02983 
02984     else
02985         ret_val = EOB_ACT_CONTINUE_SCAN;
02986 
02987     if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
02988         /* Extend the array by 50%, plus the number we really need. */
02989         yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
02990         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ppy_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
02991         if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
02992             YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
02993     }
02994 
02995     (yy_n_chars) += number_to_move;
02996     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
02997     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
02998 
02999     (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
03000 
03001     return ret_val;
03002 }
03003 
03004 /* yy_get_previous_state - get the state just before the EOB char was reached */
03005 
03006     static yy_state_type yy_get_previous_state (void)
03007 {
03008     register yy_state_type yy_current_state;
03009     register char *yy_cp;
03010     
03011     yy_current_state = (yy_start);
03012     yy_current_state += YY_AT_BOL();
03013 
03014     for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
03015         {
03016         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
03017         if ( yy_accept[yy_current_state] )
03018             {
03019             (yy_last_accepting_state) = yy_current_state;
03020             (yy_last_accepting_cpos) = yy_cp;
03021             }
03022         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
03023             {
03024             yy_current_state = (int) yy_def[yy_current_state];
03025             if ( yy_current_state >= 416 )
03026                 yy_c = yy_meta[(unsigned int) yy_c];
03027             }
03028         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
03029         }
03030 
03031     return yy_current_state;
03032 }
03033 
03034 /* yy_try_NUL_trans - try to make a transition on the NUL character
03035  *
03036  * synopsis
03037  *  next_state = yy_try_NUL_trans( current_state );
03038  */
03039     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
03040 {
03041     register int yy_is_jam;
03042         register char *yy_cp = (yy_c_buf_p);
03043 
03044     register YY_CHAR yy_c = 1;
03045     if ( yy_accept[yy_current_state] )
03046         {
03047         (yy_last_accepting_state) = yy_current_state;
03048         (yy_last_accepting_cpos) = yy_cp;
03049         }
03050     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
03051         {
03052         yy_current_state = (int) yy_def[yy_current_state];
03053         if ( yy_current_state >= 416 )
03054             yy_c = yy_meta[(unsigned int) yy_c];
03055         }
03056     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
03057     yy_is_jam = (yy_current_state == 415);
03058 
03059     return yy_is_jam ? 0 : yy_current_state;
03060 }
03061 
03062 #ifndef YY_NO_INPUT
03063 #ifdef __cplusplus
03064     static int yyinput (void)
03065 #else
03066     static int input  (void)
03067 #endif
03068 
03069 {
03070     int c;
03071     
03072     *(yy_c_buf_p) = (yy_hold_char);
03073 
03074     if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
03075         {
03076         /* yy_c_buf_p now points to the character we want to return.
03077          * If this occurs *before* the EOB characters, then it's a
03078          * valid NUL; if not, then we've hit the end of the buffer.
03079          */
03080         if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
03081             /* This was really a NUL. */
03082             *(yy_c_buf_p) = '\0';
03083 
03084         else
03085             { /* need more input */
03086             int offset = (yy_c_buf_p) - (yytext_ptr);
03087             ++(yy_c_buf_p);
03088 
03089             switch ( yy_get_next_buffer(  ) )
03090                 {
03091                 case EOB_ACT_LAST_MATCH:
03092                     /* This happens because yy_g_n_b()
03093                      * sees that we've accumulated a
03094                      * token and flags that we need to
03095                      * try matching the token before
03096                      * proceeding.  But for input(),
03097                      * there's no matching to consider.
03098                      * So convert the EOB_ACT_LAST_MATCH
03099                      * to EOB_ACT_END_OF_FILE.
03100                      */
03101 
03102                     /* Reset buffer status. */
03103                     ppy_restart(ppy_in );
03104 
03105                     /*FALLTHROUGH*/
03106 
03107                 case EOB_ACT_END_OF_FILE:
03108                     {
03109                     if ( ppy_wrap( ) )
03110                         return EOF;
03111 
03112                     if ( ! (yy_did_buffer_switch_on_eof) )
03113                         YY_NEW_FILE;
03114 #ifdef __cplusplus
03115                     return yyinput();
03116 #else
03117                     return input();
03118 #endif
03119                     }
03120 
03121                 case EOB_ACT_CONTINUE_SCAN:
03122                     (yy_c_buf_p) = (yytext_ptr) + offset;
03123                     break;
03124                 }
03125             }
03126         }
03127 
03128     c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
03129     *(yy_c_buf_p) = '\0';   /* preserve ppy_text */
03130     (yy_hold_char) = *++(yy_c_buf_p);
03131 
03132     YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
03133 
03134     return c;
03135 }
03136 #endif  /* ifndef YY_NO_INPUT */
03137 
03143     void ppy_restart  (FILE * input_file )
03144 {
03145     
03146     if ( ! YY_CURRENT_BUFFER ){
03147         ppy_ensure_buffer_stack ();
03148         YY_CURRENT_BUFFER_LVALUE =
03149             ppy__create_buffer(ppy_in,YY_BUF_SIZE );
03150     }
03151 
03152     ppy__init_buffer(YY_CURRENT_BUFFER,input_file );
03153     ppy__load_buffer_state( );
03154 }
03155 
03160     void ppy__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
03161 {
03162     
03163     /* TODO. We should be able to replace this entire function body
03164      * with
03165      *      ppy_pop_buffer_state();
03166      *      ppy_push_buffer_state(new_buffer);
03167      */
03168     ppy_ensure_buffer_stack ();
03169     if ( YY_CURRENT_BUFFER == new_buffer )
03170         return;
03171 
03172     if ( YY_CURRENT_BUFFER )
03173         {
03174         /* Flush out information for old buffer. */
03175         *(yy_c_buf_p) = (yy_hold_char);
03176         YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
03177         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
03178         }
03179 
03180     YY_CURRENT_BUFFER_LVALUE = new_buffer;
03181     ppy__load_buffer_state( );
03182 
03183     /* We don't actually know whether we did this switch during
03184      * EOF (ppy_wrap()) processing, but the only time this flag
03185      * is looked at is after ppy_wrap() is called, so it's safe
03186      * to go ahead and always set it.
03187      */
03188     (yy_did_buffer_switch_on_eof) = 1;
03189 }
03190 
03191 static void ppy__load_buffer_state  (void)
03192 {
03193         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
03194     (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
03195     ppy_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
03196     (yy_hold_char) = *(yy_c_buf_p);
03197 }
03198 
03205     YY_BUFFER_STATE ppy__create_buffer  (FILE * file, int  size )
03206 {
03207     YY_BUFFER_STATE b;
03208     
03209     b = (YY_BUFFER_STATE) ppy_alloc(sizeof( struct yy_buffer_state )  );
03210     if ( ! b )
03211         YY_FATAL_ERROR( "out of dynamic memory in ppy__create_buffer()" );
03212 
03213     b->yy_buf_size = size;
03214 
03215     /* yy_ch_buf has to be 2 characters longer than the size given because
03216      * we need to put in 2 end-of-buffer characters.
03217      */
03218     b->yy_ch_buf = (char *) ppy_alloc(b->yy_buf_size + 2  );
03219     if ( ! b->yy_ch_buf )
03220         YY_FATAL_ERROR( "out of dynamic memory in ppy__create_buffer()" );
03221 
03222     b->yy_is_our_buffer = 1;
03223 
03224     ppy__init_buffer(b,file );
03225 
03226     return b;
03227 }
03228 
03233     void ppy__delete_buffer (YY_BUFFER_STATE  b )
03234 {
03235     
03236     if ( ! b )
03237         return;
03238 
03239     if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
03240         YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
03241 
03242     if ( b->yy_is_our_buffer )
03243         ppy_free((void *) b->yy_ch_buf  );
03244 
03245     ppy_free((void *) b  );
03246 }
03247 
03248 /* Initializes or reinitializes a buffer.
03249  * This function is sometimes called more than once on the same buffer,
03250  * such as during a ppy_restart() or at EOF.
03251  */
03252     static void ppy__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
03253 
03254 {
03255     int oerrno = errno;
03256     
03257     ppy__flush_buffer(b );
03258 
03259     b->yy_input_file = file;
03260     b->yy_fill_buffer = 1;
03261 
03262     /* If b is the current buffer, then ppy__init_buffer was _probably_
03263      * called from ppy_restart() or through yy_get_next_buffer.
03264      * In that case, we don't want to reset the lineno or column.
03265      */
03266     if (b != YY_CURRENT_BUFFER){
03267         b->yy_bs_lineno = 1;
03268         b->yy_bs_column = 0;
03269     }
03270 
03271         b->yy_is_interactive = 0;
03272     
03273     errno = oerrno;
03274 }
03275 
03280     void ppy__flush_buffer (YY_BUFFER_STATE  b )
03281 {
03282         if ( ! b )
03283         return;
03284 
03285     b->yy_n_chars = 0;
03286 
03287     /* We always need two end-of-buffer characters.  The first causes
03288      * a transition to the end-of-buffer state.  The second causes
03289      * a jam in that state.
03290      */
03291     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
03292     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
03293 
03294     b->yy_buf_pos = &b->yy_ch_buf[0];
03295 
03296     b->yy_at_bol = 1;
03297     b->yy_buffer_status = YY_BUFFER_NEW;
03298 
03299     if ( b == YY_CURRENT_BUFFER )
03300         ppy__load_buffer_state( );
03301 }
03302 
03309 void ppy_push_buffer_state (YY_BUFFER_STATE new_buffer )
03310 {
03311         if (new_buffer == NULL)
03312         return;
03313 
03314     ppy_ensure_buffer_stack();
03315 
03316     /* This block is copied from ppy__switch_to_buffer. */
03317     if ( YY_CURRENT_BUFFER )
03318         {
03319         /* Flush out information for old buffer. */
03320         *(yy_c_buf_p) = (yy_hold_char);
03321         YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
03322         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
03323         }
03324 
03325     /* Only push if top exists. Otherwise, replace top. */
03326     if (YY_CURRENT_BUFFER)
03327         (yy_buffer_stack_top)++;
03328     YY_CURRENT_BUFFER_LVALUE = new_buffer;
03329 
03330     /* copied from ppy__switch_to_buffer. */
03331     ppy__load_buffer_state( );
03332     (yy_did_buffer_switch_on_eof) = 1;
03333 }
03334 
03339 void ppy_pop_buffer_state (void)
03340 {
03341         if (!YY_CURRENT_BUFFER)
03342         return;
03343 
03344     ppy__delete_buffer(YY_CURRENT_BUFFER );
03345     YY_CURRENT_BUFFER_LVALUE = NULL;
03346     if ((yy_buffer_stack_top) > 0)
03347         --(yy_buffer_stack_top);
03348 
03349     if (YY_CURRENT_BUFFER) {
03350         ppy__load_buffer_state( );
03351         (yy_did_buffer_switch_on_eof) = 1;
03352     }
03353 }
03354 
03355 /* Allocates the stack if it does not exist.
03356  *  Guarantees space for at least one push.
03357  */
03358 static void ppy_ensure_buffer_stack (void)
03359 {
03360     int num_to_alloc;
03361     
03362     if (!(yy_buffer_stack)) {
03363 
03364         /* First allocation is just for 2 elements, since we don't know if this
03365          * scanner will even need a stack. We use 2 instead of 1 to avoid an
03366          * immediate realloc on the next call.
03367          */
03368         num_to_alloc = 1;
03369         (yy_buffer_stack) = (struct yy_buffer_state**)ppy_alloc
03370                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
03371                                 );
03372         if ( ! (yy_buffer_stack) )
03373             YY_FATAL_ERROR( "out of dynamic memory in ppy_ensure_buffer_stack()" );
03374                                   
03375         memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
03376                 
03377         (yy_buffer_stack_max) = num_to_alloc;
03378         (yy_buffer_stack_top) = 0;
03379         return;
03380     }
03381 
03382     if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
03383 
03384         /* Increase the buffer to prepare for a possible push. */
03385         int grow_size = 8 /* arbitrary grow size */;
03386 
03387         num_to_alloc = (yy_buffer_stack_max) + grow_size;
03388         (yy_buffer_stack) = (struct yy_buffer_state**)ppy_realloc
03389                                 ((yy_buffer_stack),
03390                                 num_to_alloc * sizeof(struct yy_buffer_state*)
03391                                 );
03392         if ( ! (yy_buffer_stack) )
03393             YY_FATAL_ERROR( "out of dynamic memory in ppy_ensure_buffer_stack()" );
03394 
03395         /* zero only the new slots.*/
03396         memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
03397         (yy_buffer_stack_max) = num_to_alloc;
03398     }
03399 }
03400 
03407 YY_BUFFER_STATE ppy__scan_buffer  (char * base, yy_size_t  size )
03408 {
03409     YY_BUFFER_STATE b;
03410     
03411     if ( size < 2 ||
03412          base[size-2] != YY_END_OF_BUFFER_CHAR ||
03413          base[size-1] != YY_END_OF_BUFFER_CHAR )
03414         /* They forgot to leave room for the EOB's. */
03415         return 0;
03416 
03417     b = (YY_BUFFER_STATE) ppy_alloc(sizeof( struct yy_buffer_state )  );
03418     if ( ! b )
03419         YY_FATAL_ERROR( "out of dynamic memory in ppy__scan_buffer()" );
03420 
03421     b->yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
03422     b->yy_buf_pos = b->yy_ch_buf = base;
03423     b->yy_is_our_buffer = 0;
03424     b->yy_input_file = 0;
03425     b->yy_n_chars = b->yy_buf_size;
03426     b->yy_is_interactive = 0;
03427     b->yy_at_bol = 1;
03428     b->yy_fill_buffer = 0;
03429     b->yy_buffer_status = YY_BUFFER_NEW;
03430 
03431     ppy__switch_to_buffer(b  );
03432 
03433     return b;
03434 }
03435 
03444 YY_BUFFER_STATE ppy__scan_string (yyconst char * yystr )
03445 {
03446     
03447     return ppy__scan_bytes(yystr,strlen(yystr) );
03448 }
03449 
03457 YY_BUFFER_STATE ppy__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
03458 {
03459     YY_BUFFER_STATE b;
03460     char *buf;
03461     yy_size_t n;
03462     int i;
03463     
03464     /* Get memory for full buffer, including space for trailing EOB's. */
03465     n = _yybytes_len + 2;
03466     buf = (char *) ppy_alloc(n  );
03467     if ( ! buf )
03468         YY_FATAL_ERROR( "out of dynamic memory in ppy__scan_bytes()" );
03469 
03470     for ( i = 0; i < _yybytes_len; ++i )
03471         buf[i] = yybytes[i];
03472 
03473     buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
03474 
03475     b = ppy__scan_buffer(buf,n );
03476     if ( ! b )
03477         YY_FATAL_ERROR( "bad buffer in ppy__scan_bytes()" );
03478 
03479     /* It's okay to grow etc. this buffer, and we should throw it
03480      * away when we're done.
03481      */
03482     b->yy_is_our_buffer = 1;
03483 
03484     return b;
03485 }
03486 
03487     static void yy_push_state (int  new_state )
03488 {
03489         if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
03490         {
03491         yy_size_t new_size;
03492 
03493         (yy_start_stack_depth) += YY_START_STACK_INCR;
03494         new_size = (yy_start_stack_depth) * sizeof( int );
03495 
03496         if ( ! (yy_start_stack) )
03497             (yy_start_stack) = (int *) ppy_alloc(new_size  );
03498 
03499         else
03500             (yy_start_stack) = (int *) ppy_realloc((void *) (yy_start_stack),new_size  );
03501 
03502         if ( ! (yy_start_stack) )
03503             YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
03504         }
03505 
03506     (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
03507 
03508     BEGIN(new_state);
03509 }
03510 
03511     static void yy_pop_state  (void)
03512 {
03513         if ( --(yy_start_stack_ptr) < 0 )
03514         YY_FATAL_ERROR( "start-condition stack underflow" );
03515 
03516     BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
03517 }
03518 
03519     static int yy_top_state  (void)
03520 {
03521         return (yy_start_stack)[(yy_start_stack_ptr) - 1];
03522 }
03523 
03524 #ifndef YY_EXIT_FAILURE
03525 #define YY_EXIT_FAILURE 2
03526 #endif
03527 
03528 static void yy_fatal_error (yyconst char* msg )
03529 {
03530         (void) fprintf( stderr, "%s\n", msg );
03531     exit( YY_EXIT_FAILURE );
03532 }
03533 
03534 /* Redefine yyless() so it works in section 3 code. */
03535 
03536 #undef yyless
03537 #define yyless(n) \
03538     do \
03539         { \
03540         /* Undo effects of setting up ppy_text. */ \
03541         int yyless_macro_arg = (n); \
03542         YY_LESS_LINENO(yyless_macro_arg);\
03543         ppy_text[ppy_leng] = (yy_hold_char); \
03544         (yy_c_buf_p) = ppy_text + yyless_macro_arg; \
03545         (yy_hold_char) = *(yy_c_buf_p); \
03546         *(yy_c_buf_p) = '\0'; \
03547         ppy_leng = yyless_macro_arg; \
03548         } \
03549     while ( 0 )
03550 
03551 /* Accessor  methods (get/set functions) to struct members. */
03552 
03556 int ppy_get_lineno  (void)
03557 {
03558         
03559     return ppy_lineno;
03560 }
03561 
03565 FILE *ppy_get_in  (void)
03566 {
03567         return ppy_in;
03568 }
03569 
03573 FILE *ppy_get_out  (void)
03574 {
03575         return ppy_out;
03576 }
03577 
03581 int ppy_get_leng  (void)
03582 {
03583         return ppy_leng;
03584 }
03585 
03590 char *ppy_get_text  (void)
03591 {
03592         return ppy_text;
03593 }
03594 
03599 void ppy_set_lineno (int  line_number )
03600 {
03601     
03602     ppy_lineno = line_number;
03603 }
03604 
03611 void ppy_set_in (FILE *  in_str )
03612 {
03613         ppy_in = in_str ;
03614 }
03615 
03616 void ppy_set_out (FILE *  out_str )
03617 {
03618         ppy_out = out_str ;
03619 }
03620 
03621 int ppy_get_debug  (void)
03622 {
03623         return ppy__flex_debug;
03624 }
03625 
03626 void ppy_set_debug (int  bdebug )
03627 {
03628         ppy__flex_debug = bdebug ;
03629 }
03630 
03631 static int yy_init_globals (void)
03632 {
03633         /* Initialization is the same as for the non-reentrant scanner.
03634      * This function is called from ppy_lex_destroy(), so don't allocate here.
03635      */
03636 
03637     (yy_buffer_stack) = 0;
03638     (yy_buffer_stack_top) = 0;
03639     (yy_buffer_stack_max) = 0;
03640     (yy_c_buf_p) = (char *) 0;
03641     (yy_init) = 0;
03642     (yy_start) = 0;
03643 
03644     (yy_start_stack_ptr) = 0;
03645     (yy_start_stack_depth) = 0;
03646     (yy_start_stack) =  NULL;
03647 
03648 /* Defined in main.c */
03649 #ifdef YY_STDINIT
03650     ppy_in = stdin;
03651     ppy_out = stdout;
03652 #else
03653     ppy_in = (FILE *) 0;
03654     ppy_out = (FILE *) 0;
03655 #endif
03656 
03657     /* For future reference: Set errno on error, since we are called by
03658      * ppy_lex_init()
03659      */
03660     return 0;
03661 }
03662 
03663 /* ppy_lex_destroy is for both reentrant and non-reentrant scanners. */
03664 int ppy_lex_destroy  (void)
03665 {
03666     
03667     /* Pop the buffer stack, destroying each element. */
03668     while(YY_CURRENT_BUFFER){
03669         ppy__delete_buffer(YY_CURRENT_BUFFER  );
03670         YY_CURRENT_BUFFER_LVALUE = NULL;
03671         ppy_pop_buffer_state();
03672     }
03673 
03674     /* Destroy the stack itself. */
03675     ppy_free((yy_buffer_stack) );
03676     (yy_buffer_stack) = NULL;
03677 
03678     /* Destroy the start condition stack. */
03679         ppy_free((yy_start_stack)  );
03680         (yy_start_stack) = NULL;
03681 
03682     /* Reset the globals. This is important in a non-reentrant scanner so the next time
03683      * ppy_lex() is called, initialization will occur. */
03684     yy_init_globals( );
03685 
03686     return 0;
03687 }
03688 
03689 /*
03690  * Internal utility routines.
03691  */
03692 
03693 #ifndef yytext_ptr
03694 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
03695 {
03696     register int i;
03697     for ( i = 0; i < n; ++i )
03698         s1[i] = s2[i];
03699 }
03700 #endif
03701 
03702 #ifdef YY_NEED_STRLEN
03703 static int yy_flex_strlen (yyconst char * s )
03704 {
03705     register int n;
03706     for ( n = 0; s[n]; ++n )
03707         ;
03708 
03709     return n;
03710 }
03711 #endif
03712 
03713 void *ppy_alloc (yy_size_t  size )
03714 {
03715     return (void *) malloc( size );
03716 }
03717 
03718 void *ppy_realloc  (void * ptr, yy_size_t  size )
03719 {
03720     /* The cast to (char *) in the following accommodates both
03721      * implementations that use char* generic pointers, and those
03722      * that use void* generic pointers.  It works with the latter
03723      * because both ANSI C and C++ allow castless assignment from
03724      * any pointer type to void*, and deal with argument conversions
03725      * as though doing an assignment.
03726      */
03727     return (void *) realloc( (char *) ptr, size );
03728 }
03729 
03730 void ppy_free (void * ptr )
03731 {
03732     free( (char *) ptr );   /* see ppy_realloc() for (char *) cast */
03733 }
03734 
03735 #define YYTABLES_NAME "yytables"
03736 
03737 #line 787 "ppl.l"
03738 
03739 
03740 /*
03741  **************************************************************************
03742  * Support functions
03743  **************************************************************************
03744  */
03745 
03746 #ifndef ppy_wrap
03747 int ppy_wrap(void)
03748 {
03749     return 1;
03750 }
03751 #endif
03752 
03753 
03754 /*
03755  *-------------------------------------------------------------------------
03756  * Output newlines or set them as continuations
03757  *
03758  * Input: -1 - Don't count this one, but update local position (see pp_dqs)
03759  *     0 - Line-continuation seen and cache output
03760  *     1 - Newline seen and flush output
03761  *-------------------------------------------------------------------------
03762  */
03763 static void newline(int dowrite)
03764 {
03765     pp_status.line_number++;
03766     pp_status.char_number = 1;
03767 
03768     if(dowrite == -1)
03769         return;
03770 
03771     ncontinuations++;
03772     if(dowrite)
03773     {
03774         for(;ncontinuations; ncontinuations--)
03775             put_buffer("\n", 1);
03776     }
03777 }
03778 
03779 
03780 /*
03781  *-------------------------------------------------------------------------
03782  * Make a number out of an any-base and suffixed string
03783  *
03784  * Possible number extensions:
03785  * - ""     int
03786  * - "L"    long int
03787  * - "LL"   long long int
03788  * - "U"    unsigned int
03789  * - "UL"   unsigned long int
03790  * - "ULL"  unsigned long long int
03791  * - "LU"   unsigned long int
03792  * - "LLU"  unsigned long long int
03793  * - "LUL"  invalid
03794  *
03795  * FIXME:
03796  * The sizes of resulting 'int' and 'long' are compiler specific.
03797  * I depend on sizeof(int) > 2 here (although a relatively safe
03798  * assumption).
03799  * Long longs are not yet implemented because this is very compiler
03800  * specific and I don't want to think too much about the problems.
03801  *
03802  *-------------------------------------------------------------------------
03803  */
03804 static int make_number(int radix, YYSTYPE *val, const char *str, int len)
03805 {
03806     int is_l  = 0;
03807     int is_ll = 0;
03808     int is_u  = 0;
03809     char ext[4];
03810     long l;
03811 
03812     ext[3] = '\0';
03813     ext[2] = toupper(str[len-1]);
03814     ext[1] = len > 1 ? toupper(str[len-2]) : ' ';
03815     ext[0] = len > 2 ? toupper(str[len-3]) : ' ';
03816 
03817     if(!strcmp(ext, "LUL"))
03818     {
03819         ppy_error("Invalid constant suffix");
03820         return 0;
03821     }
03822     else if(!strcmp(ext, "LLU") || !strcmp(ext, "ULL"))
03823     {
03824         is_ll++;
03825         is_u++;
03826     }
03827     else if(!strcmp(ext+1, "LU") || !strcmp(ext+1, "UL"))
03828     {
03829         is_l++;
03830         is_u++;
03831     }
03832     else if(!strcmp(ext+1, "LL"))
03833     {
03834         is_ll++;
03835     }
03836     else if(!strcmp(ext+2, "L"))
03837     {
03838         is_l++;
03839     }
03840     else if(!strcmp(ext+2, "U"))
03841     {
03842         is_u++;
03843     }
03844 
03845     if(is_ll)
03846     {
03847 /* Assume as in the declaration of wrc_ull_t and wrc_sll_t */
03848 #ifdef HAVE_LONG_LONG
03849         if (is_u)
03850         {
03851             errno = 0;
03852             val->ull = strtoull(str, NULL, radix);
03853             if (val->ull == ULLONG_MAX && errno == ERANGE)
03854                 ppy_error("integer constant %s is too large\n", str);
03855             return tULONGLONG;
03856         }
03857         else
03858         {
03859             errno = 0;
03860             val->sll = strtoll(str, NULL, radix);
03861             if ((val->sll == LLONG_MIN || val->sll == LLONG_MAX) && errno == ERANGE)
03862                 ppy_error("integer constant %s is too large\n", str);
03863             return tSLONGLONG;
03864         }
03865 #else
03866         pp_internal_error(__FILE__, __LINE__, "long long constants not supported on this platform");
03867 #endif
03868     }
03869     else if(is_u && is_l)
03870     {
03871         errno = 0;
03872         val->ulong = strtoul(str, NULL, radix);
03873         if (val->ulong == ULONG_MAX && errno == ERANGE)
03874             ppy_error("integer constant %s is too large\n", str);
03875         return tULONG;
03876     }
03877     else if(!is_u && is_l)
03878     {
03879         errno = 0;
03880         val->slong = strtol(str, NULL, radix);
03881         if ((val->slong == LONG_MIN || val->slong == LONG_MAX) && errno == ERANGE)
03882             ppy_error("integer constant %s is too large\n", str);
03883         return tSLONG;
03884     }
03885     else if(is_u && !is_l)
03886     {
03887         unsigned long ul;
03888         errno = 0;
03889         ul = strtoul(str, NULL, radix);
03890         if ((ul == ULONG_MAX && errno == ERANGE) || (ul > UINT_MAX))
03891             ppy_error("integer constant %s is too large\n", str);
03892         val->uint = (unsigned int)ul;
03893         return tUINT;
03894     }
03895 
03896     /* Else it must be an int... */
03897     errno = 0;
03898     l = strtol(str, NULL, radix);
03899     if (((l == LONG_MIN || l == LONG_MAX) && errno == ERANGE) ||
03900         (l > INT_MAX) || (l < INT_MIN))
03901         ppy_error("integer constant %s is too large\n", str);
03902     val->sint = (int)l;
03903     return tSINT;
03904 }
03905 
03906 
03907 /*
03908  *-------------------------------------------------------------------------
03909  * Macro and define expansion support
03910  *
03911  * FIXME: Variable macro arguments.
03912  *-------------------------------------------------------------------------
03913  */
03914 static void expand_special(pp_entry_t *ppp)
03915 {
03916     static char *buf = NULL;
03917     char *new_buf;
03918 
03919     assert(ppp->type == def_special);
03920 
03921     if(!strcmp(ppp->ident, "__LINE__"))
03922     {
03923         new_buf = pp_xrealloc(buf, 32);
03924         if(!new_buf)
03925             return;
03926         buf = new_buf;
03927         sprintf(buf, "%d", pp_status.line_number);
03928     }
03929     else if(!strcmp(ppp->ident, "__FILE__"))
03930     {
03931         new_buf = pp_xrealloc(buf, strlen(pp_status.input) + 3);
03932         if(!new_buf)
03933             return;
03934         buf = new_buf;
03935         sprintf(buf, "\"%s\"", pp_status.input);
03936     }
03937     else
03938         pp_internal_error(__FILE__, __LINE__, "Special macro '%s' not found...\n", ppp->ident);
03939 
03940     if(pp_flex_debug)
03941         fprintf(stderr, "expand_special(%d): %s:%d: '%s' -> '%s'\n",
03942             macexpstackidx,
03943             pp_status.input,
03944             pp_status.line_number,
03945             ppp->ident,
03946             buf ? buf : "");
03947 
03948     if(buf && buf[0])
03949     {
03950         push_buffer(ppp, NULL, NULL, 0);
03951         ppy__scan_string(buf);
03952     }
03953 }
03954 
03955 static void expand_define(pp_entry_t *ppp)
03956 {
03957     assert(ppp->type == def_define);
03958 
03959     if(pp_flex_debug)
03960         fprintf(stderr, "expand_define(%d): %s:%d: '%s' -> '%s'\n",
03961             macexpstackidx,
03962             pp_status.input,
03963             pp_status.line_number,
03964             ppp->ident,
03965             ppp->subst.text);
03966     if(ppp->subst.text && ppp->subst.text[0])
03967     {
03968         push_buffer(ppp, NULL, NULL, 0);
03969         ppy__scan_string(ppp->subst.text);
03970     }
03971 }
03972 
03973 static int curdef_idx = 0;
03974 static int curdef_alloc = 0;
03975 static char *curdef_text = NULL;
03976 
03977 static void add_text(const char *str, int len)
03978 {
03979     int new_alloc;
03980     char *new_text;
03981 
03982     if(len == 0)
03983         return;
03984     if(curdef_idx >= curdef_alloc || curdef_alloc - curdef_idx < len)
03985     {
03986         new_alloc = curdef_alloc + ((len + ALLOCBLOCKSIZE-1) & ~(ALLOCBLOCKSIZE-1));
03987         new_text = pp_xrealloc(curdef_text, new_alloc * sizeof(curdef_text[0]));
03988         if(!new_text)
03989             return;
03990         curdef_text = new_text;
03991         curdef_alloc = new_alloc;
03992         if(curdef_alloc > 65536)
03993             ppy_warning("Reallocating macro-expansion buffer larger than 64kB");
03994     }
03995     memcpy(&curdef_text[curdef_idx], str, len);
03996     curdef_idx += len;
03997 }
03998 
03999 static mtext_t *add_expand_text(mtext_t *mtp, macexpstackentry_t *mep, int *nnl)
04000 {
04001     char *cptr;
04002     char *exp;
04003     int tag;
04004     int n;
04005 
04006     if(mtp == NULL)
04007         return NULL;
04008 
04009     switch(mtp->type)
04010     {
04011     case exp_text:
04012         if(pp_flex_debug)
04013             fprintf(stderr, "add_expand_text: exp_text: '%s'\n", mtp->subst.text);
04014         add_text(mtp->subst.text, strlen(mtp->subst.text));
04015         break;
04016 
04017     case exp_stringize:
04018         if(pp_flex_debug)
04019             fprintf(stderr, "add_expand_text: exp_stringize(%d): '%s'\n",
04020                 mtp->subst.argidx,
04021                 mep->args[mtp->subst.argidx]);
04022         cptr = mep->args[mtp->subst.argidx];
04023         add_text("\"", 1);
04024         while(*cptr)
04025         {
04026             if(*cptr == '"' || *cptr == '\\')
04027                 add_text("\\", 1);
04028             add_text(cptr, 1);
04029             cptr++;
04030         }
04031         add_text("\"", 1);
04032         break;
04033 
04034     case exp_concat:
04035         if(pp_flex_debug)
04036             fprintf(stderr, "add_expand_text: exp_concat\n");
04037         /* Remove trailing whitespace from current expansion text */
04038         while(curdef_idx)
04039         {
04040             if(isspace(curdef_text[curdef_idx-1] & 0xff))
04041                 curdef_idx--;
04042             else
04043                 break;
04044         }
04045         /* tag current position and recursively expand the next part */
04046         tag = curdef_idx;
04047         mtp = add_expand_text(mtp->next, mep, nnl);
04048 
04049         /* Now get rid of the leading space of the expansion */
04050         cptr = &curdef_text[tag];
04051         n = curdef_idx - tag;
04052         while(n)
04053         {
04054             if(isspace(*cptr & 0xff))
04055             {
04056                 cptr++;
04057                 n--;
04058             }
04059             else
04060                 break;
04061         }
04062         if(cptr != &curdef_text[tag])
04063         {
04064             memmove(&curdef_text[tag], cptr, n);
04065             curdef_idx -= (curdef_idx - tag) - n;
04066         }
04067         break;
04068 
04069     case exp_subst:
04070         if((mtp->next && mtp->next->type == exp_concat) || (mtp->prev && mtp->prev->type == exp_concat))
04071             exp = mep->args[mtp->subst.argidx];
04072         else
04073             exp = mep->ppargs[mtp->subst.argidx];
04074         if(exp)
04075         {
04076             add_text(exp, strlen(exp));
04077             *nnl -= mep->nnls[mtp->subst.argidx];
04078             cptr = strchr(exp, '\n');
04079             while(cptr)
04080             {
04081                 *cptr = ' ';
04082                 cptr = strchr(cptr+1, '\n');
04083             }
04084             mep->nnls[mtp->subst.argidx] = 0;
04085         }
04086         if(pp_flex_debug)
04087             fprintf(stderr, "add_expand_text: exp_subst(%d): '%s'\n", mtp->subst.argidx, exp);
04088         break;
04089 
04090     default:
04091         pp_internal_error(__FILE__, __LINE__, "Invalid expansion type (%d) in macro expansion\n", mtp->type);
04092     }
04093     return mtp;
04094 }
04095 
04096 static void expand_macro(macexpstackentry_t *mep)
04097 {
04098     mtext_t *mtp;
04099     int n, k;
04100     char *cptr;
04101     int nnl = 0;
04102     pp_entry_t *ppp = mep->ppp;
04103     int nargs = mep->nargs;
04104 
04105     assert(ppp->type == def_macro);
04106     assert(ppp->expanding == 0);
04107 
04108     if((ppp->nargs >= 0 && nargs != ppp->nargs) || (ppp->nargs < 0 && nargs < -ppp->nargs))
04109     {
04110         ppy_error("Too %s macro arguments (%d)", nargs < abs(ppp->nargs) ? "few" : "many", nargs);
04111         return;
04112     }
04113 
04114     for(n = 0; n < nargs; n++)
04115         nnl += mep->nnls[n];
04116 
04117     if(pp_flex_debug)
04118         fprintf(stderr, "expand_macro(%d): %s:%d: '%s'(%d,%d) -> ...\n",
04119             macexpstackidx,
04120             pp_status.input,
04121             pp_status.line_number,
04122             ppp->ident,
04123             mep->nargs,
04124             nnl);
04125 
04126     curdef_idx = 0;
04127 
04128     for(mtp = ppp->subst.mtext; mtp; mtp = mtp->next)
04129     {
04130         if(!(mtp = add_expand_text(mtp, mep, &nnl)))
04131             break;
04132     }
04133 
04134     for(n = 0; n < nnl; n++)
04135         add_text("\n", 1);
04136 
04137     /* To make sure there is room and termination (see below) */
04138     add_text(" \0", 2);
04139 
04140     /* Strip trailing whitespace from expansion */
04141     for(k = curdef_idx, cptr = &curdef_text[curdef_idx-1]; k > 0; k--, cptr--)
04142     {
04143         if(!isspace(*cptr & 0xff))
04144             break;
04145     }
04146 
04147     /*
04148      * We must add *one* whitespace to make sure that there
04149      * is a token-separation after the expansion.
04150      */
04151     *(++cptr) = ' ';
04152     *(++cptr) = '\0';
04153     k++;
04154 
04155     /* Strip leading whitespace from expansion */
04156     for(n = 0, cptr = curdef_text; n < k; n++, cptr++)
04157     {
04158         if(!isspace(*cptr & 0xff))
04159             break;
04160     }
04161 
04162     if(k - n > 0)
04163     {
04164         if(pp_flex_debug)
04165             fprintf(stderr, "expand_text: '%s'\n", curdef_text + n);
04166         push_buffer(ppp, NULL, NULL, 0);
04167         /*ppy__scan_bytes(curdef_text + n,k - n);*/
04168         ppy__scan_string(curdef_text + n);
04169     }
04170 }
04171 
04172 /*
04173  *-------------------------------------------------------------------------
04174  * String collection routines
04175  *-------------------------------------------------------------------------
04176  */
04177 static void new_string(void)
04178 {
04179 #ifdef DEBUG
04180     if(strbuf_idx)
04181         ppy_warning("new_string: strbuf_idx != 0");
04182 #endif
04183     strbuf_idx = 0;
04184     str_startline = pp_status.line_number;
04185 }
04186 
04187 static void add_string(const char *str, int len)
04188 {
04189     int new_alloc;
04190     char *new_buffer;
04191 
04192     if(len == 0)
04193         return;
04194     if(strbuf_idx >= strbuf_alloc || strbuf_alloc - strbuf_idx < len)
04195     {
04196         new_alloc = strbuf_alloc + ((len + ALLOCBLOCKSIZE-1) & ~(ALLOCBLOCKSIZE-1));
04197         new_buffer = pp_xrealloc(strbuffer, new_alloc * sizeof(strbuffer[0]));
04198         if(!new_buffer)
04199             return;
04200         strbuffer = new_buffer;
04201         strbuf_alloc = new_alloc;
04202         if(strbuf_alloc > 65536)
04203             ppy_warning("Reallocating string buffer larger than 64kB");
04204     }
04205     memcpy(&strbuffer[strbuf_idx], str, len);
04206     strbuf_idx += len;
04207 }
04208 
04209 static char *get_string(void)
04210 {
04211     char *str = pp_xmalloc(strbuf_idx + 1);
04212     if(!str)
04213         return NULL;
04214     memcpy(str, strbuffer, strbuf_idx);
04215     str[strbuf_idx] = '\0';
04216 #ifdef DEBUG
04217     strbuf_idx = 0;
04218 #endif
04219     return str;
04220 }
04221 
04222 static void put_string(void)
04223 {
04224     put_buffer(strbuffer, strbuf_idx);
04225 #ifdef DEBUG
04226     strbuf_idx = 0;
04227 #endif
04228 }
04229 
04230 static int string_start(void)
04231 {
04232     return str_startline;
04233 }
04234 
04235 
04236 /*
04237  *-------------------------------------------------------------------------
04238  * Buffer management
04239  *-------------------------------------------------------------------------
04240  */
04241 static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop)
04242 {
04243     if(ppy_debug)
04244         printf("push_buffer(%d): %p %p %p %d\n", bufferstackidx, ppp, filename, incname, pop);
04245     if(bufferstackidx >= MAXBUFFERSTACK)
04246         pp_internal_error(__FILE__, __LINE__, "Buffer stack overflow");
04247 
04248     memset(&bufferstack[bufferstackidx], 0, sizeof(bufferstack[0]));
04249     bufferstack[bufferstackidx].bufferstate = YY_CURRENT_BUFFER;
04250     bufferstack[bufferstackidx].filehandle  = pp_status.file;
04251     bufferstack[bufferstackidx].define  = ppp;
04252     bufferstack[bufferstackidx].line_number = pp_status.line_number;
04253     bufferstack[bufferstackidx].char_number = pp_status.char_number;
04254     bufferstack[bufferstackidx].if_depth    = pp_get_if_depth();
04255     bufferstack[bufferstackidx].should_pop  = pop;
04256     bufferstack[bufferstackidx].filename    = pp_status.input;
04257     bufferstack[bufferstackidx].ncontinuations  = ncontinuations;
04258     bufferstack[bufferstackidx].incl        = pp_incl_state;
04259     bufferstack[bufferstackidx].include_filename    = incname;
04260 
04261     if(ppp)
04262         ppp->expanding = 1;
04263     else if(filename)
04264     {
04265         /* These will track the ppy_error to the correct file and line */
04266         pp_status.line_number = 1;
04267         pp_status.char_number = 1;
04268         pp_status.input  = filename;
04269         ncontinuations = 0;
04270     }
04271     else if(!pop)
04272         pp_internal_error(__FILE__, __LINE__, "Pushing buffer without knowing where to go to");
04273     bufferstackidx++;
04274 }
04275 
04276 static bufferstackentry_t *pop_buffer(void)
04277 {
04278     if(bufferstackidx < 0)
04279         pp_internal_error(__FILE__, __LINE__, "Bufferstack underflow?");
04280 
04281     if(bufferstackidx == 0)
04282         return NULL;
04283 
04284     bufferstackidx--;
04285 
04286     if(bufferstack[bufferstackidx].define)
04287         bufferstack[bufferstackidx].define->expanding = 0;
04288     else
04289     {
04290         if(!bufferstack[bufferstackidx].should_pop)
04291         {
04292             wpp_callbacks->close(pp_status.file);
04293             pp_writestring("# %d \"%s\" 2\n", bufferstack[bufferstackidx].line_number, bufferstack[bufferstackidx].filename);
04294 
04295             /* We have EOF, check the include logic */
04296             if(pp_incl_state.state == 2 && !pp_incl_state.seen_junk && pp_incl_state.ppp)
04297             {
04298                 pp_entry_t *ppp = pplookup(pp_incl_state.ppp);
04299                 if(ppp)
04300                 {
04301                     includelogicentry_t *iep = pp_xmalloc(sizeof(includelogicentry_t));
04302                     if(!iep)
04303                         return NULL;
04304 
04305                     iep->ppp = ppp;
04306                     ppp->iep = iep;
04307                     iep->filename = bufferstack[bufferstackidx].include_filename;
04308                                         iep->prev = NULL;
04309                     iep->next = pp_includelogiclist;
04310                     if(iep->next)
04311                         iep->next->prev = iep;
04312                     pp_includelogiclist = iep;
04313                     if(pp_status.debug)
04314                         fprintf(stderr, "pop_buffer: %s:%d: includelogic added, include_ppp='%s', file='%s'\n", bufferstack[bufferstackidx].filename, bufferstack[bufferstackidx].line_number, pp_incl_state.ppp, iep->filename);
04315                 }
04316                 else
04317                     free(bufferstack[bufferstackidx].include_filename);
04318             }
04319             free(pp_incl_state.ppp);
04320             pp_incl_state   = bufferstack[bufferstackidx].incl;
04321 
04322         }
04323         pp_status.line_number = bufferstack[bufferstackidx].line_number;
04324         pp_status.char_number = bufferstack[bufferstackidx].char_number;
04325         pp_status.input  = bufferstack[bufferstackidx].filename;
04326         ncontinuations = bufferstack[bufferstackidx].ncontinuations;
04327     }
04328 
04329     if(ppy_debug)
04330         printf("pop_buffer(%d): %p %p (%d, %d, %d) %p %d\n",
04331             bufferstackidx,
04332             bufferstack[bufferstackidx].bufferstate,
04333             bufferstack[bufferstackidx].define,
04334             bufferstack[bufferstackidx].line_number,
04335             bufferstack[bufferstackidx].char_number,
04336             bufferstack[bufferstackidx].if_depth,
04337             bufferstack[bufferstackidx].filename,
04338             bufferstack[bufferstackidx].should_pop);
04339 
04340     pp_status.file = bufferstack[bufferstackidx].filehandle;
04341     ppy__switch_to_buffer(bufferstack[bufferstackidx].bufferstate);
04342 
04343     if(bufferstack[bufferstackidx].should_pop)
04344     {
04345         if(yy_current_state() == pp_macexp)
04346             macro_add_expansion();
04347         else
04348             pp_internal_error(__FILE__, __LINE__, "Pop buffer and state without macro expansion state");
04349         yy_pop_state();
04350     }
04351 
04352     return &bufferstack[bufferstackidx];
04353 }
04354 
04355 
04356 /*
04357  *-------------------------------------------------------------------------
04358  * Macro nestng support
04359  *-------------------------------------------------------------------------
04360  */
04361 static void push_macro(pp_entry_t *ppp)
04362 {
04363     if(macexpstackidx >= MAXMACEXPSTACK)
04364     {
04365         ppy_error("Too many nested macros");
04366         return;
04367     }
04368 
04369     macexpstack[macexpstackidx] = pp_xmalloc(sizeof(macexpstack[0][0]));
04370     if(!macexpstack[macexpstackidx])
04371         return;
04372         memset( macexpstack[macexpstackidx], 0, sizeof(macexpstack[0][0]));
04373     macexpstack[macexpstackidx]->ppp = ppp;
04374     macexpstackidx++;
04375 }
04376 
04377 static macexpstackentry_t *top_macro(void)
04378 {
04379     return macexpstackidx > 0 ? macexpstack[macexpstackidx-1] : NULL;
04380 }
04381 
04382 static macexpstackentry_t *pop_macro(void)
04383 {
04384     if(macexpstackidx <= 0)
04385         pp_internal_error(__FILE__, __LINE__, "Macro expansion stack underflow\n");
04386     return macexpstack[--macexpstackidx];
04387 }
04388 
04389 static void free_macro(macexpstackentry_t *mep)
04390 {
04391     int i;
04392 
04393     for(i = 0; i < mep->nargs; i++)
04394         free(mep->args[i]);
04395     free(mep->args);
04396     free(mep->nnls);
04397     free(mep->curarg);
04398     free(mep);
04399 }
04400 
04401 static void add_text_to_macro(const char *text, int len)
04402 {
04403     macexpstackentry_t *mep = top_macro();
04404 
04405     assert(mep->ppp->expanding == 0);
04406 
04407     if(mep->curargalloc - mep->curargsize <= len+1) /* +1 for '\0' */
04408     {
04409         char *new_curarg;
04410         int new_alloc = mep->curargalloc + ((ALLOCBLOCKSIZE > len+1) ? ALLOCBLOCKSIZE : len+1);
04411         new_curarg = pp_xrealloc(mep->curarg, new_alloc * sizeof(mep->curarg[0]));
04412         if(!new_curarg)
04413             return;
04414         mep->curarg = new_curarg;
04415         mep->curargalloc = new_alloc;
04416     }
04417     memcpy(mep->curarg + mep->curargsize, text, len);
04418     mep->curargsize += len;
04419     mep->curarg[mep->curargsize] = '\0';
04420 }
04421 
04422 static void macro_add_arg(int last)
04423 {
04424     int nnl = 0;
04425     char *cptr;
04426     char **new_args, **new_ppargs;
04427     int *new_nnls;
04428     macexpstackentry_t *mep = top_macro();
04429 
04430     assert(mep->ppp->expanding == 0);
04431 
04432     new_args = pp_xrealloc(mep->args, (mep->nargs+1) * sizeof(mep->args[0]));
04433     if(!new_args)
04434         return;
04435     mep->args = new_args;
04436 
04437     new_ppargs = pp_xrealloc(mep->ppargs, (mep->nargs+1) * sizeof(mep->ppargs[0]));
04438     if(!new_ppargs)
04439         return;
04440     mep->ppargs = new_ppargs;
04441 
04442     new_nnls = pp_xrealloc(mep->nnls, (mep->nargs+1) * sizeof(mep->nnls[0]));
04443     if(!new_nnls)
04444         return;
04445     mep->nnls = new_nnls;
04446 
04447     mep->args[mep->nargs] = pp_xstrdup(mep->curarg ? mep->curarg : "");
04448     if(!mep->args[mep->nargs])
04449         return;
04450     cptr = mep->args[mep->nargs]-1;
04451     while((cptr = strchr(cptr+1, '\n')))
04452     {
04453         nnl++;
04454     }
04455     mep->nnls[mep->nargs] = nnl;
04456     mep->nargs++;
04457     free(mep->curarg);
04458     mep->curargalloc = mep->curargsize = 0;
04459     mep->curarg = NULL;
04460 
04461     if(pp_flex_debug)
04462         fprintf(stderr, "macro_add_arg: %s:%d: %d -> '%s'\n",
04463             pp_status.input,
04464             pp_status.line_number,
04465             mep->nargs-1,
04466             mep->args[mep->nargs-1]);
04467 
04468     /* Each macro argument must be expanded to cope with stingize */
04469     if(last || mep->args[mep->nargs-1][0])
04470     {
04471         yy_push_state(pp_macexp);
04472         push_buffer(NULL, NULL, NULL, last ? 2 : 1);
04473         ppy__scan_string(mep->args[mep->nargs-1]);
04474         /*mep->bufferstackidx = bufferstackidx;  But not nested! */
04475     }
04476 }
04477 
04478 static void macro_add_expansion(void)
04479 {
04480     macexpstackentry_t *mep = top_macro();
04481 
04482     assert(mep->ppp->expanding == 0);
04483 
04484     mep->ppargs[mep->nargs-1] = pp_xstrdup(mep->curarg ? mep->curarg : "");
04485     free(mep->curarg);
04486     mep->curargalloc = mep->curargsize = 0;
04487     mep->curarg = NULL;
04488 
04489     if(pp_flex_debug)
04490         fprintf(stderr, "macro_add_expansion: %s:%d: %d -> '%s'\n",
04491             pp_status.input,
04492             pp_status.line_number,
04493             mep->nargs-1,
04494             mep->ppargs[mep->nargs-1] ? mep->ppargs[mep->nargs-1] : "");
04495 }
04496 
04497 
04498 /*
04499  *-------------------------------------------------------------------------
04500  * Output management
04501  *-------------------------------------------------------------------------
04502  */
04503 static void put_buffer(const char *s, int len)
04504 {
04505     if(top_macro())
04506         add_text_to_macro(s, len);
04507     else
04508         wpp_callbacks->write(s, len);
04509 }
04510 
04511 
04512 /*
04513  *-------------------------------------------------------------------------
04514  * Include management
04515  *-------------------------------------------------------------------------
04516  */
04517 void pp_do_include(char *fname, int type)
04518 {
04519     char *newpath;
04520     int n;
04521     includelogicentry_t *iep;
04522     void *fp;
04523 
04524     if(!fname)
04525         return;
04526 
04527     for(iep = pp_includelogiclist; iep; iep = iep->next)
04528     {
04529         if(!strcmp(iep->filename, fname))
04530         {
04531             /*
04532              * We are done. The file was included before.
04533              * If the define was deleted, then this entry would have
04534              * been deleted too.
04535              */
04536             return;
04537         }
04538     }
04539 
04540     n = strlen(fname);
04541 
04542     if(n <= 2)
04543     {
04544         ppy_error("Empty include filename");
04545         return;
04546     }
04547 
04548     /* Undo the effect of the quotation */
04549     fname[n-1] = '\0';
04550 
04551     if((fp = pp_open_include(fname+1, type ? pp_status.input : NULL, &newpath)) == NULL)
04552     {
04553         ppy_error("Unable to open include file %s", fname+1);
04554         return;
04555     }
04556 
04557     fname[n-1] = *fname;    /* Redo the quotes */
04558     push_buffer(NULL, newpath, fname, 0);
04559     pp_incl_state.seen_junk = 0;
04560     pp_incl_state.state = 0;
04561     pp_incl_state.ppp = NULL;
04562 
04563     if(pp_status.debug)
04564         fprintf(stderr, "pp_do_include: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d\n",
04565                         pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth);
04566     pp_status.file = fp;
04567     ppy__switch_to_buffer(ppy__create_buffer(NULL, YY_BUF_SIZE));
04568 
04569     pp_writestring("# 1 \"%s\" 1%s\n", newpath, type ? "" : " 3");
04570 }
04571 
04572 /*
04573  *-------------------------------------------------------------------------
04574  * Push/pop preprocessor ignore state when processing conditionals
04575  * which are false.
04576  *-------------------------------------------------------------------------
04577  */
04578 void pp_push_ignore_state(void)
04579 {
04580     yy_push_state(pp_ignore);
04581 }
04582 
04583 void pp_pop_ignore_state(void)
04584 {
04585     yy_pop_state();
04586 }
04587 

Generated on Sun May 27 2012 04:17:48 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.