declinfo.cpp

Go to the documentation of this file.
00001 
00002 #line 3 "<stdout>"
00003 
00004 #define  YY_INT_ALIGNED short int
00005 
00006 /* A lexical scanner generated by flex */
00007 
00008 #define FLEX_SCANNER
00009 #define YY_FLEX_MAJOR_VERSION 2
00010 #define YY_FLEX_MINOR_VERSION 5
00011 #define YY_FLEX_SUBMINOR_VERSION 33
00012 #if YY_FLEX_SUBMINOR_VERSION > 0
00013 #define FLEX_BETA
00014 #endif
00015 
00016 /* First, we deal with  platform-specific or compiler-specific issues. */
00017 
00018 /* begin standard C headers. */
00019 #include <stdio.h>
00020 #include <string.h>
00021 #include <errno.h>
00022 #include <stdlib.h>
00023 
00024 /* end standard C headers. */
00025 
00026 /* flex integer type definitions */
00027 
00028 #ifndef FLEXINT_H
00029 #define FLEXINT_H
00030 
00031 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
00032 
00033 #if __STDC_VERSION__ >= 199901L
00034 
00035 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
00036  * if you want the limit (max/min) macros for int types. 
00037  */
00038 #ifndef __STDC_LIMIT_MACROS
00039 #define __STDC_LIMIT_MACROS 1
00040 #endif
00041 
00042 #include <inttypes.h>
00043 typedef int8_t flex_int8_t;
00044 typedef uint8_t flex_uint8_t;
00045 typedef int16_t flex_int16_t;
00046 typedef uint16_t flex_uint16_t;
00047 typedef int32_t flex_int32_t;
00048 typedef uint32_t flex_uint32_t;
00049 #else
00050 typedef signed char flex_int8_t;
00051 typedef short int flex_int16_t;
00052 typedef int flex_int32_t;
00053 typedef unsigned char flex_uint8_t; 
00054 typedef unsigned short int flex_uint16_t;
00055 typedef unsigned int flex_uint32_t;
00056 #endif /* ! C99 */
00057 
00058 /* Limits of integral types. */
00059 #ifndef INT8_MIN
00060 #define INT8_MIN               (-128)
00061 #endif
00062 #ifndef INT16_MIN
00063 #define INT16_MIN              (-32767-1)
00064 #endif
00065 #ifndef INT32_MIN
00066 #define INT32_MIN              (-2147483647-1)
00067 #endif
00068 #ifndef INT8_MAX
00069 #define INT8_MAX               (127)
00070 #endif
00071 #ifndef INT16_MAX
00072 #define INT16_MAX              (32767)
00073 #endif
00074 #ifndef INT32_MAX
00075 #define INT32_MAX              (2147483647)
00076 #endif
00077 #ifndef UINT8_MAX
00078 #define UINT8_MAX              (255U)
00079 #endif
00080 #ifndef UINT16_MAX
00081 #define UINT16_MAX             (65535U)
00082 #endif
00083 #ifndef UINT32_MAX
00084 #define UINT32_MAX             (4294967295U)
00085 #endif
00086 
00087 #endif /* ! FLEXINT_H */
00088 
00089 #ifdef __cplusplus
00090 
00091 /* The "const" storage-class-modifier is valid. */
00092 #define YY_USE_CONST
00093 
00094 #else   /* ! __cplusplus */
00095 
00096 #if __STDC__
00097 
00098 #define YY_USE_CONST
00099 
00100 #endif  /* __STDC__ */
00101 #endif  /* ! __cplusplus */
00102 
00103 #ifdef YY_USE_CONST
00104 #define yyconst const
00105 #else
00106 #define yyconst
00107 #endif
00108 
00109 /* Returned upon end-of-file. */
00110 #define YY_NULL 0
00111 
00112 /* Promotes a possibly negative, possibly signed char to an unsigned
00113  * integer for use as an array index.  If the signed char is negative,
00114  * we want to instead treat it as an 8-bit unsigned char, hence the
00115  * double cast.
00116  */
00117 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00118 
00119 /* Enter a start condition.  This macro really ought to take a parameter,
00120  * but we do it the disgusting crufty way forced on us by the ()-less
00121  * definition of BEGIN.
00122  */
00123 #define BEGIN (yy_start) = 1 + 2 *
00124 
00125 /* Translate the current start state into a value that can be later handed
00126  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00127  * compatibility.
00128  */
00129 #define YY_START (((yy_start) - 1) / 2)
00130 #define YYSTATE YY_START
00131 
00132 /* Action number for EOF rule of a given start state. */
00133 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00134 
00135 /* Special action meaning "start processing a new file". */
00136 #define YY_NEW_FILE declinfoYYrestart(declinfoYYin  )
00137 
00138 #define YY_END_OF_BUFFER_CHAR 0
00139 
00140 /* Size of default input buffer. */
00141 #ifndef YY_BUF_SIZE
00142 #define YY_BUF_SIZE 16384
00143 #endif
00144 
00145 /* The state buf must be large enough to hold one state per character in the main buffer.
00146  */
00147 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00148 
00149 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00150 #define YY_TYPEDEF_YY_BUFFER_STATE
00151 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00152 #endif
00153 
00154 extern int declinfoYYleng;
00155 
00156 extern FILE *declinfoYYin, *declinfoYYout;
00157 
00158 #define EOB_ACT_CONTINUE_SCAN 0
00159 #define EOB_ACT_END_OF_FILE 1
00160 #define EOB_ACT_LAST_MATCH 2
00161 
00162     #define YY_LESS_LINENO(n)
00163     
00164 /* Return all but the first "n" matched characters back to the input stream. */
00165 #define yyless(n) \
00166         do \
00167                 { \
00168                 /* Undo effects of setting up declinfoYYtext. */ \
00169         int yyless_macro_arg = (n); \
00170         YY_LESS_LINENO(yyless_macro_arg);\
00171                 *yy_cp = (yy_hold_char); \
00172                 YY_RESTORE_YY_MORE_OFFSET \
00173                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00174                 YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */ \
00175                 } \
00176         while ( 0 )
00177 
00178 #define unput(c) yyunput( c, (yytext_ptr)  )
00179 
00180 /* The following is because we cannot portably get our hands on size_t
00181  * (without autoconf's help, which isn't available because we want
00182  * flex-generated scanners to compile on their own).
00183  */
00184 
00185 #ifndef YY_TYPEDEF_YY_SIZE_T
00186 #define YY_TYPEDEF_YY_SIZE_T
00187 typedef unsigned int yy_size_t;
00188 #endif
00189 
00190 #ifndef YY_STRUCT_YY_BUFFER_STATE
00191 #define YY_STRUCT_YY_BUFFER_STATE
00192 struct yy_buffer_state
00193         {
00194         FILE *yy_input_file;
00195 
00196         char *yy_ch_buf;                /* input buffer */
00197         char *yy_buf_pos;               /* current position in input buffer */
00198 
00199         /* Size of input buffer in bytes, not including room for EOB
00200          * characters.
00201          */
00202         yy_size_t yy_buf_size;
00203 
00204         /* Number of characters read into yy_ch_buf, not including EOB
00205          * characters.
00206          */
00207         int yy_n_chars;
00208 
00209         /* Whether we "own" the buffer - i.e., we know we created it,
00210          * and can realloc() it to grow it, and should free() it to
00211          * delete it.
00212          */
00213         int yy_is_our_buffer;
00214 
00215         /* Whether this is an "interactive" input source; if so, and
00216          * if we're using stdio for input, then we want to use getc()
00217          * instead of fread(), to make sure we stop fetching input after
00218          * each newline.
00219          */
00220         int yy_is_interactive;
00221 
00222         /* Whether we're considered to be at the beginning of a line.
00223          * If so, '^' rules will be active on the next match, otherwise
00224          * not.
00225          */
00226         int yy_at_bol;
00227 
00228     int yy_bs_lineno; 
00229     int yy_bs_column; 
00231         /* Whether to try to fill the input buffer when we reach the
00232          * end of it.
00233          */
00234         int yy_fill_buffer;
00235 
00236         int yy_buffer_status;
00237 
00238 #define YY_BUFFER_NEW 0
00239 #define YY_BUFFER_NORMAL 1
00240         /* When an EOF's been seen but there's still some text to process
00241          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00242          * shouldn't try reading from the input source any more.  We might
00243          * still have a bunch of tokens to match, though, because of
00244          * possible backing-up.
00245          *
00246          * When we actually see the EOF, we change the status to "new"
00247          * (via declinfoYYrestart()), so that the user can continue scanning by
00248          * just pointing declinfoYYin at a new input file.
00249          */
00250 #define YY_BUFFER_EOF_PENDING 2
00251 
00252         };
00253 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
00254 
00255 /* Stack of input buffers. */
00256 static size_t yy_buffer_stack_top = 0; 
00257 static size_t yy_buffer_stack_max = 0; 
00258 static YY_BUFFER_STATE * yy_buffer_stack = 0; 
00260 /* We provide macros for accessing buffer states in case in the
00261  * future we want to put the buffer states in a more general
00262  * "scanner state".
00263  *
00264  * Returns the top of the stack, or NULL.
00265  */
00266 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
00267                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
00268                           : NULL)
00269 
00270 /* Same as previous macro, but useful when we know that the buffer stack is not
00271  * NULL or when we need an lvalue. For internal use only.
00272  */
00273 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
00274 
00275 /* yy_hold_char holds the character lost when declinfoYYtext is formed. */
00276 static char yy_hold_char;
00277 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
00278 int declinfoYYleng;
00279 
00280 /* Points to current character in buffer. */
00281 static char *yy_c_buf_p = (char *) 0;
00282 static int yy_init = 0;         /* whether we need to initialize */
00283 static int yy_start = 0;        /* start state number */
00284 
00285 /* Flag which is used to allow declinfoYYwrap()'s to do buffer switches
00286  * instead of setting up a fresh declinfoYYin.  A bit of a hack ...
00287  */
00288 static int yy_did_buffer_switch_on_eof;
00289 
00290 void declinfoYYrestart (FILE *input_file  );
00291 void declinfoYY_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
00292 YY_BUFFER_STATE declinfoYY_create_buffer (FILE *file,int size  );
00293 void declinfoYY_delete_buffer (YY_BUFFER_STATE b  );
00294 void declinfoYY_flush_buffer (YY_BUFFER_STATE b  );
00295 void declinfoYYpush_buffer_state (YY_BUFFER_STATE new_buffer  );
00296 void declinfoYYpop_buffer_state (void );
00297 
00298 static void declinfoYYensure_buffer_stack (void );
00299 static void declinfoYY_load_buffer_state (void );
00300 static void declinfoYY_init_buffer (YY_BUFFER_STATE b,FILE *file  );
00301 
00302 #define YY_FLUSH_BUFFER declinfoYY_flush_buffer(YY_CURRENT_BUFFER )
00303 
00304 YY_BUFFER_STATE declinfoYY_scan_buffer (char *base,yy_size_t size  );
00305 YY_BUFFER_STATE declinfoYY_scan_string (yyconst char *yy_str  );
00306 YY_BUFFER_STATE declinfoYY_scan_bytes (yyconst char *bytes,int len  );
00307 
00308 void *declinfoYYalloc (yy_size_t  );
00309 void *declinfoYYrealloc (void *,yy_size_t  );
00310 void declinfoYYfree (void *  );
00311 
00312 #define yy_new_buffer declinfoYY_create_buffer
00313 
00314 #define yy_set_interactive(is_interactive) \
00315         { \
00316         if ( ! YY_CURRENT_BUFFER ){ \
00317         declinfoYYensure_buffer_stack (); \
00318                 YY_CURRENT_BUFFER_LVALUE =    \
00319             declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE ); \
00320         } \
00321         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00322         }
00323 
00324 #define yy_set_bol(at_bol) \
00325         { \
00326         if ( ! YY_CURRENT_BUFFER ){\
00327         declinfoYYensure_buffer_stack (); \
00328                 YY_CURRENT_BUFFER_LVALUE =    \
00329             declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE ); \
00330         } \
00331         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00332         }
00333 
00334 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00335 
00336 /* Begin user sect3 */
00337 
00338 #define declinfoYYwrap(n) 1
00339 #define YY_SKIP_YYWRAP
00340 
00341 typedef unsigned char YY_CHAR;
00342 
00343 FILE *declinfoYYin = (FILE *) 0, *declinfoYYout = (FILE *) 0;
00344 
00345 typedef int yy_state_type;
00346 
00347 extern int declinfoYYlineno;
00348 
00349 int declinfoYYlineno = 1;
00350 
00351 extern char *declinfoYYtext;
00352 #define yytext_ptr declinfoYYtext
00353 
00354 static yy_state_type yy_get_previous_state (void );
00355 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
00356 static int yy_get_next_buffer (void );
00357 static void yy_fatal_error (yyconst char msg[]  );
00358 
00359 /* Done after the current pattern has been matched and before the
00360  * corresponding action - sets up declinfoYYtext.
00361  */
00362 #define YY_DO_BEFORE_ACTION \
00363         (yytext_ptr) = yy_bp; \
00364         declinfoYYleng = (size_t) (yy_cp - yy_bp); \
00365         (yy_hold_char) = *yy_cp; \
00366         *yy_cp = '\0'; \
00367         (yy_c_buf_p) = yy_cp;
00368 
00369 #define YY_NUM_RULES 26
00370 #define YY_END_OF_BUFFER 27
00371 /* This struct is not used in this scanner,
00372    but its presence is necessary. */
00373 struct yy_trans_info
00374         {
00375         flex_int32_t yy_verify;
00376         flex_int32_t yy_nxt;
00377         };
00378 static yyconst flex_int16_t yy_acclist[117] =
00379     {   0,
00380        27,   24,   26,   25,   26,    7,   24,   26,    6,   24,
00381        26,   10,   24,   26,    9,   24,   26,    5,   24,   26,
00382        12,   24,   26,   24,   26, 8195,   24,   26,16387,   11,
00383        24,   26, 8195,   24,   26,16387,   24,   26,   17,   24,
00384        26,   15,   17,   24,   26,   16,   17,   24,   26,   22,
00385        24,   26,   22,   24,   26,   24,   26,   24,   26,   25,
00386        26,   20,   24,   26,   24,   26,   23,   24,   26,    7,
00387        10,    9,    5,   12,   11,    6,    8,    4, 8195,16387,
00388      8195,16387, 8195,16387, 8195,16387,   13,   14,   20,   20,
00389         4, 8195, 8195,16387, 8195,16387, 8195,16387,   19,    2,
00390 
00391      8195,16387, 8195,16387,   18, 8195,16387,   21, 8195,16387,
00392         8,    1, 8195,16387,    1, 8195
00393     } ;
00394 
00395 static yyconst flex_int16_t yy_accept[135] =
00396     {   0,
00397         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00398         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00399         1,    2,    4,    6,    9,   12,   15,   18,   21,   24,
00400        26,   30,   33,   37,   39,   42,   46,   50,   53,   56,
00401        58,   60,   62,   65,   67,   70,   71,   72,   73,   74,
00402        75,   76,   77,   77,   78,   78,   78,   79,   81,   81,
00403        81,   83,   83,   85,   85,   85,   87,   88,   89,   89,
00404        89,   89,   90,   90,   90,   91,   91,   91,   91,   91,
00405        91,   91,   91,   91,   91,   92,   92,   92,   92,   92,
00406        93,   95,   97,   97,   99,   99,   99,  100,  100,  100,
00407 
00408       100,  100,  100,  100,  100,  101,  101,  103,  103,  103,
00409       103,  103,  105,  105,  105,  106,  106,  106,  108,  108,
00410       109,  109,  109,  111,  112,  112,  115,  115,  115,  115,
00411       115,  117,  117,  117
00412     } ;
00413 
00414 static yyconst flex_int32_t yy_ec[256] =
00415     {   0,
00416         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00417         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00418         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00419         1,    2,    1,    1,    1,    1,    1,    4,    1,    5,
00420         6,    4,    1,    1,    1,    1,    1,    7,    7,    7,
00421         7,    7,    7,    7,    7,    7,    7,    8,    1,    9,
00422         1,   10,    1,   11,   12,   12,   12,   12,   12,   12,
00423        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
00424        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
00425        13,    1,   14,    1,   12,    1,   15,   12,   16,   12,
00426 
00427        17,   12,   12,   18,   19,   12,   12,   20,   12,   21,
00428        22,   23,   12,   24,   25,   26,   12,   27,   28,   12,
00429        12,   12,    1,    1,    1,   29,    1,    1,    1,    1,
00430         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00431         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00432         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00433         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00434         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00435         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00436         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00437 
00438         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00439         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00440         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00441         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00442         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00443         1,    1,    1,    1,    1
00444     } ;
00445 
00446 static yyconst flex_int32_t yy_meta[30] =
00447     {   0,
00448         1,    2,    1,    3,    4,    5,    6,    7,    1,    1,
00449         8,    9,   10,    1,    9,    9,    9,    9,    9,    9,
00450         9,    9,    9,    9,    9,    9,    9,    9,    1
00451     } ;
00452 
00453 static yyconst flex_int16_t yy_base[147] =
00454     {   0,
00455       326,  325,    0,    0,   27,   29,   28,   30,   38,   43,
00456       324,  323,  322,  321,  320,  319,  317,  316,  313,  312,
00457       311,  330,  330,   55,  306,   40,  330,  300,  330,  300,
00458        53,  330,   57,   63,  330,  297,  292,  330,  283,   67,
00459        73,   79,   47,   81,  330,    0,   83,  330,  292,  330,
00460       330,  295,   69,   77,  291,  287,  278,   90,   94,   87,
00461       256,   98,   85,   99,  271,  103,  330,  330,  253,  104,
00462       109,  330,  115,  117,  121,  126,  128,  129,  113,  254,
00463       250,   27,  263,  261,  265,  133,  256,  137,  134,  139,
00464       122,  140,  147,  148,  240,  149,  330,  251,  154,  239,
00465 
00466       185,  153,  160,  163,  330,  166,  155,  176,  169,  174,
00467       183,  150,  175,  177,  330,  171,  169,  161,  183,  330,
00468       173,  102,  163,   75,   47,  179,   33,  188,  189,  192,
00469       187,  194,  330,  207,  217,  227,  237,  247,  256,  264,
00470       273,  282,  287,  295,  303,  312
00471     } ;
00472 
00473 static yyconst flex_int16_t yy_def[147] =
00474     {   0,
00475       134,  134,  133,    3,  135,  135,  136,  136,  137,  137,
00476       134,  134,  134,  134,  134,  134,  134,  134,  138,  138,
00477       133,  133,  133,  133,  133,  139,  133,  133,  133,  133,
00478       140,  133,  140,  141,  133,  133,  133,  133,  133,  142,
00479       142,  142,  133,  142,  133,   24,  139,  133,  133,  133,
00480       133,  133,  133,  133,  133,  143,  133,  133,  133,  144,
00481        33,  133,   33,  141,  133,  145,  133,  133,  133,  142,
00482       142,  133,  142,  142,  133,  133,  133,  142,  133,  133,
00483       133,  133,  143,  133,  133,  144,  133,  146,  133,  133,
00484        33,  133,  133,  145,  133,  133,  133,  133,  142,  133,
00485 
00486       133,  139,  133,  133,  133,  146,   33,  133,  133,  133,
00487       133,   33,  133,  133,  133,  133,  133,   33,  133,  133,
00488       133,  133,   33,  133,  133,   33,  133,  133,  133,  133,
00489       133,  133,    0,  133,  133,  133,  133,  133,  133,  133,
00490       133,  133,  133,  133,  133,  133
00491     } ;
00492 
00493 static yyconst flex_int16_t yy_nxt[360] =
00494     {   0,
00495        22,   24,   23,   25,   26,   27,   22,   28,   29,   22,
00496        30,   31,   32,   22,   31,   31,   31,   31,   31,   31,
00497        31,   33,   31,   31,   31,   31,   31,   31,   34,   23,
00498        23,   23,   23,   82,   84,   36,   37,   36,   37,   41,
00499        42,   53,   43,   54,   41,   42,   44,   43,   76,  121,
00500        55,   44,   77,   39,   59,   39,   46,   60,   59,   47,
00501        48,   60,   49,   50,   64,   62,  127,   51,   71,   62,
00502        53,   72,   54,   65,   74,   73,  124,   75,   79,   63,
00503        71,   73,   71,   72,   53,   72,   54,   73,   86,   73,
00504        78,   59,   80,   55,   60,   59,   58,   87,   60,   89,
00505 
00506        64,   91,   62,   81,   93,   71,   62,   61,   72,   65,
00507        71,   90,   73,   72,   79,   62,   71,   73,   74,   72,
00508       125,   75,   76,   73,   78,   73,   77,   76,   80,   96,
00509        99,   77,   97,   72,   86,   89,   98,   73,  104,   81,
00510        93,   93,  105,   87,   61,  107,   92,   90,   93,   93,
00511        96,   62,   62,   97,   53,   99,   54,   98,   72,   62,
00512        62,  104,   73,   55,  104,  105,  103,  104,  105,  112,
00513       114,  105,   61,  115,  124,  118,  119,   61,  114,  120,
00514       128,  115,  123,   61,  119,   61,  126,  120,  132,  128,
00515       130,  129,   60,  130,  122,  132,  121,  117,  116,  129,
00516 
00517       129,   61,  131,  113,  111,  131,  129,   22,   22,   22,
00518        22,   22,   22,   22,   22,   22,   22,   35,   35,   35,
00519        35,   35,   35,   35,   35,   35,   35,   38,   38,   38,
00520        38,   38,   38,   38,   38,   38,   38,   40,   40,   40,
00521        40,   40,   40,   40,   40,   40,   40,   45,   45,   45,
00522        45,   45,   45,   45,   45,   45,   45,   56,   56,  110,
00523       109,  108,  103,   56,   56,   61,   85,   61,  102,   61,
00524        84,  101,   61,   61,   66,  100,   95,   92,   61,   85,
00525        66,   66,   70,   70,   70,   70,   70,   70,   70,   70,
00526        70,   70,   83,   83,   84,   83,   88,   82,   52,   57,
00527 
00528        69,   68,   88,   88,   94,   67,   58,   57,   94,   52,
00529       133,   94,   94,  106,   23,   23,  106,  106,   23,   23,
00530       106,   23,   23,   23,   23,   23,   23,   23,   23,   21,
00531       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
00532       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
00533       133,  133,  133,  133,  133,  133,  133,  133,  133
00534     } ;
00535 
00536 static yyconst flex_int16_t yy_chk[360] =
00537     {   0,
00538         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
00539         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
00540         3,    3,    3,    3,    3,    3,    3,    3,    3,    5,
00541         7,    6,    8,   82,   82,    5,    5,    6,    6,    9,
00542         9,   26,    9,   26,   10,   10,    9,   10,   43,  127,
00543        26,   10,   43,    7,   31,    8,   24,   31,   33,   24,
00544        24,   33,   24,   24,   34,   31,  125,   24,   40,   33,
00545        53,   40,   53,   34,   41,   40,  124,   41,   54,   33,
00546        42,   41,   44,   42,   47,   44,   47,   42,   60,   44,
00547        44,   58,   54,   47,   58,   59,   58,   60,   59,   62,
00548 
00549        64,   63,   58,   54,   66,   70,   59,   63,   70,   64,
00550        71,   62,   70,   71,   79,   66,   73,   71,   74,   73,
00551       122,   74,   75,   73,   73,   74,   75,   76,   79,   77,
00552        78,   76,   77,   78,   86,   89,   77,   78,   88,   79,
00553        90,   92,   88,   86,   91,   91,   92,   89,   93,   94,
00554        96,   90,   92,   96,  102,   99,  102,   96,   99,   93,
00555        94,  103,   99,  102,  104,  103,  103,  106,  104,  107,
00556       109,  106,  112,  109,  121,  112,  113,  107,  114,  113,
00557       126,  114,  118,  118,  119,  123,  123,  119,  131,  128,
00558       129,  126,  128,  130,  117,  132,  116,  111,  110,  131,
00559 
00560       128,  126,  129,  108,  101,  130,  132,  134,  134,  134,
00561       134,  134,  134,  134,  134,  134,  134,  135,  135,  135,
00562       135,  135,  135,  135,  135,  135,  135,  136,  136,  136,
00563       136,  136,  136,  136,  136,  136,  136,  137,  137,  137,
00564       137,  137,  137,  137,  137,  137,  137,  138,  138,  138,
00565       138,  138,  138,  138,  138,  138,  138,  139,  139,  100,
00566        98,   95,   87,  139,  139,  140,   85,  140,   84,  140,
00567        83,   81,  140,  140,  141,   80,   69,   65,   61,   57,
00568       141,  141,  142,  142,  142,  142,  142,  142,  142,  142,
00569       142,  142,  143,  143,   56,  143,  144,   55,   52,   49,
00570 
00571        39,   37,  144,  144,  145,   36,   30,   28,  145,   25,
00572        21,  145,  145,  146,   20,   19,  146,  146,   18,   17,
00573       146,   16,   15,   14,   13,   12,   11,    2,    1,  133,
00574       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
00575       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
00576       133,  133,  133,  133,  133,  133,  133,  133,  133
00577     } ;
00578 
00579 extern int declinfoYY_flex_debug;
00580 int declinfoYY_flex_debug = 0;
00581 
00582 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
00583 static char *yy_full_match;
00584 static int yy_lp;
00585 static int yy_looking_for_trail_begin = 0;
00586 static int yy_full_lp;
00587 static int *yy_full_state;
00588 #define YY_TRAILING_MASK 0x2000
00589 #define YY_TRAILING_HEAD_MASK 0x4000
00590 #define REJECT \
00591 { \
00592 *yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */ \
00593 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
00594 (yy_lp) = yy_full_lp; /* restore orig. accepting pos. */ \
00595 (yy_state_ptr) = yy_full_state; /* restore orig. state */ \
00596 yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
00597 ++(yy_lp); \
00598 goto find_rule; \
00599 }
00600 
00601 #define yymore() yymore_used_but_not_detected
00602 #define YY_MORE_ADJ 0
00603 #define YY_RESTORE_YY_MORE_OFFSET
00604 char *declinfoYYtext;
00605 #line 1 "declinfo.l"
00606 /******************************************************************************
00607  *
00608  * $Id: declinfo.l,v 1.26 2001/03/19 19:27:40 root Exp $
00609  *
00610  * Copyright (C) 1997-2008 by Dimitri van Heesch.
00611  *
00612  * Permission to use, copy, modify, and distribute this software and its
00613  * documentation under the terms of the GNU General Public License is hereby 
00614  * granted. No representations are made about the suitability of this software 
00615  * for any purpose. It is provided "as is" without express or implied warranty.
00616  * See the GNU General Public License for more details.
00617  *
00618  * Documents produced by Doxygen are derivative works derived from the
00619  * input used in their production; they are not affected by this license.
00620  *
00621  */
00622 #line 19 "declinfo.l"
00623 
00624 /*
00625  *      includes
00626  */
00627 #include <stdio.h>
00628 //#include <iostream.h>
00629 #include <assert.h>
00630 #include <ctype.h>
00631 
00632 #include "declinfo.h"
00633 #include "util.h"
00634 #include "message.h"
00635   
00636 /* -----------------------------------------------------------------
00637  *
00638  *      statics
00639  */
00640   
00641 static const char * inputString;
00642 static int          inputPosition;
00643 static QCString      scope;
00644 static QCString      className;
00645 static QCString      classTempList;
00646 static QCString      funcTempList;
00647 static QCString      type;
00648 static QCString      name;
00649 static QCString      args;
00650 static QCString      tmpType;
00651 static int          sharpCount;
00652 static bool         classTempListFound;
00653 static bool         funcTempListFound;
00654 static QCString      exceptionString;
00655 static bool          insideObjC;
00656 
00657 static void addType()
00658 {
00659   //printf("addType() type=`%s' scope=`%s' name=`%s'\n",
00660   //       type.data(),scope.data(),name.data());
00661   if (name.isEmpty() && scope.isEmpty()) return;
00662   if (!type.isEmpty()) type+=" ";
00663   if (!scope.isEmpty()) type+=scope+"::";
00664   type+=name;
00665   scope.resize(0);
00666   name.resize(0);
00667 }
00668   
00669 static void addTypeName()
00670 {
00671   //printf("addTypeName() type=`%s' scope=`%s' name=`%s'\n",
00672   //       type.data(),scope.data(),name.data());
00673   if (name.isEmpty() || 
00674       name.at(name.length()-1)==':')  // end of Objective-C keyword => append to name not type
00675   {
00676     return;
00677   }
00678   if (!type.isEmpty()) type+=' ';
00679   type+=name;
00680   name.resize(0);
00681 }
00682   
00683 #define YY_NEVER_INTERACTIVE 1
00684   
00685 /* -----------------------------------------------------------------
00686  */
00687 #undef  YY_INPUT
00688 #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
00689 
00690 static int yyread(char *buf,int max_size)
00691 {
00692     int c=0;
00693     while( c < max_size && inputString[inputPosition] )
00694     {
00695         *buf = inputString[inputPosition++] ;
00696         c++; buf++;
00697     }
00698     return c;
00699 }
00700 
00701 
00702 
00703 
00704 
00705 
00706 
00707 
00708 
00709 
00710 #line 711 "<stdout>"
00711 
00712 #define INITIAL 0
00713 #define Start 1
00714 #define Template 2
00715 #define ReadArgs 3
00716 #define Operator 4
00717 #define FuncPtr 5
00718 #define EndTemplate 6
00719 #define StripTempArgs 7
00720 #define SkipSharp 8
00721 #define ReadExceptions 9
00722 
00723 #ifndef YY_NO_UNISTD_H
00724 /* Special case for "unistd.h", since it is non-ANSI. We include it way
00725  * down here because we want the user's section 1 to have been scanned first.
00726  * The user has a chance to override it with an option.
00727  */
00728 #include <unistd.h>
00729 #endif
00730 
00731 #ifndef YY_EXTRA_TYPE
00732 #define YY_EXTRA_TYPE void *
00733 #endif
00734 
00735 static int yy_init_globals (void );
00736 
00737 /* Macros after this point can all be overridden by user definitions in
00738  * section 1.
00739  */
00740 
00741 #ifndef YY_SKIP_YYWRAP
00742 #ifdef __cplusplus
00743 extern "C" int declinfoYYwrap (void );
00744 #else
00745 extern int declinfoYYwrap (void );
00746 #endif
00747 #endif
00748 
00749 #ifndef yytext_ptr
00750 static void yy_flex_strncpy (char *,yyconst char *,int );
00751 #endif
00752 
00753 #ifdef YY_NEED_STRLEN
00754 static int yy_flex_strlen (yyconst char * );
00755 #endif
00756 
00757 #ifndef YY_NO_INPUT
00758 
00759 #ifdef __cplusplus
00760 static int yyinput (void );
00761 #else
00762 static int input (void );
00763 #endif
00764 
00765 #endif
00766 
00767 /* Amount of stuff to slurp up with each read. */
00768 #ifndef YY_READ_BUF_SIZE
00769 #define YY_READ_BUF_SIZE 8192
00770 #endif
00771 
00772 /* Copy whatever the last rule matched to the standard output. */
00773 #ifndef ECHO
00774 /* This used to be an fputs(), but since the string might contain NUL's,
00775  * we now use fwrite().
00776  */
00777 #define ECHO (void) fwrite( declinfoYYtext, declinfoYYleng, 1, declinfoYYout )
00778 #endif
00779 
00780 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00781  * is returned in "result".
00782  */
00783 #ifndef YY_INPUT
00784 #define YY_INPUT(buf,result,max_size) \
00785         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
00786                 { \
00787                 int c = '*'; \
00788                 size_t n; \
00789                 for ( n = 0; n < max_size && \
00790                              (c = getc( declinfoYYin )) != EOF && c != '\n'; ++n ) \
00791                         buf[n] = (char) c; \
00792                 if ( c == '\n' ) \
00793                         buf[n++] = (char) c; \
00794                 if ( c == EOF && ferror( declinfoYYin ) ) \
00795                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
00796                 result = n; \
00797                 } \
00798         else \
00799                 { \
00800                 errno=0; \
00801                 while ( (result = fread(buf, 1, max_size, declinfoYYin))==0 && ferror(declinfoYYin)) \
00802                         { \
00803                         if( errno != EINTR) \
00804                                 { \
00805                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00806                                 break; \
00807                                 } \
00808                         errno=0; \
00809                         clearerr(declinfoYYin); \
00810                         } \
00811                 }\
00812 \
00813 
00814 #endif
00815 
00816 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00817  * we don't want an extra ';' after the "return" because that will cause
00818  * some compilers to complain about unreachable statements.
00819  */
00820 #ifndef yyterminate
00821 #define yyterminate() return YY_NULL
00822 #endif
00823 
00824 /* Number of entries by which start-condition stack grows. */
00825 #ifndef YY_START_STACK_INCR
00826 #define YY_START_STACK_INCR 25
00827 #endif
00828 
00829 /* Report a fatal error. */
00830 #ifndef YY_FATAL_ERROR
00831 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00832 #endif
00833 
00834 /* end tables serialization structures and prototypes */
00835 
00836 /* Default declaration of generated scanner - a define so the user can
00837  * easily add parameters.
00838  */
00839 #ifndef YY_DECL
00840 #define YY_DECL_IS_OURS 1
00841 
00842 extern int declinfoYYlex (void);
00843 
00844 #define YY_DECL int declinfoYYlex (void)
00845 #endif /* !YY_DECL */
00846 
00847 /* Code executed at the beginning of each rule, after declinfoYYtext and declinfoYYleng
00848  * have been set up.
00849  */
00850 #ifndef YY_USER_ACTION
00851 #define YY_USER_ACTION
00852 #endif
00853 
00854 /* Code executed at the end of each rule. */
00855 #ifndef YY_BREAK
00856 #define YY_BREAK break;
00857 #endif
00858 
00859 #define YY_RULE_SETUP \
00860         YY_USER_ACTION
00861 
00864 YY_DECL
00865 {
00866         register yy_state_type yy_current_state;
00867         register char *yy_cp, *yy_bp;
00868         register int yy_act;
00869     
00870 #line 115 "declinfo.l"
00871 
00872 
00873 #line 874 "<stdout>"
00874 
00875         if ( !(yy_init) )
00876                 {
00877                 (yy_init) = 1;
00878 
00879 #ifdef YY_USER_INIT
00880                 YY_USER_INIT;
00881 #endif
00882 
00883         /* Create the reject buffer large enough to save one state per allowed character. */
00884         if ( ! (yy_state_buf) )
00885             (yy_state_buf) = (yy_state_type *)declinfoYYalloc(YY_STATE_BUF_SIZE  );
00886 
00887                 if ( ! (yy_start) )
00888                         (yy_start) = 1; /* first start state */
00889 
00890                 if ( ! declinfoYYin )
00891                         declinfoYYin = stdin;
00892 
00893                 if ( ! declinfoYYout )
00894                         declinfoYYout = stdout;
00895 
00896                 if ( ! YY_CURRENT_BUFFER ) {
00897                         declinfoYYensure_buffer_stack ();
00898                         YY_CURRENT_BUFFER_LVALUE =
00899                                 declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE );
00900                 }
00901 
00902                 declinfoYY_load_buffer_state( );
00903                 }
00904 
00905         while ( 1 )             /* loops until end-of-file is reached */
00906                 {
00907                 yy_cp = (yy_c_buf_p);
00908 
00909                 /* Support of declinfoYYtext. */
00910                 *yy_cp = (yy_hold_char);
00911 
00912                 /* yy_bp points to the position in yy_ch_buf of the start of
00913                  * the current run.
00914                  */
00915                 yy_bp = yy_cp;
00916 
00917                 yy_current_state = (yy_start);
00918 
00919                 (yy_state_ptr) = (yy_state_buf);
00920                 *(yy_state_ptr)++ = yy_current_state;
00921 
00922 yy_match:
00923                 do
00924                         {
00925                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00926                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00927                                 {
00928                                 yy_current_state = (int) yy_def[yy_current_state];
00929                                 if ( yy_current_state >= 134 )
00930                                         yy_c = yy_meta[(unsigned int) yy_c];
00931                                 }
00932                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00933                         *(yy_state_ptr)++ = yy_current_state;
00934                         ++yy_cp;
00935                         }
00936                 while ( yy_base[yy_current_state] != 330 );
00937 
00938 yy_find_action:
00939                 yy_current_state = *--(yy_state_ptr);
00940                 (yy_lp) = yy_accept[yy_current_state];
00941 find_rule: /* we branch to this label when backing up */
00942                 for ( ; ; ) /* until we find what rule we matched */
00943                         {
00944                         if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
00945                                 {
00946                                 yy_act = yy_acclist[(yy_lp)];
00947                                 if ( yy_act & YY_TRAILING_HEAD_MASK ||
00948                                      yy_looking_for_trail_begin )
00949                                         {
00950                                         if ( yy_act == yy_looking_for_trail_begin )
00951                                                 {
00952                                                 yy_looking_for_trail_begin = 0;
00953                                                 yy_act &= ~YY_TRAILING_HEAD_MASK;
00954                                                 break;
00955                                                 }
00956                                         }
00957                                 else if ( yy_act & YY_TRAILING_MASK )
00958                                         {
00959                                         yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
00960                                         yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
00961                                         (yy_full_match) = yy_cp;
00962                                         yy_full_state = (yy_state_ptr);
00963                                         yy_full_lp = (yy_lp);
00964                                         }
00965                                 else
00966                                         {
00967                                         (yy_full_match) = yy_cp;
00968                                         yy_full_state = (yy_state_ptr);
00969                                         yy_full_lp = (yy_lp);
00970                                         break;
00971                                         }
00972                                 ++(yy_lp);
00973                                 goto find_rule;
00974                                 }
00975                         --yy_cp;
00976                         yy_current_state = *--(yy_state_ptr);
00977                         (yy_lp) = yy_accept[yy_current_state];
00978                         }
00979 
00980                 YY_DO_BEFORE_ACTION;
00981 
00982 do_action:      /* This label is used only to access EOF actions. */
00983 
00984                 switch ( yy_act )
00985         { /* beginning of action switch */
00986 case 1:
00987 *yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
00988 (yy_c_buf_p) = yy_cp = yy_bp + 8;
00989 YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
00990 YY_RULE_SETUP
00991 #line 117 "declinfo.l"
00992 { // operator rule must be before {ID} rule
00993                                   name += declinfoYYtext;
00994                                   BEGIN(Operator);
00995                                 }
00996         YY_BREAK
00997 case 2:
00998 YY_RULE_SETUP
00999 #line 121 "declinfo.l"
01000 { // Objective-C class categories
01001                                   if (!insideObjC) 
01002                                   {
01003                                     REJECT;
01004                                   }
01005                                   else 
01006                                   {
01007                                     name += declinfoYYtext;
01008                                   }
01009                                 }
01010         YY_BREAK
01011 case 3:
01012 YY_RULE_SETUP
01013 #line 131 "declinfo.l"
01014 { // the []'s are for Java, 
01015                                         // the / was add to deal with multi-
01016                                         // dimensional C++ arrays like A[][15]
01017                                   addTypeName();
01018                                   name += declinfoYYtext;
01019                                 }
01020         YY_BREAK
01021 case 4:
01022 YY_RULE_SETUP
01023 #line 137 "declinfo.l"
01024 { // found a scope specifier
01025                                   if (!scope.isEmpty())
01026                                   {
01027                                     scope+="::"+name; // add name to scope
01028                                   }
01029                                   else
01030                                   {
01031                                     scope = name.copy(); // scope becomes name
01032                                   }
01033                                   name.resize(0);
01034                                 }
01035         YY_BREAK
01036 case 5:
01037 YY_RULE_SETUP
01038 #line 148 "declinfo.l"
01039 { // Objective-C argument separator
01040                                   name+=declinfoYYtext;
01041                                 }
01042         YY_BREAK
01043 case 6:
01044 YY_RULE_SETUP
01045 #line 151 "declinfo.l"
01046 {
01047                                   addType();
01048                                   type+=declinfoYYtext;
01049                                 }
01050         YY_BREAK
01051 case 7:
01052 YY_RULE_SETUP
01053 #line 155 "declinfo.l"
01054 {
01055                                   addType();
01056                                 }
01057         YY_BREAK
01058 case 8:
01059 YY_RULE_SETUP
01060 #line 158 "declinfo.l"
01061 {
01062                                   addType();
01063                                   QCString text=declinfoYYtext;
01064                                   type+=text.stripWhiteSpace();
01065                                 }
01066         YY_BREAK
01067 case 9:
01068 YY_RULE_SETUP
01069 #line 163 "declinfo.l"
01070 {
01071                                   type+=")";
01072                                 }
01073         YY_BREAK
01074 case 10:
01075 YY_RULE_SETUP
01076 #line 166 "declinfo.l"
01077 { // TODO: function pointers
01078                                   args+="(";
01079                                   BEGIN(ReadArgs);
01080                                 }
01081         YY_BREAK
01082 case 11:
01083 YY_RULE_SETUP
01084 #line 170 "declinfo.l"
01085 {
01086                                   args+="[";
01087                                   BEGIN(ReadArgs);
01088                                 }
01089         YY_BREAK
01090 case 12:
01091 YY_RULE_SETUP
01092 #line 174 "declinfo.l"
01093 {
01094                                   name+="<";
01095                                   sharpCount=0;
01096                                   BEGIN(Template);
01097                                 }
01098         YY_BREAK
01099 case 13:
01100 YY_RULE_SETUP
01101 #line 179 "declinfo.l"
01102 { name+="<<"; }
01103         YY_BREAK
01104 case 14:
01105 YY_RULE_SETUP
01106 #line 180 "declinfo.l"
01107 { name+=">>"; }
01108         YY_BREAK
01109 case 15:
01110 YY_RULE_SETUP
01111 #line 181 "declinfo.l"
01112 {
01113                                   name+="<";
01114                                   sharpCount++;
01115                                 }
01116         YY_BREAK
01117 case 16:
01118 YY_RULE_SETUP
01119 #line 185 "declinfo.l"
01120 {
01121                                   name+=">";
01122                                   if (sharpCount)
01123                                     --sharpCount;
01124                                   else
01125                                   {
01126                                     BEGIN(Start);
01127                                   }
01128                                 }
01129         YY_BREAK
01130 case 17:
01131 YY_RULE_SETUP
01132 #line 194 "declinfo.l"
01133 {
01134                                   name+=*declinfoYYtext;
01135                                 }
01136         YY_BREAK
01137 case 18:
01138 *yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
01139 (yy_c_buf_p) = yy_cp -= 1;
01140 YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
01141 YY_RULE_SETUP
01142 #line 197 "declinfo.l"
01143 {
01144                                   name+="() <>";
01145                                   BEGIN(ReadArgs);
01146                                 }
01147         YY_BREAK
01148 case 19:
01149 *yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
01150 (yy_c_buf_p) = yy_cp -= 1;
01151 YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
01152 YY_RULE_SETUP
01153 #line 201 "declinfo.l"
01154 {
01155                                   name+="()";
01156                                   BEGIN(ReadArgs);
01157                                 }
01158         YY_BREAK
01159 case 20:
01160 /* rule 20 can match eol */
01161 *yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
01162 (yy_c_buf_p) = yy_cp -= 1;
01163 YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
01164 YY_RULE_SETUP
01165 #line 205 "declinfo.l"
01166 {
01167                                   name+=declinfoYYtext;
01168                                   BEGIN(ReadArgs);
01169                                 }
01170         YY_BREAK
01171 case 21:
01172 YY_RULE_SETUP
01173 #line 209 "declinfo.l"
01174 {
01175                                   exceptionString="throw(";
01176                                   BEGIN(ReadExceptions);
01177                                 }
01178         YY_BREAK
01179 case 22:
01180 YY_RULE_SETUP
01181 #line 213 "declinfo.l"
01182 {
01183                                   args+=*declinfoYYtext;
01184                                 }
01185         YY_BREAK
01186 case 23:
01187 YY_RULE_SETUP
01188 #line 216 "declinfo.l"
01189 {
01190                                   exceptionString+=*declinfoYYtext;
01191                                 }
01192         YY_BREAK
01193 case 24:
01194 YY_RULE_SETUP
01195 #line 219 "declinfo.l"
01196 
01197         YY_BREAK
01198 case 25:
01199 /* rule 25 can match eol */
01200 YY_RULE_SETUP
01201 #line 220 "declinfo.l"
01202 
01203         YY_BREAK
01204 case 26:
01205 YY_RULE_SETUP
01206 #line 222 "declinfo.l"
01207 ECHO;
01208         YY_BREAK
01209 #line 1210 "<stdout>"
01210                         case YY_STATE_EOF(INITIAL):
01211                         case YY_STATE_EOF(Start):
01212                         case YY_STATE_EOF(Template):
01213                         case YY_STATE_EOF(ReadArgs):
01214                         case YY_STATE_EOF(Operator):
01215                         case YY_STATE_EOF(FuncPtr):
01216                         case YY_STATE_EOF(EndTemplate):
01217                         case YY_STATE_EOF(StripTempArgs):
01218                         case YY_STATE_EOF(SkipSharp):
01219                         case YY_STATE_EOF(ReadExceptions):
01220                                 yyterminate();
01221 
01222         case YY_END_OF_BUFFER:
01223                 {
01224                 /* Amount of text matched not including the EOB char. */
01225                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
01226 
01227                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
01228                 *yy_cp = (yy_hold_char);
01229                 YY_RESTORE_YY_MORE_OFFSET
01230 
01231                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
01232                         {
01233                         /* We're scanning a new file or input source.  It's
01234                          * possible that this happened because the user
01235                          * just pointed declinfoYYin at a new source and called
01236                          * declinfoYYlex().  If so, then we have to assure
01237                          * consistency between YY_CURRENT_BUFFER and our
01238                          * globals.  Here is the right place to do so, because
01239                          * this is the first action (other than possibly a
01240                          * back-up) that will match for the new input source.
01241                          */
01242                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01243                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = declinfoYYin;
01244                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
01245                         }
01246 
01247                 /* Note that here we test for yy_c_buf_p "<=" to the position
01248                  * of the first EOB in the buffer, since yy_c_buf_p will
01249                  * already have been incremented past the NUL character
01250                  * (since all states make transitions on EOB to the
01251                  * end-of-buffer state).  Contrast this with the test
01252                  * in input().
01253                  */
01254                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
01255                         { /* This was really a NUL. */
01256                         yy_state_type yy_next_state;
01257 
01258                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
01259 
01260                         yy_current_state = yy_get_previous_state(  );
01261 
01262                         /* Okay, we're now positioned to make the NUL
01263                          * transition.  We couldn't have
01264                          * yy_get_previous_state() go ahead and do it
01265                          * for us because it doesn't know how to deal
01266                          * with the possibility of jamming (and we don't
01267                          * want to build jamming into it because then it
01268                          * will run more slowly).
01269                          */
01270 
01271                         yy_next_state = yy_try_NUL_trans( yy_current_state );
01272 
01273                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01274 
01275                         if ( yy_next_state )
01276                                 {
01277                                 /* Consume the NUL. */
01278                                 yy_cp = ++(yy_c_buf_p);
01279                                 yy_current_state = yy_next_state;
01280                                 goto yy_match;
01281                                 }
01282 
01283                         else
01284                                 {
01285                                 yy_cp = (yy_c_buf_p);
01286                                 goto yy_find_action;
01287                                 }
01288                         }
01289 
01290                 else switch ( yy_get_next_buffer(  ) )
01291                         {
01292                         case EOB_ACT_END_OF_FILE:
01293                                 {
01294                                 (yy_did_buffer_switch_on_eof) = 0;
01295 
01296                                 if ( declinfoYYwrap( ) )
01297                                         {
01298                                         /* Note: because we've taken care in
01299                                          * yy_get_next_buffer() to have set up
01300                                          * declinfoYYtext, we can now set up
01301                                          * yy_c_buf_p so that if some total
01302                                          * hoser (like flex itself) wants to
01303                                          * call the scanner after we return the
01304                                          * YY_NULL, it'll still work - another
01305                                          * YY_NULL will get returned.
01306                                          */
01307                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
01308 
01309                                         yy_act = YY_STATE_EOF(YY_START);
01310                                         goto do_action;
01311                                         }
01312 
01313                                 else
01314                                         {
01315                                         if ( ! (yy_did_buffer_switch_on_eof) )
01316                                                 YY_NEW_FILE;
01317                                         }
01318                                 break;
01319                                 }
01320 
01321                         case EOB_ACT_CONTINUE_SCAN:
01322                                 (yy_c_buf_p) =
01323                                         (yytext_ptr) + yy_amount_of_matched_text;
01324 
01325                                 yy_current_state = yy_get_previous_state(  );
01326 
01327                                 yy_cp = (yy_c_buf_p);
01328                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01329                                 goto yy_match;
01330 
01331                         case EOB_ACT_LAST_MATCH:
01332                                 (yy_c_buf_p) =
01333                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
01334 
01335                                 yy_current_state = yy_get_previous_state(  );
01336 
01337                                 yy_cp = (yy_c_buf_p);
01338                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01339                                 goto yy_find_action;
01340                         }
01341                 break;
01342                 }
01343 
01344         default:
01345                 YY_FATAL_ERROR(
01346                         "fatal flex scanner internal error--no action found" );
01347         } /* end of action switch */
01348                 } /* end of scanning one token */
01349 } /* end of declinfoYYlex */
01350 
01351 /* yy_get_next_buffer - try to read in a new buffer
01352  *
01353  * Returns a code representing an action:
01354  *      EOB_ACT_LAST_MATCH -
01355  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
01356  *      EOB_ACT_END_OF_FILE - end of file
01357  */
01358 static int yy_get_next_buffer (void)
01359 {
01360         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
01361         register char *source = (yytext_ptr);
01362         register int number_to_move, i;
01363         int ret_val;
01364 
01365         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
01366                 YY_FATAL_ERROR(
01367                 "fatal flex scanner internal error--end of buffer missed" );
01368 
01369         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
01370                 { /* Don't try to fill the buffer, so this is an EOF. */
01371                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
01372                         {
01373                         /* We matched a single character, the EOB, so
01374                          * treat this as a final EOF.
01375                          */
01376                         return EOB_ACT_END_OF_FILE;
01377                         }
01378 
01379                 else
01380                         {
01381                         /* We matched some text prior to the EOB, first
01382                          * process it.
01383                          */
01384                         return EOB_ACT_LAST_MATCH;
01385                         }
01386                 }
01387 
01388         /* Try to read more data. */
01389 
01390         /* First move last chars to start of buffer. */
01391         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
01392 
01393         for ( i = 0; i < number_to_move; ++i )
01394                 *(dest++) = *(source++);
01395 
01396         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01397                 /* don't do the read, it's not guaranteed to return an EOF,
01398                  * just force an EOF
01399                  */
01400                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
01401 
01402         else
01403                 {
01404                         int num_to_read =
01405                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
01406 
01407                 while ( num_to_read <= 0 )
01408                         { /* Not enough room in the buffer - grow it. */
01409 
01410                         YY_FATAL_ERROR(
01411 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
01412 
01413                         }
01414 
01415                 if ( num_to_read > YY_READ_BUF_SIZE )
01416                         num_to_read = YY_READ_BUF_SIZE;
01417 
01418                 /* Read in more data. */
01419                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
01420                         (yy_n_chars), num_to_read );
01421 
01422                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01423                 }
01424 
01425         if ( (yy_n_chars) == 0 )
01426                 {
01427                 if ( number_to_move == YY_MORE_ADJ )
01428                         {
01429                         ret_val = EOB_ACT_END_OF_FILE;
01430                         declinfoYYrestart(declinfoYYin  );
01431                         }
01432 
01433                 else
01434                         {
01435                         ret_val = EOB_ACT_LAST_MATCH;
01436                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
01437                                 YY_BUFFER_EOF_PENDING;
01438                         }
01439                 }
01440 
01441         else
01442                 ret_val = EOB_ACT_CONTINUE_SCAN;
01443 
01444         (yy_n_chars) += number_to_move;
01445         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
01446         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
01447 
01448         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
01449 
01450         return ret_val;
01451 }
01452 
01453 /* yy_get_previous_state - get the state just before the EOB char was reached */
01454 
01455     static yy_state_type yy_get_previous_state (void)
01456 {
01457         register yy_state_type yy_current_state;
01458         register char *yy_cp;
01459     
01460         yy_current_state = (yy_start);
01461 
01462         (yy_state_ptr) = (yy_state_buf);
01463         *(yy_state_ptr)++ = yy_current_state;
01464 
01465         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
01466                 {
01467                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01468                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01469                         {
01470                         yy_current_state = (int) yy_def[yy_current_state];
01471                         if ( yy_current_state >= 134 )
01472                                 yy_c = yy_meta[(unsigned int) yy_c];
01473                         }
01474                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01475                 *(yy_state_ptr)++ = yy_current_state;
01476                 }
01477 
01478         return yy_current_state;
01479 }
01480 
01481 /* yy_try_NUL_trans - try to make a transition on the NUL character
01482  *
01483  * synopsis
01484  *      next_state = yy_try_NUL_trans( current_state );
01485  */
01486     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
01487 {
01488         register int yy_is_jam;
01489     
01490         register YY_CHAR yy_c = 1;
01491         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01492                 {
01493                 yy_current_state = (int) yy_def[yy_current_state];
01494                 if ( yy_current_state >= 134 )
01495                         yy_c = yy_meta[(unsigned int) yy_c];
01496                 }
01497         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01498         yy_is_jam = (yy_current_state == 133);
01499         if ( ! yy_is_jam )
01500                 *(yy_state_ptr)++ = yy_current_state;
01501 
01502         return yy_is_jam ? 0 : yy_current_state;
01503 }
01504 
01505 #ifndef YY_NO_INPUT
01506 #ifdef __cplusplus
01507     static int yyinput (void)
01508 #else
01509     static int input  (void)
01510 #endif
01511 
01512 {
01513         int c;
01514     
01515         *(yy_c_buf_p) = (yy_hold_char);
01516 
01517         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
01518                 {
01519                 /* yy_c_buf_p now points to the character we want to return.
01520                  * If this occurs *before* the EOB characters, then it's a
01521                  * valid NUL; if not, then we've hit the end of the buffer.
01522                  */
01523                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
01524                         /* This was really a NUL. */
01525                         *(yy_c_buf_p) = '\0';
01526 
01527                 else
01528                         { /* need more input */
01529                         int offset = (yy_c_buf_p) - (yytext_ptr);
01530                         ++(yy_c_buf_p);
01531 
01532                         switch ( yy_get_next_buffer(  ) )
01533                                 {
01534                                 case EOB_ACT_LAST_MATCH:
01535                                         /* This happens because yy_g_n_b()
01536                                          * sees that we've accumulated a
01537                                          * token and flags that we need to
01538                                          * try matching the token before
01539                                          * proceeding.  But for input(),
01540                                          * there's no matching to consider.
01541                                          * So convert the EOB_ACT_LAST_MATCH
01542                                          * to EOB_ACT_END_OF_FILE.
01543                                          */
01544 
01545                                         /* Reset buffer status. */
01546                                         declinfoYYrestart(declinfoYYin );
01547 
01548                                         /*FALLTHROUGH*/
01549 
01550                                 case EOB_ACT_END_OF_FILE:
01551                                         {
01552                                         if ( declinfoYYwrap( ) )
01553                                                 return 0;
01554 
01555                                         if ( ! (yy_did_buffer_switch_on_eof) )
01556                                                 YY_NEW_FILE;
01557 #ifdef __cplusplus
01558                                         return yyinput();
01559 #else
01560                                         return input();
01561 #endif
01562                                         }
01563 
01564                                 case EOB_ACT_CONTINUE_SCAN:
01565                                         (yy_c_buf_p) = (yytext_ptr) + offset;
01566                                         break;
01567                                 }
01568                         }
01569                 }
01570 
01571         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
01572         *(yy_c_buf_p) = '\0';   /* preserve declinfoYYtext */
01573         (yy_hold_char) = *++(yy_c_buf_p);
01574 
01575         return c;
01576 }
01577 #endif  /* ifndef YY_NO_INPUT */
01578 
01584     void declinfoYYrestart  (FILE * input_file )
01585 {
01586     
01587         if ( ! YY_CURRENT_BUFFER ){
01588         declinfoYYensure_buffer_stack ();
01589                 YY_CURRENT_BUFFER_LVALUE =
01590             declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE );
01591         }
01592 
01593         declinfoYY_init_buffer(YY_CURRENT_BUFFER,input_file );
01594         declinfoYY_load_buffer_state( );
01595 }
01596 
01601     void declinfoYY_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
01602 {
01603     
01604         /* TODO. We should be able to replace this entire function body
01605          * with
01606          *              declinfoYYpop_buffer_state();
01607          *              declinfoYYpush_buffer_state(new_buffer);
01608      */
01609         declinfoYYensure_buffer_stack ();
01610         if ( YY_CURRENT_BUFFER == new_buffer )
01611                 return;
01612 
01613         if ( YY_CURRENT_BUFFER )
01614                 {
01615                 /* Flush out information for old buffer. */
01616                 *(yy_c_buf_p) = (yy_hold_char);
01617                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01618                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01619                 }
01620 
01621         YY_CURRENT_BUFFER_LVALUE = new_buffer;
01622         declinfoYY_load_buffer_state( );
01623 
01624         /* We don't actually know whether we did this switch during
01625          * EOF (declinfoYYwrap()) processing, but the only time this flag
01626          * is looked at is after declinfoYYwrap() is called, so it's safe
01627          * to go ahead and always set it.
01628          */
01629         (yy_did_buffer_switch_on_eof) = 1;
01630 }
01631 
01632 static void declinfoYY_load_buffer_state  (void)
01633 {
01634         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01635         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
01636         declinfoYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
01637         (yy_hold_char) = *(yy_c_buf_p);
01638 }
01639 
01646     YY_BUFFER_STATE declinfoYY_create_buffer  (FILE * file, int  size )
01647 {
01648         YY_BUFFER_STATE b;
01649     
01650         b = (YY_BUFFER_STATE) declinfoYYalloc(sizeof( struct yy_buffer_state )  );
01651         if ( ! b )
01652                 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_create_buffer()" );
01653 
01654         b->yy_buf_size = size;
01655 
01656         /* yy_ch_buf has to be 2 characters longer than the size given because
01657          * we need to put in 2 end-of-buffer characters.
01658          */
01659         b->yy_ch_buf = (char *) declinfoYYalloc(b->yy_buf_size + 2  );
01660         if ( ! b->yy_ch_buf )
01661                 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_create_buffer()" );
01662 
01663         b->yy_is_our_buffer = 1;
01664 
01665         declinfoYY_init_buffer(b,file );
01666 
01667         return b;
01668 }
01669 
01674     void declinfoYY_delete_buffer (YY_BUFFER_STATE  b )
01675 {
01676     
01677         if ( ! b )
01678                 return;
01679 
01680         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
01681                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
01682 
01683         if ( b->yy_is_our_buffer )
01684                 declinfoYYfree((void *) b->yy_ch_buf  );
01685 
01686         declinfoYYfree((void *) b  );
01687 }
01688 
01689 #ifndef __cplusplus
01690 extern int isatty (int );
01691 #endif /* __cplusplus */
01692     
01693 /* Initializes or reinitializes a buffer.
01694  * This function is sometimes called more than once on the same buffer,
01695  * such as during a declinfoYYrestart() or at EOF.
01696  */
01697     static void declinfoYY_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
01698 
01699 {
01700         int oerrno = errno;
01701     
01702         declinfoYY_flush_buffer(b );
01703 
01704         b->yy_input_file = file;
01705         b->yy_fill_buffer = 1;
01706 
01707     /* If b is the current buffer, then declinfoYY_init_buffer was _probably_
01708      * called from declinfoYYrestart() or through yy_get_next_buffer.
01709      * In that case, we don't want to reset the lineno or column.
01710      */
01711     if (b != YY_CURRENT_BUFFER){
01712         b->yy_bs_lineno = 1;
01713         b->yy_bs_column = 0;
01714     }
01715 
01716         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01717     
01718         errno = oerrno;
01719 }
01720 
01725     void declinfoYY_flush_buffer (YY_BUFFER_STATE  b )
01726 {
01727         if ( ! b )
01728                 return;
01729 
01730         b->yy_n_chars = 0;
01731 
01732         /* We always need two end-of-buffer characters.  The first causes
01733          * a transition to the end-of-buffer state.  The second causes
01734          * a jam in that state.
01735          */
01736         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01737         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01738 
01739         b->yy_buf_pos = &b->yy_ch_buf[0];
01740 
01741         b->yy_at_bol = 1;
01742         b->yy_buffer_status = YY_BUFFER_NEW;
01743 
01744         if ( b == YY_CURRENT_BUFFER )
01745                 declinfoYY_load_buffer_state( );
01746 }
01747 
01754 void declinfoYYpush_buffer_state (YY_BUFFER_STATE new_buffer )
01755 {
01756         if (new_buffer == NULL)
01757                 return;
01758 
01759         declinfoYYensure_buffer_stack();
01760 
01761         /* This block is copied from declinfoYY_switch_to_buffer. */
01762         if ( YY_CURRENT_BUFFER )
01763                 {
01764                 /* Flush out information for old buffer. */
01765                 *(yy_c_buf_p) = (yy_hold_char);
01766                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01767                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01768                 }
01769 
01770         /* Only push if top exists. Otherwise, replace top. */
01771         if (YY_CURRENT_BUFFER)
01772                 (yy_buffer_stack_top)++;
01773         YY_CURRENT_BUFFER_LVALUE = new_buffer;
01774 
01775         /* copied from declinfoYY_switch_to_buffer. */
01776         declinfoYY_load_buffer_state( );
01777         (yy_did_buffer_switch_on_eof) = 1;
01778 }
01779 
01784 void declinfoYYpop_buffer_state (void)
01785 {
01786         if (!YY_CURRENT_BUFFER)
01787                 return;
01788 
01789         declinfoYY_delete_buffer(YY_CURRENT_BUFFER );
01790         YY_CURRENT_BUFFER_LVALUE = NULL;
01791         if ((yy_buffer_stack_top) > 0)
01792                 --(yy_buffer_stack_top);
01793 
01794         if (YY_CURRENT_BUFFER) {
01795                 declinfoYY_load_buffer_state( );
01796                 (yy_did_buffer_switch_on_eof) = 1;
01797         }
01798 }
01799 
01800 /* Allocates the stack if it does not exist.
01801  *  Guarantees space for at least one push.
01802  */
01803 static void declinfoYYensure_buffer_stack (void)
01804 {
01805         int num_to_alloc;
01806     
01807         if (!(yy_buffer_stack)) {
01808 
01809                 /* First allocation is just for 2 elements, since we don't know if this
01810                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
01811                  * immediate realloc on the next call.
01812          */
01813                 num_to_alloc = 1;
01814                 (yy_buffer_stack) = (struct yy_buffer_state**)declinfoYYalloc
01815                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
01816                                                                 );
01817                 
01818                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
01819                                 
01820                 (yy_buffer_stack_max) = num_to_alloc;
01821                 (yy_buffer_stack_top) = 0;
01822                 return;
01823         }
01824 
01825         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
01826 
01827                 /* Increase the buffer to prepare for a possible push. */
01828                 int grow_size = 8 /* arbitrary grow size */;
01829 
01830                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
01831                 (yy_buffer_stack) = (struct yy_buffer_state**)declinfoYYrealloc
01832                                                                 ((yy_buffer_stack),
01833                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
01834                                                                 );
01835 
01836                 /* zero only the new slots.*/
01837                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
01838                 (yy_buffer_stack_max) = num_to_alloc;
01839         }
01840 }
01841 
01848 YY_BUFFER_STATE declinfoYY_scan_buffer  (char * base, yy_size_t  size )
01849 {
01850         YY_BUFFER_STATE b;
01851     
01852         if ( size < 2 ||
01853              base[size-2] != YY_END_OF_BUFFER_CHAR ||
01854              base[size-1] != YY_END_OF_BUFFER_CHAR )
01855                 /* They forgot to leave room for the EOB's. */
01856                 return 0;
01857 
01858         b = (YY_BUFFER_STATE) declinfoYYalloc(sizeof( struct yy_buffer_state )  );
01859         if ( ! b )
01860                 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_scan_buffer()" );
01861 
01862         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
01863         b->yy_buf_pos = b->yy_ch_buf = base;
01864         b->yy_is_our_buffer = 0;
01865         b->yy_input_file = 0;
01866         b->yy_n_chars = b->yy_buf_size;
01867         b->yy_is_interactive = 0;
01868         b->yy_at_bol = 1;
01869         b->yy_fill_buffer = 0;
01870         b->yy_buffer_status = YY_BUFFER_NEW;
01871 
01872         declinfoYY_switch_to_buffer(b  );
01873 
01874         return b;
01875 }
01876 
01885 YY_BUFFER_STATE declinfoYY_scan_string (yyconst char * yystr )
01886 {
01887     
01888         return declinfoYY_scan_bytes(yystr,strlen(yystr) );
01889 }
01890 
01898 YY_BUFFER_STATE declinfoYY_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
01899 {
01900         YY_BUFFER_STATE b;
01901         char *buf;
01902         yy_size_t n;
01903         int i;
01904     
01905         /* Get memory for full buffer, including space for trailing EOB's. */
01906         n = _yybytes_len + 2;
01907         buf = (char *) declinfoYYalloc(n  );
01908         if ( ! buf )
01909                 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_scan_bytes()" );
01910 
01911         for ( i = 0; i < _yybytes_len; ++i )
01912                 buf[i] = yybytes[i];
01913 
01914         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
01915 
01916         b = declinfoYY_scan_buffer(buf,n );
01917         if ( ! b )
01918                 YY_FATAL_ERROR( "bad buffer in declinfoYY_scan_bytes()" );
01919 
01920         /* It's okay to grow etc. this buffer, and we should throw it
01921          * away when we're done.
01922          */
01923         b->yy_is_our_buffer = 1;
01924 
01925         return b;
01926 }
01927 
01928 #ifndef YY_EXIT_FAILURE
01929 #define YY_EXIT_FAILURE 2
01930 #endif
01931 
01932 static void yy_fatal_error (yyconst char* msg )
01933 {
01934         (void) fprintf( stderr, "%s\n", msg );
01935         exit( YY_EXIT_FAILURE );
01936 }
01937 
01938 /* Redefine yyless() so it works in section 3 code. */
01939 
01940 #undef yyless
01941 #define yyless(n) \
01942         do \
01943                 { \
01944                 /* Undo effects of setting up declinfoYYtext. */ \
01945         int yyless_macro_arg = (n); \
01946         YY_LESS_LINENO(yyless_macro_arg);\
01947                 declinfoYYtext[declinfoYYleng] = (yy_hold_char); \
01948                 (yy_c_buf_p) = declinfoYYtext + yyless_macro_arg; \
01949                 (yy_hold_char) = *(yy_c_buf_p); \
01950                 *(yy_c_buf_p) = '\0'; \
01951                 declinfoYYleng = yyless_macro_arg; \
01952                 } \
01953         while ( 0 )
01954 
01955 /* Accessor  methods (get/set functions) to struct members. */
01956 
01960 int declinfoYYget_lineno  (void)
01961 {
01962         
01963     return declinfoYYlineno;
01964 }
01965 
01969 FILE *declinfoYYget_in  (void)
01970 {
01971         return declinfoYYin;
01972 }
01973 
01977 FILE *declinfoYYget_out  (void)
01978 {
01979         return declinfoYYout;
01980 }
01981 
01985 int declinfoYYget_leng  (void)
01986 {
01987         return declinfoYYleng;
01988 }
01989 
01994 char *declinfoYYget_text  (void)
01995 {
01996         return declinfoYYtext;
01997 }
01998 
02003 void declinfoYYset_lineno (int  line_number )
02004 {
02005     
02006     declinfoYYlineno = line_number;
02007 }
02008 
02015 void declinfoYYset_in (FILE *  in_str )
02016 {
02017         declinfoYYin = in_str ;
02018 }
02019 
02020 void declinfoYYset_out (FILE *  out_str )
02021 {
02022         declinfoYYout = out_str ;
02023 }
02024 
02025 int declinfoYYget_debug  (void)
02026 {
02027         return declinfoYY_flex_debug;
02028 }
02029 
02030 void declinfoYYset_debug (int  bdebug )
02031 {
02032         declinfoYY_flex_debug = bdebug ;
02033 }
02034 
02035 static int yy_init_globals (void)
02036 {
02037         /* Initialization is the same as for the non-reentrant scanner.
02038      * This function is called from declinfoYYlex_destroy(), so don't allocate here.
02039      */
02040 
02041     (yy_buffer_stack) = 0;
02042     (yy_buffer_stack_top) = 0;
02043     (yy_buffer_stack_max) = 0;
02044     (yy_c_buf_p) = (char *) 0;
02045     (yy_init) = 0;
02046     (yy_start) = 0;
02047 
02048     (yy_state_buf) = 0;
02049     (yy_state_ptr) = 0;
02050     (yy_full_match) = 0;
02051     (yy_lp) = 0;
02052 
02053 /* Defined in main.c */
02054 #ifdef YY_STDINIT
02055     declinfoYYin = stdin;
02056     declinfoYYout = stdout;
02057 #else
02058     declinfoYYin = (FILE *) 0;
02059     declinfoYYout = (FILE *) 0;
02060 #endif
02061 
02062     /* For future reference: Set errno on error, since we are called by
02063      * declinfoYYlex_init()
02064      */
02065     return 0;
02066 }
02067 
02068 /* declinfoYYlex_destroy is for both reentrant and non-reentrant scanners. */
02069 int declinfoYYlex_destroy  (void)
02070 {
02071     
02072     /* Pop the buffer stack, destroying each element. */
02073         while(YY_CURRENT_BUFFER){
02074                 declinfoYY_delete_buffer(YY_CURRENT_BUFFER  );
02075                 YY_CURRENT_BUFFER_LVALUE = NULL;
02076                 declinfoYYpop_buffer_state();
02077         }
02078 
02079         /* Destroy the stack itself. */
02080         declinfoYYfree((yy_buffer_stack) );
02081         (yy_buffer_stack) = NULL;
02082 
02083     declinfoYYfree ( (yy_state_buf) );
02084     (yy_state_buf)  = NULL;
02085 
02086     /* Reset the globals. This is important in a non-reentrant scanner so the next time
02087      * declinfoYYlex() is called, initialization will occur. */
02088     yy_init_globals( );
02089 
02090     return 0;
02091 }
02092 
02093 /*
02094  * Internal utility routines.
02095  */
02096 
02097 #ifndef yytext_ptr
02098 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
02099 {
02100         register int i;
02101         for ( i = 0; i < n; ++i )
02102                 s1[i] = s2[i];
02103 }
02104 #endif
02105 
02106 #ifdef YY_NEED_STRLEN
02107 static int yy_flex_strlen (yyconst char * s )
02108 {
02109         register int n;
02110         for ( n = 0; s[n]; ++n )
02111                 ;
02112 
02113         return n;
02114 }
02115 #endif
02116 
02117 void *declinfoYYalloc (yy_size_t  size )
02118 {
02119         return (void *) malloc( size );
02120 }
02121 
02122 void *declinfoYYrealloc  (void * ptr, yy_size_t  size )
02123 {
02124         /* The cast to (char *) in the following accommodates both
02125          * implementations that use char* generic pointers, and those
02126          * that use void* generic pointers.  It works with the latter
02127          * because both ANSI C and C++ allow castless assignment from
02128          * any pointer type to void*, and deal with argument conversions
02129          * as though doing an assignment.
02130          */
02131         return (void *) realloc( (char *) ptr, size );
02132 }
02133 
02134 void declinfoYYfree (void * ptr )
02135 {
02136         free( (char *) ptr );   /* see declinfoYYrealloc() for (char *) cast */
02137 }
02138 
02139 #define YYTABLES_NAME "yytables"
02140 
02141 #line 222 "declinfo.l"
02142 
02143 
02144 
02145 /*@ ----------------------------------------------------------------------------
02146  */
02147 
02148 void parseFuncDecl(const QCString &decl,bool objC,QCString &cl,QCString &t,
02149                    QCString &n,QCString &a,QCString &ftl,QCString &exc)
02150 {
02151   inputString   = decl;
02152   //printf("Input=`%s'\n",inputString);
02153   if (inputString==0) return;
02154   inputPosition      = 0;
02155   classTempListFound = FALSE;
02156   funcTempListFound  = FALSE;
02157   insideObjC = objC;
02158   scope.resize(0);
02159   className.resize(0);
02160   classTempList.resize(0);
02161   funcTempList.resize(0);
02162   name.resize(0);
02163   type.resize(0);
02164   args.resize(0);
02165   exceptionString.resize(0);
02166   // first we try to find the type, scope, name and arguments
02167   declinfoYYrestart( declinfoYYin );
02168   BEGIN( Start );
02169   declinfoYYlex();
02170 
02171   //printf("type=`%s' class=`%s' name=`%s' args=`%s'\n",
02172   //        type.data(),scope.data(),name.data(),args.data());
02173 
02174   int nb = name.findRev('[');
02175   if (nb!=-1 && args.isEmpty()) // correct for [] in name ambigity (due to Java return type allowing [])
02176   {
02177     args.prepend(name.right(name.length()-nb));
02178     name=name.left(nb);
02179   }
02180 
02181 #if 0
02182   {
02183     int l=scope.length();
02184     int i=0;
02185     int skipCount=0;
02186     cl.resize(0);
02187     ctl.resize(0);
02188     for (i=0;i<l;i++)
02189     {
02190       char c=scope.at(i);
02191       if (c=='<') 
02192         skipCount++;
02193       else if (c=='>') 
02194         skipCount--;
02195       else if (skipCount==0) 
02196         cl+=c;
02197     }
02198   }
02199   cl=stripTemplateSpecifiersFromScope(removeRedundantWhiteSpace(scope),FALSE); 
02200   ctl.resize(0);
02201 #endif
02202 
02203   cl=scope;
02204   n=removeRedundantWhiteSpace(name);
02205   int il,ir;
02206   if ((il=n.find('<'))!=-1 && (ir=n.findRev('>'))!=-1)
02207     // TODO: handle cases like where n="operator<< <T>" 
02208   {
02209     ftl=removeRedundantWhiteSpace(n.right(n.length()-il));
02210     n=n.left(il);
02211   }
02212   
02213   //ctl=classTempList.copy();
02214   //ftl=funcTempList.copy();
02215   t=removeRedundantWhiteSpace(type);
02216   a=removeRedundantWhiteSpace(args);
02217   exc=removeRedundantWhiteSpace(exceptionString);
02218   
02219   if (!t.isEmpty() && t.at(t.length()-1)==')') // for function pointers
02220   {
02221     a.prepend(")");
02222     t=t.left(t.length()-1);
02223   }
02224   //printf("type=`%s' class=`%s' name=`%s' args=`%s'\n",
02225   //        t.data(),cl.data(),n.data(),a.data());
02226 
02227   return;
02228   
02229   
02230 }
02231 
02232 //extern "C" { // some bogus code to keep the compiler happy
02233 //  int  declinfoYYwrap() { return 1 ; }
02234 //  void declinfoYYdummy() { yy_flex_realloc(0,0); } 
02235 //}
02236 
02237 #if 0
02238 void dumpDecl(const char *s)
02239 {
02240   QCString className;
02241   QCString classTNames;
02242   QCString type;
02243   QCString name;
02244   QCString args;
02245   QCString funcTNames;
02246   msg("-----------------------------------------\n");
02247   parseFuncDecl(s,className,classTNames,type,name,args,funcTNames);
02248   msg("type=`%s' class=`%s' classTempl=`%s' name=`%s' "
02249          "funcTemplateNames=`%s' args=`%s'\n",
02250             type.data(),className.data(),classTNames.data(),
02251             name.data(),funcTNames.data(),args.data()
02252         );
02253 }
02254 
02255 // some test code
02256 int main()
02257 {
02258   dumpDecl("A < T > :: Value * A < T > :: getValue < S > ( const A < T > & a )");
02259   dumpDecl("const A<T>::Value* A<T>::getValue<S>(const A<T>&a)");
02260   dumpDecl("func()");
02261   dumpDecl("friend void bla<>()");
02262   dumpDecl("name< T > :: operator () (int bla)");
02263   dumpDecl("name< T > :: operator << (int bla)");
02264   dumpDecl("name< T > :: operator << <> (int bla)");
02265   dumpDecl("className::func()");
02266   dumpDecl("void ( * Name < T > :: bla ) ( int, char * )"); 
02267 }
02268 #endif
02269 
02270 #if !defined(YY_FLEX_SUBMINOR_VERSION) 
02271 //----------------------------------------------------------------------------
02272 extern "C" { // some bogus code to keep the compiler happy
02273   void declinfoYYdummy() { yy_flex_realloc(0,0); } 
02274 }
02275 #endif
02276 
02277 



Generated on Mon Mar 31 10:58:34 2008 by  doxygen 1.5.1