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 defargsYYrestart(defargsYYin ) 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 defargsYYleng; 00155 00156 extern FILE *defargsYYin, *defargsYYout; 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 defargsYYtext. */ \ 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 defargsYYtext 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 defargsYYrestart()), so that the user can continue scanning by 00248 * just pointing defargsYYin 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 defargsYYtext is formed. */ 00276 static char yy_hold_char; 00277 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 00278 int defargsYYleng; 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 defargsYYwrap()'s to do buffer switches 00286 * instead of setting up a fresh defargsYYin. A bit of a hack ... 00287 */ 00288 static int yy_did_buffer_switch_on_eof; 00289 00290 void defargsYYrestart (FILE *input_file ); 00291 void defargsYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 00292 YY_BUFFER_STATE defargsYY_create_buffer (FILE *file,int size ); 00293 void defargsYY_delete_buffer (YY_BUFFER_STATE b ); 00294 void defargsYY_flush_buffer (YY_BUFFER_STATE b ); 00295 void defargsYYpush_buffer_state (YY_BUFFER_STATE new_buffer ); 00296 void defargsYYpop_buffer_state (void ); 00297 00298 static void defargsYYensure_buffer_stack (void ); 00299 static void defargsYY_load_buffer_state (void ); 00300 static void defargsYY_init_buffer (YY_BUFFER_STATE b,FILE *file ); 00301 00302 #define YY_FLUSH_BUFFER defargsYY_flush_buffer(YY_CURRENT_BUFFER ) 00303 00304 YY_BUFFER_STATE defargsYY_scan_buffer (char *base,yy_size_t size ); 00305 YY_BUFFER_STATE defargsYY_scan_string (yyconst char *yy_str ); 00306 YY_BUFFER_STATE defargsYY_scan_bytes (yyconst char *bytes,int len ); 00307 00308 void *defargsYYalloc (yy_size_t ); 00309 void *defargsYYrealloc (void *,yy_size_t ); 00310 void defargsYYfree (void * ); 00311 00312 #define yy_new_buffer defargsYY_create_buffer 00313 00314 #define yy_set_interactive(is_interactive) \ 00315 { \ 00316 if ( ! YY_CURRENT_BUFFER ){ \ 00317 defargsYYensure_buffer_stack (); \ 00318 YY_CURRENT_BUFFER_LVALUE = \ 00319 defargsYY_create_buffer(defargsYYin,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 defargsYYensure_buffer_stack (); \ 00328 YY_CURRENT_BUFFER_LVALUE = \ 00329 defargsYY_create_buffer(defargsYYin,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 defargsYYwrap(n) 1 00339 #define YY_SKIP_YYWRAP 00340 00341 typedef unsigned char YY_CHAR; 00342 00343 FILE *defargsYYin = (FILE *) 0, *defargsYYout = (FILE *) 0; 00344 00345 typedef int yy_state_type; 00346 00347 extern int defargsYYlineno; 00348 00349 int defargsYYlineno = 1; 00350 00351 extern char *defargsYYtext; 00352 #define yytext_ptr defargsYYtext 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 defargsYYtext. 00361 */ 00362 #define YY_DO_BEFORE_ACTION \ 00363 (yytext_ptr) = yy_bp; \ 00364 defargsYYleng = (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 45 00370 #define YY_END_OF_BUFFER 46 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[214] = 00379 { 0, 00380 2, 2, 46, 44, 45, 43, 45, 44, 45, 1, 00381 44, 45, 29, 44, 45, 22, 29, 44, 45, 29, 00382 44, 45, 29, 44, 45, 29, 44, 45, 29, 44, 00383 45, 31, 44, 45, 15, 31, 44, 45, 16, 31, 00384 44, 45, 31, 44, 45, 30, 31, 44, 45, 17, 00385 31, 44, 45, 18, 31, 44, 45, 20, 31, 44, 00386 45, 19, 31, 44, 45, 27, 44, 45, 2, 27, 00387 44, 45, 14, 27, 44, 45, 25, 27, 44, 45, 00388 27, 44, 45, 27, 44, 45, 14, 27, 44, 45, 00389 23, 27, 44, 45, 25, 27, 44, 45, 26, 27, 00390 00391 44, 45, 27, 44, 45, 14, 27, 44, 45, 7, 00392 29, 44, 45, 29, 44, 45, 14, 29, 44, 45, 00393 25, 29, 44, 45, 25, 29, 44, 45, 12, 27, 00394 44, 45, 9, 26, 27, 44, 45, 44, 45, 44, 00395 45, 44, 45, 44, 45, 36, 41, 44, 45, 40, 00396 43, 45, 41, 44, 45, 36, 41, 44, 45, 37, 00397 44, 45, 39, 43, 45, 37, 44, 45, 28, 21, 00398 16, 30, 2,16392, 13, 26, 3, 10, 11, 9, 00399 26, 34, 36, 38, 36, 37, 37, 37, 42, 16, 00400 16,16392, 8200, 6, 6, 35, 36, 42, 37, 42, 00401 00402 42, 8200, 5, 4, 5, 36, 42, 37, 42, 24, 00403 4, 32, 33 00404 } ; 00405 00406 static yyconst flex_int16_t yy_accept[153] = 00407 { 0, 00408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00409 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 00410 3, 3, 3, 3, 3, 3, 3, 4, 6, 8, 00411 10, 13, 16, 20, 23, 26, 29, 32, 35, 39, 00412 43, 46, 50, 54, 58, 62, 66, 69, 73, 77, 00413 81, 84, 87, 91, 95, 99, 103, 106, 110, 114, 00414 117, 121, 125, 129, 133, 138, 140, 142, 144, 146, 00415 150, 153, 156, 160, 163, 166, 169, 169, 169, 170, 00416 171, 171, 172, 173, 174, 174, 174, 175, 175, 175, 00417 176, 177, 177, 178, 178, 178, 178, 179, 180, 182, 00418 00419 182, 182, 182, 183, 183, 183, 184, 185, 186, 187, 00420 188, 189, 190, 191, 192, 192, 192, 192, 193, 194, 00421 194, 194, 195, 195, 196, 196, 196, 197, 197, 197, 00422 199, 201, 202, 202, 203, 203, 204, 206, 206, 206, 00423 206, 208, 210, 211, 212, 212, 213, 213, 213, 213, 00424 214, 214 00425 } ; 00426 00427 static yyconst flex_int32_t yy_ec[256] = 00428 { 0, 00429 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 00430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00432 1, 2, 4, 5, 1, 1, 1, 6, 7, 8, 00433 9, 10, 1, 11, 12, 1, 13, 14, 15, 15, 00434 15, 15, 15, 15, 15, 16, 16, 17, 1, 18, 00435 19, 20, 1, 1, 21, 21, 21, 21, 21, 21, 00436 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 00437 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 00438 22, 23, 24, 1, 21, 1, 25, 21, 26, 21, 00439 00440 27, 21, 21, 21, 28, 21, 21, 29, 21, 30, 00441 31, 21, 21, 21, 32, 33, 21, 34, 21, 21, 00442 21, 21, 35, 1, 36, 1, 1, 1, 1, 1, 00443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00450 00451 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00453 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00454 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00455 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00456 1, 1, 1, 1, 1 00457 } ; 00458 00459 static yyconst flex_int32_t yy_meta[37] = 00460 { 0, 00461 1, 2, 3, 1, 1, 1, 1, 1, 4, 5, 00462 1, 1, 1, 6, 6, 6, 4, 1, 1, 1, 00463 7, 1, 1, 1, 7, 7, 7, 7, 7, 7, 00464 7, 7, 7, 7, 1, 1 00465 } ; 00466 00467 static yyconst flex_int16_t yy_base[170] = 00468 { 0, 00469 0, 1, 2, 3, 19, 40, 63, 0, 0, 0, 00470 10, 18, 0, 92, 127, 0, 161, 0, 194, 226, 00471 258, 290, 31, 37, 4, 20, 302, 500, 500, 38, 00472 500, 500, 500, 281, 45, 37, 0, 500, 500, 298, 00473 49, 0, 500, 500, 500, 500, 500, 296, 100, 101, 00474 277, 94, 90, 500, 103, 0, 272, 500, 500, 272, 00475 500, 111, 163, 169, 0, 27, 23, 263, 260, 0, 00476 500, 277, 102, 0, 500, 107, 115, 171, 500, 500, 00477 287, 178, 0, 286, 109, 196, 323, 165, 108, 500, 00478 0, 263, 500, 279, 194, 208, 500, 500, 0, 183, 00479 00480 261, 185, 500, 253, 253, 0, 500, 182, 0, 207, 00481 227, 263, 230, 0, 187, 263, 231, 208, 356, 232, 00482 230, 500, 272, 271, 255, 252, 500, 243, 240, 245, 00483 232, 500, 262, 0, 231, 500, 500, 259, 205, 179, 00484 0, 0, 500, 500, 193, 500, 162, 159, 34, 500, 00485 500, 390, 397, 404, 411, 418, 425, 431, 433, 440, 00486 442, 449, 456, 458, 465, 472, 478, 485, 492 00487 } ; 00488 00489 static yyconst flex_int16_t yy_def[170] = 00490 { 0, 00491 152, 152, 152, 152, 153, 153, 151, 7, 7, 7, 00492 7, 7, 7, 7, 151, 15, 153, 17, 154, 154, 00493 152, 152, 155, 155, 156, 156, 151, 151, 151, 151, 00494 151, 151, 151, 151, 151, 151, 157, 151, 151, 158, 00495 151, 159, 151, 151, 151, 151, 151, 151, 160, 151, 00496 151, 151, 151, 151, 151, 161, 162, 151, 151, 163, 00497 151, 151, 151, 151, 164, 151, 151, 151, 151, 165, 00498 151, 151, 165, 166, 151, 166, 151, 151, 151, 151, 00499 158, 167, 159, 151, 160, 160, 160, 151, 151, 151, 00500 161, 162, 151, 151, 168, 151, 151, 151, 164, 151, 00501 00502 169, 151, 151, 151, 151, 165, 151, 165, 166, 166, 00503 166, 151, 167, 113, 160, 151, 160, 87, 160, 151, 00504 151, 151, 151, 151, 151, 169, 151, 151, 151, 165, 00505 166, 151, 160, 119, 151, 151, 151, 151, 151, 151, 00506 165, 166, 151, 151, 151, 151, 151, 151, 151, 151, 00507 0, 151, 151, 151, 151, 151, 151, 151, 151, 151, 00508 151, 151, 151, 151, 151, 151, 151, 151, 151 00509 } ; 00510 00511 static yyconst flex_int16_t yy_nxt[537] = 00512 { 0, 00513 151, 151, 29, 29, 29, 29, 75, 38, 38, 31, 00514 31, 151, 30, 30, 30, 30, 76, 38, 38, 31, 00515 31, 29, 75, 33, 102, 38, 38, 43, 100, 44, 00516 34, 35, 76, 71, 46, 43, 103, 44, 36, 71, 00517 72, 37, 29, 73, 33, 45, 72, 77, 101, 73, 00518 78, 34, 35, 45, 77, 79, 79, 78, 77, 36, 00519 150, 78, 37, 38, 38, 29, 38, 38, 38, 38, 00520 39, 40, 38, 38, 38, 41, 38, 38, 38, 38, 00521 38, 38, 38, 42, 38, 38, 38, 42, 42, 42, 00522 42, 42, 42, 42, 42, 42, 42, 38, 38, 38, 00523 00524 38, 86, 88, 77, 88, 87, 78, 90, 90, 87, 00525 115, 77, 88, 89, 108, 89, 110, 120, 112, 111, 00526 121, 90, 90, 89, 112, 116, 46, 47, 48, 29, 00527 47, 47, 47, 47, 49, 50, 47, 50, 51, 52, 00528 47, 47, 47, 47, 53, 54, 55, 56, 57, 47, 00529 47, 56, 56, 56, 56, 56, 56, 56, 56, 56, 00530 56, 58, 47, 29, 88, 59, 88, 60, 61, 62, 00531 96, 62, 34, 35, 112, 89, 97, 89, 61, 81, 00532 63, 79, 79, 112, 100, 130, 102, 149, 115, 148, 00533 98, 113, 113, 113, 130, 61, 29, 117, 103, 144, 00534 00535 124, 87, 64, 116, 101, 87, 52, 125, 125, 96, 00536 131, 147, 116, 85, 65, 97, 131, 85, 65, 65, 00537 65, 65, 65, 65, 65, 65, 65, 65, 29, 98, 00538 131, 81, 117, 135, 64, 135, 87, 146, 52, 131, 00539 87, 135, 135, 113, 113, 113, 65, 116, 143, 142, 00540 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 00541 29, 137, 141, 86, 140, 144, 66, 87, 138, 138, 00542 30, 87, 145, 145, 139, 127, 67, 136, 136, 133, 00543 132, 129, 128, 68, 127, 122, 93, 84, 81, 107, 00544 105, 69, 29, 104, 95, 93, 90, 84, 66, 81, 00545 00546 79, 151, 30, 151, 151, 151, 151, 151, 67, 151, 00547 151, 151, 151, 151, 151, 68, 151, 151, 151, 151, 00548 151, 151, 151, 69, 118, 151, 151, 151, 87, 151, 00549 151, 151, 87, 151, 151, 151, 151, 151, 151, 116, 00550 151, 151, 151, 119, 151, 151, 151, 119, 119, 119, 00551 119, 119, 119, 119, 119, 119, 119, 115, 151, 151, 00552 151, 151, 151, 151, 151, 151, 151, 151, 151, 134, 00553 134, 134, 116, 151, 151, 151, 134, 151, 151, 151, 00554 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 00555 28, 28, 28, 28, 28, 28, 28, 32, 32, 32, 00556 00557 32, 32, 32, 32, 47, 47, 47, 47, 47, 47, 00558 47, 70, 70, 70, 70, 70, 70, 70, 74, 74, 00559 74, 74, 74, 74, 74, 80, 80, 151, 80, 80, 00560 80, 80, 82, 151, 151, 151, 151, 82, 83, 83, 00561 85, 85, 85, 151, 85, 85, 85, 91, 91, 92, 00562 92, 92, 92, 92, 92, 92, 94, 94, 151, 94, 00563 94, 94, 94, 99, 99, 106, 106, 151, 106, 151, 00564 106, 106, 109, 109, 151, 109, 109, 109, 109, 114, 00565 151, 151, 151, 114, 114, 123, 123, 151, 123, 123, 00566 123, 123, 126, 126, 126, 126, 126, 126, 126, 27, 00567 00568 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 00569 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 00570 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 00571 151, 151, 151, 151, 151, 151 00572 } ; 00573 00574 static yyconst flex_int16_t yy_chk[537] = 00575 { 0, 00576 0, 0, 1, 2, 3, 4, 25, 13, 13, 3, 00577 4, 0, 1, 2, 3, 4, 25, 11, 11, 3, 00578 4, 5, 26, 5, 67, 12, 12, 11, 66, 11, 00579 5, 5, 26, 23, 13, 12, 67, 12, 5, 24, 00580 23, 5, 6, 23, 6, 11, 24, 30, 66, 24, 00581 30, 6, 6, 12, 35, 36, 36, 35, 41, 6, 00582 149, 41, 6, 7, 7, 7, 7, 7, 7, 7, 00583 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 00584 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 00585 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 00586 00587 14, 49, 50, 52, 55, 49, 52, 53, 53, 49, 00588 85, 73, 62, 50, 73, 55, 76, 89, 77, 76, 00589 89, 55, 55, 62, 77, 85, 14, 15, 15, 15, 00590 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 00591 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 00592 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 00593 15, 15, 15, 17, 63, 17, 88, 17, 17, 17, 00594 64, 17, 17, 17, 78, 63, 64, 88, 17, 82, 00595 17, 63, 63, 78, 100, 108, 102, 148, 115, 147, 00596 64, 82, 82, 82, 108, 17, 19, 86, 102, 145, 00597 00598 95, 86, 19, 115, 100, 86, 19, 95, 95, 96, 00599 110, 140, 86, 118, 19, 96, 110, 118, 19, 19, 00600 19, 19, 19, 19, 19, 19, 19, 19, 20, 96, 00601 111, 113, 117, 121, 20, 120, 117, 139, 20, 111, 00602 117, 120, 121, 113, 113, 113, 20, 117, 135, 131, 00603 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 00604 21, 125, 130, 133, 129, 138, 21, 133, 125, 125, 00605 21, 133, 138, 138, 128, 126, 21, 124, 123, 116, 00606 112, 105, 104, 21, 101, 94, 92, 84, 81, 72, 00607 69, 21, 22, 68, 60, 57, 51, 48, 22, 40, 00608 00609 34, 27, 22, 0, 0, 0, 0, 0, 22, 0, 00610 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 00611 0, 0, 0, 22, 87, 0, 0, 0, 87, 0, 00612 0, 0, 87, 0, 0, 0, 0, 0, 0, 87, 00613 0, 0, 0, 87, 0, 0, 0, 87, 87, 87, 00614 87, 87, 87, 87, 87, 87, 87, 119, 0, 0, 00615 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 00616 119, 119, 119, 0, 0, 0, 119, 0, 0, 0, 00617 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 00618 152, 152, 152, 152, 152, 152, 152, 153, 153, 153, 00619 00620 153, 153, 153, 153, 154, 154, 154, 154, 154, 154, 00621 154, 155, 155, 155, 155, 155, 155, 155, 156, 156, 00622 156, 156, 156, 156, 156, 157, 157, 0, 157, 157, 00623 157, 157, 158, 0, 0, 0, 0, 158, 159, 159, 00624 160, 160, 160, 0, 160, 160, 160, 161, 161, 162, 00625 162, 162, 162, 162, 162, 162, 163, 163, 0, 163, 00626 163, 163, 163, 164, 164, 165, 165, 0, 165, 0, 00627 165, 165, 166, 166, 0, 166, 166, 166, 166, 167, 00628 0, 0, 0, 167, 167, 168, 168, 0, 168, 168, 00629 168, 168, 169, 169, 169, 169, 169, 169, 169, 151, 00630 00631 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 00632 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 00633 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 00634 151, 151, 151, 151, 151, 151 00635 } ; 00636 00637 extern int defargsYY_flex_debug; 00638 int defargsYY_flex_debug = 0; 00639 00640 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; 00641 static char *yy_full_match; 00642 static int yy_lp; 00643 static int yy_looking_for_trail_begin = 0; 00644 static int yy_full_lp; 00645 static int *yy_full_state; 00646 #define YY_TRAILING_MASK 0x2000 00647 #define YY_TRAILING_HEAD_MASK 0x4000 00648 #define REJECT \ 00649 { \ 00650 *yy_cp = (yy_hold_char); /* undo effects of setting up defargsYYtext */ \ 00651 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ 00652 (yy_lp) = yy_full_lp; /* restore orig. accepting pos. */ \ 00653 (yy_state_ptr) = yy_full_state; /* restore orig. state */ \ 00654 yy_current_state = *(yy_state_ptr); /* restore curr. state */ \ 00655 ++(yy_lp); \ 00656 goto find_rule; \ 00657 } 00658 00659 #define yymore() yymore_used_but_not_detected 00660 #define YY_MORE_ADJ 0 00661 #define YY_RESTORE_YY_MORE_OFFSET 00662 char *defargsYYtext; 00663 #line 1 "defargs.l" 00664 /****************************************************************************** 00665 * 00666 * $Id: declinfo.l,v 1.1 1998/09/09 21:32:20 root Exp $ 00667 * 00668 * Copyright (C) 1997-2008 by Dimitri van Heesch. 00669 * 00670 * Permission to use, copy, modify, and distribute this software and its 00671 * documentation under the terms of the GNU General Public License is hereby 00672 * granted. No representations are made about the suitability of this software 00673 * for any purpose. It is provided "as is" without express or implied warranty. 00674 * See the GNU General Public License for more details. 00675 * 00676 * Documents produced by Doxygen are derivative works derived from the 00677 * input used in their production; they are not affected by this license. 00678 * 00679 */ 00704 #line 44 "defargs.l" 00705 00706 /* 00707 * includes 00708 */ 00709 #include "qtbc.h" 00710 #include <stdio.h> 00711 //#include <iostream.h> 00712 #include <assert.h> 00713 #include <ctype.h> 00714 #include <qregexp.h> 00715 00716 #include "defargs.h" 00717 #include "entry.h" 00718 #include "util.h" 00719 00720 #define YY_NEVER_INTERACTIVE 1 00721 00722 /* ----------------------------------------------------------------- 00723 * state variables 00724 */ 00725 static const char *g_inputString; 00726 static int g_inputPosition; 00727 static ArgumentList *g_argList; 00728 static QCString *g_copyArgValue; 00729 static QCString g_curArgTypeName; 00730 static QCString g_curArgDefValue; 00731 static QCString g_curArgName; 00732 static QCString g_curArgDocs; 00733 static QCString g_curArgAttrib; 00734 static QCString g_curArgArray; 00735 static QCString g_extraTypeChars; 00736 static int g_argRoundCount; 00737 static int g_argSharpCount; 00738 static int g_argCurlyCount; 00739 static int g_readArgContext; 00740 static int g_lastDocContext; 00741 static int g_lastDocChar; 00742 00743 /* ----------------------------------------------------------------- 00744 */ 00745 #undef YY_INPUT 00746 #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); 00747 00748 static int yyread(char *buf,int max_size) 00749 { 00750 int c=0; 00751 while( c < max_size && g_inputString[g_inputPosition] ) 00752 { 00753 *buf = g_inputString[g_inputPosition++] ; 00754 c++; buf++; 00755 } 00756 return c; 00757 } 00758 00759 00760 00761 00762 00763 00764 00765 00766 00767 00768 00769 00770 00771 #line 772 "<stdout>" 00772 00773 #define INITIAL 0 00774 #define Start 1 00775 #define CopyArgString 2 00776 #define CopyArgRound 3 00777 #define CopyArgRound2 4 00778 #define CopyArgSharp 5 00779 #define CopyArgCurly 6 00780 #define ReadFuncArgType 7 00781 #define ReadFuncArgDef 8 00782 #define ReadFuncArgPtr 9 00783 #define FuncQual 10 00784 #define ReadDocBlock 11 00785 #define ReadDocLine 12 00786 00787 #ifndef YY_NO_UNISTD_H 00788 /* Special case for "unistd.h", since it is non-ANSI. We include it way 00789 * down here because we want the user's section 1 to have been scanned first. 00790 * The user has a chance to override it with an option. 00791 */ 00792 #include <unistd.h> 00793 #endif 00794 00795 #ifndef YY_EXTRA_TYPE 00796 #define YY_EXTRA_TYPE void * 00797 #endif 00798 00799 static int yy_init_globals (void ); 00800 00801 /* Macros after this point can all be overridden by user definitions in 00802 * section 1. 00803 */ 00804 00805 #ifndef YY_SKIP_YYWRAP 00806 #ifdef __cplusplus 00807 extern "C" int defargsYYwrap (void ); 00808 #else 00809 extern int defargsYYwrap (void ); 00810 #endif 00811 #endif 00812 00813 static void yyunput (int c,char *buf_ptr ); 00814 00815 #ifndef yytext_ptr 00816 static void yy_flex_strncpy (char *,yyconst char *,int ); 00817 #endif 00818 00819 #ifdef YY_NEED_STRLEN 00820 static int yy_flex_strlen (yyconst char * ); 00821 #endif 00822 00823 #ifndef YY_NO_INPUT 00824 00825 #ifdef __cplusplus 00826 static int yyinput (void ); 00827 #else 00828 static int input (void ); 00829 #endif 00830 00831 #endif 00832 00833 /* Amount of stuff to slurp up with each read. */ 00834 #ifndef YY_READ_BUF_SIZE 00835 #define YY_READ_BUF_SIZE 8192 00836 #endif 00837 00838 /* Copy whatever the last rule matched to the standard output. */ 00839 #ifndef ECHO 00840 /* This used to be an fputs(), but since the string might contain NUL's, 00841 * we now use fwrite(). 00842 */ 00843 #define ECHO (void) fwrite( defargsYYtext, defargsYYleng, 1, defargsYYout ) 00844 #endif 00845 00846 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 00847 * is returned in "result". 00848 */ 00849 #ifndef YY_INPUT 00850 #define YY_INPUT(buf,result,max_size) \ 00851 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 00852 { \ 00853 int c = '*'; \ 00854 size_t n; \ 00855 for ( n = 0; n < max_size && \ 00856 (c = getc( defargsYYin )) != EOF && c != '\n'; ++n ) \ 00857 buf[n] = (char) c; \ 00858 if ( c == '\n' ) \ 00859 buf[n++] = (char) c; \ 00860 if ( c == EOF && ferror( defargsYYin ) ) \ 00861 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 00862 result = n; \ 00863 } \ 00864 else \ 00865 { \ 00866 errno=0; \ 00867 while ( (result = fread(buf, 1, max_size, defargsYYin))==0 && ferror(defargsYYin)) \ 00868 { \ 00869 if( errno != EINTR) \ 00870 { \ 00871 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 00872 break; \ 00873 } \ 00874 errno=0; \ 00875 clearerr(defargsYYin); \ 00876 } \ 00877 }\ 00878 \ 00879 00880 #endif 00881 00882 /* No semi-colon after return; correct usage is to write "yyterminate();" - 00883 * we don't want an extra ';' after the "return" because that will cause 00884 * some compilers to complain about unreachable statements. 00885 */ 00886 #ifndef yyterminate 00887 #define yyterminate() return YY_NULL 00888 #endif 00889 00890 /* Number of entries by which start-condition stack grows. */ 00891 #ifndef YY_START_STACK_INCR 00892 #define YY_START_STACK_INCR 25 00893 #endif 00894 00895 /* Report a fatal error. */ 00896 #ifndef YY_FATAL_ERROR 00897 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 00898 #endif 00899 00900 /* end tables serialization structures and prototypes */ 00901 00902 /* Default declaration of generated scanner - a define so the user can 00903 * easily add parameters. 00904 */ 00905 #ifndef YY_DECL 00906 #define YY_DECL_IS_OURS 1 00907 00908 extern int defargsYYlex (void); 00909 00910 #define YY_DECL int defargsYYlex (void) 00911 #endif /* !YY_DECL */ 00912 00913 /* Code executed at the beginning of each rule, after defargsYYtext and defargsYYleng 00914 * have been set up. 00915 */ 00916 #ifndef YY_USER_ACTION 00917 #define YY_USER_ACTION 00918 #endif 00919 00920 /* Code executed at the end of each rule. */ 00921 #ifndef YY_BREAK 00922 #define YY_BREAK break; 00923 #endif 00924 00925 #define YY_RULE_SETUP \ 00926 YY_USER_ACTION 00927 00930 YY_DECL 00931 { 00932 register yy_state_type yy_current_state; 00933 register char *yy_cp, *yy_bp; 00934 register int yy_act; 00935 00936 #line 119 "defargs.l" 00937 00938 00939 #line 940 "<stdout>" 00940 00941 if ( !(yy_init) ) 00942 { 00943 (yy_init) = 1; 00944 00945 #ifdef YY_USER_INIT 00946 YY_USER_INIT; 00947 #endif 00948 00949 /* Create the reject buffer large enough to save one state per allowed character. */ 00950 if ( ! (yy_state_buf) ) 00951 (yy_state_buf) = (yy_state_type *)defargsYYalloc(YY_STATE_BUF_SIZE ); 00952 00953 if ( ! (yy_start) ) 00954 (yy_start) = 1; /* first start state */ 00955 00956 if ( ! defargsYYin ) 00957 defargsYYin = stdin; 00958 00959 if ( ! defargsYYout ) 00960 defargsYYout = stdout; 00961 00962 if ( ! YY_CURRENT_BUFFER ) { 00963 defargsYYensure_buffer_stack (); 00964 YY_CURRENT_BUFFER_LVALUE = 00965 defargsYY_create_buffer(defargsYYin,YY_BUF_SIZE ); 00966 } 00967 00968 defargsYY_load_buffer_state( ); 00969 } 00970 00971 while ( 1 ) /* loops until end-of-file is reached */ 00972 { 00973 yy_cp = (yy_c_buf_p); 00974 00975 /* Support of defargsYYtext. */ 00976 *yy_cp = (yy_hold_char); 00977 00978 /* yy_bp points to the position in yy_ch_buf of the start of 00979 * the current run. 00980 */ 00981 yy_bp = yy_cp; 00982 00983 yy_current_state = (yy_start); 00984 00985 (yy_state_ptr) = (yy_state_buf); 00986 *(yy_state_ptr)++ = yy_current_state; 00987 00988 yy_match: 00989 do 00990 { 00991 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 00992 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 00993 { 00994 yy_current_state = (int) yy_def[yy_current_state]; 00995 if ( yy_current_state >= 152 ) 00996 yy_c = yy_meta[(unsigned int) yy_c]; 00997 } 00998 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 00999 *(yy_state_ptr)++ = yy_current_state; 01000 ++yy_cp; 01001 } 01002 while ( yy_base[yy_current_state] != 500 ); 01003 01004 yy_find_action: 01005 yy_current_state = *--(yy_state_ptr); 01006 (yy_lp) = yy_accept[yy_current_state]; 01007 find_rule: /* we branch to this label when backing up */ 01008 for ( ; ; ) /* until we find what rule we matched */ 01009 { 01010 if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) 01011 { 01012 yy_act = yy_acclist[(yy_lp)]; 01013 if ( yy_act & YY_TRAILING_HEAD_MASK || 01014 yy_looking_for_trail_begin ) 01015 { 01016 if ( yy_act == yy_looking_for_trail_begin ) 01017 { 01018 yy_looking_for_trail_begin = 0; 01019 yy_act &= ~YY_TRAILING_HEAD_MASK; 01020 break; 01021 } 01022 } 01023 else if ( yy_act & YY_TRAILING_MASK ) 01024 { 01025 yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK; 01026 yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK; 01027 } 01028 else 01029 { 01030 (yy_full_match) = yy_cp; 01031 yy_full_state = (yy_state_ptr); 01032 yy_full_lp = (yy_lp); 01033 break; 01034 } 01035 ++(yy_lp); 01036 goto find_rule; 01037 } 01038 --yy_cp; 01039 yy_current_state = *--(yy_state_ptr); 01040 (yy_lp) = yy_accept[yy_current_state]; 01041 } 01042 01043 YY_DO_BEFORE_ACTION; 01044 01045 do_action: /* This label is used only to access EOF actions. */ 01046 01047 switch ( yy_act ) 01048 { /* beginning of action switch */ 01049 case 1: 01050 YY_RULE_SETUP 01051 #line 121 "defargs.l" 01052 { BEGIN(ReadFuncArgType); } 01053 YY_BREAK 01054 case 2: 01055 YY_RULE_SETUP 01056 #line 123 "defargs.l" 01057 { 01058 g_curArgTypeName+=" "; 01059 } 01060 YY_BREAK 01061 case 3: 01062 /* rule 3 can match eol */ 01063 YY_RULE_SETUP 01064 #line 126 "defargs.l" 01065 { 01066 if (g_curArgTypeName.stripWhiteSpace().isEmpty()) 01067 { 01068 g_curArgAttrib=defargsYYtext; // for M$-IDL 01069 } 01070 else // array type 01071 { 01072 g_curArgArray+=defargsYYtext; 01073 } 01074 } 01075 YY_BREAK 01076 case 4: 01077 YY_RULE_SETUP 01078 #line 136 "defargs.l" 01079 { g_curArgDefValue+=defargsYYtext; } 01080 YY_BREAK 01081 case 5: 01082 YY_RULE_SETUP 01083 #line 137 "defargs.l" 01084 { g_curArgDefValue+=defargsYYtext; } 01085 YY_BREAK 01086 case 6: 01087 YY_RULE_SETUP 01088 #line 138 "defargs.l" 01089 { g_curArgDefValue+=defargsYYtext; } 01090 YY_BREAK 01091 case 7: 01092 YY_RULE_SETUP 01093 #line 139 "defargs.l" 01094 { 01095 g_curArgDefValue+=*defargsYYtext; 01096 BEGIN( CopyArgString ); 01097 } 01098 YY_BREAK 01099 case 8: 01100 /* rule 8 can match eol */ 01101 YY_RULE_SETUP 01102 #line 143 "defargs.l" 01103 { 01104 // function pointer as argument 01105 g_curArgTypeName+=defargsYYtext; 01106 //g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace(); 01107 BEGIN( ReadFuncArgPtr ); 01108 } 01109 YY_BREAK 01110 case 9: 01111 YY_RULE_SETUP 01112 #line 149 "defargs.l" 01113 { 01114 g_curArgName=defargsYYtext; 01115 } 01116 YY_BREAK 01117 case 10: 01118 YY_RULE_SETUP 01119 #line 152 "defargs.l" 01120 { // function pointer 01121 g_curArgTypeName+=defargsYYtext; 01122 //g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace(); 01123 g_readArgContext = ReadFuncArgType; 01124 g_copyArgValue=&g_curArgTypeName; 01125 g_argRoundCount=0; 01126 BEGIN( CopyArgRound2 ); 01127 } 01128 YY_BREAK 01129 case 11: 01130 *yy_cp = (yy_hold_char); /* undo effects of setting up defargsYYtext */ 01131 (yy_c_buf_p) = yy_cp = yy_bp + 1; 01132 YY_DO_BEFORE_ACTION; /* set up defargsYYtext again */ 01133 YY_RULE_SETUP 01134 #line 160 "defargs.l" 01135 { // pointer to fixed size array 01136 g_curArgTypeName+=defargsYYtext; 01137 g_curArgTypeName+=g_curArgName; 01138 //g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace(); 01139 BEGIN( ReadFuncArgType ); 01140 } 01141 YY_BREAK 01142 case 12: 01143 YY_RULE_SETUP 01144 #line 166 "defargs.l" 01145 { // redundant braces detected / remove them 01146 int i=g_curArgTypeName.findRev('('),l=g_curArgTypeName.length(); 01147 if (i!=-1) 01148 g_curArgTypeName=g_curArgTypeName.left(i)+ 01149 g_curArgTypeName.right(l-i-1); 01150 g_curArgTypeName+=g_curArgName; 01151 BEGIN( ReadFuncArgType ); 01152 } 01153 YY_BREAK 01154 case 13: 01155 YY_RULE_SETUP 01156 #line 174 "defargs.l" 01157 { // handle operators in defargs 01158 g_curArgTypeName+=defargsYYtext; 01159 } 01160 YY_BREAK 01161 case 14: 01162 YY_RULE_SETUP 01163 #line 177 "defargs.l" 01164 { 01165 if (YY_START==ReadFuncArgType) 01166 { 01167 g_curArgTypeName+=*defargsYYtext; 01168 g_copyArgValue=&g_curArgTypeName; 01169 } 01170 else // YY_START==ReadFuncArgDef 01171 { 01172 g_curArgDefValue+=*defargsYYtext; 01173 g_copyArgValue=&g_curArgDefValue; 01174 } 01175 g_readArgContext = YY_START; 01176 if (*defargsYYtext=='(') 01177 { 01178 g_argRoundCount=0; 01179 BEGIN( CopyArgRound ); 01180 } 01181 else if (*defargsYYtext=='{') 01182 { 01183 g_argCurlyCount=0; 01184 BEGIN( CopyArgCurly ); 01185 } 01186 else // defargsYYtext=='<' 01187 { 01188 g_argSharpCount=0; 01189 BEGIN( CopyArgSharp ); 01190 } 01191 } 01192 YY_BREAK 01193 case 15: 01194 YY_RULE_SETUP 01195 #line 205 "defargs.l" 01196 { 01197 g_argRoundCount++; 01198 *g_copyArgValue += *defargsYYtext; 01199 } 01200 YY_BREAK 01201 case 16: 01202 YY_RULE_SETUP 01203 #line 209 "defargs.l" 01204 { 01205 *g_copyArgValue += defargsYYtext; 01206 if (g_argRoundCount>0) 01207 { 01208 g_argRoundCount--; 01209 } 01210 else 01211 { 01212 if (YY_START==CopyArgRound2) 01213 { 01214 *g_copyArgValue+=" "+g_curArgName; 01215 } 01216 BEGIN( g_readArgContext ); 01217 } 01218 } 01219 YY_BREAK 01220 case 17: 01221 YY_RULE_SETUP 01222 #line 224 "defargs.l" 01223 { 01224 g_argSharpCount++; 01225 *g_copyArgValue += *defargsYYtext; 01226 } 01227 YY_BREAK 01228 case 18: 01229 YY_RULE_SETUP 01230 #line 228 "defargs.l" 01231 { 01232 *g_copyArgValue += *defargsYYtext; 01233 if (g_argSharpCount>0) g_argSharpCount--; 01234 else BEGIN( g_readArgContext ); 01235 } 01236 YY_BREAK 01237 case 19: 01238 YY_RULE_SETUP 01239 #line 233 "defargs.l" 01240 { 01241 g_argCurlyCount++; 01242 *g_copyArgValue += *defargsYYtext; 01243 } 01244 YY_BREAK 01245 case 20: 01246 YY_RULE_SETUP 01247 #line 237 "defargs.l" 01248 { 01249 *g_copyArgValue += *defargsYYtext; 01250 if (g_argCurlyCount>0) g_argCurlyCount--; 01251 else BEGIN( g_readArgContext ); 01252 } 01253 YY_BREAK 01254 case 21: 01255 YY_RULE_SETUP 01256 #line 242 "defargs.l" 01257 { 01258 g_curArgDefValue+=defargsYYtext; 01259 } 01260 YY_BREAK 01261 case 22: 01262 YY_RULE_SETUP 01263 #line 245 "defargs.l" 01264 { 01265 g_curArgDefValue+=*defargsYYtext; 01266 BEGIN( ReadFuncArgDef ); 01267 } 01268 YY_BREAK 01269 case 23: 01270 YY_RULE_SETUP 01271 #line 249 "defargs.l" 01272 { 01273 BEGIN( ReadFuncArgDef ); 01274 } 01275 YY_BREAK 01276 case 24: 01277 YY_RULE_SETUP 01278 #line 252 "defargs.l" 01279 { 01280 g_lastDocContext=YY_START; 01281 g_lastDocChar=*defargsYYtext; 01282 QCString text=defargsYYtext; 01283 if (text.find("//")!=-1) 01284 BEGIN( ReadDocLine ); 01285 else 01286 BEGIN( ReadDocBlock ); 01287 } 01288 YY_BREAK 01289 case 25: 01290 YY_RULE_SETUP 01291 #line 261 "defargs.l" 01292 { 01293 if (*defargsYYtext==')' && g_curArgTypeName.stripWhiteSpace().isEmpty()) 01294 { 01295 g_curArgTypeName+=*defargsYYtext; 01296 BEGIN(FuncQual); 01297 } 01298 else 01299 { 01300 g_curArgTypeName=removeRedundantWhiteSpace(g_curArgTypeName); 01301 g_curArgDefValue=g_curArgDefValue.stripWhiteSpace(); 01302 //printf("curArgType=`%s' curArgDefVal=`%s'\n",g_curArgTypeName.data(),g_curArgDefValue.data()); 01303 int l=g_curArgTypeName.length(); 01304 if (l>0) 01305 { 01306 int i=l-1; 01307 while (i>=0 && (isspace((uchar)g_curArgTypeName.at(i)) || g_curArgTypeName.at(i)=='.')) i--; 01308 while (i>=0 && isId(g_curArgTypeName.at(i))) i--; 01309 //printf("g_curArgTypeName=`%s' i=%d\n",g_curArgTypeName.data(),i); 01310 Argument *a = new Argument; 01311 a->attrib = g_curArgAttrib.copy(); 01312 //printf("a->type=%s a->name=%s i=%d l=%d\n", 01313 // a->type.data(),a->name.data(),i,l); 01314 a->array.resize(0); 01315 if (i==l-1 && g_curArgTypeName.at(i)==')') // function argument 01316 { 01317 int bi=g_curArgTypeName.find('('); 01318 int fi=bi-1; 01319 //printf("func arg fi=%d\n",fi); 01320 while (fi>=0 && isId(g_curArgTypeName.at(fi))) fi--; 01321 if (fi>=0) 01322 { 01323 a->type = g_curArgTypeName.left(fi+1); 01324 a->name = g_curArgTypeName.mid(fi+1,bi-fi-1).stripWhiteSpace(); 01325 a->array = g_curArgTypeName.right(l-bi); 01326 } 01327 else 01328 { 01329 a->type = g_curArgTypeName; 01330 } 01331 } 01332 else if (i>=0 && g_curArgTypeName.at(i)!=':') 01333 { // type contains a name 01334 a->type = removeRedundantWhiteSpace(g_curArgTypeName.left(i+1)); 01335 a->name = g_curArgTypeName.right(l-i-1).stripWhiteSpace(); 01336 } 01337 else // assume only the type was specified, try to determine name later 01338 { 01339 a->type = removeRedundantWhiteSpace(g_curArgTypeName); 01340 } 01341 a->array += removeRedundantWhiteSpace(g_curArgArray); 01342 //printf("array=%s\n",a->array.data()); 01343 int alen = a->array.length(); 01344 if (alen>2 && a->array.at(0)=='(' && 01345 a->array.at(alen-1)==')') // fix-up for int *(a[10]) 01346 { 01347 int i=a->array.find('[')-1; 01348 a->array = a->array.mid(1,alen-2); 01349 if (i>0 && a->name.isEmpty()) 01350 { 01351 a->name = a->array.left(i); 01352 a->array = a->array.mid(i); 01353 } 01354 } 01355 a->defval = g_curArgDefValue.copy(); 01356 //printf("a->type=%s a->name=%s a->defval=\"%s\"\n",a->type.data(),a->name.data(),a->defval.data()); 01357 a->docs = g_curArgDocs.stripWhiteSpace(); 01358 //printf("Argument `%s' `%s' adding docs=`%s'\n",a->type.data(),a->name.data(),a->docs.data()); 01359 g_argList->append(a); 01360 } 01361 g_curArgAttrib.resize(0); 01362 g_curArgTypeName.resize(0); 01363 g_curArgDefValue.resize(0); 01364 g_curArgArray.resize(0); 01365 g_curArgDocs.resize(0); 01366 if (*defargsYYtext==')') 01367 { 01368 BEGIN(FuncQual); 01369 //printf(">>> end of argument list\n"); 01370 } 01371 else 01372 { 01373 BEGIN( ReadFuncArgType ); 01374 } 01375 } 01376 } 01377 YY_BREAK 01378 case 26: 01379 YY_RULE_SETUP 01380 #line 346 "defargs.l" 01381 { 01382 QCString name=defargsYYtext; //resolveDefines(defargsYYtext); 01383 if (YY_START==ReadFuncArgType && g_curArgArray=="[]") // Java style array 01384 { 01385 g_curArgTypeName+=" []"; 01386 g_curArgArray.resize(0); 01387 } 01388 //printf("resolveName `%s'->`%s'\n",defargsYYtext,name.data()); 01389 g_curArgTypeName+=name; 01390 } 01391 YY_BREAK 01392 case 27: 01393 YY_RULE_SETUP 01394 #line 356 "defargs.l" 01395 { 01396 g_curArgTypeName+=*defargsYYtext; 01397 } 01398 YY_BREAK 01399 case 28: 01400 YY_RULE_SETUP 01401 #line 360 "defargs.l" 01402 { 01403 g_curArgDefValue+=defargsYYtext; 01404 } 01405 YY_BREAK 01406 case 29: 01407 YY_RULE_SETUP 01408 #line 363 "defargs.l" 01409 { 01410 g_curArgDefValue+=*defargsYYtext; 01411 } 01412 YY_BREAK 01413 case 30: 01414 YY_RULE_SETUP 01415 #line 366 "defargs.l" 01416 { 01417 QCString name=defargsYYtext; //resolveDefines(defargsYYtext); 01418 *g_copyArgValue+=name; 01419 } 01420 YY_BREAK 01421 case 31: 01422 YY_RULE_SETUP 01423 #line 370 "defargs.l" 01424 { 01425 *g_copyArgValue += *defargsYYtext; 01426 } 01427 YY_BREAK 01428 case 32: 01429 YY_RULE_SETUP 01430 #line 373 "defargs.l" 01431 { 01432 g_argList->constSpecifier=TRUE; 01433 } 01434 YY_BREAK 01435 case 33: 01436 YY_RULE_SETUP 01437 #line 376 "defargs.l" 01438 { 01439 g_argList->volatileSpecifier=TRUE; 01440 } 01441 YY_BREAK 01442 case 34: 01443 YY_RULE_SETUP 01444 #line 379 "defargs.l" 01445 { 01446 g_argList->pureSpecifier=TRUE; 01447 } 01448 YY_BREAK 01449 case 35: 01450 /* rule 35 can match eol */ 01451 YY_RULE_SETUP 01452 #line 382 "defargs.l" 01453 { // for functions returning a pointer to an array, 01454 // i.e. ")[]" in "int (*f(int))[4]" with argsString="(int))[4]" 01455 g_extraTypeChars=defargsYYtext; 01456 } 01457 YY_BREAK 01458 case 36: 01459 YY_RULE_SETUP 01460 #line 386 "defargs.l" 01461 { 01462 g_curArgDocs+=defargsYYtext; 01463 } 01464 YY_BREAK 01465 case 37: 01466 YY_RULE_SETUP 01467 #line 389 "defargs.l" 01468 { 01469 g_curArgDocs+=defargsYYtext; 01470 } 01471 YY_BREAK 01472 case 38: 01473 YY_RULE_SETUP 01474 #line 392 "defargs.l" 01475 { 01476 if (g_lastDocChar!=0) 01477 unput(g_lastDocChar); 01478 BEGIN(g_lastDocContext); 01479 } 01480 YY_BREAK 01481 case 39: 01482 /* rule 39 can match eol */ 01483 YY_RULE_SETUP 01484 #line 397 "defargs.l" 01485 { 01486 if (g_lastDocChar!=0) 01487 unput(g_lastDocChar); 01488 BEGIN(g_lastDocContext); 01489 } 01490 YY_BREAK 01491 case 40: 01492 /* rule 40 can match eol */ 01493 YY_RULE_SETUP 01494 #line 402 "defargs.l" 01495 { 01496 g_curArgDocs+=*defargsYYtext; 01497 } 01498 YY_BREAK 01499 case 41: 01500 YY_RULE_SETUP 01501 #line 405 "defargs.l" 01502 { 01503 g_curArgDocs+=*defargsYYtext; 01504 } 01505 YY_BREAK 01506 case 42: 01507 YY_RULE_SETUP 01508 #line 408 "defargs.l" 01509 { 01510 g_lastDocContext=YY_START; 01511 g_lastDocChar=0; 01512 if (defargsYYtext[1]=='/') 01513 BEGIN( ReadDocLine ); 01514 else 01515 BEGIN( ReadDocBlock ); 01516 } 01517 YY_BREAK 01518 case 43: 01519 /* rule 43 can match eol */ 01520 YY_RULE_SETUP 01521 #line 416 "defargs.l" 01522 01523 YY_BREAK 01524 case 44: 01525 YY_RULE_SETUP 01526 #line 417 "defargs.l" 01527 01528 YY_BREAK 01529 case 45: 01530 YY_RULE_SETUP 01531 #line 419 "defargs.l" 01532 ECHO; 01533 YY_BREAK 01534 #line 1535 "<stdout>" 01535 case YY_STATE_EOF(INITIAL): 01536 case YY_STATE_EOF(Start): 01537 case YY_STATE_EOF(CopyArgString): 01538 case YY_STATE_EOF(CopyArgRound): 01539 case YY_STATE_EOF(CopyArgRound2): 01540 case YY_STATE_EOF(CopyArgSharp): 01541 case YY_STATE_EOF(CopyArgCurly): 01542 case YY_STATE_EOF(ReadFuncArgType): 01543 case YY_STATE_EOF(ReadFuncArgDef): 01544 case YY_STATE_EOF(ReadFuncArgPtr): 01545 case YY_STATE_EOF(FuncQual): 01546 case YY_STATE_EOF(ReadDocBlock): 01547 case YY_STATE_EOF(ReadDocLine): 01548 yyterminate(); 01549 01550 case YY_END_OF_BUFFER: 01551 { 01552 /* Amount of text matched not including the EOB char. */ 01553 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 01554 01555 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 01556 *yy_cp = (yy_hold_char); 01557 YY_RESTORE_YY_MORE_OFFSET 01558 01559 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 01560 { 01561 /* We're scanning a new file or input source. It's 01562 * possible that this happened because the user 01563 * just pointed defargsYYin at a new source and called 01564 * defargsYYlex(). If so, then we have to assure 01565 * consistency between YY_CURRENT_BUFFER and our 01566 * globals. Here is the right place to do so, because 01567 * this is the first action (other than possibly a 01568 * back-up) that will match for the new input source. 01569 */ 01570 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 01571 YY_CURRENT_BUFFER_LVALUE->yy_input_file = defargsYYin; 01572 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 01573 } 01574 01575 /* Note that here we test for yy_c_buf_p "<=" to the position 01576 * of the first EOB in the buffer, since yy_c_buf_p will 01577 * already have been incremented past the NUL character 01578 * (since all states make transitions on EOB to the 01579 * end-of-buffer state). Contrast this with the test 01580 * in input(). 01581 */ 01582 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 01583 { /* This was really a NUL. */ 01584 yy_state_type yy_next_state; 01585 01586 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 01587 01588 yy_current_state = yy_get_previous_state( ); 01589 01590 /* Okay, we're now positioned to make the NUL 01591 * transition. We couldn't have 01592 * yy_get_previous_state() go ahead and do it 01593 * for us because it doesn't know how to deal 01594 * with the possibility of jamming (and we don't 01595 * want to build jamming into it because then it 01596 * will run more slowly). 01597 */ 01598 01599 yy_next_state = yy_try_NUL_trans( yy_current_state ); 01600 01601 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 01602 01603 if ( yy_next_state ) 01604 { 01605 /* Consume the NUL. */ 01606 yy_cp = ++(yy_c_buf_p); 01607 yy_current_state = yy_next_state; 01608 goto yy_match; 01609 } 01610 01611 else 01612 { 01613 yy_cp = (yy_c_buf_p); 01614 goto yy_find_action; 01615 } 01616 } 01617 01618 else switch ( yy_get_next_buffer( ) ) 01619 { 01620 case EOB_ACT_END_OF_FILE: 01621 { 01622 (yy_did_buffer_switch_on_eof) = 0; 01623 01624 if ( defargsYYwrap( ) ) 01625 { 01626 /* Note: because we've taken care in 01627 * yy_get_next_buffer() to have set up 01628 * defargsYYtext, we can now set up 01629 * yy_c_buf_p so that if some total 01630 * hoser (like flex itself) wants to 01631 * call the scanner after we return the 01632 * YY_NULL, it'll still work - another 01633 * YY_NULL will get returned. 01634 */ 01635 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 01636 01637 yy_act = YY_STATE_EOF(YY_START); 01638 goto do_action; 01639 } 01640 01641 else 01642 { 01643 if ( ! (yy_did_buffer_switch_on_eof) ) 01644 YY_NEW_FILE; 01645 } 01646 break; 01647 } 01648 01649 case EOB_ACT_CONTINUE_SCAN: 01650 (yy_c_buf_p) = 01651 (yytext_ptr) + yy_amount_of_matched_text; 01652 01653 yy_current_state = yy_get_previous_state( ); 01654 01655 yy_cp = (yy_c_buf_p); 01656 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 01657 goto yy_match; 01658 01659 case EOB_ACT_LAST_MATCH: 01660 (yy_c_buf_p) = 01661 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 01662 01663 yy_current_state = yy_get_previous_state( ); 01664 01665 yy_cp = (yy_c_buf_p); 01666 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 01667 goto yy_find_action; 01668 } 01669 break; 01670 } 01671 01672 default: 01673 YY_FATAL_ERROR( 01674 "fatal flex scanner internal error--no action found" ); 01675 } /* end of action switch */ 01676 } /* end of scanning one token */ 01677 } /* end of defargsYYlex */ 01678 01679 /* yy_get_next_buffer - try to read in a new buffer 01680 * 01681 * Returns a code representing an action: 01682 * EOB_ACT_LAST_MATCH - 01683 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 01684 * EOB_ACT_END_OF_FILE - end of file 01685 */ 01686 static int yy_get_next_buffer (void) 01687 { 01688 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 01689 register char *source = (yytext_ptr); 01690 register int number_to_move, i; 01691 int ret_val; 01692 01693 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 01694 YY_FATAL_ERROR( 01695 "fatal flex scanner internal error--end of buffer missed" ); 01696 01697 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 01698 { /* Don't try to fill the buffer, so this is an EOF. */ 01699 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 01700 { 01701 /* We matched a single character, the EOB, so 01702 * treat this as a final EOF. 01703 */ 01704 return EOB_ACT_END_OF_FILE; 01705 } 01706 01707 else 01708 { 01709 /* We matched some text prior to the EOB, first 01710 * process it. 01711 */ 01712 return EOB_ACT_LAST_MATCH; 01713 } 01714 } 01715 01716 /* Try to read more data. */ 01717 01718 /* First move last chars to start of buffer. */ 01719 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 01720 01721 for ( i = 0; i < number_to_move; ++i ) 01722 *(dest++) = *(source++); 01723 01724 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 01725 /* don't do the read, it's not guaranteed to return an EOF, 01726 * just force an EOF 01727 */ 01728 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 01729 01730 else 01731 { 01732 int num_to_read = 01733 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 01734 01735 while ( num_to_read <= 0 ) 01736 { /* Not enough room in the buffer - grow it. */ 01737 01738 YY_FATAL_ERROR( 01739 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 01740 01741 } 01742 01743 if ( num_to_read > YY_READ_BUF_SIZE ) 01744 num_to_read = YY_READ_BUF_SIZE; 01745 01746 /* Read in more data. */ 01747 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 01748 (yy_n_chars), num_to_read ); 01749 01750 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 01751 } 01752 01753 if ( (yy_n_chars) == 0 ) 01754 { 01755 if ( number_to_move == YY_MORE_ADJ ) 01756 { 01757 ret_val = EOB_ACT_END_OF_FILE; 01758 defargsYYrestart(defargsYYin ); 01759 } 01760 01761 else 01762 { 01763 ret_val = EOB_ACT_LAST_MATCH; 01764 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 01765 YY_BUFFER_EOF_PENDING; 01766 } 01767 } 01768 01769 else 01770 ret_val = EOB_ACT_CONTINUE_SCAN; 01771 01772 (yy_n_chars) += number_to_move; 01773 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 01774 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 01775 01776 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 01777 01778 return ret_val; 01779 } 01780 01781 /* yy_get_previous_state - get the state just before the EOB char was reached */ 01782 01783 static yy_state_type yy_get_previous_state (void) 01784 { 01785 register yy_state_type yy_current_state; 01786 register char *yy_cp; 01787 01788 yy_current_state = (yy_start); 01789 01790 (yy_state_ptr) = (yy_state_buf); 01791 *(yy_state_ptr)++ = yy_current_state; 01792 01793 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 01794 { 01795 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 01796 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 01797 { 01798 yy_current_state = (int) yy_def[yy_current_state]; 01799 if ( yy_current_state >= 152 ) 01800 yy_c = yy_meta[(unsigned int) yy_c]; 01801 } 01802 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 01803 *(yy_state_ptr)++ = yy_current_state; 01804 } 01805 01806 return yy_current_state; 01807 } 01808 01809 /* yy_try_NUL_trans - try to make a transition on the NUL character 01810 * 01811 * synopsis 01812 * next_state = yy_try_NUL_trans( current_state ); 01813 */ 01814 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 01815 { 01816 register int yy_is_jam; 01817 01818 register YY_CHAR yy_c = 1; 01819 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 01820 { 01821 yy_current_state = (int) yy_def[yy_current_state]; 01822 if ( yy_current_state >= 152 ) 01823 yy_c = yy_meta[(unsigned int) yy_c]; 01824 } 01825 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 01826 yy_is_jam = (yy_current_state == 151); 01827 if ( ! yy_is_jam ) 01828 *(yy_state_ptr)++ = yy_current_state; 01829 01830 return yy_is_jam ? 0 : yy_current_state; 01831 } 01832 01833 static void yyunput (int c, register char * yy_bp ) 01834 { 01835 register char *yy_cp; 01836 01837 yy_cp = (yy_c_buf_p); 01838 01839 /* undo effects of setting up defargsYYtext */ 01840 *yy_cp = (yy_hold_char); 01841 01842 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 01843 { /* need to shift things up to make room */ 01844 /* +2 for EOB chars. */ 01845 register int number_to_move = (yy_n_chars) + 2; 01846 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 01847 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 01848 register char *source = 01849 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 01850 01851 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 01852 *--dest = *--source; 01853 01854 yy_cp += (int) (dest - source); 01855 yy_bp += (int) (dest - source); 01856 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 01857 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 01858 01859 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 01860 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 01861 } 01862 01863 *--yy_cp = (char) c; 01864 01865 (yytext_ptr) = yy_bp; 01866 (yy_hold_char) = *yy_cp; 01867 (yy_c_buf_p) = yy_cp; 01868 } 01869 01870 #ifndef YY_NO_INPUT 01871 #ifdef __cplusplus 01872 static int yyinput (void) 01873 #else 01874 static int input (void) 01875 #endif 01876 01877 { 01878 int c; 01879 01880 *(yy_c_buf_p) = (yy_hold_char); 01881 01882 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 01883 { 01884 /* yy_c_buf_p now points to the character we want to return. 01885 * If this occurs *before* the EOB characters, then it's a 01886 * valid NUL; if not, then we've hit the end of the buffer. 01887 */ 01888 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 01889 /* This was really a NUL. */ 01890 *(yy_c_buf_p) = '\0'; 01891 01892 else 01893 { /* need more input */ 01894 int offset = (yy_c_buf_p) - (yytext_ptr); 01895 ++(yy_c_buf_p); 01896 01897 switch ( yy_get_next_buffer( ) ) 01898 { 01899 case EOB_ACT_LAST_MATCH: 01900 /* This happens because yy_g_n_b() 01901 * sees that we've accumulated a 01902 * token and flags that we need to 01903 * try matching the token before 01904 * proceeding. But for input(), 01905 * there's no matching to consider. 01906 * So convert the EOB_ACT_LAST_MATCH 01907 * to EOB_ACT_END_OF_FILE. 01908 */ 01909 01910 /* Reset buffer status. */ 01911 defargsYYrestart(defargsYYin ); 01912 01913 /*FALLTHROUGH*/ 01914 01915 case EOB_ACT_END_OF_FILE: 01916 { 01917 if ( defargsYYwrap( ) ) 01918 return 0; 01919 01920 if ( ! (yy_did_buffer_switch_on_eof) ) 01921 YY_NEW_FILE; 01922 #ifdef __cplusplus 01923 return yyinput(); 01924 #else 01925 return input(); 01926 #endif 01927 } 01928 01929 case EOB_ACT_CONTINUE_SCAN: 01930 (yy_c_buf_p) = (yytext_ptr) + offset; 01931 break; 01932 } 01933 } 01934 } 01935 01936 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 01937 *(yy_c_buf_p) = '\0'; /* preserve defargsYYtext */ 01938 (yy_hold_char) = *++(yy_c_buf_p); 01939 01940 return c; 01941 } 01942 #endif /* ifndef YY_NO_INPUT */ 01943 01949 void defargsYYrestart (FILE * input_file ) 01950 { 01951 01952 if ( ! YY_CURRENT_BUFFER ){ 01953 defargsYYensure_buffer_stack (); 01954 YY_CURRENT_BUFFER_LVALUE = 01955 defargsYY_create_buffer(defargsYYin,YY_BUF_SIZE ); 01956 } 01957 01958 defargsYY_init_buffer(YY_CURRENT_BUFFER,input_file ); 01959 defargsYY_load_buffer_state( ); 01960 } 01961 01966 void defargsYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 01967 { 01968 01969 /* TODO. We should be able to replace this entire function body 01970 * with 01971 * defargsYYpop_buffer_state(); 01972 * defargsYYpush_buffer_state(new_buffer); 01973 */ 01974 defargsYYensure_buffer_stack (); 01975 if ( YY_CURRENT_BUFFER == new_buffer ) 01976 return; 01977 01978 if ( YY_CURRENT_BUFFER ) 01979 { 01980 /* Flush out information for old buffer. */ 01981 *(yy_c_buf_p) = (yy_hold_char); 01982 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 01983 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 01984 } 01985 01986 YY_CURRENT_BUFFER_LVALUE = new_buffer; 01987 defargsYY_load_buffer_state( ); 01988 01989 /* We don't actually know whether we did this switch during 01990 * EOF (defargsYYwrap()) processing, but the only time this flag 01991 * is looked at is after defargsYYwrap() is called, so it's safe 01992 * to go ahead and always set it. 01993 */ 01994 (yy_did_buffer_switch_on_eof) = 1; 01995 } 01996 01997 static void defargsYY_load_buffer_state (void) 01998 { 01999 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 02000 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 02001 defargsYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 02002 (yy_hold_char) = *(yy_c_buf_p); 02003 } 02004 02011 YY_BUFFER_STATE defargsYY_create_buffer (FILE * file, int size ) 02012 { 02013 YY_BUFFER_STATE b; 02014 02015 b = (YY_BUFFER_STATE) defargsYYalloc(sizeof( struct yy_buffer_state ) ); 02016 if ( ! b ) 02017 YY_FATAL_ERROR( "out of dynamic memory in defargsYY_create_buffer()" ); 02018 02019 b->yy_buf_size = size; 02020 02021 /* yy_ch_buf has to be 2 characters longer than the size given because 02022 * we need to put in 2 end-of-buffer characters. 02023 */ 02024 b->yy_ch_buf = (char *) defargsYYalloc(b->yy_buf_size + 2 ); 02025 if ( ! b->yy_ch_buf ) 02026 YY_FATAL_ERROR( "out of dynamic memory in defargsYY_create_buffer()" ); 02027 02028 b->yy_is_our_buffer = 1; 02029 02030 defargsYY_init_buffer(b,file ); 02031 02032 return b; 02033 } 02034 02039 void defargsYY_delete_buffer (YY_BUFFER_STATE b ) 02040 { 02041 02042 if ( ! b ) 02043 return; 02044 02045 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 02046 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 02047 02048 if ( b->yy_is_our_buffer ) 02049 defargsYYfree((void *) b->yy_ch_buf ); 02050 02051 defargsYYfree((void *) b ); 02052 } 02053 02054 #ifndef __cplusplus 02055 extern int isatty (int ); 02056 #endif /* __cplusplus */ 02057 02058 /* Initializes or reinitializes a buffer. 02059 * This function is sometimes called more than once on the same buffer, 02060 * such as during a defargsYYrestart() or at EOF. 02061 */ 02062 static void defargsYY_init_buffer (YY_BUFFER_STATE b, FILE * file ) 02063 02064 { 02065 int oerrno = errno; 02066 02067 defargsYY_flush_buffer(b ); 02068 02069 b->yy_input_file = file; 02070 b->yy_fill_buffer = 1; 02071 02072 /* If b is the current buffer, then defargsYY_init_buffer was _probably_ 02073 * called from defargsYYrestart() or through yy_get_next_buffer. 02074 * In that case, we don't want to reset the lineno or column. 02075 */ 02076 if (b != YY_CURRENT_BUFFER){ 02077 b->yy_bs_lineno = 1; 02078 b->yy_bs_column = 0; 02079 } 02080 02081 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 02082 02083 errno = oerrno; 02084 } 02085 02090 void defargsYY_flush_buffer (YY_BUFFER_STATE b ) 02091 { 02092 if ( ! b ) 02093 return; 02094 02095 b->yy_n_chars = 0; 02096 02097 /* We always need two end-of-buffer characters. The first causes 02098 * a transition to the end-of-buffer state. The second causes 02099 * a jam in that state. 02100 */ 02101 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 02102 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 02103 02104 b->yy_buf_pos = &b->yy_ch_buf[0]; 02105 02106 b->yy_at_bol = 1; 02107 b->yy_buffer_status = YY_BUFFER_NEW; 02108 02109 if ( b == YY_CURRENT_BUFFER ) 02110 defargsYY_load_buffer_state( ); 02111 } 02112 02119 void defargsYYpush_buffer_state (YY_BUFFER_STATE new_buffer ) 02120 { 02121 if (new_buffer == NULL) 02122 return; 02123 02124 defargsYYensure_buffer_stack(); 02125 02126 /* This block is copied from defargsYY_switch_to_buffer. */ 02127 if ( YY_CURRENT_BUFFER ) 02128 { 02129 /* Flush out information for old buffer. */ 02130 *(yy_c_buf_p) = (yy_hold_char); 02131 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 02132 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 02133 } 02134 02135 /* Only push if top exists. Otherwise, replace top. */ 02136 if (YY_CURRENT_BUFFER) 02137 (yy_buffer_stack_top)++; 02138 YY_CURRENT_BUFFER_LVALUE = new_buffer; 02139 02140 /* copied from defargsYY_switch_to_buffer. */ 02141 defargsYY_load_buffer_state( ); 02142 (yy_did_buffer_switch_on_eof) = 1; 02143 } 02144 02149 void defargsYYpop_buffer_state (void) 02150 { 02151 if (!YY_CURRENT_BUFFER) 02152 return; 02153 02154 defargsYY_delete_buffer(YY_CURRENT_BUFFER ); 02155 YY_CURRENT_BUFFER_LVALUE = NULL; 02156 if ((yy_buffer_stack_top) > 0) 02157 --(yy_buffer_stack_top); 02158 02159 if (YY_CURRENT_BUFFER) { 02160 defargsYY_load_buffer_state( ); 02161 (yy_did_buffer_switch_on_eof) = 1; 02162 } 02163 } 02164 02165 /* Allocates the stack if it does not exist. 02166 * Guarantees space for at least one push. 02167 */ 02168 static void defargsYYensure_buffer_stack (void) 02169 { 02170 int num_to_alloc; 02171 02172 if (!(yy_buffer_stack)) { 02173 02174 /* First allocation is just for 2 elements, since we don't know if this 02175 * scanner will even need a stack. We use 2 instead of 1 to avoid an 02176 * immediate realloc on the next call. 02177 */ 02178 num_to_alloc = 1; 02179 (yy_buffer_stack) = (struct yy_buffer_state**)defargsYYalloc 02180 (num_to_alloc * sizeof(struct yy_buffer_state*) 02181 ); 02182 02183 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 02184 02185 (yy_buffer_stack_max) = num_to_alloc; 02186 (yy_buffer_stack_top) = 0; 02187 return; 02188 } 02189 02190 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 02191 02192 /* Increase the buffer to prepare for a possible push. */ 02193 int grow_size = 8 /* arbitrary grow size */; 02194 02195 num_to_alloc = (yy_buffer_stack_max) + grow_size; 02196 (yy_buffer_stack) = (struct yy_buffer_state**)defargsYYrealloc 02197 ((yy_buffer_stack), 02198 num_to_alloc * sizeof(struct yy_buffer_state*) 02199 ); 02200 02201 /* zero only the new slots.*/ 02202 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 02203 (yy_buffer_stack_max) = num_to_alloc; 02204 } 02205 } 02206 02213 YY_BUFFER_STATE defargsYY_scan_buffer (char * base, yy_size_t size ) 02214 { 02215 YY_BUFFER_STATE b; 02216 02217 if ( size < 2 || 02218 base[size-2] != YY_END_OF_BUFFER_CHAR || 02219 base[size-1] != YY_END_OF_BUFFER_CHAR ) 02220 /* They forgot to leave room for the EOB's. */ 02221 return 0; 02222 02223 b = (YY_BUFFER_STATE) defargsYYalloc(sizeof( struct yy_buffer_state ) ); 02224 if ( ! b ) 02225 YY_FATAL_ERROR( "out of dynamic memory in defargsYY_scan_buffer()" ); 02226 02227 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 02228 b->yy_buf_pos = b->yy_ch_buf = base; 02229 b->yy_is_our_buffer = 0; 02230 b->yy_input_file = 0; 02231 b->yy_n_chars = b->yy_buf_size; 02232 b->yy_is_interactive = 0; 02233 b->yy_at_bol = 1; 02234 b->yy_fill_buffer = 0; 02235 b->yy_buffer_status = YY_BUFFER_NEW; 02236 02237 defargsYY_switch_to_buffer(b ); 02238 02239 return b; 02240 } 02241 02250 YY_BUFFER_STATE defargsYY_scan_string (yyconst char * yystr ) 02251 { 02252 02253 return defargsYY_scan_bytes(yystr,strlen(yystr) ); 02254 } 02255 02263 YY_BUFFER_STATE defargsYY_scan_bytes (yyconst char * yybytes, int _yybytes_len ) 02264 { 02265 YY_BUFFER_STATE b; 02266 char *buf; 02267 yy_size_t n; 02268 int i; 02269 02270 /* Get memory for full buffer, including space for trailing EOB's. */ 02271 n = _yybytes_len + 2; 02272 buf = (char *) defargsYYalloc(n ); 02273 if ( ! buf ) 02274 YY_FATAL_ERROR( "out of dynamic memory in defargsYY_scan_bytes()" ); 02275 02276 for ( i = 0; i < _yybytes_len; ++i ) 02277 buf[i] = yybytes[i]; 02278 02279 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 02280 02281 b = defargsYY_scan_buffer(buf,n ); 02282 if ( ! b ) 02283 YY_FATAL_ERROR( "bad buffer in defargsYY_scan_bytes()" ); 02284 02285 /* It's okay to grow etc. this buffer, and we should throw it 02286 * away when we're done. 02287 */ 02288 b->yy_is_our_buffer = 1; 02289 02290 return b; 02291 } 02292 02293 #ifndef YY_EXIT_FAILURE 02294 #define YY_EXIT_FAILURE 2 02295 #endif 02296 02297 static void yy_fatal_error (yyconst char* msg ) 02298 { 02299 (void) fprintf( stderr, "%s\n", msg ); 02300 exit( YY_EXIT_FAILURE ); 02301 } 02302 02303 /* Redefine yyless() so it works in section 3 code. */ 02304 02305 #undef yyless 02306 #define yyless(n) \ 02307 do \ 02308 { \ 02309 /* Undo effects of setting up defargsYYtext. */ \ 02310 int yyless_macro_arg = (n); \ 02311 YY_LESS_LINENO(yyless_macro_arg);\ 02312 defargsYYtext[defargsYYleng] = (yy_hold_char); \ 02313 (yy_c_buf_p) = defargsYYtext + yyless_macro_arg; \ 02314 (yy_hold_char) = *(yy_c_buf_p); \ 02315 *(yy_c_buf_p) = '\0'; \ 02316 defargsYYleng = yyless_macro_arg; \ 02317 } \ 02318 while ( 0 ) 02319 02320 /* Accessor methods (get/set functions) to struct members. */ 02321 02325 int defargsYYget_lineno (void) 02326 { 02327 02328 return defargsYYlineno; 02329 } 02330 02334 FILE *defargsYYget_in (void) 02335 { 02336 return defargsYYin; 02337 } 02338 02342 FILE *defargsYYget_out (void) 02343 { 02344 return defargsYYout; 02345 } 02346 02350 int defargsYYget_leng (void) 02351 { 02352 return defargsYYleng; 02353 } 02354 02359 char *defargsYYget_text (void) 02360 { 02361 return defargsYYtext; 02362 } 02363 02368 void defargsYYset_lineno (int line_number ) 02369 { 02370 02371 defargsYYlineno = line_number; 02372 } 02373 02380 void defargsYYset_in (FILE * in_str ) 02381 { 02382 defargsYYin = in_str ; 02383 } 02384 02385 void defargsYYset_out (FILE * out_str ) 02386 { 02387 defargsYYout = out_str ; 02388 } 02389 02390 int defargsYYget_debug (void) 02391 { 02392 return defargsYY_flex_debug; 02393 } 02394 02395 void defargsYYset_debug (int bdebug ) 02396 { 02397 defargsYY_flex_debug = bdebug ; 02398 } 02399 02400 static int yy_init_globals (void) 02401 { 02402 /* Initialization is the same as for the non-reentrant scanner. 02403 * This function is called from defargsYYlex_destroy(), so don't allocate here. 02404 */ 02405 02406 (yy_buffer_stack) = 0; 02407 (yy_buffer_stack_top) = 0; 02408 (yy_buffer_stack_max) = 0; 02409 (yy_c_buf_p) = (char *) 0; 02410 (yy_init) = 0; 02411 (yy_start) = 0; 02412 02413 (yy_state_buf) = 0; 02414 (yy_state_ptr) = 0; 02415 (yy_full_match) = 0; 02416 (yy_lp) = 0; 02417 02418 /* Defined in main.c */ 02419 #ifdef YY_STDINIT 02420 defargsYYin = stdin; 02421 defargsYYout = stdout; 02422 #else 02423 defargsYYin = (FILE *) 0; 02424 defargsYYout = (FILE *) 0; 02425 #endif 02426 02427 /* For future reference: Set errno on error, since we are called by 02428 * defargsYYlex_init() 02429 */ 02430 return 0; 02431 } 02432 02433 /* defargsYYlex_destroy is for both reentrant and non-reentrant scanners. */ 02434 int defargsYYlex_destroy (void) 02435 { 02436 02437 /* Pop the buffer stack, destroying each element. */ 02438 while(YY_CURRENT_BUFFER){ 02439 defargsYY_delete_buffer(YY_CURRENT_BUFFER ); 02440 YY_CURRENT_BUFFER_LVALUE = NULL; 02441 defargsYYpop_buffer_state(); 02442 } 02443 02444 /* Destroy the stack itself. */ 02445 defargsYYfree((yy_buffer_stack) ); 02446 (yy_buffer_stack) = NULL; 02447 02448 defargsYYfree ( (yy_state_buf) ); 02449 (yy_state_buf) = NULL; 02450 02451 /* Reset the globals. This is important in a non-reentrant scanner so the next time 02452 * defargsYYlex() is called, initialization will occur. */ 02453 yy_init_globals( ); 02454 02455 return 0; 02456 } 02457 02458 /* 02459 * Internal utility routines. 02460 */ 02461 02462 #ifndef yytext_ptr 02463 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 02464 { 02465 register int i; 02466 for ( i = 0; i < n; ++i ) 02467 s1[i] = s2[i]; 02468 } 02469 #endif 02470 02471 #ifdef YY_NEED_STRLEN 02472 static int yy_flex_strlen (yyconst char * s ) 02473 { 02474 register int n; 02475 for ( n = 0; s[n]; ++n ) 02476 ; 02477 02478 return n; 02479 } 02480 #endif 02481 02482 void *defargsYYalloc (yy_size_t size ) 02483 { 02484 return (void *) malloc( size ); 02485 } 02486 02487 void *defargsYYrealloc (void * ptr, yy_size_t size ) 02488 { 02489 /* The cast to (char *) in the following accommodates both 02490 * implementations that use char* generic pointers, and those 02491 * that use void* generic pointers. It works with the latter 02492 * because both ANSI C and C++ allow castless assignment from 02493 * any pointer type to void*, and deal with argument conversions 02494 * as though doing an assignment. 02495 */ 02496 return (void *) realloc( (char *) ptr, size ); 02497 } 02498 02499 void defargsYYfree (void * ptr ) 02500 { 02501 free( (char *) ptr ); /* see defargsYYrealloc() for (char *) cast */ 02502 } 02503 02504 #define YYTABLES_NAME "yytables" 02505 02506 #line 419 "defargs.l" 02507 02508 02509 02510 /* ---------------------------------------------------------------------------- 02511 */ 02512 02518 void stringToArgumentList(const char *argsString,ArgumentList* &al,QCString *extraTypeChars) 02519 { 02520 if (al==0) return; 02521 if (argsString==0) return; 02522 02523 g_copyArgValue=0; 02524 g_curArgDocs.resize(0); 02525 g_curArgAttrib.resize(0); 02526 g_curArgArray.resize(0); 02527 g_extraTypeChars.resize(0); 02528 g_argRoundCount = 0; 02529 g_argSharpCount = 0; 02530 g_argCurlyCount = 0; 02531 g_lastDocChar = 0; 02532 02533 g_inputString = argsString; 02534 g_inputPosition = 0; 02535 g_curArgTypeName.resize(0); 02536 g_curArgDefValue.resize(0); 02537 g_curArgName.resize(0); 02538 g_argList = al; 02539 defargsYYrestart( defargsYYin ); 02540 BEGIN( Start ); 02541 defargsYYlex(); 02542 if (extraTypeChars) *extraTypeChars=g_extraTypeChars; 02543 //printf("stringToArgumentList(%s) result=%s\n",argsString,argListToString(al).data()); 02544 } 02545 02546 #if !defined(YY_FLEX_SUBMINOR_VERSION) 02547 extern "C" { // some bogus code to keep the compiler happy 02548 void defargsYYdummy() { yy_flex_realloc(0,0); } 02549 } 02550 #endif 02551 02552