4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define yy_create_buffer declinfoYY_create_buffer
9 #define yy_delete_buffer declinfoYY_delete_buffer
10 #define yy_flex_debug declinfoYY_flex_debug
11 #define yy_init_buffer declinfoYY_init_buffer
12 #define yy_flush_buffer declinfoYY_flush_buffer
13 #define yy_load_buffer_state declinfoYY_load_buffer_state
14 #define yy_switch_to_buffer declinfoYY_switch_to_buffer
15 #define yyin declinfoYYin
16 #define yyleng declinfoYYleng
17 #define yylex declinfoYYlex
18 #define yylineno declinfoYYlineno
19 #define yyout declinfoYYout
20 #define yyrestart declinfoYYrestart
21 #define yytext declinfoYYtext
22 #define yywrap declinfoYYwrap
23 #define yyalloc declinfoYYalloc
24 #define yyrealloc declinfoYYrealloc
25 #define yyfree declinfoYYfree
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
30 #define YY_FLEX_SUBMINOR_VERSION 35
31 #if YY_FLEX_SUBMINOR_VERSION > 0
35 /* First, we deal with platform-specific or compiler-specific issues. */
37 /* begin standard C headers. */
43 /* end standard C headers. */
45 /* flex integer type definitions */
50 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
62 typedef int8_t flex_int8_t;
63 typedef uint8_t flex_uint8_t;
64 typedef int16_t flex_int16_t;
65 typedef uint16_t flex_uint16_t;
66 typedef int32_t flex_int32_t;
67 typedef uint32_t flex_uint32_t;
68 typedef uint64_t flex_uint64_t;
70 typedef signed char flex_int8_t;
71 typedef short int flex_int16_t;
72 typedef int flex_int32_t;
73 typedef unsigned char flex_uint8_t;
74 typedef unsigned short int flex_uint16_t;
75 typedef unsigned int flex_uint32_t;
78 /* Limits of integral types. */
80 #define INT8_MIN (-128)
83 #define INT16_MIN (-32767-1)
86 #define INT32_MIN (-2147483647-1)
89 #define INT8_MAX (127)
92 #define INT16_MAX (32767)
95 #define INT32_MAX (2147483647)
98 #define UINT8_MAX (255U)
101 #define UINT16_MAX (65535U)
104 #define UINT32_MAX (4294967295U)
107 #endif /* ! FLEXINT_H */
111 /* The "const" storage-class-modifier is valid. */
114 #else /* ! __cplusplus */
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
121 #endif /* defined (__STDC__) */
122 #endif /* ! __cplusplus */
125 #define yyconst const
130 /* Returned upon end-of-file. */
133 /* Promotes a possibly negative, possibly signed char to an unsigned
134 * integer for use as an array index. If the signed char is negative,
135 * we want to instead treat it as an 8-bit unsigned char, hence the
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
140 /* Enter a start condition. This macro really ought to take a parameter,
141 * but we do it the disgusting crufty way forced on us by the ()-less
142 * definition of BEGIN.
144 #define BEGIN (yy_start) = 1 + 2 *
146 /* Translate the current start state into a value that can be later handed
147 * to BEGIN to return to the state. The YYSTATE alias is for lex
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE declinfoYYrestart(declinfoYYin )
159 #define YY_END_OF_BUFFER_CHAR 0
161 /* Size of default input buffer. */
163 #define YY_BUF_SIZE 262144
166 /* The state buf must be large enough to hold one state per character in the main buffer.
168 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
172 typedef struct yy_buffer_state *YY_BUFFER_STATE;
175 #ifndef YY_TYPEDEF_YY_SIZE_T
176 #define YY_TYPEDEF_YY_SIZE_T
177 typedef size_t yy_size_t;
180 extern yy_size_t declinfoYYleng;
182 extern FILE *declinfoYYin, *declinfoYYout;
184 #define EOB_ACT_CONTINUE_SCAN 0
185 #define EOB_ACT_END_OF_FILE 1
186 #define EOB_ACT_LAST_MATCH 2
188 #define YY_LESS_LINENO(n)
190 /* Return all but the first "n" matched characters back to the input stream. */
194 /* Undo effects of setting up declinfoYYtext. */ \
195 int yyless_macro_arg = (n); \
196 YY_LESS_LINENO(yyless_macro_arg);\
197 *yy_cp = (yy_hold_char); \
198 YY_RESTORE_YY_MORE_OFFSET \
199 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
200 YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */ \
204 #define unput(c) yyunput( c, (yytext_ptr) )
206 #ifndef YY_STRUCT_YY_BUFFER_STATE
207 #define YY_STRUCT_YY_BUFFER_STATE
208 struct yy_buffer_state
212 char *yy_ch_buf; /* input buffer */
213 char *yy_buf_pos; /* current position in input buffer */
215 /* Size of input buffer in bytes, not including room for EOB
218 yy_size_t yy_buf_size;
220 /* Number of characters read into yy_ch_buf, not including EOB
223 yy_size_t yy_n_chars;
225 /* Whether we "own" the buffer - i.e., we know we created it,
226 * and can realloc() it to grow it, and should free() it to
229 int yy_is_our_buffer;
231 /* Whether this is an "interactive" input source; if so, and
232 * if we're using stdio for input, then we want to use getc()
233 * instead of fread(), to make sure we stop fetching input after
236 int yy_is_interactive;
238 /* Whether we're considered to be at the beginning of a line.
239 * If so, '^' rules will be active on the next match, otherwise
244 int yy_bs_lineno; /**< The line count. */
245 int yy_bs_column; /**< The column count. */
247 /* Whether to try to fill the input buffer when we reach the
252 int yy_buffer_status;
254 #define YY_BUFFER_NEW 0
255 #define YY_BUFFER_NORMAL 1
256 /* When an EOF's been seen but there's still some text to process
257 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
258 * shouldn't try reading from the input source any more. We might
259 * still have a bunch of tokens to match, though, because of
260 * possible backing-up.
262 * When we actually see the EOF, we change the status to "new"
263 * (via declinfoYYrestart()), so that the user can continue scanning by
264 * just pointing declinfoYYin at a new input file.
266 #define YY_BUFFER_EOF_PENDING 2
269 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
271 /* Stack of input buffers. */
272 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
273 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
274 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
276 /* We provide macros for accessing buffer states in case in the
277 * future we want to put the buffer states in a more general
280 * Returns the top of the stack, or NULL.
282 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
283 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
286 /* Same as previous macro, but useful when we know that the buffer stack is not
287 * NULL or when we need an lvalue. For internal use only.
289 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
291 /* yy_hold_char holds the character lost when declinfoYYtext is formed. */
292 static char yy_hold_char;
293 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
294 yy_size_t declinfoYYleng;
296 /* Points to current character in buffer. */
297 static char *yy_c_buf_p = (char *) 0;
298 static int yy_init = 0; /* whether we need to initialize */
299 static int yy_start = 0; /* start state number */
301 /* Flag which is used to allow declinfoYYwrap()'s to do buffer switches
302 * instead of setting up a fresh declinfoYYin. A bit of a hack ...
304 static int yy_did_buffer_switch_on_eof;
306 void declinfoYYrestart (FILE *input_file );
307 void declinfoYY_switch_to_buffer (YY_BUFFER_STATE new_buffer );
308 YY_BUFFER_STATE declinfoYY_create_buffer (FILE *file,int size );
309 void declinfoYY_delete_buffer (YY_BUFFER_STATE b );
310 void declinfoYY_flush_buffer (YY_BUFFER_STATE b );
311 void declinfoYYpush_buffer_state (YY_BUFFER_STATE new_buffer );
312 void declinfoYYpop_buffer_state (void );
314 static void declinfoYYensure_buffer_stack (void );
315 static void declinfoYY_load_buffer_state (void );
316 static void declinfoYY_init_buffer (YY_BUFFER_STATE b,FILE *file );
318 #define YY_FLUSH_BUFFER declinfoYY_flush_buffer(YY_CURRENT_BUFFER )
320 YY_BUFFER_STATE declinfoYY_scan_buffer (char *base,yy_size_t size );
321 YY_BUFFER_STATE declinfoYY_scan_string (yyconst char *yy_str );
322 YY_BUFFER_STATE declinfoYY_scan_bytes (yyconst char *bytes,yy_size_t len );
324 void *declinfoYYalloc (yy_size_t );
325 void *declinfoYYrealloc (void *,yy_size_t );
326 void declinfoYYfree (void * );
328 #define yy_new_buffer declinfoYY_create_buffer
330 #define yy_set_interactive(is_interactive) \
332 if ( ! YY_CURRENT_BUFFER ){ \
333 declinfoYYensure_buffer_stack (); \
334 YY_CURRENT_BUFFER_LVALUE = \
335 declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE ); \
337 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
340 #define yy_set_bol(at_bol) \
342 if ( ! YY_CURRENT_BUFFER ){\
343 declinfoYYensure_buffer_stack (); \
344 YY_CURRENT_BUFFER_LVALUE = \
345 declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE ); \
347 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
350 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
352 /* Begin user sect3 */
354 #define declinfoYYwrap(n) 1
355 #define YY_SKIP_YYWRAP
357 typedef unsigned char YY_CHAR;
359 FILE *declinfoYYin = (FILE *) 0, *declinfoYYout = (FILE *) 0;
361 typedef int yy_state_type;
363 extern int declinfoYYlineno;
365 int declinfoYYlineno = 1;
367 extern char *declinfoYYtext;
368 #define yytext_ptr declinfoYYtext
370 static yy_state_type yy_get_previous_state (void );
371 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
372 static int yy_get_next_buffer (void );
373 static void yy_fatal_error (yyconst char msg[] );
375 /* Done after the current pattern has been matched and before the
376 * corresponding action - sets up declinfoYYtext.
378 #define YY_DO_BEFORE_ACTION \
379 (yytext_ptr) = yy_bp; \
380 declinfoYYleng = (yy_size_t) (yy_cp - yy_bp); \
381 (yy_hold_char) = *yy_cp; \
383 (yy_c_buf_p) = yy_cp;
385 #define YY_NUM_RULES 26
386 #define YY_END_OF_BUFFER 27
387 /* This struct is not used in this scanner,
388 but its presence is necessary. */
391 flex_int32_t yy_verify;
394 static yyconst flex_int16_t yy_acclist[121] =
396 27, 24, 26, 25, 26, 7, 24, 26, 24, 26,
397 24, 26, 6, 24, 26, 10, 24, 26, 9, 24,
398 26, 5, 24, 26, 12, 24, 26, 24, 26, 8195,
399 24, 26,16387, 11, 24, 26, 8195, 24, 26,16387,
400 17, 24, 26, 15, 17, 24, 26, 16, 17, 24,
401 26, 22, 24, 26, 22, 24, 26, 24, 26, 24,
402 26, 25, 26, 20, 24, 26, 24, 26, 23, 24,
403 26, 7, 10, 9, 5, 12, 11, 8195,16387, 8195,
404 16387, 6, 8, 4, 8195,16387, 8195,16387, 8195,16387,
405 13, 14, 20, 20, 8195,16387, 8195,16387, 4, 8195,
407 8195,16387, 19, 2, 8195,16387, 8195,16387, 18, 8195,
408 16387, 21, 8195,16387, 8, 1, 8195,16387, 1, 8195
411 static yyconst flex_int16_t yy_accept[140] =
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415 1, 2, 4, 6, 9, 11, 13, 16, 19, 22,
416 25, 28, 30, 34, 37, 41, 44, 48, 52, 55,
417 58, 60, 62, 64, 67, 69, 72, 73, 74, 75,
418 76, 77, 78, 78, 78, 78, 80, 82, 83, 83,
419 83, 84, 84, 84, 85, 87, 87, 87, 89, 89,
420 91, 92, 93, 93, 93, 93, 94, 94, 94, 95,
421 95, 95, 95, 97, 97, 99, 99, 99, 99, 99,
422 99, 99, 100, 100, 100, 100, 100, 100, 101, 103,
424 103, 103, 104, 104, 104, 104, 104, 104, 104, 104,
425 105, 105, 107, 107, 107, 107, 107, 109, 109, 109,
426 110, 110, 110, 112, 112, 113, 113, 113, 115, 116,
427 116, 119, 119, 119, 119, 119, 121, 121, 121
430 static yyconst flex_int32_t yy_ec[256] =
432 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 2, 4, 1, 1, 5, 1, 6, 1, 7,
436 8, 6, 1, 1, 1, 1, 1, 9, 9, 9,
437 9, 9, 9, 9, 9, 9, 9, 10, 1, 11,
438 1, 12, 1, 13, 14, 14, 14, 14, 14, 14,
439 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
440 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
441 15, 1, 16, 1, 14, 1, 17, 14, 18, 14,
443 19, 14, 14, 20, 21, 14, 14, 22, 14, 23,
444 24, 25, 14, 26, 27, 28, 14, 29, 30, 14,
445 14, 14, 1, 1, 1, 4, 1, 14, 14, 14,
446 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
447 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
448 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
449 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
450 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
451 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
452 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
454 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
455 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
456 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
457 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
458 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
462 static yyconst flex_int32_t yy_meta[31] =
464 1, 2, 1, 1, 3, 4, 5, 6, 7, 8,
465 1, 1, 3, 9, 10, 1, 9, 9, 9, 9,
466 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
469 static yyconst flex_int16_t yy_base[153] =
471 342, 341, 0, 0, 28, 30, 29, 31, 41, 43,
472 340, 339, 338, 336, 333, 332, 331, 328, 327, 326,
473 328, 346, 346, 58, 51, 0, 321, 65, 346, 309,
474 346, 308, 70, 346, 72, 346, 305, 303, 346, 294,
475 73, 79, 81, 47, 87, 346, 0, 98, 346, 290,
476 346, 346, 100, 104, 289, 36, 271, 289, 56, 110,
477 89, 283, 281, 288, 112, 118, 124, 264, 45, 57,
478 346, 346, 258, 128, 129, 346, 136, 139, 93, 120,
479 142, 149, 143, 140, 152, 155, 259, 258, 26, 271,
480 270, 224, 157, 159, 216, 161, 94, 163, 149, 199,
482 169, 346, 207, 175, 193, 193, 0, 179, 177, 346,
483 181, 107, 184, 188, 186, 195, 166, 190, 191, 346,
484 180, 140, 175, 194, 346, 164, 113, 177, 106, 71,
485 202, 44, 203, 204, 205, 207, 209, 346, 227, 237,
486 247, 257, 267, 276, 28, 284, 292, 302, 311, 315,
490 static yyconst flex_int16_t yy_def[153] =
492 139, 139, 138, 3, 140, 140, 141, 141, 142, 142,
493 139, 139, 139, 139, 139, 139, 139, 139, 143, 143,
494 138, 138, 138, 138, 144, 145, 138, 146, 138, 138,
495 138, 138, 147, 138, 147, 138, 138, 138, 138, 138,
496 148, 148, 148, 138, 148, 138, 24, 146, 138, 138,
497 138, 138, 144, 144, 138, 149, 35, 138, 138, 146,
498 138, 138, 150, 138, 138, 138, 151, 35, 138, 35,
499 138, 138, 138, 148, 148, 138, 148, 148, 138, 138,
500 138, 148, 138, 138, 149, 138, 138, 138, 138, 150,
501 138, 138, 151, 151, 138, 152, 138, 138, 35, 138,
503 138, 138, 138, 148, 138, 138, 48, 138, 138, 138,
504 152, 35, 138, 138, 138, 138, 35, 138, 138, 138,
505 138, 138, 35, 138, 138, 138, 138, 35, 138, 138,
506 35, 138, 138, 138, 138, 138, 138, 0, 138, 138,
507 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
511 static yyconst flex_int16_t yy_nxt[377] =
513 22, 24, 23, 25, 26, 27, 28, 29, 22, 30,
514 31, 22, 32, 33, 34, 22, 33, 33, 33, 33,
515 33, 33, 33, 35, 33, 33, 33, 33, 33, 33,
516 23, 23, 23, 23, 89, 91, 57, 84, 37, 38,
517 37, 38, 42, 43, 42, 43, 97, 44, 80, 44,
518 69, 45, 53, 45, 81, 54, 40, 59, 40, 47,
519 98, 61, 126, 55, 48, 49, 59, 50, 51, 60,
520 61, 66, 52, 66, 75, 99, 67, 62, 67, 76,
521 78, 68, 75, 77, 69, 79, 69, 76, 75, 77,
522 86, 77, 132, 76, 80, 97, 70, 77, 82, 59,
524 81, 53, 60, 61, 54, 138, 87, 129, 138, 98,
525 62, 138, 55, 66, 138, 138, 138, 88, 67, 66,
526 65, 80, 138, 117, 67, 93, 69, 81, 94, 75,
527 75, 68, 69, 130, 76, 76, 95, 75, 77, 77,
528 78, 84, 76, 101, 84, 79, 77, 82, 102, 77,
529 104, 83, 103, 84, 69, 76, 86, 69, 93, 77,
530 138, 94, 109, 138, 84, 129, 69, 127, 110, 95,
531 101, 138, 87, 68, 112, 102, 104, 69, 109, 103,
532 109, 76, 109, 88, 110, 77, 110, 108, 110, 119,
533 68, 124, 119, 123, 120, 124, 125, 120, 128, 68,
535 125, 68, 131, 133, 133, 135, 135, 126, 137, 67,
536 137, 122, 121, 118, 116, 115, 134, 134, 114, 136,
537 136, 134, 113, 134, 108, 92, 68, 22, 22, 22,
538 22, 22, 22, 22, 22, 22, 22, 36, 36, 36,
539 36, 36, 36, 36, 36, 36, 36, 39, 39, 39,
540 39, 39, 39, 39, 39, 39, 39, 41, 41, 41,
541 41, 41, 41, 41, 41, 41, 41, 46, 46, 46,
542 46, 46, 46, 46, 46, 46, 46, 56, 56, 107,
543 91, 106, 105, 100, 56, 63, 63, 63, 68, 92,
544 91, 89, 63, 68, 58, 68, 68, 83, 68, 64,
546 68, 68, 74, 74, 74, 74, 74, 74, 74, 74,
547 74, 74, 85, 73, 72, 71, 65, 85, 64, 85,
548 85, 90, 90, 90, 96, 96, 58, 138, 23, 23,
549 23, 96, 111, 23, 23, 23, 111, 111, 23, 111,
550 23, 23, 23, 23, 23, 21, 138, 138, 138, 138,
551 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
552 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
553 138, 138, 138, 138, 138, 138
556 static yyconst flex_int16_t yy_chk[377] =
558 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
559 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
560 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
561 5, 7, 6, 8, 89, 89, 145, 56, 5, 5,
562 6, 6, 9, 9, 10, 10, 69, 9, 44, 10,
563 56, 9, 25, 10, 44, 25, 7, 59, 8, 24,
564 69, 59, 132, 25, 24, 24, 28, 24, 24, 28,
565 28, 33, 24, 35, 41, 70, 33, 28, 35, 41,
566 42, 70, 43, 41, 33, 42, 35, 43, 45, 42,
567 61, 43, 130, 45, 79, 97, 35, 45, 45, 48,
569 79, 53, 48, 48, 53, 54, 61, 129, 54, 97,
570 48, 60, 53, 65, 60, 60, 54, 61, 65, 66,
571 65, 80, 60, 112, 66, 67, 65, 80, 67, 74,
572 75, 112, 66, 127, 74, 75, 67, 77, 74, 75,
573 78, 84, 77, 81, 83, 78, 77, 77, 81, 78,
574 82, 83, 81, 85, 84, 82, 86, 83, 93, 82,
575 94, 93, 96, 94, 98, 126, 85, 122, 96, 93,
576 101, 94, 86, 99, 99, 101, 104, 98, 109, 101,
577 108, 104, 111, 86, 109, 104, 108, 108, 111, 114,
578 117, 118, 119, 117, 114, 124, 118, 119, 123, 123,
580 124, 128, 128, 131, 133, 134, 135, 121, 136, 133,
581 137, 116, 115, 113, 106, 105, 131, 133, 103, 134,
582 135, 136, 100, 137, 95, 92, 131, 139, 139, 139,
583 139, 139, 139, 139, 139, 139, 139, 140, 140, 140,
584 140, 140, 140, 140, 140, 140, 140, 141, 141, 141,
585 141, 141, 141, 141, 141, 141, 141, 142, 142, 142,
586 142, 142, 142, 142, 142, 142, 142, 143, 143, 143,
587 143, 143, 143, 143, 143, 143, 143, 144, 144, 91,
588 90, 88, 87, 73, 144, 146, 146, 146, 68, 64,
589 63, 62, 146, 147, 58, 57, 147, 55, 147, 50,
591 147, 147, 148, 148, 148, 148, 148, 148, 148, 148,
592 148, 148, 149, 40, 38, 37, 32, 149, 30, 149,
593 149, 150, 150, 150, 151, 151, 27, 21, 20, 19,
594 18, 151, 152, 17, 16, 15, 152, 152, 14, 152,
595 13, 12, 11, 2, 1, 138, 138, 138, 138, 138,
596 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
597 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
598 138, 138, 138, 138, 138, 138
601 extern int declinfoYY_flex_debug;
602 int declinfoYY_flex_debug = 0;
604 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
605 static char *yy_full_match;
607 static int yy_looking_for_trail_begin = 0;
608 static int yy_full_lp;
609 static int *yy_full_state;
610 #define YY_TRAILING_MASK 0x2000
611 #define YY_TRAILING_HEAD_MASK 0x4000
614 *yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */ \
615 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
616 (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
617 (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
618 yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
623 #define yymore() yymore_used_but_not_detected
624 #define YY_MORE_ADJ 0
625 #define YY_RESTORE_YY_MORE_OFFSET
626 char *declinfoYYtext;
628 /******************************************************************************
630 * $Id: declinfo.l,v 1.26 2001/03/19 19:27:40 root Exp $
632 * Copyright (C) 1997-2012 by Dimitri van Heesch.
634 * Permission to use, copy, modify, and distribute this software and its
635 * documentation under the terms of the GNU General Public License is hereby
636 * granted. No representations are made about the suitability of this software
637 * for any purpose. It is provided "as is" without express or implied warranty.
638 * See the GNU General Public License for more details.
640 * Documents produced by Doxygen are derivative works derived from the
641 * input used in their production; they are not affected by this license.
644 #line 19 "declinfo.l"
650 //#include <iostream.h>
654 #include "declinfo.h"
658 #define YY_NO_INPUT 1
660 /* -----------------------------------------------------------------
665 static const char * inputString;
666 static int inputPosition;
667 static QCString scope;
668 static QCString className;
669 static QCString classTempList;
670 static QCString funcTempList;
671 static QCString type;
672 static QCString name;
673 static QCString args;
674 static QCString tmpType;
675 static int sharpCount;
676 static bool classTempListFound;
677 static bool funcTempListFound;
678 static QCString exceptionString;
679 static bool insideObjC;
681 static void addType()
683 //printf("addType() type=`%s' scope=`%s' name=`%s'\n",
684 // type.data(),scope.data(),name.data());
685 if (name.isEmpty() && scope.isEmpty()) return;
686 if (!type.isEmpty()) type+=" ";
687 if (!scope.isEmpty()) type+=scope+"::";
693 static void addTypeName()
695 //printf("addTypeName() type=`%s' scope=`%s' name=`%s'\n",
696 // type.data(),scope.data(),name.data());
697 if (name.isEmpty() ||
698 name.at(name.length()-1)==':') // end of Objective-C keyword => append to name not type
702 if (!type.isEmpty()) type+=' ';
707 #define YY_NEVER_INTERACTIVE 1
709 /* -----------------------------------------------------------------
712 #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
714 static int yyread(char *buf,int max_size)
717 while( c < max_size && inputString[inputPosition] )
719 *buf = inputString[inputPosition++] ;
742 #define EndTemplate 6
743 #define StripTempArgs 7
745 #define ReadExceptions 9
747 #ifndef YY_NO_UNISTD_H
748 /* Special case for "unistd.h", since it is non-ANSI. We include it way
749 * down here because we want the user's section 1 to have been scanned first.
750 * The user has a chance to override it with an option.
755 #ifndef YY_EXTRA_TYPE
756 #define YY_EXTRA_TYPE void *
759 static int yy_init_globals (void );
761 /* Accessor methods to globals.
762 These are made visible to non-reentrant scanners for convenience. */
764 int declinfoYYlex_destroy (void );
766 int declinfoYYget_debug (void );
768 void declinfoYYset_debug (int debug_flag );
770 YY_EXTRA_TYPE declinfoYYget_extra (void );
772 void declinfoYYset_extra (YY_EXTRA_TYPE user_defined );
774 FILE *declinfoYYget_in (void );
776 void declinfoYYset_in (FILE * in_str );
778 FILE *declinfoYYget_out (void );
780 void declinfoYYset_out (FILE * out_str );
782 yy_size_t declinfoYYget_leng (void );
784 char *declinfoYYget_text (void );
786 int declinfoYYget_lineno (void );
788 void declinfoYYset_lineno (int line_number );
790 /* Macros after this point can all be overridden by user definitions in
794 #ifndef YY_SKIP_YYWRAP
796 extern "C" int declinfoYYwrap (void );
798 extern int declinfoYYwrap (void );
803 static void yy_flex_strncpy (char *,yyconst char *,int );
806 #ifdef YY_NEED_STRLEN
807 static int yy_flex_strlen (yyconst char * );
813 static int yyinput (void );
815 static int input (void );
820 /* Amount of stuff to slurp up with each read. */
821 #ifndef YY_READ_BUF_SIZE
822 #define YY_READ_BUF_SIZE 262144
825 /* Copy whatever the last rule matched to the standard output. */
827 /* This used to be an fputs(), but since the string might contain NUL's,
828 * we now use fwrite().
830 #define ECHO fwrite( declinfoYYtext, declinfoYYleng, 1, declinfoYYout )
833 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
834 * is returned in "result".
837 #define YY_INPUT(buf,result,max_size) \
838 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
842 for ( n = 0; n < max_size && \
843 (c = getc( declinfoYYin )) != EOF && c != '\n'; ++n ) \
846 buf[n++] = (char) c; \
847 if ( c == EOF && ferror( declinfoYYin ) ) \
848 YY_FATAL_ERROR( "input in flex scanner failed" ); \
854 while ( (result = fread(buf, 1, max_size, declinfoYYin))==0 && ferror(declinfoYYin)) \
856 if( errno != EINTR) \
858 YY_FATAL_ERROR( "input in flex scanner failed" ); \
862 clearerr(declinfoYYin); \
869 /* No semi-colon after return; correct usage is to write "yyterminate();" -
870 * we don't want an extra ';' after the "return" because that will cause
871 * some compilers to complain about unreachable statements.
874 #define yyterminate() return YY_NULL
877 /* Number of entries by which start-condition stack grows. */
878 #ifndef YY_START_STACK_INCR
879 #define YY_START_STACK_INCR 25
882 /* Report a fatal error. */
883 #ifndef YY_FATAL_ERROR
884 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
887 /* end tables serialization structures and prototypes */
889 /* Default declaration of generated scanner - a define so the user can
890 * easily add parameters.
893 #define YY_DECL_IS_OURS 1
895 extern int declinfoYYlex (void);
897 #define YY_DECL int declinfoYYlex (void)
898 #endif /* !YY_DECL */
900 /* Code executed at the beginning of each rule, after declinfoYYtext and declinfoYYleng
903 #ifndef YY_USER_ACTION
904 #define YY_USER_ACTION
907 /* Code executed at the end of each rule. */
909 #define YY_BREAK break;
912 #define YY_RULE_SETUP \
915 /** The main scanner function which does all the work.
919 register yy_state_type yy_current_state;
920 register char *yy_cp, *yy_bp;
923 #line 117 "declinfo.l"
936 /* Create the reject buffer large enough to save one state per allowed character. */
937 if ( ! (yy_state_buf) )
938 (yy_state_buf) = (yy_state_type *)declinfoYYalloc(YY_STATE_BUF_SIZE );
939 if ( ! (yy_state_buf) )
940 YY_FATAL_ERROR( "out of dynamic memory in declinfoYYlex()" );
943 (yy_start) = 1; /* first start state */
945 if ( ! declinfoYYin )
946 declinfoYYin = stdin;
948 if ( ! declinfoYYout )
949 declinfoYYout = stdout;
951 if ( ! YY_CURRENT_BUFFER ) {
952 declinfoYYensure_buffer_stack ();
953 YY_CURRENT_BUFFER_LVALUE =
954 declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE );
957 declinfoYY_load_buffer_state( );
960 while ( 1 ) /* loops until end-of-file is reached */
962 yy_cp = (yy_c_buf_p);
964 /* Support of declinfoYYtext. */
965 *yy_cp = (yy_hold_char);
967 /* yy_bp points to the position in yy_ch_buf of the start of
972 yy_current_state = (yy_start);
974 (yy_state_ptr) = (yy_state_buf);
975 *(yy_state_ptr)++ = yy_current_state;
980 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
981 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
983 yy_current_state = (int) yy_def[yy_current_state];
984 if ( yy_current_state >= 139 )
985 yy_c = yy_meta[(unsigned int) yy_c];
987 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
988 *(yy_state_ptr)++ = yy_current_state;
991 while ( yy_base[yy_current_state] != 346 );
994 yy_current_state = *--(yy_state_ptr);
995 (yy_lp) = yy_accept[yy_current_state];
996 goto find_rule; /* Shut up GCC warning -Wall */
997 find_rule: /* we branch to this label when backing up */
998 for ( ; ; ) /* until we find what rule we matched */
1000 if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1002 yy_act = yy_acclist[(yy_lp)];
1003 if ( yy_act & YY_TRAILING_HEAD_MASK ||
1004 (yy_looking_for_trail_begin) )
1006 if ( yy_act == (yy_looking_for_trail_begin) )
1008 (yy_looking_for_trail_begin) = 0;
1009 yy_act &= ~YY_TRAILING_HEAD_MASK;
1013 else if ( yy_act & YY_TRAILING_MASK )
1015 (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
1016 (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
1017 (yy_full_match) = yy_cp;
1018 (yy_full_state) = (yy_state_ptr);
1019 (yy_full_lp) = (yy_lp);
1023 (yy_full_match) = yy_cp;
1024 (yy_full_state) = (yy_state_ptr);
1025 (yy_full_lp) = (yy_lp);
1032 yy_current_state = *--(yy_state_ptr);
1033 (yy_lp) = yy_accept[yy_current_state];
1036 YY_DO_BEFORE_ACTION;
1038 do_action: /* This label is used only to access EOF actions. */
1041 { /* beginning of action switch */
1043 *yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
1044 (yy_c_buf_p) = yy_cp = yy_bp + 8;
1045 YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
1047 #line 119 "declinfo.l"
1048 { // operator rule must be before {ID} rule
1049 name += declinfoYYtext;
1055 #line 123 "declinfo.l"
1056 { // Objective-C class categories
1063 name += declinfoYYtext;
1069 #line 133 "declinfo.l"
1070 { // the []'s are for Java,
1071 // the / was add to deal with multi-
1072 // dimensional C++ arrays like A[][15]
1073 // the leading ~ is for a destructor
1074 // the leading ! is for a C++/CLI finalizer (see bug 456475 and 635198)
1076 name += declinfoYYtext;
1081 #line 141 "declinfo.l"
1082 { // found a scope specifier
1083 if (!scope.isEmpty())
1085 scope+="::"+name; // add name to scope
1089 scope = name.copy(); // scope becomes name
1096 #line 152 "declinfo.l"
1097 { // Objective-C argument separator
1098 name+=declinfoYYtext;
1103 #line 155 "declinfo.l"
1106 type+=declinfoYYtext;
1111 #line 159 "declinfo.l"
1118 #line 162 "declinfo.l"
1121 QCString text=declinfoYYtext;
1122 type+=text.stripWhiteSpace();
1127 #line 167 "declinfo.l"
1134 #line 170 "declinfo.l"
1135 { // TODO: function pointers
1142 #line 174 "declinfo.l"
1150 #line 178 "declinfo.l"
1159 #line 183 "declinfo.l"
1164 #line 184 "declinfo.l"
1169 #line 185 "declinfo.l"
1177 #line 189 "declinfo.l"
1190 #line 198 "declinfo.l"
1192 name+=*declinfoYYtext;
1196 *yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
1197 (yy_c_buf_p) = yy_cp -= 1;
1198 YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
1200 #line 201 "declinfo.l"
1207 *yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
1208 (yy_c_buf_p) = yy_cp -= 1;
1209 YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
1211 #line 205 "declinfo.l"
1218 /* rule 20 can match eol */
1219 *yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
1220 (yy_c_buf_p) = yy_cp -= 1;
1221 YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
1223 #line 209 "declinfo.l"
1225 name+=declinfoYYtext;
1231 #line 213 "declinfo.l"
1233 exceptionString="throw(";
1234 BEGIN(ReadExceptions);
1239 #line 217 "declinfo.l"
1241 args+=*declinfoYYtext;
1246 #line 220 "declinfo.l"
1248 exceptionString+=*declinfoYYtext;
1253 #line 223 "declinfo.l"
1257 /* rule 25 can match eol */
1259 #line 224 "declinfo.l"
1264 #line 226 "declinfo.l"
1267 #line 1268 "<stdout>"
1268 case YY_STATE_EOF(INITIAL):
1269 case YY_STATE_EOF(Start):
1270 case YY_STATE_EOF(Template):
1271 case YY_STATE_EOF(ReadArgs):
1272 case YY_STATE_EOF(Operator):
1273 case YY_STATE_EOF(FuncPtr):
1274 case YY_STATE_EOF(EndTemplate):
1275 case YY_STATE_EOF(StripTempArgs):
1276 case YY_STATE_EOF(SkipSharp):
1277 case YY_STATE_EOF(ReadExceptions):
1280 case YY_END_OF_BUFFER:
1282 /* Amount of text matched not including the EOB char. */
1283 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1285 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1286 *yy_cp = (yy_hold_char);
1287 YY_RESTORE_YY_MORE_OFFSET
1289 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1291 /* We're scanning a new file or input source. It's
1292 * possible that this happened because the user
1293 * just pointed declinfoYYin at a new source and called
1294 * declinfoYYlex(). If so, then we have to assure
1295 * consistency between YY_CURRENT_BUFFER and our
1296 * globals. Here is the right place to do so, because
1297 * this is the first action (other than possibly a
1298 * back-up) that will match for the new input source.
1300 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1301 YY_CURRENT_BUFFER_LVALUE->yy_input_file = declinfoYYin;
1302 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1305 /* Note that here we test for yy_c_buf_p "<=" to the position
1306 * of the first EOB in the buffer, since yy_c_buf_p will
1307 * already have been incremented past the NUL character
1308 * (since all states make transitions on EOB to the
1309 * end-of-buffer state). Contrast this with the test
1312 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1313 { /* This was really a NUL. */
1314 yy_state_type yy_next_state;
1316 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1318 yy_current_state = yy_get_previous_state( );
1320 /* Okay, we're now positioned to make the NUL
1321 * transition. We couldn't have
1322 * yy_get_previous_state() go ahead and do it
1323 * for us because it doesn't know how to deal
1324 * with the possibility of jamming (and we don't
1325 * want to build jamming into it because then it
1326 * will run more slowly).
1329 yy_next_state = yy_try_NUL_trans( yy_current_state );
1331 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1333 if ( yy_next_state )
1335 /* Consume the NUL. */
1336 yy_cp = ++(yy_c_buf_p);
1337 yy_current_state = yy_next_state;
1343 yy_cp = (yy_c_buf_p);
1344 goto yy_find_action;
1348 else switch ( yy_get_next_buffer( ) )
1350 case EOB_ACT_END_OF_FILE:
1352 (yy_did_buffer_switch_on_eof) = 0;
1354 if ( declinfoYYwrap( ) )
1356 /* Note: because we've taken care in
1357 * yy_get_next_buffer() to have set up
1358 * declinfoYYtext, we can now set up
1359 * yy_c_buf_p so that if some total
1360 * hoser (like flex itself) wants to
1361 * call the scanner after we return the
1362 * YY_NULL, it'll still work - another
1363 * YY_NULL will get returned.
1365 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1367 yy_act = YY_STATE_EOF(YY_START);
1373 if ( ! (yy_did_buffer_switch_on_eof) )
1379 case EOB_ACT_CONTINUE_SCAN:
1381 (yytext_ptr) + yy_amount_of_matched_text;
1383 yy_current_state = yy_get_previous_state( );
1385 yy_cp = (yy_c_buf_p);
1386 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1389 case EOB_ACT_LAST_MATCH:
1391 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1393 yy_current_state = yy_get_previous_state( );
1395 yy_cp = (yy_c_buf_p);
1396 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1397 goto yy_find_action;
1404 "fatal flex scanner internal error--no action found" );
1405 } /* end of action switch */
1406 } /* end of scanning one token */
1407 } /* end of declinfoYYlex */
1409 /* yy_get_next_buffer - try to read in a new buffer
1411 * Returns a code representing an action:
1412 * EOB_ACT_LAST_MATCH -
1413 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1414 * EOB_ACT_END_OF_FILE - end of file
1416 static int yy_get_next_buffer (void)
1418 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1419 register char *source = (yytext_ptr);
1420 register int number_to_move, i;
1423 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1425 "fatal flex scanner internal error--end of buffer missed" );
1427 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1428 { /* Don't try to fill the buffer, so this is an EOF. */
1429 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1431 /* We matched a single character, the EOB, so
1432 * treat this as a final EOF.
1434 return EOB_ACT_END_OF_FILE;
1439 /* We matched some text prior to the EOB, first
1442 return EOB_ACT_LAST_MATCH;
1446 /* Try to read more data. */
1448 /* First move last chars to start of buffer. */
1449 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1451 for ( i = 0; i < number_to_move; ++i )
1452 *(dest++) = *(source++);
1454 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1455 /* don't do the read, it's not guaranteed to return an EOF,
1458 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1462 yy_size_t num_to_read =
1463 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1465 while ( num_to_read <= 0 )
1466 { /* Not enough room in the buffer - grow it. */
1469 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1473 if ( num_to_read > YY_READ_BUF_SIZE )
1474 num_to_read = YY_READ_BUF_SIZE;
1476 /* Read in more data. */
1477 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1478 (yy_n_chars), num_to_read );
1480 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1483 if ( (yy_n_chars) == 0 )
1485 if ( number_to_move == YY_MORE_ADJ )
1487 ret_val = EOB_ACT_END_OF_FILE;
1488 declinfoYYrestart(declinfoYYin );
1493 ret_val = EOB_ACT_LAST_MATCH;
1494 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1495 YY_BUFFER_EOF_PENDING;
1500 ret_val = EOB_ACT_CONTINUE_SCAN;
1502 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1503 /* Extend the array by 50%, plus the number we really need. */
1504 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1505 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) declinfoYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1506 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1507 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1510 (yy_n_chars) += number_to_move;
1511 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1512 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1514 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1519 /* yy_get_previous_state - get the state just before the EOB char was reached */
1521 static yy_state_type yy_get_previous_state (void)
1523 register yy_state_type yy_current_state;
1524 register char *yy_cp;
1526 yy_current_state = (yy_start);
1528 (yy_state_ptr) = (yy_state_buf);
1529 *(yy_state_ptr)++ = yy_current_state;
1531 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1533 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1534 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1536 yy_current_state = (int) yy_def[yy_current_state];
1537 if ( yy_current_state >= 139 )
1538 yy_c = yy_meta[(unsigned int) yy_c];
1540 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1541 *(yy_state_ptr)++ = yy_current_state;
1544 return yy_current_state;
1547 /* yy_try_NUL_trans - try to make a transition on the NUL character
1550 * next_state = yy_try_NUL_trans( current_state );
1552 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1554 register int yy_is_jam;
1556 register YY_CHAR yy_c = 1;
1557 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1559 yy_current_state = (int) yy_def[yy_current_state];
1560 if ( yy_current_state >= 139 )
1561 yy_c = yy_meta[(unsigned int) yy_c];
1563 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1564 yy_is_jam = (yy_current_state == 138);
1566 *(yy_state_ptr)++ = yy_current_state;
1568 return yy_is_jam ? 0 : yy_current_state;
1573 static int yyinput (void)
1575 static int input (void)
1581 *(yy_c_buf_p) = (yy_hold_char);
1583 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1585 /* yy_c_buf_p now points to the character we want to return.
1586 * If this occurs *before* the EOB characters, then it's a
1587 * valid NUL; if not, then we've hit the end of the buffer.
1589 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1590 /* This was really a NUL. */
1591 *(yy_c_buf_p) = '\0';
1594 { /* need more input */
1595 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1598 switch ( yy_get_next_buffer( ) )
1600 case EOB_ACT_LAST_MATCH:
1601 /* This happens because yy_g_n_b()
1602 * sees that we've accumulated a
1603 * token and flags that we need to
1604 * try matching the token before
1605 * proceeding. But for input(),
1606 * there's no matching to consider.
1607 * So convert the EOB_ACT_LAST_MATCH
1608 * to EOB_ACT_END_OF_FILE.
1611 /* Reset buffer status. */
1612 declinfoYYrestart(declinfoYYin );
1616 case EOB_ACT_END_OF_FILE:
1618 if ( declinfoYYwrap( ) )
1621 if ( ! (yy_did_buffer_switch_on_eof) )
1630 case EOB_ACT_CONTINUE_SCAN:
1631 (yy_c_buf_p) = (yytext_ptr) + offset;
1637 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1638 *(yy_c_buf_p) = '\0'; /* preserve declinfoYYtext */
1639 (yy_hold_char) = *++(yy_c_buf_p);
1643 #endif /* ifndef YY_NO_INPUT */
1645 /** Immediately switch to a different input stream.
1646 * @param input_file A readable stream.
1648 * @note This function does not reset the start condition to @c INITIAL .
1650 void declinfoYYrestart (FILE * input_file )
1653 if ( ! YY_CURRENT_BUFFER ){
1654 declinfoYYensure_buffer_stack ();
1655 YY_CURRENT_BUFFER_LVALUE =
1656 declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE );
1659 declinfoYY_init_buffer(YY_CURRENT_BUFFER,input_file );
1660 declinfoYY_load_buffer_state( );
1663 /** Switch to a different input buffer.
1664 * @param new_buffer The new input buffer.
1667 void declinfoYY_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1670 /* TODO. We should be able to replace this entire function body
1672 * declinfoYYpop_buffer_state();
1673 * declinfoYYpush_buffer_state(new_buffer);
1675 declinfoYYensure_buffer_stack ();
1676 if ( YY_CURRENT_BUFFER == new_buffer )
1679 if ( YY_CURRENT_BUFFER )
1681 /* Flush out information for old buffer. */
1682 *(yy_c_buf_p) = (yy_hold_char);
1683 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1684 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1687 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1688 declinfoYY_load_buffer_state( );
1690 /* We don't actually know whether we did this switch during
1691 * EOF (declinfoYYwrap()) processing, but the only time this flag
1692 * is looked at is after declinfoYYwrap() is called, so it's safe
1693 * to go ahead and always set it.
1695 (yy_did_buffer_switch_on_eof) = 1;
1698 static void declinfoYY_load_buffer_state (void)
1700 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1701 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1702 declinfoYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1703 (yy_hold_char) = *(yy_c_buf_p);
1706 /** Allocate and initialize an input buffer state.
1707 * @param file A readable stream.
1708 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1710 * @return the allocated buffer state.
1712 YY_BUFFER_STATE declinfoYY_create_buffer (FILE * file, int size )
1716 b = (YY_BUFFER_STATE) declinfoYYalloc(sizeof( struct yy_buffer_state ) );
1718 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_create_buffer()" );
1720 b->yy_buf_size = size;
1722 /* yy_ch_buf has to be 2 characters longer than the size given because
1723 * we need to put in 2 end-of-buffer characters.
1725 b->yy_ch_buf = (char *) declinfoYYalloc(b->yy_buf_size + 2 );
1726 if ( ! b->yy_ch_buf )
1727 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_create_buffer()" );
1729 b->yy_is_our_buffer = 1;
1731 declinfoYY_init_buffer(b,file );
1736 /** Destroy the buffer.
1737 * @param b a buffer created with declinfoYY_create_buffer()
1740 void declinfoYY_delete_buffer (YY_BUFFER_STATE b )
1746 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1747 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1749 if ( b->yy_is_our_buffer )
1750 declinfoYYfree((void *) b->yy_ch_buf );
1752 declinfoYYfree((void *) b );
1756 extern int isatty (int );
1757 #endif /* __cplusplus */
1759 /* Initializes or reinitializes a buffer.
1760 * This function is sometimes called more than once on the same buffer,
1761 * such as during a declinfoYYrestart() or at EOF.
1763 static void declinfoYY_init_buffer (YY_BUFFER_STATE b, FILE * file )
1768 declinfoYY_flush_buffer(b );
1770 b->yy_input_file = file;
1771 b->yy_fill_buffer = 1;
1773 /* If b is the current buffer, then declinfoYY_init_buffer was _probably_
1774 * called from declinfoYYrestart() or through yy_get_next_buffer.
1775 * In that case, we don't want to reset the lineno or column.
1777 if (b != YY_CURRENT_BUFFER){
1778 b->yy_bs_lineno = 1;
1779 b->yy_bs_column = 0;
1782 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1787 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1788 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1791 void declinfoYY_flush_buffer (YY_BUFFER_STATE b )
1798 /* We always need two end-of-buffer characters. The first causes
1799 * a transition to the end-of-buffer state. The second causes
1800 * a jam in that state.
1802 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1803 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1805 b->yy_buf_pos = &b->yy_ch_buf[0];
1808 b->yy_buffer_status = YY_BUFFER_NEW;
1810 if ( b == YY_CURRENT_BUFFER )
1811 declinfoYY_load_buffer_state( );
1814 /** Pushes the new state onto the stack. The new state becomes
1815 * the current state. This function will allocate the stack
1817 * @param new_buffer The new state.
1820 void declinfoYYpush_buffer_state (YY_BUFFER_STATE new_buffer )
1822 if (new_buffer == NULL)
1825 declinfoYYensure_buffer_stack();
1827 /* This block is copied from declinfoYY_switch_to_buffer. */
1828 if ( YY_CURRENT_BUFFER )
1830 /* Flush out information for old buffer. */
1831 *(yy_c_buf_p) = (yy_hold_char);
1832 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1833 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1836 /* Only push if top exists. Otherwise, replace top. */
1837 if (YY_CURRENT_BUFFER)
1838 (yy_buffer_stack_top)++;
1839 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1841 /* copied from declinfoYY_switch_to_buffer. */
1842 declinfoYY_load_buffer_state( );
1843 (yy_did_buffer_switch_on_eof) = 1;
1846 /** Removes and deletes the top of the stack, if present.
1847 * The next element becomes the new top.
1850 void declinfoYYpop_buffer_state (void)
1852 if (!YY_CURRENT_BUFFER)
1855 declinfoYY_delete_buffer(YY_CURRENT_BUFFER );
1856 YY_CURRENT_BUFFER_LVALUE = NULL;
1857 if ((yy_buffer_stack_top) > 0)
1858 --(yy_buffer_stack_top);
1860 if (YY_CURRENT_BUFFER) {
1861 declinfoYY_load_buffer_state( );
1862 (yy_did_buffer_switch_on_eof) = 1;
1866 /* Allocates the stack if it does not exist.
1867 * Guarantees space for at least one push.
1869 static void declinfoYYensure_buffer_stack (void)
1871 yy_size_t num_to_alloc;
1873 if (!(yy_buffer_stack)) {
1875 /* First allocation is just for 2 elements, since we don't know if this
1876 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1877 * immediate realloc on the next call.
1880 (yy_buffer_stack) = (struct yy_buffer_state**)declinfoYYalloc
1881 (num_to_alloc * sizeof(struct yy_buffer_state*)
1883 if ( ! (yy_buffer_stack) )
1884 YY_FATAL_ERROR( "out of dynamic memory in declinfoYYensure_buffer_stack()" );
1886 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1888 (yy_buffer_stack_max) = num_to_alloc;
1889 (yy_buffer_stack_top) = 0;
1893 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1895 /* Increase the buffer to prepare for a possible push. */
1896 int grow_size = 8 /* arbitrary grow size */;
1898 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1899 (yy_buffer_stack) = (struct yy_buffer_state**)declinfoYYrealloc
1901 num_to_alloc * sizeof(struct yy_buffer_state*)
1903 if ( ! (yy_buffer_stack) )
1904 YY_FATAL_ERROR( "out of dynamic memory in declinfoYYensure_buffer_stack()" );
1906 /* zero only the new slots.*/
1907 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1908 (yy_buffer_stack_max) = num_to_alloc;
1912 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1913 * @param base the character buffer
1914 * @param size the size in bytes of the character buffer
1916 * @return the newly allocated buffer state object.
1918 YY_BUFFER_STATE declinfoYY_scan_buffer (char * base, yy_size_t size )
1923 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1924 base[size-1] != YY_END_OF_BUFFER_CHAR )
1925 /* They forgot to leave room for the EOB's. */
1928 b = (YY_BUFFER_STATE) declinfoYYalloc(sizeof( struct yy_buffer_state ) );
1930 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_scan_buffer()" );
1932 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1933 b->yy_buf_pos = b->yy_ch_buf = base;
1934 b->yy_is_our_buffer = 0;
1935 b->yy_input_file = 0;
1936 b->yy_n_chars = b->yy_buf_size;
1937 b->yy_is_interactive = 0;
1939 b->yy_fill_buffer = 0;
1940 b->yy_buffer_status = YY_BUFFER_NEW;
1942 declinfoYY_switch_to_buffer(b );
1947 /** Setup the input buffer state to scan a string. The next call to declinfoYYlex() will
1948 * scan from a @e copy of @a str.
1949 * @param yystr a NUL-terminated string to scan
1951 * @return the newly allocated buffer state object.
1952 * @note If you want to scan bytes that may contain NUL values, then use
1953 * declinfoYY_scan_bytes() instead.
1955 YY_BUFFER_STATE declinfoYY_scan_string (yyconst char * yystr )
1958 return declinfoYY_scan_bytes(yystr,strlen(yystr) );
1961 /** Setup the input buffer state to scan the given bytes. The next call to declinfoYYlex() will
1962 * scan from a @e copy of @a bytes.
1963 * @param bytes the byte buffer to scan
1964 * @param len the number of bytes in the buffer pointed to by @a bytes.
1966 * @return the newly allocated buffer state object.
1968 YY_BUFFER_STATE declinfoYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
1974 /* Get memory for full buffer, including space for trailing EOB's. */
1975 n = _yybytes_len + 2;
1976 buf = (char *) declinfoYYalloc(n );
1978 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_scan_bytes()" );
1980 for ( i = 0; i < _yybytes_len; ++i )
1981 buf[i] = yybytes[i];
1983 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1985 b = declinfoYY_scan_buffer(buf,n );
1987 YY_FATAL_ERROR( "bad buffer in declinfoYY_scan_bytes()" );
1989 /* It's okay to grow etc. this buffer, and we should throw it
1990 * away when we're done.
1992 b->yy_is_our_buffer = 1;
1997 #ifndef YY_EXIT_FAILURE
1998 #define YY_EXIT_FAILURE 2
2001 static void yy_fatal_error (yyconst char* msg )
2003 (void) fprintf( stderr, "%s\n", msg );
2004 exit( YY_EXIT_FAILURE );
2007 /* Redefine yyless() so it works in section 3 code. */
2013 /* Undo effects of setting up declinfoYYtext. */ \
2014 int yyless_macro_arg = (n); \
2015 YY_LESS_LINENO(yyless_macro_arg);\
2016 declinfoYYtext[declinfoYYleng] = (yy_hold_char); \
2017 (yy_c_buf_p) = declinfoYYtext + yyless_macro_arg; \
2018 (yy_hold_char) = *(yy_c_buf_p); \
2019 *(yy_c_buf_p) = '\0'; \
2020 declinfoYYleng = yyless_macro_arg; \
2024 /* Accessor methods (get/set functions) to struct members. */
2026 /** Get the current line number.
2029 int declinfoYYget_lineno (void)
2032 return declinfoYYlineno;
2035 /** Get the input stream.
2038 FILE *declinfoYYget_in (void)
2040 return declinfoYYin;
2043 /** Get the output stream.
2046 FILE *declinfoYYget_out (void)
2048 return declinfoYYout;
2051 /** Get the length of the current token.
2054 yy_size_t declinfoYYget_leng (void)
2056 return declinfoYYleng;
2059 /** Get the current token.
2063 char *declinfoYYget_text (void)
2065 return declinfoYYtext;
2068 /** Set the current line number.
2069 * @param line_number
2072 void declinfoYYset_lineno (int line_number )
2075 declinfoYYlineno = line_number;
2078 /** Set the input stream. This does not discard the current
2080 * @param in_str A readable stream.
2082 * @see declinfoYY_switch_to_buffer
2084 void declinfoYYset_in (FILE * in_str )
2086 declinfoYYin = in_str ;
2089 void declinfoYYset_out (FILE * out_str )
2091 declinfoYYout = out_str ;
2094 int declinfoYYget_debug (void)
2096 return declinfoYY_flex_debug;
2099 void declinfoYYset_debug (int bdebug )
2101 declinfoYY_flex_debug = bdebug ;
2104 static int yy_init_globals (void)
2106 /* Initialization is the same as for the non-reentrant scanner.
2107 * This function is called from declinfoYYlex_destroy(), so don't allocate here.
2110 (yy_buffer_stack) = 0;
2111 (yy_buffer_stack_top) = 0;
2112 (yy_buffer_stack_max) = 0;
2113 (yy_c_buf_p) = (char *) 0;
2119 (yy_full_match) = 0;
2122 /* Defined in main.c */
2124 declinfoYYin = stdin;
2125 declinfoYYout = stdout;
2127 declinfoYYin = (FILE *) 0;
2128 declinfoYYout = (FILE *) 0;
2131 /* For future reference: Set errno on error, since we are called by
2132 * declinfoYYlex_init()
2137 /* declinfoYYlex_destroy is for both reentrant and non-reentrant scanners. */
2138 int declinfoYYlex_destroy (void)
2141 /* Pop the buffer stack, destroying each element. */
2142 while(YY_CURRENT_BUFFER){
2143 declinfoYY_delete_buffer(YY_CURRENT_BUFFER );
2144 YY_CURRENT_BUFFER_LVALUE = NULL;
2145 declinfoYYpop_buffer_state();
2148 /* Destroy the stack itself. */
2149 declinfoYYfree((yy_buffer_stack) );
2150 (yy_buffer_stack) = NULL;
2152 declinfoYYfree ( (yy_state_buf) );
2153 (yy_state_buf) = NULL;
2155 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2156 * declinfoYYlex() is called, initialization will occur. */
2163 * Internal utility routines.
2167 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2170 for ( i = 0; i < n; ++i )
2175 #ifdef YY_NEED_STRLEN
2176 static int yy_flex_strlen (yyconst char * s )
2179 for ( n = 0; s[n]; ++n )
2186 void *declinfoYYalloc (yy_size_t size )
2188 return (void *) malloc( size );
2191 void *declinfoYYrealloc (void * ptr, yy_size_t size )
2193 /* The cast to (char *) in the following accommodates both
2194 * implementations that use char* generic pointers, and those
2195 * that use void* generic pointers. It works with the latter
2196 * because both ANSI C and C++ allow castless assignment from
2197 * any pointer type to void*, and deal with argument conversions
2198 * as though doing an assignment.
2200 return (void *) realloc( (char *) ptr, size );
2203 void declinfoYYfree (void * ptr )
2205 free( (char *) ptr ); /* see declinfoYYrealloc() for (char *) cast */
2208 #define YYTABLES_NAME "yytables"
2210 #line 226 "declinfo.l"
2214 /*@ ----------------------------------------------------------------------------
2217 void parseFuncDecl(const QCString &decl,bool objC,QCString &cl,QCString &t,
2218 QCString &n,QCString &a,QCString &ftl,QCString &exc)
2221 //printf("Input=`%s'\n",inputString);
2222 if (inputString==0) return;
2224 classTempListFound = FALSE;
2225 funcTempListFound = FALSE;
2228 className.resize(0);
2229 classTempList.resize(0);
2230 funcTempList.resize(0);
2234 exceptionString.resize(0);
2235 // first we try to find the type, scope, name and arguments
2236 declinfoYYrestart( declinfoYYin );
2240 //printf("type=`%s' class=`%s' name=`%s' args=`%s'\n",
2241 // type.data(),scope.data(),name.data(),args.data());
2243 int nb = name.findRev('[');
2244 if (nb!=-1 && args.isEmpty()) // correct for [] in name ambigity (due to Java return type allowing [])
2246 args.prepend(name.right(name.length()-nb));
2252 int l=scope.length();
2264 else if (skipCount==0)
2268 cl=stripTemplateSpecifiersFromScope(removeRedundantWhiteSpace(scope),FALSE);
2273 n=removeRedundantWhiteSpace(name);
2275 if ((il=n.find('<'))!=-1 && (ir=n.findRev('>'))!=-1)
2276 // TODO: handle cases like where n="operator<< <T>"
2278 ftl=removeRedundantWhiteSpace(n.right(n.length()-il));
2282 //ctl=classTempList.copy();
2283 //ftl=funcTempList.copy();
2284 t=removeRedundantWhiteSpace(type);
2285 a=removeRedundantWhiteSpace(args);
2286 exc=removeRedundantWhiteSpace(exceptionString);
2288 if (!t.isEmpty() && t.at(t.length()-1)==')') // for function pointers
2291 t=t.left(t.length()-1);
2293 //printf("type=`%s' class=`%s' name=`%s' args=`%s'\n",
2294 // t.data(),cl.data(),n.data(),a.data());
2301 //extern "C" { // some bogus code to keep the compiler happy
2302 // int declinfoYYwrap() { return 1 ; }
2303 // void declinfoYYdummy() { yy_flex_realloc(0,0); }
2307 void dumpDecl(const char *s)
2310 QCString classTNames;
2314 QCString funcTNames;
2315 msg("-----------------------------------------\n");
2316 parseFuncDecl(s,className,classTNames,type,name,args,funcTNames);
2317 msg("type=`%s' class=`%s' classTempl=`%s' name=`%s' "
2318 "funcTemplateNames=`%s' args=`%s'\n",
2319 type.data(),className.data(),classTNames.data(),
2320 name.data(),funcTNames.data(),args.data()
2327 dumpDecl("A < T > :: Value * A < T > :: getValue < S > ( const A < T > & a )");
2328 dumpDecl("const A<T>::Value* A<T>::getValue<S>(const A<T>&a)");
2330 dumpDecl("friend void bla<>()");
2331 dumpDecl("name< T > :: operator () (int bla)");
2332 dumpDecl("name< T > :: operator << (int bla)");
2333 dumpDecl("name< T > :: operator << <> (int bla)");
2334 dumpDecl("className::func()");
2335 dumpDecl("void ( * Name < T > :: bla ) ( int, char * )");
2339 #if !defined(YY_FLEX_SUBMINOR_VERSION)
2340 //----------------------------------------------------------------------------
2341 extern "C" { // some bogus code to keep the compiler happy
2342 void declinfoYYdummy() { yy_flex_realloc(0,0); }