Root/
Source at commit 1322 created 12 years 8 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 defargsYY_create_buffer␊ |
9 | #define yy_delete_buffer defargsYY_delete_buffer␊ |
10 | #define yy_flex_debug defargsYY_flex_debug␊ |
11 | #define yy_init_buffer defargsYY_init_buffer␊ |
12 | #define yy_flush_buffer defargsYY_flush_buffer␊ |
13 | #define yy_load_buffer_state defargsYY_load_buffer_state␊ |
14 | #define yy_switch_to_buffer defargsYY_switch_to_buffer␊ |
15 | #define yyin defargsYYin␊ |
16 | #define yyleng defargsYYleng␊ |
17 | #define yylex defargsYYlex␊ |
18 | #define yylineno defargsYYlineno␊ |
19 | #define yyout defargsYYout␊ |
20 | #define yyrestart defargsYYrestart␊ |
21 | #define yytext defargsYYtext␊ |
22 | #define yywrap defargsYYwrap␊ |
23 | #define yyalloc defargsYYalloc␊ |
24 | #define yyrealloc defargsYYrealloc␊ |
25 | #define yyfree defargsYYfree␊ |
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 | #else␊ |
69 | typedef signed char flex_int8_t;␊ |
70 | typedef short int flex_int16_t;␊ |
71 | typedef int flex_int32_t;␊ |
72 | typedef unsigned char flex_uint8_t; ␊ |
73 | typedef unsigned short int flex_uint16_t;␊ |
74 | typedef 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 defargsYYrestart(defargsYYin )␊ |
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␊ |
171 | typedef struct yy_buffer_state *YY_BUFFER_STATE;␊ |
172 | #endif␊ |
173 | ␊ |
174 | #ifndef YY_TYPEDEF_YY_SIZE_T␊ |
175 | #define YY_TYPEDEF_YY_SIZE_T␊ |
176 | typedef size_t yy_size_t;␊ |
177 | #endif␊ |
178 | ␊ |
179 | extern yy_size_t defargsYYleng;␊ |
180 | ␊ |
181 | extern FILE *defargsYYin, *defargsYYout;␊ |
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) \␊ |
191 | ␉do \␊ |
192 | ␉␉{ \␊ |
193 | ␉␉/* Undo effects of setting up defargsYYtext. */ \␊ |
194 | int yyless_macro_arg = (n); \␊ |
195 | YY_LESS_LINENO(yyless_macro_arg);\␊ |
196 | ␉␉*yy_cp = (yy_hold_char); \␊ |
197 | ␉␉YY_RESTORE_YY_MORE_OFFSET \␊ |
198 | ␉␉(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \␊ |
199 | ␉␉YY_DO_BEFORE_ACTION; /* set up defargsYYtext again */ \␊ |
200 | ␉␉} \␊ |
201 | ␉while ( 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␊ |
207 | struct yy_buffer_state␊ |
208 | ␉{␊ |
209 | ␉FILE *yy_input_file;␊ |
210 | ␊ |
211 | ␉char *yy_ch_buf;␉␉/* input buffer */␊ |
212 | ␉char *yy_buf_pos;␉␉/* current position in input buffer */␊ |
213 | ␊ |
214 | ␉/* Size of input buffer in bytes, not including room for EOB␊ |
215 | ␉ * characters.␊ |
216 | ␉ */␊ |
217 | ␉yy_size_t yy_buf_size;␊ |
218 | ␊ |
219 | ␉/* Number of characters read into yy_ch_buf, not including EOB␊ |
220 | ␉ * characters.␊ |
221 | ␉ */␊ |
222 | ␉yy_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 | ␉ */␊ |
228 | ␉int 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 | ␉ */␊ |
235 | ␉int 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 | ␉ */␊ |
241 | ␉int 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 | ␉ */␊ |
249 | ␉int yy_fill_buffer;␊ |
250 | ␊ |
251 | ␉int 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 defargsYYrestart()), so that the user can continue scanning by␊ |
263 | ␉ * just pointing defargsYYin 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. */␊ |
271 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */␊ |
272 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */␊ |
273 | static 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 defargsYYtext is formed. */␊ |
291 | static char yy_hold_char;␊ |
292 | static yy_size_t yy_n_chars;␉␉/* number of characters read into yy_ch_buf */␊ |
293 | yy_size_t defargsYYleng;␊ |
294 | ␊ |
295 | /* Points to current character in buffer. */␊ |
296 | static char *yy_c_buf_p = (char *) 0;␊ |
297 | static int yy_init = 0;␉␉/* whether we need to initialize */␊ |
298 | static int yy_start = 0;␉/* start state number */␊ |
299 | ␊ |
300 | /* Flag which is used to allow defargsYYwrap()'s to do buffer switches␊ |
301 | * instead of setting up a fresh defargsYYin. A bit of a hack ...␊ |
302 | */␊ |
303 | static int yy_did_buffer_switch_on_eof;␊ |
304 | ␊ |
305 | void defargsYYrestart (FILE *input_file );␊ |
306 | void defargsYY_switch_to_buffer (YY_BUFFER_STATE new_buffer );␊ |
307 | YY_BUFFER_STATE defargsYY_create_buffer (FILE *file,int size );␊ |
308 | void defargsYY_delete_buffer (YY_BUFFER_STATE b );␊ |
309 | void defargsYY_flush_buffer (YY_BUFFER_STATE b );␊ |
310 | void defargsYYpush_buffer_state (YY_BUFFER_STATE new_buffer );␊ |
311 | void defargsYYpop_buffer_state (void );␊ |
312 | ␊ |
313 | static void defargsYYensure_buffer_stack (void );␊ |
314 | static void defargsYY_load_buffer_state (void );␊ |
315 | static void defargsYY_init_buffer (YY_BUFFER_STATE b,FILE *file );␊ |
316 | ␊ |
317 | #define YY_FLUSH_BUFFER defargsYY_flush_buffer(YY_CURRENT_BUFFER )␊ |
318 | ␊ |
319 | YY_BUFFER_STATE defargsYY_scan_buffer (char *base,yy_size_t size );␊ |
320 | YY_BUFFER_STATE defargsYY_scan_string (yyconst char *yy_str );␊ |
321 | YY_BUFFER_STATE defargsYY_scan_bytes (yyconst char *bytes,yy_size_t len );␊ |
322 | ␊ |
323 | void *defargsYYalloc (yy_size_t );␊ |
324 | void *defargsYYrealloc (void *,yy_size_t );␊ |
325 | void defargsYYfree (void * );␊ |
326 | ␊ |
327 | #define yy_new_buffer defargsYY_create_buffer␊ |
328 | ␊ |
329 | #define yy_set_interactive(is_interactive) \␊ |
330 | ␉{ \␊ |
331 | ␉if ( ! YY_CURRENT_BUFFER ){ \␊ |
332 | defargsYYensure_buffer_stack (); \␊ |
333 | ␉␉YY_CURRENT_BUFFER_LVALUE = \␊ |
334 | defargsYY_create_buffer(defargsYYin,YY_BUF_SIZE ); \␊ |
335 | ␉} \␊ |
336 | ␉YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \␊ |
337 | ␉}␊ |
338 | ␊ |
339 | #define yy_set_bol(at_bol) \␊ |
340 | ␉{ \␊ |
341 | ␉if ( ! YY_CURRENT_BUFFER ){\␊ |
342 | defargsYYensure_buffer_stack (); \␊ |
343 | ␉␉YY_CURRENT_BUFFER_LVALUE = \␊ |
344 | defargsYY_create_buffer(defargsYYin,YY_BUF_SIZE ); \␊ |
345 | ␉} \␊ |
346 | ␉YY_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 defargsYYwrap(n) 1␊ |
354 | #define YY_SKIP_YYWRAP␊ |
355 | ␊ |
356 | typedef unsigned char YY_CHAR;␊ |
357 | ␊ |
358 | FILE *defargsYYin = (FILE *) 0, *defargsYYout = (FILE *) 0;␊ |
359 | ␊ |
360 | typedef int yy_state_type;␊ |
361 | ␊ |
362 | extern int defargsYYlineno;␊ |
363 | ␊ |
364 | int defargsYYlineno = 1;␊ |
365 | ␊ |
366 | extern char *defargsYYtext;␊ |
367 | #define yytext_ptr defargsYYtext␊ |
368 | ␊ |
369 | static yy_state_type yy_get_previous_state (void );␊ |
370 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state );␊ |
371 | static int yy_get_next_buffer (void );␊ |
372 | static 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 defargsYYtext.␊ |
376 | */␊ |
377 | #define YY_DO_BEFORE_ACTION \␊ |
378 | ␉(yytext_ptr) = yy_bp; \␊ |
379 | ␉defargsYYleng = (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 45␊ |
385 | #define YY_END_OF_BUFFER 46␊ |
386 | /* This struct is not used in this scanner,␊ |
387 | but its presence is necessary. */␊ |
388 | struct yy_trans_info␊ |
389 | ␉{␊ |
390 | ␉flex_int32_t yy_verify;␊ |
391 | ␉flex_int32_t yy_nxt;␊ |
392 | ␉};␊ |
393 | static yyconst flex_int16_t yy_acclist[214] =␊ |
394 | { 0,␊ |
395 | 2, 2, 46, 44, 45, 43, 45, 44, 45, 1,␊ |
396 | 44, 45, 29, 44, 45, 22, 29, 44, 45, 29,␊ |
397 | 44, 45, 29, 44, 45, 29, 44, 45, 29, 44,␊ |
398 | 45, 31, 44, 45, 15, 31, 44, 45, 16, 31,␊ |
399 | 44, 45, 31, 44, 45, 30, 31, 44, 45, 17,␊ |
400 | 31, 44, 45, 18, 31, 44, 45, 20, 31, 44,␊ |
401 | 45, 19, 31, 44, 45, 27, 44, 45, 2, 27,␊ |
402 | 44, 45, 14, 27, 44, 45, 25, 27, 44, 45,␊ |
403 | 27, 44, 45, 27, 44, 45, 14, 27, 44, 45,␊ |
404 | 23, 27, 44, 45, 25, 27, 44, 45, 26, 27,␊ |
405 | ␊ |
406 | 44, 45, 27, 44, 45, 14, 27, 44, 45, 7,␊ |
407 | 29, 44, 45, 29, 44, 45, 14, 29, 44, 45,␊ |
408 | 25, 29, 44, 45, 25, 29, 44, 45, 12, 27,␊ |
409 | 44, 45, 9, 26, 27, 44, 45, 44, 45, 44,␊ |
410 | 45, 44, 45, 44, 45, 36, 41, 44, 45, 40,␊ |
411 | 43, 45, 41, 44, 45, 36, 41, 44, 45, 37,␊ |
412 | 44, 45, 39, 43, 45, 37, 44, 45, 28, 21,␊ |
413 | 16, 30, 2,16392, 13, 26, 3, 10, 11, 9,␊ |
414 | 26, 34, 36, 38, 36, 37, 37, 37, 42, 16,␊ |
415 | 16,16392, 8200, 6, 6, 35, 36, 42, 37, 42,␊ |
416 | ␊ |
417 | 42, 8200, 5, 4, 5, 36, 42, 37, 42, 24,␊ |
418 | 4, 32, 33␊ |
419 | } ;␊ |
420 | ␊ |
421 | static yyconst flex_int16_t yy_accept[153] =␊ |
422 | { 0,␊ |
423 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
424 | 1, 1, 1, 1, 1, 2, 3, 3, 3, 3,␊ |
425 | 3, 3, 3, 3, 3, 3, 3, 4, 6, 8,␊ |
426 | 10, 13, 16, 20, 23, 26, 29, 32, 35, 39,␊ |
427 | 43, 46, 50, 54, 58, 62, 66, 69, 73, 77,␊ |
428 | 81, 84, 87, 91, 95, 99, 103, 106, 110, 114,␊ |
429 | 117, 121, 125, 129, 133, 138, 140, 142, 144, 146,␊ |
430 | 150, 153, 156, 160, 163, 166, 169, 169, 169, 170,␊ |
431 | 171, 171, 172, 173, 174, 174, 174, 175, 175, 175,␊ |
432 | 176, 177, 177, 178, 178, 178, 178, 179, 180, 182,␊ |
433 | ␊ |
434 | 182, 182, 182, 183, 183, 183, 184, 185, 186, 187,␊ |
435 | 188, 189, 190, 191, 192, 192, 192, 192, 193, 194,␊ |
436 | 194, 194, 195, 195, 196, 196, 196, 197, 197, 197,␊ |
437 | 199, 201, 202, 202, 203, 203, 204, 206, 206, 206,␊ |
438 | 206, 208, 210, 211, 212, 212, 213, 213, 213, 213,␊ |
439 | 214, 214␊ |
440 | } ;␊ |
441 | ␊ |
442 | static yyconst flex_int32_t yy_ec[256] =␊ |
443 | { 0,␊ |
444 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,␊ |
445 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
446 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
447 | 1, 2, 4, 5, 1, 1, 1, 6, 7, 8,␊ |
448 | 9, 10, 1, 11, 12, 1, 13, 14, 15, 15,␊ |
449 | 15, 15, 15, 15, 15, 16, 16, 17, 1, 18,␊ |
450 | 19, 20, 1, 1, 21, 21, 21, 21, 21, 21,␊ |
451 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
452 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
453 | 22, 23, 24, 6, 21, 1, 25, 21, 26, 21,␊ |
454 | ␊ |
455 | 27, 21, 21, 21, 28, 21, 21, 29, 21, 30,␊ |
456 | 31, 21, 21, 21, 32, 33, 21, 34, 21, 21,␊ |
457 | 21, 21, 35, 1, 36, 1, 1, 21, 21, 21,␊ |
458 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
459 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
460 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
461 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
462 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
463 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
464 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
465 | ␊ |
466 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
467 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
468 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
469 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
470 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
471 | 21, 21, 21, 21, 21␊ |
472 | } ;␊ |
473 | ␊ |
474 | static yyconst flex_int32_t yy_meta[37] =␊ |
475 | { 0,␊ |
476 | 1, 2, 3, 1, 1, 1, 1, 1, 4, 5,␊ |
477 | 1, 1, 1, 6, 6, 6, 4, 1, 1, 1,␊ |
478 | 7, 1, 1, 1, 7, 7, 7, 7, 7, 7,␊ |
479 | 7, 7, 7, 7, 1, 1␊ |
480 | } ;␊ |
481 | ␊ |
482 | static yyconst flex_int16_t yy_base[170] =␊ |
483 | { 0,␊ |
484 | 0, 1, 2, 3, 19, 40, 63, 0, 0, 0,␊ |
485 | 10, 18, 0, 92, 127, 0, 161, 0, 194, 226,␊ |
486 | 258, 290, 31, 37, 4, 20, 302, 500, 500, 38,␊ |
487 | 500, 500, 500, 281, 45, 37, 0, 500, 500, 298,␊ |
488 | 49, 0, 500, 500, 500, 500, 500, 296, 100, 101,␊ |
489 | 277, 94, 90, 500, 103, 0, 272, 500, 500, 272,␊ |
490 | 500, 111, 163, 169, 0, 27, 23, 263, 260, 0,␊ |
491 | 500, 277, 102, 0, 500, 107, 115, 171, 500, 500,␊ |
492 | 287, 178, 0, 286, 109, 196, 323, 165, 108, 500,␊ |
493 | 0, 263, 500, 279, 194, 208, 500, 500, 0, 183,␊ |
494 | ␊ |
495 | 261, 185, 500, 253, 253, 0, 500, 182, 0, 207,␊ |
496 | 227, 263, 230, 0, 187, 263, 231, 208, 356, 232,␊ |
497 | 230, 500, 272, 271, 255, 252, 500, 243, 240, 245,␊ |
498 | 232, 500, 262, 0, 231, 500, 500, 259, 205, 179,␊ |
499 | 0, 0, 500, 500, 193, 500, 162, 159, 34, 500,␊ |
500 | 500, 390, 397, 404, 411, 418, 425, 431, 433, 440,␊ |
501 | 442, 449, 456, 458, 465, 472, 478, 485, 492␊ |
502 | } ;␊ |
503 | ␊ |
504 | static yyconst flex_int16_t yy_def[170] =␊ |
505 | { 0,␊ |
506 | 152, 152, 152, 152, 153, 153, 151, 7, 7, 7,␊ |
507 | 7, 7, 7, 7, 151, 15, 153, 17, 154, 154,␊ |
508 | 152, 152, 155, 155, 156, 156, 151, 151, 151, 151,␊ |
509 | 151, 151, 151, 151, 151, 151, 157, 151, 151, 158,␊ |
510 | 151, 159, 151, 151, 151, 151, 151, 151, 160, 151,␊ |
511 | 151, 151, 151, 151, 151, 161, 162, 151, 151, 163,␊ |
512 | 151, 151, 151, 151, 164, 151, 151, 151, 151, 165,␊ |
513 | 151, 151, 165, 166, 151, 166, 151, 151, 151, 151,␊ |
514 | 158, 167, 159, 151, 160, 160, 160, 151, 151, 151,␊ |
515 | 161, 162, 151, 151, 168, 151, 151, 151, 164, 151,␊ |
516 | ␊ |
517 | 169, 151, 151, 151, 151, 165, 151, 165, 166, 166,␊ |
518 | 166, 151, 167, 113, 160, 151, 160, 87, 160, 151,␊ |
519 | 151, 151, 151, 151, 151, 169, 151, 151, 151, 165,␊ |
520 | 166, 151, 160, 119, 151, 151, 151, 151, 151, 151,␊ |
521 | 165, 166, 151, 151, 151, 151, 151, 151, 151, 151,␊ |
522 | 0, 151, 151, 151, 151, 151, 151, 151, 151, 151,␊ |
523 | 151, 151, 151, 151, 151, 151, 151, 151, 151␊ |
524 | } ;␊ |
525 | ␊ |
526 | static yyconst flex_int16_t yy_nxt[537] =␊ |
527 | { 0,␊ |
528 | 151, 151, 29, 29, 29, 29, 75, 38, 38, 31,␊ |
529 | 31, 151, 30, 30, 30, 30, 76, 38, 38, 31,␊ |
530 | 31, 29, 75, 33, 102, 38, 38, 43, 100, 44,␊ |
531 | 34, 35, 76, 71, 46, 43, 103, 44, 36, 71,␊ |
532 | 72, 37, 29, 73, 33, 45, 72, 77, 101, 73,␊ |
533 | 78, 34, 35, 45, 77, 79, 79, 78, 77, 36,␊ |
534 | 150, 78, 37, 38, 38, 29, 38, 38, 38, 38,␊ |
535 | 39, 40, 38, 38, 38, 41, 38, 38, 38, 38,␊ |
536 | 38, 38, 38, 42, 38, 38, 38, 42, 42, 42,␊ |
537 | 42, 42, 42, 42, 42, 42, 42, 38, 38, 38,␊ |
538 | ␊ |
539 | 38, 86, 88, 77, 88, 87, 78, 90, 90, 87,␊ |
540 | 115, 77, 88, 89, 108, 89, 110, 120, 112, 111,␊ |
541 | 121, 90, 90, 89, 112, 116, 46, 47, 48, 29,␊ |
542 | 47, 47, 47, 47, 49, 50, 47, 50, 51, 52,␊ |
543 | 47, 47, 47, 47, 53, 54, 55, 56, 57, 47,␊ |
544 | 47, 56, 56, 56, 56, 56, 56, 56, 56, 56,␊ |
545 | 56, 58, 47, 29, 88, 59, 88, 60, 61, 62,␊ |
546 | 96, 62, 34, 35, 112, 89, 97, 89, 61, 81,␊ |
547 | 63, 79, 79, 112, 100, 130, 102, 149, 115, 148,␊ |
548 | 98, 113, 113, 113, 130, 61, 29, 117, 103, 144,␊ |
549 | ␊ |
550 | 124, 87, 64, 116, 101, 87, 52, 125, 125, 96,␊ |
551 | 131, 147, 116, 85, 65, 97, 131, 85, 65, 65,␊ |
552 | 65, 65, 65, 65, 65, 65, 65, 65, 29, 98,␊ |
553 | 131, 81, 117, 135, 64, 135, 87, 146, 52, 131,␊ |
554 | 87, 135, 135, 113, 113, 113, 65, 116, 143, 142,␊ |
555 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,␊ |
556 | 29, 137, 141, 86, 140, 144, 66, 87, 138, 138,␊ |
557 | 30, 87, 145, 145, 139, 127, 67, 136, 136, 133,␊ |
558 | 132, 129, 128, 68, 127, 122, 93, 84, 81, 107,␊ |
559 | 105, 69, 29, 104, 95, 93, 90, 84, 66, 81,␊ |
560 | ␊ |
561 | 79, 151, 30, 151, 151, 151, 151, 151, 67, 151,␊ |
562 | 151, 151, 151, 151, 151, 68, 151, 151, 151, 151,␊ |
563 | 151, 151, 151, 69, 118, 151, 151, 151, 87, 151,␊ |
564 | 151, 151, 87, 151, 151, 151, 151, 151, 151, 116,␊ |
565 | 151, 151, 151, 119, 151, 151, 151, 119, 119, 119,␊ |
566 | 119, 119, 119, 119, 119, 119, 119, 115, 151, 151,␊ |
567 | 151, 151, 151, 151, 151, 151, 151, 151, 151, 134,␊ |
568 | 134, 134, 116, 151, 151, 151, 134, 151, 151, 151,␊ |
569 | 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,␊ |
570 | 28, 28, 28, 28, 28, 28, 28, 32, 32, 32,␊ |
571 | ␊ |
572 | 32, 32, 32, 32, 47, 47, 47, 47, 47, 47,␊ |
573 | 47, 70, 70, 70, 70, 70, 70, 70, 74, 74,␊ |
574 | 74, 74, 74, 74, 74, 80, 80, 151, 80, 80,␊ |
575 | 80, 80, 82, 151, 151, 151, 151, 82, 83, 83,␊ |
576 | 85, 85, 85, 151, 85, 85, 85, 91, 91, 92,␊ |
577 | 92, 92, 92, 92, 92, 92, 94, 94, 151, 94,␊ |
578 | 94, 94, 94, 99, 99, 106, 106, 151, 106, 151,␊ |
579 | 106, 106, 109, 109, 151, 109, 109, 109, 109, 114,␊ |
580 | 151, 151, 151, 114, 114, 123, 123, 151, 123, 123,␊ |
581 | 123, 123, 126, 126, 126, 126, 126, 126, 126, 27,␊ |
582 | ␊ |
583 | 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,␊ |
584 | 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,␊ |
585 | 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,␊ |
586 | 151, 151, 151, 151, 151, 151␊ |
587 | } ;␊ |
588 | ␊ |
589 | static yyconst flex_int16_t yy_chk[537] =␊ |
590 | { 0,␊ |
591 | 0, 0, 1, 2, 3, 4, 25, 13, 13, 3,␊ |
592 | 4, 0, 1, 2, 3, 4, 25, 11, 11, 3,␊ |
593 | 4, 5, 26, 5, 67, 12, 12, 11, 66, 11,␊ |
594 | 5, 5, 26, 23, 13, 12, 67, 12, 5, 24,␊ |
595 | 23, 5, 6, 23, 6, 11, 24, 30, 66, 24,␊ |
596 | 30, 6, 6, 12, 35, 36, 36, 35, 41, 6,␊ |
597 | 149, 41, 6, 7, 7, 7, 7, 7, 7, 7,␊ |
598 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,␊ |
599 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,␊ |
600 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 14,␊ |
601 | ␊ |
602 | 14, 49, 50, 52, 55, 49, 52, 53, 53, 49,␊ |
603 | 85, 73, 62, 50, 73, 55, 76, 89, 77, 76,␊ |
604 | 89, 55, 55, 62, 77, 85, 14, 15, 15, 15,␊ |
605 | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,␊ |
606 | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,␊ |
607 | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,␊ |
608 | 15, 15, 15, 17, 63, 17, 88, 17, 17, 17,␊ |
609 | 64, 17, 17, 17, 78, 63, 64, 88, 17, 82,␊ |
610 | 17, 63, 63, 78, 100, 108, 102, 148, 115, 147,␊ |
611 | 64, 82, 82, 82, 108, 17, 19, 86, 102, 145,␊ |
612 | ␊ |
613 | 95, 86, 19, 115, 100, 86, 19, 95, 95, 96,␊ |
614 | 110, 140, 86, 118, 19, 96, 110, 118, 19, 19,␊ |
615 | 19, 19, 19, 19, 19, 19, 19, 19, 20, 96,␊ |
616 | 111, 113, 117, 121, 20, 120, 117, 139, 20, 111,␊ |
617 | 117, 120, 121, 113, 113, 113, 20, 117, 135, 131,␊ |
618 | 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,␊ |
619 | 21, 125, 130, 133, 129, 138, 21, 133, 125, 125,␊ |
620 | 21, 133, 138, 138, 128, 126, 21, 124, 123, 116,␊ |
621 | 112, 105, 104, 21, 101, 94, 92, 84, 81, 72,␊ |
622 | 69, 21, 22, 68, 60, 57, 51, 48, 22, 40,␊ |
623 | ␊ |
624 | 34, 27, 22, 0, 0, 0, 0, 0, 22, 0,␊ |
625 | 0, 0, 0, 0, 0, 22, 0, 0, 0, 0,␊ |
626 | 0, 0, 0, 22, 87, 0, 0, 0, 87, 0,␊ |
627 | 0, 0, 87, 0, 0, 0, 0, 0, 0, 87,␊ |
628 | 0, 0, 0, 87, 0, 0, 0, 87, 87, 87,␊ |
629 | 87, 87, 87, 87, 87, 87, 87, 119, 0, 0,␊ |
630 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 119,␊ |
631 | 119, 119, 119, 0, 0, 0, 119, 0, 0, 0,␊ |
632 | 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,␊ |
633 | 152, 152, 152, 152, 152, 152, 152, 153, 153, 153,␊ |
634 | ␊ |
635 | 153, 153, 153, 153, 154, 154, 154, 154, 154, 154,␊ |
636 | 154, 155, 155, 155, 155, 155, 155, 155, 156, 156,␊ |
637 | 156, 156, 156, 156, 156, 157, 157, 0, 157, 157,␊ |
638 | 157, 157, 158, 0, 0, 0, 0, 158, 159, 159,␊ |
639 | 160, 160, 160, 0, 160, 160, 160, 161, 161, 162,␊ |
640 | 162, 162, 162, 162, 162, 162, 163, 163, 0, 163,␊ |
641 | 163, 163, 163, 164, 164, 165, 165, 0, 165, 0,␊ |
642 | 165, 165, 166, 166, 0, 166, 166, 166, 166, 167,␊ |
643 | 0, 0, 0, 167, 167, 168, 168, 0, 168, 168,␊ |
644 | 168, 168, 169, 169, 169, 169, 169, 169, 169, 151,␊ |
645 | ␊ |
646 | 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,␊ |
647 | 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,␊ |
648 | 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,␊ |
649 | 151, 151, 151, 151, 151, 151␊ |
650 | } ;␊ |
651 | ␊ |
652 | extern int defargsYY_flex_debug;␊ |
653 | int defargsYY_flex_debug = 0;␊ |
654 | ␊ |
655 | static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;␊ |
656 | static char *yy_full_match;␊ |
657 | static int yy_lp;␊ |
658 | static int yy_looking_for_trail_begin = 0;␊ |
659 | static int yy_full_lp;␊ |
660 | static int *yy_full_state;␊ |
661 | #define YY_TRAILING_MASK 0x2000␊ |
662 | #define YY_TRAILING_HEAD_MASK 0x4000␊ |
663 | #define REJECT \␊ |
664 | { \␊ |
665 | *yy_cp = (yy_hold_char); /* undo effects of setting up defargsYYtext */ \␊ |
666 | yy_cp = (yy_full_match); /* restore poss. backed-over text */ \␊ |
667 | (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \␊ |
668 | (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \␊ |
669 | yy_current_state = *(yy_state_ptr); /* restore curr. state */ \␊ |
670 | ++(yy_lp); \␊ |
671 | goto find_rule; \␊ |
672 | }␊ |
673 | ␊ |
674 | #define yymore() yymore_used_but_not_detected␊ |
675 | #define YY_MORE_ADJ 0␊ |
676 | #define YY_RESTORE_YY_MORE_OFFSET␊ |
677 | char *defargsYYtext;␊ |
678 | #line 1 "defargs.l"␊ |
679 | /******************************************************************************␊ |
680 | *␊ |
681 | * ␊ |
682 | *␊ |
683 | * Copyright (C) 1997-2011 by Dimitri van Heesch.␊ |
684 | *␊ |
685 | * Permission to use, copy, modify, and distribute this software and its␊ |
686 | * documentation under the terms of the GNU General Public License is hereby ␊ |
687 | * granted. No representations are made about the suitability of this software ␊ |
688 | * for any purpose. It is provided "as is" without express or implied warranty.␊ |
689 | * See the GNU General Public License for more details.␊ |
690 | *␊ |
691 | * Documents produced by Doxygen are derivative works derived from the␊ |
692 | * input used in their production; they are not affected by this license.␊ |
693 | *␊ |
694 | */␊ |
695 | /*! \file␊ |
696 | * This scanner is used to convert a string into a list of function or ␊ |
697 | * template arguments. Each parsed argument results in a Argument struct,␊ |
698 | * that is put into an ArgumentList in declaration order.␊ |
699 | * Comment blocks for arguments can also be included in the string.␊ |
700 | * The argument string does not contain new-lines (except inside any␊ |
701 | * comment blocks).␊ |
702 | * An Argument consists of the string fields: ␊ |
703 | * type,name,default value, and documentation␊ |
704 | * The Argument list as a whole can be pure, constant or volatile.␊ |
705 | *␊ |
706 | * Examples of input strings are:␊ |
707 | * \code␊ |
708 | * "(int a,int b) const"␊ |
709 | * "(const char *s="hello world",int=5) = 0"␊ |
710 | * "<class T,class N>"␊ |
711 | * "(char c,const char)"␊ |
712 | * \endcode␊ |
713 | *␊ |
714 | * Note: It is not always possible to distinguish between the name and ␊ |
715 | * type of an argument. In case of doubt the name is added to the␊ |
716 | * type, and the matchArgumentList in util.cpp is be used to␊ |
717 | * further determine the correct separation.␊ |
718 | */␊ |
719 | #line 44 "defargs.l"␊ |
720 | ␊ |
721 | /*␊ |
722 | *␉includes␊ |
723 | */␊ |
724 | #include "qtbc.h"␊ |
725 | #include <stdio.h>␊ |
726 | //#include <iostream.h>␊ |
727 | #include <assert.h>␊ |
728 | #include <ctype.h>␊ |
729 | #include <qregexp.h>␊ |
730 | ␊ |
731 | #include "defargs.h"␊ |
732 | #include "entry.h"␊ |
733 | #include "util.h"␊ |
734 | ␊ |
735 | #define YY_NEVER_INTERACTIVE 1␊ |
736 | ␊ |
737 | /* -----------------------------------------------------------------␊ |
738 | *␉state variables␊ |
739 | */␊ |
740 | static const char *g_inputString;␊ |
741 | static int␉ g_inputPosition;␊ |
742 | static ArgumentList *g_argList;␊ |
743 | static QCString *g_copyArgValue;␊ |
744 | static QCString g_curArgTypeName;␊ |
745 | static QCString g_curArgDefValue;␊ |
746 | static QCString␉␉g_curArgName;␊ |
747 | static QCString␉␉g_curArgDocs;␊ |
748 | static QCString␉␉g_curArgAttrib;␊ |
749 | static QCString␉␉g_curArgArray;␊ |
750 | static QCString␉␉g_extraTypeChars;␊ |
751 | static int g_argRoundCount;␊ |
752 | static int g_argSharpCount;␊ |
753 | static int g_argCurlyCount;␊ |
754 | static int g_readArgContext;␊ |
755 | static int g_lastDocContext;␊ |
756 | static int g_lastDocChar;␊ |
757 | ␊ |
758 | /* -----------------------------------------------------------------␊ |
759 | */␊ |
760 | #undef␉YY_INPUT␊ |
761 | #define␉YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);␊ |
762 | ␊ |
763 | static int yyread(char *buf,int max_size)␊ |
764 | {␊ |
765 | int c=0;␊ |
766 | while( c < max_size && g_inputString[g_inputPosition] )␊ |
767 | {␊ |
768 | ␉*buf = g_inputString[g_inputPosition++] ;␊ |
769 | ␉c++; buf++;␊ |
770 | }␊ |
771 | return c;␊ |
772 | }␊ |
773 | ␊ |
774 | ␊ |
775 | ␊ |
776 | ␊ |
777 | ␊ |
778 | ␊ |
779 | ␊ |
780 | ␊ |
781 | ␊ |
782 | ␊ |
783 | ␊ |
784 | ␊ |
785 | ␊ |
786 | #line 787 "<stdout>"␊ |
787 | ␊ |
788 | #define INITIAL 0␊ |
789 | #define Start 1␊ |
790 | #define CopyArgString 2␊ |
791 | #define CopyArgRound 3␊ |
792 | #define CopyArgRound2 4␊ |
793 | #define CopyArgSharp 5␊ |
794 | #define CopyArgCurly 6␊ |
795 | #define ReadFuncArgType 7␊ |
796 | #define ReadFuncArgDef 8␊ |
797 | #define ReadFuncArgPtr 9␊ |
798 | #define FuncQual 10␊ |
799 | #define ReadDocBlock 11␊ |
800 | #define ReadDocLine 12␊ |
801 | ␊ |
802 | #ifndef YY_NO_UNISTD_H␊ |
803 | /* Special case for "unistd.h", since it is non-ANSI. We include it way␊ |
804 | * down here because we want the user's section 1 to have been scanned first.␊ |
805 | * The user has a chance to override it with an option.␊ |
806 | */␊ |
807 | #include <unistd.h>␊ |
808 | #endif␊ |
809 | ␊ |
810 | #ifndef YY_EXTRA_TYPE␊ |
811 | #define YY_EXTRA_TYPE void *␊ |
812 | #endif␊ |
813 | ␊ |
814 | static int yy_init_globals (void );␊ |
815 | ␊ |
816 | /* Accessor methods to globals.␊ |
817 | These are made visible to non-reentrant scanners for convenience. */␊ |
818 | ␊ |
819 | int defargsYYlex_destroy (void );␊ |
820 | ␊ |
821 | int defargsYYget_debug (void );␊ |
822 | ␊ |
823 | void defargsYYset_debug (int debug_flag );␊ |
824 | ␊ |
825 | YY_EXTRA_TYPE defargsYYget_extra (void );␊ |
826 | ␊ |
827 | void defargsYYset_extra (YY_EXTRA_TYPE user_defined );␊ |
828 | ␊ |
829 | FILE *defargsYYget_in (void );␊ |
830 | ␊ |
831 | void defargsYYset_in (FILE * in_str );␊ |
832 | ␊ |
833 | FILE *defargsYYget_out (void );␊ |
834 | ␊ |
835 | void defargsYYset_out (FILE * out_str );␊ |
836 | ␊ |
837 | yy_size_t defargsYYget_leng (void );␊ |
838 | ␊ |
839 | char *defargsYYget_text (void );␊ |
840 | ␊ |
841 | int defargsYYget_lineno (void );␊ |
842 | ␊ |
843 | void defargsYYset_lineno (int line_number );␊ |
844 | ␊ |
845 | /* Macros after this point can all be overridden by user definitions in␊ |
846 | * section 1.␊ |
847 | */␊ |
848 | ␊ |
849 | #ifndef YY_SKIP_YYWRAP␊ |
850 | #ifdef __cplusplus␊ |
851 | extern "C" int defargsYYwrap (void );␊ |
852 | #else␊ |
853 | extern int defargsYYwrap (void );␊ |
854 | #endif␊ |
855 | #endif␊ |
856 | ␊ |
857 | static void yyunput (int c,char *buf_ptr );␊ |
858 | ␊ |
859 | #ifndef yytext_ptr␊ |
860 | static void yy_flex_strncpy (char *,yyconst char *,int );␊ |
861 | #endif␊ |
862 | ␊ |
863 | #ifdef YY_NEED_STRLEN␊ |
864 | static int yy_flex_strlen (yyconst char * );␊ |
865 | #endif␊ |
866 | ␊ |
867 | #ifndef YY_NO_INPUT␊ |
868 | ␊ |
869 | #ifdef __cplusplus␊ |
870 | static int yyinput (void );␊ |
871 | #else␊ |
872 | static int input (void );␊ |
873 | #endif␊ |
874 | ␊ |
875 | #endif␊ |
876 | ␊ |
877 | /* Amount of stuff to slurp up with each read. */␊ |
878 | #ifndef YY_READ_BUF_SIZE␊ |
879 | #define YY_READ_BUF_SIZE 262144␊ |
880 | #endif␊ |
881 | ␊ |
882 | /* Copy whatever the last rule matched to the standard output. */␊ |
883 | #ifndef ECHO␊ |
884 | /* This used to be an fputs(), but since the string might contain NUL's,␊ |
885 | * we now use fwrite().␊ |
886 | */␊ |
887 | #define ECHO fwrite( defargsYYtext, defargsYYleng, 1, defargsYYout )␊ |
888 | #endif␊ |
889 | ␊ |
890 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,␊ |
891 | * is returned in "result".␊ |
892 | */␊ |
893 | #ifndef YY_INPUT␊ |
894 | #define YY_INPUT(buf,result,max_size) \␊ |
895 | ␉if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \␊ |
896 | ␉␉{ \␊ |
897 | ␉␉int c = '*'; \␊ |
898 | ␉␉yy_size_t n; \␊ |
899 | ␉␉for ( n = 0; n < max_size && \␊ |
900 | ␉␉␉ (c = getc( defargsYYin )) != EOF && c != '\n'; ++n ) \␊ |
901 | ␉␉␉buf[n] = (char) c; \␊ |
902 | ␉␉if ( c == '\n' ) \␊ |
903 | ␉␉␉buf[n++] = (char) c; \␊ |
904 | ␉␉if ( c == EOF && ferror( defargsYYin ) ) \␊ |
905 | ␉␉␉YY_FATAL_ERROR( "input in flex scanner failed" ); \␊ |
906 | ␉␉result = n; \␊ |
907 | ␉␉} \␊ |
908 | ␉else \␊ |
909 | ␉␉{ \␊ |
910 | ␉␉errno=0; \␊ |
911 | ␉␉while ( (result = fread(buf, 1, max_size, defargsYYin))==0 && ferror(defargsYYin)) \␊ |
912 | ␉␉␉{ \␊ |
913 | ␉␉␉if( errno != EINTR) \␊ |
914 | ␉␉␉␉{ \␊ |
915 | ␉␉␉␉YY_FATAL_ERROR( "input in flex scanner failed" ); \␊ |
916 | ␉␉␉␉break; \␊ |
917 | ␉␉␉␉} \␊ |
918 | ␉␉␉errno=0; \␊ |
919 | ␉␉␉clearerr(defargsYYin); \␊ |
920 | ␉␉␉} \␊ |
921 | ␉␉}\␊ |
922 | \␊ |
923 | ␊ |
924 | #endif␊ |
925 | ␊ |
926 | /* No semi-colon after return; correct usage is to write "yyterminate();" -␊ |
927 | * we don't want an extra ';' after the "return" because that will cause␊ |
928 | * some compilers to complain about unreachable statements.␊ |
929 | */␊ |
930 | #ifndef yyterminate␊ |
931 | #define yyterminate() return YY_NULL␊ |
932 | #endif␊ |
933 | ␊ |
934 | /* Number of entries by which start-condition stack grows. */␊ |
935 | #ifndef YY_START_STACK_INCR␊ |
936 | #define YY_START_STACK_INCR 25␊ |
937 | #endif␊ |
938 | ␊ |
939 | /* Report a fatal error. */␊ |
940 | #ifndef YY_FATAL_ERROR␊ |
941 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )␊ |
942 | #endif␊ |
943 | ␊ |
944 | /* end tables serialization structures and prototypes */␊ |
945 | ␊ |
946 | /* Default declaration of generated scanner - a define so the user can␊ |
947 | * easily add parameters.␊ |
948 | */␊ |
949 | #ifndef YY_DECL␊ |
950 | #define YY_DECL_IS_OURS 1␊ |
951 | ␊ |
952 | extern int defargsYYlex (void);␊ |
953 | ␊ |
954 | #define YY_DECL int defargsYYlex (void)␊ |
955 | #endif /* !YY_DECL */␊ |
956 | ␊ |
957 | /* Code executed at the beginning of each rule, after defargsYYtext and defargsYYleng␊ |
958 | * have been set up.␊ |
959 | */␊ |
960 | #ifndef YY_USER_ACTION␊ |
961 | #define YY_USER_ACTION␊ |
962 | #endif␊ |
963 | ␊ |
964 | /* Code executed at the end of each rule. */␊ |
965 | #ifndef YY_BREAK␊ |
966 | #define YY_BREAK break;␊ |
967 | #endif␊ |
968 | ␊ |
969 | #define YY_RULE_SETUP \␊ |
970 | ␉YY_USER_ACTION␊ |
971 | ␊ |
972 | /** The main scanner function which does all the work.␊ |
973 | */␊ |
974 | YY_DECL␊ |
975 | {␊ |
976 | ␉register yy_state_type yy_current_state;␊ |
977 | ␉register char *yy_cp, *yy_bp;␊ |
978 | ␉register int yy_act;␊ |
979 | ␊ |
980 | #line 119 "defargs.l"␊ |
981 | ␊ |
982 | ␊ |
983 | #line 984 "<stdout>"␊ |
984 | ␊ |
985 | ␉if ( !(yy_init) )␊ |
986 | ␉␉{␊ |
987 | ␉␉(yy_init) = 1;␊ |
988 | ␊ |
989 | #ifdef YY_USER_INIT␊ |
990 | ␉␉YY_USER_INIT;␊ |
991 | #endif␊ |
992 | ␊ |
993 | /* Create the reject buffer large enough to save one state per allowed character. */␊ |
994 | if ( ! (yy_state_buf) )␊ |
995 | (yy_state_buf) = (yy_state_type *)defargsYYalloc(YY_STATE_BUF_SIZE );␊ |
996 | if ( ! (yy_state_buf) )␊ |
997 | YY_FATAL_ERROR( "out of dynamic memory in defargsYYlex()" );␊ |
998 | ␊ |
999 | ␉␉if ( ! (yy_start) )␊ |
1000 | ␉␉␉(yy_start) = 1;␉/* first start state */␊ |
1001 | ␊ |
1002 | ␉␉if ( ! defargsYYin )␊ |
1003 | ␉␉␉defargsYYin = stdin;␊ |
1004 | ␊ |
1005 | ␉␉if ( ! defargsYYout )␊ |
1006 | ␉␉␉defargsYYout = stdout;␊ |
1007 | ␊ |
1008 | ␉␉if ( ! YY_CURRENT_BUFFER ) {␊ |
1009 | ␉␉␉defargsYYensure_buffer_stack ();␊ |
1010 | ␉␉␉YY_CURRENT_BUFFER_LVALUE =␊ |
1011 | ␉␉␉␉defargsYY_create_buffer(defargsYYin,YY_BUF_SIZE );␊ |
1012 | ␉␉}␊ |
1013 | ␊ |
1014 | ␉␉defargsYY_load_buffer_state( );␊ |
1015 | ␉␉}␊ |
1016 | ␊ |
1017 | ␉while ( 1 )␉␉/* loops until end-of-file is reached */␊ |
1018 | ␉␉{␊ |
1019 | ␉␉yy_cp = (yy_c_buf_p);␊ |
1020 | ␊ |
1021 | ␉␉/* Support of defargsYYtext. */␊ |
1022 | ␉␉*yy_cp = (yy_hold_char);␊ |
1023 | ␊ |
1024 | ␉␉/* yy_bp points to the position in yy_ch_buf of the start of␊ |
1025 | ␉␉ * the current run.␊ |
1026 | ␉␉ */␊ |
1027 | ␉␉yy_bp = yy_cp;␊ |
1028 | ␊ |
1029 | ␉␉yy_current_state = (yy_start);␊ |
1030 | ␊ |
1031 | ␉␉(yy_state_ptr) = (yy_state_buf);␊ |
1032 | ␉␉*(yy_state_ptr)++ = yy_current_state;␊ |
1033 | ␊ |
1034 | yy_match:␊ |
1035 | ␉␉do␊ |
1036 | ␉␉␉{␊ |
1037 | ␉␉␉register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];␊ |
1038 | ␉␉␉while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )␊ |
1039 | ␉␉␉␉{␊ |
1040 | ␉␉␉␉yy_current_state = (int) yy_def[yy_current_state];␊ |
1041 | ␉␉␉␉if ( yy_current_state >= 152 )␊ |
1042 | ␉␉␉␉␉yy_c = yy_meta[(unsigned int) yy_c];␊ |
1043 | ␉␉␉␉}␊ |
1044 | ␉␉␉yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];␊ |
1045 | ␉␉␉*(yy_state_ptr)++ = yy_current_state;␊ |
1046 | ␉␉␉++yy_cp;␊ |
1047 | ␉␉␉}␊ |
1048 | ␉␉while ( yy_base[yy_current_state] != 500 );␊ |
1049 | ␊ |
1050 | yy_find_action:␊ |
1051 | ␉␉yy_current_state = *--(yy_state_ptr);␊ |
1052 | ␉␉(yy_lp) = yy_accept[yy_current_state];␊ |
1053 | goto find_rule; /* Shut up GCC warning -Wall */␊ |
1054 | find_rule: /* we branch to this label when backing up */␊ |
1055 | ␉␉for ( ; ; ) /* until we find what rule we matched */␊ |
1056 | ␉␉␉{␊ |
1057 | ␉␉␉if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )␊ |
1058 | ␉␉␉␉{␊ |
1059 | ␉␉␉␉yy_act = yy_acclist[(yy_lp)];␊ |
1060 | ␉␉␉␉if ( yy_act & YY_TRAILING_HEAD_MASK ||␊ |
1061 | ␉␉␉␉ (yy_looking_for_trail_begin) )␊ |
1062 | ␉␉␉␉␉{␊ |
1063 | ␉␉␉␉␉if ( yy_act == (yy_looking_for_trail_begin) )␊ |
1064 | ␉␉␉␉␉␉{␊ |
1065 | ␉␉␉␉␉␉(yy_looking_for_trail_begin) = 0;␊ |
1066 | ␉␉␉␉␉␉yy_act &= ~YY_TRAILING_HEAD_MASK;␊ |
1067 | ␉␉␉␉␉␉break;␊ |
1068 | ␉␉␉␉␉␉}␊ |
1069 | ␉␉␉␉␉}␊ |
1070 | ␉␉␉␉else if ( yy_act & YY_TRAILING_MASK )␊ |
1071 | ␉␉␉␉␉{␊ |
1072 | ␉␉␉␉␉(yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;␊ |
1073 | ␉␉␉␉␉(yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;␊ |
1074 | ␉␉␉␉␉}␊ |
1075 | ␉␉␉␉else␊ |
1076 | ␉␉␉␉␉{␊ |
1077 | ␉␉␉␉␉(yy_full_match) = yy_cp;␊ |
1078 | ␉␉␉␉␉(yy_full_state) = (yy_state_ptr);␊ |
1079 | ␉␉␉␉␉(yy_full_lp) = (yy_lp);␊ |
1080 | ␉␉␉␉␉break;␊ |
1081 | ␉␉␉␉␉}␊ |
1082 | ␉␉␉␉++(yy_lp);␊ |
1083 | ␉␉␉␉goto find_rule;␊ |
1084 | ␉␉␉␉}␊ |
1085 | ␉␉␉--yy_cp;␊ |
1086 | ␉␉␉yy_current_state = *--(yy_state_ptr);␊ |
1087 | ␉␉␉(yy_lp) = yy_accept[yy_current_state];␊ |
1088 | ␉␉␉}␊ |
1089 | ␊ |
1090 | ␉␉YY_DO_BEFORE_ACTION;␊ |
1091 | ␊ |
1092 | do_action:␉/* This label is used only to access EOF actions. */␊ |
1093 | ␊ |
1094 | ␉␉switch ( yy_act )␊ |
1095 | ␉{ /* beginning of action switch */␊ |
1096 | case 1:␊ |
1097 | YY_RULE_SETUP␊ |
1098 | #line 121 "defargs.l"␊ |
1099 | { BEGIN(ReadFuncArgType); }␊ |
1100 | ␉YY_BREAK␊ |
1101 | case 2:␊ |
1102 | YY_RULE_SETUP␊ |
1103 | #line 123 "defargs.l"␊ |
1104 | {␊ |
1105 | ␉␉␉␉␉ g_curArgTypeName+=" ";␊ |
1106 | ␉␉␉␉␉}␊ |
1107 | ␉YY_BREAK␊ |
1108 | case 3:␊ |
1109 | /* rule 3 can match eol */␊ |
1110 | YY_RULE_SETUP␊ |
1111 | #line 126 "defargs.l"␊ |
1112 | { ␊ |
1113 | ␉␉␉␉␉ if (g_curArgTypeName.stripWhiteSpace().isEmpty())␊ |
1114 | ␉␉␉␉␉ {␊ |
1115 | ␉␉␉␉␉ g_curArgAttrib=defargsYYtext; // for M$-IDL␊ |
1116 | ␉␉␉␉␉ }␊ |
1117 | ␉␉␉␉␉ else // array type␊ |
1118 | ␉␉␉␉␉ {␊ |
1119 | ␉␉␉␉␉ g_curArgArray+=defargsYYtext;␊ |
1120 | ␉␉␉␉␉ }␊ |
1121 | ␉␉␉␉␉}␊ |
1122 | ␉YY_BREAK␊ |
1123 | case 4:␊ |
1124 | YY_RULE_SETUP␊ |
1125 | #line 136 "defargs.l"␊ |
1126 | { g_curArgDefValue+=defargsYYtext; }␊ |
1127 | ␉YY_BREAK␊ |
1128 | case 5:␊ |
1129 | YY_RULE_SETUP␊ |
1130 | #line 137 "defargs.l"␊ |
1131 | { g_curArgDefValue+=defargsYYtext; }␊ |
1132 | ␉YY_BREAK␊ |
1133 | case 6:␊ |
1134 | YY_RULE_SETUP␊ |
1135 | #line 138 "defargs.l"␊ |
1136 | { g_curArgDefValue+=defargsYYtext; }␊ |
1137 | ␉YY_BREAK␊ |
1138 | case 7:␊ |
1139 | YY_RULE_SETUP␊ |
1140 | #line 139 "defargs.l"␊ |
1141 | {␊ |
1142 | ␉␉␉␉␉ g_curArgDefValue+=*defargsYYtext;␊ |
1143 | ␉␉␉␉␉ BEGIN( CopyArgString );␊ |
1144 | ␉␉␉␉␉}␊ |
1145 | ␉YY_BREAK␊ |
1146 | case 8:␊ |
1147 | /* rule 8 can match eol */␊ |
1148 | YY_RULE_SETUP␊ |
1149 | #line 143 "defargs.l"␊ |
1150 | { ␊ |
1151 | ␉␉␉␉␉ // function pointer as argument␊ |
1152 | ␉␉␉␉␉ g_curArgTypeName+=defargsYYtext;␊ |
1153 | ␉␉␉␉␉ //g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace();␊ |
1154 | ␉␉␉␉␉ BEGIN( ReadFuncArgPtr );␊ |
1155 | ␉␉␉␉␉}␊ |
1156 | ␉YY_BREAK␊ |
1157 | case 9:␊ |
1158 | YY_RULE_SETUP␊ |
1159 | #line 149 "defargs.l"␊ |
1160 | {␊ |
1161 | ␉␉␉␉␉ g_curArgName=defargsYYtext;␊ |
1162 | ␉␉␉␉␉}␊ |
1163 | ␉YY_BREAK␊ |
1164 | case 10:␊ |
1165 | YY_RULE_SETUP␊ |
1166 | #line 152 "defargs.l"␊ |
1167 | { // function pointer␊ |
1168 | ␉␉␉␉␉ g_curArgTypeName+=defargsYYtext;␊ |
1169 | ␉␉␉␉␉ //g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace();␊ |
1170 | ␉␉␉␉␉ g_readArgContext = ReadFuncArgType;␊ |
1171 | ␉␉␉␉␉ g_copyArgValue=&g_curArgTypeName;␊ |
1172 | ␉␉␉␉␉ g_argRoundCount=0;␊ |
1173 | ␉␉␉␉␉ BEGIN( CopyArgRound2 );␊ |
1174 | ␉␉␉␉␉}␊ |
1175 | ␉YY_BREAK␊ |
1176 | case 11:␊ |
1177 | *yy_cp = (yy_hold_char); /* undo effects of setting up defargsYYtext */␊ |
1178 | (yy_c_buf_p) = yy_cp = yy_bp + 1;␊ |
1179 | YY_DO_BEFORE_ACTION; /* set up defargsYYtext again */␊ |
1180 | YY_RULE_SETUP␊ |
1181 | #line 160 "defargs.l"␊ |
1182 | { // pointer to fixed size array␊ |
1183 | ␉␉␉␉␉ g_curArgTypeName+=defargsYYtext;␊ |
1184 | ␉␉␉␉␉ g_curArgTypeName+=g_curArgName;␊ |
1185 | ␉␉␉␉␉ //g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace();␊ |
1186 | ␉␉␉␉␉ BEGIN( ReadFuncArgType );␊ |
1187 | ␉␉␉␉␉}␊ |
1188 | ␉YY_BREAK␊ |
1189 | case 12:␊ |
1190 | YY_RULE_SETUP␊ |
1191 | #line 166 "defargs.l"␊ |
1192 | { // redundant braces detected / remove them␊ |
1193 | ␉␉␉␉␉ int i=g_curArgTypeName.findRev('('),l=g_curArgTypeName.length();␊ |
1194 | ␉␉␉␉␉ if (i!=-1)␊ |
1195 | ␉␉␉␉␉ g_curArgTypeName=g_curArgTypeName.left(i)+␊ |
1196 | ␉␉␉␉␉ g_curArgTypeName.right(l-i-1);␊ |
1197 | ␉␉␉␉␉ g_curArgTypeName+=g_curArgName;␊ |
1198 | ␉␉␉␉␉ BEGIN( ReadFuncArgType );␊ |
1199 | ␉␉␉␉␉}␊ |
1200 | ␉YY_BREAK␊ |
1201 | case 13:␊ |
1202 | YY_RULE_SETUP␊ |
1203 | #line 174 "defargs.l"␊ |
1204 | { // handle operators in defargs␊ |
1205 | ␉␉␉␉␉ g_curArgTypeName+=defargsYYtext;␊ |
1206 | ␉␉␉␉␉}␊ |
1207 | ␉YY_BREAK␊ |
1208 | case 14:␊ |
1209 | YY_RULE_SETUP␊ |
1210 | #line 177 "defargs.l"␊ |
1211 | {␉ ␊ |
1212 | ␉␉␉␉␉ if (YY_START==ReadFuncArgType)␊ |
1213 | ␉␉␉␉␉ {␊ |
1214 | ␉␉␉␉␉ g_curArgTypeName+=*defargsYYtext;␊ |
1215 | ␉␉␉␉␉ g_copyArgValue=&g_curArgTypeName;␊ |
1216 | ␉␉␉␉␉ }␊ |
1217 | ␉␉␉␉␉ else // YY_START==ReadFuncArgDef␊ |
1218 | ␉␉␉␉␉ {␊ |
1219 | ␉␉␉␉␉ g_curArgDefValue+=*defargsYYtext;␊ |
1220 | ␉␉␉␉␉ g_copyArgValue=&g_curArgDefValue;␊ |
1221 | ␉␉␉␉␉ }␊ |
1222 | ␉␉␉␉␉ g_readArgContext = YY_START; ␊ |
1223 | ␉␉␉␉␉ if (*defargsYYtext=='(')␊ |
1224 | ␉␉␉␉␉ {␊ |
1225 | ␉␉␉␉␉ g_argRoundCount=0; ␊ |
1226 | ␉␉␉␉␉ BEGIN( CopyArgRound ); ␊ |
1227 | ␉␉␉␉␉ }␊ |
1228 | ␉␉␉␉␉ else if (*defargsYYtext=='{')␊ |
1229 | ␉␉␉␉␉ {␊ |
1230 | ␉␉␉␉␉ g_argCurlyCount=0; ␊ |
1231 | ␉␉␉␉␉ BEGIN( CopyArgCurly ); ␊ |
1232 | ␉␉␉␉␉ }␊ |
1233 | ␉␉␉␉␉ else // defargsYYtext=='<'␊ |
1234 | ␉␉␉␉␉ {␊ |
1235 | ␉␉␉␉␉ g_argSharpCount=0; ␊ |
1236 | ␉␉␉␉␉ BEGIN( CopyArgSharp ); ␊ |
1237 | ␉␉␉␉␉ }␊ |
1238 | ␉␉␉␉␉}␊ |
1239 | ␉YY_BREAK␊ |
1240 | case 15:␊ |
1241 | YY_RULE_SETUP␊ |
1242 | #line 205 "defargs.l"␊ |
1243 | {␊ |
1244 | ␉␉␉␉␉ g_argRoundCount++;␊ |
1245 | ␉␉␉␉␉ *g_copyArgValue += *defargsYYtext;␊ |
1246 | ␉␉␉␉␉}␊ |
1247 | ␉YY_BREAK␊ |
1248 | case 16:␊ |
1249 | YY_RULE_SETUP␊ |
1250 | #line 209 "defargs.l"␊ |
1251 | {␊ |
1252 | ␉␉␉␉␉ *g_copyArgValue += defargsYYtext;␊ |
1253 | ␉␉␉␉␉ if (g_argRoundCount>0) ␊ |
1254 | ␉␉␉␉␉ {␊ |
1255 | ␉␉␉␉␉ g_argRoundCount--;␊ |
1256 | ␉␉␉␉␉ }␊ |
1257 | ␉␉␉␉␉ else ␊ |
1258 | ␉␉␉␉␉ {␊ |
1259 | ␉␉␉␉␉ if (YY_START==CopyArgRound2)␊ |
1260 | ␉␉␉␉␉ {␊ |
1261 | ␉␉␉␉␉ *g_copyArgValue+=" "+g_curArgName;␊ |
1262 | ␉␉␉␉␉ }␊ |
1263 | ␉␉␉␉␉ BEGIN( g_readArgContext );␊ |
1264 | ␉␉␉␉␉ }␊ |
1265 | ␉␉␉␉␉}␊ |
1266 | ␉YY_BREAK␊ |
1267 | case 17:␊ |
1268 | YY_RULE_SETUP␊ |
1269 | #line 224 "defargs.l"␊ |
1270 | {␊ |
1271 | ␉␉␉␉␉ g_argSharpCount++;␊ |
1272 | ␉␉␉␉␉ *g_copyArgValue += *defargsYYtext;␊ |
1273 | ␉␉␉␉␉}␊ |
1274 | ␉YY_BREAK␊ |
1275 | case 18:␊ |
1276 | YY_RULE_SETUP␊ |
1277 | #line 228 "defargs.l"␊ |
1278 | {␊ |
1279 | ␉␉␉␉␉ *g_copyArgValue += *defargsYYtext;␊ |
1280 | ␉␉␉␉␉ if (g_argSharpCount>0) g_argSharpCount--;␊ |
1281 | ␉␉␉␉␉ else BEGIN( g_readArgContext );␊ |
1282 | ␉␉␉␉␉}␊ |
1283 | ␉YY_BREAK␊ |
1284 | case 19:␊ |
1285 | YY_RULE_SETUP␊ |
1286 | #line 233 "defargs.l"␊ |
1287 | {␊ |
1288 | ␉␉␉␉␉ g_argCurlyCount++;␊ |
1289 | ␉␉␉␉␉ *g_copyArgValue += *defargsYYtext;␊ |
1290 | ␉␉␉␉␉}␊ |
1291 | ␉YY_BREAK␊ |
1292 | case 20:␊ |
1293 | YY_RULE_SETUP␊ |
1294 | #line 237 "defargs.l"␊ |
1295 | {␊ |
1296 | ␉␉␉␉␉ *g_copyArgValue += *defargsYYtext;␊ |
1297 | ␉␉␉␉␉ if (g_argCurlyCount>0) g_argCurlyCount--;␊ |
1298 | ␉␉␉␉␉ else BEGIN( g_readArgContext );␊ |
1299 | ␉␉␉␉␉}␊ |
1300 | ␉YY_BREAK␊ |
1301 | case 21:␊ |
1302 | YY_RULE_SETUP␊ |
1303 | #line 242 "defargs.l"␊ |
1304 | {␊ |
1305 | ␉␉␉␉␉ g_curArgDefValue+=defargsYYtext;␊ |
1306 | ␉␉␉␉␉}␊ |
1307 | ␉YY_BREAK␊ |
1308 | case 22:␊ |
1309 | YY_RULE_SETUP␊ |
1310 | #line 245 "defargs.l"␊ |
1311 | {␊ |
1312 | ␉␉␉␉␉ g_curArgDefValue+=*defargsYYtext;␊ |
1313 | ␉␉␉␉␉ BEGIN( ReadFuncArgDef );␊ |
1314 | ␉␉␉␉␉}␊ |
1315 | ␉YY_BREAK␊ |
1316 | case 23:␊ |
1317 | YY_RULE_SETUP␊ |
1318 | #line 249 "defargs.l"␊ |
1319 | {␊ |
1320 | ␉␉␉␉␉ BEGIN( ReadFuncArgDef );␊ |
1321 | ␉␉␉␉␉}␊ |
1322 | ␉YY_BREAK␊ |
1323 | case 24:␊ |
1324 | YY_RULE_SETUP␊ |
1325 | #line 252 "defargs.l"␊ |
1326 | {␊ |
1327 | ␉␉␉␉␉ g_lastDocContext=YY_START;␊ |
1328 | ␉␉␉␉␉ g_lastDocChar=*defargsYYtext; ␊ |
1329 | ␉␉␉␉␉ QCString text=defargsYYtext;␊ |
1330 | ␉␉␉␉␉ if (text.find("//")!=-1)␊ |
1331 | ␉␉␉␉␉ BEGIN( ReadDocLine );␊ |
1332 | ␉␉␉␉␉ else␊ |
1333 | ␉␉␉␉␉ BEGIN( ReadDocBlock );␊ |
1334 | ␉␉␉␉␉}␊ |
1335 | ␉YY_BREAK␊ |
1336 | case 25:␊ |
1337 | YY_RULE_SETUP␊ |
1338 | #line 261 "defargs.l"␊ |
1339 | {␊ |
1340 | ␉␉␉␉␉ if (*defargsYYtext==')' && g_curArgTypeName.stripWhiteSpace().isEmpty())␊ |
1341 | ␉␉␉␉␉ {␊ |
1342 | ␉␉␉␉␉ g_curArgTypeName+=*defargsYYtext;␊ |
1343 | ␉␉␉␉␉ BEGIN(FuncQual);␊ |
1344 | ␉␉␉␉␉ }␊ |
1345 | ␉␉␉␉␉ else␊ |
1346 | ␉␉␉␉␉ {␊ |
1347 | ␉␉␉␉␉ g_curArgTypeName=removeRedundantWhiteSpace(g_curArgTypeName);␊ |
1348 | ␉␉␉␉␉ g_curArgDefValue=g_curArgDefValue.stripWhiteSpace();␊ |
1349 | ␉␉␉␉␉ //printf("curArgType=`%s' curArgDefVal=`%s'\n",g_curArgTypeName.data(),g_curArgDefValue.data());␊ |
1350 | ␉␉␉␉␉ int l=g_curArgTypeName.length();␊ |
1351 | ␉␉␉␉␉ if (l>0)␊ |
1352 | ␉␉␉␉␉ {␊ |
1353 | ␉␉␉␉␉ int i=l-1;␊ |
1354 | ␉␉␉␉␉ while (i>=0 && (isspace((uchar)g_curArgTypeName.at(i)) || g_curArgTypeName.at(i)=='.')) i--;␊ |
1355 | ␉␉␉␉␉ while (i>=0 && isId(g_curArgTypeName.at(i))) i--;␊ |
1356 | ␉␉␉␉␉ Argument *a = new Argument; ␊ |
1357 | ␉␉␉␉␉ a->attrib = g_curArgAttrib.copy();␊ |
1358 | ␉␉␉␉␉ //printf("a->type=%s a->name=%s i=%d l=%d\n",␊ |
1359 | ␉␉␉␉␉ // a->type.data(),a->name.data(),i,l);␊ |
1360 | ␉␉␉␉␉ a->array.resize(0);␊ |
1361 | ␉␉␉␉␉ if (i==l-1 && g_curArgTypeName.at(i)==')') // function argument␊ |
1362 | ␉␉␉␉␉ {␊ |
1363 | ␉␉␉␉␉␉int bi=g_curArgTypeName.find('(');␊ |
1364 | ␉␉␉␉␉␉int fi=bi-1;␊ |
1365 | ␉␉␉␉␉␉//printf("func arg fi=%d\n",fi);␊ |
1366 | ␉␉␉␉␉␉while (fi>=0 && isId(g_curArgTypeName.at(fi))) fi--;␊ |
1367 | ␉␉␉␉␉␉if (fi>=0)␊ |
1368 | ␉␉␉␉␉␉{␊ |
1369 | ␉␉␉␉␉␉ a->type = g_curArgTypeName.left(fi+1);␊ |
1370 | ␉␉␉␉␉␉ a->name = g_curArgTypeName.mid(fi+1,bi-fi-1).stripWhiteSpace();␊ |
1371 | ␉␉␉␉␉␉ a->array = g_curArgTypeName.right(l-bi);␊ |
1372 | ␉␉␉␉␉␉}␊ |
1373 | ␉␉␉␉␉␉else␊ |
1374 | ␉␉␉␉␉␉{␊ |
1375 | ␉␉␉␉␉␉ a->type = g_curArgTypeName;␊ |
1376 | ␉␉␉␉␉␉}␊ |
1377 | ␉␉␉␉␉ }␊ |
1378 | ␉␉␉␉␉ else if (i>=0 && g_curArgTypeName.at(i)!=':')␊ |
1379 | ␉␉␉␉␉ { // type contains a name␊ |
1380 | ␉␉␉␉␉␉a->type = removeRedundantWhiteSpace(g_curArgTypeName.left(i+1)).stripWhiteSpace();␊ |
1381 | ␉␉␉␉␉␉a->name = g_curArgTypeName.right(l-i-1).stripWhiteSpace();␊ |
1382 | ␊ |
1383 | ␉␉␉␉␉␉// if the type becomes a type specifier only then we make a mistake␊ |
1384 | ␉␉␉␉␉␉// and need to correct it to avoid seeing a nameless parameter␊ |
1385 | ␉␉␉␉␉␉// "struct A" as a parameter with type "struct" and name "A".␊ |
1386 | ␉␉␉␉␉␉int sv=0;␊ |
1387 | ␉␉␉␉␉␉if (a->type.left(6)=="const ") sv=6;␊ |
1388 | ␉␉␉␉␉␉else if (a->type.left(9)=="volatile ") sv=9;␊ |
1389 | ␊ |
1390 | ␉␉␉␉␉␉if (a->type.mid(sv)=="struct" ||␊ |
1391 | ␉␉␉␉␉␉ a->type.mid(sv)=="union" ||␊ |
1392 | ␉␉␉␉␉␉ a->type.mid(sv)=="class" ||␊ |
1393 | ␉␉␉␉␉␉ a->type.mid(sv)=="typename" ||␊ |
1394 | ␉␉␉␉␉␉ a->type=="const" ||␊ |
1395 | ␉␉␉␉␉␉ a->type=="volatile"␊ |
1396 | ␉␉␉␉␉␉ )␊ |
1397 | ␉␉␉␉␉␉{ ␊ |
1398 | ␉␉␉␉␉␉ a->type = a->type + " " + a->name;␊ |
1399 | ␉␉␉␉␉␉ a->name.resize(0);␊ |
1400 | ␉␉␉␉␉␉}␊ |
1401 | ␉␉␉␉␉␉//printf(" --> a->type='%s'\n",a->type.data());␊ |
1402 | ␉␉␉␉␉ }␊ |
1403 | ␉␉␉␉␉ else // assume only the type was specified, try to determine name later ␊ |
1404 | ␉␉␉␉␉ {␊ |
1405 | ␉␉␉␉␉␉a->type = removeRedundantWhiteSpace(g_curArgTypeName); ␊ |
1406 | ␉␉␉␉␉ }␊ |
1407 | ␉␉␉␉␉ a->array += removeRedundantWhiteSpace(g_curArgArray);␊ |
1408 | ␉␉␉␉␉ //printf("array=%s\n",a->array.data());␊ |
1409 | ␉␉␉␉␉ int alen = a->array.length();␊ |
1410 | ␉␉␉␉␉ if (alen>2 && a->array.at(0)=='(' && ␊ |
1411 | ␉␉␉␉␉␉ a->array.at(alen-1)==')') // fix-up for int *(a[10])␊ |
1412 | ␉␉␉␉␉ {␊ |
1413 | ␉␉␉␉␉␉int i=a->array.find('[')-1;␊ |
1414 | ␉␉␉␉␉␉a->array = a->array.mid(1,alen-2);␊ |
1415 | ␉␉␉␉␉␉if (i>0 && a->name.isEmpty())␊ |
1416 | ␉␉␉␉␉␉{␊ |
1417 | ␉␉␉␉␉␉ a->name = a->array.left(i).stripWhiteSpace();␊ |
1418 | ␉␉␉␉␉␉ a->array = a->array.mid(i);␊ |
1419 | ␉␉␉␉␉␉}␊ |
1420 | ␉␉␉␉␉ }␊ |
1421 | ␉␉␉␉␉ a->defval = g_curArgDefValue.copy();␊ |
1422 | ␉␉␉␉␉ //printf("a->type=%s a->name=%s a->defval=\"%s\"\n",a->type.data(),a->name.data(),a->defval.data());␊ |
1423 | ␉␉␉␉␉ a->docs = g_curArgDocs.stripWhiteSpace();␊ |
1424 | ␉␉␉␉␉ //printf("Argument `%s' `%s' adding docs=`%s'\n",a->type.data(),a->name.data(),a->docs.data());␊ |
1425 | ␉␉␉␉␉ g_argList->append(a);␊ |
1426 | ␉␉␉␉␉ }␊ |
1427 | ␉␉␉␉␉ g_curArgAttrib.resize(0);␊ |
1428 | ␉␉␉␉␉ g_curArgTypeName.resize(0);␊ |
1429 | ␉␉␉␉␉ g_curArgDefValue.resize(0);␊ |
1430 | ␉␉␉␉␉ g_curArgArray.resize(0);␊ |
1431 | ␉␉␉␉␉ g_curArgDocs.resize(0);␊ |
1432 | ␉␉␉␉␉ if (*defargsYYtext==')')␊ |
1433 | ␉␉␉␉␉ {␊ |
1434 | ␉␉␉␉␉ BEGIN(FuncQual);␊ |
1435 | ␉␉␉␉␉ //printf(">>> end of argument list\n");␊ |
1436 | ␉␉␉␉␉ }␊ |
1437 | ␉␉␉␉␉ else␊ |
1438 | ␉␉␉␉␉ {␊ |
1439 | ␉␉␉␉␉ BEGIN( ReadFuncArgType );␊ |
1440 | ␉␉␉␉␉ }␊ |
1441 | ␉␉␉␉␉ }␊ |
1442 | ␉␉␉␉␉}␊ |
1443 | ␉YY_BREAK␊ |
1444 | case 26:␊ |
1445 | YY_RULE_SETUP␊ |
1446 | #line 365 "defargs.l"␊ |
1447 | { ␊ |
1448 | ␉␉␉␉␉ QCString name=defargsYYtext; //resolveDefines(defargsYYtext);␊ |
1449 | ␉␉␉␉␉ if (YY_START==ReadFuncArgType && g_curArgArray=="[]") // Java style array␊ |
1450 | ␉␉␉␉␉ {␊ |
1451 | ␉␉␉␉␉ g_curArgTypeName+=" []";␊ |
1452 | ␉␉␉␉␉ g_curArgArray.resize(0);␊ |
1453 | ␉␉␉␉␉ }␊ |
1454 | ␉␉␉␉␉ //printf("resolveName `%s'->`%s'\n",defargsYYtext,name.data());␊ |
1455 | ␉␉␉␉␉ g_curArgTypeName+=name;␊ |
1456 | ␉␉␉␉␉}␊ |
1457 | ␉YY_BREAK␊ |
1458 | case 27:␊ |
1459 | YY_RULE_SETUP␊ |
1460 | #line 375 "defargs.l"␊ |
1461 | { ␊ |
1462 | ␉␉␉␉␉ g_curArgTypeName+=*defargsYYtext;␊ |
1463 | ␉␉␉␉␉}␊ |
1464 | ␉YY_BREAK␊ |
1465 | case 28:␊ |
1466 | YY_RULE_SETUP␊ |
1467 | #line 379 "defargs.l"␊ |
1468 | {␊ |
1469 | ␉␉␉␉␉ g_curArgDefValue+=defargsYYtext;␊ |
1470 | ␉␉␉␉␉}␊ |
1471 | ␉YY_BREAK␊ |
1472 | case 29:␊ |
1473 | YY_RULE_SETUP␊ |
1474 | #line 382 "defargs.l"␊ |
1475 | {␊ |
1476 | ␉␉␉␉␉ g_curArgDefValue+=*defargsYYtext;␊ |
1477 | ␉␉␉␉␉}␊ |
1478 | ␉YY_BREAK␊ |
1479 | case 30:␊ |
1480 | YY_RULE_SETUP␊ |
1481 | #line 385 "defargs.l"␊ |
1482 | {␊ |
1483 | ␉␉␉␉␉ QCString name=defargsYYtext; //resolveDefines(defargsYYtext);␊ |
1484 | ␉␉␉␉␉ *g_copyArgValue+=name;␊ |
1485 | ␉␉␉␉␉}␊ |
1486 | ␉YY_BREAK␊ |
1487 | case 31:␊ |
1488 | YY_RULE_SETUP␊ |
1489 | #line 389 "defargs.l"␊ |
1490 | {␊ |
1491 | ␉␉␉␉␉ *g_copyArgValue += *defargsYYtext;␊ |
1492 | ␉␉␉␉␉}␊ |
1493 | ␉YY_BREAK␊ |
1494 | case 32:␊ |
1495 | YY_RULE_SETUP␊ |
1496 | #line 392 "defargs.l"␊ |
1497 | { ␊ |
1498 | ␉␉␉␉␉ g_argList->constSpecifier=TRUE;␊ |
1499 | ␉␉␉␉␉}␊ |
1500 | ␉YY_BREAK␊ |
1501 | case 33:␊ |
1502 | YY_RULE_SETUP␊ |
1503 | #line 395 "defargs.l"␊ |
1504 | { ␊ |
1505 | ␉␉␉␉␉ g_argList->volatileSpecifier=TRUE;␊ |
1506 | ␉␉␉␉␉}␊ |
1507 | ␉YY_BREAK␊ |
1508 | case 34:␊ |
1509 | YY_RULE_SETUP␊ |
1510 | #line 398 "defargs.l"␊ |
1511 | { ␊ |
1512 | ␉␉␉␉␉ g_argList->pureSpecifier=TRUE;␊ |
1513 | ␉␉␉␉␉}␊ |
1514 | ␉YY_BREAK␊ |
1515 | case 35:␊ |
1516 | /* rule 35 can match eol */␊ |
1517 | YY_RULE_SETUP␊ |
1518 | #line 401 "defargs.l"␊ |
1519 | { // for functions returning a pointer to an array, ␊ |
1520 | // i.e. ")[]" in "int (*f(int))[4]" with argsString="(int))[4]"␊ |
1521 | ␉␉␉␉␉ g_extraTypeChars=defargsYYtext;␊ |
1522 | ␉␉␉␉␉}␊ |
1523 | ␉YY_BREAK␊ |
1524 | case 36:␊ |
1525 | YY_RULE_SETUP␊ |
1526 | #line 405 "defargs.l"␊ |
1527 | {␊ |
1528 | ␉␉␉␉␉ g_curArgDocs+=defargsYYtext;␊ |
1529 | ␉␉␉␉␉}␊ |
1530 | ␉YY_BREAK␊ |
1531 | case 37:␊ |
1532 | YY_RULE_SETUP␊ |
1533 | #line 408 "defargs.l"␊ |
1534 | {␊ |
1535 | ␉␉␉␉␉ g_curArgDocs+=defargsYYtext;␊ |
1536 | ␉␉␉␉␉}␊ |
1537 | ␉YY_BREAK␊ |
1538 | case 38:␊ |
1539 | YY_RULE_SETUP␊ |
1540 | #line 411 "defargs.l"␊ |
1541 | { ␊ |
1542 | ␉␉␉␉␉ if (g_lastDocChar!=0)␊ |
1543 | ␉␉␉␉␉ unput(g_lastDocChar);␊ |
1544 | ␉␉␉␉␉ BEGIN(g_lastDocContext); ␊ |
1545 | ␉␉␉␉␉}␊ |
1546 | ␉YY_BREAK␊ |
1547 | case 39:␊ |
1548 | /* rule 39 can match eol */␊ |
1549 | YY_RULE_SETUP␊ |
1550 | #line 416 "defargs.l"␊ |
1551 | {␊ |
1552 | ␉␉␉␉␉ if (g_lastDocChar!=0)␊ |
1553 | ␉␉␉␉␉ unput(g_lastDocChar);␊ |
1554 | ␉␉␉␉␉ BEGIN(g_lastDocContext);␊ |
1555 | ␉␉␉␉␉}␊ |
1556 | ␉YY_BREAK␊ |
1557 | case 40:␊ |
1558 | /* rule 40 can match eol */␊ |
1559 | YY_RULE_SETUP␊ |
1560 | #line 421 "defargs.l"␊ |
1561 | {␊ |
1562 | ␉␉␉␉␉ g_curArgDocs+=*defargsYYtext;␊ |
1563 | ␉␉␉␉␉}␊ |
1564 | ␉YY_BREAK␊ |
1565 | case 41:␊ |
1566 | YY_RULE_SETUP␊ |
1567 | #line 424 "defargs.l"␊ |
1568 | {␊ |
1569 | ␉␉␉␉␉ g_curArgDocs+=*defargsYYtext;␊ |
1570 | ␉␉␉␉␉}␊ |
1571 | ␉YY_BREAK␊ |
1572 | case 42:␊ |
1573 | YY_RULE_SETUP␊ |
1574 | #line 427 "defargs.l"␊ |
1575 | {␊ |
1576 | ␉␉␉␉␉ g_lastDocContext=YY_START;␊ |
1577 | ␉␉␉␉␉ g_lastDocChar=0; ␊ |
1578 | ␉␉␉␉␉ if (defargsYYtext[1]=='/')␊ |
1579 | ␉␉␉␉␉ BEGIN( ReadDocLine );␊ |
1580 | ␉␉␉␉␉ else␊ |
1581 | ␉␉␉␉␉ BEGIN( ReadDocBlock );␊ |
1582 | ␉␉␉␉␉}␊ |
1583 | ␉YY_BREAK␊ |
1584 | case 43:␊ |
1585 | /* rule 43 can match eol */␊ |
1586 | YY_RULE_SETUP␊ |
1587 | #line 435 "defargs.l"␊ |
1588 | ␊ |
1589 | ␉YY_BREAK␊ |
1590 | case 44:␊ |
1591 | YY_RULE_SETUP␊ |
1592 | #line 436 "defargs.l"␊ |
1593 | ␊ |
1594 | ␉YY_BREAK␊ |
1595 | case 45:␊ |
1596 | YY_RULE_SETUP␊ |
1597 | #line 438 "defargs.l"␊ |
1598 | ECHO;␊ |
1599 | ␉YY_BREAK␊ |
1600 | #line 1601 "<stdout>"␊ |
1601 | ␉␉␉case YY_STATE_EOF(INITIAL):␊ |
1602 | ␉␉␉case YY_STATE_EOF(Start):␊ |
1603 | ␉␉␉case YY_STATE_EOF(CopyArgString):␊ |
1604 | ␉␉␉case YY_STATE_EOF(CopyArgRound):␊ |
1605 | ␉␉␉case YY_STATE_EOF(CopyArgRound2):␊ |
1606 | ␉␉␉case YY_STATE_EOF(CopyArgSharp):␊ |
1607 | ␉␉␉case YY_STATE_EOF(CopyArgCurly):␊ |
1608 | ␉␉␉case YY_STATE_EOF(ReadFuncArgType):␊ |
1609 | ␉␉␉case YY_STATE_EOF(ReadFuncArgDef):␊ |
1610 | ␉␉␉case YY_STATE_EOF(ReadFuncArgPtr):␊ |
1611 | ␉␉␉case YY_STATE_EOF(FuncQual):␊ |
1612 | ␉␉␉case YY_STATE_EOF(ReadDocBlock):␊ |
1613 | ␉␉␉case YY_STATE_EOF(ReadDocLine):␊ |
1614 | ␉␉␉␉yyterminate();␊ |
1615 | ␊ |
1616 | ␉case YY_END_OF_BUFFER:␊ |
1617 | ␉␉{␊ |
1618 | ␉␉/* Amount of text matched not including the EOB char. */␊ |
1619 | ␉␉int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;␊ |
1620 | ␊ |
1621 | ␉␉/* Undo the effects of YY_DO_BEFORE_ACTION. */␊ |
1622 | ␉␉*yy_cp = (yy_hold_char);␊ |
1623 | ␉␉YY_RESTORE_YY_MORE_OFFSET␊ |
1624 | ␊ |
1625 | ␉␉if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )␊ |
1626 | ␉␉␉{␊ |
1627 | ␉␉␉/* We're scanning a new file or input source. It's␊ |
1628 | ␉␉␉ * possible that this happened because the user␊ |
1629 | ␉␉␉ * just pointed defargsYYin at a new source and called␊ |
1630 | ␉␉␉ * defargsYYlex(). If so, then we have to assure␊ |
1631 | ␉␉␉ * consistency between YY_CURRENT_BUFFER and our␊ |
1632 | ␉␉␉ * globals. Here is the right place to do so, because␊ |
1633 | ␉␉␉ * this is the first action (other than possibly a␊ |
1634 | ␉␉␉ * back-up) that will match for the new input source.␊ |
1635 | ␉␉␉ */␊ |
1636 | ␉␉␉(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;␊ |
1637 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_input_file = defargsYYin;␊ |
1638 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;␊ |
1639 | ␉␉␉}␊ |
1640 | ␊ |
1641 | ␉␉/* Note that here we test for yy_c_buf_p "<=" to the position␊ |
1642 | ␉␉ * of the first EOB in the buffer, since yy_c_buf_p will␊ |
1643 | ␉␉ * already have been incremented past the NUL character␊ |
1644 | ␉␉ * (since all states make transitions on EOB to the␊ |
1645 | ␉␉ * end-of-buffer state). Contrast this with the test␊ |
1646 | ␉␉ * in input().␊ |
1647 | ␉␉ */␊ |
1648 | ␉␉if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )␊ |
1649 | ␉␉␉{ /* This was really a NUL. */␊ |
1650 | ␉␉␉yy_state_type yy_next_state;␊ |
1651 | ␊ |
1652 | ␉␉␉(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;␊ |
1653 | ␊ |
1654 | ␉␉␉yy_current_state = yy_get_previous_state( );␊ |
1655 | ␊ |
1656 | ␉␉␉/* Okay, we're now positioned to make the NUL␊ |
1657 | ␉␉␉ * transition. We couldn't have␊ |
1658 | ␉␉␉ * yy_get_previous_state() go ahead and do it␊ |
1659 | ␉␉␉ * for us because it doesn't know how to deal␊ |
1660 | ␉␉␉ * with the possibility of jamming (and we don't␊ |
1661 | ␉␉␉ * want to build jamming into it because then it␊ |
1662 | ␉␉␉ * will run more slowly).␊ |
1663 | ␉␉␉ */␊ |
1664 | ␊ |
1665 | ␉␉␉yy_next_state = yy_try_NUL_trans( yy_current_state );␊ |
1666 | ␊ |
1667 | ␉␉␉yy_bp = (yytext_ptr) + YY_MORE_ADJ;␊ |
1668 | ␊ |
1669 | ␉␉␉if ( yy_next_state )␊ |
1670 | ␉␉␉␉{␊ |
1671 | ␉␉␉␉/* Consume the NUL. */␊ |
1672 | ␉␉␉␉yy_cp = ++(yy_c_buf_p);␊ |
1673 | ␉␉␉␉yy_current_state = yy_next_state;␊ |
1674 | ␉␉␉␉goto yy_match;␊ |
1675 | ␉␉␉␉}␊ |
1676 | ␊ |
1677 | ␉␉␉else␊ |
1678 | ␉␉␉␉{␊ |
1679 | ␉␉␉␉yy_cp = (yy_c_buf_p);␊ |
1680 | ␉␉␉␉goto yy_find_action;␊ |
1681 | ␉␉␉␉}␊ |
1682 | ␉␉␉}␊ |
1683 | ␊ |
1684 | ␉␉else switch ( yy_get_next_buffer( ) )␊ |
1685 | ␉␉␉{␊ |
1686 | ␉␉␉case EOB_ACT_END_OF_FILE:␊ |
1687 | ␉␉␉␉{␊ |
1688 | ␉␉␉␉(yy_did_buffer_switch_on_eof) = 0;␊ |
1689 | ␊ |
1690 | ␉␉␉␉if ( defargsYYwrap( ) )␊ |
1691 | ␉␉␉␉␉{␊ |
1692 | ␉␉␉␉␉/* Note: because we've taken care in␊ |
1693 | ␉␉␉␉␉ * yy_get_next_buffer() to have set up␊ |
1694 | ␉␉␉␉␉ * defargsYYtext, we can now set up␊ |
1695 | ␉␉␉␉␉ * yy_c_buf_p so that if some total␊ |
1696 | ␉␉␉␉␉ * hoser (like flex itself) wants to␊ |
1697 | ␉␉␉␉␉ * call the scanner after we return the␊ |
1698 | ␉␉␉␉␉ * YY_NULL, it'll still work - another␊ |
1699 | ␉␉␉␉␉ * YY_NULL will get returned.␊ |
1700 | ␉␉␉␉␉ */␊ |
1701 | ␉␉␉␉␉(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;␊ |
1702 | ␊ |
1703 | ␉␉␉␉␉yy_act = YY_STATE_EOF(YY_START);␊ |
1704 | ␉␉␉␉␉goto do_action;␊ |
1705 | ␉␉␉␉␉}␊ |
1706 | ␊ |
1707 | ␉␉␉␉else␊ |
1708 | ␉␉␉␉␉{␊ |
1709 | ␉␉␉␉␉if ( ! (yy_did_buffer_switch_on_eof) )␊ |
1710 | ␉␉␉␉␉␉YY_NEW_FILE;␊ |
1711 | ␉␉␉␉␉}␊ |
1712 | ␉␉␉␉break;␊ |
1713 | ␉␉␉␉}␊ |
1714 | ␊ |
1715 | ␉␉␉case EOB_ACT_CONTINUE_SCAN:␊ |
1716 | ␉␉␉␉(yy_c_buf_p) =␊ |
1717 | ␉␉␉␉␉(yytext_ptr) + yy_amount_of_matched_text;␊ |
1718 | ␊ |
1719 | ␉␉␉␉yy_current_state = yy_get_previous_state( );␊ |
1720 | ␊ |
1721 | ␉␉␉␉yy_cp = (yy_c_buf_p);␊ |
1722 | ␉␉␉␉yy_bp = (yytext_ptr) + YY_MORE_ADJ;␊ |
1723 | ␉␉␉␉goto yy_match;␊ |
1724 | ␊ |
1725 | ␉␉␉case EOB_ACT_LAST_MATCH:␊ |
1726 | ␉␉␉␉(yy_c_buf_p) =␊ |
1727 | ␉␉␉␉&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];␊ |
1728 | ␊ |
1729 | ␉␉␉␉yy_current_state = yy_get_previous_state( );␊ |
1730 | ␊ |
1731 | ␉␉␉␉yy_cp = (yy_c_buf_p);␊ |
1732 | ␉␉␉␉yy_bp = (yytext_ptr) + YY_MORE_ADJ;␊ |
1733 | ␉␉␉␉goto yy_find_action;␊ |
1734 | ␉␉␉}␊ |
1735 | ␉␉break;␊ |
1736 | ␉␉}␊ |
1737 | ␊ |
1738 | ␉default:␊ |
1739 | ␉␉YY_FATAL_ERROR(␊ |
1740 | ␉␉␉"fatal flex scanner internal error--no action found" );␊ |
1741 | ␉} /* end of action switch */␊ |
1742 | ␉␉} /* end of scanning one token */␊ |
1743 | } /* end of defargsYYlex */␊ |
1744 | ␊ |
1745 | /* yy_get_next_buffer - try to read in a new buffer␊ |
1746 | *␊ |
1747 | * Returns a code representing an action:␊ |
1748 | *␉EOB_ACT_LAST_MATCH -␊ |
1749 | *␉EOB_ACT_CONTINUE_SCAN - continue scanning from current position␊ |
1750 | *␉EOB_ACT_END_OF_FILE - end of file␊ |
1751 | */␊ |
1752 | static int yy_get_next_buffer (void)␊ |
1753 | {␊ |
1754 | ␉register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;␊ |
1755 | ␉register char *source = (yytext_ptr);␊ |
1756 | ␉register int number_to_move, i;␊ |
1757 | ␉int ret_val;␊ |
1758 | ␊ |
1759 | ␉if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )␊ |
1760 | ␉␉YY_FATAL_ERROR(␊ |
1761 | ␉␉"fatal flex scanner internal error--end of buffer missed" );␊ |
1762 | ␊ |
1763 | ␉if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )␊ |
1764 | ␉␉{ /* Don't try to fill the buffer, so this is an EOF. */␊ |
1765 | ␉␉if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )␊ |
1766 | ␉␉␉{␊ |
1767 | ␉␉␉/* We matched a single character, the EOB, so␊ |
1768 | ␉␉␉ * treat this as a final EOF.␊ |
1769 | ␉␉␉ */␊ |
1770 | ␉␉␉return EOB_ACT_END_OF_FILE;␊ |
1771 | ␉␉␉}␊ |
1772 | ␊ |
1773 | ␉␉else␊ |
1774 | ␉␉␉{␊ |
1775 | ␉␉␉/* We matched some text prior to the EOB, first␊ |
1776 | ␉␉␉ * process it.␊ |
1777 | ␉␉␉ */␊ |
1778 | ␉␉␉return EOB_ACT_LAST_MATCH;␊ |
1779 | ␉␉␉}␊ |
1780 | ␉␉}␊ |
1781 | ␊ |
1782 | ␉/* Try to read more data. */␊ |
1783 | ␊ |
1784 | ␉/* First move last chars to start of buffer. */␊ |
1785 | ␉number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;␊ |
1786 | ␊ |
1787 | ␉for ( i = 0; i < number_to_move; ++i )␊ |
1788 | ␉␉*(dest++) = *(source++);␊ |
1789 | ␊ |
1790 | ␉if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )␊ |
1791 | ␉␉/* don't do the read, it's not guaranteed to return an EOF,␊ |
1792 | ␉␉ * just force an EOF␊ |
1793 | ␉␉ */␊ |
1794 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;␊ |
1795 | ␊ |
1796 | ␉else␊ |
1797 | ␉␉{␊ |
1798 | ␉␉␉yy_size_t num_to_read =␊ |
1799 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;␊ |
1800 | ␊ |
1801 | ␉␉while ( num_to_read <= 0 )␊ |
1802 | ␉␉␉{ /* Not enough room in the buffer - grow it. */␊ |
1803 | ␊ |
1804 | ␉␉␉YY_FATAL_ERROR(␊ |
1805 | "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );␊ |
1806 | ␊ |
1807 | ␉␉␉}␊ |
1808 | ␊ |
1809 | ␉␉if ( num_to_read > YY_READ_BUF_SIZE )␊ |
1810 | ␉␉␉num_to_read = YY_READ_BUF_SIZE;␊ |
1811 | ␊ |
1812 | ␉␉/* Read in more data. */␊ |
1813 | ␉␉YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),␊ |
1814 | ␉␉␉(yy_n_chars), num_to_read );␊ |
1815 | ␊ |
1816 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);␊ |
1817 | ␉␉}␊ |
1818 | ␊ |
1819 | ␉if ( (yy_n_chars) == 0 )␊ |
1820 | ␉␉{␊ |
1821 | ␉␉if ( number_to_move == YY_MORE_ADJ )␊ |
1822 | ␉␉␉{␊ |
1823 | ␉␉␉ret_val = EOB_ACT_END_OF_FILE;␊ |
1824 | ␉␉␉defargsYYrestart(defargsYYin );␊ |
1825 | ␉␉␉}␊ |
1826 | ␊ |
1827 | ␉␉else␊ |
1828 | ␉␉␉{␊ |
1829 | ␉␉␉ret_val = EOB_ACT_LAST_MATCH;␊ |
1830 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =␊ |
1831 | ␉␉␉␉YY_BUFFER_EOF_PENDING;␊ |
1832 | ␉␉␉}␊ |
1833 | ␉␉}␊ |
1834 | ␊ |
1835 | ␉else␊ |
1836 | ␉␉ret_val = EOB_ACT_CONTINUE_SCAN;␊ |
1837 | ␊ |
1838 | ␉if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {␊ |
1839 | ␉␉/* Extend the array by 50%, plus the number we really need. */␊ |
1840 | ␉␉yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);␊ |
1841 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) defargsYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );␊ |
1842 | ␉␉if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )␊ |
1843 | ␉␉␉YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );␊ |
1844 | ␉}␊ |
1845 | ␊ |
1846 | ␉(yy_n_chars) += number_to_move;␊ |
1847 | ␉YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;␊ |
1848 | ␉YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;␊ |
1849 | ␊ |
1850 | ␉(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];␊ |
1851 | ␊ |
1852 | ␉return ret_val;␊ |
1853 | }␊ |
1854 | ␊ |
1855 | /* yy_get_previous_state - get the state just before the EOB char was reached */␊ |
1856 | ␊ |
1857 | static yy_state_type yy_get_previous_state (void)␊ |
1858 | {␊ |
1859 | ␉register yy_state_type yy_current_state;␊ |
1860 | ␉register char *yy_cp;␊ |
1861 | ␊ |
1862 | ␉yy_current_state = (yy_start);␊ |
1863 | ␊ |
1864 | ␉(yy_state_ptr) = (yy_state_buf);␊ |
1865 | ␉*(yy_state_ptr)++ = yy_current_state;␊ |
1866 | ␊ |
1867 | ␉for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )␊ |
1868 | ␉␉{␊ |
1869 | ␉␉register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);␊ |
1870 | ␉␉while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )␊ |
1871 | ␉␉␉{␊ |
1872 | ␉␉␉yy_current_state = (int) yy_def[yy_current_state];␊ |
1873 | ␉␉␉if ( yy_current_state >= 152 )␊ |
1874 | ␉␉␉␉yy_c = yy_meta[(unsigned int) yy_c];␊ |
1875 | ␉␉␉}␊ |
1876 | ␉␉yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];␊ |
1877 | ␉␉*(yy_state_ptr)++ = yy_current_state;␊ |
1878 | ␉␉}␊ |
1879 | ␊ |
1880 | ␉return yy_current_state;␊ |
1881 | }␊ |
1882 | ␊ |
1883 | /* yy_try_NUL_trans - try to make a transition on the NUL character␊ |
1884 | *␊ |
1885 | * synopsis␊ |
1886 | *␉next_state = yy_try_NUL_trans( current_state );␊ |
1887 | */␊ |
1888 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )␊ |
1889 | {␊ |
1890 | ␉register int yy_is_jam;␊ |
1891 | ␊ |
1892 | ␉register YY_CHAR yy_c = 1;␊ |
1893 | ␉while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )␊ |
1894 | ␉␉{␊ |
1895 | ␉␉yy_current_state = (int) yy_def[yy_current_state];␊ |
1896 | ␉␉if ( yy_current_state >= 152 )␊ |
1897 | ␉␉␉yy_c = yy_meta[(unsigned int) yy_c];␊ |
1898 | ␉␉}␊ |
1899 | ␉yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];␊ |
1900 | ␉yy_is_jam = (yy_current_state == 151);␊ |
1901 | ␉if ( ! yy_is_jam )␊ |
1902 | ␉␉*(yy_state_ptr)++ = yy_current_state;␊ |
1903 | ␊ |
1904 | ␉return yy_is_jam ? 0 : yy_current_state;␊ |
1905 | }␊ |
1906 | ␊ |
1907 | static void yyunput (int c, register char * yy_bp )␊ |
1908 | {␊ |
1909 | ␉register char *yy_cp;␊ |
1910 | ␊ |
1911 | yy_cp = (yy_c_buf_p);␊ |
1912 | ␊ |
1913 | ␉/* undo effects of setting up defargsYYtext */␊ |
1914 | ␉*yy_cp = (yy_hold_char);␊ |
1915 | ␊ |
1916 | ␉if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )␊ |
1917 | ␉␉{ /* need to shift things up to make room */␊ |
1918 | ␉␉/* +2 for EOB chars. */␊ |
1919 | ␉␉register yy_size_t number_to_move = (yy_n_chars) + 2;␊ |
1920 | ␉␉register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[␊ |
1921 | ␉␉␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];␊ |
1922 | ␉␉register char *source =␊ |
1923 | ␉␉␉␉&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];␊ |
1924 | ␊ |
1925 | ␉␉while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )␊ |
1926 | ␉␉␉*--dest = *--source;␊ |
1927 | ␊ |
1928 | ␉␉yy_cp += (int) (dest - source);␊ |
1929 | ␉␉yy_bp += (int) (dest - source);␊ |
1930 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars =␊ |
1931 | ␉␉␉(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;␊ |
1932 | ␊ |
1933 | ␉␉if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )␊ |
1934 | ␉␉␉YY_FATAL_ERROR( "flex scanner push-back overflow" );␊ |
1935 | ␉␉}␊ |
1936 | ␊ |
1937 | ␉*--yy_cp = (char) c;␊ |
1938 | ␊ |
1939 | ␉(yytext_ptr) = yy_bp;␊ |
1940 | ␉(yy_hold_char) = *yy_cp;␊ |
1941 | ␉(yy_c_buf_p) = yy_cp;␊ |
1942 | }␊ |
1943 | ␊ |
1944 | #ifndef YY_NO_INPUT␊ |
1945 | #ifdef __cplusplus␊ |
1946 | static int yyinput (void)␊ |
1947 | #else␊ |
1948 | static int input (void)␊ |
1949 | #endif␊ |
1950 | ␊ |
1951 | {␊ |
1952 | ␉int c;␊ |
1953 | ␊ |
1954 | ␉*(yy_c_buf_p) = (yy_hold_char);␊ |
1955 | ␊ |
1956 | ␉if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )␊ |
1957 | ␉␉{␊ |
1958 | ␉␉/* yy_c_buf_p now points to the character we want to return.␊ |
1959 | ␉␉ * If this occurs *before* the EOB characters, then it's a␊ |
1960 | ␉␉ * valid NUL; if not, then we've hit the end of the buffer.␊ |
1961 | ␉␉ */␊ |
1962 | ␉␉if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )␊ |
1963 | ␉␉␉/* This was really a NUL. */␊ |
1964 | ␉␉␉*(yy_c_buf_p) = '\0';␊ |
1965 | ␊ |
1966 | ␉␉else␊ |
1967 | ␉␉␉{ /* need more input */␊ |
1968 | ␉␉␉yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);␊ |
1969 | ␉␉␉++(yy_c_buf_p);␊ |
1970 | ␊ |
1971 | ␉␉␉switch ( yy_get_next_buffer( ) )␊ |
1972 | ␉␉␉␉{␊ |
1973 | ␉␉␉␉case EOB_ACT_LAST_MATCH:␊ |
1974 | ␉␉␉␉␉/* This happens because yy_g_n_b()␊ |
1975 | ␉␉␉␉␉ * sees that we've accumulated a␊ |
1976 | ␉␉␉␉␉ * token and flags that we need to␊ |
1977 | ␉␉␉␉␉ * try matching the token before␊ |
1978 | ␉␉␉␉␉ * proceeding. But for input(),␊ |
1979 | ␉␉␉␉␉ * there's no matching to consider.␊ |
1980 | ␉␉␉␉␉ * So convert the EOB_ACT_LAST_MATCH␊ |
1981 | ␉␉␉␉␉ * to EOB_ACT_END_OF_FILE.␊ |
1982 | ␉␉␉␉␉ */␊ |
1983 | ␊ |
1984 | ␉␉␉␉␉/* Reset buffer status. */␊ |
1985 | ␉␉␉␉␉defargsYYrestart(defargsYYin );␊ |
1986 | ␊ |
1987 | ␉␉␉␉␉/*FALLTHROUGH*/␊ |
1988 | ␊ |
1989 | ␉␉␉␉case EOB_ACT_END_OF_FILE:␊ |
1990 | ␉␉␉␉␉{␊ |
1991 | ␉␉␉␉␉if ( defargsYYwrap( ) )␊ |
1992 | ␉␉␉␉␉␉return 0;␊ |
1993 | ␊ |
1994 | ␉␉␉␉␉if ( ! (yy_did_buffer_switch_on_eof) )␊ |
1995 | ␉␉␉␉␉␉YY_NEW_FILE;␊ |
1996 | #ifdef __cplusplus␊ |
1997 | ␉␉␉␉␉return yyinput();␊ |
1998 | #else␊ |
1999 | ␉␉␉␉␉return input();␊ |
2000 | #endif␊ |
2001 | ␉␉␉␉␉}␊ |
2002 | ␊ |
2003 | ␉␉␉␉case EOB_ACT_CONTINUE_SCAN:␊ |
2004 | ␉␉␉␉␉(yy_c_buf_p) = (yytext_ptr) + offset;␊ |
2005 | ␉␉␉␉␉break;␊ |
2006 | ␉␉␉␉}␊ |
2007 | ␉␉␉}␊ |
2008 | ␉␉}␊ |
2009 | ␊ |
2010 | ␉c = *(unsigned char *) (yy_c_buf_p);␉/* cast for 8-bit char's */␊ |
2011 | ␉*(yy_c_buf_p) = '\0';␉/* preserve defargsYYtext */␊ |
2012 | ␉(yy_hold_char) = *++(yy_c_buf_p);␊ |
2013 | ␊ |
2014 | ␉return c;␊ |
2015 | }␊ |
2016 | #endif␉/* ifndef YY_NO_INPUT */␊ |
2017 | ␊ |
2018 | /** Immediately switch to a different input stream.␊ |
2019 | * @param input_file A readable stream.␊ |
2020 | * ␊ |
2021 | * @note This function does not reset the start condition to @c INITIAL .␊ |
2022 | */␊ |
2023 | void defargsYYrestart (FILE * input_file )␊ |
2024 | {␊ |
2025 | ␊ |
2026 | ␉if ( ! YY_CURRENT_BUFFER ){␊ |
2027 | defargsYYensure_buffer_stack ();␊ |
2028 | ␉␉YY_CURRENT_BUFFER_LVALUE =␊ |
2029 | defargsYY_create_buffer(defargsYYin,YY_BUF_SIZE );␊ |
2030 | ␉}␊ |
2031 | ␊ |
2032 | ␉defargsYY_init_buffer(YY_CURRENT_BUFFER,input_file );␊ |
2033 | ␉defargsYY_load_buffer_state( );␊ |
2034 | }␊ |
2035 | ␊ |
2036 | /** Switch to a different input buffer.␊ |
2037 | * @param new_buffer The new input buffer.␊ |
2038 | * ␊ |
2039 | */␊ |
2040 | void defargsYY_switch_to_buffer (YY_BUFFER_STATE new_buffer )␊ |
2041 | {␊ |
2042 | ␊ |
2043 | ␉/* TODO. We should be able to replace this entire function body␊ |
2044 | ␉ * with␊ |
2045 | ␉ *␉␉defargsYYpop_buffer_state();␊ |
2046 | ␉ *␉␉defargsYYpush_buffer_state(new_buffer);␊ |
2047 | */␊ |
2048 | ␉defargsYYensure_buffer_stack ();␊ |
2049 | ␉if ( YY_CURRENT_BUFFER == new_buffer )␊ |
2050 | ␉␉return;␊ |
2051 | ␊ |
2052 | ␉if ( YY_CURRENT_BUFFER )␊ |
2053 | ␉␉{␊ |
2054 | ␉␉/* Flush out information for old buffer. */␊ |
2055 | ␉␉*(yy_c_buf_p) = (yy_hold_char);␊ |
2056 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);␊ |
2057 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);␊ |
2058 | ␉␉}␊ |
2059 | ␊ |
2060 | ␉YY_CURRENT_BUFFER_LVALUE = new_buffer;␊ |
2061 | ␉defargsYY_load_buffer_state( );␊ |
2062 | ␊ |
2063 | ␉/* We don't actually know whether we did this switch during␊ |
2064 | ␉ * EOF (defargsYYwrap()) processing, but the only time this flag␊ |
2065 | ␉ * is looked at is after defargsYYwrap() is called, so it's safe␊ |
2066 | ␉ * to go ahead and always set it.␊ |
2067 | ␉ */␊ |
2068 | ␉(yy_did_buffer_switch_on_eof) = 1;␊ |
2069 | }␊ |
2070 | ␊ |
2071 | static void defargsYY_load_buffer_state (void)␊ |
2072 | {␊ |
2073 | ␉(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;␊ |
2074 | ␉(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;␊ |
2075 | ␉defargsYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;␊ |
2076 | ␉(yy_hold_char) = *(yy_c_buf_p);␊ |
2077 | }␊ |
2078 | ␊ |
2079 | /** Allocate and initialize an input buffer state.␊ |
2080 | * @param file A readable stream.␊ |
2081 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.␊ |
2082 | * ␊ |
2083 | * @return the allocated buffer state.␊ |
2084 | */␊ |
2085 | YY_BUFFER_STATE defargsYY_create_buffer (FILE * file, int size )␊ |
2086 | {␊ |
2087 | ␉YY_BUFFER_STATE b;␊ |
2088 | ␊ |
2089 | ␉b = (YY_BUFFER_STATE) defargsYYalloc(sizeof( struct yy_buffer_state ) );␊ |
2090 | ␉if ( ! b )␊ |
2091 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in defargsYY_create_buffer()" );␊ |
2092 | ␊ |
2093 | ␉b->yy_buf_size = size;␊ |
2094 | ␊ |
2095 | ␉/* yy_ch_buf has to be 2 characters longer than the size given because␊ |
2096 | ␉ * we need to put in 2 end-of-buffer characters.␊ |
2097 | ␉ */␊ |
2098 | ␉b->yy_ch_buf = (char *) defargsYYalloc(b->yy_buf_size + 2 );␊ |
2099 | ␉if ( ! b->yy_ch_buf )␊ |
2100 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in defargsYY_create_buffer()" );␊ |
2101 | ␊ |
2102 | ␉b->yy_is_our_buffer = 1;␊ |
2103 | ␊ |
2104 | ␉defargsYY_init_buffer(b,file );␊ |
2105 | ␊ |
2106 | ␉return b;␊ |
2107 | }␊ |
2108 | ␊ |
2109 | /** Destroy the buffer.␊ |
2110 | * @param b a buffer created with defargsYY_create_buffer()␊ |
2111 | * ␊ |
2112 | */␊ |
2113 | void defargsYY_delete_buffer (YY_BUFFER_STATE b )␊ |
2114 | {␊ |
2115 | ␊ |
2116 | ␉if ( ! b )␊ |
2117 | ␉␉return;␊ |
2118 | ␊ |
2119 | ␉if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */␊ |
2120 | ␉␉YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;␊ |
2121 | ␊ |
2122 | ␉if ( b->yy_is_our_buffer )␊ |
2123 | ␉␉defargsYYfree((void *) b->yy_ch_buf );␊ |
2124 | ␊ |
2125 | ␉defargsYYfree((void *) b );␊ |
2126 | }␊ |
2127 | ␊ |
2128 | #ifndef __cplusplus␊ |
2129 | extern int isatty (int );␊ |
2130 | #endif /* __cplusplus */␊ |
2131 | ␊ |
2132 | /* Initializes or reinitializes a buffer.␊ |
2133 | * This function is sometimes called more than once on the same buffer,␊ |
2134 | * such as during a defargsYYrestart() or at EOF.␊ |
2135 | */␊ |
2136 | static void defargsYY_init_buffer (YY_BUFFER_STATE b, FILE * file )␊ |
2137 | ␊ |
2138 | {␊ |
2139 | ␉int oerrno = errno;␊ |
2140 | ␊ |
2141 | ␉defargsYY_flush_buffer(b );␊ |
2142 | ␊ |
2143 | ␉b->yy_input_file = file;␊ |
2144 | ␉b->yy_fill_buffer = 1;␊ |
2145 | ␊ |
2146 | /* If b is the current buffer, then defargsYY_init_buffer was _probably_␊ |
2147 | * called from defargsYYrestart() or through yy_get_next_buffer.␊ |
2148 | * In that case, we don't want to reset the lineno or column.␊ |
2149 | */␊ |
2150 | if (b != YY_CURRENT_BUFFER){␊ |
2151 | b->yy_bs_lineno = 1;␊ |
2152 | b->yy_bs_column = 0;␊ |
2153 | }␊ |
2154 | ␊ |
2155 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;␊ |
2156 | ␊ |
2157 | ␉errno = oerrno;␊ |
2158 | }␊ |
2159 | ␊ |
2160 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called.␊ |
2161 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.␊ |
2162 | * ␊ |
2163 | */␊ |
2164 | void defargsYY_flush_buffer (YY_BUFFER_STATE b )␊ |
2165 | {␊ |
2166 | ␉if ( ! b )␊ |
2167 | ␉␉return;␊ |
2168 | ␊ |
2169 | ␉b->yy_n_chars = 0;␊ |
2170 | ␊ |
2171 | ␉/* We always need two end-of-buffer characters. The first causes␊ |
2172 | ␉ * a transition to the end-of-buffer state. The second causes␊ |
2173 | ␉ * a jam in that state.␊ |
2174 | ␉ */␊ |
2175 | ␉b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;␊ |
2176 | ␉b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;␊ |
2177 | ␊ |
2178 | ␉b->yy_buf_pos = &b->yy_ch_buf[0];␊ |
2179 | ␊ |
2180 | ␉b->yy_at_bol = 1;␊ |
2181 | ␉b->yy_buffer_status = YY_BUFFER_NEW;␊ |
2182 | ␊ |
2183 | ␉if ( b == YY_CURRENT_BUFFER )␊ |
2184 | ␉␉defargsYY_load_buffer_state( );␊ |
2185 | }␊ |
2186 | ␊ |
2187 | /** Pushes the new state onto the stack. The new state becomes␊ |
2188 | * the current state. This function will allocate the stack␊ |
2189 | * if necessary.␊ |
2190 | * @param new_buffer The new state.␊ |
2191 | * ␊ |
2192 | */␊ |
2193 | void defargsYYpush_buffer_state (YY_BUFFER_STATE new_buffer )␊ |
2194 | {␊ |
2195 | ␉if (new_buffer == NULL)␊ |
2196 | ␉␉return;␊ |
2197 | ␊ |
2198 | ␉defargsYYensure_buffer_stack();␊ |
2199 | ␊ |
2200 | ␉/* This block is copied from defargsYY_switch_to_buffer. */␊ |
2201 | ␉if ( YY_CURRENT_BUFFER )␊ |
2202 | ␉␉{␊ |
2203 | ␉␉/* Flush out information for old buffer. */␊ |
2204 | ␉␉*(yy_c_buf_p) = (yy_hold_char);␊ |
2205 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);␊ |
2206 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);␊ |
2207 | ␉␉}␊ |
2208 | ␊ |
2209 | ␉/* Only push if top exists. Otherwise, replace top. */␊ |
2210 | ␉if (YY_CURRENT_BUFFER)␊ |
2211 | ␉␉(yy_buffer_stack_top)++;␊ |
2212 | ␉YY_CURRENT_BUFFER_LVALUE = new_buffer;␊ |
2213 | ␊ |
2214 | ␉/* copied from defargsYY_switch_to_buffer. */␊ |
2215 | ␉defargsYY_load_buffer_state( );␊ |
2216 | ␉(yy_did_buffer_switch_on_eof) = 1;␊ |
2217 | }␊ |
2218 | ␊ |
2219 | /** Removes and deletes the top of the stack, if present.␊ |
2220 | * The next element becomes the new top.␊ |
2221 | * ␊ |
2222 | */␊ |
2223 | void defargsYYpop_buffer_state (void)␊ |
2224 | {␊ |
2225 | ␉if (!YY_CURRENT_BUFFER)␊ |
2226 | ␉␉return;␊ |
2227 | ␊ |
2228 | ␉defargsYY_delete_buffer(YY_CURRENT_BUFFER );␊ |
2229 | ␉YY_CURRENT_BUFFER_LVALUE = NULL;␊ |
2230 | ␉if ((yy_buffer_stack_top) > 0)␊ |
2231 | ␉␉--(yy_buffer_stack_top);␊ |
2232 | ␊ |
2233 | ␉if (YY_CURRENT_BUFFER) {␊ |
2234 | ␉␉defargsYY_load_buffer_state( );␊ |
2235 | ␉␉(yy_did_buffer_switch_on_eof) = 1;␊ |
2236 | ␉}␊ |
2237 | }␊ |
2238 | ␊ |
2239 | /* Allocates the stack if it does not exist.␊ |
2240 | * Guarantees space for at least one push.␊ |
2241 | */␊ |
2242 | static void defargsYYensure_buffer_stack (void)␊ |
2243 | {␊ |
2244 | ␉yy_size_t num_to_alloc;␊ |
2245 | ␊ |
2246 | ␉if (!(yy_buffer_stack)) {␊ |
2247 | ␊ |
2248 | ␉␉/* First allocation is just for 2 elements, since we don't know if this␊ |
2249 | ␉␉ * scanner will even need a stack. We use 2 instead of 1 to avoid an␊ |
2250 | ␉␉ * immediate realloc on the next call.␊ |
2251 | */␊ |
2252 | ␉␉num_to_alloc = 1;␊ |
2253 | ␉␉(yy_buffer_stack) = (struct yy_buffer_state**)defargsYYalloc␊ |
2254 | ␉␉␉␉␉␉␉␉(num_to_alloc * sizeof(struct yy_buffer_state*)␊ |
2255 | ␉␉␉␉␉␉␉␉);␊ |
2256 | ␉␉if ( ! (yy_buffer_stack) )␊ |
2257 | ␉␉␉YY_FATAL_ERROR( "out of dynamic memory in defargsYYensure_buffer_stack()" );␊ |
2258 | ␉␉␉␉␉␉␉␉ ␊ |
2259 | ␉␉memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));␊ |
2260 | ␉␉␉␉␊ |
2261 | ␉␉(yy_buffer_stack_max) = num_to_alloc;␊ |
2262 | ␉␉(yy_buffer_stack_top) = 0;␊ |
2263 | ␉␉return;␊ |
2264 | ␉}␊ |
2265 | ␊ |
2266 | ␉if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){␊ |
2267 | ␊ |
2268 | ␉␉/* Increase the buffer to prepare for a possible push. */␊ |
2269 | ␉␉int grow_size = 8 /* arbitrary grow size */;␊ |
2270 | ␊ |
2271 | ␉␉num_to_alloc = (yy_buffer_stack_max) + grow_size;␊ |
2272 | ␉␉(yy_buffer_stack) = (struct yy_buffer_state**)defargsYYrealloc␊ |
2273 | ␉␉␉␉␉␉␉␉((yy_buffer_stack),␊ |
2274 | ␉␉␉␉␉␉␉␉num_to_alloc * sizeof(struct yy_buffer_state*)␊ |
2275 | ␉␉␉␉␉␉␉␉);␊ |
2276 | ␉␉if ( ! (yy_buffer_stack) )␊ |
2277 | ␉␉␉YY_FATAL_ERROR( "out of dynamic memory in defargsYYensure_buffer_stack()" );␊ |
2278 | ␊ |
2279 | ␉␉/* zero only the new slots.*/␊ |
2280 | ␉␉memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));␊ |
2281 | ␉␉(yy_buffer_stack_max) = num_to_alloc;␊ |
2282 | ␉}␊ |
2283 | }␊ |
2284 | ␊ |
2285 | /** Setup the input buffer state to scan directly from a user-specified character buffer.␊ |
2286 | * @param base the character buffer␊ |
2287 | * @param size the size in bytes of the character buffer␊ |
2288 | * ␊ |
2289 | * @return the newly allocated buffer state object. ␊ |
2290 | */␊ |
2291 | YY_BUFFER_STATE defargsYY_scan_buffer (char * base, yy_size_t size )␊ |
2292 | {␊ |
2293 | ␉YY_BUFFER_STATE b;␊ |
2294 | ␊ |
2295 | ␉if ( size < 2 ||␊ |
2296 | ␉ base[size-2] != YY_END_OF_BUFFER_CHAR ||␊ |
2297 | ␉ base[size-1] != YY_END_OF_BUFFER_CHAR )␊ |
2298 | ␉␉/* They forgot to leave room for the EOB's. */␊ |
2299 | ␉␉return 0;␊ |
2300 | ␊ |
2301 | ␉b = (YY_BUFFER_STATE) defargsYYalloc(sizeof( struct yy_buffer_state ) );␊ |
2302 | ␉if ( ! b )␊ |
2303 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in defargsYY_scan_buffer()" );␊ |
2304 | ␊ |
2305 | ␉b->yy_buf_size = size - 2;␉/* "- 2" to take care of EOB's */␊ |
2306 | ␉b->yy_buf_pos = b->yy_ch_buf = base;␊ |
2307 | ␉b->yy_is_our_buffer = 0;␊ |
2308 | ␉b->yy_input_file = 0;␊ |
2309 | ␉b->yy_n_chars = b->yy_buf_size;␊ |
2310 | ␉b->yy_is_interactive = 0;␊ |
2311 | ␉b->yy_at_bol = 1;␊ |
2312 | ␉b->yy_fill_buffer = 0;␊ |
2313 | ␉b->yy_buffer_status = YY_BUFFER_NEW;␊ |
2314 | ␊ |
2315 | ␉defargsYY_switch_to_buffer(b );␊ |
2316 | ␊ |
2317 | ␉return b;␊ |
2318 | }␊ |
2319 | ␊ |
2320 | /** Setup the input buffer state to scan a string. The next call to defargsYYlex() will␊ |
2321 | * scan from a @e copy of @a str.␊ |
2322 | * @param yystr a NUL-terminated string to scan␊ |
2323 | * ␊ |
2324 | * @return the newly allocated buffer state object.␊ |
2325 | * @note If you want to scan bytes that may contain NUL values, then use␊ |
2326 | * defargsYY_scan_bytes() instead.␊ |
2327 | */␊ |
2328 | YY_BUFFER_STATE defargsYY_scan_string (yyconst char * yystr )␊ |
2329 | {␊ |
2330 | ␊ |
2331 | ␉return defargsYY_scan_bytes(yystr,strlen(yystr) );␊ |
2332 | }␊ |
2333 | ␊ |
2334 | /** Setup the input buffer state to scan the given bytes. The next call to defargsYYlex() will␊ |
2335 | * scan from a @e copy of @a bytes.␊ |
2336 | * @param bytes the byte buffer to scan␊ |
2337 | * @param len the number of bytes in the buffer pointed to by @a bytes.␊ |
2338 | * ␊ |
2339 | * @return the newly allocated buffer state object.␊ |
2340 | */␊ |
2341 | YY_BUFFER_STATE defargsYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )␊ |
2342 | {␊ |
2343 | ␉YY_BUFFER_STATE b;␊ |
2344 | ␉char *buf;␊ |
2345 | ␉yy_size_t n, i;␊ |
2346 | ␊ |
2347 | ␉/* Get memory for full buffer, including space for trailing EOB's. */␊ |
2348 | ␉n = _yybytes_len + 2;␊ |
2349 | ␉buf = (char *) defargsYYalloc(n );␊ |
2350 | ␉if ( ! buf )␊ |
2351 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in defargsYY_scan_bytes()" );␊ |
2352 | ␊ |
2353 | ␉for ( i = 0; i < _yybytes_len; ++i )␊ |
2354 | ␉␉buf[i] = yybytes[i];␊ |
2355 | ␊ |
2356 | ␉buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;␊ |
2357 | ␊ |
2358 | ␉b = defargsYY_scan_buffer(buf,n );␊ |
2359 | ␉if ( ! b )␊ |
2360 | ␉␉YY_FATAL_ERROR( "bad buffer in defargsYY_scan_bytes()" );␊ |
2361 | ␊ |
2362 | ␉/* It's okay to grow etc. this buffer, and we should throw it␊ |
2363 | ␉ * away when we're done.␊ |
2364 | ␉ */␊ |
2365 | ␉b->yy_is_our_buffer = 1;␊ |
2366 | ␊ |
2367 | ␉return b;␊ |
2368 | }␊ |
2369 | ␊ |
2370 | #ifndef YY_EXIT_FAILURE␊ |
2371 | #define YY_EXIT_FAILURE 2␊ |
2372 | #endif␊ |
2373 | ␊ |
2374 | static void yy_fatal_error (yyconst char* msg )␊ |
2375 | {␊ |
2376 | ␉(void) fprintf( stderr, "%s\n", msg );␊ |
2377 | ␉exit( YY_EXIT_FAILURE );␊ |
2378 | }␊ |
2379 | ␊ |
2380 | /* Redefine yyless() so it works in section 3 code. */␊ |
2381 | ␊ |
2382 | #undef yyless␊ |
2383 | #define yyless(n) \␊ |
2384 | ␉do \␊ |
2385 | ␉␉{ \␊ |
2386 | ␉␉/* Undo effects of setting up defargsYYtext. */ \␊ |
2387 | int yyless_macro_arg = (n); \␊ |
2388 | YY_LESS_LINENO(yyless_macro_arg);\␊ |
2389 | ␉␉defargsYYtext[defargsYYleng] = (yy_hold_char); \␊ |
2390 | ␉␉(yy_c_buf_p) = defargsYYtext + yyless_macro_arg; \␊ |
2391 | ␉␉(yy_hold_char) = *(yy_c_buf_p); \␊ |
2392 | ␉␉*(yy_c_buf_p) = '\0'; \␊ |
2393 | ␉␉defargsYYleng = yyless_macro_arg; \␊ |
2394 | ␉␉} \␊ |
2395 | ␉while ( 0 )␊ |
2396 | ␊ |
2397 | /* Accessor methods (get/set functions) to struct members. */␊ |
2398 | ␊ |
2399 | /** Get the current line number.␊ |
2400 | * ␊ |
2401 | */␊ |
2402 | int defargsYYget_lineno (void)␊ |
2403 | {␊ |
2404 | ␊ |
2405 | return defargsYYlineno;␊ |
2406 | }␊ |
2407 | ␊ |
2408 | /** Get the input stream.␊ |
2409 | * ␊ |
2410 | */␊ |
2411 | FILE *defargsYYget_in (void)␊ |
2412 | {␊ |
2413 | return defargsYYin;␊ |
2414 | }␊ |
2415 | ␊ |
2416 | /** Get the output stream.␊ |
2417 | * ␊ |
2418 | */␊ |
2419 | FILE *defargsYYget_out (void)␊ |
2420 | {␊ |
2421 | return defargsYYout;␊ |
2422 | }␊ |
2423 | ␊ |
2424 | /** Get the length of the current token.␊ |
2425 | * ␊ |
2426 | */␊ |
2427 | yy_size_t defargsYYget_leng (void)␊ |
2428 | {␊ |
2429 | return defargsYYleng;␊ |
2430 | }␊ |
2431 | ␊ |
2432 | /** Get the current token.␊ |
2433 | * ␊ |
2434 | */␊ |
2435 | ␊ |
2436 | char *defargsYYget_text (void)␊ |
2437 | {␊ |
2438 | return defargsYYtext;␊ |
2439 | }␊ |
2440 | ␊ |
2441 | /** Set the current line number.␊ |
2442 | * @param line_number␊ |
2443 | * ␊ |
2444 | */␊ |
2445 | void defargsYYset_lineno (int line_number )␊ |
2446 | {␊ |
2447 | ␊ |
2448 | defargsYYlineno = line_number;␊ |
2449 | }␊ |
2450 | ␊ |
2451 | /** Set the input stream. This does not discard the current␊ |
2452 | * input buffer.␊ |
2453 | * @param in_str A readable stream.␊ |
2454 | * ␊ |
2455 | * @see defargsYY_switch_to_buffer␊ |
2456 | */␊ |
2457 | void defargsYYset_in (FILE * in_str )␊ |
2458 | {␊ |
2459 | defargsYYin = in_str ;␊ |
2460 | }␊ |
2461 | ␊ |
2462 | void defargsYYset_out (FILE * out_str )␊ |
2463 | {␊ |
2464 | defargsYYout = out_str ;␊ |
2465 | }␊ |
2466 | ␊ |
2467 | int defargsYYget_debug (void)␊ |
2468 | {␊ |
2469 | return defargsYY_flex_debug;␊ |
2470 | }␊ |
2471 | ␊ |
2472 | void defargsYYset_debug (int bdebug )␊ |
2473 | {␊ |
2474 | defargsYY_flex_debug = bdebug ;␊ |
2475 | }␊ |
2476 | ␊ |
2477 | static int yy_init_globals (void)␊ |
2478 | {␊ |
2479 | /* Initialization is the same as for the non-reentrant scanner.␊ |
2480 | * This function is called from defargsYYlex_destroy(), so don't allocate here.␊ |
2481 | */␊ |
2482 | ␊ |
2483 | (yy_buffer_stack) = 0;␊ |
2484 | (yy_buffer_stack_top) = 0;␊ |
2485 | (yy_buffer_stack_max) = 0;␊ |
2486 | (yy_c_buf_p) = (char *) 0;␊ |
2487 | (yy_init) = 0;␊ |
2488 | (yy_start) = 0;␊ |
2489 | ␊ |
2490 | (yy_state_buf) = 0;␊ |
2491 | (yy_state_ptr) = 0;␊ |
2492 | (yy_full_match) = 0;␊ |
2493 | (yy_lp) = 0;␊ |
2494 | ␊ |
2495 | /* Defined in main.c */␊ |
2496 | #ifdef YY_STDINIT␊ |
2497 | defargsYYin = stdin;␊ |
2498 | defargsYYout = stdout;␊ |
2499 | #else␊ |
2500 | defargsYYin = (FILE *) 0;␊ |
2501 | defargsYYout = (FILE *) 0;␊ |
2502 | #endif␊ |
2503 | ␊ |
2504 | /* For future reference: Set errno on error, since we are called by␊ |
2505 | * defargsYYlex_init()␊ |
2506 | */␊ |
2507 | return 0;␊ |
2508 | }␊ |
2509 | ␊ |
2510 | /* defargsYYlex_destroy is for both reentrant and non-reentrant scanners. */␊ |
2511 | int defargsYYlex_destroy (void)␊ |
2512 | {␊ |
2513 | ␊ |
2514 | /* Pop the buffer stack, destroying each element. */␊ |
2515 | ␉while(YY_CURRENT_BUFFER){␊ |
2516 | ␉␉defargsYY_delete_buffer(YY_CURRENT_BUFFER );␊ |
2517 | ␉␉YY_CURRENT_BUFFER_LVALUE = NULL;␊ |
2518 | ␉␉defargsYYpop_buffer_state();␊ |
2519 | ␉}␊ |
2520 | ␊ |
2521 | ␉/* Destroy the stack itself. */␊ |
2522 | ␉defargsYYfree((yy_buffer_stack) );␊ |
2523 | ␉(yy_buffer_stack) = NULL;␊ |
2524 | ␊ |
2525 | defargsYYfree ( (yy_state_buf) );␊ |
2526 | (yy_state_buf) = NULL;␊ |
2527 | ␊ |
2528 | /* Reset the globals. This is important in a non-reentrant scanner so the next time␊ |
2529 | * defargsYYlex() is called, initialization will occur. */␊ |
2530 | yy_init_globals( );␊ |
2531 | ␊ |
2532 | return 0;␊ |
2533 | }␊ |
2534 | ␊ |
2535 | /*␊ |
2536 | * Internal utility routines.␊ |
2537 | */␊ |
2538 | ␊ |
2539 | #ifndef yytext_ptr␊ |
2540 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )␊ |
2541 | {␊ |
2542 | ␉register int i;␊ |
2543 | ␉for ( i = 0; i < n; ++i )␊ |
2544 | ␉␉s1[i] = s2[i];␊ |
2545 | }␊ |
2546 | #endif␊ |
2547 | ␊ |
2548 | #ifdef YY_NEED_STRLEN␊ |
2549 | static int yy_flex_strlen (yyconst char * s )␊ |
2550 | {␊ |
2551 | ␉register int n;␊ |
2552 | ␉for ( n = 0; s[n]; ++n )␊ |
2553 | ␉␉;␊ |
2554 | ␊ |
2555 | ␉return n;␊ |
2556 | }␊ |
2557 | #endif␊ |
2558 | ␊ |
2559 | void *defargsYYalloc (yy_size_t size )␊ |
2560 | {␊ |
2561 | ␉return (void *) malloc( size );␊ |
2562 | }␊ |
2563 | ␊ |
2564 | void *defargsYYrealloc (void * ptr, yy_size_t size )␊ |
2565 | {␊ |
2566 | ␉/* The cast to (char *) in the following accommodates both␊ |
2567 | ␉ * implementations that use char* generic pointers, and those␊ |
2568 | ␉ * that use void* generic pointers. It works with the latter␊ |
2569 | ␉ * because both ANSI C and C++ allow castless assignment from␊ |
2570 | ␉ * any pointer type to void*, and deal with argument conversions␊ |
2571 | ␉ * as though doing an assignment.␊ |
2572 | ␉ */␊ |
2573 | ␉return (void *) realloc( (char *) ptr, size );␊ |
2574 | }␊ |
2575 | ␊ |
2576 | void defargsYYfree (void * ptr )␊ |
2577 | {␊ |
2578 | ␉free( (char *) ptr );␉/* see defargsYYrealloc() for (char *) cast */␊ |
2579 | }␊ |
2580 | ␊ |
2581 | #define YYTABLES_NAME "yytables"␊ |
2582 | ␊ |
2583 | #line 438 "defargs.l"␊ |
2584 | ␊ |
2585 | ␊ |
2586 | ␊ |
2587 | /* ----------------------------------------------------------------------------␊ |
2588 | */␊ |
2589 | ␊ |
2590 | /*! Converts an argument string into an ArgumentList.␊ |
2591 | * \param argsString the list of Arguments.␊ |
2592 | * \param al a reference to resulting argument list pointer.␊ |
2593 | */␊ |
2594 | ␊ |
2595 | void stringToArgumentList(const char *argsString,ArgumentList* al,QCString *extraTypeChars)␊ |
2596 | {␊ |
2597 | if (al==0) return; ␊ |
2598 | if (argsString==0) return;␊ |
2599 | ␊ |
2600 | g_copyArgValue=0;␊ |
2601 | g_curArgDocs.resize(0);␊ |
2602 | g_curArgAttrib.resize(0);␊ |
2603 | g_curArgArray.resize(0);␊ |
2604 | g_extraTypeChars.resize(0);␊ |
2605 | g_argRoundCount = 0;␊ |
2606 | g_argSharpCount = 0;␊ |
2607 | g_argCurlyCount = 0;␊ |
2608 | g_lastDocChar = 0;␊ |
2609 | ␊ |
2610 | g_inputString = argsString;␊ |
2611 | g_inputPosition = 0;␊ |
2612 | g_curArgTypeName.resize(0);␊ |
2613 | g_curArgDefValue.resize(0);␊ |
2614 | g_curArgName.resize(0);␊ |
2615 | g_argList = al;␊ |
2616 | defargsYYrestart( defargsYYin );␊ |
2617 | BEGIN( Start );␊ |
2618 | defargsYYlex();␊ |
2619 | if (extraTypeChars) *extraTypeChars=g_extraTypeChars;␊ |
2620 | //printf("stringToArgumentList(%s) result=%s\n",argsString,argListToString(al).data());␊ |
2621 | }␊ |
2622 | ␊ |
2623 | #if !defined(YY_FLEX_SUBMINOR_VERSION) ␊ |
2624 | extern "C" { // some bogus code to keep the compiler happy␊ |
2625 | void defargsYYdummy() { yy_flex_realloc(0,0); } ␊ |
2626 | }␊ |
2627 | #endif␊ |
2628 | ␊ |
2629 | ␊ |
2630 |