Fix for UBSan build
[platform/upstream/doxygen.git] / src / declinfo.cpp
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>
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;
69 #else
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;
76 #endif /* ! C99 */
77
78 /* Limits of integral types. */
79 #ifndef INT8_MIN
80 #define INT8_MIN               (-128)
81 #endif
82 #ifndef INT16_MIN
83 #define INT16_MIN              (-32767-1)
84 #endif
85 #ifndef INT32_MIN
86 #define INT32_MIN              (-2147483647-1)
87 #endif
88 #ifndef INT8_MAX
89 #define INT8_MAX               (127)
90 #endif
91 #ifndef INT16_MAX
92 #define INT16_MAX              (32767)
93 #endif
94 #ifndef INT32_MAX
95 #define INT32_MAX              (2147483647)
96 #endif
97 #ifndef UINT8_MAX
98 #define UINT8_MAX              (255U)
99 #endif
100 #ifndef UINT16_MAX
101 #define UINT16_MAX             (65535U)
102 #endif
103 #ifndef UINT32_MAX
104 #define UINT32_MAX             (4294967295U)
105 #endif
106
107 #endif /* ! FLEXINT_H */
108
109 #ifdef __cplusplus
110
111 /* The "const" storage-class-modifier is valid. */
112 #define YY_USE_CONST
113
114 #else   /* ! __cplusplus */
115
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
118
119 #define YY_USE_CONST
120
121 #endif  /* defined (__STDC__) */
122 #endif  /* ! __cplusplus */
123
124 #ifdef YY_USE_CONST
125 #define yyconst const
126 #else
127 #define yyconst
128 #endif
129
130 /* Returned upon end-of-file. */
131 #define YY_NULL 0
132
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
136  * double cast.
137  */
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
139
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.
143  */
144 #define BEGIN (yy_start) = 1 + 2 *
145
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
148  * compatibility.
149  */
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
152
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE declinfoYYrestart(declinfoYYin  )
158
159 #define YY_END_OF_BUFFER_CHAR 0
160
161 /* Size of default input buffer. */
162 #ifndef YY_BUF_SIZE
163 #define YY_BUF_SIZE 262144
164 #endif
165
166 /* The state buf must be large enough to hold one state per character in the main buffer.
167  */
168 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
172 typedef struct yy_buffer_state *YY_BUFFER_STATE;
173 #endif
174
175 #ifndef YY_TYPEDEF_YY_SIZE_T
176 #define YY_TYPEDEF_YY_SIZE_T
177 typedef size_t yy_size_t;
178 #endif
179
180 extern yy_size_t declinfoYYleng;
181
182 extern FILE *declinfoYYin, *declinfoYYout;
183
184 #define EOB_ACT_CONTINUE_SCAN 0
185 #define EOB_ACT_END_OF_FILE 1
186 #define EOB_ACT_LAST_MATCH 2
187
188     #define YY_LESS_LINENO(n)
189     
190 /* Return all but the first "n" matched characters back to the input stream. */
191 #define yyless(n) \
192         do \
193                 { \
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 */ \
201                 } \
202         while ( 0 )
203
204 #define unput(c) yyunput( c, (yytext_ptr)  )
205
206 #ifndef YY_STRUCT_YY_BUFFER_STATE
207 #define YY_STRUCT_YY_BUFFER_STATE
208 struct yy_buffer_state
209         {
210         FILE *yy_input_file;
211
212         char *yy_ch_buf;                /* input buffer */
213         char *yy_buf_pos;               /* current position in input buffer */
214
215         /* Size of input buffer in bytes, not including room for EOB
216          * characters.
217          */
218         yy_size_t yy_buf_size;
219
220         /* Number of characters read into yy_ch_buf, not including EOB
221          * characters.
222          */
223         yy_size_t yy_n_chars;
224
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
227          * delete it.
228          */
229         int yy_is_our_buffer;
230
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
234          * each newline.
235          */
236         int yy_is_interactive;
237
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
240          * not.
241          */
242         int yy_at_bol;
243
244     int yy_bs_lineno; /**< The line count. */
245     int yy_bs_column; /**< The column count. */
246     
247         /* Whether to try to fill the input buffer when we reach the
248          * end of it.
249          */
250         int yy_fill_buffer;
251
252         int yy_buffer_status;
253
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.
261          *
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.
265          */
266 #define YY_BUFFER_EOF_PENDING 2
267
268         };
269 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
270
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. */
275
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
278  * "scanner state".
279  *
280  * Returns the top of the stack, or NULL.
281  */
282 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
283                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
284                           : NULL)
285
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.
288  */
289 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
290
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;
295
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 */
300
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 ...
303  */
304 static int yy_did_buffer_switch_on_eof;
305
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 );
313
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  );
317
318 #define YY_FLUSH_BUFFER declinfoYY_flush_buffer(YY_CURRENT_BUFFER )
319
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  );
323
324 void *declinfoYYalloc (yy_size_t  );
325 void *declinfoYYrealloc (void *,yy_size_t  );
326 void declinfoYYfree (void *  );
327
328 #define yy_new_buffer declinfoYY_create_buffer
329
330 #define yy_set_interactive(is_interactive) \
331         { \
332         if ( ! YY_CURRENT_BUFFER ){ \
333         declinfoYYensure_buffer_stack (); \
334                 YY_CURRENT_BUFFER_LVALUE =    \
335             declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE ); \
336         } \
337         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
338         }
339
340 #define yy_set_bol(at_bol) \
341         { \
342         if ( ! YY_CURRENT_BUFFER ){\
343         declinfoYYensure_buffer_stack (); \
344                 YY_CURRENT_BUFFER_LVALUE =    \
345             declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE ); \
346         } \
347         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
348         }
349
350 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
351
352 /* Begin user sect3 */
353
354 #define declinfoYYwrap(n) 1
355 #define YY_SKIP_YYWRAP
356
357 typedef unsigned char YY_CHAR;
358
359 FILE *declinfoYYin = (FILE *) 0, *declinfoYYout = (FILE *) 0;
360
361 typedef int yy_state_type;
362
363 extern int declinfoYYlineno;
364
365 int declinfoYYlineno = 1;
366
367 extern char *declinfoYYtext;
368 #define yytext_ptr declinfoYYtext
369
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[]  );
374
375 /* Done after the current pattern has been matched and before the
376  * corresponding action - sets up declinfoYYtext.
377  */
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; \
382         *yy_cp = '\0'; \
383         (yy_c_buf_p) = yy_cp;
384
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. */
389 struct yy_trans_info
390         {
391         flex_int32_t yy_verify;
392         flex_int32_t yy_nxt;
393         };
394 static yyconst flex_int16_t yy_acclist[121] =
395     {   0,
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,
406
407      8195,16387,   19,    2, 8195,16387, 8195,16387,   18, 8195,
408     16387,   21, 8195,16387,    8,    1, 8195,16387,    1, 8195
409     } ;
410
411 static yyconst flex_int16_t yy_accept[140] =
412     {   0,
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,
423
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
428     } ;
429
430 static yyconst flex_int32_t yy_ec[256] =
431     {   0,
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,
442
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,
453
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,
459        14,   14,   14,   14,   14
460     } ;
461
462 static yyconst flex_int32_t yy_meta[31] =
463     {   0,
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
467     } ;
468
469 static yyconst flex_int16_t yy_base[153] =
470     {   0,
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,
481
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,
487       323,  331
488     } ;
489
490 static yyconst flex_int16_t yy_def[153] =
491     {   0,
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,
502
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,
508       138,  138
509     } ;
510
511 static yyconst flex_int16_t yy_nxt[377] =
512     {   0,
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,
523
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,
534
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,
545
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
554     } ;
555
556 static yyconst flex_int16_t yy_chk[377] =
557     {   0,
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,
568
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,
579
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,
590
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
599     } ;
600
601 extern int declinfoYY_flex_debug;
602 int declinfoYY_flex_debug = 0;
603
604 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
605 static char *yy_full_match;
606 static int yy_lp;
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
612 #define REJECT \
613 { \
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 */ \
619 ++(yy_lp); \
620 goto find_rule; \
621 }
622
623 #define yymore() yymore_used_but_not_detected
624 #define YY_MORE_ADJ 0
625 #define YY_RESTORE_YY_MORE_OFFSET
626 char *declinfoYYtext;
627 #line 1 "declinfo.l"
628 /******************************************************************************
629  *
630  * $Id: declinfo.l,v 1.26 2001/03/19 19:27:40 root Exp $
631  *
632  * Copyright (C) 1997-2012 by Dimitri van Heesch.
633  *
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.
639  *
640  * Documents produced by Doxygen are derivative works derived from the
641  * input used in their production; they are not affected by this license.
642  *
643  */
644 #line 19 "declinfo.l"
645
646 /*
647  *      includes
648  */
649 #include <stdio.h>
650 //#include <iostream.h>
651 #include <assert.h>
652 #include <ctype.h>
653
654 #include "declinfo.h"
655 #include "util.h"
656 #include "message.h"
657
658 #define YY_NO_INPUT 1
659   
660 /* -----------------------------------------------------------------
661  *
662  *      statics
663  */
664   
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;
680
681 static void addType()
682 {
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+"::";
688   type+=name;
689   scope.resize(0);
690   name.resize(0);
691 }
692   
693 static void addTypeName()
694 {
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
699   {
700     return;
701   }
702   if (!type.isEmpty()) type+=' ';
703   type+=name;
704   name.resize(0);
705 }
706   
707 #define YY_NEVER_INTERACTIVE 1
708   
709 /* -----------------------------------------------------------------
710  */
711 #undef  YY_INPUT
712 #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
713
714 static int yyread(char *buf,int max_size)
715 {
716     int c=0;
717     while( c < max_size && inputString[inputPosition] )
718     {
719         *buf = inputString[inputPosition++] ;
720         c++; buf++;
721     }
722     return c;
723 }
724
725
726
727
728
729
730
731
732
733
734 #line 735 "<stdout>"
735
736 #define INITIAL 0
737 #define Start 1
738 #define Template 2
739 #define ReadArgs 3
740 #define Operator 4
741 #define FuncPtr 5
742 #define EndTemplate 6
743 #define StripTempArgs 7
744 #define SkipSharp 8
745 #define ReadExceptions 9
746
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.
751  */
752 #include <unistd.h>
753 #endif
754
755 #ifndef YY_EXTRA_TYPE
756 #define YY_EXTRA_TYPE void *
757 #endif
758
759 static int yy_init_globals (void );
760
761 /* Accessor methods to globals.
762    These are made visible to non-reentrant scanners for convenience. */
763
764 int declinfoYYlex_destroy (void );
765
766 int declinfoYYget_debug (void );
767
768 void declinfoYYset_debug (int debug_flag  );
769
770 YY_EXTRA_TYPE declinfoYYget_extra (void );
771
772 void declinfoYYset_extra (YY_EXTRA_TYPE user_defined  );
773
774 FILE *declinfoYYget_in (void );
775
776 void declinfoYYset_in  (FILE * in_str  );
777
778 FILE *declinfoYYget_out (void );
779
780 void declinfoYYset_out  (FILE * out_str  );
781
782 yy_size_t declinfoYYget_leng (void );
783
784 char *declinfoYYget_text (void );
785
786 int declinfoYYget_lineno (void );
787
788 void declinfoYYset_lineno (int line_number  );
789
790 /* Macros after this point can all be overridden by user definitions in
791  * section 1.
792  */
793
794 #ifndef YY_SKIP_YYWRAP
795 #ifdef __cplusplus
796 extern "C" int declinfoYYwrap (void );
797 #else
798 extern int declinfoYYwrap (void );
799 #endif
800 #endif
801
802 #ifndef yytext_ptr
803 static void yy_flex_strncpy (char *,yyconst char *,int );
804 #endif
805
806 #ifdef YY_NEED_STRLEN
807 static int yy_flex_strlen (yyconst char * );
808 #endif
809
810 #ifndef YY_NO_INPUT
811
812 #ifdef __cplusplus
813 static int yyinput (void );
814 #else
815 static int input (void );
816 #endif
817
818 #endif
819
820 /* Amount of stuff to slurp up with each read. */
821 #ifndef YY_READ_BUF_SIZE
822 #define YY_READ_BUF_SIZE 262144
823 #endif
824
825 /* Copy whatever the last rule matched to the standard output. */
826 #ifndef ECHO
827 /* This used to be an fputs(), but since the string might contain NUL's,
828  * we now use fwrite().
829  */
830 #define ECHO fwrite( declinfoYYtext, declinfoYYleng, 1, declinfoYYout )
831 #endif
832
833 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
834  * is returned in "result".
835  */
836 #ifndef YY_INPUT
837 #define YY_INPUT(buf,result,max_size) \
838         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
839                 { \
840                 int c = '*'; \
841                 yy_size_t n; \
842                 for ( n = 0; n < max_size && \
843                              (c = getc( declinfoYYin )) != EOF && c != '\n'; ++n ) \
844                         buf[n] = (char) c; \
845                 if ( c == '\n' ) \
846                         buf[n++] = (char) c; \
847                 if ( c == EOF && ferror( declinfoYYin ) ) \
848                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
849                 result = n; \
850                 } \
851         else \
852                 { \
853                 errno=0; \
854                 while ( (result = fread(buf, 1, max_size, declinfoYYin))==0 && ferror(declinfoYYin)) \
855                         { \
856                         if( errno != EINTR) \
857                                 { \
858                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
859                                 break; \
860                                 } \
861                         errno=0; \
862                         clearerr(declinfoYYin); \
863                         } \
864                 }\
865 \
866
867 #endif
868
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.
872  */
873 #ifndef yyterminate
874 #define yyterminate() return YY_NULL
875 #endif
876
877 /* Number of entries by which start-condition stack grows. */
878 #ifndef YY_START_STACK_INCR
879 #define YY_START_STACK_INCR 25
880 #endif
881
882 /* Report a fatal error. */
883 #ifndef YY_FATAL_ERROR
884 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
885 #endif
886
887 /* end tables serialization structures and prototypes */
888
889 /* Default declaration of generated scanner - a define so the user can
890  * easily add parameters.
891  */
892 #ifndef YY_DECL
893 #define YY_DECL_IS_OURS 1
894
895 extern int declinfoYYlex (void);
896
897 #define YY_DECL int declinfoYYlex (void)
898 #endif /* !YY_DECL */
899
900 /* Code executed at the beginning of each rule, after declinfoYYtext and declinfoYYleng
901  * have been set up.
902  */
903 #ifndef YY_USER_ACTION
904 #define YY_USER_ACTION
905 #endif
906
907 /* Code executed at the end of each rule. */
908 #ifndef YY_BREAK
909 #define YY_BREAK break;
910 #endif
911
912 #define YY_RULE_SETUP \
913         YY_USER_ACTION
914
915 /** The main scanner function which does all the work.
916  */
917 YY_DECL
918 {
919         register yy_state_type yy_current_state;
920         register char *yy_cp, *yy_bp;
921         register int yy_act;
922     
923 #line 117 "declinfo.l"
924
925
926 #line 927 "<stdout>"
927
928         if ( !(yy_init) )
929                 {
930                 (yy_init) = 1;
931
932 #ifdef YY_USER_INIT
933                 YY_USER_INIT;
934 #endif
935
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()" );
941
942                 if ( ! (yy_start) )
943                         (yy_start) = 1; /* first start state */
944
945                 if ( ! declinfoYYin )
946                         declinfoYYin = stdin;
947
948                 if ( ! declinfoYYout )
949                         declinfoYYout = stdout;
950
951                 if ( ! YY_CURRENT_BUFFER ) {
952                         declinfoYYensure_buffer_stack ();
953                         YY_CURRENT_BUFFER_LVALUE =
954                                 declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE );
955                 }
956
957                 declinfoYY_load_buffer_state( );
958                 }
959
960         while ( 1 )             /* loops until end-of-file is reached */
961                 {
962                 yy_cp = (yy_c_buf_p);
963
964                 /* Support of declinfoYYtext. */
965                 *yy_cp = (yy_hold_char);
966
967                 /* yy_bp points to the position in yy_ch_buf of the start of
968                  * the current run.
969                  */
970                 yy_bp = yy_cp;
971
972                 yy_current_state = (yy_start);
973
974                 (yy_state_ptr) = (yy_state_buf);
975                 *(yy_state_ptr)++ = yy_current_state;
976
977 yy_match:
978                 do
979                         {
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 )
982                                 {
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];
986                                 }
987                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
988                         *(yy_state_ptr)++ = yy_current_state;
989                         ++yy_cp;
990                         }
991                 while ( yy_base[yy_current_state] != 346 );
992
993 yy_find_action:
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 */
999                         {
1000                         if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1001                                 {
1002                                 yy_act = yy_acclist[(yy_lp)];
1003                                 if ( yy_act & YY_TRAILING_HEAD_MASK ||
1004                                      (yy_looking_for_trail_begin) )
1005                                         {
1006                                         if ( yy_act == (yy_looking_for_trail_begin) )
1007                                                 {
1008                                                 (yy_looking_for_trail_begin) = 0;
1009                                                 yy_act &= ~YY_TRAILING_HEAD_MASK;
1010                                                 break;
1011                                                 }
1012                                         }
1013                                 else if ( yy_act & YY_TRAILING_MASK )
1014                                         {
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);
1020                                         }
1021                                 else
1022                                         {
1023                                         (yy_full_match) = yy_cp;
1024                                         (yy_full_state) = (yy_state_ptr);
1025                                         (yy_full_lp) = (yy_lp);
1026                                         break;
1027                                         }
1028                                 ++(yy_lp);
1029                                 goto find_rule;
1030                                 }
1031                         --yy_cp;
1032                         yy_current_state = *--(yy_state_ptr);
1033                         (yy_lp) = yy_accept[yy_current_state];
1034                         }
1035
1036                 YY_DO_BEFORE_ACTION;
1037
1038 do_action:      /* This label is used only to access EOF actions. */
1039
1040                 switch ( yy_act )
1041         { /* beginning of action switch */
1042 case 1:
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 */
1046 YY_RULE_SETUP
1047 #line 119 "declinfo.l"
1048 { // operator rule must be before {ID} rule
1049                                   name += declinfoYYtext;
1050                                   BEGIN(Operator);
1051                                 }
1052         YY_BREAK
1053 case 2:
1054 YY_RULE_SETUP
1055 #line 123 "declinfo.l"
1056 { // Objective-C class categories
1057                                   if (!insideObjC) 
1058                                   {
1059                                     REJECT;
1060                                   }
1061                                   else 
1062                                   {
1063                                     name += declinfoYYtext;
1064                                   }
1065                                 }
1066         YY_BREAK
1067 case 3:
1068 YY_RULE_SETUP
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)
1075                                   addTypeName();
1076                                   name += declinfoYYtext;
1077                                 }
1078         YY_BREAK
1079 case 4:
1080 YY_RULE_SETUP
1081 #line 141 "declinfo.l"
1082 { // found a scope specifier
1083                                   if (!scope.isEmpty())
1084                                   {
1085                                     scope+="::"+name; // add name to scope
1086                                   }
1087                                   else
1088                                   {
1089                                     scope = name.copy(); // scope becomes name
1090                                   }
1091                                   name.resize(0);
1092                                 }
1093         YY_BREAK
1094 case 5:
1095 YY_RULE_SETUP
1096 #line 152 "declinfo.l"
1097 { // Objective-C argument separator
1098                                   name+=declinfoYYtext;
1099                                 }
1100         YY_BREAK
1101 case 6:
1102 YY_RULE_SETUP
1103 #line 155 "declinfo.l"
1104 {
1105                                   addType();
1106                                   type+=declinfoYYtext;
1107                                 }
1108         YY_BREAK
1109 case 7:
1110 YY_RULE_SETUP
1111 #line 159 "declinfo.l"
1112 {
1113                                   addType();
1114                                 }
1115         YY_BREAK
1116 case 8:
1117 YY_RULE_SETUP
1118 #line 162 "declinfo.l"
1119 {
1120                                   addType();
1121                                   QCString text=declinfoYYtext;
1122                                   type+=text.stripWhiteSpace();
1123                                 }
1124         YY_BREAK
1125 case 9:
1126 YY_RULE_SETUP
1127 #line 167 "declinfo.l"
1128 {
1129                                   type+=")";
1130                                 }
1131         YY_BREAK
1132 case 10:
1133 YY_RULE_SETUP
1134 #line 170 "declinfo.l"
1135 { // TODO: function pointers
1136                                   args+="(";
1137                                   BEGIN(ReadArgs);
1138                                 }
1139         YY_BREAK
1140 case 11:
1141 YY_RULE_SETUP
1142 #line 174 "declinfo.l"
1143 {
1144                                   args+="[";
1145                                   BEGIN(ReadArgs);
1146                                 }
1147         YY_BREAK
1148 case 12:
1149 YY_RULE_SETUP
1150 #line 178 "declinfo.l"
1151 {
1152                                   name+="<";
1153                                   sharpCount=0;
1154                                   BEGIN(Template);
1155                                 }
1156         YY_BREAK
1157 case 13:
1158 YY_RULE_SETUP
1159 #line 183 "declinfo.l"
1160 { name+="<<"; }
1161         YY_BREAK
1162 case 14:
1163 YY_RULE_SETUP
1164 #line 184 "declinfo.l"
1165 { name+=">>"; }
1166         YY_BREAK
1167 case 15:
1168 YY_RULE_SETUP
1169 #line 185 "declinfo.l"
1170 {
1171                                   name+="<";
1172                                   sharpCount++;
1173                                 }
1174         YY_BREAK
1175 case 16:
1176 YY_RULE_SETUP
1177 #line 189 "declinfo.l"
1178 {
1179                                   name+=">";
1180                                   if (sharpCount)
1181                                     --sharpCount;
1182                                   else
1183                                   {
1184                                     BEGIN(Start);
1185                                   }
1186                                 }
1187         YY_BREAK
1188 case 17:
1189 YY_RULE_SETUP
1190 #line 198 "declinfo.l"
1191 {
1192                                   name+=*declinfoYYtext;
1193                                 }
1194         YY_BREAK
1195 case 18:
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 */
1199 YY_RULE_SETUP
1200 #line 201 "declinfo.l"
1201 {
1202                                   name+="() <>";
1203                                   BEGIN(ReadArgs);
1204                                 }
1205         YY_BREAK
1206 case 19:
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 */
1210 YY_RULE_SETUP
1211 #line 205 "declinfo.l"
1212 {
1213                                   name+="()";
1214                                   BEGIN(ReadArgs);
1215                                 }
1216         YY_BREAK
1217 case 20:
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 */
1222 YY_RULE_SETUP
1223 #line 209 "declinfo.l"
1224 {
1225                                   name+=declinfoYYtext;
1226                                   BEGIN(ReadArgs);
1227                                 }
1228         YY_BREAK
1229 case 21:
1230 YY_RULE_SETUP
1231 #line 213 "declinfo.l"
1232 {
1233                                   exceptionString="throw(";
1234                                   BEGIN(ReadExceptions);
1235                                 }
1236         YY_BREAK
1237 case 22:
1238 YY_RULE_SETUP
1239 #line 217 "declinfo.l"
1240 {
1241                                   args+=*declinfoYYtext;
1242                                 }
1243         YY_BREAK
1244 case 23:
1245 YY_RULE_SETUP
1246 #line 220 "declinfo.l"
1247 {
1248                                   exceptionString+=*declinfoYYtext;
1249                                 }
1250         YY_BREAK
1251 case 24:
1252 YY_RULE_SETUP
1253 #line 223 "declinfo.l"
1254
1255         YY_BREAK
1256 case 25:
1257 /* rule 25 can match eol */
1258 YY_RULE_SETUP
1259 #line 224 "declinfo.l"
1260
1261         YY_BREAK
1262 case 26:
1263 YY_RULE_SETUP
1264 #line 226 "declinfo.l"
1265 ECHO;
1266         YY_BREAK
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):
1278                                 yyterminate();
1279
1280         case YY_END_OF_BUFFER:
1281                 {
1282                 /* Amount of text matched not including the EOB char. */
1283                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1284
1285                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1286                 *yy_cp = (yy_hold_char);
1287                 YY_RESTORE_YY_MORE_OFFSET
1288
1289                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1290                         {
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.
1299                          */
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;
1303                         }
1304
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
1310                  * in input().
1311                  */
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;
1315
1316                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1317
1318                         yy_current_state = yy_get_previous_state(  );
1319
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).
1327                          */
1328
1329                         yy_next_state = yy_try_NUL_trans( yy_current_state );
1330
1331                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1332
1333                         if ( yy_next_state )
1334                                 {
1335                                 /* Consume the NUL. */
1336                                 yy_cp = ++(yy_c_buf_p);
1337                                 yy_current_state = yy_next_state;
1338                                 goto yy_match;
1339                                 }
1340
1341                         else
1342                                 {
1343                                 yy_cp = (yy_c_buf_p);
1344                                 goto yy_find_action;
1345                                 }
1346                         }
1347
1348                 else switch ( yy_get_next_buffer(  ) )
1349                         {
1350                         case EOB_ACT_END_OF_FILE:
1351                                 {
1352                                 (yy_did_buffer_switch_on_eof) = 0;
1353
1354                                 if ( declinfoYYwrap( ) )
1355                                         {
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.
1364                                          */
1365                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1366
1367                                         yy_act = YY_STATE_EOF(YY_START);
1368                                         goto do_action;
1369                                         }
1370
1371                                 else
1372                                         {
1373                                         if ( ! (yy_did_buffer_switch_on_eof) )
1374                                                 YY_NEW_FILE;
1375                                         }
1376                                 break;
1377                                 }
1378
1379                         case EOB_ACT_CONTINUE_SCAN:
1380                                 (yy_c_buf_p) =
1381                                         (yytext_ptr) + yy_amount_of_matched_text;
1382
1383                                 yy_current_state = yy_get_previous_state(  );
1384
1385                                 yy_cp = (yy_c_buf_p);
1386                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1387                                 goto yy_match;
1388
1389                         case EOB_ACT_LAST_MATCH:
1390                                 (yy_c_buf_p) =
1391                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1392
1393                                 yy_current_state = yy_get_previous_state(  );
1394
1395                                 yy_cp = (yy_c_buf_p);
1396                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1397                                 goto yy_find_action;
1398                         }
1399                 break;
1400                 }
1401
1402         default:
1403                 YY_FATAL_ERROR(
1404                         "fatal flex scanner internal error--no action found" );
1405         } /* end of action switch */
1406                 } /* end of scanning one token */
1407 } /* end of declinfoYYlex */
1408
1409 /* yy_get_next_buffer - try to read in a new buffer
1410  *
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
1415  */
1416 static int yy_get_next_buffer (void)
1417 {
1418         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1419         register char *source = (yytext_ptr);
1420         register int number_to_move, i;
1421         int ret_val;
1422
1423         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1424                 YY_FATAL_ERROR(
1425                 "fatal flex scanner internal error--end of buffer missed" );
1426
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 )
1430                         {
1431                         /* We matched a single character, the EOB, so
1432                          * treat this as a final EOF.
1433                          */
1434                         return EOB_ACT_END_OF_FILE;
1435                         }
1436
1437                 else
1438                         {
1439                         /* We matched some text prior to the EOB, first
1440                          * process it.
1441                          */
1442                         return EOB_ACT_LAST_MATCH;
1443                         }
1444                 }
1445
1446         /* Try to read more data. */
1447
1448         /* First move last chars to start of buffer. */
1449         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1450
1451         for ( i = 0; i < number_to_move; ++i )
1452                 *(dest++) = *(source++);
1453
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,
1456                  * just force an EOF
1457                  */
1458                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1459
1460         else
1461                 {
1462                         yy_size_t num_to_read =
1463                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1464
1465                 while ( num_to_read <= 0 )
1466                         { /* Not enough room in the buffer - grow it. */
1467
1468                         YY_FATAL_ERROR(
1469 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1470
1471                         }
1472
1473                 if ( num_to_read > YY_READ_BUF_SIZE )
1474                         num_to_read = YY_READ_BUF_SIZE;
1475
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 );
1479
1480                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1481                 }
1482
1483         if ( (yy_n_chars) == 0 )
1484                 {
1485                 if ( number_to_move == YY_MORE_ADJ )
1486                         {
1487                         ret_val = EOB_ACT_END_OF_FILE;
1488                         declinfoYYrestart(declinfoYYin  );
1489                         }
1490
1491                 else
1492                         {
1493                         ret_val = EOB_ACT_LAST_MATCH;
1494                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1495                                 YY_BUFFER_EOF_PENDING;
1496                         }
1497                 }
1498
1499         else
1500                 ret_val = EOB_ACT_CONTINUE_SCAN;
1501
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()" );
1508         }
1509
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;
1513
1514         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1515
1516         return ret_val;
1517 }
1518
1519 /* yy_get_previous_state - get the state just before the EOB char was reached */
1520
1521     static yy_state_type yy_get_previous_state (void)
1522 {
1523         register yy_state_type yy_current_state;
1524         register char *yy_cp;
1525     
1526         yy_current_state = (yy_start);
1527
1528         (yy_state_ptr) = (yy_state_buf);
1529         *(yy_state_ptr)++ = yy_current_state;
1530
1531         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1532                 {
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 )
1535                         {
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];
1539                         }
1540                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1541                 *(yy_state_ptr)++ = yy_current_state;
1542                 }
1543
1544         return yy_current_state;
1545 }
1546
1547 /* yy_try_NUL_trans - try to make a transition on the NUL character
1548  *
1549  * synopsis
1550  *      next_state = yy_try_NUL_trans( current_state );
1551  */
1552     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1553 {
1554         register int yy_is_jam;
1555     
1556         register YY_CHAR yy_c = 1;
1557         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1558                 {
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];
1562                 }
1563         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1564         yy_is_jam = (yy_current_state == 138);
1565         if ( ! yy_is_jam )
1566                 *(yy_state_ptr)++ = yy_current_state;
1567
1568         return yy_is_jam ? 0 : yy_current_state;
1569 }
1570
1571 #ifndef YY_NO_INPUT
1572 #ifdef __cplusplus
1573     static int yyinput (void)
1574 #else
1575     static int input  (void)
1576 #endif
1577
1578 {
1579         int c;
1580     
1581         *(yy_c_buf_p) = (yy_hold_char);
1582
1583         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1584                 {
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.
1588                  */
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';
1592
1593                 else
1594                         { /* need more input */
1595                         yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1596                         ++(yy_c_buf_p);
1597
1598                         switch ( yy_get_next_buffer(  ) )
1599                                 {
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.
1609                                          */
1610
1611                                         /* Reset buffer status. */
1612                                         declinfoYYrestart(declinfoYYin );
1613
1614                                         /*FALLTHROUGH*/
1615
1616                                 case EOB_ACT_END_OF_FILE:
1617                                         {
1618                                         if ( declinfoYYwrap( ) )
1619                                                 return 0;
1620
1621                                         if ( ! (yy_did_buffer_switch_on_eof) )
1622                                                 YY_NEW_FILE;
1623 #ifdef __cplusplus
1624                                         return yyinput();
1625 #else
1626                                         return input();
1627 #endif
1628                                         }
1629
1630                                 case EOB_ACT_CONTINUE_SCAN:
1631                                         (yy_c_buf_p) = (yytext_ptr) + offset;
1632                                         break;
1633                                 }
1634                         }
1635                 }
1636
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);
1640
1641         return c;
1642 }
1643 #endif  /* ifndef YY_NO_INPUT */
1644
1645 /** Immediately switch to a different input stream.
1646  * @param input_file A readable stream.
1647  * 
1648  * @note This function does not reset the start condition to @c INITIAL .
1649  */
1650     void declinfoYYrestart  (FILE * input_file )
1651 {
1652     
1653         if ( ! YY_CURRENT_BUFFER ){
1654         declinfoYYensure_buffer_stack ();
1655                 YY_CURRENT_BUFFER_LVALUE =
1656             declinfoYY_create_buffer(declinfoYYin,YY_BUF_SIZE );
1657         }
1658
1659         declinfoYY_init_buffer(YY_CURRENT_BUFFER,input_file );
1660         declinfoYY_load_buffer_state( );
1661 }
1662
1663 /** Switch to a different input buffer.
1664  * @param new_buffer The new input buffer.
1665  * 
1666  */
1667     void declinfoYY_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1668 {
1669     
1670         /* TODO. We should be able to replace this entire function body
1671          * with
1672          *              declinfoYYpop_buffer_state();
1673          *              declinfoYYpush_buffer_state(new_buffer);
1674      */
1675         declinfoYYensure_buffer_stack ();
1676         if ( YY_CURRENT_BUFFER == new_buffer )
1677                 return;
1678
1679         if ( YY_CURRENT_BUFFER )
1680                 {
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);
1685                 }
1686
1687         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1688         declinfoYY_load_buffer_state( );
1689
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.
1694          */
1695         (yy_did_buffer_switch_on_eof) = 1;
1696 }
1697
1698 static void declinfoYY_load_buffer_state  (void)
1699 {
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);
1704 }
1705
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.
1709  * 
1710  * @return the allocated buffer state.
1711  */
1712     YY_BUFFER_STATE declinfoYY_create_buffer  (FILE * file, int  size )
1713 {
1714         YY_BUFFER_STATE b;
1715     
1716         b = (YY_BUFFER_STATE) declinfoYYalloc(sizeof( struct yy_buffer_state )  );
1717         if ( ! b )
1718                 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_create_buffer()" );
1719
1720         b->yy_buf_size = size;
1721
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.
1724          */
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()" );
1728
1729         b->yy_is_our_buffer = 1;
1730
1731         declinfoYY_init_buffer(b,file );
1732
1733         return b;
1734 }
1735
1736 /** Destroy the buffer.
1737  * @param b a buffer created with declinfoYY_create_buffer()
1738  * 
1739  */
1740     void declinfoYY_delete_buffer (YY_BUFFER_STATE  b )
1741 {
1742     
1743         if ( ! b )
1744                 return;
1745
1746         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1747                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1748
1749         if ( b->yy_is_our_buffer )
1750                 declinfoYYfree((void *) b->yy_ch_buf  );
1751
1752         declinfoYYfree((void *) b  );
1753 }
1754
1755 #ifndef __cplusplus
1756 extern int isatty (int );
1757 #endif /* __cplusplus */
1758     
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.
1762  */
1763     static void declinfoYY_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1764
1765 {
1766         int oerrno = errno;
1767     
1768         declinfoYY_flush_buffer(b );
1769
1770         b->yy_input_file = file;
1771         b->yy_fill_buffer = 1;
1772
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.
1776      */
1777     if (b != YY_CURRENT_BUFFER){
1778         b->yy_bs_lineno = 1;
1779         b->yy_bs_column = 0;
1780     }
1781
1782         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1783     
1784         errno = oerrno;
1785 }
1786
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.
1789  * 
1790  */
1791     void declinfoYY_flush_buffer (YY_BUFFER_STATE  b )
1792 {
1793         if ( ! b )
1794                 return;
1795
1796         b->yy_n_chars = 0;
1797
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.
1801          */
1802         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1803         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1804
1805         b->yy_buf_pos = &b->yy_ch_buf[0];
1806
1807         b->yy_at_bol = 1;
1808         b->yy_buffer_status = YY_BUFFER_NEW;
1809
1810         if ( b == YY_CURRENT_BUFFER )
1811                 declinfoYY_load_buffer_state( );
1812 }
1813
1814 /** Pushes the new state onto the stack. The new state becomes
1815  *  the current state. This function will allocate the stack
1816  *  if necessary.
1817  *  @param new_buffer The new state.
1818  *  
1819  */
1820 void declinfoYYpush_buffer_state (YY_BUFFER_STATE new_buffer )
1821 {
1822         if (new_buffer == NULL)
1823                 return;
1824
1825         declinfoYYensure_buffer_stack();
1826
1827         /* This block is copied from declinfoYY_switch_to_buffer. */
1828         if ( YY_CURRENT_BUFFER )
1829                 {
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);
1834                 }
1835
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;
1840
1841         /* copied from declinfoYY_switch_to_buffer. */
1842         declinfoYY_load_buffer_state( );
1843         (yy_did_buffer_switch_on_eof) = 1;
1844 }
1845
1846 /** Removes and deletes the top of the stack, if present.
1847  *  The next element becomes the new top.
1848  *  
1849  */
1850 void declinfoYYpop_buffer_state (void)
1851 {
1852         if (!YY_CURRENT_BUFFER)
1853                 return;
1854
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);
1859
1860         if (YY_CURRENT_BUFFER) {
1861                 declinfoYY_load_buffer_state( );
1862                 (yy_did_buffer_switch_on_eof) = 1;
1863         }
1864 }
1865
1866 /* Allocates the stack if it does not exist.
1867  *  Guarantees space for at least one push.
1868  */
1869 static void declinfoYYensure_buffer_stack (void)
1870 {
1871         yy_size_t num_to_alloc;
1872     
1873         if (!(yy_buffer_stack)) {
1874
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.
1878          */
1879                 num_to_alloc = 1;
1880                 (yy_buffer_stack) = (struct yy_buffer_state**)declinfoYYalloc
1881                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
1882                                                                 );
1883                 if ( ! (yy_buffer_stack) )
1884                         YY_FATAL_ERROR( "out of dynamic memory in declinfoYYensure_buffer_stack()" );
1885                                                                   
1886                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1887                                 
1888                 (yy_buffer_stack_max) = num_to_alloc;
1889                 (yy_buffer_stack_top) = 0;
1890                 return;
1891         }
1892
1893         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1894
1895                 /* Increase the buffer to prepare for a possible push. */
1896                 int grow_size = 8 /* arbitrary grow size */;
1897
1898                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1899                 (yy_buffer_stack) = (struct yy_buffer_state**)declinfoYYrealloc
1900                                                                 ((yy_buffer_stack),
1901                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
1902                                                                 );
1903                 if ( ! (yy_buffer_stack) )
1904                         YY_FATAL_ERROR( "out of dynamic memory in declinfoYYensure_buffer_stack()" );
1905
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;
1909         }
1910 }
1911
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
1915  * 
1916  * @return the newly allocated buffer state object. 
1917  */
1918 YY_BUFFER_STATE declinfoYY_scan_buffer  (char * base, yy_size_t  size )
1919 {
1920         YY_BUFFER_STATE b;
1921     
1922         if ( size < 2 ||
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. */
1926                 return 0;
1927
1928         b = (YY_BUFFER_STATE) declinfoYYalloc(sizeof( struct yy_buffer_state )  );
1929         if ( ! b )
1930                 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_scan_buffer()" );
1931
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;
1938         b->yy_at_bol = 1;
1939         b->yy_fill_buffer = 0;
1940         b->yy_buffer_status = YY_BUFFER_NEW;
1941
1942         declinfoYY_switch_to_buffer(b  );
1943
1944         return b;
1945 }
1946
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
1950  * 
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.
1954  */
1955 YY_BUFFER_STATE declinfoYY_scan_string (yyconst char * yystr )
1956 {
1957     
1958         return declinfoYY_scan_bytes(yystr,strlen(yystr) );
1959 }
1960
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.
1965  * 
1966  * @return the newly allocated buffer state object.
1967  */
1968 YY_BUFFER_STATE declinfoYY_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
1969 {
1970         YY_BUFFER_STATE b;
1971         char *buf;
1972         yy_size_t n, i;
1973     
1974         /* Get memory for full buffer, including space for trailing EOB's. */
1975         n = _yybytes_len + 2;
1976         buf = (char *) declinfoYYalloc(n  );
1977         if ( ! buf )
1978                 YY_FATAL_ERROR( "out of dynamic memory in declinfoYY_scan_bytes()" );
1979
1980         for ( i = 0; i < _yybytes_len; ++i )
1981                 buf[i] = yybytes[i];
1982
1983         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1984
1985         b = declinfoYY_scan_buffer(buf,n );
1986         if ( ! b )
1987                 YY_FATAL_ERROR( "bad buffer in declinfoYY_scan_bytes()" );
1988
1989         /* It's okay to grow etc. this buffer, and we should throw it
1990          * away when we're done.
1991          */
1992         b->yy_is_our_buffer = 1;
1993
1994         return b;
1995 }
1996
1997 #ifndef YY_EXIT_FAILURE
1998 #define YY_EXIT_FAILURE 2
1999 #endif
2000
2001 static void yy_fatal_error (yyconst char* msg )
2002 {
2003         (void) fprintf( stderr, "%s\n", msg );
2004         exit( YY_EXIT_FAILURE );
2005 }
2006
2007 /* Redefine yyless() so it works in section 3 code. */
2008
2009 #undef yyless
2010 #define yyless(n) \
2011         do \
2012                 { \
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; \
2021                 } \
2022         while ( 0 )
2023
2024 /* Accessor  methods (get/set functions) to struct members. */
2025
2026 /** Get the current line number.
2027  * 
2028  */
2029 int declinfoYYget_lineno  (void)
2030 {
2031         
2032     return declinfoYYlineno;
2033 }
2034
2035 /** Get the input stream.
2036  * 
2037  */
2038 FILE *declinfoYYget_in  (void)
2039 {
2040         return declinfoYYin;
2041 }
2042
2043 /** Get the output stream.
2044  * 
2045  */
2046 FILE *declinfoYYget_out  (void)
2047 {
2048         return declinfoYYout;
2049 }
2050
2051 /** Get the length of the current token.
2052  * 
2053  */
2054 yy_size_t declinfoYYget_leng  (void)
2055 {
2056         return declinfoYYleng;
2057 }
2058
2059 /** Get the current token.
2060  * 
2061  */
2062
2063 char *declinfoYYget_text  (void)
2064 {
2065         return declinfoYYtext;
2066 }
2067
2068 /** Set the current line number.
2069  * @param line_number
2070  * 
2071  */
2072 void declinfoYYset_lineno (int  line_number )
2073 {
2074     
2075     declinfoYYlineno = line_number;
2076 }
2077
2078 /** Set the input stream. This does not discard the current
2079  * input buffer.
2080  * @param in_str A readable stream.
2081  * 
2082  * @see declinfoYY_switch_to_buffer
2083  */
2084 void declinfoYYset_in (FILE *  in_str )
2085 {
2086         declinfoYYin = in_str ;
2087 }
2088
2089 void declinfoYYset_out (FILE *  out_str )
2090 {
2091         declinfoYYout = out_str ;
2092 }
2093
2094 int declinfoYYget_debug  (void)
2095 {
2096         return declinfoYY_flex_debug;
2097 }
2098
2099 void declinfoYYset_debug (int  bdebug )
2100 {
2101         declinfoYY_flex_debug = bdebug ;
2102 }
2103
2104 static int yy_init_globals (void)
2105 {
2106         /* Initialization is the same as for the non-reentrant scanner.
2107      * This function is called from declinfoYYlex_destroy(), so don't allocate here.
2108      */
2109
2110     (yy_buffer_stack) = 0;
2111     (yy_buffer_stack_top) = 0;
2112     (yy_buffer_stack_max) = 0;
2113     (yy_c_buf_p) = (char *) 0;
2114     (yy_init) = 0;
2115     (yy_start) = 0;
2116
2117     (yy_state_buf) = 0;
2118     (yy_state_ptr) = 0;
2119     (yy_full_match) = 0;
2120     (yy_lp) = 0;
2121
2122 /* Defined in main.c */
2123 #ifdef YY_STDINIT
2124     declinfoYYin = stdin;
2125     declinfoYYout = stdout;
2126 #else
2127     declinfoYYin = (FILE *) 0;
2128     declinfoYYout = (FILE *) 0;
2129 #endif
2130
2131     /* For future reference: Set errno on error, since we are called by
2132      * declinfoYYlex_init()
2133      */
2134     return 0;
2135 }
2136
2137 /* declinfoYYlex_destroy is for both reentrant and non-reentrant scanners. */
2138 int declinfoYYlex_destroy  (void)
2139 {
2140     
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();
2146         }
2147
2148         /* Destroy the stack itself. */
2149         declinfoYYfree((yy_buffer_stack) );
2150         (yy_buffer_stack) = NULL;
2151
2152     declinfoYYfree ( (yy_state_buf) );
2153     (yy_state_buf)  = NULL;
2154
2155     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2156      * declinfoYYlex() is called, initialization will occur. */
2157     yy_init_globals( );
2158
2159     return 0;
2160 }
2161
2162 /*
2163  * Internal utility routines.
2164  */
2165
2166 #ifndef yytext_ptr
2167 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2168 {
2169         register int i;
2170         for ( i = 0; i < n; ++i )
2171                 s1[i] = s2[i];
2172 }
2173 #endif
2174
2175 #ifdef YY_NEED_STRLEN
2176 static int yy_flex_strlen (yyconst char * s )
2177 {
2178         register int n;
2179         for ( n = 0; s[n]; ++n )
2180                 ;
2181
2182         return n;
2183 }
2184 #endif
2185
2186 void *declinfoYYalloc (yy_size_t  size )
2187 {
2188         return (void *) malloc( size );
2189 }
2190
2191 void *declinfoYYrealloc  (void * ptr, yy_size_t  size )
2192 {
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.
2199          */
2200         return (void *) realloc( (char *) ptr, size );
2201 }
2202
2203 void declinfoYYfree (void * ptr )
2204 {
2205         free( (char *) ptr );   /* see declinfoYYrealloc() for (char *) cast */
2206 }
2207
2208 #define YYTABLES_NAME "yytables"
2209
2210 #line 226 "declinfo.l"
2211
2212
2213
2214 /*@ ----------------------------------------------------------------------------
2215  */
2216
2217 void parseFuncDecl(const QCString &decl,bool objC,QCString &cl,QCString &t,
2218                    QCString &n,QCString &a,QCString &ftl,QCString &exc)
2219 {
2220   inputString   = decl;
2221   //printf("Input=`%s'\n",inputString);
2222   if (inputString==0) return;
2223   inputPosition      = 0;
2224   classTempListFound = FALSE;
2225   funcTempListFound  = FALSE;
2226   insideObjC = objC;
2227   scope.resize(0);
2228   className.resize(0);
2229   classTempList.resize(0);
2230   funcTempList.resize(0);
2231   name.resize(0);
2232   type.resize(0);
2233   args.resize(0);
2234   exceptionString.resize(0);
2235   // first we try to find the type, scope, name and arguments
2236   declinfoYYrestart( declinfoYYin );
2237   BEGIN( Start );
2238   declinfoYYlex();
2239
2240   //printf("type=`%s' class=`%s' name=`%s' args=`%s'\n",
2241   //        type.data(),scope.data(),name.data(),args.data());
2242
2243   int nb = name.findRev('[');
2244   if (nb!=-1 && args.isEmpty()) // correct for [] in name ambigity (due to Java return type allowing [])
2245   {
2246     args.prepend(name.right(name.length()-nb));
2247     name=name.left(nb);
2248   }
2249
2250 #if 0
2251   {
2252     int l=scope.length();
2253     int i=0;
2254     int skipCount=0;
2255     cl.resize(0);
2256     ctl.resize(0);
2257     for (i=0;i<l;i++)
2258     {
2259       char c=scope.at(i);
2260       if (c=='<') 
2261         skipCount++;
2262       else if (c=='>') 
2263         skipCount--;
2264       else if (skipCount==0) 
2265         cl+=c;
2266     }
2267   }
2268   cl=stripTemplateSpecifiersFromScope(removeRedundantWhiteSpace(scope),FALSE); 
2269   ctl.resize(0);
2270 #endif
2271
2272   cl=scope;
2273   n=removeRedundantWhiteSpace(name);
2274   int il,ir;
2275   if ((il=n.find('<'))!=-1 && (ir=n.findRev('>'))!=-1)
2276     // TODO: handle cases like where n="operator<< <T>" 
2277   {
2278     ftl=removeRedundantWhiteSpace(n.right(n.length()-il));
2279     n=n.left(il);
2280   }
2281   
2282   //ctl=classTempList.copy();
2283   //ftl=funcTempList.copy();
2284   t=removeRedundantWhiteSpace(type);
2285   a=removeRedundantWhiteSpace(args);
2286   exc=removeRedundantWhiteSpace(exceptionString);
2287   
2288   if (!t.isEmpty() && t.at(t.length()-1)==')') // for function pointers
2289   {
2290     a.prepend(")");
2291     t=t.left(t.length()-1);
2292   }
2293   //printf("type=`%s' class=`%s' name=`%s' args=`%s'\n",
2294   //        t.data(),cl.data(),n.data(),a.data());
2295
2296   return;
2297   
2298   
2299 }
2300
2301 //extern "C" { // some bogus code to keep the compiler happy
2302 //  int  declinfoYYwrap() { return 1 ; }
2303 //  void declinfoYYdummy() { yy_flex_realloc(0,0); } 
2304 //}
2305
2306 #if 0
2307 void dumpDecl(const char *s)
2308 {
2309   QCString className;
2310   QCString classTNames;
2311   QCString type;
2312   QCString name;
2313   QCString args;
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()
2321         );
2322 }
2323
2324 // some test code
2325 int main()
2326 {
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)");
2329   dumpDecl("func()");
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 * )"); 
2336 }
2337 #endif
2338
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); } 
2343 }
2344 #endif
2345
2346