Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/declinfo.cpp

Source at commit 1322 created 9 years 5 months ago.
By meklort, Add doxygen to utils folder
1
2#line 3 "<stdout>"
3
4#define YY_INT_ALIGNED short int
5
6/* A lexical scanner generated by flex */
7
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
26
27#define FLEX_SCANNER
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
32#define FLEX_BETA
33#endif
34
35/* First, we deal with platform-specific or compiler-specific issues. */
36
37/* begin standard C headers. */
38#include <stdio.h>
39#include <string.h>
40#include <errno.h>
41#include <stdlib.h>
42
43/* end standard C headers. */
44
45/* flex integer type definitions */
46
47#ifndef FLEXINT_H
48#define FLEXINT_H
49
50/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
51
52#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
53
54/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
56 */
57#ifndef __STDC_LIMIT_MACROS
58#define __STDC_LIMIT_MACROS 1
59#endif
60
61#include <inttypes.h>
62typedef int8_t flex_int8_t;
63typedef uint8_t flex_uint8_t;
64typedef int16_t flex_int16_t;
65typedef uint16_t flex_uint16_t;
66typedef int32_t flex_int32_t;
67typedef uint32_t flex_uint32_t;
68#else
69typedef signed char flex_int8_t;
70typedef short int flex_int16_t;
71typedef int flex_int32_t;
72typedef unsigned char flex_uint8_t;
73typedef unsigned short int flex_uint16_t;
74typedef unsigned int flex_uint32_t;
75#endif /* ! C99 */
76
77/* Limits of integral types. */
78#ifndef INT8_MIN
79#define INT8_MIN (-128)
80#endif
81#ifndef INT16_MIN
82#define INT16_MIN (-32767-1)
83#endif
84#ifndef INT32_MIN
85#define INT32_MIN (-2147483647-1)
86#endif
87#ifndef INT8_MAX
88#define INT8_MAX (127)
89#endif
90#ifndef INT16_MAX
91#define INT16_MAX (32767)
92#endif
93#ifndef INT32_MAX
94#define INT32_MAX (2147483647)
95#endif
96#ifndef UINT8_MAX
97#define UINT8_MAX (255U)
98#endif
99#ifndef UINT16_MAX
100#define UINT16_MAX (65535U)
101#endif
102#ifndef UINT32_MAX
103#define UINT32_MAX (4294967295U)
104#endif
105
106#endif /* ! FLEXINT_H */
107
108#ifdef __cplusplus
109
110/* The "const" storage-class-modifier is valid. */
111#define YY_USE_CONST
112
113#else/* ! __cplusplus */
114
115/* C99 requires __STDC__ to be defined as 1. */
116#if defined (__STDC__)
117
118#define YY_USE_CONST
119
120#endif/* defined (__STDC__) */
121#endif/* ! __cplusplus */
122
123#ifdef YY_USE_CONST
124#define yyconst const
125#else
126#define yyconst
127#endif
128
129/* Returned upon end-of-file. */
130#define YY_NULL 0
131
132/* Promotes a possibly negative, possibly signed char to an unsigned
133 * integer for use as an array index. If the signed char is negative,
134 * we want to instead treat it as an 8-bit unsigned char, hence the
135 * double cast.
136 */
137#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
138
139/* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
142 */
143#define BEGIN (yy_start) = 1 + 2 *
144
145/* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
147 * compatibility.
148 */
149#define YY_START (((yy_start) - 1) / 2)
150#define YYSTATE YY_START
151
152/* Action number for EOF rule of a given start state. */
153#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
154
155/* Special action meaning "start processing a new file". */
156#define YY_NEW_FILE declinfoYYrestart(declinfoYYin )
157
158#define YY_END_OF_BUFFER_CHAR 0
159
160/* Size of default input buffer. */
161#ifndef YY_BUF_SIZE
162#define YY_BUF_SIZE 262144
163#endif
164
165/* The state buf must be large enough to hold one state per character in the main buffer.
166 */
167#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
168
169#ifndef YY_TYPEDEF_YY_BUFFER_STATE
170#define YY_TYPEDEF_YY_BUFFER_STATE
171typedef struct yy_buffer_state *YY_BUFFER_STATE;
172#endif
173
174#ifndef YY_TYPEDEF_YY_SIZE_T
175#define YY_TYPEDEF_YY_SIZE_T
176typedef size_t yy_size_t;
177#endif
178
179extern yy_size_t declinfoYYleng;
180
181extern FILE *declinfoYYin, *declinfoYYout;
182
183#define EOB_ACT_CONTINUE_SCAN 0
184#define EOB_ACT_END_OF_FILE 1
185#define EOB_ACT_LAST_MATCH 2
186
187 #define YY_LESS_LINENO(n)
188
189/* Return all but the first "n" matched characters back to the input stream. */
190#define yyless(n) \
191do \
192{ \
193/* Undo effects of setting up declinfoYYtext. */ \
194 int yyless_macro_arg = (n); \
195 YY_LESS_LINENO(yyless_macro_arg);\
196*yy_cp = (yy_hold_char); \
197YY_RESTORE_YY_MORE_OFFSET \
198(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
199YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */ \
200} \
201while ( 0 )
202
203#define unput(c) yyunput( c, (yytext_ptr) )
204
205#ifndef YY_STRUCT_YY_BUFFER_STATE
206#define YY_STRUCT_YY_BUFFER_STATE
207struct yy_buffer_state
208{
209FILE *yy_input_file;
210
211char *yy_ch_buf;/* input buffer */
212char *yy_buf_pos;/* current position in input buffer */
213
214/* Size of input buffer in bytes, not including room for EOB
215 * characters.
216 */
217yy_size_t yy_buf_size;
218
219/* Number of characters read into yy_ch_buf, not including EOB
220 * characters.
221 */
222yy_size_t yy_n_chars;
223
224/* Whether we "own" the buffer - i.e., we know we created it,
225 * and can realloc() it to grow it, and should free() it to
226 * delete it.
227 */
228int yy_is_our_buffer;
229
230/* Whether this is an "interactive" input source; if so, and
231 * if we're using stdio for input, then we want to use getc()
232 * instead of fread(), to make sure we stop fetching input after
233 * each newline.
234 */
235int yy_is_interactive;
236
237/* Whether we're considered to be at the beginning of a line.
238 * If so, '^' rules will be active on the next match, otherwise
239 * not.
240 */
241int yy_at_bol;
242
243 int yy_bs_lineno; /**< The line count. */
244 int yy_bs_column; /**< The column count. */
245
246/* Whether to try to fill the input buffer when we reach the
247 * end of it.
248 */
249int yy_fill_buffer;
250
251int yy_buffer_status;
252
253#define YY_BUFFER_NEW 0
254#define YY_BUFFER_NORMAL 1
255/* When an EOF's been seen but there's still some text to process
256 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
257 * shouldn't try reading from the input source any more. We might
258 * still have a bunch of tokens to match, though, because of
259 * possible backing-up.
260 *
261 * When we actually see the EOF, we change the status to "new"
262 * (via declinfoYYrestart()), so that the user can continue scanning by
263 * just pointing declinfoYYin at a new input file.
264 */
265#define YY_BUFFER_EOF_PENDING 2
266
267};
268#endif /* !YY_STRUCT_YY_BUFFER_STATE */
269
270/* Stack of input buffers. */
271static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
272static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
273static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
274
275/* We provide macros for accessing buffer states in case in the
276 * future we want to put the buffer states in a more general
277 * "scanner state".
278 *
279 * Returns the top of the stack, or NULL.
280 */
281#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
282 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
283 : NULL)
284
285/* Same as previous macro, but useful when we know that the buffer stack is not
286 * NULL or when we need an lvalue. For internal use only.
287 */
288#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
289
290/* yy_hold_char holds the character lost when declinfoYYtext is formed. */
291static char yy_hold_char;
292static yy_size_t yy_n_chars;/* number of characters read into yy_ch_buf */
293yy_size_t declinfoYYleng;
294
295/* Points to current character in buffer. */
296static char *yy_c_buf_p = (char *) 0;
297static int yy_init = 0;/* whether we need to initialize */
298static int yy_start = 0;/* start state number */
299
300/* Flag which is used to allow declinfoYYwrap()'s to do buffer switches
301 * instead of setting up a fresh declinfoYYin. A bit of a hack ...
302 */
303static int yy_did_buffer_switch_on_eof;
304
305void declinfoYYrestart (FILE *input_file );
306void declinfoYY_switch_to_buffer (YY_BUFFER_STATE new_buffer );
307YY_BUFFER_STATE declinfoYY_create_buffer (FILE *file,int size );
308void declinfoYY_delete_buffer (YY_BUFFER_STATE b );
309void declinfoYY_flush_buffer (YY_BUFFER_STATE b );
310void declinfoYYpush_buffer_state (YY_BUFFER_STATE new_buffer );
311void declinfoYYpop_buffer_state (void );
312
313static void declinfoYYensure_buffer_stack (void );
314static void declinfoYY_load_buffer_state (void );
315static void declinfoYY_init_buffer (YY_BUFFER_STATE b,FILE *file );
316
317#define YY_FLUSH_BUFFER declinfoYY_flush_buffer(YY_CURRENT_BUFFER )
318
319YY_BUFFER_STATE declinfoYY_scan_buffer (char *base,yy_size_t size );
320YY_BUFFER_STATE declinfoYY_scan_string (yyconst char *yy_str );
321YY_BUFFER_STATE declinfoYY_scan_bytes (yyconst char *bytes,yy_size_t len );
322
323void *declinfoYYalloc (yy_size_t );
324void *declinfoYYrealloc (void *,yy_size_t );
325void declinfoYYfree (void * );
326
327#define yy_new_buffer declinfoYY_create_buffer
328
329#define yy_set_interactive(is_interactive) \
330{ \
331if ( ! YY_CURRENT_BUFFER ){ \
332 declinfoYYensure_buffer_stack (); \
333YY_CURRENT_BUFFER_LVALUE = \
334 declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE ); \
335} \
336YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
337}
338
339#define yy_set_bol(at_bol) \
340{ \
341if ( ! YY_CURRENT_BUFFER ){\
342 declinfoYYensure_buffer_stack (); \
343YY_CURRENT_BUFFER_LVALUE = \
344 declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE ); \
345} \
346YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
347}
348
349#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
350
351/* Begin user sect3 */
352
353#define declinfoYYwrap(n) 1
354#define YY_SKIP_YYWRAP
355
356typedef unsigned char YY_CHAR;
357
358FILE *declinfoYYin = (FILE *) 0, *declinfoYYout = (FILE *) 0;
359
360typedef int yy_state_type;
361
362extern int declinfoYYlineno;
363
364int declinfoYYlineno = 1;
365
366extern char *declinfoYYtext;
367#define yytext_ptr declinfoYYtext
368
369static yy_state_type yy_get_previous_state (void );
370static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
371static int yy_get_next_buffer (void );
372static void yy_fatal_error (yyconst char msg[] );
373
374/* Done after the current pattern has been matched and before the
375 * corresponding action - sets up declinfoYYtext.
376 */
377#define YY_DO_BEFORE_ACTION \
378(yytext_ptr) = yy_bp; \
379declinfoYYleng = (size_t) (yy_cp - yy_bp); \
380(yy_hold_char) = *yy_cp; \
381*yy_cp = '\0'; \
382(yy_c_buf_p) = yy_cp;
383
384#define YY_NUM_RULES 26
385#define YY_END_OF_BUFFER 27
386/* This struct is not used in this scanner,
387 but its presence is necessary. */
388struct yy_trans_info
389{
390flex_int32_t yy_verify;
391flex_int32_t yy_nxt;
392};
393static yyconst flex_int16_t yy_acclist[121] =
394 { 0,
395 27, 24, 26, 25, 26, 7, 24, 26, 24, 26,
396 24, 26, 6, 24, 26, 10, 24, 26, 9, 24,
397 26, 5, 24, 26, 12, 24, 26, 24, 26, 8195,
398 24, 26,16387, 11, 24, 26, 8195, 24, 26,16387,
399 17, 24, 26, 15, 17, 24, 26, 16, 17, 24,
400 26, 22, 24, 26, 22, 24, 26, 24, 26, 24,
401 26, 25, 26, 20, 24, 26, 24, 26, 23, 24,
402 26, 7, 10, 9, 5, 12, 11, 8195,16387, 8195,
403 16387, 6, 8, 4, 8195,16387, 8195,16387, 8195,16387,
404 13, 14, 20, 20, 8195,16387, 8195,16387, 4, 8195,
405
406 8195,16387, 19, 2, 8195,16387, 8195,16387, 18, 8195,
407 16387, 21, 8195,16387, 8, 1, 8195,16387, 1, 8195
408 } ;
409
410static yyconst flex_int16_t yy_accept[140] =
411 { 0,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 2, 4, 6, 9, 11, 13, 16, 19, 22,
415 25, 28, 30, 34, 37, 41, 44, 48, 52, 55,
416 58, 60, 62, 64, 67, 69, 72, 73, 74, 75,
417 76, 77, 78, 78, 78, 78, 80, 82, 83, 83,
418 83, 84, 84, 84, 85, 87, 87, 87, 89, 89,
419 91, 92, 93, 93, 93, 93, 94, 94, 94, 95,
420 95, 95, 95, 97, 97, 99, 99, 99, 99, 99,
421 99, 99, 100, 100, 100, 100, 100, 100, 101, 103,
422
423 103, 103, 104, 104, 104, 104, 104, 104, 104, 104,
424 105, 105, 107, 107, 107, 107, 107, 109, 109, 109,
425 110, 110, 110, 112, 112, 113, 113, 113, 115, 116,
426 116, 119, 119, 119, 119, 119, 121, 121, 121
427 } ;
428
429static yyconst flex_int32_t yy_ec[256] =
430 { 0,
431 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 2, 4, 1, 1, 5, 1, 6, 1, 7,
435 8, 6, 1, 1, 1, 1, 1, 9, 9, 9,
436 9, 9, 9, 9, 9, 9, 9, 10, 1, 11,
437 1, 12, 1, 13, 14, 14, 14, 14, 14, 14,
438 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
439 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
440 15, 1, 16, 1, 14, 1, 17, 14, 18, 14,
441
442 19, 14, 14, 20, 21, 14, 14, 22, 14, 23,
443 24, 25, 14, 26, 27, 28, 14, 29, 30, 14,
444 14, 14, 1, 1, 1, 4, 1, 14, 14, 14,
445 14, 14, 14, 14, 14, 14, 14, 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
453 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
459 } ;
460
461static yyconst flex_int32_t yy_meta[31] =
462 { 0,
463 1, 2, 1, 1, 3, 4, 5, 6, 7, 8,
464 1, 1, 3, 9, 10, 1, 9, 9, 9, 9,
465 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
466 } ;
467
468static yyconst flex_int16_t yy_base[153] =
469 { 0,
470 342, 341, 0, 0, 28, 30, 29, 31, 41, 43,
471 340, 339, 338, 336, 333, 332, 331, 328, 327, 326,
472 328, 346, 346, 58, 51, 0, 321, 65, 346, 309,
473 346, 308, 70, 346, 72, 346, 305, 303, 346, 294,
474 73, 79, 81, 47, 87, 346, 0, 98, 346, 290,
475 346, 346, 100, 104, 289, 36, 271, 289, 56, 110,
476 89, 283, 281, 288, 112, 118, 124, 264, 45, 57,
477 346, 346, 258, 128, 129, 346, 136, 139, 93, 120,
478 142, 149, 143, 140, 152, 155, 259, 258, 26, 271,
479 270, 224, 157, 159, 216, 161, 94, 163, 149, 199,
480
481 169, 346, 207, 175, 193, 193, 0, 179, 177, 346,
482 181, 107, 184, 188, 186, 195, 166, 190, 191, 346,
483 180, 140, 175, 194, 346, 164, 113, 177, 106, 71,
484 202, 44, 203, 204, 205, 207, 209, 346, 227, 237,
485 247, 257, 267, 276, 28, 284, 292, 302, 311, 315,
486 323, 331
487 } ;
488
489static yyconst flex_int16_t yy_def[153] =
490 { 0,
491 139, 139, 138, 3, 140, 140, 141, 141, 142, 142,
492 139, 139, 139, 139, 139, 139, 139, 139, 143, 143,
493 138, 138, 138, 138, 144, 145, 138, 146, 138, 138,
494 138, 138, 147, 138, 147, 138, 138, 138, 138, 138,
495 148, 148, 148, 138, 148, 138, 24, 146, 138, 138,
496 138, 138, 144, 144, 138, 149, 35, 138, 138, 146,
497 138, 138, 150, 138, 138, 138, 151, 35, 138, 35,
498 138, 138, 138, 148, 148, 138, 148, 148, 138, 138,
499 138, 148, 138, 138, 149, 138, 138, 138, 138, 150,
500 138, 138, 151, 151, 138, 152, 138, 138, 35, 138,
501
502 138, 138, 138, 148, 138, 138, 48, 138, 138, 138,
503 152, 35, 138, 138, 138, 138, 35, 138, 138, 138,
504 138, 138, 35, 138, 138, 138, 138, 35, 138, 138,
505 35, 138, 138, 138, 138, 138, 138, 0, 138, 138,
506 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
507 138, 138
508 } ;
509
510static yyconst flex_int16_t yy_nxt[377] =
511 { 0,
512 22, 24, 23, 25, 26, 27, 28, 29, 22, 30,
513 31, 22, 32, 33, 34, 22, 33, 33, 33, 33,
514 33, 33, 33, 35, 33, 33, 33, 33, 33, 33,
515 23, 23, 23, 23, 89, 91, 57, 84, 37, 38,
516 37, 38, 42, 43, 42, 43, 97, 44, 80, 44,
517 69, 45, 53, 45, 81, 54, 40, 59, 40, 47,
518 98, 61, 126, 55, 48, 49, 59, 50, 51, 60,
519 61, 66, 52, 66, 75, 99, 67, 62, 67, 76,
520 78, 68, 75, 77, 69, 79, 69, 76, 75, 77,
521 86, 77, 132, 76, 80, 97, 70, 77, 82, 59,
522
523 81, 53, 60, 61, 54, 138, 87, 129, 138, 98,
524 62, 138, 55, 66, 138, 138, 138, 88, 67, 66,
525 65, 80, 138, 117, 67, 93, 69, 81, 94, 75,
526 75, 68, 69, 130, 76, 76, 95, 75, 77, 77,
527 78, 84, 76, 101, 84, 79, 77, 82, 102, 77,
528 104, 83, 103, 84, 69, 76, 86, 69, 93, 77,
529 138, 94, 109, 138, 84, 129, 69, 127, 110, 95,
530 101, 138, 87, 68, 112, 102, 104, 69, 109, 103,
531 109, 76, 109, 88, 110, 77, 110, 108, 110, 119,
532 68, 124, 119, 123, 120, 124, 125, 120, 128, 68,
533
534 125, 68, 131, 133, 133, 135, 135, 126, 137, 67,
535 137, 122, 121, 118, 116, 115, 134, 134, 114, 136,
536 136, 134, 113, 134, 108, 92, 68, 22, 22, 22,
537 22, 22, 22, 22, 22, 22, 22, 36, 36, 36,
538 36, 36, 36, 36, 36, 36, 36, 39, 39, 39,
539 39, 39, 39, 39, 39, 39, 39, 41, 41, 41,
540 41, 41, 41, 41, 41, 41, 41, 46, 46, 46,
541 46, 46, 46, 46, 46, 46, 46, 56, 56, 107,
542 91, 106, 105, 100, 56, 63, 63, 63, 68, 92,
543 91, 89, 63, 68, 58, 68, 68, 83, 68, 64,
544
545 68, 68, 74, 74, 74, 74, 74, 74, 74, 74,
546 74, 74, 85, 73, 72, 71, 65, 85, 64, 85,
547 85, 90, 90, 90, 96, 96, 58, 138, 23, 23,
548 23, 96, 111, 23, 23, 23, 111, 111, 23, 111,
549 23, 23, 23, 23, 23, 21, 138, 138, 138, 138,
550 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
551 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
552 138, 138, 138, 138, 138, 138
553 } ;
554
555static yyconst flex_int16_t yy_chk[377] =
556 { 0,
557 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
558 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
559 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
560 5, 7, 6, 8, 89, 89, 145, 56, 5, 5,
561 6, 6, 9, 9, 10, 10, 69, 9, 44, 10,
562 56, 9, 25, 10, 44, 25, 7, 59, 8, 24,
563 69, 59, 132, 25, 24, 24, 28, 24, 24, 28,
564 28, 33, 24, 35, 41, 70, 33, 28, 35, 41,
565 42, 70, 43, 41, 33, 42, 35, 43, 45, 42,
566 61, 43, 130, 45, 79, 97, 35, 45, 45, 48,
567
568 79, 53, 48, 48, 53, 54, 61, 129, 54, 97,
569 48, 60, 53, 65, 60, 60, 54, 61, 65, 66,
570 65, 80, 60, 112, 66, 67, 65, 80, 67, 74,
571 75, 112, 66, 127, 74, 75, 67, 77, 74, 75,
572 78, 84, 77, 81, 83, 78, 77, 77, 81, 78,
573 82, 83, 81, 85, 84, 82, 86, 83, 93, 82,
574 94, 93, 96, 94, 98, 126, 85, 122, 96, 93,
575 101, 94, 86, 99, 99, 101, 104, 98, 109, 101,
576 108, 104, 111, 86, 109, 104, 108, 108, 111, 114,
577 117, 118, 119, 117, 114, 124, 118, 119, 123, 123,
578
579 124, 128, 128, 131, 133, 134, 135, 121, 136, 133,
580 137, 116, 115, 113, 106, 105, 131, 133, 103, 134,
581 135, 136, 100, 137, 95, 92, 131, 139, 139, 139,
582 139, 139, 139, 139, 139, 139, 139, 140, 140, 140,
583 140, 140, 140, 140, 140, 140, 140, 141, 141, 141,
584 141, 141, 141, 141, 141, 141, 141, 142, 142, 142,
585 142, 142, 142, 142, 142, 142, 142, 143, 143, 143,
586 143, 143, 143, 143, 143, 143, 143, 144, 144, 91,
587 90, 88, 87, 73, 144, 146, 146, 146, 68, 64,
588 63, 62, 146, 147, 58, 57, 147, 55, 147, 50,
589
590 147, 147, 148, 148, 148, 148, 148, 148, 148, 148,
591 148, 148, 149, 40, 38, 37, 32, 149, 30, 149,
592 149, 150, 150, 150, 151, 151, 27, 21, 20, 19,
593 18, 151, 152, 17, 16, 15, 152, 152, 14, 152,
594 13, 12, 11, 2, 1, 138, 138, 138, 138, 138,
595 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
596 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
597 138, 138, 138, 138, 138, 138
598 } ;
599
600extern int declinfoYY_flex_debug;
601int declinfoYY_flex_debug = 0;
602
603static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
604static char *yy_full_match;
605static int yy_lp;
606static int yy_looking_for_trail_begin = 0;
607static int yy_full_lp;
608static int *yy_full_state;
609#define YY_TRAILING_MASK 0x2000
610#define YY_TRAILING_HEAD_MASK 0x4000
611#define REJECT \
612{ \
613*yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */ \
614yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
615(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
616(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
617yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
618++(yy_lp); \
619goto find_rule; \
620}
621
622#define yymore() yymore_used_but_not_detected
623#define YY_MORE_ADJ 0
624#define YY_RESTORE_YY_MORE_OFFSET
625char *declinfoYYtext;
626#line 1 "declinfo.l"
627/******************************************************************************
628 *
629 * $Id: declinfo.l,v 1.26 2001/03/19 19:27:40 root Exp $
630 *
631 * Copyright (C) 1997-2011 by Dimitri van Heesch.
632 *
633 * Permission to use, copy, modify, and distribute this software and its
634 * documentation under the terms of the GNU General Public License is hereby
635 * granted. No representations are made about the suitability of this software
636 * for any purpose. It is provided "as is" without express or implied warranty.
637 * See the GNU General Public License for more details.
638 *
639 * Documents produced by Doxygen are derivative works derived from the
640 * input used in their production; they are not affected by this license.
641 *
642 */
643#line 19 "declinfo.l"
644
645/*
646 *includes
647 */
648#include <stdio.h>
649//#include <iostream.h>
650#include <assert.h>
651#include <ctype.h>
652
653#include "declinfo.h"
654#include "util.h"
655#include "message.h"
656
657/* -----------------------------------------------------------------
658 *
659 *statics
660 */
661
662static const char * inputString;
663static int inputPosition;
664static QCString scope;
665static QCString className;
666static QCString classTempList;
667static QCString funcTempList;
668static QCString type;
669static QCString name;
670static QCString args;
671static QCString tmpType;
672static int sharpCount;
673static bool classTempListFound;
674static bool funcTempListFound;
675static QCString exceptionString;
676static bool insideObjC;
677
678static void addType()
679{
680 //printf("addType() type=`%s' scope=`%s' name=`%s'\n",
681 // type.data(),scope.data(),name.data());
682 if (name.isEmpty() && scope.isEmpty()) return;
683 if (!type.isEmpty()) type+=" ";
684 if (!scope.isEmpty()) type+=scope+"::";
685 type+=name;
686 scope.resize(0);
687 name.resize(0);
688}
689
690static void addTypeName()
691{
692 //printf("addTypeName() type=`%s' scope=`%s' name=`%s'\n",
693 // type.data(),scope.data(),name.data());
694 if (name.isEmpty() ||
695 name.at(name.length()-1)==':') // end of Objective-C keyword => append to name not type
696 {
697 return;
698 }
699 if (!type.isEmpty()) type+=' ';
700 type+=name;
701 name.resize(0);
702}
703
704#define YY_NEVER_INTERACTIVE 1
705
706/* -----------------------------------------------------------------
707 */
708#undefYY_INPUT
709#defineYY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
710
711static int yyread(char *buf,int max_size)
712{
713 int c=0;
714 while( c < max_size && inputString[inputPosition] )
715 {
716*buf = inputString[inputPosition++] ;
717c++; buf++;
718 }
719 return c;
720}
721
722
723
724
725
726
727
728
729
730
731#line 732 "<stdout>"
732
733#define INITIAL 0
734#define Start 1
735#define Template 2
736#define ReadArgs 3
737#define Operator 4
738#define FuncPtr 5
739#define EndTemplate 6
740#define StripTempArgs 7
741#define SkipSharp 8
742#define ReadExceptions 9
743
744#ifndef YY_NO_UNISTD_H
745/* Special case for "unistd.h", since it is non-ANSI. We include it way
746 * down here because we want the user's section 1 to have been scanned first.
747 * The user has a chance to override it with an option.
748 */
749#include <unistd.h>
750#endif
751
752#ifndef YY_EXTRA_TYPE
753#define YY_EXTRA_TYPE void *
754#endif
755
756static int yy_init_globals (void );
757
758/* Accessor methods to globals.
759 These are made visible to non-reentrant scanners for convenience. */
760
761int declinfoYYlex_destroy (void );
762
763int declinfoYYget_debug (void );
764
765void declinfoYYset_debug (int debug_flag );
766
767YY_EXTRA_TYPE declinfoYYget_extra (void );
768
769void declinfoYYset_extra (YY_EXTRA_TYPE user_defined );
770
771FILE *declinfoYYget_in (void );
772
773void declinfoYYset_in (FILE * in_str );
774
775FILE *declinfoYYget_out (void );
776
777void declinfoYYset_out (FILE * out_str );
778
779yy_size_t declinfoYYget_leng (void );
780
781char *declinfoYYget_text (void );
782
783int declinfoYYget_lineno (void );
784
785void declinfoYYset_lineno (int line_number );
786
787/* Macros after this point can all be overridden by user definitions in
788 * section 1.
789 */
790
791#ifndef YY_SKIP_YYWRAP
792#ifdef __cplusplus
793extern "C" int declinfoYYwrap (void );
794#else
795extern int declinfoYYwrap (void );
796#endif
797#endif
798
799#ifndef yytext_ptr
800static void yy_flex_strncpy (char *,yyconst char *,int );
801#endif
802
803#ifdef YY_NEED_STRLEN
804static int yy_flex_strlen (yyconst char * );
805#endif
806
807#ifndef YY_NO_INPUT
808
809#ifdef __cplusplus
810static int yyinput (void );
811#else
812static int input (void );
813#endif
814
815#endif
816
817/* Amount of stuff to slurp up with each read. */
818#ifndef YY_READ_BUF_SIZE
819#define YY_READ_BUF_SIZE 262144
820#endif
821
822/* Copy whatever the last rule matched to the standard output. */
823#ifndef ECHO
824/* This used to be an fputs(), but since the string might contain NUL's,
825 * we now use fwrite().
826 */
827#define ECHO fwrite( declinfoYYtext, declinfoYYleng, 1, declinfoYYout )
828#endif
829
830/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
831 * is returned in "result".
832 */
833#ifndef YY_INPUT
834#define YY_INPUT(buf,result,max_size) \
835if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
836{ \
837int c = '*'; \
838yy_size_t n; \
839for ( n = 0; n < max_size && \
840 (c = getc( declinfoYYin )) != EOF && c != '\n'; ++n ) \
841buf[n] = (char) c; \
842if ( c == '\n' ) \
843buf[n++] = (char) c; \
844if ( c == EOF && ferror( declinfoYYin ) ) \
845YY_FATAL_ERROR( "input in flex scanner failed" ); \
846result = n; \
847} \
848else \
849{ \
850errno=0; \
851while ( (result = fread(buf, 1, max_size, declinfoYYin))==0 && ferror(declinfoYYin)) \
852{ \
853if( errno != EINTR) \
854{ \
855YY_FATAL_ERROR( "input in flex scanner failed" ); \
856break; \
857} \
858errno=0; \
859clearerr(declinfoYYin); \
860} \
861}\
862\
863
864#endif
865
866/* No semi-colon after return; correct usage is to write "yyterminate();" -
867 * we don't want an extra ';' after the "return" because that will cause
868 * some compilers to complain about unreachable statements.
869 */
870#ifndef yyterminate
871#define yyterminate() return YY_NULL
872#endif
873
874/* Number of entries by which start-condition stack grows. */
875#ifndef YY_START_STACK_INCR
876#define YY_START_STACK_INCR 25
877#endif
878
879/* Report a fatal error. */
880#ifndef YY_FATAL_ERROR
881#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
882#endif
883
884/* end tables serialization structures and prototypes */
885
886/* Default declaration of generated scanner - a define so the user can
887 * easily add parameters.
888 */
889#ifndef YY_DECL
890#define YY_DECL_IS_OURS 1
891
892extern int declinfoYYlex (void);
893
894#define YY_DECL int declinfoYYlex (void)
895#endif /* !YY_DECL */
896
897/* Code executed at the beginning of each rule, after declinfoYYtext and declinfoYYleng
898 * have been set up.
899 */
900#ifndef YY_USER_ACTION
901#define YY_USER_ACTION
902#endif
903
904/* Code executed at the end of each rule. */
905#ifndef YY_BREAK
906#define YY_BREAK break;
907#endif
908
909#define YY_RULE_SETUP \
910YY_USER_ACTION
911
912/** The main scanner function which does all the work.
913 */
914YY_DECL
915{
916register yy_state_type yy_current_state;
917register char *yy_cp, *yy_bp;
918register int yy_act;
919
920#line 115 "declinfo.l"
921
922
923#line 924 "<stdout>"
924
925if ( !(yy_init) )
926{
927(yy_init) = 1;
928
929#ifdef YY_USER_INIT
930YY_USER_INIT;
931#endif
932
933 /* Create the reject buffer large enough to save one state per allowed character. */
934 if ( ! (yy_state_buf) )
935 (yy_state_buf) = (yy_state_type *)declinfoYYalloc(YY_STATE_BUF_SIZE );
936 if ( ! (yy_state_buf) )
937 YY_FATAL_ERROR( "out of dynamic memory in declinfoYYlex()" );
938
939if ( ! (yy_start) )
940(yy_start) = 1;/* first start state */
941
942if ( ! declinfoYYin )
943declinfoYYin = stdin;
944
945if ( ! declinfoYYout )
946declinfoYYout = stdout;
947
948if ( ! YY_CURRENT_BUFFER ) {
949declinfoYYensure_buffer_stack ();
950YY_CURRENT_BUFFER_LVALUE =
951declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE );
952}
953
954declinfoYY_load_buffer_state( );
955}
956
957while ( 1 )/* loops until end-of-file is reached */
958{
959yy_cp = (yy_c_buf_p);
960
961/* Support of declinfoYYtext. */
962*yy_cp = (yy_hold_char);
963
964/* yy_bp points to the position in yy_ch_buf of the start of
965 * the current run.
966 */
967yy_bp = yy_cp;
968
969yy_current_state = (yy_start);
970
971(yy_state_ptr) = (yy_state_buf);
972*(yy_state_ptr)++ = yy_current_state;
973
974yy_match:
975do
976{
977register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
978while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
979{
980yy_current_state = (int) yy_def[yy_current_state];
981if ( yy_current_state >= 139 )
982yy_c = yy_meta[(unsigned int) yy_c];
983}
984yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
985*(yy_state_ptr)++ = yy_current_state;
986++yy_cp;
987}
988while ( yy_base[yy_current_state] != 346 );
989
990yy_find_action:
991yy_current_state = *--(yy_state_ptr);
992(yy_lp) = yy_accept[yy_current_state];
993goto find_rule; /* Shut up GCC warning -Wall */
994find_rule: /* we branch to this label when backing up */
995for ( ; ; ) /* until we find what rule we matched */
996{
997if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
998{
999yy_act = yy_acclist[(yy_lp)];
1000if ( yy_act & YY_TRAILING_HEAD_MASK ||
1001 (yy_looking_for_trail_begin) )
1002{
1003if ( yy_act == (yy_looking_for_trail_begin) )
1004{
1005(yy_looking_for_trail_begin) = 0;
1006yy_act &= ~YY_TRAILING_HEAD_MASK;
1007break;
1008}
1009}
1010else if ( yy_act & YY_TRAILING_MASK )
1011{
1012(yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
1013(yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
1014(yy_full_match) = yy_cp;
1015(yy_full_state) = (yy_state_ptr);
1016(yy_full_lp) = (yy_lp);
1017}
1018else
1019{
1020(yy_full_match) = yy_cp;
1021(yy_full_state) = (yy_state_ptr);
1022(yy_full_lp) = (yy_lp);
1023break;
1024}
1025++(yy_lp);
1026goto find_rule;
1027}
1028--yy_cp;
1029yy_current_state = *--(yy_state_ptr);
1030(yy_lp) = yy_accept[yy_current_state];
1031}
1032
1033YY_DO_BEFORE_ACTION;
1034
1035do_action:/* This label is used only to access EOF actions. */
1036
1037switch ( yy_act )
1038{ /* beginning of action switch */
1039case 1:
1040*yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
1041(yy_c_buf_p) = yy_cp = yy_bp + 8;
1042YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
1043YY_RULE_SETUP
1044#line 117 "declinfo.l"
1045{ // operator rule must be before {ID} rule
1046 name += declinfoYYtext;
1047 BEGIN(Operator);
1048 }
1049YY_BREAK
1050case 2:
1051YY_RULE_SETUP
1052#line 121 "declinfo.l"
1053{ // Objective-C class categories
1054 if (!insideObjC)
1055 {
1056 REJECT;
1057 }
1058 else
1059 {
1060 name += declinfoYYtext;
1061 }
1062 }
1063YY_BREAK
1064case 3:
1065YY_RULE_SETUP
1066#line 131 "declinfo.l"
1067{ // the []'s are for Java,
1068 // the / was add to deal with multi-
1069 // dimensional C++ arrays like A[][15]
1070 // the leading ~ is for a destructor
1071 // the leading ! is for a C++/CLI finalizer (see bug 456475 and 635198)
1072 addTypeName();
1073 name += declinfoYYtext;
1074 }
1075YY_BREAK
1076case 4:
1077YY_RULE_SETUP
1078#line 139 "declinfo.l"
1079{ // found a scope specifier
1080 if (!scope.isEmpty())
1081 {
1082 scope+="::"+name; // add name to scope
1083 }
1084 else
1085 {
1086 scope = name.copy(); // scope becomes name
1087 }
1088 name.resize(0);
1089 }
1090YY_BREAK
1091case 5:
1092YY_RULE_SETUP
1093#line 150 "declinfo.l"
1094{ // Objective-C argument separator
1095 name+=declinfoYYtext;
1096 }
1097YY_BREAK
1098case 6:
1099YY_RULE_SETUP
1100#line 153 "declinfo.l"
1101{
1102 addType();
1103 type+=declinfoYYtext;
1104 }
1105YY_BREAK
1106case 7:
1107YY_RULE_SETUP
1108#line 157 "declinfo.l"
1109{
1110 addType();
1111 }
1112YY_BREAK
1113case 8:
1114YY_RULE_SETUP
1115#line 160 "declinfo.l"
1116{
1117 addType();
1118 QCString text=declinfoYYtext;
1119 type+=text.stripWhiteSpace();
1120 }
1121YY_BREAK
1122case 9:
1123YY_RULE_SETUP
1124#line 165 "declinfo.l"
1125{
1126 type+=")";
1127 }
1128YY_BREAK
1129case 10:
1130YY_RULE_SETUP
1131#line 168 "declinfo.l"
1132{ // TODO: function pointers
1133 args+="(";
1134 BEGIN(ReadArgs);
1135 }
1136YY_BREAK
1137case 11:
1138YY_RULE_SETUP
1139#line 172 "declinfo.l"
1140{
1141 args+="[";
1142 BEGIN(ReadArgs);
1143 }
1144YY_BREAK
1145case 12:
1146YY_RULE_SETUP
1147#line 176 "declinfo.l"
1148{
1149 name+="<";
1150 sharpCount=0;
1151 BEGIN(Template);
1152 }
1153YY_BREAK
1154case 13:
1155YY_RULE_SETUP
1156#line 181 "declinfo.l"
1157{ name+="<<"; }
1158YY_BREAK
1159case 14:
1160YY_RULE_SETUP
1161#line 182 "declinfo.l"
1162{ name+=">>"; }
1163YY_BREAK
1164case 15:
1165YY_RULE_SETUP
1166#line 183 "declinfo.l"
1167{
1168 name+="<";
1169 sharpCount++;
1170 }
1171YY_BREAK
1172case 16:
1173YY_RULE_SETUP
1174#line 187 "declinfo.l"
1175{
1176 name+=">";
1177 if (sharpCount)
1178 --sharpCount;
1179 else
1180 {
1181 BEGIN(Start);
1182 }
1183 }
1184YY_BREAK
1185case 17:
1186YY_RULE_SETUP
1187#line 196 "declinfo.l"
1188{
1189 name+=*declinfoYYtext;
1190 }
1191YY_BREAK
1192case 18:
1193*yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
1194(yy_c_buf_p) = yy_cp -= 1;
1195YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
1196YY_RULE_SETUP
1197#line 199 "declinfo.l"
1198{
1199 name+="() <>";
1200 BEGIN(ReadArgs);
1201 }
1202YY_BREAK
1203case 19:
1204*yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
1205(yy_c_buf_p) = yy_cp -= 1;
1206YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
1207YY_RULE_SETUP
1208#line 203 "declinfo.l"
1209{
1210 name+="()";
1211 BEGIN(ReadArgs);
1212 }
1213YY_BREAK
1214case 20:
1215/* rule 20 can match eol */
1216*yy_cp = (yy_hold_char); /* undo effects of setting up declinfoYYtext */
1217(yy_c_buf_p) = yy_cp -= 1;
1218YY_DO_BEFORE_ACTION; /* set up declinfoYYtext again */
1219YY_RULE_SETUP
1220#line 207 "declinfo.l"
1221{
1222 name+=declinfoYYtext;
1223 BEGIN(ReadArgs);
1224 }
1225YY_BREAK
1226case 21:
1227YY_RULE_SETUP
1228#line 211 "declinfo.l"
1229{
1230 exceptionString="throw(";
1231 BEGIN(ReadExceptions);
1232 }
1233YY_BREAK
1234case 22:
1235YY_RULE_SETUP
1236#line 215 "declinfo.l"
1237{
1238 args+=*declinfoYYtext;
1239 }
1240YY_BREAK
1241case 23:
1242YY_RULE_SETUP
1243#line 218 "declinfo.l"
1244{
1245 exceptionString+=*declinfoYYtext;
1246 }
1247YY_BREAK
1248case 24:
1249YY_RULE_SETUP
1250#line 221 "declinfo.l"
1251
1252YY_BREAK
1253case 25:
1254/* rule 25 can match eol */
1255YY_RULE_SETUP
1256#line 222 "declinfo.l"
1257
1258YY_BREAK
1259case 26:
1260YY_RULE_SETUP
1261#line 224 "declinfo.l"
1262ECHO;
1263YY_BREAK
1264#line 1265 "<stdout>"
1265case YY_STATE_EOF(INITIAL):
1266case YY_STATE_EOF(Start):
1267case YY_STATE_EOF(Template):
1268case YY_STATE_EOF(ReadArgs):
1269case YY_STATE_EOF(Operator):
1270case YY_STATE_EOF(FuncPtr):
1271case YY_STATE_EOF(EndTemplate):
1272case YY_STATE_EOF(StripTempArgs):
1273case YY_STATE_EOF(SkipSharp):
1274case YY_STATE_EOF(ReadExceptions):
1275yyterminate();
1276
1277case YY_END_OF_BUFFER:
1278{
1279/* Amount of text matched not including the EOB char. */
1280int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1281
1282/* Undo the effects of YY_DO_BEFORE_ACTION. */
1283*yy_cp = (yy_hold_char);
1284YY_RESTORE_YY_MORE_OFFSET
1285
1286if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1287{
1288/* We're scanning a new file or input source. It's
1289 * possible that this happened because the user
1290 * just pointed declinfoYYin at a new source and called
1291 * declinfoYYlex(). If so, then we have to assure
1292 * consistency between YY_CURRENT_BUFFER and our
1293 * globals. Here is the right place to do so, because
1294 * this is the first action (other than possibly a
1295 * back-up) that will match for the new input source.
1296 */
1297(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1298YY_CURRENT_BUFFER_LVALUE->yy_input_file = declinfoYYin;
1299YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1300}
1301
1302/* Note that here we test for yy_c_buf_p "<=" to the position
1303 * of the first EOB in the buffer, since yy_c_buf_p will
1304 * already have been incremented past the NUL character
1305 * (since all states make transitions on EOB to the
1306 * end-of-buffer state). Contrast this with the test
1307 * in input().
1308 */
1309if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1310{ /* This was really a NUL. */
1311yy_state_type yy_next_state;
1312
1313(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1314
1315yy_current_state = yy_get_previous_state( );
1316
1317/* Okay, we're now positioned to make the NUL
1318 * transition. We couldn't have
1319 * yy_get_previous_state() go ahead and do it
1320 * for us because it doesn't know how to deal
1321 * with the possibility of jamming (and we don't
1322 * want to build jamming into it because then it
1323 * will run more slowly).
1324 */
1325
1326yy_next_state = yy_try_NUL_trans( yy_current_state );
1327
1328yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1329
1330if ( yy_next_state )
1331{
1332/* Consume the NUL. */
1333yy_cp = ++(yy_c_buf_p);
1334yy_current_state = yy_next_state;
1335goto yy_match;
1336}
1337
1338else
1339{
1340yy_cp = (yy_c_buf_p);
1341goto yy_find_action;
1342}
1343}
1344
1345else switch ( yy_get_next_buffer( ) )
1346{
1347case EOB_ACT_END_OF_FILE:
1348{
1349(yy_did_buffer_switch_on_eof) = 0;
1350
1351if ( declinfoYYwrap( ) )
1352{
1353/* Note: because we've taken care in
1354 * yy_get_next_buffer() to have set up
1355 * declinfoYYtext, we can now set up
1356 * yy_c_buf_p so that if some total
1357 * hoser (like flex itself) wants to
1358 * call the scanner after we return the
1359 * YY_NULL, it'll still work - another
1360 * YY_NULL will get returned.
1361 */
1362(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1363
1364yy_act = YY_STATE_EOF(YY_START);
1365goto do_action;
1366}
1367
1368else
1369{
1370if ( ! (yy_did_buffer_switch_on_eof) )
1371YY_NEW_FILE;
1372}
1373break;
1374}
1375
1376case EOB_ACT_CONTINUE_SCAN:
1377(yy_c_buf_p) =
1378(yytext_ptr) + yy_amount_of_matched_text;
1379
1380yy_current_state = yy_get_previous_state( );
1381
1382yy_cp = (yy_c_buf_p);
1383yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1384goto yy_match;
1385
1386case EOB_ACT_LAST_MATCH:
1387(yy_c_buf_p) =
1388&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1389
1390yy_current_state = yy_get_previous_state( );
1391
1392yy_cp = (yy_c_buf_p);
1393yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1394goto yy_find_action;
1395}
1396break;
1397}
1398
1399default:
1400YY_FATAL_ERROR(
1401"fatal flex scanner internal error--no action found" );
1402} /* end of action switch */
1403} /* end of scanning one token */
1404} /* end of declinfoYYlex */
1405
1406/* yy_get_next_buffer - try to read in a new buffer
1407 *
1408 * Returns a code representing an action:
1409 *EOB_ACT_LAST_MATCH -
1410 *EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1411 *EOB_ACT_END_OF_FILE - end of file
1412 */
1413static int yy_get_next_buffer (void)
1414{
1415 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1416register char *source = (yytext_ptr);
1417register int number_to_move, i;
1418int ret_val;
1419
1420if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1421YY_FATAL_ERROR(
1422"fatal flex scanner internal error--end of buffer missed" );
1423
1424if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1425{ /* Don't try to fill the buffer, so this is an EOF. */
1426if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1427{
1428/* We matched a single character, the EOB, so
1429 * treat this as a final EOF.
1430 */
1431return EOB_ACT_END_OF_FILE;
1432}
1433
1434else
1435{
1436/* We matched some text prior to the EOB, first
1437 * process it.
1438 */
1439return EOB_ACT_LAST_MATCH;
1440}
1441}
1442
1443/* Try to read more data. */
1444
1445/* First move last chars to start of buffer. */
1446number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1447
1448for ( i = 0; i < number_to_move; ++i )
1449*(dest++) = *(source++);
1450
1451if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1452/* don't do the read, it's not guaranteed to return an EOF,
1453 * just force an EOF
1454 */
1455YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1456
1457else
1458{
1459yy_size_t num_to_read =
1460YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1461
1462while ( num_to_read <= 0 )
1463{ /* Not enough room in the buffer - grow it. */
1464
1465YY_FATAL_ERROR(
1466"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1467
1468}
1469
1470if ( num_to_read > YY_READ_BUF_SIZE )
1471num_to_read = YY_READ_BUF_SIZE;
1472
1473/* Read in more data. */
1474YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1475(yy_n_chars), num_to_read );
1476
1477YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1478}
1479
1480if ( (yy_n_chars) == 0 )
1481{
1482if ( number_to_move == YY_MORE_ADJ )
1483{
1484ret_val = EOB_ACT_END_OF_FILE;
1485declinfoYYrestart(declinfoYYin );
1486}
1487
1488else
1489{
1490ret_val = EOB_ACT_LAST_MATCH;
1491YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1492YY_BUFFER_EOF_PENDING;
1493}
1494}
1495
1496else
1497ret_val = EOB_ACT_CONTINUE_SCAN;
1498
1499if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1500/* Extend the array by 50%, plus the number we really need. */
1501yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1502YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) declinfoYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1503if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1504YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1505}
1506
1507(yy_n_chars) += number_to_move;
1508YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1509YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1510
1511(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1512
1513return ret_val;
1514}
1515
1516/* yy_get_previous_state - get the state just before the EOB char was reached */
1517
1518 static yy_state_type yy_get_previous_state (void)
1519{
1520register yy_state_type yy_current_state;
1521register char *yy_cp;
1522
1523yy_current_state = (yy_start);
1524
1525(yy_state_ptr) = (yy_state_buf);
1526*(yy_state_ptr)++ = yy_current_state;
1527
1528for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1529{
1530register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1531while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1532{
1533yy_current_state = (int) yy_def[yy_current_state];
1534if ( yy_current_state >= 139 )
1535yy_c = yy_meta[(unsigned int) yy_c];
1536}
1537yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1538*(yy_state_ptr)++ = yy_current_state;
1539}
1540
1541return yy_current_state;
1542}
1543
1544/* yy_try_NUL_trans - try to make a transition on the NUL character
1545 *
1546 * synopsis
1547 *next_state = yy_try_NUL_trans( current_state );
1548 */
1549 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1550{
1551register int yy_is_jam;
1552
1553register YY_CHAR yy_c = 1;
1554while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1555{
1556yy_current_state = (int) yy_def[yy_current_state];
1557if ( yy_current_state >= 139 )
1558yy_c = yy_meta[(unsigned int) yy_c];
1559}
1560yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1561yy_is_jam = (yy_current_state == 138);
1562if ( ! yy_is_jam )
1563*(yy_state_ptr)++ = yy_current_state;
1564
1565return yy_is_jam ? 0 : yy_current_state;
1566}
1567
1568#ifndef YY_NO_INPUT
1569#ifdef __cplusplus
1570 static int yyinput (void)
1571#else
1572 static int input (void)
1573#endif
1574
1575{
1576int c;
1577
1578*(yy_c_buf_p) = (yy_hold_char);
1579
1580if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1581{
1582/* yy_c_buf_p now points to the character we want to return.
1583 * If this occurs *before* the EOB characters, then it's a
1584 * valid NUL; if not, then we've hit the end of the buffer.
1585 */
1586if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1587/* This was really a NUL. */
1588*(yy_c_buf_p) = '\0';
1589
1590else
1591{ /* need more input */
1592yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1593++(yy_c_buf_p);
1594
1595switch ( yy_get_next_buffer( ) )
1596{
1597case EOB_ACT_LAST_MATCH:
1598/* This happens because yy_g_n_b()
1599 * sees that we've accumulated a
1600 * token and flags that we need to
1601 * try matching the token before
1602 * proceeding. But for input(),
1603 * there's no matching to consider.
1604 * So convert the EOB_ACT_LAST_MATCH
1605 * to EOB_ACT_END_OF_FILE.
1606 */
1607
1608/* Reset buffer status. */
1609declinfoYYrestart(declinfoYYin );
1610
1611/*FALLTHROUGH*/
1612
1613case EOB_ACT_END_OF_FILE:
1614{
1615if ( declinfoYYwrap( ) )
1616return 0;
1617
1618if ( ! (yy_did_buffer_switch_on_eof) )
1619YY_NEW_FILE;
1620#ifdef __cplusplus
1621return yyinput();
1622#else
1623return input();
1624#endif
1625}
1626
1627case EOB_ACT_CONTINUE_SCAN:
1628(yy_c_buf_p) = (yytext_ptr) + offset;
1629break;
1630}
1631}
1632}
1633
1634c = *(unsigned char *) (yy_c_buf_p);/* cast for 8-bit char's */
1635*(yy_c_buf_p) = '\0';/* preserve declinfoYYtext */
1636(yy_hold_char) = *++(yy_c_buf_p);
1637
1638return c;
1639}
1640#endif/* ifndef YY_NO_INPUT */
1641
1642/** Immediately switch to a different input stream.
1643 * @param input_file A readable stream.
1644 *
1645 * @note This function does not reset the start condition to @c INITIAL .
1646 */
1647 void declinfoYYrestart (FILE * input_file )
1648{
1649
1650if ( ! YY_CURRENT_BUFFER ){
1651 declinfoYYensure_buffer_stack ();
1652YY_CURRENT_BUFFER_LVALUE =
1653 declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE );
1654}
1655
1656declinfoYY_init_buffer(YY_CURRENT_BUFFER,input_file );
1657declinfoYY_load_buffer_state( );
1658}
1659
1660/** Switch to a different input buffer.
1661 * @param new_buffer The new input buffer.
1662 *
1663 */
1664 void declinfoYY_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1665{
1666
1667/* TODO. We should be able to replace this entire function body
1668 * with
1669 *declinfoYYpop_buffer_state();
1670 *declinfoYYpush_buffer_state(new_buffer);
1671 */
1672declinfoYYensure_buffer_stack ();
1673if ( YY_CURRENT_BUFFER == new_buffer )
1674return;
1675
1676if ( YY_CURRENT_BUFFER )
1677{
1678/* Flush out information for old buffer. */
1679*(yy_c_buf_p) = (yy_hold_char);
1680YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1681YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1682}
1683
1684YY_CURRENT_BUFFER_LVALUE = new_buffer;
1685declinfoYY_load_buffer_state( );
1686
1687/* We don't actually know whether we did this switch during
1688 * EOF (declinfoYYwrap()) processing, but the only time this flag
1689 * is looked at is after declinfoYYwrap() is called, so it's safe
1690 * to go ahead and always set it.
1691 */
1692(yy_did_buffer_switch_on_eof) = 1;
1693}
1694
1695static void declinfoYY_load_buffer_state (void)
1696{
1697 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1698(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1699declinfoYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1700(yy_hold_char) = *(yy_c_buf_p);
1701}
1702
1703/** Allocate and initialize an input buffer state.
1704 * @param file A readable stream.
1705 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1706 *
1707 * @return the allocated buffer state.
1708 */
1709 YY_BUFFER_STATE declinfoYY_create_buffer (FILE * file, int size )
1710{
1711YY_BUFFER_STATE b;
1712
1713b = (YY_BUFFER_STATE) declinfoYYalloc(sizeof( struct yy_buffer_state ) );
1714if ( ! b )
1715YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_create_buffer()" );
1716
1717b->yy_buf_size = size;
1718
1719/* yy_ch_buf has to be 2 characters longer than the size given because
1720 * we need to put in 2 end-of-buffer characters.
1721 */
1722b->yy_ch_buf = (char *) declinfoYYalloc(b->yy_buf_size + 2 );
1723if ( ! b->yy_ch_buf )
1724YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_create_buffer()" );
1725
1726b->yy_is_our_buffer = 1;
1727
1728declinfoYY_init_buffer(b,file );
1729
1730return b;
1731}
1732
1733/** Destroy the buffer.
1734 * @param b a buffer created with declinfoYY_create_buffer()
1735 *
1736 */
1737 void declinfoYY_delete_buffer (YY_BUFFER_STATE b )
1738{
1739
1740if ( ! b )
1741return;
1742
1743if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1744YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1745
1746if ( b->yy_is_our_buffer )
1747declinfoYYfree((void *) b->yy_ch_buf );
1748
1749declinfoYYfree((void *) b );
1750}
1751
1752#ifndef __cplusplus
1753extern int isatty (int );
1754#endif /* __cplusplus */
1755
1756/* Initializes or reinitializes a buffer.
1757 * This function is sometimes called more than once on the same buffer,
1758 * such as during a declinfoYYrestart() or at EOF.
1759 */
1760 static void declinfoYY_init_buffer (YY_BUFFER_STATE b, FILE * file )
1761
1762{
1763int oerrno = errno;
1764
1765declinfoYY_flush_buffer(b );
1766
1767b->yy_input_file = file;
1768b->yy_fill_buffer = 1;
1769
1770 /* If b is the current buffer, then declinfoYY_init_buffer was _probably_
1771 * called from declinfoYYrestart() or through yy_get_next_buffer.
1772 * In that case, we don't want to reset the lineno or column.
1773 */
1774 if (b != YY_CURRENT_BUFFER){
1775 b->yy_bs_lineno = 1;
1776 b->yy_bs_column = 0;
1777 }
1778
1779 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1780
1781errno = oerrno;
1782}
1783
1784/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1785 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1786 *
1787 */
1788 void declinfoYY_flush_buffer (YY_BUFFER_STATE b )
1789{
1790 if ( ! b )
1791return;
1792
1793b->yy_n_chars = 0;
1794
1795/* We always need two end-of-buffer characters. The first causes
1796 * a transition to the end-of-buffer state. The second causes
1797 * a jam in that state.
1798 */
1799b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1800b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1801
1802b->yy_buf_pos = &b->yy_ch_buf[0];
1803
1804b->yy_at_bol = 1;
1805b->yy_buffer_status = YY_BUFFER_NEW;
1806
1807if ( b == YY_CURRENT_BUFFER )
1808declinfoYY_load_buffer_state( );
1809}
1810
1811/** Pushes the new state onto the stack. The new state becomes
1812 * the current state. This function will allocate the stack
1813 * if necessary.
1814 * @param new_buffer The new state.
1815 *
1816 */
1817void declinfoYYpush_buffer_state (YY_BUFFER_STATE new_buffer )
1818{
1819 if (new_buffer == NULL)
1820return;
1821
1822declinfoYYensure_buffer_stack();
1823
1824/* This block is copied from declinfoYY_switch_to_buffer. */
1825if ( YY_CURRENT_BUFFER )
1826{
1827/* Flush out information for old buffer. */
1828*(yy_c_buf_p) = (yy_hold_char);
1829YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1830YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1831}
1832
1833/* Only push if top exists. Otherwise, replace top. */
1834if (YY_CURRENT_BUFFER)
1835(yy_buffer_stack_top)++;
1836YY_CURRENT_BUFFER_LVALUE = new_buffer;
1837
1838/* copied from declinfoYY_switch_to_buffer. */
1839declinfoYY_load_buffer_state( );
1840(yy_did_buffer_switch_on_eof) = 1;
1841}
1842
1843/** Removes and deletes the top of the stack, if present.
1844 * The next element becomes the new top.
1845 *
1846 */
1847void declinfoYYpop_buffer_state (void)
1848{
1849 if (!YY_CURRENT_BUFFER)
1850return;
1851
1852declinfoYY_delete_buffer(YY_CURRENT_BUFFER );
1853YY_CURRENT_BUFFER_LVALUE = NULL;
1854if ((yy_buffer_stack_top) > 0)
1855--(yy_buffer_stack_top);
1856
1857if (YY_CURRENT_BUFFER) {
1858declinfoYY_load_buffer_state( );
1859(yy_did_buffer_switch_on_eof) = 1;
1860}
1861}
1862
1863/* Allocates the stack if it does not exist.
1864 * Guarantees space for at least one push.
1865 */
1866static void declinfoYYensure_buffer_stack (void)
1867{
1868yy_size_t num_to_alloc;
1869
1870if (!(yy_buffer_stack)) {
1871
1872/* First allocation is just for 2 elements, since we don't know if this
1873 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1874 * immediate realloc on the next call.
1875 */
1876num_to_alloc = 1;
1877(yy_buffer_stack) = (struct yy_buffer_state**)declinfoYYalloc
1878(num_to_alloc * sizeof(struct yy_buffer_state*)
1879);
1880if ( ! (yy_buffer_stack) )
1881YY_FATAL_ERROR( "out of dynamic memory in declinfoYYensure_buffer_stack()" );
1882
1883memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1884
1885(yy_buffer_stack_max) = num_to_alloc;
1886(yy_buffer_stack_top) = 0;
1887return;
1888}
1889
1890if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1891
1892/* Increase the buffer to prepare for a possible push. */
1893int grow_size = 8 /* arbitrary grow size */;
1894
1895num_to_alloc = (yy_buffer_stack_max) + grow_size;
1896(yy_buffer_stack) = (struct yy_buffer_state**)declinfoYYrealloc
1897((yy_buffer_stack),
1898num_to_alloc * sizeof(struct yy_buffer_state*)
1899);
1900if ( ! (yy_buffer_stack) )
1901YY_FATAL_ERROR( "out of dynamic memory in declinfoYYensure_buffer_stack()" );
1902
1903/* zero only the new slots.*/
1904memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1905(yy_buffer_stack_max) = num_to_alloc;
1906}
1907}
1908
1909/** Setup the input buffer state to scan directly from a user-specified character buffer.
1910 * @param base the character buffer
1911 * @param size the size in bytes of the character buffer
1912 *
1913 * @return the newly allocated buffer state object.
1914 */
1915YY_BUFFER_STATE declinfoYY_scan_buffer (char * base, yy_size_t size )
1916{
1917YY_BUFFER_STATE b;
1918
1919if ( size < 2 ||
1920 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1921 base[size-1] != YY_END_OF_BUFFER_CHAR )
1922/* They forgot to leave room for the EOB's. */
1923return 0;
1924
1925b = (YY_BUFFER_STATE) declinfoYYalloc(sizeof( struct yy_buffer_state ) );
1926if ( ! b )
1927YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_scan_buffer()" );
1928
1929b->yy_buf_size = size - 2;/* "- 2" to take care of EOB's */
1930b->yy_buf_pos = b->yy_ch_buf = base;
1931b->yy_is_our_buffer = 0;
1932b->yy_input_file = 0;
1933b->yy_n_chars = b->yy_buf_size;
1934b->yy_is_interactive = 0;
1935b->yy_at_bol = 1;
1936b->yy_fill_buffer = 0;
1937b->yy_buffer_status = YY_BUFFER_NEW;
1938
1939declinfoYY_switch_to_buffer(b );
1940
1941return b;
1942}
1943
1944/** Setup the input buffer state to scan a string. The next call to declinfoYYlex() will
1945 * scan from a @e copy of @a str.
1946 * @param yystr a NUL-terminated string to scan
1947 *
1948 * @return the newly allocated buffer state object.
1949 * @note If you want to scan bytes that may contain NUL values, then use
1950 * declinfoYY_scan_bytes() instead.
1951 */
1952YY_BUFFER_STATE declinfoYY_scan_string (yyconst char * yystr )
1953{
1954
1955return declinfoYY_scan_bytes(yystr,strlen(yystr) );
1956}
1957
1958/** Setup the input buffer state to scan the given bytes. The next call to declinfoYYlex() will
1959 * scan from a @e copy of @a bytes.
1960 * @param bytes the byte buffer to scan
1961 * @param len the number of bytes in the buffer pointed to by @a bytes.
1962 *
1963 * @return the newly allocated buffer state object.
1964 */
1965YY_BUFFER_STATE declinfoYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
1966{
1967YY_BUFFER_STATE b;
1968char *buf;
1969yy_size_t n, i;
1970
1971/* Get memory for full buffer, including space for trailing EOB's. */
1972n = _yybytes_len + 2;
1973buf = (char *) declinfoYYalloc(n );
1974if ( ! buf )
1975YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_scan_bytes()" );
1976
1977for ( i = 0; i < _yybytes_len; ++i )
1978buf[i] = yybytes[i];
1979
1980buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1981
1982b = declinfoYY_scan_buffer(buf,n );
1983if ( ! b )
1984YY_FATAL_ERROR( "bad buffer in declinfoYY_scan_bytes()" );
1985
1986/* It's okay to grow etc. this buffer, and we should throw it
1987 * away when we're done.
1988 */
1989b->yy_is_our_buffer = 1;
1990
1991return b;
1992}
1993
1994#ifndef YY_EXIT_FAILURE
1995#define YY_EXIT_FAILURE 2
1996#endif
1997
1998static void yy_fatal_error (yyconst char* msg )
1999{
2000 (void) fprintf( stderr, "%s\n", msg );
2001exit( YY_EXIT_FAILURE );
2002}
2003
2004/* Redefine yyless() so it works in section 3 code. */
2005
2006#undef yyless
2007#define yyless(n) \
2008do \
2009{ \
2010/* Undo effects of setting up declinfoYYtext. */ \
2011 int yyless_macro_arg = (n); \
2012 YY_LESS_LINENO(yyless_macro_arg);\
2013declinfoYYtext[declinfoYYleng] = (yy_hold_char); \
2014(yy_c_buf_p) = declinfoYYtext + yyless_macro_arg; \
2015(yy_hold_char) = *(yy_c_buf_p); \
2016*(yy_c_buf_p) = '\0'; \
2017declinfoYYleng = yyless_macro_arg; \
2018} \
2019while ( 0 )
2020
2021/* Accessor methods (get/set functions) to struct members. */
2022
2023/** Get the current line number.
2024 *
2025 */
2026int declinfoYYget_lineno (void)
2027{
2028
2029 return declinfoYYlineno;
2030}
2031
2032/** Get the input stream.
2033 *
2034 */
2035FILE *declinfoYYget_in (void)
2036{
2037 return declinfoYYin;
2038}
2039
2040/** Get the output stream.
2041 *
2042 */
2043FILE *declinfoYYget_out (void)
2044{
2045 return declinfoYYout;
2046}
2047
2048/** Get the length of the current token.
2049 *
2050 */
2051yy_size_t declinfoYYget_leng (void)
2052{
2053 return declinfoYYleng;
2054}
2055
2056/** Get the current token.
2057 *
2058 */
2059
2060char *declinfoYYget_text (void)
2061{
2062 return declinfoYYtext;
2063}
2064
2065/** Set the current line number.
2066 * @param line_number
2067 *
2068 */
2069void declinfoYYset_lineno (int line_number )
2070{
2071
2072 declinfoYYlineno = line_number;
2073}
2074
2075/** Set the input stream. This does not discard the current
2076 * input buffer.
2077 * @param in_str A readable stream.
2078 *
2079 * @see declinfoYY_switch_to_buffer
2080 */
2081void declinfoYYset_in (FILE * in_str )
2082{
2083 declinfoYYin = in_str ;
2084}
2085
2086void declinfoYYset_out (FILE * out_str )
2087{
2088 declinfoYYout = out_str ;
2089}
2090
2091int declinfoYYget_debug (void)
2092{
2093 return declinfoYY_flex_debug;
2094}
2095
2096void declinfoYYset_debug (int bdebug )
2097{
2098 declinfoYY_flex_debug = bdebug ;
2099}
2100
2101static int yy_init_globals (void)
2102{
2103 /* Initialization is the same as for the non-reentrant scanner.
2104 * This function is called from declinfoYYlex_destroy(), so don't allocate here.
2105 */
2106
2107 (yy_buffer_stack) = 0;
2108 (yy_buffer_stack_top) = 0;
2109 (yy_buffer_stack_max) = 0;
2110 (yy_c_buf_p) = (char *) 0;
2111 (yy_init) = 0;
2112 (yy_start) = 0;
2113
2114 (yy_state_buf) = 0;
2115 (yy_state_ptr) = 0;
2116 (yy_full_match) = 0;
2117 (yy_lp) = 0;
2118
2119/* Defined in main.c */
2120#ifdef YY_STDINIT
2121 declinfoYYin = stdin;
2122 declinfoYYout = stdout;
2123#else
2124 declinfoYYin = (FILE *) 0;
2125 declinfoYYout = (FILE *) 0;
2126#endif
2127
2128 /* For future reference: Set errno on error, since we are called by
2129 * declinfoYYlex_init()
2130 */
2131 return 0;
2132}
2133
2134/* declinfoYYlex_destroy is for both reentrant and non-reentrant scanners. */
2135int declinfoYYlex_destroy (void)
2136{
2137
2138 /* Pop the buffer stack, destroying each element. */
2139while(YY_CURRENT_BUFFER){
2140declinfoYY_delete_buffer(YY_CURRENT_BUFFER );
2141YY_CURRENT_BUFFER_LVALUE = NULL;
2142declinfoYYpop_buffer_state();
2143}
2144
2145/* Destroy the stack itself. */
2146declinfoYYfree((yy_buffer_stack) );
2147(yy_buffer_stack) = NULL;
2148
2149 declinfoYYfree ( (yy_state_buf) );
2150 (yy_state_buf) = NULL;
2151
2152 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2153 * declinfoYYlex() is called, initialization will occur. */
2154 yy_init_globals( );
2155
2156 return 0;
2157}
2158
2159/*
2160 * Internal utility routines.
2161 */
2162
2163#ifndef yytext_ptr
2164static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2165{
2166register int i;
2167for ( i = 0; i < n; ++i )
2168s1[i] = s2[i];
2169}
2170#endif
2171
2172#ifdef YY_NEED_STRLEN
2173static int yy_flex_strlen (yyconst char * s )
2174{
2175register int n;
2176for ( n = 0; s[n]; ++n )
2177;
2178
2179return n;
2180}
2181#endif
2182
2183void *declinfoYYalloc (yy_size_t size )
2184{
2185return (void *) malloc( size );
2186}
2187
2188void *declinfoYYrealloc (void * ptr, yy_size_t size )
2189{
2190/* The cast to (char *) in the following accommodates both
2191 * implementations that use char* generic pointers, and those
2192 * that use void* generic pointers. It works with the latter
2193 * because both ANSI C and C++ allow castless assignment from
2194 * any pointer type to void*, and deal with argument conversions
2195 * as though doing an assignment.
2196 */
2197return (void *) realloc( (char *) ptr, size );
2198}
2199
2200void declinfoYYfree (void * ptr )
2201{
2202free( (char *) ptr );/* see declinfoYYrealloc() for (char *) cast */
2203}
2204
2205#define YYTABLES_NAME "yytables"
2206
2207#line 224 "declinfo.l"
2208
2209
2210
2211/*@ ----------------------------------------------------------------------------
2212 */
2213
2214void parseFuncDecl(const QCString &decl,bool objC,QCString &cl,QCString &t,
2215 QCString &n,QCString &a,QCString &ftl,QCString &exc)
2216{
2217 inputString = decl;
2218 //printf("Input=`%s'\n",inputString);
2219 if (inputString==0) return;
2220 inputPosition = 0;
2221 classTempListFound = FALSE;
2222 funcTempListFound = FALSE;
2223 insideObjC = objC;
2224 scope.resize(0);
2225 className.resize(0);
2226 classTempList.resize(0);
2227 funcTempList.resize(0);
2228 name.resize(0);
2229 type.resize(0);
2230 args.resize(0);
2231 exceptionString.resize(0);
2232 // first we try to find the type, scope, name and arguments
2233 declinfoYYrestart( declinfoYYin );
2234 BEGIN( Start );
2235 declinfoYYlex();
2236
2237 //printf("type=`%s' class=`%s' name=`%s' args=`%s'\n",
2238 // type.data(),scope.data(),name.data(),args.data());
2239
2240 int nb = name.findRev('[');
2241 if (nb!=-1 && args.isEmpty()) // correct for [] in name ambigity (due to Java return type allowing [])
2242 {
2243 args.prepend(name.right(name.length()-nb));
2244 name=name.left(nb);
2245 }
2246
2247#if 0
2248 {
2249 int l=scope.length();
2250 int i=0;
2251 int skipCount=0;
2252 cl.resize(0);
2253 ctl.resize(0);
2254 for (i=0;i<l;i++)
2255 {
2256 char c=scope.at(i);
2257 if (c=='<')
2258skipCount++;
2259 else if (c=='>')
2260skipCount--;
2261 else if (skipCount==0)
2262cl+=c;
2263 }
2264 }
2265 cl=stripTemplateSpecifiersFromScope(removeRedundantWhiteSpace(scope),FALSE);
2266 ctl.resize(0);
2267#endif
2268
2269 cl=scope;
2270 n=removeRedundantWhiteSpace(name);
2271 int il,ir;
2272 if ((il=n.find('<'))!=-1 && (ir=n.findRev('>'))!=-1)
2273 // TODO: handle cases like where n="operator<< <T>"
2274 {
2275 ftl=removeRedundantWhiteSpace(n.right(n.length()-il));
2276 n=n.left(il);
2277 }
2278
2279 //ctl=classTempList.copy();
2280 //ftl=funcTempList.copy();
2281 t=removeRedundantWhiteSpace(type);
2282 a=removeRedundantWhiteSpace(args);
2283 exc=removeRedundantWhiteSpace(exceptionString);
2284
2285 if (!t.isEmpty() && t.at(t.length()-1)==')') // for function pointers
2286 {
2287 a.prepend(")");
2288 t=t.left(t.length()-1);
2289 }
2290 //printf("type=`%s' class=`%s' name=`%s' args=`%s'\n",
2291 // t.data(),cl.data(),n.data(),a.data());
2292
2293 return;
2294
2295
2296}
2297
2298//extern "C" { // some bogus code to keep the compiler happy
2299// int declinfoYYwrap() { return 1 ; }
2300// void declinfoYYdummy() { yy_flex_realloc(0,0); }
2301//}
2302
2303#if 0
2304void dumpDecl(const char *s)
2305{
2306 QCString className;
2307 QCString classTNames;
2308 QCString type;
2309 QCString name;
2310 QCString args;
2311 QCString funcTNames;
2312 msg("-----------------------------------------\n");
2313 parseFuncDecl(s,className,classTNames,type,name,args,funcTNames);
2314 msg("type=`%s' class=`%s' classTempl=`%s' name=`%s' "
2315 "funcTemplateNames=`%s' args=`%s'\n",
2316 type.data(),className.data(),classTNames.data(),
2317 name.data(),funcTNames.data(),args.data()
2318);
2319}
2320
2321// some test code
2322int main()
2323{
2324 dumpDecl("A < T > :: Value * A < T > :: getValue < S > ( const A < T > & a )");
2325 dumpDecl("const A<T>::Value* A<T>::getValue<S>(const A<T>&a)");
2326 dumpDecl("func()");
2327 dumpDecl("friend void bla<>()");
2328 dumpDecl("name< T > :: operator () (int bla)");
2329 dumpDecl("name< T > :: operator << (int bla)");
2330 dumpDecl("name< T > :: operator << <> (int bla)");
2331 dumpDecl("className::func()");
2332 dumpDecl("void ( * Name < T > :: bla ) ( int, char * )");
2333}
2334#endif
2335
2336#if !defined(YY_FLEX_SUBMINOR_VERSION)
2337//----------------------------------------------------------------------------
2338extern "C" { // some bogus code to keep the compiler happy
2339 void declinfoYYdummy() { yy_flex_realloc(0,0); }
2340}
2341#endif
2342
2343
2344

Archive Download this file

Revision: 1322