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 pycodeYY_create_buffer␊ |
9 | #define yy_delete_buffer pycodeYY_delete_buffer␊ |
10 | #define yy_flex_debug pycodeYY_flex_debug␊ |
11 | #define yy_init_buffer pycodeYY_init_buffer␊ |
12 | #define yy_flush_buffer pycodeYY_flush_buffer␊ |
13 | #define yy_load_buffer_state pycodeYY_load_buffer_state␊ |
14 | #define yy_switch_to_buffer pycodeYY_switch_to_buffer␊ |
15 | #define yyin pycodeYYin␊ |
16 | #define yyleng pycodeYYleng␊ |
17 | #define yylex pycodeYYlex␊ |
18 | #define yylineno pycodeYYlineno␊ |
19 | #define yyout pycodeYYout␊ |
20 | #define yyrestart pycodeYYrestart␊ |
21 | #define yytext pycodeYYtext␊ |
22 | #define yywrap pycodeYYwrap␊ |
23 | #define yyalloc pycodeYYalloc␊ |
24 | #define yyrealloc pycodeYYrealloc␊ |
25 | #define yyfree pycodeYYfree␊ |
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 pycodeYYrestart(pycodeYYin )␊ |
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 pycodeYYleng;␊ |
180 | ␊ |
181 | extern FILE *pycodeYYin, *pycodeYYout;␊ |
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 pycodeYYtext. */ \␊ |
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 pycodeYYtext 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 pycodeYYrestart()), so that the user can continue scanning by␊ |
263 | ␉ * just pointing pycodeYYin 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 pycodeYYtext 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 pycodeYYleng;␊ |
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 pycodeYYwrap()'s to do buffer switches␊ |
301 | * instead of setting up a fresh pycodeYYin. A bit of a hack ...␊ |
302 | */␊ |
303 | static int yy_did_buffer_switch_on_eof;␊ |
304 | ␊ |
305 | void pycodeYYrestart (FILE *input_file );␊ |
306 | void pycodeYY_switch_to_buffer (YY_BUFFER_STATE new_buffer );␊ |
307 | YY_BUFFER_STATE pycodeYY_create_buffer (FILE *file,int size );␊ |
308 | void pycodeYY_delete_buffer (YY_BUFFER_STATE b );␊ |
309 | void pycodeYY_flush_buffer (YY_BUFFER_STATE b );␊ |
310 | void pycodeYYpush_buffer_state (YY_BUFFER_STATE new_buffer );␊ |
311 | void pycodeYYpop_buffer_state (void );␊ |
312 | ␊ |
313 | static void pycodeYYensure_buffer_stack (void );␊ |
314 | static void pycodeYY_load_buffer_state (void );␊ |
315 | static void pycodeYY_init_buffer (YY_BUFFER_STATE b,FILE *file );␊ |
316 | ␊ |
317 | #define YY_FLUSH_BUFFER pycodeYY_flush_buffer(YY_CURRENT_BUFFER )␊ |
318 | ␊ |
319 | YY_BUFFER_STATE pycodeYY_scan_buffer (char *base,yy_size_t size );␊ |
320 | YY_BUFFER_STATE pycodeYY_scan_string (yyconst char *yy_str );␊ |
321 | YY_BUFFER_STATE pycodeYY_scan_bytes (yyconst char *bytes,yy_size_t len );␊ |
322 | ␊ |
323 | void *pycodeYYalloc (yy_size_t );␊ |
324 | void *pycodeYYrealloc (void *,yy_size_t );␊ |
325 | void pycodeYYfree (void * );␊ |
326 | ␊ |
327 | #define yy_new_buffer pycodeYY_create_buffer␊ |
328 | ␊ |
329 | #define yy_set_interactive(is_interactive) \␊ |
330 | ␉{ \␊ |
331 | ␉if ( ! YY_CURRENT_BUFFER ){ \␊ |
332 | pycodeYYensure_buffer_stack (); \␊ |
333 | ␉␉YY_CURRENT_BUFFER_LVALUE = \␊ |
334 | pycodeYY_create_buffer(pycodeYYin,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 | pycodeYYensure_buffer_stack (); \␊ |
343 | ␉␉YY_CURRENT_BUFFER_LVALUE = \␊ |
344 | pycodeYY_create_buffer(pycodeYYin,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 pycodeYYwrap(n) 1␊ |
354 | #define YY_SKIP_YYWRAP␊ |
355 | ␊ |
356 | typedef unsigned char YY_CHAR;␊ |
357 | ␊ |
358 | FILE *pycodeYYin = (FILE *) 0, *pycodeYYout = (FILE *) 0;␊ |
359 | ␊ |
360 | typedef int yy_state_type;␊ |
361 | ␊ |
362 | extern int pycodeYYlineno;␊ |
363 | ␊ |
364 | int pycodeYYlineno = 1;␊ |
365 | ␊ |
366 | extern char *pycodeYYtext;␊ |
367 | #define yytext_ptr pycodeYYtext␊ |
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 pycodeYYtext.␊ |
376 | */␊ |
377 | #define YY_DO_BEFORE_ACTION \␊ |
378 | ␉(yytext_ptr) = yy_bp; \␊ |
379 | ␉pycodeYYleng = (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 57␊ |
385 | #define YY_END_OF_BUFFER 58␊ |
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[946] =␊ |
394 | { 0,␊ |
395 | 16412,16412, 58, 56, 57, 55, 56, 57, 54, 57,␊ |
396 | 52, 56, 57, 53, 56, 57, 51, 56, 57, 56,␊ |
397 | 57, 56, 57, 56, 57, 31, 54, 57, 17, 30,␊ |
398 | 56, 57, 17, 30, 56, 57, 17, 30, 56, 57,␊ |
399 | 17, 30, 56, 57, 17, 30, 56, 57, 17, 30,␊ |
400 | 56, 57, 17, 30, 56, 57, 17, 30, 56, 57,␊ |
401 | 17, 30, 56, 57, 17, 30, 56, 57, 17, 30,␊ |
402 | 56, 57, 17, 30, 56, 57, 17, 30, 56, 57,␊ |
403 | 17, 30, 56, 57, 17, 30, 56, 57, 17, 30,␊ |
404 | 56, 57, 17, 30, 56, 57, 17, 30, 56, 57,␊ |
405 | ␊ |
406 | 17, 30, 56, 57, 17, 30, 56, 57, 17, 30,␊ |
407 | 56, 57, 17, 30, 56, 57, 17, 30, 56, 57,␊ |
408 | 17, 30, 56, 57, 55, 56, 57, 10, 56, 57,␊ |
409 | 9, 56, 57, 9, 56, 57, 9, 56, 57, 9,␊ |
410 | 56, 57, 12, 56, 57, 11, 55, 56, 57, 12,␊ |
411 | 52, 56, 57, 12, 53, 56, 57, 12, 51, 56,␊ |
412 | 57, 13, 56, 57, 11, 12, 56, 57, 14, 56,␊ |
413 | 57, 12, 56, 57, 12, 56, 57, 12, 56, 57,␊ |
414 | 12, 56, 57, 5, 56, 57, 5, 56, 57, 5,␊ |
415 | 56, 57, 5, 56, 57, 6, 55, 56, 57, 6,␊ |
416 | ␊ |
417 | 56, 57, 8, 56, 57, 7, 56, 57, 7, 56,␊ |
418 | 57, 7, 56, 57, 7, 56, 57, 29, 54, 57,␊ |
419 | 17, 56, 57, 17, 56, 57, 17, 56, 57, 17,␊ |
420 | 56, 57, 17, 56, 57, 17, 56, 57, 17, 56,␊ |
421 | 57, 17, 56, 57, 17, 56, 57, 17, 56, 57,␊ |
422 | 17, 56, 57, 17, 56, 57, 17, 56, 57, 17,␊ |
423 | 56, 57, 17, 56, 57, 17, 56, 57, 17, 56,␊ |
424 | 57, 17, 56, 57, 17, 56, 57, 17, 56, 57,␊ |
425 | 17, 56, 57, 17, 56, 57, 17, 56, 57, 17,␊ |
426 | 56, 57, 25, 55, 56, 57, 24, 54, 57, 18,␊ |
427 | ␊ |
428 | 55, 56, 57, 23, 54, 57, 22, 53, 56, 57,␊ |
429 | 21, 56, 57, 21, 56, 57, 21, 56, 57, 21,␊ |
430 | 56, 57, 21, 56, 57, 21, 56, 57, 21, 56,␊ |
431 | 57, 21, 56, 57, 21, 56, 57, 21, 56, 57,␊ |
432 | 21, 56, 57, 21, 56, 57, 21, 56, 57, 21,␊ |
433 | 56, 57, 21, 56, 57, 21, 56, 57, 21, 56,␊ |
434 | 57, 21, 56, 57, 21, 56, 57, 21, 56, 57,␊ |
435 | 21, 56, 57, 21, 56, 57, 55, 56, 57,16410,␊ |
436 | 27, 54, 57, 8220, 56, 57, 8220, 53, 56, 57,␊ |
437 | 8220, 56, 57, 8220, 56, 57, 8220, 56, 57, 36,␊ |
438 | ␊ |
439 | 37, 56, 57, 36, 37, 55, 56, 57, 37, 52,␊ |
440 | 56, 57, 36, 37, 53, 56, 57, 35, 37, 51,␊ |
441 | 56, 57, 36, 37, 56, 57, 36, 37, 56, 57,␊ |
442 | 37, 56, 57, 36, 37, 56, 57, 42, 43, 56,␊ |
443 | 57, 42, 43, 55, 56, 57, 41, 43, 52, 56,␊ |
444 | 57, 42, 43, 53, 56, 57, 43, 51, 56, 57,␊ |
445 | 42, 43, 56, 57, 42, 43, 56, 57, 43, 56,␊ |
446 | 57, 42, 43, 56, 57, 46, 48, 56, 57, 46,␊ |
447 | 48, 55, 56, 57, 46, 47, 54, 57, 46, 48,␊ |
448 | 52, 56, 57, 46, 48, 53, 56, 57, 46, 48,␊ |
449 | ␊ |
450 | 51, 56, 57, 46, 48, 56, 57, 46, 48, 56,␊ |
451 | 57, 48, 56, 57, 46, 48, 56, 57, 55, 53,␊ |
452 | 52, 51, 17, 30, 17, 30, 17, 30, 17, 30,␊ |
453 | 17, 30, 17, 30, 15, 17, 30, 17, 30, 17,␊ |
454 | 30, 17, 30, 17, 30, 17, 30, 17, 30, 17,␊ |
455 | 30, 17, 30, 17, 30, 17, 30, 16, 17, 30,␊ |
456 | 17, 30, 16, 17, 30, 17, 30, 17, 30, 17,␊ |
457 | 30, 17, 30, 17, 30, 17, 30, 17, 30, 17,␊ |
458 | 30, 17, 30, 17, 30, 55, 10, 9, 9, 12,␊ |
459 | 11, 55, 12, 12, 53, 12, 12, 12, 52, 12,␊ |
460 | ␊ |
461 | 51, 12, 5, 5, 6, 55, 7, 7, 17, 17,␊ |
462 | 17, 17, 17, 17, 15, 17, 17, 17, 17, 17,␊ |
463 | 17, 17, 17, 17, 17, 17, 16, 17, 17, 16,␊ |
464 | 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,␊ |
465 | 17, 25, 55, 24, 18, 55, 22, 53, 21, 21,␊ |
466 | 21, 21, 21, 19, 21, 21, 21, 21, 21, 21,␊ |
467 | 21, 21, 21, 21, 21, 20, 21, 21, 20, 21,␊ |
468 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 55,␊ |
469 | 16410, 27, 8218, 36, 36, 55, 36, 53, 52, 36,␊ |
470 | 33, 33, 32, 42, 42, 55, 42, 53, 51, 42,␊ |
471 | ␊ |
472 | 39, 39, 38, 46, 46, 55, 46, 46, 53, 53,␊ |
473 | 46, 46, 50, 49, 17, 30, 17, 30, 17, 30,␊ |
474 | 17, 30, 17, 30, 17, 30, 17, 30, 15, 17,␊ |
475 | 30, 17, 30, 17, 30, 17, 30, 17, 30, 17,␊ |
476 | 30, 17, 30, 17, 30, 17, 30, 17, 30, 17,␊ |
477 | 30, 17, 30, 17, 30, 17, 30, 17, 30, 17,␊ |
478 | 30, 12, 50, 12, 49, 17, 17, 17, 17, 17,␊ |
479 | 17, 17, 15, 17, 17, 17, 17, 17, 17, 17,␊ |
480 | 17, 17, 17, 17, 17, 17, 17, 17, 17, 21,␊ |
481 | 21, 21, 21, 21, 21, 19, 21, 21, 21, 21,␊ |
482 | ␊ |
483 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
484 | 21, 34, 50, 40, 49, 44, 50, 45, 49, 17,␊ |
485 | 30, 3, 17, 30, 15, 17, 30, 17, 30, 17,␊ |
486 | 30, 17, 30, 17, 30, 1, 17, 30, 17, 30,␊ |
487 | 17, 30, 17, 30, 17, 30, 17, 30, 17, 30,␊ |
488 | 17, 30, 17, 30, 17, 30, 17, 30, 17, 3,␊ |
489 | 17, 15, 17, 17, 17, 17, 17, 17, 17, 17,␊ |
490 | 17, 17, 17, 17, 17, 17, 17, 17, 21, 21,␊ |
491 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
492 | 21, 21, 21, 17, 30, 15, 17, 30, 17, 30,␊ |
493 | ␊ |
494 | 17, 30, 17, 30, 17, 30, 17, 30, 17, 30,␊ |
495 | 17, 30, 17, 15, 17, 17, 17, 17, 17, 17,␊ |
496 | 17, 17, 21, 21, 21, 21, 21, 21, 21, 21,␊ |
497 | 2, 17, 30, 17, 30, 4, 17, 17, 21, 21,␊ |
498 | 17, 30, 4, 17, 21␊ |
499 | } ;␊ |
500 | ␊ |
501 | static yyconst flex_int16_t yy_accept[498] =␊ |
502 | { 0,␊ |
503 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
504 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,␊ |
505 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,␊ |
506 | 3, 4, 6, 9, 11, 14, 17, 20, 22, 24,␊ |
507 | 26, 29, 33, 37, 41, 45, 49, 53, 57, 61,␊ |
508 | 65, 69, 73, 77, 81, 85, 89, 93, 97, 101,␊ |
509 | 105, 109, 113, 117, 121, 125, 128, 131, 134, 137,␊ |
510 | 140, 143, 146, 150, 154, 158, 162, 165, 169, 172,␊ |
511 | 175, 178, 181, 184, 187, 190, 193, 196, 200, 203,␊ |
512 | 206, 209, 212, 215, 218, 221, 224, 227, 230, 233,␊ |
513 | ␊ |
514 | 236, 239, 242, 245, 248, 251, 254, 257, 260, 263,␊ |
515 | 266, 269, 272, 275, 278, 281, 284, 287, 290, 293,␊ |
516 | 297, 300, 304, 307, 311, 314, 317, 320, 323, 326,␊ |
517 | 329, 332, 335, 338, 341, 344, 347, 350, 353, 356,␊ |
518 | 359, 362, 365, 368, 371, 374, 377, 381, 384, 387,␊ |
519 | 391, 394, 397, 400, 404, 409, 413, 418, 423, 427,␊ |
520 | 431, 434, 438, 442, 447, 452, 457, 461, 465, 469,␊ |
521 | 472, 476, 480, 485, 489, 494, 499, 504, 508, 512,␊ |
522 | 515, 519, 520, 520, 521, 521, 522, 523, 523, 525,␊ |
523 | 527, 529, 531, 533, 535, 538, 540, 542, 544, 546,␊ |
524 | ␊ |
525 | 548, 550, 552, 554, 556, 558, 561, 563, 566, 568,␊ |
526 | 570, 572, 574, 576, 578, 580, 582, 584, 586, 587,␊ |
527 | 588, 589, 590, 591, 593, 594, 596, 597, 598, 600,␊ |
528 | 602, 603, 604, 605, 607, 608, 609, 610, 611, 612,␊ |
529 | 613, 614, 615, 617, 618, 619, 620, 621, 622, 623,␊ |
530 | 624, 625, 626, 627, 629, 630, 632, 633, 634, 635,␊ |
531 | 636, 637, 638, 639, 640, 641, 642, 644, 645, 647,␊ |
532 | 649, 650, 651, 652, 653, 654, 656, 657, 658, 659,␊ |
533 | 660, 661, 662, 663, 664, 665, 666, 668, 669, 671,␊ |
534 | 672, 673, 674, 675, 676, 677, 678, 679, 680, 682,␊ |
535 | ␊ |
536 | 683, 684, 685, 687, 687, 689, 690, 691, 692, 693,␊ |
537 | 694, 695, 697, 699, 699, 700, 701, 702, 703, 704,␊ |
538 | 705, 705, 707, 708, 710, 711, 712, 713, 714, 715,␊ |
539 | 717, 719, 721, 723, 725, 727, 729, 732, 734, 736,␊ |
540 | 738, 740, 742, 744, 746, 748, 750, 752, 754, 756,␊ |
541 | 758, 760, 762, 764, 766, 767, 768, 769, 770, 771,␊ |
542 | 772, 773, 775, 776, 777, 778, 779, 780, 781, 782,␊ |
543 | 783, 784, 785, 786, 787, 788, 789, 790, 791, 792,␊ |
544 | 793, 794, 795, 796, 798, 799, 800, 801, 802, 803,␊ |
545 | 804, 805, 806, 807, 808, 809, 810, 811, 812, 814,␊ |
546 | ␊ |
547 | 814, 816, 816, 818, 820, 822, 825, 828, 830, 832,␊ |
548 | 834, 836, 837, 839, 841, 843, 845, 847, 849, 851,␊ |
549 | 853, 855, 857, 859, 860, 862, 864, 865, 866, 867,␊ |
550 | 868, 869, 870, 871, 872, 873, 874, 875, 876, 877,␊ |
551 | 878, 879, 880, 881, 882, 883, 884, 885, 886, 887,␊ |
552 | 888, 889, 890, 891, 892, 893, 894, 896, 899, 901,␊ |
553 | 903, 905, 907, 909, 911, 913, 913, 914, 916, 917,␊ |
554 | 918, 919, 920, 921, 922, 923, 924, 925, 926, 927,␊ |
555 | 928, 929, 930, 931, 932, 934, 936, 937, 938, 939,␊ |
556 | 940, 941, 943, 944, 945, 946, 946␊ |
557 | ␊ |
558 | } ;␊ |
559 | ␊ |
560 | static yyconst flex_int32_t yy_ec[256] =␊ |
561 | { 0,␊ |
562 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,␊ |
563 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
564 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
565 | 1, 2, 4, 5, 6, 1, 4, 4, 7, 8,␊ |
566 | 9, 4, 4, 10, 4, 11, 4, 12, 12, 12,␊ |
567 | 12, 12, 12, 12, 12, 12, 12, 13, 4, 4,␊ |
568 | 4, 4, 1, 1, 14, 14, 14, 14, 14, 15,␊ |
569 | 14, 14, 14, 14, 14, 14, 14, 16, 14, 14,␊ |
570 | 14, 17, 14, 18, 19, 14, 14, 14, 14, 14,␊ |
571 | 4, 20, 4, 1, 21, 4, 22, 23, 24, 25,␊ |
572 | ␊ |
573 | 26, 27, 28, 29, 30, 14, 31, 32, 33, 34,␊ |
574 | 35, 36, 14, 37, 38, 39, 40, 14, 41, 42,␊ |
575 | 43, 14, 4, 4, 4, 4, 1, 1, 1, 1,␊ |
576 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
577 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
578 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
579 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
580 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
581 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
582 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
583 | ␊ |
584 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
585 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
586 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
587 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
588 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
589 | 1, 1, 1, 1, 1␊ |
590 | } ;␊ |
591 | ␊ |
592 | static yyconst flex_int32_t yy_meta[44] =␊ |
593 | { 0,␊ |
594 | 1, 2, 3, 4, 5, 4, 5, 2, 2, 4,␊ |
595 | 4, 6, 2, 7, 7, 7, 7, 7, 7, 8,␊ |
596 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,␊ |
597 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,␊ |
598 | 7, 7, 7␊ |
599 | } ;␊ |
600 | ␊ |
601 | static yyconst flex_int16_t yy_base[524] =␊ |
602 | { 0,␊ |
603 | 0, 39, 79, 0, 122, 0, 165, 0, 208, 0,␊ |
604 | 251, 0, 294, 0, 6, 8, 337, 0, 380, 420,␊ |
605 | 0, 0, 0, 0, 459, 498, 537, 576, 615, 654,␊ |
606 | 1136, 1137, 1133, 1137, 1129, 0, 1126, 7, 11, 15,␊ |
607 | 1137, 0, 1110, 1096, 8, 1093, 16, 0, 1092, 4,␊ |
608 | 1102, 15, 24, 1095, 33, 1104, 1090, 1087, 13, 383,␊ |
609 | 1097, 1085, 387, 1092, 1090, 22, 1137, 0, 20, 391,␊ |
610 | 395, 0, 1117, 1113, 60, 1110, 1137, 0, 1137, 694,␊ |
611 | 714, 12, 14, 0, 58, 396, 431, 1114, 1137, 1137,␊ |
612 | 0, 65, 435, 436, 1137, 0, 1093, 1079, 70, 1076,␊ |
613 | ␊ |
614 | 470, 40, 1075, 375, 1085, 374, 354, 1078, 417, 1087,␊ |
615 | 1073, 1070, 392, 462, 1080, 1068, 475, 1075, 1073, 416,␊ |
616 | 1137, 1100, 1137, 0, 0, 1079, 388, 1063, 476, 377,␊ |
617 | 1062, 399, 1072, 403, 419, 1065, 464, 1074, 1060, 1057,␊ |
618 | 437, 501, 1056, 504, 1063, 1061, 444, 1137, 1137, 0,␊ |
619 | 509, 515, 529, 0, 1088, 1084, 540, 1081, 519, 548,␊ |
620 | 468, 554, 0, 1085, 1081, 543, 1078, 523, 563, 483,␊ |
621 | 582, 1064, 517, 1063, 1077, 581, 1074, 544, 587, 526,␊ |
622 | 621, 1078, 1074, 0, 1071, 1072, 1069, 562, 0, 1043,␊ |
623 | 1040, 1033, 568, 1047, 1033, 1044, 1047, 1034, 1040, 560,␊ |
624 | ␊ |
625 | 1042, 1031, 1027, 1028, 1027, 0, 1025, 0, 1027, 1020,␊ |
626 | 1020, 1027, 1026, 1016, 1022, 1010, 1022, 1025, 487, 1137,␊ |
627 | 0, 598, 0, 1048, 1044, 631, 1041, 601, 1042, 1039,␊ |
628 | 0, 0, 604, 1043, 0, 605, 0, 1012, 1009, 1002,␊ |
629 | 618, 1016, 1002, 1013, 1016, 1003, 1009, 599, 1011, 1000,␊ |
630 | 996, 997, 996, 0, 994, 0, 996, 989, 989, 996,␊ |
631 | 995, 985, 991, 979, 991, 994, 612, 1137, 1017, 0,␊ |
632 | 0, 986, 977, 638, 991, 977, 988, 991, 978, 984,␊ |
633 | 612, 986, 975, 971, 972, 971, 0, 969, 0, 971,␊ |
634 | 964, 964, 971, 970, 960, 955, 967, 970, 628, 1137,␊ |
635 | ␊ |
636 | 1137, 0, 993, 989, 642, 988, 641, 1137, 651, 1137,␊ |
637 | 0, 990, 658, 984, 983, 659, 1137, 665, 1137, 969,␊ |
638 | 672, 556, 983, 677, 984, 979, 665, 1137, 1137, 947,␊ |
639 | 958, 957, 956, 959, 942, 940, 976, 950, 950, 949,␊ |
640 | 952, 940, 949, 936, 947, 931, 934, 929, 926, 938,␊ |
641 | 932, 931, 0, 0, 924, 935, 934, 933, 936, 919,␊ |
642 | 917, 953, 927, 927, 926, 929, 917, 926, 913, 924,␊ |
643 | 908, 911, 906, 903, 915, 909, 908, 901, 912, 911,␊ |
644 | 914, 897, 895, 0, 906, 906, 905, 908, 896, 905,␊ |
645 | 892, 903, 887, 890, 885, 882, 889, 888, 1137, 684,␊ |
646 | ␊ |
647 | 1137, 686, 1137, 1137, 893, 0, 0, 881, 886, 878,␊ |
648 | 885, 912, 877, 880, 889, 873, 884, 869, 881, 869,␊ |
649 | 894, 878, 878, 876, 0, 0, 864, 869, 861, 868,␊ |
650 | 848, 834, 839, 822, 818, 799, 810, 793, 808, 779,␊ |
651 | 779, 771, 752, 757, 739, 703, 696, 699, 708, 692,␊ |
652 | 703, 688, 700, 686, 696, 692, 677, 711, 678, 672,␊ |
653 | 678, 677, 669, 685, 672, 0, 664, 700, 662, 654,␊ |
654 | 660, 658, 644, 659, 642, 630, 617, 597, 595, 570,␊ |
655 | 558, 550, 528, 523, 470, 451, 0, 450, 420, 418,␊ |
656 | 387, 38, 0, 29, 17, 1137, 734, 742, 750, 758,␊ |
657 | ␊ |
658 | 766, 774, 777, 779, 786, 794, 802, 805, 807, 809,␊ |
659 | 816, 819, 825, 833, 840, 848, 856, 863, 871, 879,␊ |
660 | 887, 19, 890␊ |
661 | } ;␊ |
662 | ␊ |
663 | static yyconst flex_int16_t yy_def[524] =␊ |
664 | { 0,␊ |
665 | 497, 497, 496, 3, 496, 5, 496, 7, 496, 9,␊ |
666 | 496, 11, 496, 13, 2, 2, 496, 17, 498, 498,␊ |
667 | 2, 2, 2, 2, 499, 499, 500, 500, 501, 501,␊ |
668 | 496, 496, 496, 496, 496, 502, 496, 496, 496, 496,␊ |
669 | 496, 503, 503, 503, 503, 503, 503, 503, 503, 503,␊ |
670 | 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,␊ |
671 | 503, 503, 503, 503, 503, 496, 496, 504, 504, 504,␊ |
672 | 504, 505, 496, 505, 506, 505, 496, 505, 496, 507,␊ |
673 | 507, 81, 81, 508, 508, 508, 508, 496, 496, 496,␊ |
674 | 509, 509, 509, 509, 496, 510, 510, 510, 510, 510,␊ |
675 | ␊ |
676 | 510, 510, 510, 510, 510, 510, 510, 510, 510, 510,␊ |
677 | 510, 510, 510, 510, 510, 510, 510, 510, 510, 496,␊ |
678 | 496, 496, 496, 511, 512, 512, 512, 512, 512, 512,␊ |
679 | 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,␊ |
680 | 512, 512, 512, 512, 512, 512, 513, 496, 496, 502,␊ |
681 | 496, 496, 496, 514, 514, 496, 515, 496, 514, 514,␊ |
682 | 516, 514, 517, 517, 496, 518, 496, 517, 517, 519,␊ |
683 | 517, 520, 520, 520, 496, 521, 496, 520, 520, 520,␊ |
684 | 520, 496, 496, 502, 496, 496, 496, 496, 503, 503,␊ |
685 | 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,␊ |
686 | ␊ |
687 | 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,␊ |
688 | 503, 503, 503, 503, 503, 503, 503, 503, 496, 496,␊ |
689 | 504, 504, 505, 496, 505, 506, 505, 81, 505, 505,␊ |
690 | 81, 508, 508, 496, 509, 509, 510, 510, 510, 510,␊ |
691 | 510, 510, 510, 510, 510, 510, 510, 510, 510, 510,␊ |
692 | 510, 510, 510, 510, 510, 510, 510, 510, 510, 510,␊ |
693 | 510, 510, 510, 510, 510, 510, 496, 496, 496, 511,␊ |
694 | 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,␊ |
695 | 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,␊ |
696 | 512, 512, 512, 512, 512, 512, 512, 512, 513, 496,␊ |
697 | ␊ |
698 | 496, 514, 514, 496, 515, 496, 514, 496, 496, 496,␊ |
699 | 517, 517, 518, 496, 496, 517, 496, 496, 496, 520,␊ |
700 | 520, 520, 496, 521, 521, 496, 520, 496, 496, 503,␊ |
701 | 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,␊ |
702 | 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,␊ |
703 | 503, 503, 505, 505, 510, 510, 510, 510, 510, 510,␊ |
704 | 510, 510, 510, 510, 510, 510, 510, 510, 510, 510,␊ |
705 | 510, 510, 510, 510, 510, 510, 510, 512, 512, 512,␊ |
706 | 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,␊ |
707 | 512, 512, 512, 512, 512, 512, 512, 512, 496, 496,␊ |
708 | ␊ |
709 | 496, 496, 496, 496, 503, 503, 503, 503, 503, 503,␊ |
710 | 503, 496, 503, 503, 503, 503, 503, 503, 503, 503,␊ |
711 | 503, 503, 503, 510, 510, 510, 510, 510, 510, 510,␊ |
712 | 510, 510, 510, 510, 510, 510, 510, 510, 510, 510,␊ |
713 | 510, 512, 512, 512, 512, 512, 512, 512, 512, 512,␊ |
714 | 512, 512, 512, 512, 512, 512, 503, 503, 503, 503,␊ |
715 | 503, 503, 503, 503, 503, 522, 510, 510, 510, 510,␊ |
716 | 510, 510, 510, 510, 510, 512, 512, 512, 512, 512,␊ |
717 | 512, 512, 512, 496, 503, 503, 523, 510, 510, 512,␊ |
718 | 512, 503, 523, 510, 512, 0, 496, 496, 496, 496,␊ |
719 | ␊ |
720 | 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,␊ |
721 | 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,␊ |
722 | 496, 496, 496␊ |
723 | } ;␊ |
724 | ␊ |
725 | static yyconst flex_int16_t yy_nxt[1181] =␊ |
726 | { 0,␊ |
727 | 496, 33, 34, 496, 35, 36, 37, 120, 121, 120,␊ |
728 | 121, 186, 186, 187, 187, 186, 38, 187, 39, 186,␊ |
729 | 186, 187, 187, 219, 186, 487, 187, 188, 231, 220,␊ |
730 | 231, 188, 193, 194, 211, 197, 38, 195, 198, 40,␊ |
731 | 33, 34, 289, 35, 36, 37, 200, 188, 231, 212,␊ |
732 | 231, 188, 193, 202, 256, 38, 201, 39, 203, 206,␊ |
733 | 204, 184, 186, 208, 187, 207, 208, 184, 184, 186,␊ |
734 | 208, 187, 184, 242, 186, 38, 187, 243, 40, 32,␊ |
735 | 33, 41, 32, 35, 36, 37, 32, 32, 32, 32,␊ |
736 | 32, 32, 42, 43, 44, 45, 46, 47, 32, 42,␊ |
737 | ␊ |
738 | 48, 49, 50, 51, 52, 53, 54, 42, 55, 42,␊ |
739 | 56, 42, 57, 58, 59, 60, 61, 62, 63, 64,␊ |
740 | 42, 65, 32, 66, 34, 32, 35, 36, 37, 67,␊ |
741 | 32, 32, 32, 32, 32, 68, 68, 68, 69, 68,␊ |
742 | 70, 32, 68, 68, 68, 68, 68, 68, 68, 68,␊ |
743 | 68, 68, 68, 68, 68, 68, 68, 68, 69, 68,␊ |
744 | 68, 71, 68, 68, 68, 72, 73, 34, 72, 74,␊ |
745 | 75, 76, 32, 77, 78, 72, 72, 79, 80, 80,␊ |
746 | 80, 81, 80, 82, 72, 80, 80, 80, 80, 80,␊ |
747 | 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,␊ |
748 | ␊ |
749 | 80, 81, 80, 80, 83, 80, 80, 80, 32, 33,␊ |
750 | 34, 32, 35, 36, 37, 32, 32, 32, 32, 32,␊ |
751 | 32, 84, 84, 84, 85, 84, 86, 32, 84, 84,␊ |
752 | 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,␊ |
753 | 84, 84, 84, 84, 85, 84, 84, 87, 84, 84,␊ |
754 | 84, 32, 88, 34, 32, 35, 36, 37, 89, 89,␊ |
755 | 89, 32, 32, 90, 91, 91, 91, 92, 91, 93,␊ |
756 | 32, 91, 91, 91, 91, 91, 91, 91, 91, 91,␊ |
757 | 91, 91, 91, 91, 91, 91, 91, 92, 91, 91,␊ |
758 | 94, 91, 91, 91, 32, 33, 95, 32, 35, 36,␊ |
759 | ␊ |
760 | 37, 32, 32, 32, 32, 32, 32, 96, 97, 98,␊ |
761 | 99, 100, 101, 32, 96, 102, 103, 104, 105, 106,␊ |
762 | 107, 108, 96, 109, 96, 110, 96, 111, 112, 113,␊ |
763 | 114, 115, 116, 117, 118, 96, 119, 32, 122, 123,␊ |
764 | 32, 35, 124, 37, 32, 32, 32, 32, 32, 32,␊ |
765 | 125, 126, 125, 127, 128, 129, 32, 125, 130, 131,␊ |
766 | 132, 133, 134, 135, 136, 125, 137, 125, 138, 125,␊ |
767 | 139, 140, 141, 142, 125, 143, 144, 145, 125, 146,␊ |
768 | 32, 147, 148, 250, 35, 150, 37, 186, 251, 187,␊ |
769 | 252, 186, 186, 187, 187, 186, 151, 187, 152, 186,␊ |
770 | ␊ |
771 | 186, 187, 187, 193, 213, 248, 245, 222, 214, 246,␊ |
772 | 275, 222, 233, 259, 276, 249, 151, 267, 268, 153,␊ |
773 | 32, 147, 148, 193, 35, 150, 37, 222, 260, 289,␊ |
774 | 278, 222, 233, 279, 281, 186, 151, 187, 152, 186,␊ |
775 | 186, 187, 187, 254, 282, 299, 300, 233, 283, 255,␊ |
776 | 256, 236, 236, 284, 256, 285, 151, 495, 292, 153,␊ |
777 | 155, 34, 256, 156, 157, 158, 186, 233, 187, 309,␊ |
778 | 310, 236, 236, 293, 186, 159, 187, 160, 161, 186,␊ |
779 | 186, 187, 187, 261, 318, 319, 241, 262, 219, 494,␊ |
780 | 287, 241, 274, 208, 220, 159, 288, 289, 162, 155,␊ |
781 | ␊ |
782 | 34, 289, 156, 157, 158, 186, 241, 187, 186, 492,␊ |
783 | 187, 241, 274, 186, 159, 187, 160, 161, 322, 186,␊ |
784 | 274, 187, 294, 306, 484, 187, 295, 186, 496, 315,␊ |
785 | 320, 188, 320, 186, 159, 187, 321, 162, 164, 34,␊ |
786 | 274, 165, 166, 167, 184, 188, 184, 184, 186, 184,␊ |
787 | 187, 188, 306, 168, 187, 169, 170, 322, 306, 184,␊ |
788 | 187, 289, 184, 321, 307, 188, 186, 186, 187, 315,␊ |
789 | 307, 384, 186, 168, 187, 321, 171, 164, 34, 316,␊ |
790 | 165, 166, 167, 320, 307, 184, 186, 184, 315, 338,␊ |
791 | 307, 186, 168, 187, 169, 170, 384, 339, 316, 316,␊ |
792 | ␊ |
793 | 325, 384, 186, 327, 187, 223, 321, 223, 186, 186,␊ |
794 | 187, 187, 168, 267, 268, 171, 173, 174, 316, 175,␊ |
795 | 176, 177, 186, 327, 187, 186, 491, 187, 363, 299,␊ |
796 | 300, 178, 184, 179, 180, 289, 364, 327, 184, 184,␊ |
797 | 321, 385, 186, 184, 187, 306, 184, 187, 184, 386,␊ |
798 | 490, 178, 400, 310, 181, 173, 174, 327, 175, 176,␊ |
799 | 177, 184, 184, 186, 184, 315, 402, 319, 384, 186,␊ |
800 | 178, 187, 179, 180, 496, 256, 320, 184, 320, 320,␊ |
801 | 426, 184, 426, 184, 321, 400, 310, 402, 319, 426,␊ |
802 | 178, 489, 256, 181, 223, 488, 325, 223, 223, 223,␊ |
803 | ␊ |
804 | 223, 484, 426, 223, 223, 208, 407, 407, 407, 486,␊ |
805 | 208, 485, 484, 223, 223, 407, 289, 223, 229, 223,␊ |
806 | 230, 289, 483, 223, 223, 289, 289, 482, 481, 480,␊ |
807 | 479, 478, 477, 223, 32, 32, 32, 32, 32, 32,␊ |
808 | 32, 32, 149, 149, 149, 149, 149, 149, 149, 149,␊ |
809 | 154, 154, 154, 154, 154, 154, 154, 154, 163, 163,␊ |
810 | 163, 163, 163, 163, 163, 163, 172, 172, 172, 172,␊ |
811 | 172, 172, 172, 172, 184, 184, 384, 184, 184, 184,␊ |
812 | 184, 184, 189, 189, 221, 221, 223, 289, 476, 223,␊ |
813 | 223, 223, 223, 223, 226, 226, 384, 226, 226, 226,␊ |
814 | ␊ |
815 | 226, 226, 228, 256, 256, 228, 228, 228, 228, 228,␊ |
816 | 232, 232, 235, 235, 237, 237, 270, 270, 466, 270,␊ |
817 | 270, 270, 270, 270, 271, 271, 301, 301, 301, 475,␊ |
818 | 301, 301, 301, 302, 302, 256, 302, 256, 302, 302,␊ |
819 | 305, 305, 474, 305, 305, 305, 305, 305, 308, 308,␊ |
820 | 308, 308, 308, 308, 308, 308, 311, 311, 473, 311,␊ |
821 | 472, 311, 311, 313, 313, 471, 313, 313, 313, 313,␊ |
822 | 313, 317, 317, 317, 317, 317, 317, 317, 317, 320,␊ |
823 | 320, 320, 320, 470, 320, 320, 320, 324, 324, 324,␊ |
824 | 324, 324, 324, 324, 324, 493, 493, 469, 468, 256,␊ |
825 | ␊ |
826 | 467, 426, 208, 208, 466, 465, 208, 208, 464, 463,␊ |
827 | 462, 461, 460, 412, 459, 458, 208, 457, 407, 456,␊ |
828 | 455, 454, 453, 452, 289, 451, 450, 449, 384, 448,␊ |
829 | 447, 289, 289, 446, 445, 444, 443, 384, 442, 441,␊ |
830 | 440, 439, 438, 437, 436, 256, 435, 434, 433, 426,␊ |
831 | 432, 431, 256, 256, 412, 430, 429, 428, 427, 426,␊ |
832 | 425, 424, 423, 422, 421, 420, 419, 418, 208, 417,␊ |
833 | 416, 415, 407, 414, 413, 208, 208, 412, 411, 410,␊ |
834 | 409, 408, 407, 406, 405, 404, 496, 403, 321, 314,␊ |
835 | 401, 312, 304, 399, 303, 398, 397, 289, 396, 395,␊ |
836 | ␊ |
837 | 394, 393, 289, 392, 391, 390, 389, 289, 388, 387,␊ |
838 | 384, 383, 382, 381, 380, 289, 379, 378, 269, 377,␊ |
839 | 376, 256, 375, 374, 373, 372, 371, 256, 370, 369,␊ |
840 | 368, 367, 256, 366, 365, 362, 361, 360, 359, 358,␊ |
841 | 256, 357, 356, 355, 234, 227, 225, 354, 353, 224,␊ |
842 | 352, 351, 208, 350, 349, 348, 347, 346, 208, 345,␊ |
843 | 344, 343, 342, 208, 341, 340, 337, 336, 335, 334,␊ |
844 | 333, 208, 332, 331, 330, 185, 183, 329, 328, 182,␊ |
845 | 326, 323, 321, 321, 314, 183, 312, 185, 304, 303,␊ |
846 | 298, 297, 296, 289, 291, 290, 286, 280, 277, 273,␊ |
847 | ␊ |
848 | 272, 269, 266, 265, 264, 263, 256, 258, 257, 253,␊ |
849 | 247, 244, 240, 239, 238, 234, 227, 225, 224, 218,␊ |
850 | 217, 216, 215, 208, 210, 209, 205, 199, 196, 192,␊ |
851 | 191, 190, 185, 183, 182, 496, 31, 496, 496, 496,␊ |
852 | 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,␊ |
853 | 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,␊ |
854 | 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,␊ |
855 | 496, 496, 496, 496, 496, 496, 496, 496, 496, 496␊ |
856 | } ;␊ |
857 | ␊ |
858 | static yyconst flex_int16_t yy_chk[1181] =␊ |
859 | { 0,␊ |
860 | 0, 1, 1, 0, 1, 1, 1, 15, 15, 16,␊ |
861 | 16, 38, 45, 38, 45, 39, 1, 39, 1, 40,␊ |
862 | 47, 40, 47, 66, 69, 522, 69, 39, 82, 66,␊ |
863 | 83, 40, 47, 48, 59, 50, 1, 48, 50, 1,␊ |
864 | 2, 2, 495, 2, 2, 2, 52, 39, 82, 59,␊ |
865 | 83, 40, 47, 53, 494, 2, 52, 2, 53, 55,␊ |
866 | 53, 75, 85, 492, 85, 55, 55, 75, 75, 92,␊ |
867 | 55, 92, 75, 102, 99, 2, 99, 102, 2, 3,␊ |
868 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,␊ |
869 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,␊ |
870 | ␊ |
871 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,␊ |
872 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,␊ |
873 | 3, 3, 5, 5, 5, 5, 5, 5, 5, 5,␊ |
874 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,␊ |
875 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,␊ |
876 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,␊ |
877 | 5, 5, 5, 5, 5, 7, 7, 7, 7, 7,␊ |
878 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,␊ |
879 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,␊ |
880 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,␊ |
881 | ␊ |
882 | 7, 7, 7, 7, 7, 7, 7, 7, 9, 9,␊ |
883 | 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,␊ |
884 | 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,␊ |
885 | 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,␊ |
886 | 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,␊ |
887 | 9, 11, 11, 11, 11, 11, 11, 11, 11, 11,␊ |
888 | 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,␊ |
889 | 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,␊ |
890 | 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,␊ |
891 | 11, 11, 11, 11, 13, 13, 13, 13, 13, 13,␊ |
892 | ␊ |
893 | 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,␊ |
894 | 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,␊ |
895 | 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,␊ |
896 | 13, 13, 13, 13, 13, 13, 13, 17, 17, 17,␊ |
897 | 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,␊ |
898 | 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,␊ |
899 | 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,␊ |
900 | 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,␊ |
901 | 19, 19, 19, 107, 19, 19, 19, 60, 107, 60,␊ |
902 | 107, 63, 127, 63, 127, 70, 19, 70, 19, 71,␊ |
903 | ␊ |
904 | 86, 71, 86, 63, 60, 106, 104, 70, 60, 104,␊ |
905 | 130, 71, 86, 113, 130, 106, 19, 120, 120, 19,␊ |
906 | 20, 20, 20, 63, 20, 20, 20, 70, 113, 491,␊ |
907 | 132, 71, 86, 132, 134, 87, 20, 87, 20, 93,␊ |
908 | 94, 93, 94, 109, 134, 147, 147, 87, 135, 109,␊ |
909 | 109, 93, 94, 135, 109, 135, 20, 490, 141, 20,␊ |
910 | 25, 25, 489, 25, 25, 25, 114, 87, 114, 161,␊ |
911 | 161, 93, 94, 141, 101, 25, 101, 25, 25, 117,␊ |
912 | 129, 117, 129, 114, 170, 170, 101, 114, 219, 488,␊ |
913 | 137, 117, 129, 486, 219, 25, 137, 137, 25, 26,␊ |
914 | ␊ |
915 | 26, 137, 26, 26, 26, 142, 101, 142, 144, 485,␊ |
916 | 144, 117, 129, 151, 26, 151, 26, 26, 173, 152,␊ |
917 | 144, 152, 142, 159, 484, 159, 142, 168, 180, 168,␊ |
918 | 180, 152, 180, 153, 26, 153, 173, 26, 27, 27,␊ |
919 | 144, 27, 27, 27, 157, 153, 157, 166, 178, 166,␊ |
920 | 178, 152, 160, 27, 160, 27, 27, 322, 162, 157,␊ |
921 | 162, 483, 166, 178, 160, 153, 188, 169, 188, 169,␊ |
922 | 162, 482, 193, 27, 193, 322, 27, 28, 28, 169,␊ |
923 | 28, 28, 28, 176, 160, 176, 171, 176, 171, 200,␊ |
924 | 162, 179, 28, 179, 28, 28, 481, 200, 171, 169,␊ |
925 | ␊ |
926 | 176, 480, 222, 179, 222, 228, 179, 228, 233, 236,␊ |
927 | 233, 236, 28, 267, 267, 28, 29, 29, 171, 29,␊ |
928 | 29, 29, 241, 179, 241, 181, 479, 181, 248, 299,␊ |
929 | 299, 29, 226, 29, 29, 478, 248, 181, 226, 226,␊ |
930 | 181, 281, 274, 226, 274, 307, 305, 307, 305, 281,␊ |
931 | 477, 29, 309, 309, 29, 30, 30, 181, 30, 30,␊ |
932 | 30, 305, 313, 316, 313, 316, 318, 318, 476, 327,␊ |
933 | 30, 327, 30, 30, 321, 475, 321, 313, 321, 324,␊ |
934 | 474, 324, 473, 324, 327, 400, 400, 402, 402, 472,␊ |
935 | 30, 471, 470, 30, 80, 469, 324, 80, 80, 80,␊ |
936 | ␊ |
937 | 80, 468, 467, 80, 80, 465, 464, 463, 462, 461,␊ |
938 | 460, 459, 458, 80, 81, 457, 456, 81, 81, 81,␊ |
939 | 81, 455, 454, 81, 81, 453, 452, 451, 450, 449,␊ |
940 | 448, 447, 446, 81, 497, 497, 497, 497, 497, 497,␊ |
941 | 497, 497, 498, 498, 498, 498, 498, 498, 498, 498,␊ |
942 | 499, 499, 499, 499, 499, 499, 499, 499, 500, 500,␊ |
943 | 500, 500, 500, 500, 500, 500, 501, 501, 501, 501,␊ |
944 | 501, 501, 501, 501, 502, 502, 445, 502, 502, 502,␊ |
945 | 502, 502, 503, 503, 504, 504, 505, 444, 443, 505,␊ |
946 | 505, 505, 505, 505, 506, 506, 442, 506, 506, 506,␊ |
947 | ␊ |
948 | 506, 506, 507, 441, 440, 507, 507, 507, 507, 507,␊ |
949 | 508, 508, 509, 509, 510, 510, 511, 511, 439, 511,␊ |
950 | 511, 511, 511, 511, 512, 512, 513, 513, 513, 438,␊ |
951 | 513, 513, 513, 514, 514, 437, 514, 436, 514, 514,␊ |
952 | 515, 515, 435, 515, 515, 515, 515, 515, 516, 516,␊ |
953 | 516, 516, 516, 516, 516, 516, 517, 517, 434, 517,␊ |
954 | 433, 517, 517, 518, 518, 432, 518, 518, 518, 518,␊ |
955 | 518, 519, 519, 519, 519, 519, 519, 519, 519, 520,␊ |
956 | 520, 520, 520, 431, 520, 520, 520, 521, 521, 521,␊ |
957 | 521, 521, 521, 521, 521, 523, 523, 430, 429, 428,␊ |
958 | ␊ |
959 | 427, 424, 423, 422, 421, 420, 419, 418, 417, 416,␊ |
960 | 415, 414, 413, 412, 411, 410, 409, 408, 405, 398,␊ |
961 | 397, 396, 395, 394, 393, 392, 391, 390, 389, 388,␊ |
962 | 387, 386, 385, 383, 382, 381, 380, 379, 378, 377,␊ |
963 | 376, 375, 374, 373, 372, 371, 370, 369, 368, 367,␊ |
964 | 366, 365, 364, 363, 362, 361, 360, 359, 358, 357,␊ |
965 | 356, 355, 352, 351, 350, 349, 348, 347, 346, 345,␊ |
966 | 344, 343, 342, 341, 340, 339, 338, 337, 336, 335,␊ |
967 | 334, 333, 332, 331, 330, 326, 325, 323, 320, 315,␊ |
968 | 314, 312, 306, 304, 303, 298, 297, 296, 295, 294,␊ |
969 | ␊ |
970 | 293, 292, 291, 290, 288, 286, 285, 284, 283, 282,␊ |
971 | 280, 279, 278, 277, 276, 275, 273, 272, 269, 266,␊ |
972 | 265, 264, 263, 262, 261, 260, 259, 258, 257, 255,␊ |
973 | 253, 252, 251, 250, 249, 247, 246, 245, 244, 243,␊ |
974 | 242, 240, 239, 238, 234, 230, 229, 227, 225, 224,␊ |
975 | 218, 217, 216, 215, 214, 213, 212, 211, 210, 209,␊ |
976 | 207, 205, 204, 203, 202, 201, 199, 198, 197, 196,␊ |
977 | 195, 194, 192, 191, 190, 187, 186, 185, 183, 182,␊ |
978 | 177, 175, 174, 172, 167, 165, 164, 158, 156, 155,␊ |
979 | 146, 145, 143, 140, 139, 138, 136, 133, 131, 128,␊ |
980 | ␊ |
981 | 126, 122, 119, 118, 116, 115, 112, 111, 110, 108,␊ |
982 | 105, 103, 100, 98, 97, 88, 76, 74, 73, 65,␊ |
983 | 64, 62, 61, 58, 57, 56, 54, 51, 49, 46,␊ |
984 | 44, 43, 37, 35, 33, 31, 496, 496, 496, 496,␊ |
985 | 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,␊ |
986 | 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,␊ |
987 | 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,␊ |
988 | 496, 496, 496, 496, 496, 496, 496, 496, 496, 496␊ |
989 | } ;␊ |
990 | ␊ |
991 | extern int pycodeYY_flex_debug;␊ |
992 | int pycodeYY_flex_debug = 0;␊ |
993 | ␊ |
994 | static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;␊ |
995 | static char *yy_full_match;␊ |
996 | static int yy_lp;␊ |
997 | static int yy_looking_for_trail_begin = 0;␊ |
998 | static int yy_full_lp;␊ |
999 | static int *yy_full_state;␊ |
1000 | #define YY_TRAILING_MASK 0x2000␊ |
1001 | #define YY_TRAILING_HEAD_MASK 0x4000␊ |
1002 | #define REJECT \␊ |
1003 | { \␊ |
1004 | *yy_cp = (yy_hold_char); /* undo effects of setting up pycodeYYtext */ \␊ |
1005 | yy_cp = (yy_full_match); /* restore poss. backed-over text */ \␊ |
1006 | (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \␊ |
1007 | (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \␊ |
1008 | yy_current_state = *(yy_state_ptr); /* restore curr. state */ \␊ |
1009 | ++(yy_lp); \␊ |
1010 | goto find_rule; \␊ |
1011 | }␊ |
1012 | ␊ |
1013 | #define yymore() yymore_used_but_not_detected␊ |
1014 | #define YY_MORE_ADJ 0␊ |
1015 | #define YY_RESTORE_YY_MORE_OFFSET␊ |
1016 | char *pycodeYYtext;␊ |
1017 | #line 1 "pycode.l"␊ |
1018 | /******************************************************************************␊ |
1019 | *␊ |
1020 | * $Id: pycode.h,v 1.9 2001/03/19 19:27:39 root Exp $␊ |
1021 | *␊ |
1022 | * Copyright (C) 1997-2011 by Dimitri van Heesch.␊ |
1023 | *␊ |
1024 | * Permission to use, copy, modify, and distribute this software and its␊ |
1025 | * documentation under the terms of the GNU General Public License is hereby ␊ |
1026 | * granted. No representations are made about the suitability of this software ␊ |
1027 | * for any purpose. It is provided "as is" without express or implied warranty.␊ |
1028 | * See the GNU General Public License for more details.␊ |
1029 | *␊ |
1030 | * Documents produced by Doxygen are derivative works derived from the␊ |
1031 | * input used in their production; they are not affected by this license.␊ |
1032 | *␊ |
1033 | */␊ |
1034 | /* This code is based on the work done by the MoxyPyDoxy team␊ |
1035 | * (Linda Leong, Mike Rivera, Kim Truong, and Gabriel Estrada)␊ |
1036 | * in Spring 2005 as part of CS 179E: Compiler Design Project␊ |
1037 | * at the University of California, Riverside; the course was␊ |
1038 | * taught by Peter H. Froehlich <phf@acm.org>.␊ |
1039 | */␊ |
1040 | #line 26 "pycode.l"␊ |
1041 | ␊ |
1042 | #include <stdio.h>␊ |
1043 | #include <qvaluestack.h>␊ |
1044 | ␊ |
1045 | #include "pycode.h"␊ |
1046 | #include "message.h"␊ |
1047 | ␊ |
1048 | #include "scanner.h"␊ |
1049 | #include "entry.h"␊ |
1050 | #include "doxygen.h"␊ |
1051 | #include "outputlist.h"␊ |
1052 | #include "util.h"␊ |
1053 | #include "membername.h"␊ |
1054 | #include "searchindex.h"␊ |
1055 | ␊ |
1056 | #define YY_NEVER_INTERACTIVE 1␊ |
1057 | ␊ |
1058 | static ClassSDict g_codeClassSDict(17);␊ |
1059 | static QCString g_curClassName;␊ |
1060 | static QStrList g_curClassBases;␊ |
1061 | ␊ |
1062 | ␊ |
1063 | static CodeOutputInterface * g_code;␊ |
1064 | static const char * g_inputString; //!< the code fragment as text␊ |
1065 | static int␉ g_inputPosition; //!< read offset during parsing ␊ |
1066 | static const char * g_currentFontClass;␊ |
1067 | static bool g_needsTermination;␊ |
1068 | static int g_inputLines; //!< number of line in the code fragment␊ |
1069 | static int␉ g_yyLineNr; //!< current line number␊ |
1070 | static FileDef * g_sourceFileDef;␊ |
1071 | static Definition * g_currentDefinition;␊ |
1072 | static MemberDef * g_currentMemberDef;␊ |
1073 | static bool g_includeCodeFragment;␊ |
1074 | static QCString g_realScope;␊ |
1075 | static bool g_insideBody;␊ |
1076 | static int g_bodyCurlyCount;␊ |
1077 | static bool g_searchingForBody;␊ |
1078 | static QCString g_classScope;␊ |
1079 | static int g_paramParens;␊ |
1080 | //static int g_anchorCount;␊ |
1081 | ␊ |
1082 | static bool g_exampleBlock;␊ |
1083 | static QCString g_exampleName;␊ |
1084 | static QCString g_exampleFile;␊ |
1085 | ␊ |
1086 | static QCString g_type;␊ |
1087 | static QCString g_name;␊ |
1088 | ␊ |
1089 | static bool g_doubleStringIsDoc;␊ |
1090 | static bool g_doubleQuote;␊ |
1091 | static bool g_noSuiteFound;␊ |
1092 | static int g_stringContext;␊ |
1093 | ␊ |
1094 | static QValueStack<uint> g_indents; //!< Tracks indentation levels for scoping in python␊ |
1095 | ␊ |
1096 | static void endFontClass();␊ |
1097 | static void adjustScopesAndSuites(unsigned indentLength);␊ |
1098 | ␊ |
1099 | ␊ |
1100 | /*! Represents a stack of variable to class mappings as found in the␊ |
1101 | * code. Each scope is enclosed in pushScope() and popScope() calls.␊ |
1102 | * Variables are added by calling addVariables() and one can search␊ |
1103 | * for variable using findVariable().␊ |
1104 | */␊ |
1105 | class PyVariableContext ␊ |
1106 | {␊ |
1107 | public:␊ |
1108 | static const ClassDef *dummyContext; ␊ |
1109 | class Scope : public SDict<ClassDef> ␊ |
1110 | {␊ |
1111 | public:␊ |
1112 | ␉Scope() : SDict<ClassDef>(17) {}␊ |
1113 | };␊ |
1114 | ␊ |
1115 | PyVariableContext() ␊ |
1116 | {␊ |
1117 | m_scopes.setAutoDelete(TRUE);␊ |
1118 | }␊ |
1119 | ␊ |
1120 | virtual ~PyVariableContext() ␊ |
1121 | {␊ |
1122 | }␊ |
1123 | ␊ |
1124 | void pushScope() ␊ |
1125 | {␊ |
1126 | m_scopes.append(new Scope);␊ |
1127 | }␊ |
1128 | ␊ |
1129 | void popScope() ␊ |
1130 | {␊ |
1131 | if (m_scopes.count()>0) ␊ |
1132 | {␊ |
1133 | ␉m_scopes.remove(m_scopes.count()-1);␊ |
1134 | }␊ |
1135 | }␊ |
1136 | ␊ |
1137 | void clear() ␊ |
1138 | {␊ |
1139 | m_scopes.clear();␊ |
1140 | m_globalScope.clear();␊ |
1141 | }␊ |
1142 | ␊ |
1143 | void clearExceptGlobal() ␊ |
1144 | {␊ |
1145 | m_scopes.clear();␊ |
1146 | }␊ |
1147 | ␊ |
1148 | void addVariable(const QCString &type,const QCString &name);␊ |
1149 | ClassDef *findVariable(const QCString &name);␊ |
1150 | ␊ |
1151 | private:␊ |
1152 | Scope m_globalScope;␊ |
1153 | QList<Scope> m_scopes;␊ |
1154 | };␊ |
1155 | ␊ |
1156 | void PyVariableContext::addVariable(const QCString &type,const QCString &name)␊ |
1157 | {␊ |
1158 | //printf("PyVariableContext::addVariable(%s,%s)\n",type.data(),name.data());␊ |
1159 | QCString ltype = type.simplifyWhiteSpace();␊ |
1160 | QCString lname = name.simplifyWhiteSpace();␊ |
1161 | ␊ |
1162 | Scope *scope = m_scopes.count()==0 ? &m_globalScope : m_scopes.getLast();␊ |
1163 | ClassDef *varType;␊ |
1164 | if (␊ |
1165 | (varType=g_codeClassSDict[ltype]) || // look for class definitions inside the code block␊ |
1166 | (varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,ltype)) // look for global class definitions␊ |
1167 | ) ␊ |
1168 | {␊ |
1169 | scope->append(lname,varType); // add it to a list␊ |
1170 | }␊ |
1171 | else ␊ |
1172 | {␊ |
1173 | if (m_scopes.count()>0) // for local variables add a dummy entry so the name ␊ |
1174 | // is hidden to avoid FALSE links to global variables with the same name␊ |
1175 | // TODO: make this work for namespaces as well!␊ |
1176 | {␊ |
1177 | scope->append(lname,dummyContext);␊ |
1178 | }␊ |
1179 | }␊ |
1180 | }␊ |
1181 | ␊ |
1182 | ClassDef *PyVariableContext::findVariable(const QCString &name)␊ |
1183 | {␊ |
1184 | if (name.isEmpty()) return 0;␊ |
1185 | ClassDef *result = 0;␊ |
1186 | QListIterator<Scope> sli(m_scopes);␊ |
1187 | Scope *scope;␊ |
1188 | // search from inner to outer scope␊ |
1189 | for (sli.toLast();(scope=sli.current());--sli)␊ |
1190 | {␊ |
1191 | result = scope->find(name);␊ |
1192 | if (result) ␊ |
1193 | {␊ |
1194 | return result;␊ |
1195 | }␊ |
1196 | }␊ |
1197 | // nothing found -> also try the global scope␊ |
1198 | result=m_globalScope.find(name);␊ |
1199 | return result;␊ |
1200 | }␊ |
1201 | ␊ |
1202 | static PyVariableContext g_theVarContext;␊ |
1203 | const ClassDef *PyVariableContext::dummyContext = (ClassDef*)0x8;␊ |
1204 | ␊ |
1205 | class PyCallContext␊ |
1206 | {␊ |
1207 | public:␊ |
1208 | struct Ctx␊ |
1209 | {␊ |
1210 | Ctx() : name(g_name), type(g_type), cd(0) {}␊ |
1211 | QCString name;␊ |
1212 | QCString type;␊ |
1213 | ClassDef *cd;␊ |
1214 | };␊ |
1215 | ␊ |
1216 | PyCallContext() ␊ |
1217 | {␊ |
1218 | m_classList.append(new Ctx);␊ |
1219 | m_classList.setAutoDelete(TRUE);␊ |
1220 | }␊ |
1221 | ␊ |
1222 | virtual ~PyCallContext() {}␊ |
1223 | ␊ |
1224 | void setClass(ClassDef *cd)␊ |
1225 | {␊ |
1226 | Ctx *ctx = m_classList.getLast();␊ |
1227 | if (ctx) ␊ |
1228 | {␊ |
1229 | ctx->cd=cd;␊ |
1230 | }␊ |
1231 | }␊ |
1232 | void pushScope()␊ |
1233 | {␊ |
1234 | m_classList.append(new Ctx);␊ |
1235 | }␊ |
1236 | ␊ |
1237 | void popScope()␊ |
1238 | {␊ |
1239 | if (m_classList.count()>1)␊ |
1240 | {␊ |
1241 | ␉Ctx *ctx = m_classList.getLast();␊ |
1242 | ␉if (ctx)␊ |
1243 | ␉{␊ |
1244 | ␉ g_name = ctx->name;␊ |
1245 | ␉ g_type = ctx->type;␊ |
1246 | ␉}␊ |
1247 | ␉m_classList.removeLast();␊ |
1248 | }␊ |
1249 | else␊ |
1250 | {␊ |
1251 | }␊ |
1252 | }␊ |
1253 | ␊ |
1254 | void clear()␊ |
1255 | {␊ |
1256 | m_classList.clear();␊ |
1257 | m_classList.append(new Ctx);␊ |
1258 | }␊ |
1259 | ␊ |
1260 | ClassDef *getClass() const␊ |
1261 | {␊ |
1262 | Ctx *ctx = m_classList.getLast();␊ |
1263 | ␊ |
1264 | if (ctx)␊ |
1265 | return ctx->cd;␊ |
1266 | else␊ |
1267 | return 0;␊ |
1268 | }␊ |
1269 | ␊ |
1270 | private:␊ |
1271 | QList<Ctx> m_classList; ␊ |
1272 | };␊ |
1273 | ␊ |
1274 | static PyCallContext g_theCallContext;␊ |
1275 | ␊ |
1276 | ␊ |
1277 | /*! counts the number of lines in the input */␊ |
1278 | static int countLines()␊ |
1279 | {␊ |
1280 | const char *p=g_inputString;␊ |
1281 | char c;␊ |
1282 | int count=1;␊ |
1283 | while ((c=*p)) ␊ |
1284 | { ␊ |
1285 | p++ ; ␊ |
1286 | if (c=='\n') count++; ␊ |
1287 | }␊ |
1288 | if (p>g_inputString && *(p-1)!='\n') ␊ |
1289 | { // last line does not end with a \n, so we add an extra␊ |
1290 | // line and explicitly terminate the line after parsing.␊ |
1291 | count++, ␊ |
1292 | g_needsTermination=TRUE; ␊ |
1293 | } ␊ |
1294 | return count;␊ |
1295 | }␊ |
1296 | ␊ |
1297 | static void setCurrentDoc(const QCString &name,const QCString &base,const QCString &anchor="")␊ |
1298 | {␊ |
1299 | if (Doxygen::searchIndex)␊ |
1300 | {␊ |
1301 | Doxygen::searchIndex->setCurrentDoc(name,base,anchor);␊ |
1302 | }␊ |
1303 | }␊ |
1304 | ␊ |
1305 | static void addToSearchIndex(const char *text)␊ |
1306 | {␊ |
1307 | if (Doxygen::searchIndex)␊ |
1308 | {␊ |
1309 | Doxygen::searchIndex->addWord(text,FALSE);␊ |
1310 | }␊ |
1311 | }␊ |
1312 | ␊ |
1313 | ␊ |
1314 | static ClassDef *stripClassName(const char *s)␊ |
1315 | {␊ |
1316 | int pos=0;␊ |
1317 | QCString type = s;␊ |
1318 | QCString className;␊ |
1319 | QCString templSpec;␊ |
1320 | while (extractClassNameFromType(type,pos,className,templSpec)!=-1)␊ |
1321 | {␊ |
1322 | QCString clName=className+templSpec;␊ |
1323 | ␊ |
1324 | ClassDef *cd=0;␊ |
1325 | if (!g_classScope.isEmpty())␊ |
1326 | {␊ |
1327 | cd=getResolvedClass(g_currentDefinition,g_sourceFileDef,g_classScope+"::"+clName);␊ |
1328 | }␊ |
1329 | if (cd==0)␊ |
1330 | {␊ |
1331 | cd=getResolvedClass(g_currentDefinition,g_sourceFileDef,clName);␊ |
1332 | }␊ |
1333 | if (cd)␊ |
1334 | {␊ |
1335 | return cd;␊ |
1336 | }␊ |
1337 | }␊ |
1338 | ␊ |
1339 | return 0;␊ |
1340 | }␊ |
1341 | ␊ |
1342 | ␊ |
1343 | ␊ |
1344 | /*! start a new line of code, inserting a line number if g_sourceFileDef␊ |
1345 | * is TRUE. If a definition starts at the current line, then the line␊ |
1346 | * number is linked to the documentation of that definition.␊ |
1347 | */␊ |
1348 | static void startCodeLine()␊ |
1349 | {␊ |
1350 | //if (g_currentFontClass) { g_code->endFontClass(); }␊ |
1351 | if (g_sourceFileDef)␊ |
1352 | {␊ |
1353 | //QCString lineNumber,lineAnchor;␊ |
1354 | //lineNumber.sprintf("%05d",g_yyLineNr);␊ |
1355 | //lineAnchor.sprintf("l%05d",g_yyLineNr);␊ |
1356 | ␊ |
1357 | Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr);␊ |
1358 | //printf("startCodeLine %d d=%p\n",g_yyLineNr,d);␊ |
1359 | //g_code->startLineNumber();␊ |
1360 | if (!g_includeCodeFragment && d && d->isLinkableInProject())␊ |
1361 | {␊ |
1362 | g_currentDefinition = d;␊ |
1363 | g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr);␊ |
1364 | g_insideBody = FALSE;␊ |
1365 | g_searchingForBody = TRUE;␊ |
1366 | g_realScope = d->name().copy();␊ |
1367 | g_classScope = d->name().copy();␊ |
1368 | //printf("Real scope: `%s'\n",g_realScope.data());␊ |
1369 | g_bodyCurlyCount = 0;␊ |
1370 | QCString lineAnchor;␊ |
1371 | lineAnchor.sprintf("l%05d",g_yyLineNr);␊ |
1372 | if (g_currentMemberDef)␊ |
1373 | {␊ |
1374 | g_code->writeLineNumber(g_currentMemberDef->getReference(),␊ |
1375 | ␉ g_currentMemberDef->getOutputFileBase(),␊ |
1376 | ␉ g_currentMemberDef->anchor(),g_yyLineNr);␊ |
1377 | setCurrentDoc(␊ |
1378 | g_currentMemberDef->qualifiedName(),␊ |
1379 | ␉ g_sourceFileDef->getSourceFileBase(),␊ |
1380 | ␉ lineAnchor);␊ |
1381 | }␊ |
1382 | else␊ |
1383 | {␊ |
1384 | g_code->writeLineNumber(d->getReference(),␊ |
1385 | ␉ d->getOutputFileBase(),␊ |
1386 | ␉ 0,g_yyLineNr);␊ |
1387 | setCurrentDoc(␊ |
1388 | d->qualifiedName(),␊ |
1389 | ␉ g_sourceFileDef->getSourceFileBase(),␊ |
1390 | ␉ lineAnchor);␊ |
1391 | }␊ |
1392 | }␊ |
1393 | else␊ |
1394 | {␊ |
1395 | //g_code->codify(lineNumber);␊ |
1396 | g_code->writeLineNumber(0,0,0,g_yyLineNr);␊ |
1397 | }␊ |
1398 | //g_code->endLineNumber();␊ |
1399 | }␊ |
1400 | g_code->startCodeLine(); ␊ |
1401 | if (g_currentFontClass)␊ |
1402 | {␊ |
1403 | g_code->startFontClass(g_currentFontClass);␊ |
1404 | }␊ |
1405 | }␊ |
1406 | ␊ |
1407 | static void codify(const char* text) ␊ |
1408 | { ␊ |
1409 | g_code->codify(text);␊ |
1410 | }␊ |
1411 | ␊ |
1412 | static void endCodeLine()␊ |
1413 | {␊ |
1414 | endFontClass();␊ |
1415 | g_code->endCodeLine();␊ |
1416 | }␊ |
1417 | ␊ |
1418 | static void nextCodeLine()␊ |
1419 | {␊ |
1420 | const char *fc = g_currentFontClass;␊ |
1421 | endCodeLine();␊ |
1422 | if (g_yyLineNr<g_inputLines) ␊ |
1423 | {␊ |
1424 | g_currentFontClass = fc;␊ |
1425 | startCodeLine();␊ |
1426 | }␊ |
1427 | }␊ |
1428 | ␊ |
1429 | ␊ |
1430 | /*! writes a link to a fragment \a text that may span multiple lines, inserting␊ |
1431 | * line numbers for each line. If \a text contains newlines, the link will be ␊ |
1432 | * split into multiple links with the same destination, one for each line.␊ |
1433 | */␊ |
1434 | static void writeMultiLineCodeLink(CodeOutputInterface &ol,␊ |
1435 | const char *ref,const char *file,␊ |
1436 | const char *anchor,const char *text,␊ |
1437 | const char *tooltip)␊ |
1438 | {␊ |
1439 | bool done=FALSE;␊ |
1440 | char *p=(char *)text;␊ |
1441 | while (!done)␊ |
1442 | {␊ |
1443 | char *sp=p;␊ |
1444 | char c;␊ |
1445 | while ((c=*p++) && c!='\n') { }␊ |
1446 | if (c=='\n')␊ |
1447 | {␊ |
1448 | g_yyLineNr++;␊ |
1449 | *(p-1)='\0';␊ |
1450 | //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);␊ |
1451 | ol.writeCodeLink(ref,file,anchor,sp,tooltip);␊ |
1452 | nextCodeLine();␊ |
1453 | }␊ |
1454 | else␊ |
1455 | {␊ |
1456 | //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);␊ |
1457 | ol.writeCodeLink(ref,file,anchor,sp,tooltip);␊ |
1458 | done=TRUE;␊ |
1459 | }␊ |
1460 | }␊ |
1461 | }␊ |
1462 | ␊ |
1463 | ␊ |
1464 | static void codifyLines(char *text)␊ |
1465 | {␊ |
1466 | //printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text);␊ |
1467 | char *p=text,*sp=p;␊ |
1468 | char c;␊ |
1469 | bool done=FALSE;␊ |
1470 | while (!done)␊ |
1471 | {␊ |
1472 | sp=p;␊ |
1473 | while ((c=*p++) && c!='\n') { }␊ |
1474 | if (c=='\n')␊ |
1475 | {␊ |
1476 | g_yyLineNr++;␊ |
1477 | *(p-1)='\0';␊ |
1478 | g_code->codify(sp);␊ |
1479 | nextCodeLine();␊ |
1480 | }␊ |
1481 | else␊ |
1482 | {␊ |
1483 | g_code->codify(sp);␊ |
1484 | done=TRUE;␊ |
1485 | }␊ |
1486 | }␊ |
1487 | }␊ |
1488 | ␊ |
1489 | static void addDocCrossReference(MemberDef *src,MemberDef *dst)␊ |
1490 | {␊ |
1491 | if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types␊ |
1492 | //printf("addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data());␊ |
1493 | if ((Config_getBool("REFERENCED_BY_RELATION") || Config_getBool("CALLER_GRAPH")) && ␊ |
1494 | (src->isFunction() || src->isSlot()) ␊ |
1495 | )␊ |
1496 | {␊ |
1497 | dst->addSourceReferencedBy(src);␊ |
1498 | }␊ |
1499 | if ((Config_getBool("REFERENCES_RELATION") || Config_getBool("CALL_GRAPH")) && ␊ |
1500 | (src->isFunction() || src->isSlot())␊ |
1501 | )␊ |
1502 | {␊ |
1503 | src->addSourceReferences(dst);␊ |
1504 | }␊ |
1505 | ␊ |
1506 | }␊ |
1507 | ␊ |
1508 | ␊ |
1509 | ␊ |
1510 | static bool getLinkInScope(const QCString &c, // scope␊ |
1511 | const QCString &m, // member␊ |
1512 | ␉␉␉ const char *memberText, // exact text␊ |
1513 | ␉␉␉ CodeOutputInterface &ol,␊ |
1514 | ␉␉␉ const char *text␊ |
1515 | ␉␉␉ )␊ |
1516 | {␊ |
1517 | MemberDef *md;␊ |
1518 | ClassDef *cd;␊ |
1519 | FileDef *fd;␊ |
1520 | NamespaceDef *nd;␊ |
1521 | GroupDef *gd;␊ |
1522 | //printf("Trying `%s'::`%s'\n",c.data(),m.data());␊ |
1523 | if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) && ␊ |
1524 | md->isLinkable())␊ |
1525 | {␊ |
1526 | //printf("Found!\n");␊ |
1527 | //Definition *d=0;␊ |
1528 | //if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;␊ |
1529 | ␊ |
1530 | Definition *d = md->getOuterScope()==Doxygen::globalScope ?␊ |
1531 | ␉ md->getBodyDef() : md->getOuterScope();␊ |
1532 | if (md->getGroupDef()) d = md->getGroupDef();␊ |
1533 | if (d && d->isLinkable())␊ |
1534 | {␊ |
1535 | g_theCallContext.setClass(stripClassName(md->typeString()));␊ |
1536 | //printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n",␊ |
1537 | // g_currentDefinition,g_currentMemberDef,g_insideBody);␊ |
1538 | ␊ |
1539 | if (g_currentDefinition && g_currentMemberDef &&␊ |
1540 | ␉ md!=g_currentMemberDef && g_insideBody)␊ |
1541 | {␊ |
1542 | ␉addDocCrossReference(g_currentMemberDef,md);␊ |
1543 | }␊ |
1544 | //printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());␊ |
1545 | ␊ |
1546 | writeMultiLineCodeLink(ol,md->getReference(),␊ |
1547 | ␉ md->getOutputFileBase(),␊ |
1548 | ␉ md->anchor(),␊ |
1549 | ␉␉␉␉text ? text : memberText,␊ |
1550 | md->briefDescriptionAsTooltip());␊ |
1551 | addToSearchIndex(text ? text : memberText);␊ |
1552 | return TRUE;␊ |
1553 | } ␊ |
1554 | }␊ |
1555 | return FALSE;␊ |
1556 | }␊ |
1557 | ␊ |
1558 | static bool getLink(const char *className,␊ |
1559 | const char *memberName,␊ |
1560 | ␉␉ CodeOutputInterface &ol,␊ |
1561 | ␉␉ const char *text=0)␊ |
1562 | {␊ |
1563 | QCString m=removeRedundantWhiteSpace(memberName);␊ |
1564 | QCString c=className;␊ |
1565 | if (!getLinkInScope(c,m,memberName,ol,text))␊ |
1566 | {␊ |
1567 | if (!g_curClassName.isEmpty())␊ |
1568 | {␊ |
1569 | if (!c.isEmpty()) c.prepend("::");␊ |
1570 | c.prepend(g_curClassName);␊ |
1571 | return getLinkInScope(c,m,memberName,ol,text);␊ |
1572 | }␊ |
1573 | return FALSE;␊ |
1574 | }␊ |
1575 | return TRUE;␊ |
1576 | }␊ |
1577 | ␊ |
1578 | ␊ |
1579 | /*␊ |
1580 | For a given string in the source code,␊ |
1581 | finds its class or global id and links to it.␊ |
1582 | ␊ |
1583 | As of June 1, '05, this ONLY finds classes␊ |
1584 | */␊ |
1585 | static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,␊ |
1586 | bool /*typeOnly*/=FALSE)␊ |
1587 | {␊ |
1588 | QCString className=clName;␊ |
1589 | ␊ |
1590 | // Don't do anything for empty text␊ |
1591 | if (className.isEmpty()) return;␊ |
1592 | ␊ |
1593 | ClassDef *cd=0,*lcd=0; /** Class def that we may find */␊ |
1594 | MemberDef *md=0; /** Member def that we may find */␊ |
1595 | bool isLocal=FALSE;␊ |
1596 | ␊ |
1597 | // printf("generateClassOrGlobalLink(className=%s)\n",className.data());␊ |
1598 | ␊ |
1599 | if ((lcd=g_theVarContext.findVariable(className))==0) // not a local variable␊ |
1600 | {␊ |
1601 | Definition *d = g_currentDefinition;␊ |
1602 | ␊ |
1603 | cd = getResolvedClass(d,g_sourceFileDef,className,&md);␊ |
1604 | ␊ |
1605 | //printf("d=%p g_sourceFileDef=%p\n",d,g_currentDefinition);␊ |
1606 | //printf("is found as a type %s\n",cd?cd->name().data():"<null>");␊ |
1607 | ␊ |
1608 | if (cd==0 && md==0) // also see if it is variable or enum or enum value␊ |
1609 | {␊ |
1610 | if (getLink(g_classScope,clName,ol,clName))␊ |
1611 | {␊ |
1612 | ␉return;␊ |
1613 | }␊ |
1614 | }␊ |
1615 | }␊ |
1616 | else␊ |
1617 | {␊ |
1618 | if (lcd!=PyVariableContext::dummyContext) ␊ |
1619 | {␊ |
1620 | g_theCallContext.setClass(lcd);␊ |
1621 | }␊ |
1622 | isLocal=TRUE;␊ |
1623 | //fprintf(stderr,"is a local variable cd=%p!\n",cd);␊ |
1624 | }␊ |
1625 | ␊ |
1626 | if (cd && cd->isLinkable()) // is it a linkable class␊ |
1627 | {␊ |
1628 | writeMultiLineCodeLink(ol,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),clName,cd->briefDescriptionAsTooltip());␊ |
1629 | addToSearchIndex(className);␊ |
1630 | if (md)␊ |
1631 | {␊ |
1632 | Definition *d = md->getOuterScope()==Doxygen::globalScope ?␊ |
1633 | md->getBodyDef() : md->getOuterScope();␊ |
1634 | if (md->getGroupDef()) d = md->getGroupDef();␊ |
1635 | if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef)␊ |
1636 | {␊ |
1637 | addDocCrossReference(g_currentMemberDef,md);␊ |
1638 | }␊ |
1639 | }␊ |
1640 | }␊ |
1641 | else // not a class, maybe a global member␊ |
1642 | {␊ |
1643 | ␊ |
1644 | /*␊ |
1645 | This code requires a going-over in order to␊ |
1646 | make it work for Python␊ |
1647 | ␊ |
1648 | //printf("class %s not linkable! cd=%p md=%p typeOnly=%d\n",clName,cd,md,typeOnly);␊ |
1649 | if (!isLocal && (md!=0 || (cd==0 && !typeOnly))) // not a class, see if it is a global enum/variable/typedef.␊ |
1650 | {␊ |
1651 | if (md==0) // not found as a typedef␊ |
1652 | {␊ |
1653 | ␉md = setCallContextForVar(clName);␊ |
1654 | ␉//printf("setCallContextForVar(%s) md=%p g_currentDefinition=%p\n",clName,md,g_currentDefinition);␊ |
1655 | ␉if (md && g_currentDefinition)␊ |
1656 | ␉{␊ |
1657 | ␉ //fprintf(stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",␊ |
1658 | ␉ // md->name().data(),g_currentDefinition->name().data(),␊ |
1659 | ␉ // isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md),␊ |
1660 | ␉ // md->getOuterScope()->name().data());␊ |
1661 | ␉}␊ |
1662 | ␉ ␊ |
1663 | if (md && g_currentDefinition && ␊ |
1664 | ␉ isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md)==-1)␊ |
1665 | ␉{␊ |
1666 | ␉ md=0; // variable not accessible␊ |
1667 | ␉}␊ |
1668 | }␊ |
1669 | if (md)␊ |
1670 | {␊ |
1671 | //printf("is a global md=%p g_currentDefinition=%s\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>");␊ |
1672 | ␉if (md->isLinkable())␊ |
1673 | ␉{␊ |
1674 | ␉ writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName,md->briefDescriptionAsTooltip());␊ |
1675 | addToSearchIndex(clName);␊ |
1676 | ␉ if (g_currentMemberDef)␊ |
1677 | ␉ {␊ |
1678 | ␉ addDocCrossReference(g_currentMemberDef,md);␊ |
1679 | ␉ }␊ |
1680 | ␉ return;␊ |
1681 | ␉}␊ |
1682 | }␊ |
1683 | }␊ |
1684 | ␊ |
1685 | */␊ |
1686 | ␊ |
1687 | // nothing found, just write out the word␊ |
1688 | codifyLines(clName);␊ |
1689 | addToSearchIndex(clName);␊ |
1690 | }␊ |
1691 | }␊ |
1692 | ␊ |
1693 | /*␊ |
1694 | As of June 1, this function seems to work␊ |
1695 | for file members, but scopes are not␊ |
1696 | being correctly tracked for classes␊ |
1697 | so it doesn't work for classes yet.␊ |
1698 | ␊ |
1699 | */␊ |
1700 | static void generateFunctionLink(CodeOutputInterface &ol,char *funcName)␊ |
1701 | {␊ |
1702 | //CodeClassDef *ccd=0;␊ |
1703 | ClassDef *ccd=0;␊ |
1704 | QCString locScope=g_classScope.copy();␊ |
1705 | QCString locFunc=removeRedundantWhiteSpace(funcName);␊ |
1706 | //fprintf(stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data());␊ |
1707 | int i=locFunc.findRev("::");␊ |
1708 | if (i>0)␊ |
1709 | {␊ |
1710 | locScope=locFunc.left(i);␊ |
1711 | locFunc=locFunc.right(locFunc.length()-i-2).stripWhiteSpace();␊ |
1712 | }␊ |
1713 | //printf("generateFunctionLink(%s) classScope=`%s'\n",locFunc.data(),locScope.data());␊ |
1714 | if (!locScope.isEmpty() && (ccd=g_codeClassSDict[locScope]))␊ |
1715 | {␊ |
1716 | //printf("using classScope %s\n",g_classScope.data());␊ |
1717 | if (ccd->baseClasses())␊ |
1718 | {␊ |
1719 | BaseClassListIterator bcli(*ccd->baseClasses());␊ |
1720 | for ( ; bcli.current() ; ++bcli)␊ |
1721 | {␊ |
1722 | ␉if (getLink(bcli.current()->classDef->name(),locFunc,ol,funcName)) ␊ |
1723 | ␉{␊ |
1724 | ␉ return;␊ |
1725 | ␉}␊ |
1726 | }␊ |
1727 | }␊ |
1728 | }␊ |
1729 | if (!getLink(locScope,locFunc,ol,funcName))␊ |
1730 | {␊ |
1731 | generateClassOrGlobalLink(ol,funcName);␊ |
1732 | }␊ |
1733 | return;␊ |
1734 | }␊ |
1735 | ␊ |
1736 | static bool findMemberLink(CodeOutputInterface &ol,Definition *sym,const char *symName)␊ |
1737 | {␊ |
1738 | //printf("sym %s outerScope=%s equal=%d\n",␊ |
1739 | // sym->name().data(),sym->getOuterScope()->name().data(),␊ |
1740 | // sym->getOuterScope()==g_currentDefinition);␊ |
1741 | ␊ |
1742 | if (sym->getOuterScope() &&␊ |
1743 | sym->getOuterScope()->definitionType()==Definition::TypeClass &&␊ |
1744 | g_currentDefinition->definitionType()==Definition::TypeClass)␊ |
1745 | {␊ |
1746 | ClassDef *cd = (ClassDef*)sym->getOuterScope();␊ |
1747 | ClassDef *thisCd = (ClassDef *)g_currentDefinition;␊ |
1748 | QCString anchor;␊ |
1749 | if (sym->definitionType()==Definition::TypeMember)␊ |
1750 | {␊ |
1751 | anchor=((MemberDef *)sym)->anchor();␊ |
1752 | }␊ |
1753 | ␊ |
1754 | // TODO: find the nearest base class in case cd is a base class of␊ |
1755 | // thisCd ␊ |
1756 | if (cd==thisCd) ␊ |
1757 | {␊ |
1758 | writeMultiLineCodeLink(ol,sym->getReference(),␊ |
1759 | sym->getOutputFileBase(),␊ |
1760 | anchor,␊ |
1761 | symName,␊ |
1762 | sym->briefDescriptionAsTooltip());␊ |
1763 | return TRUE;␊ |
1764 | }␊ |
1765 | }␊ |
1766 | return FALSE;␊ |
1767 | }␊ |
1768 | ␊ |
1769 | static void findMemberLink(CodeOutputInterface &ol,char *symName)␊ |
1770 | {␊ |
1771 | //printf("Member reference: %s scope=%s member=%s\n",␊ |
1772 | // pycodeYYtext,␊ |
1773 | // g_currentDefinition?g_currentDefinition->name().data():"<none>",␊ |
1774 | // g_currentMemberDef?g_currentMemberDef->name().data():"<none>"␊ |
1775 | // );␊ |
1776 | if (g_currentDefinition)␊ |
1777 | {␊ |
1778 | DefinitionIntf *di = Doxygen::symbolMap->find(symName);␊ |
1779 | if (di)␊ |
1780 | {␊ |
1781 | if (di->definitionType()==DefinitionIntf::TypeSymbolList) // multiple symbols␊ |
1782 | {␊ |
1783 | ␉DefinitionListIterator dli(*(DefinitionList*)di);␊ |
1784 | ␉Definition *sym;␊ |
1785 | ␉for (dli.toFirst();(sym=dli.current());++dli)␊ |
1786 | ␉{␊ |
1787 | ␉ if (findMemberLink(ol,sym,symName)) return;␊ |
1788 | ␉}␊ |
1789 | }␊ |
1790 | else // single symbol␊ |
1791 | {␊ |
1792 | ␉if (findMemberLink(ol,(Definition*)di,symName)) return;␊ |
1793 | }␊ |
1794 | }␊ |
1795 | }␊ |
1796 | //printf("sym %s not found\n",&pycodeYYtext[5]);␊ |
1797 | codify(symName);␊ |
1798 | }␊ |
1799 | ␊ |
1800 | static void startFontClass(const char *s)␊ |
1801 | {␊ |
1802 | endFontClass();␊ |
1803 | g_code->startFontClass(s);␊ |
1804 | g_currentFontClass=s;␊ |
1805 | }␊ |
1806 | ␊ |
1807 | static void endFontClass()␊ |
1808 | {␊ |
1809 | if (g_currentFontClass)␊ |
1810 | {␊ |
1811 | g_code->endFontClass();␊ |
1812 | g_currentFontClass=0;␊ |
1813 | }␊ |
1814 | }␊ |
1815 | ␊ |
1816 | #undef YY_INPUT␊ |
1817 | #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);␊ |
1818 | ␊ |
1819 | static int yyread(char *buf,int max_size)␊ |
1820 | {␊ |
1821 | int c=0;␊ |
1822 | while( c < max_size && g_inputString[g_inputPosition] )␊ |
1823 | {␊ |
1824 | *buf = g_inputString[g_inputPosition++] ;␊ |
1825 | c++; buf++;␊ |
1826 | }␊ |
1827 | return c;␊ |
1828 | }␊ |
1829 | ␊ |
1830 | ␊ |
1831 | ␊ |
1832 | ␊ |
1833 | ␊ |
1834 | ␊ |
1835 | ␊ |
1836 | ␊ |
1837 | ␊ |
1838 | ␊ |
1839 | ␊ |
1840 | ␊ |
1841 | ␊ |
1842 | ␊ |
1843 | ␊ |
1844 | #line 1845 "<stdout>"␊ |
1845 | ␊ |
1846 | #define INITIAL 0␊ |
1847 | #define Body 1␊ |
1848 | #define FunctionDec 2␊ |
1849 | #define FunctionParams 3␊ |
1850 | #define ClassDec 4␊ |
1851 | #define ClassInheritance 5␊ |
1852 | #define Suite 6␊ |
1853 | #define SuiteCaptureIndent 7␊ |
1854 | #define SuiteStart 8␊ |
1855 | #define SuiteMaintain 9␊ |
1856 | #define SuiteContinuing 10␊ |
1857 | #define LongString 11␊ |
1858 | #define SingleQuoteString 12␊ |
1859 | #define DoubleQuoteString 13␊ |
1860 | #define TripleString 14␊ |
1861 | ␊ |
1862 | #ifndef YY_NO_UNISTD_H␊ |
1863 | /* Special case for "unistd.h", since it is non-ANSI. We include it way␊ |
1864 | * down here because we want the user's section 1 to have been scanned first.␊ |
1865 | * The user has a chance to override it with an option.␊ |
1866 | */␊ |
1867 | #include <unistd.h>␊ |
1868 | #endif␊ |
1869 | ␊ |
1870 | #ifndef YY_EXTRA_TYPE␊ |
1871 | #define YY_EXTRA_TYPE void *␊ |
1872 | #endif␊ |
1873 | ␊ |
1874 | static int yy_init_globals (void );␊ |
1875 | ␊ |
1876 | /* Accessor methods to globals.␊ |
1877 | These are made visible to non-reentrant scanners for convenience. */␊ |
1878 | ␊ |
1879 | int pycodeYYlex_destroy (void );␊ |
1880 | ␊ |
1881 | int pycodeYYget_debug (void );␊ |
1882 | ␊ |
1883 | void pycodeYYset_debug (int debug_flag );␊ |
1884 | ␊ |
1885 | YY_EXTRA_TYPE pycodeYYget_extra (void );␊ |
1886 | ␊ |
1887 | void pycodeYYset_extra (YY_EXTRA_TYPE user_defined );␊ |
1888 | ␊ |
1889 | FILE *pycodeYYget_in (void );␊ |
1890 | ␊ |
1891 | void pycodeYYset_in (FILE * in_str );␊ |
1892 | ␊ |
1893 | FILE *pycodeYYget_out (void );␊ |
1894 | ␊ |
1895 | void pycodeYYset_out (FILE * out_str );␊ |
1896 | ␊ |
1897 | yy_size_t pycodeYYget_leng (void );␊ |
1898 | ␊ |
1899 | char *pycodeYYget_text (void );␊ |
1900 | ␊ |
1901 | int pycodeYYget_lineno (void );␊ |
1902 | ␊ |
1903 | void pycodeYYset_lineno (int line_number );␊ |
1904 | ␊ |
1905 | /* Macros after this point can all be overridden by user definitions in␊ |
1906 | * section 1.␊ |
1907 | */␊ |
1908 | ␊ |
1909 | #ifndef YY_SKIP_YYWRAP␊ |
1910 | #ifdef __cplusplus␊ |
1911 | extern "C" int pycodeYYwrap (void );␊ |
1912 | #else␊ |
1913 | extern int pycodeYYwrap (void );␊ |
1914 | #endif␊ |
1915 | #endif␊ |
1916 | ␊ |
1917 | #ifndef yytext_ptr␊ |
1918 | static void yy_flex_strncpy (char *,yyconst char *,int );␊ |
1919 | #endif␊ |
1920 | ␊ |
1921 | #ifdef YY_NEED_STRLEN␊ |
1922 | static int yy_flex_strlen (yyconst char * );␊ |
1923 | #endif␊ |
1924 | ␊ |
1925 | #ifndef YY_NO_INPUT␊ |
1926 | ␊ |
1927 | #ifdef __cplusplus␊ |
1928 | static int yyinput (void );␊ |
1929 | #else␊ |
1930 | static int input (void );␊ |
1931 | #endif␊ |
1932 | ␊ |
1933 | #endif␊ |
1934 | ␊ |
1935 | /* Amount of stuff to slurp up with each read. */␊ |
1936 | #ifndef YY_READ_BUF_SIZE␊ |
1937 | #define YY_READ_BUF_SIZE 262144␊ |
1938 | #endif␊ |
1939 | ␊ |
1940 | /* Copy whatever the last rule matched to the standard output. */␊ |
1941 | #ifndef ECHO␊ |
1942 | /* This used to be an fputs(), but since the string might contain NUL's,␊ |
1943 | * we now use fwrite().␊ |
1944 | */␊ |
1945 | #define ECHO fwrite( pycodeYYtext, pycodeYYleng, 1, pycodeYYout )␊ |
1946 | #endif␊ |
1947 | ␊ |
1948 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,␊ |
1949 | * is returned in "result".␊ |
1950 | */␊ |
1951 | #ifndef YY_INPUT␊ |
1952 | #define YY_INPUT(buf,result,max_size) \␊ |
1953 | ␉if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \␊ |
1954 | ␉␉{ \␊ |
1955 | ␉␉int c = '*'; \␊ |
1956 | ␉␉yy_size_t n; \␊ |
1957 | ␉␉for ( n = 0; n < max_size && \␊ |
1958 | ␉␉␉ (c = getc( pycodeYYin )) != EOF && c != '\n'; ++n ) \␊ |
1959 | ␉␉␉buf[n] = (char) c; \␊ |
1960 | ␉␉if ( c == '\n' ) \␊ |
1961 | ␉␉␉buf[n++] = (char) c; \␊ |
1962 | ␉␉if ( c == EOF && ferror( pycodeYYin ) ) \␊ |
1963 | ␉␉␉YY_FATAL_ERROR( "input in flex scanner failed" ); \␊ |
1964 | ␉␉result = n; \␊ |
1965 | ␉␉} \␊ |
1966 | ␉else \␊ |
1967 | ␉␉{ \␊ |
1968 | ␉␉errno=0; \␊ |
1969 | ␉␉while ( (result = fread(buf, 1, max_size, pycodeYYin))==0 && ferror(pycodeYYin)) \␊ |
1970 | ␉␉␉{ \␊ |
1971 | ␉␉␉if( errno != EINTR) \␊ |
1972 | ␉␉␉␉{ \␊ |
1973 | ␉␉␉␉YY_FATAL_ERROR( "input in flex scanner failed" ); \␊ |
1974 | ␉␉␉␉break; \␊ |
1975 | ␉␉␉␉} \␊ |
1976 | ␉␉␉errno=0; \␊ |
1977 | ␉␉␉clearerr(pycodeYYin); \␊ |
1978 | ␉␉␉} \␊ |
1979 | ␉␉}\␊ |
1980 | \␊ |
1981 | ␊ |
1982 | #endif␊ |
1983 | ␊ |
1984 | /* No semi-colon after return; correct usage is to write "yyterminate();" -␊ |
1985 | * we don't want an extra ';' after the "return" because that will cause␊ |
1986 | * some compilers to complain about unreachable statements.␊ |
1987 | */␊ |
1988 | #ifndef yyterminate␊ |
1989 | #define yyterminate() return YY_NULL␊ |
1990 | #endif␊ |
1991 | ␊ |
1992 | /* Number of entries by which start-condition stack grows. */␊ |
1993 | #ifndef YY_START_STACK_INCR␊ |
1994 | #define YY_START_STACK_INCR 25␊ |
1995 | #endif␊ |
1996 | ␊ |
1997 | /* Report a fatal error. */␊ |
1998 | #ifndef YY_FATAL_ERROR␊ |
1999 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )␊ |
2000 | #endif␊ |
2001 | ␊ |
2002 | /* end tables serialization structures and prototypes */␊ |
2003 | ␊ |
2004 | /* Default declaration of generated scanner - a define so the user can␊ |
2005 | * easily add parameters.␊ |
2006 | */␊ |
2007 | #ifndef YY_DECL␊ |
2008 | #define YY_DECL_IS_OURS 1␊ |
2009 | ␊ |
2010 | extern int pycodeYYlex (void);␊ |
2011 | ␊ |
2012 | #define YY_DECL int pycodeYYlex (void)␊ |
2013 | #endif /* !YY_DECL */␊ |
2014 | ␊ |
2015 | /* Code executed at the beginning of each rule, after pycodeYYtext and pycodeYYleng␊ |
2016 | * have been set up.␊ |
2017 | */␊ |
2018 | #ifndef YY_USER_ACTION␊ |
2019 | #define YY_USER_ACTION␊ |
2020 | #endif␊ |
2021 | ␊ |
2022 | /* Code executed at the end of each rule. */␊ |
2023 | #ifndef YY_BREAK␊ |
2024 | #define YY_BREAK break;␊ |
2025 | #endif␊ |
2026 | ␊ |
2027 | #define YY_RULE_SETUP \␊ |
2028 | ␉YY_USER_ACTION␊ |
2029 | ␊ |
2030 | /** The main scanner function which does all the work.␊ |
2031 | */␊ |
2032 | YY_DECL␊ |
2033 | {␊ |
2034 | ␉register yy_state_type yy_current_state;␊ |
2035 | ␉register char *yy_cp, *yy_bp;␊ |
2036 | ␉register int yy_act;␊ |
2037 | ␊ |
2038 | #line 949 "pycode.l"␊ |
2039 | ␊ |
2040 | ␊ |
2041 | #line 2042 "<stdout>"␊ |
2042 | ␊ |
2043 | ␉if ( !(yy_init) )␊ |
2044 | ␉␉{␊ |
2045 | ␉␉(yy_init) = 1;␊ |
2046 | ␊ |
2047 | #ifdef YY_USER_INIT␊ |
2048 | ␉␉YY_USER_INIT;␊ |
2049 | #endif␊ |
2050 | ␊ |
2051 | /* Create the reject buffer large enough to save one state per allowed character. */␊ |
2052 | if ( ! (yy_state_buf) )␊ |
2053 | (yy_state_buf) = (yy_state_type *)pycodeYYalloc(YY_STATE_BUF_SIZE );␊ |
2054 | if ( ! (yy_state_buf) )␊ |
2055 | YY_FATAL_ERROR( "out of dynamic memory in pycodeYYlex()" );␊ |
2056 | ␊ |
2057 | ␉␉if ( ! (yy_start) )␊ |
2058 | ␉␉␉(yy_start) = 1;␉/* first start state */␊ |
2059 | ␊ |
2060 | ␉␉if ( ! pycodeYYin )␊ |
2061 | ␉␉␉pycodeYYin = stdin;␊ |
2062 | ␊ |
2063 | ␉␉if ( ! pycodeYYout )␊ |
2064 | ␉␉␉pycodeYYout = stdout;␊ |
2065 | ␊ |
2066 | ␉␉if ( ! YY_CURRENT_BUFFER ) {␊ |
2067 | ␉␉␉pycodeYYensure_buffer_stack ();␊ |
2068 | ␉␉␉YY_CURRENT_BUFFER_LVALUE =␊ |
2069 | ␉␉␉␉pycodeYY_create_buffer(pycodeYYin,YY_BUF_SIZE );␊ |
2070 | ␉␉}␊ |
2071 | ␊ |
2072 | ␉␉pycodeYY_load_buffer_state( );␊ |
2073 | ␉␉}␊ |
2074 | ␊ |
2075 | ␉while ( 1 )␉␉/* loops until end-of-file is reached */␊ |
2076 | ␉␉{␊ |
2077 | ␉␉yy_cp = (yy_c_buf_p);␊ |
2078 | ␊ |
2079 | ␉␉/* Support of pycodeYYtext. */␊ |
2080 | ␉␉*yy_cp = (yy_hold_char);␊ |
2081 | ␊ |
2082 | ␉␉/* yy_bp points to the position in yy_ch_buf of the start of␊ |
2083 | ␉␉ * the current run.␊ |
2084 | ␉␉ */␊ |
2085 | ␉␉yy_bp = yy_cp;␊ |
2086 | ␊ |
2087 | ␉␉yy_current_state = (yy_start);␊ |
2088 | ␊ |
2089 | ␉␉(yy_state_ptr) = (yy_state_buf);␊ |
2090 | ␉␉*(yy_state_ptr)++ = yy_current_state;␊ |
2091 | ␊ |
2092 | yy_match:␊ |
2093 | ␉␉do␊ |
2094 | ␉␉␉{␊ |
2095 | ␉␉␉register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];␊ |
2096 | ␉␉␉while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )␊ |
2097 | ␉␉␉␉{␊ |
2098 | ␉␉␉␉yy_current_state = (int) yy_def[yy_current_state];␊ |
2099 | ␉␉␉␉if ( yy_current_state >= 497 )␊ |
2100 | ␉␉␉␉␉yy_c = yy_meta[(unsigned int) yy_c];␊ |
2101 | ␉␉␉␉}␊ |
2102 | ␉␉␉yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];␊ |
2103 | ␉␉␉*(yy_state_ptr)++ = yy_current_state;␊ |
2104 | ␉␉␉++yy_cp;␊ |
2105 | ␉␉␉}␊ |
2106 | ␉␉while ( yy_base[yy_current_state] != 1137 );␊ |
2107 | ␊ |
2108 | yy_find_action:␊ |
2109 | ␉␉yy_current_state = *--(yy_state_ptr);␊ |
2110 | ␉␉(yy_lp) = yy_accept[yy_current_state];␊ |
2111 | goto find_rule; /* Shut up GCC warning -Wall */␊ |
2112 | find_rule: /* we branch to this label when backing up */␊ |
2113 | ␉␉for ( ; ; ) /* until we find what rule we matched */␊ |
2114 | ␉␉␉{␊ |
2115 | ␉␉␉if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )␊ |
2116 | ␉␉␉␉{␊ |
2117 | ␉␉␉␉yy_act = yy_acclist[(yy_lp)];␊ |
2118 | ␉␉␉␉if ( yy_act & YY_TRAILING_HEAD_MASK ||␊ |
2119 | ␉␉␉␉ (yy_looking_for_trail_begin) )␊ |
2120 | ␉␉␉␉␉{␊ |
2121 | ␉␉␉␉␉if ( yy_act == (yy_looking_for_trail_begin) )␊ |
2122 | ␉␉␉␉␉␉{␊ |
2123 | ␉␉␉␉␉␉(yy_looking_for_trail_begin) = 0;␊ |
2124 | ␉␉␉␉␉␉yy_act &= ~YY_TRAILING_HEAD_MASK;␊ |
2125 | ␉␉␉␉␉␉break;␊ |
2126 | ␉␉␉␉␉␉}␊ |
2127 | ␉␉␉␉␉}␊ |
2128 | ␉␉␉␉else if ( yy_act & YY_TRAILING_MASK )␊ |
2129 | ␉␉␉␉␉{␊ |
2130 | ␉␉␉␉␉(yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;␊ |
2131 | ␉␉␉␉␉(yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;␊ |
2132 | ␉␉␉␉␉(yy_full_match) = yy_cp;␊ |
2133 | ␉␉␉␉␉(yy_full_state) = (yy_state_ptr);␊ |
2134 | ␉␉␉␉␉(yy_full_lp) = (yy_lp);␊ |
2135 | ␉␉␉␉␉}␊ |
2136 | ␉␉␉␉else␊ |
2137 | ␉␉␉␉␉{␊ |
2138 | ␉␉␉␉␉(yy_full_match) = yy_cp;␊ |
2139 | ␉␉␉␉␉(yy_full_state) = (yy_state_ptr);␊ |
2140 | ␉␉␉␉␉(yy_full_lp) = (yy_lp);␊ |
2141 | ␉␉␉␉␉break;␊ |
2142 | ␉␉␉␉␉}␊ |
2143 | ␉␉␉␉++(yy_lp);␊ |
2144 | ␉␉␉␉goto find_rule;␊ |
2145 | ␉␉␉␉}␊ |
2146 | ␉␉␉--yy_cp;␊ |
2147 | ␉␉␉yy_current_state = *--(yy_state_ptr);␊ |
2148 | ␉␉␉(yy_lp) = yy_accept[yy_current_state];␊ |
2149 | ␉␉␉}␊ |
2150 | ␊ |
2151 | ␉␉YY_DO_BEFORE_ACTION;␊ |
2152 | ␊ |
2153 | do_action:␉/* This label is used only to access EOF actions. */␊ |
2154 | ␊ |
2155 | ␉␉switch ( yy_act )␊ |
2156 | ␉{ /* beginning of action switch */␊ |
2157 | ␊ |
2158 | case 1:␊ |
2159 | YY_RULE_SETUP␊ |
2160 | #line 952 "pycode.l"␊ |
2161 | {␊ |
2162 | ␉␉␉␉ startFontClass("keyword");␊ |
2163 | ␉␉␉␉␉codify(pycodeYYtext);␊ |
2164 | ␉␉␉␉␉endFontClass();␊ |
2165 | ␉␉␉␉␉BEGIN( FunctionDec );␊ |
2166 | ␉␉ }␊ |
2167 | ␉YY_BREAK␊ |
2168 | case 2:␊ |
2169 | YY_RULE_SETUP␊ |
2170 | #line 959 "pycode.l"␊ |
2171 | {␊ |
2172 | ␉␉␉␉ startFontClass("keyword");␊ |
2173 | ␉␉␉␉␉codify(pycodeYYtext);␊ |
2174 | ␉␉␉␉␉endFontClass();␊ |
2175 | ␉␉␉␉␉BEGIN( ClassDec );␊ |
2176 | ␉␉ }␊ |
2177 | ␉YY_BREAK␊ |
2178 | case 3:␊ |
2179 | YY_RULE_SETUP␊ |
2180 | #line 965 "pycode.l"␊ |
2181 | {␊ |
2182 | ␉␉␉␉ startFontClass("keywordtype");␊ |
2183 | ␉␉␉␉␉codify(pycodeYYtext);␊ |
2184 | ␉␉␉␉␉endFontClass();␊ |
2185 | ␉␉␉␉ }␊ |
2186 | ␉YY_BREAK␊ |
2187 | case 4:␊ |
2188 | YY_RULE_SETUP␊ |
2189 | #line 970 "pycode.l"␊ |
2190 | {␊ |
2191 | ␉␉␉␉ codify("self.");␊ |
2192 | ␉␉␉␉ findMemberLink(*g_code,&pycodeYYtext[5]);␊ |
2193 | ␉ }␊ |
2194 | ␉YY_BREAK␊ |
2195 | ␊ |
2196 | case 5:␊ |
2197 | YY_RULE_SETUP␊ |
2198 | #line 976 "pycode.l"␊ |
2199 | {␊ |
2200 | ␊ |
2201 | ␉␉␉␉␉generateClassOrGlobalLink(*g_code,pycodeYYtext);␊ |
2202 | ␉␉␉␉␉// codify(pycodeYYtext);␊ |
2203 | ␉␉␉␉␉g_curClassName = pycodeYYtext;␊ |
2204 | ␉␉␉␉␉g_curClassBases.clear();␊ |
2205 | ␉␉␉␉␉BEGIN( ClassInheritance );␊ |
2206 | ␉␉ }␊ |
2207 | ␉YY_BREAK␊ |
2208 | ␊ |
2209 | case 6:␊ |
2210 | YY_RULE_SETUP␊ |
2211 | #line 986 "pycode.l"␊ |
2212 | {␊ |
2213 | ␉␉␉␉␉codify(pycodeYYtext);␊ |
2214 | }␊ |
2215 | ␉YY_BREAK␊ |
2216 | case 7:␊ |
2217 | YY_RULE_SETUP␊ |
2218 | #line 990 "pycode.l"␊ |
2219 | {␊ |
2220 | // The parser␊ |
2221 | ␉␉␉␉␉// is assuming␊ |
2222 | ␉␉␉␉␉// that ALL identifiers␊ |
2223 | ␉␉␉␉␉// in this state␊ |
2224 | ␉␉␉␉␉// are base classes;␊ |
2225 | ␉␉␉␉␉// it doesn't check to see␊ |
2226 | ␉␉␉␉␉// that the first parenthesis␊ |
2227 | ␉␉␉␉␉// has been seen.␊ |
2228 | ␊ |
2229 | ␉␉␉␉␉// This is bad - it should␊ |
2230 | ␉␉␉␉␉// probably be more strict␊ |
2231 | ␉␉␉␉␉// about what to accept.␊ |
2232 | ␊ |
2233 | g_curClassBases.inSort(pycodeYYtext);␊ |
2234 | ␉␉␉␉␉generateClassOrGlobalLink(*g_code,pycodeYYtext);␊ |
2235 | ␉␉␉␉␉// codify(pycodeYYtext);␊ |
2236 | }␊ |
2237 | ␉YY_BREAK␊ |
2238 | case 8:␊ |
2239 | YY_RULE_SETUP␊ |
2240 | #line 1009 "pycode.l"␊ |
2241 | {␊ |
2242 | ␉␉␉␉ codify(pycodeYYtext);␊ |
2243 | ␊ |
2244 | ␉␉␉␉ // Assume this will␊ |
2245 | ␉␉␉␉ // be a one-line suite;␊ |
2246 | ␉␉␉␉ // found counter-example␊ |
2247 | ␉␉␉␉ // in SuiteStart.␊ |
2248 | ␊ |
2249 | // Push a class scope␊ |
2250 | ␊ |
2251 | ClassDef *classDefToAdd = new ClassDef("<code>",1,g_curClassName,ClassDef::Class,0,0,FALSE);␊ |
2252 | g_codeClassSDict.append(g_curClassName,classDefToAdd);␊ |
2253 | char *s=g_curClassBases.first();␊ |
2254 | while (s) ␊ |
2255 | ␉␉␉␉ {␊ |
2256 | ClassDef *baseDefToAdd;␊ |
2257 | baseDefToAdd=g_codeClassSDict[s];␊ |
2258 | ␊ |
2259 | ␉␉␉␉␉// Try to find class in global␊ |
2260 | ␉␉␉␉␉// scope␊ |
2261 | ␉␉␉␉␉if (baseDefToAdd==0) ␊ |
2262 | ␉␉␉␉␉{␊ |
2263 | ␉␉␉␉␉ baseDefToAdd=getResolvedClass(g_currentDefinition,g_sourceFileDef,s);␊ |
2264 | ␉␉␉␉␉}␊ |
2265 | ␊ |
2266 | ␉␉␉␉␉if (baseDefToAdd && baseDefToAdd!=classDefToAdd) ␊ |
2267 | ␉␉␉␉␉{␊ |
2268 | ␉␉␉␉ classDefToAdd->insertBaseClass(baseDefToAdd,s,Public,Normal);␊ |
2269 | ␉␉␉␉␉}␊ |
2270 | ␊ |
2271 | s=g_curClassBases.next();␊ |
2272 | ␉␉␉ }␊ |
2273 | ␊ |
2274 | ␉␉␉␉ // Reset class-parsing variables.␊ |
2275 | ␉␉␉␉ g_curClassName.resize(0);␊ |
2276 | ␉␉␉␉ g_curClassBases.clear();␊ |
2277 | ␉␉␉␉ ␊ |
2278 | ␉␉␉␉ g_noSuiteFound = TRUE;␊ |
2279 | ␉␉␉␉ BEGIN( SuiteStart );␊ |
2280 | }␊ |
2281 | ␉YY_BREAK␊ |
2282 | ␊ |
2283 | ␊ |
2284 | case 9:␊ |
2285 | YY_RULE_SETUP␊ |
2286 | #line 1053 "pycode.l"␊ |
2287 | {␊ |
2288 | generateFunctionLink(*g_code,pycodeYYtext);␊ |
2289 | }␊ |
2290 | ␉YY_BREAK␊ |
2291 | case 10:␊ |
2292 | YY_RULE_SETUP␊ |
2293 | #line 1057 "pycode.l"␊ |
2294 | {␊ |
2295 | ␉␉␉␉ codify(pycodeYYtext);␊ |
2296 | ␉␉␉␉␉BEGIN( FunctionParams );␊ |
2297 | ␉␉ }␊ |
2298 | ␉YY_BREAK␊ |
2299 | ␊ |
2300 | ␊ |
2301 | case 11:␊ |
2302 | YY_RULE_SETUP␊ |
2303 | #line 1064 "pycode.l"␊ |
2304 | {␊ |
2305 | // Parses delimiters␊ |
2306 | ␉␉␉␉ codify(pycodeYYtext);␊ |
2307 | }␊ |
2308 | ␉YY_BREAK␊ |
2309 | case 12:␊ |
2310 | YY_RULE_SETUP␊ |
2311 | #line 1069 "pycode.l"␊ |
2312 | {␊ |
2313 | ␉␉␉␉ codify(pycodeYYtext);␊ |
2314 | }␊ |
2315 | ␉YY_BREAK␊ |
2316 | case 13:␊ |
2317 | YY_RULE_SETUP␊ |
2318 | #line 1073 "pycode.l"␊ |
2319 | {␊ |
2320 | codify(pycodeYYtext);␊ |
2321 | }␊ |
2322 | ␉YY_BREAK␊ |
2323 | case 14:␊ |
2324 | YY_RULE_SETUP␊ |
2325 | #line 1077 "pycode.l"␊ |
2326 | {␊ |
2327 | ␉␉␉␉ codify(pycodeYYtext);␊ |
2328 | ␊ |
2329 | ␉␉␉␉ // Assume this will␊ |
2330 | ␉␉␉␉ // be a one-line suite;␊ |
2331 | ␉␉␉␉ // found counter-example␊ |
2332 | ␉␉␉␉ // in SuiteStart.␊ |
2333 | ␉␉␉␉ g_noSuiteFound = TRUE;␊ |
2334 | ␉␉␉␉ BEGIN( SuiteStart );␊ |
2335 | }␊ |
2336 | ␉YY_BREAK␊ |
2337 | ␊ |
2338 | ␊ |
2339 | case 15:␊ |
2340 | YY_RULE_SETUP␊ |
2341 | #line 1091 "pycode.l"␊ |
2342 | {␊ |
2343 | // Position-sensitive rules!␊ |
2344 | // Must come AFTER keyword-triggered rules␊ |
2345 | // Must come BEFORE identifier NONEMPTY-like rules␊ |
2346 | // to syntax highlight.␊ |
2347 | ␊ |
2348 | ␉␉ startFontClass("keyword");␊ |
2349 | ␉␉ codify(pycodeYYtext);␊ |
2350 | ␉␉ endFontClass();␊ |
2351 | }␊ |
2352 | ␉YY_BREAK␊ |
2353 | case 16:␊ |
2354 | YY_RULE_SETUP␊ |
2355 | #line 1102 "pycode.l"␊ |
2356 | {␊ |
2357 | ␉␉ startFontClass("keywordflow");␊ |
2358 | ␉␉ codify(pycodeYYtext);␊ |
2359 | ␉␉ endFontClass();␊ |
2360 | }␊ |
2361 | ␉YY_BREAK␊ |
2362 | case 17:␊ |
2363 | YY_RULE_SETUP␊ |
2364 | #line 1108 "pycode.l"␊ |
2365 | {␊ |
2366 | ␉␉ codify(pycodeYYtext);␊ |
2367 | ␉␉␉ }␊ |
2368 | ␉YY_BREAK␊ |
2369 | ␊ |
2370 | ␊ |
2371 | case 18:␊ |
2372 | YY_RULE_SETUP␊ |
2373 | #line 1117 "pycode.l"␊ |
2374 | {␊ |
2375 | codify(pycodeYYtext);␊ |
2376 | }␊ |
2377 | ␉YY_BREAK␊ |
2378 | case 19:␊ |
2379 | YY_RULE_SETUP␊ |
2380 | #line 1120 "pycode.l"␊ |
2381 | {␊ |
2382 | startFontClass("keyword");␊ |
2383 | ␉␉␉␉␉ codifyLines(pycodeYYtext);␊ |
2384 | ␉␉ endFontClass();␊ |
2385 | ␊ |
2386 | ␉␉␉␉␉ // No indentation necesary␊ |
2387 | ␉␉␉␉␉ g_noSuiteFound = FALSE;␊ |
2388 | }␊ |
2389 | ␉YY_BREAK␊ |
2390 | case 20:␊ |
2391 | YY_RULE_SETUP␊ |
2392 | #line 1129 "pycode.l"␊ |
2393 | {␊ |
2394 | startFontClass("keywordflow");␊ |
2395 | ␉␉␉␉␉ codifyLines(pycodeYYtext);␊ |
2396 | ␉␉ endFontClass();␊ |
2397 | ␊ |
2398 | ␉␉␉␉␉ // No indentation necesary␊ |
2399 | ␉␉␉␉␉ g_noSuiteFound = FALSE;␊ |
2400 | }␊ |
2401 | ␉YY_BREAK␊ |
2402 | case 21:␊ |
2403 | YY_RULE_SETUP␊ |
2404 | #line 1137 "pycode.l"␊ |
2405 | {␊ |
2406 | codify(pycodeYYtext);␊ |
2407 | ␉␉␉␉ } ␊ |
2408 | ␉YY_BREAK␊ |
2409 | case 22:␊ |
2410 | YY_RULE_SETUP␊ |
2411 | #line 1142 "pycode.l"␊ |
2412 | {␊ |
2413 | // This eats EVERYTHING␊ |
2414 | ␉␉␉␉␉ // except the newline␊ |
2415 | startFontClass("comment");␊ |
2416 | ␉␉␉␉␉ codifyLines(pycodeYYtext);␊ |
2417 | ␉␉ endFontClass();␊ |
2418 | }␊ |
2419 | ␉YY_BREAK␊ |
2420 | case 23:␊ |
2421 | /* rule 23 can match eol */␊ |
2422 | YY_RULE_SETUP␊ |
2423 | #line 1150 "pycode.l"␊ |
2424 | {␊ |
2425 | ␉␉␉␉␉ codifyLines(pycodeYYtext);␊ |
2426 | ␉␉␉␉␉ if ( g_noSuiteFound ) ␊ |
2427 | ␉␉␉␉␉ {␊ |
2428 | // printf("New suite to capture! [%d]\n", g_yyLineNr);␊ |
2429 | ␉␉␉␉␉ BEGIN ( SuiteCaptureIndent );␊ |
2430 | ␉␉␉␉␉ }␊ |
2431 | }␊ |
2432 | ␉YY_BREAK␊ |
2433 | ␊ |
2434 | ␊ |
2435 | case 24:␊ |
2436 | /* rule 24 can match eol */␊ |
2437 | YY_RULE_SETUP␊ |
2438 | #line 1161 "pycode.l"␊ |
2439 | {␊ |
2440 | // Blankline - ignore, keep looking for indentation.␊ |
2441 | ␉␉␉␉ codifyLines(pycodeYYtext);␊ |
2442 | }␊ |
2443 | ␉YY_BREAK␊ |
2444 | case 25:␊ |
2445 | YY_RULE_SETUP␊ |
2446 | #line 1166 "pycode.l"␊ |
2447 | {␊ |
2448 | // This state lasts momentarily,␊ |
2449 | // to check the indentation␊ |
2450 | // level that is about to be␊ |
2451 | // used.␊ |
2452 | ␉␉␉␉ codifyLines(pycodeYYtext);␊ |
2453 | ␉␉␉␉ g_indents.push(pycodeYYleng);␊ |
2454 | // printf("Captured indent of %d [line %d]\n", pycodeYYleng, g_yyLineNr);␊ |
2455 | ␉␉␉␉ BEGIN( Suite );␊ |
2456 | }␊ |
2457 | ␉YY_BREAK␊ |
2458 | ␊ |
2459 | ␊ |
2460 | case 26:␊ |
2461 | YY_RULE_SETUP␊ |
2462 | #line 1180 "pycode.l"␊ |
2463 | {␊ |
2464 | // This implements poor␊ |
2465 | ␉␉␉␉ // indendation-tracking;␊ |
2466 | // should be improved.␊ |
2467 | ␉␉␉␉ // (translate tabs to space, etc)␊ |
2468 | ␉␉ codifyLines(pycodeYYtext);␊ |
2469 | adjustScopesAndSuites(pycodeYYleng);␊ |
2470 | }␊ |
2471 | ␉YY_BREAK␊ |
2472 | case 27:␊ |
2473 | /* rule 27 can match eol */␊ |
2474 | YY_RULE_SETUP␊ |
2475 | #line 1189 "pycode.l"␊ |
2476 | {␊ |
2477 | // If this ever succeeds,␊ |
2478 | ␉␉␉␉ // it means that this is␊ |
2479 | ␉␉␉␉ // a blank line, and␊ |
2480 | ␉␉␉␉ // can be ignored.␊ |
2481 | ␉␉ codifyLines(pycodeYYtext);␊ |
2482 | }␊ |
2483 | ␉YY_BREAK␊ |
2484 | case 28:␊ |
2485 | YY_RULE_SETUP␊ |
2486 | #line 1197 "pycode.l"␊ |
2487 | {␊ |
2488 | // Default rule; matches␊ |
2489 | ␉␉␉␉ // the empty string, assuming␊ |
2490 | ␉␉␉␉ // real text starts here.␊ |
2491 | ␉␉␉␉ // Just go straight to Body.␊ |
2492 | adjustScopesAndSuites(0);␊ |
2493 | }␊ |
2494 | ␉YY_BREAK␊ |
2495 | ␊ |
2496 | case 29:␊ |
2497 | /* rule 29 can match eol */␊ |
2498 | YY_RULE_SETUP␊ |
2499 | #line 1207 "pycode.l"␊ |
2500 | {␊ |
2501 | codifyLines(pycodeYYtext);␊ |
2502 | ␉␉␉ BEGIN( SuiteMaintain );␊ |
2503 | ␉␉ }␊ |
2504 | ␉YY_BREAK␊ |
2505 | case 30:␊ |
2506 | YY_RULE_SETUP␊ |
2507 | #line 1211 "pycode.l"␊ |
2508 | {␊ |
2509 | ␉␉␉ codify(pycodeYYtext);␊ |
2510 | }␊ |
2511 | ␉YY_BREAK␊ |
2512 | case 31:␊ |
2513 | /* rule 31 can match eol */␊ |
2514 | YY_RULE_SETUP␊ |
2515 | #line 1214 "pycode.l"␊ |
2516 | {␊ |
2517 | ␉␉ codifyLines(pycodeYYtext);␊ |
2518 | }␊ |
2519 | ␉YY_BREAK␊ |
2520 | // Single quoted string like 'That\'s a """nice""" string!'␊ |
2521 | case 32:␊ |
2522 | /* rule 32 can match eol */␊ |
2523 | YY_RULE_SETUP␊ |
2524 | #line 1219 "pycode.l"␊ |
2525 | { // line continuation␊ |
2526 | ␉␉ codifyLines(pycodeYYtext);␊ |
2527 | }␊ |
2528 | ␉YY_BREAK␊ |
2529 | case 33:␊ |
2530 | YY_RULE_SETUP␊ |
2531 | #line 1222 "pycode.l"␊ |
2532 | { // espaced char␊ |
2533 | ␉␉ codify(pycodeYYtext);␊ |
2534 | }␊ |
2535 | ␉YY_BREAK␊ |
2536 | case 34:␊ |
2537 | YY_RULE_SETUP␊ |
2538 | #line 1225 "pycode.l"␊ |
2539 | { // tripple double quotes␊ |
2540 | ␉␉ codify(pycodeYYtext);␊ |
2541 | ␉␉␉ }␊ |
2542 | ␉YY_BREAK␊ |
2543 | case 35:␊ |
2544 | YY_RULE_SETUP␊ |
2545 | #line 1228 "pycode.l"␊ |
2546 | { // end of the string␊ |
2547 | ␉␉ codify(pycodeYYtext);␊ |
2548 | ␉␉␉␉ endFontClass();␊ |
2549 | ␉␉ BEGIN(g_stringContext);␊ |
2550 | }␊ |
2551 | ␉YY_BREAK␊ |
2552 | case 36:␊ |
2553 | YY_RULE_SETUP␊ |
2554 | #line 1233 "pycode.l"␊ |
2555 | { // normal chars␊ |
2556 | ␉␉ codify(pycodeYYtext);␊ |
2557 | }␊ |
2558 | ␉YY_BREAK␊ |
2559 | case 37:␊ |
2560 | YY_RULE_SETUP␊ |
2561 | #line 1236 "pycode.l"␊ |
2562 | { // normal char␊ |
2563 | ␉␉ codify(pycodeYYtext);␊ |
2564 | }␊ |
2565 | ␉YY_BREAK␊ |
2566 | ␊ |
2567 | // Double quoted string like "That's \"a '''nice'''\" string!"␊ |
2568 | case 38:␊ |
2569 | /* rule 38 can match eol */␊ |
2570 | YY_RULE_SETUP␊ |
2571 | #line 1242 "pycode.l"␊ |
2572 | { // line continuation␊ |
2573 | ␉␉ codifyLines(pycodeYYtext);␊ |
2574 | }␊ |
2575 | ␉YY_BREAK␊ |
2576 | case 39:␊ |
2577 | YY_RULE_SETUP␊ |
2578 | #line 1245 "pycode.l"␊ |
2579 | { // espaced char␊ |
2580 | ␉␉ codify(pycodeYYtext);␊ |
2581 | }␊ |
2582 | ␉YY_BREAK␊ |
2583 | case 40:␊ |
2584 | YY_RULE_SETUP␊ |
2585 | #line 1248 "pycode.l"␊ |
2586 | { // tripple single quotes␊ |
2587 | ␉␉ codify(pycodeYYtext);␊ |
2588 | ␉␉␉ }␊ |
2589 | ␉YY_BREAK␊ |
2590 | case 41:␊ |
2591 | YY_RULE_SETUP␊ |
2592 | #line 1251 "pycode.l"␊ |
2593 | { // end of the string␊ |
2594 | ␉␉ codify(pycodeYYtext);␊ |
2595 | ␉␉␉␉ endFontClass();␊ |
2596 | ␉␉ BEGIN(g_stringContext);␊ |
2597 | }␊ |
2598 | ␉YY_BREAK␊ |
2599 | case 42:␊ |
2600 | YY_RULE_SETUP␊ |
2601 | #line 1256 "pycode.l"␊ |
2602 | { // normal chars␊ |
2603 | ␉␉ codify(pycodeYYtext);␊ |
2604 | }␊ |
2605 | ␉YY_BREAK␊ |
2606 | case 43:␊ |
2607 | YY_RULE_SETUP␊ |
2608 | #line 1259 "pycode.l"␊ |
2609 | { // normal char␊ |
2610 | ␉␉ codify(pycodeYYtext);␊ |
2611 | }␊ |
2612 | ␉YY_BREAK␊ |
2613 | ␊ |
2614 | ␊ |
2615 | case 44:␊ |
2616 | #line 1266 "pycode.l"␊ |
2617 | case 45:␊ |
2618 | YY_RULE_SETUP␊ |
2619 | #line 1266 "pycode.l"␊ |
2620 | {␊ |
2621 | ␉␉ codify(pycodeYYtext);␊ |
2622 | ␉␉␉ if (g_doubleQuote==(pycodeYYtext[0]=='"')) ␊ |
2623 | ␉␉␉ {␊ |
2624 | ␉␉␉ endFontClass();␊ |
2625 | ␉␉␉ BEGIN(g_stringContext);␊ |
2626 | ␉␉␉ }␊ |
2627 | ␉␉ }␊ |
2628 | ␉YY_BREAK␊ |
2629 | case 46:␊ |
2630 | /* rule 46 can match eol */␊ |
2631 | YY_RULE_SETUP␊ |
2632 | #line 1274 "pycode.l"␊ |
2633 | {␊ |
2634 | ␉␉␉ codifyLines(pycodeYYtext);␊ |
2635 | ␉␉ }␊ |
2636 | ␉YY_BREAK␊ |
2637 | case 47:␊ |
2638 | /* rule 47 can match eol */␊ |
2639 | YY_RULE_SETUP␊ |
2640 | #line 1277 "pycode.l"␊ |
2641 | {␊ |
2642 | ␉␉␉ codifyLines(pycodeYYtext);␊ |
2643 | }␊ |
2644 | ␉YY_BREAK␊ |
2645 | case 48:␊ |
2646 | YY_RULE_SETUP␊ |
2647 | #line 1280 "pycode.l"␊ |
2648 | {␊ |
2649 | codify(pycodeYYtext);␊ |
2650 | }␊ |
2651 | ␉YY_BREAK␊ |
2652 | ␊ |
2653 | /*␊ |
2654 | <*>({NONEMPTY}|{EXPCHAR}|{BB}) { // This should go one character at a time.␊ |
2655 | ␉␉ codify(pycodeYYtext);␊ |
2656 | ␉␉␉␉ // printf("[pycode] '%s' [ state %d ] [line %d] no match\n",␊ |
2657 | ␉␉␉␉ // pycodeYYtext, YY_START, g_yyLineNr);␊ |
2658 | ␊ |
2659 | ␉␉␉␉ //endFontClass();␊ |
2660 | ␉␉␉␉ BEGIN(Body);␉␉␉␉␉␊ |
2661 | }␊ |
2662 | */␊ |
2663 | case 49:␊ |
2664 | #line 1297 "pycode.l"␊ |
2665 | case 50:␊ |
2666 | YY_RULE_SETUP␊ |
2667 | #line 1297 "pycode.l"␊ |
2668 | {␊ |
2669 | ␉␉␉␉ startFontClass("stringliteral");␊ |
2670 | ␉␉␉␉ g_stringContext=YY_START;␊ |
2671 | ␉␉␉␉ g_doubleQuote=pycodeYYtext[pycodeYYleng-1]=='"';␊ |
2672 | ␉␉ codify(pycodeYYtext);␊ |
2673 | ␉␉␉␉ BEGIN(TripleString);␊ |
2674 | }␊ |
2675 | ␉YY_BREAK␊ |
2676 | case 51:␊ |
2677 | YY_RULE_SETUP␊ |
2678 | #line 1304 "pycode.l"␊ |
2679 | { // single quoted string␊ |
2680 | ␉␉␉␉ startFontClass("stringliteral");␊ |
2681 | ␉␉␉␉ g_stringContext=YY_START;␊ |
2682 | ␉␉ codify(pycodeYYtext);␊ |
2683 | ␉␉␉␉ BEGIN(SingleQuoteString);␊ |
2684 | ␉␉␉ }␊ |
2685 | ␉YY_BREAK␊ |
2686 | case 52:␊ |
2687 | YY_RULE_SETUP␊ |
2688 | #line 1310 "pycode.l"␊ |
2689 | { // double quoted string␊ |
2690 | ␉␉␉␉ startFontClass("stringliteral");␊ |
2691 | ␉␉␉␉ g_stringContext=YY_START;␊ |
2692 | ␉␉ codify(pycodeYYtext);␊ |
2693 | ␉␉␉␉ BEGIN(DoubleQuoteString);␊ |
2694 | }␊ |
2695 | ␉YY_BREAK␊ |
2696 | case 53:␊ |
2697 | YY_RULE_SETUP␊ |
2698 | #line 1316 "pycode.l"␊ |
2699 | {␊ |
2700 | ␉␉␉␉ if (YY_START==SingleQuoteString || ␊ |
2701 | ␉␉␉␉ YY_START==DoubleQuoteString || ␊ |
2702 | ␉␉␉␉ YY_START==TripleString␊ |
2703 | ␉␉␉␉ )␊ |
2704 | ␉␉␉␉ {␊ |
2705 | ␉␉␉␉ REJECT;␊ |
2706 | ␉␉␉␉ }␊ |
2707 | // This eats EVERYTHING␊ |
2708 | ␉␉␉␉ // except the newline␊ |
2709 | startFontClass("comment");␊ |
2710 | ␉␉␉␉ codifyLines(pycodeYYtext);␊ |
2711 | ␉␉ endFontClass();␊ |
2712 | }␊ |
2713 | ␉YY_BREAK␊ |
2714 | case 54:␊ |
2715 | /* rule 54 can match eol */␊ |
2716 | YY_RULE_SETUP␊ |
2717 | #line 1330 "pycode.l"␊ |
2718 | {␊ |
2719 | ␉␉ codifyLines(pycodeYYtext);␊ |
2720 | ␉␉␉␉ //printf("[pycode] %d NEWLINE [line %d] no match\n",␊ |
2721 | ␉␉␉␉ // YY_START, g_yyLineNr);␊ |
2722 | ␊ |
2723 | ␉␉␉␉ //endFontClass();␊ |
2724 | ␉␉␉␉ BEGIN(Body);␊ |
2725 | }␊ |
2726 | ␉YY_BREAK␊ |
2727 | case 55:␊ |
2728 | YY_RULE_SETUP␊ |
2729 | #line 1339 "pycode.l"␊ |
2730 | {␊ |
2731 | ␉␉ codify(pycodeYYtext);␊ |
2732 | ␉␉␉␉ BEGIN(Body);␉␉␉␉␉␊ |
2733 | ␉␉␉ }␊ |
2734 | ␉YY_BREAK␊ |
2735 | case 56:␊ |
2736 | YY_RULE_SETUP␊ |
2737 | #line 1343 "pycode.l"␊ |
2738 | {␊ |
2739 | ␉␉ codify(pycodeYYtext);␊ |
2740 | ␉␉␉␉ // printf("[pycode] '%s' [ state %d ] [line %d] no match\n",␊ |
2741 | ␉␉␉␉ // pycodeYYtext, YY_START, g_yyLineNr);␊ |
2742 | ␊ |
2743 | ␉␉␉␉ //endFontClass();␊ |
2744 | ␉␉␉␉ BEGIN(Body);␉␉␉␉␉␊ |
2745 | }␊ |
2746 | ␉YY_BREAK␊ |
2747 | case 57:␊ |
2748 | YY_RULE_SETUP␊ |
2749 | #line 1352 "pycode.l"␊ |
2750 | ECHO;␊ |
2751 | ␉YY_BREAK␊ |
2752 | #line 2753 "<stdout>"␊ |
2753 | ␉␉␉case YY_STATE_EOF(INITIAL):␊ |
2754 | ␉␉␉case YY_STATE_EOF(Body):␊ |
2755 | ␉␉␉case YY_STATE_EOF(FunctionDec):␊ |
2756 | ␉␉␉case YY_STATE_EOF(FunctionParams):␊ |
2757 | ␉␉␉case YY_STATE_EOF(ClassDec):␊ |
2758 | ␉␉␉case YY_STATE_EOF(ClassInheritance):␊ |
2759 | ␉␉␉case YY_STATE_EOF(Suite):␊ |
2760 | ␉␉␉case YY_STATE_EOF(SuiteCaptureIndent):␊ |
2761 | ␉␉␉case YY_STATE_EOF(SuiteStart):␊ |
2762 | ␉␉␉case YY_STATE_EOF(SuiteMaintain):␊ |
2763 | ␉␉␉case YY_STATE_EOF(SuiteContinuing):␊ |
2764 | ␉␉␉case YY_STATE_EOF(LongString):␊ |
2765 | ␉␉␉case YY_STATE_EOF(SingleQuoteString):␊ |
2766 | ␉␉␉case YY_STATE_EOF(DoubleQuoteString):␊ |
2767 | ␉␉␉case YY_STATE_EOF(TripleString):␊ |
2768 | ␉␉␉␉yyterminate();␊ |
2769 | ␊ |
2770 | ␉case YY_END_OF_BUFFER:␊ |
2771 | ␉␉{␊ |
2772 | ␉␉/* Amount of text matched not including the EOB char. */␊ |
2773 | ␉␉int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;␊ |
2774 | ␊ |
2775 | ␉␉/* Undo the effects of YY_DO_BEFORE_ACTION. */␊ |
2776 | ␉␉*yy_cp = (yy_hold_char);␊ |
2777 | ␉␉YY_RESTORE_YY_MORE_OFFSET␊ |
2778 | ␊ |
2779 | ␉␉if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )␊ |
2780 | ␉␉␉{␊ |
2781 | ␉␉␉/* We're scanning a new file or input source. It's␊ |
2782 | ␉␉␉ * possible that this happened because the user␊ |
2783 | ␉␉␉ * just pointed pycodeYYin at a new source and called␊ |
2784 | ␉␉␉ * pycodeYYlex(). If so, then we have to assure␊ |
2785 | ␉␉␉ * consistency between YY_CURRENT_BUFFER and our␊ |
2786 | ␉␉␉ * globals. Here is the right place to do so, because␊ |
2787 | ␉␉␉ * this is the first action (other than possibly a␊ |
2788 | ␉␉␉ * back-up) that will match for the new input source.␊ |
2789 | ␉␉␉ */␊ |
2790 | ␉␉␉(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;␊ |
2791 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_input_file = pycodeYYin;␊ |
2792 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;␊ |
2793 | ␉␉␉}␊ |
2794 | ␊ |
2795 | ␉␉/* Note that here we test for yy_c_buf_p "<=" to the position␊ |
2796 | ␉␉ * of the first EOB in the buffer, since yy_c_buf_p will␊ |
2797 | ␉␉ * already have been incremented past the NUL character␊ |
2798 | ␉␉ * (since all states make transitions on EOB to the␊ |
2799 | ␉␉ * end-of-buffer state). Contrast this with the test␊ |
2800 | ␉␉ * in input().␊ |
2801 | ␉␉ */␊ |
2802 | ␉␉if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )␊ |
2803 | ␉␉␉{ /* This was really a NUL. */␊ |
2804 | ␉␉␉yy_state_type yy_next_state;␊ |
2805 | ␊ |
2806 | ␉␉␉(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;␊ |
2807 | ␊ |
2808 | ␉␉␉yy_current_state = yy_get_previous_state( );␊ |
2809 | ␊ |
2810 | ␉␉␉/* Okay, we're now positioned to make the NUL␊ |
2811 | ␉␉␉ * transition. We couldn't have␊ |
2812 | ␉␉␉ * yy_get_previous_state() go ahead and do it␊ |
2813 | ␉␉␉ * for us because it doesn't know how to deal␊ |
2814 | ␉␉␉ * with the possibility of jamming (and we don't␊ |
2815 | ␉␉␉ * want to build jamming into it because then it␊ |
2816 | ␉␉␉ * will run more slowly).␊ |
2817 | ␉␉␉ */␊ |
2818 | ␊ |
2819 | ␉␉␉yy_next_state = yy_try_NUL_trans( yy_current_state );␊ |
2820 | ␊ |
2821 | ␉␉␉yy_bp = (yytext_ptr) + YY_MORE_ADJ;␊ |
2822 | ␊ |
2823 | ␉␉␉if ( yy_next_state )␊ |
2824 | ␉␉␉␉{␊ |
2825 | ␉␉␉␉/* Consume the NUL. */␊ |
2826 | ␉␉␉␉yy_cp = ++(yy_c_buf_p);␊ |
2827 | ␉␉␉␉yy_current_state = yy_next_state;␊ |
2828 | ␉␉␉␉goto yy_match;␊ |
2829 | ␉␉␉␉}␊ |
2830 | ␊ |
2831 | ␉␉␉else␊ |
2832 | ␉␉␉␉{␊ |
2833 | ␉␉␉␉yy_cp = (yy_c_buf_p);␊ |
2834 | ␉␉␉␉goto yy_find_action;␊ |
2835 | ␉␉␉␉}␊ |
2836 | ␉␉␉}␊ |
2837 | ␊ |
2838 | ␉␉else switch ( yy_get_next_buffer( ) )␊ |
2839 | ␉␉␉{␊ |
2840 | ␉␉␉case EOB_ACT_END_OF_FILE:␊ |
2841 | ␉␉␉␉{␊ |
2842 | ␉␉␉␉(yy_did_buffer_switch_on_eof) = 0;␊ |
2843 | ␊ |
2844 | ␉␉␉␉if ( pycodeYYwrap( ) )␊ |
2845 | ␉␉␉␉␉{␊ |
2846 | ␉␉␉␉␉/* Note: because we've taken care in␊ |
2847 | ␉␉␉␉␉ * yy_get_next_buffer() to have set up␊ |
2848 | ␉␉␉␉␉ * pycodeYYtext, we can now set up␊ |
2849 | ␉␉␉␉␉ * yy_c_buf_p so that if some total␊ |
2850 | ␉␉␉␉␉ * hoser (like flex itself) wants to␊ |
2851 | ␉␉␉␉␉ * call the scanner after we return the␊ |
2852 | ␉␉␉␉␉ * YY_NULL, it'll still work - another␊ |
2853 | ␉␉␉␉␉ * YY_NULL will get returned.␊ |
2854 | ␉␉␉␉␉ */␊ |
2855 | ␉␉␉␉␉(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;␊ |
2856 | ␊ |
2857 | ␉␉␉␉␉yy_act = YY_STATE_EOF(YY_START);␊ |
2858 | ␉␉␉␉␉goto do_action;␊ |
2859 | ␉␉␉␉␉}␊ |
2860 | ␊ |
2861 | ␉␉␉␉else␊ |
2862 | ␉␉␉␉␉{␊ |
2863 | ␉␉␉␉␉if ( ! (yy_did_buffer_switch_on_eof) )␊ |
2864 | ␉␉␉␉␉␉YY_NEW_FILE;␊ |
2865 | ␉␉␉␉␉}␊ |
2866 | ␉␉␉␉break;␊ |
2867 | ␉␉␉␉}␊ |
2868 | ␊ |
2869 | ␉␉␉case EOB_ACT_CONTINUE_SCAN:␊ |
2870 | ␉␉␉␉(yy_c_buf_p) =␊ |
2871 | ␉␉␉␉␉(yytext_ptr) + yy_amount_of_matched_text;␊ |
2872 | ␊ |
2873 | ␉␉␉␉yy_current_state = yy_get_previous_state( );␊ |
2874 | ␊ |
2875 | ␉␉␉␉yy_cp = (yy_c_buf_p);␊ |
2876 | ␉␉␉␉yy_bp = (yytext_ptr) + YY_MORE_ADJ;␊ |
2877 | ␉␉␉␉goto yy_match;␊ |
2878 | ␊ |
2879 | ␉␉␉case EOB_ACT_LAST_MATCH:␊ |
2880 | ␉␉␉␉(yy_c_buf_p) =␊ |
2881 | ␉␉␉␉&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];␊ |
2882 | ␊ |
2883 | ␉␉␉␉yy_current_state = yy_get_previous_state( );␊ |
2884 | ␊ |
2885 | ␉␉␉␉yy_cp = (yy_c_buf_p);␊ |
2886 | ␉␉␉␉yy_bp = (yytext_ptr) + YY_MORE_ADJ;␊ |
2887 | ␉␉␉␉goto yy_find_action;␊ |
2888 | ␉␉␉}␊ |
2889 | ␉␉break;␊ |
2890 | ␉␉}␊ |
2891 | ␊ |
2892 | ␉default:␊ |
2893 | ␉␉YY_FATAL_ERROR(␊ |
2894 | ␉␉␉"fatal flex scanner internal error--no action found" );␊ |
2895 | ␉} /* end of action switch */␊ |
2896 | ␉␉} /* end of scanning one token */␊ |
2897 | } /* end of pycodeYYlex */␊ |
2898 | ␊ |
2899 | /* yy_get_next_buffer - try to read in a new buffer␊ |
2900 | *␊ |
2901 | * Returns a code representing an action:␊ |
2902 | *␉EOB_ACT_LAST_MATCH -␊ |
2903 | *␉EOB_ACT_CONTINUE_SCAN - continue scanning from current position␊ |
2904 | *␉EOB_ACT_END_OF_FILE - end of file␊ |
2905 | */␊ |
2906 | static int yy_get_next_buffer (void)␊ |
2907 | {␊ |
2908 | ␉register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;␊ |
2909 | ␉register char *source = (yytext_ptr);␊ |
2910 | ␉register int number_to_move, i;␊ |
2911 | ␉int ret_val;␊ |
2912 | ␊ |
2913 | ␉if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )␊ |
2914 | ␉␉YY_FATAL_ERROR(␊ |
2915 | ␉␉"fatal flex scanner internal error--end of buffer missed" );␊ |
2916 | ␊ |
2917 | ␉if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )␊ |
2918 | ␉␉{ /* Don't try to fill the buffer, so this is an EOF. */␊ |
2919 | ␉␉if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )␊ |
2920 | ␉␉␉{␊ |
2921 | ␉␉␉/* We matched a single character, the EOB, so␊ |
2922 | ␉␉␉ * treat this as a final EOF.␊ |
2923 | ␉␉␉ */␊ |
2924 | ␉␉␉return EOB_ACT_END_OF_FILE;␊ |
2925 | ␉␉␉}␊ |
2926 | ␊ |
2927 | ␉␉else␊ |
2928 | ␉␉␉{␊ |
2929 | ␉␉␉/* We matched some text prior to the EOB, first␊ |
2930 | ␉␉␉ * process it.␊ |
2931 | ␉␉␉ */␊ |
2932 | ␉␉␉return EOB_ACT_LAST_MATCH;␊ |
2933 | ␉␉␉}␊ |
2934 | ␉␉}␊ |
2935 | ␊ |
2936 | ␉/* Try to read more data. */␊ |
2937 | ␊ |
2938 | ␉/* First move last chars to start of buffer. */␊ |
2939 | ␉number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;␊ |
2940 | ␊ |
2941 | ␉for ( i = 0; i < number_to_move; ++i )␊ |
2942 | ␉␉*(dest++) = *(source++);␊ |
2943 | ␊ |
2944 | ␉if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )␊ |
2945 | ␉␉/* don't do the read, it's not guaranteed to return an EOF,␊ |
2946 | ␉␉ * just force an EOF␊ |
2947 | ␉␉ */␊ |
2948 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;␊ |
2949 | ␊ |
2950 | ␉else␊ |
2951 | ␉␉{␊ |
2952 | ␉␉␉yy_size_t num_to_read =␊ |
2953 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;␊ |
2954 | ␊ |
2955 | ␉␉while ( num_to_read <= 0 )␊ |
2956 | ␉␉␉{ /* Not enough room in the buffer - grow it. */␊ |
2957 | ␊ |
2958 | ␉␉␉YY_FATAL_ERROR(␊ |
2959 | "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );␊ |
2960 | ␊ |
2961 | ␉␉␉}␊ |
2962 | ␊ |
2963 | ␉␉if ( num_to_read > YY_READ_BUF_SIZE )␊ |
2964 | ␉␉␉num_to_read = YY_READ_BUF_SIZE;␊ |
2965 | ␊ |
2966 | ␉␉/* Read in more data. */␊ |
2967 | ␉␉YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),␊ |
2968 | ␉␉␉(yy_n_chars), num_to_read );␊ |
2969 | ␊ |
2970 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);␊ |
2971 | ␉␉}␊ |
2972 | ␊ |
2973 | ␉if ( (yy_n_chars) == 0 )␊ |
2974 | ␉␉{␊ |
2975 | ␉␉if ( number_to_move == YY_MORE_ADJ )␊ |
2976 | ␉␉␉{␊ |
2977 | ␉␉␉ret_val = EOB_ACT_END_OF_FILE;␊ |
2978 | ␉␉␉pycodeYYrestart(pycodeYYin );␊ |
2979 | ␉␉␉}␊ |
2980 | ␊ |
2981 | ␉␉else␊ |
2982 | ␉␉␉{␊ |
2983 | ␉␉␉ret_val = EOB_ACT_LAST_MATCH;␊ |
2984 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =␊ |
2985 | ␉␉␉␉YY_BUFFER_EOF_PENDING;␊ |
2986 | ␉␉␉}␊ |
2987 | ␉␉}␊ |
2988 | ␊ |
2989 | ␉else␊ |
2990 | ␉␉ret_val = EOB_ACT_CONTINUE_SCAN;␊ |
2991 | ␊ |
2992 | ␉if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {␊ |
2993 | ␉␉/* Extend the array by 50%, plus the number we really need. */␊ |
2994 | ␉␉yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);␊ |
2995 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pycodeYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );␊ |
2996 | ␉␉if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )␊ |
2997 | ␉␉␉YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );␊ |
2998 | ␉}␊ |
2999 | ␊ |
3000 | ␉(yy_n_chars) += number_to_move;␊ |
3001 | ␉YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;␊ |
3002 | ␉YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;␊ |
3003 | ␊ |
3004 | ␉(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];␊ |
3005 | ␊ |
3006 | ␉return ret_val;␊ |
3007 | }␊ |
3008 | ␊ |
3009 | /* yy_get_previous_state - get the state just before the EOB char was reached */␊ |
3010 | ␊ |
3011 | static yy_state_type yy_get_previous_state (void)␊ |
3012 | {␊ |
3013 | ␉register yy_state_type yy_current_state;␊ |
3014 | ␉register char *yy_cp;␊ |
3015 | ␊ |
3016 | ␉yy_current_state = (yy_start);␊ |
3017 | ␊ |
3018 | ␉(yy_state_ptr) = (yy_state_buf);␊ |
3019 | ␉*(yy_state_ptr)++ = yy_current_state;␊ |
3020 | ␊ |
3021 | ␉for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )␊ |
3022 | ␉␉{␊ |
3023 | ␉␉register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);␊ |
3024 | ␉␉while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )␊ |
3025 | ␉␉␉{␊ |
3026 | ␉␉␉yy_current_state = (int) yy_def[yy_current_state];␊ |
3027 | ␉␉␉if ( yy_current_state >= 497 )␊ |
3028 | ␉␉␉␉yy_c = yy_meta[(unsigned int) yy_c];␊ |
3029 | ␉␉␉}␊ |
3030 | ␉␉yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];␊ |
3031 | ␉␉*(yy_state_ptr)++ = yy_current_state;␊ |
3032 | ␉␉}␊ |
3033 | ␊ |
3034 | ␉return yy_current_state;␊ |
3035 | }␊ |
3036 | ␊ |
3037 | /* yy_try_NUL_trans - try to make a transition on the NUL character␊ |
3038 | *␊ |
3039 | * synopsis␊ |
3040 | *␉next_state = yy_try_NUL_trans( current_state );␊ |
3041 | */␊ |
3042 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )␊ |
3043 | {␊ |
3044 | ␉register int yy_is_jam;␊ |
3045 | ␊ |
3046 | ␉register YY_CHAR yy_c = 1;␊ |
3047 | ␉while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )␊ |
3048 | ␉␉{␊ |
3049 | ␉␉yy_current_state = (int) yy_def[yy_current_state];␊ |
3050 | ␉␉if ( yy_current_state >= 497 )␊ |
3051 | ␉␉␉yy_c = yy_meta[(unsigned int) yy_c];␊ |
3052 | ␉␉}␊ |
3053 | ␉yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];␊ |
3054 | ␉yy_is_jam = (yy_current_state == 496);␊ |
3055 | ␉if ( ! yy_is_jam )␊ |
3056 | ␉␉*(yy_state_ptr)++ = yy_current_state;␊ |
3057 | ␊ |
3058 | ␉return yy_is_jam ? 0 : yy_current_state;␊ |
3059 | }␊ |
3060 | ␊ |
3061 | #ifndef YY_NO_INPUT␊ |
3062 | #ifdef __cplusplus␊ |
3063 | static int yyinput (void)␊ |
3064 | #else␊ |
3065 | static int input (void)␊ |
3066 | #endif␊ |
3067 | ␊ |
3068 | {␊ |
3069 | ␉int c;␊ |
3070 | ␊ |
3071 | ␉*(yy_c_buf_p) = (yy_hold_char);␊ |
3072 | ␊ |
3073 | ␉if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )␊ |
3074 | ␉␉{␊ |
3075 | ␉␉/* yy_c_buf_p now points to the character we want to return.␊ |
3076 | ␉␉ * If this occurs *before* the EOB characters, then it's a␊ |
3077 | ␉␉ * valid NUL; if not, then we've hit the end of the buffer.␊ |
3078 | ␉␉ */␊ |
3079 | ␉␉if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )␊ |
3080 | ␉␉␉/* This was really a NUL. */␊ |
3081 | ␉␉␉*(yy_c_buf_p) = '\0';␊ |
3082 | ␊ |
3083 | ␉␉else␊ |
3084 | ␉␉␉{ /* need more input */␊ |
3085 | ␉␉␉yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);␊ |
3086 | ␉␉␉++(yy_c_buf_p);␊ |
3087 | ␊ |
3088 | ␉␉␉switch ( yy_get_next_buffer( ) )␊ |
3089 | ␉␉␉␉{␊ |
3090 | ␉␉␉␉case EOB_ACT_LAST_MATCH:␊ |
3091 | ␉␉␉␉␉/* This happens because yy_g_n_b()␊ |
3092 | ␉␉␉␉␉ * sees that we've accumulated a␊ |
3093 | ␉␉␉␉␉ * token and flags that we need to␊ |
3094 | ␉␉␉␉␉ * try matching the token before␊ |
3095 | ␉␉␉␉␉ * proceeding. But for input(),␊ |
3096 | ␉␉␉␉␉ * there's no matching to consider.␊ |
3097 | ␉␉␉␉␉ * So convert the EOB_ACT_LAST_MATCH␊ |
3098 | ␉␉␉␉␉ * to EOB_ACT_END_OF_FILE.␊ |
3099 | ␉␉␉␉␉ */␊ |
3100 | ␊ |
3101 | ␉␉␉␉␉/* Reset buffer status. */␊ |
3102 | ␉␉␉␉␉pycodeYYrestart(pycodeYYin );␊ |
3103 | ␊ |
3104 | ␉␉␉␉␉/*FALLTHROUGH*/␊ |
3105 | ␊ |
3106 | ␉␉␉␉case EOB_ACT_END_OF_FILE:␊ |
3107 | ␉␉␉␉␉{␊ |
3108 | ␉␉␉␉␉if ( pycodeYYwrap( ) )␊ |
3109 | ␉␉␉␉␉␉return 0;␊ |
3110 | ␊ |
3111 | ␉␉␉␉␉if ( ! (yy_did_buffer_switch_on_eof) )␊ |
3112 | ␉␉␉␉␉␉YY_NEW_FILE;␊ |
3113 | #ifdef __cplusplus␊ |
3114 | ␉␉␉␉␉return yyinput();␊ |
3115 | #else␊ |
3116 | ␉␉␉␉␉return input();␊ |
3117 | #endif␊ |
3118 | ␉␉␉␉␉}␊ |
3119 | ␊ |
3120 | ␉␉␉␉case EOB_ACT_CONTINUE_SCAN:␊ |
3121 | ␉␉␉␉␉(yy_c_buf_p) = (yytext_ptr) + offset;␊ |
3122 | ␉␉␉␉␉break;␊ |
3123 | ␉␉␉␉}␊ |
3124 | ␉␉␉}␊ |
3125 | ␉␉}␊ |
3126 | ␊ |
3127 | ␉c = *(unsigned char *) (yy_c_buf_p);␉/* cast for 8-bit char's */␊ |
3128 | ␉*(yy_c_buf_p) = '\0';␉/* preserve pycodeYYtext */␊ |
3129 | ␉(yy_hold_char) = *++(yy_c_buf_p);␊ |
3130 | ␊ |
3131 | ␉return c;␊ |
3132 | }␊ |
3133 | #endif␉/* ifndef YY_NO_INPUT */␊ |
3134 | ␊ |
3135 | /** Immediately switch to a different input stream.␊ |
3136 | * @param input_file A readable stream.␊ |
3137 | * ␊ |
3138 | * @note This function does not reset the start condition to @c INITIAL .␊ |
3139 | */␊ |
3140 | void pycodeYYrestart (FILE * input_file )␊ |
3141 | {␊ |
3142 | ␊ |
3143 | ␉if ( ! YY_CURRENT_BUFFER ){␊ |
3144 | pycodeYYensure_buffer_stack ();␊ |
3145 | ␉␉YY_CURRENT_BUFFER_LVALUE =␊ |
3146 | pycodeYY_create_buffer(pycodeYYin,YY_BUF_SIZE );␊ |
3147 | ␉}␊ |
3148 | ␊ |
3149 | ␉pycodeYY_init_buffer(YY_CURRENT_BUFFER,input_file );␊ |
3150 | ␉pycodeYY_load_buffer_state( );␊ |
3151 | }␊ |
3152 | ␊ |
3153 | /** Switch to a different input buffer.␊ |
3154 | * @param new_buffer The new input buffer.␊ |
3155 | * ␊ |
3156 | */␊ |
3157 | void pycodeYY_switch_to_buffer (YY_BUFFER_STATE new_buffer )␊ |
3158 | {␊ |
3159 | ␊ |
3160 | ␉/* TODO. We should be able to replace this entire function body␊ |
3161 | ␉ * with␊ |
3162 | ␉ *␉␉pycodeYYpop_buffer_state();␊ |
3163 | ␉ *␉␉pycodeYYpush_buffer_state(new_buffer);␊ |
3164 | */␊ |
3165 | ␉pycodeYYensure_buffer_stack ();␊ |
3166 | ␉if ( YY_CURRENT_BUFFER == new_buffer )␊ |
3167 | ␉␉return;␊ |
3168 | ␊ |
3169 | ␉if ( YY_CURRENT_BUFFER )␊ |
3170 | ␉␉{␊ |
3171 | ␉␉/* Flush out information for old buffer. */␊ |
3172 | ␉␉*(yy_c_buf_p) = (yy_hold_char);␊ |
3173 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);␊ |
3174 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);␊ |
3175 | ␉␉}␊ |
3176 | ␊ |
3177 | ␉YY_CURRENT_BUFFER_LVALUE = new_buffer;␊ |
3178 | ␉pycodeYY_load_buffer_state( );␊ |
3179 | ␊ |
3180 | ␉/* We don't actually know whether we did this switch during␊ |
3181 | ␉ * EOF (pycodeYYwrap()) processing, but the only time this flag␊ |
3182 | ␉ * is looked at is after pycodeYYwrap() is called, so it's safe␊ |
3183 | ␉ * to go ahead and always set it.␊ |
3184 | ␉ */␊ |
3185 | ␉(yy_did_buffer_switch_on_eof) = 1;␊ |
3186 | }␊ |
3187 | ␊ |
3188 | static void pycodeYY_load_buffer_state (void)␊ |
3189 | {␊ |
3190 | ␉(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;␊ |
3191 | ␉(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;␊ |
3192 | ␉pycodeYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;␊ |
3193 | ␉(yy_hold_char) = *(yy_c_buf_p);␊ |
3194 | }␊ |
3195 | ␊ |
3196 | /** Allocate and initialize an input buffer state.␊ |
3197 | * @param file A readable stream.␊ |
3198 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.␊ |
3199 | * ␊ |
3200 | * @return the allocated buffer state.␊ |
3201 | */␊ |
3202 | YY_BUFFER_STATE pycodeYY_create_buffer (FILE * file, int size )␊ |
3203 | {␊ |
3204 | ␉YY_BUFFER_STATE b;␊ |
3205 | ␊ |
3206 | ␉b = (YY_BUFFER_STATE) pycodeYYalloc(sizeof( struct yy_buffer_state ) );␊ |
3207 | ␉if ( ! b )␊ |
3208 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in pycodeYY_create_buffer()" );␊ |
3209 | ␊ |
3210 | ␉b->yy_buf_size = size;␊ |
3211 | ␊ |
3212 | ␉/* yy_ch_buf has to be 2 characters longer than the size given because␊ |
3213 | ␉ * we need to put in 2 end-of-buffer characters.␊ |
3214 | ␉ */␊ |
3215 | ␉b->yy_ch_buf = (char *) pycodeYYalloc(b->yy_buf_size + 2 );␊ |
3216 | ␉if ( ! b->yy_ch_buf )␊ |
3217 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in pycodeYY_create_buffer()" );␊ |
3218 | ␊ |
3219 | ␉b->yy_is_our_buffer = 1;␊ |
3220 | ␊ |
3221 | ␉pycodeYY_init_buffer(b,file );␊ |
3222 | ␊ |
3223 | ␉return b;␊ |
3224 | }␊ |
3225 | ␊ |
3226 | /** Destroy the buffer.␊ |
3227 | * @param b a buffer created with pycodeYY_create_buffer()␊ |
3228 | * ␊ |
3229 | */␊ |
3230 | void pycodeYY_delete_buffer (YY_BUFFER_STATE b )␊ |
3231 | {␊ |
3232 | ␊ |
3233 | ␉if ( ! b )␊ |
3234 | ␉␉return;␊ |
3235 | ␊ |
3236 | ␉if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */␊ |
3237 | ␉␉YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;␊ |
3238 | ␊ |
3239 | ␉if ( b->yy_is_our_buffer )␊ |
3240 | ␉␉pycodeYYfree((void *) b->yy_ch_buf );␊ |
3241 | ␊ |
3242 | ␉pycodeYYfree((void *) b );␊ |
3243 | }␊ |
3244 | ␊ |
3245 | #ifndef __cplusplus␊ |
3246 | extern int isatty (int );␊ |
3247 | #endif /* __cplusplus */␊ |
3248 | ␊ |
3249 | /* Initializes or reinitializes a buffer.␊ |
3250 | * This function is sometimes called more than once on the same buffer,␊ |
3251 | * such as during a pycodeYYrestart() or at EOF.␊ |
3252 | */␊ |
3253 | static void pycodeYY_init_buffer (YY_BUFFER_STATE b, FILE * file )␊ |
3254 | ␊ |
3255 | {␊ |
3256 | ␉int oerrno = errno;␊ |
3257 | ␊ |
3258 | ␉pycodeYY_flush_buffer(b );␊ |
3259 | ␊ |
3260 | ␉b->yy_input_file = file;␊ |
3261 | ␉b->yy_fill_buffer = 1;␊ |
3262 | ␊ |
3263 | /* If b is the current buffer, then pycodeYY_init_buffer was _probably_␊ |
3264 | * called from pycodeYYrestart() or through yy_get_next_buffer.␊ |
3265 | * In that case, we don't want to reset the lineno or column.␊ |
3266 | */␊ |
3267 | if (b != YY_CURRENT_BUFFER){␊ |
3268 | b->yy_bs_lineno = 1;␊ |
3269 | b->yy_bs_column = 0;␊ |
3270 | }␊ |
3271 | ␊ |
3272 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;␊ |
3273 | ␊ |
3274 | ␉errno = oerrno;␊ |
3275 | }␊ |
3276 | ␊ |
3277 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called.␊ |
3278 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.␊ |
3279 | * ␊ |
3280 | */␊ |
3281 | void pycodeYY_flush_buffer (YY_BUFFER_STATE b )␊ |
3282 | {␊ |
3283 | ␉if ( ! b )␊ |
3284 | ␉␉return;␊ |
3285 | ␊ |
3286 | ␉b->yy_n_chars = 0;␊ |
3287 | ␊ |
3288 | ␉/* We always need two end-of-buffer characters. The first causes␊ |
3289 | ␉ * a transition to the end-of-buffer state. The second causes␊ |
3290 | ␉ * a jam in that state.␊ |
3291 | ␉ */␊ |
3292 | ␉b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;␊ |
3293 | ␉b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;␊ |
3294 | ␊ |
3295 | ␉b->yy_buf_pos = &b->yy_ch_buf[0];␊ |
3296 | ␊ |
3297 | ␉b->yy_at_bol = 1;␊ |
3298 | ␉b->yy_buffer_status = YY_BUFFER_NEW;␊ |
3299 | ␊ |
3300 | ␉if ( b == YY_CURRENT_BUFFER )␊ |
3301 | ␉␉pycodeYY_load_buffer_state( );␊ |
3302 | }␊ |
3303 | ␊ |
3304 | /** Pushes the new state onto the stack. The new state becomes␊ |
3305 | * the current state. This function will allocate the stack␊ |
3306 | * if necessary.␊ |
3307 | * @param new_buffer The new state.␊ |
3308 | * ␊ |
3309 | */␊ |
3310 | void pycodeYYpush_buffer_state (YY_BUFFER_STATE new_buffer )␊ |
3311 | {␊ |
3312 | ␉if (new_buffer == NULL)␊ |
3313 | ␉␉return;␊ |
3314 | ␊ |
3315 | ␉pycodeYYensure_buffer_stack();␊ |
3316 | ␊ |
3317 | ␉/* This block is copied from pycodeYY_switch_to_buffer. */␊ |
3318 | ␉if ( YY_CURRENT_BUFFER )␊ |
3319 | ␉␉{␊ |
3320 | ␉␉/* Flush out information for old buffer. */␊ |
3321 | ␉␉*(yy_c_buf_p) = (yy_hold_char);␊ |
3322 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);␊ |
3323 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);␊ |
3324 | ␉␉}␊ |
3325 | ␊ |
3326 | ␉/* Only push if top exists. Otherwise, replace top. */␊ |
3327 | ␉if (YY_CURRENT_BUFFER)␊ |
3328 | ␉␉(yy_buffer_stack_top)++;␊ |
3329 | ␉YY_CURRENT_BUFFER_LVALUE = new_buffer;␊ |
3330 | ␊ |
3331 | ␉/* copied from pycodeYY_switch_to_buffer. */␊ |
3332 | ␉pycodeYY_load_buffer_state( );␊ |
3333 | ␉(yy_did_buffer_switch_on_eof) = 1;␊ |
3334 | }␊ |
3335 | ␊ |
3336 | /** Removes and deletes the top of the stack, if present.␊ |
3337 | * The next element becomes the new top.␊ |
3338 | * ␊ |
3339 | */␊ |
3340 | void pycodeYYpop_buffer_state (void)␊ |
3341 | {␊ |
3342 | ␉if (!YY_CURRENT_BUFFER)␊ |
3343 | ␉␉return;␊ |
3344 | ␊ |
3345 | ␉pycodeYY_delete_buffer(YY_CURRENT_BUFFER );␊ |
3346 | ␉YY_CURRENT_BUFFER_LVALUE = NULL;␊ |
3347 | ␉if ((yy_buffer_stack_top) > 0)␊ |
3348 | ␉␉--(yy_buffer_stack_top);␊ |
3349 | ␊ |
3350 | ␉if (YY_CURRENT_BUFFER) {␊ |
3351 | ␉␉pycodeYY_load_buffer_state( );␊ |
3352 | ␉␉(yy_did_buffer_switch_on_eof) = 1;␊ |
3353 | ␉}␊ |
3354 | }␊ |
3355 | ␊ |
3356 | /* Allocates the stack if it does not exist.␊ |
3357 | * Guarantees space for at least one push.␊ |
3358 | */␊ |
3359 | static void pycodeYYensure_buffer_stack (void)␊ |
3360 | {␊ |
3361 | ␉yy_size_t num_to_alloc;␊ |
3362 | ␊ |
3363 | ␉if (!(yy_buffer_stack)) {␊ |
3364 | ␊ |
3365 | ␉␉/* First allocation is just for 2 elements, since we don't know if this␊ |
3366 | ␉␉ * scanner will even need a stack. We use 2 instead of 1 to avoid an␊ |
3367 | ␉␉ * immediate realloc on the next call.␊ |
3368 | */␊ |
3369 | ␉␉num_to_alloc = 1;␊ |
3370 | ␉␉(yy_buffer_stack) = (struct yy_buffer_state**)pycodeYYalloc␊ |
3371 | ␉␉␉␉␉␉␉␉(num_to_alloc * sizeof(struct yy_buffer_state*)␊ |
3372 | ␉␉␉␉␉␉␉␉);␊ |
3373 | ␉␉if ( ! (yy_buffer_stack) )␊ |
3374 | ␉␉␉YY_FATAL_ERROR( "out of dynamic memory in pycodeYYensure_buffer_stack()" );␊ |
3375 | ␉␉␉␉␉␉␉␉ ␊ |
3376 | ␉␉memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));␊ |
3377 | ␉␉␉␉␊ |
3378 | ␉␉(yy_buffer_stack_max) = num_to_alloc;␊ |
3379 | ␉␉(yy_buffer_stack_top) = 0;␊ |
3380 | ␉␉return;␊ |
3381 | ␉}␊ |
3382 | ␊ |
3383 | ␉if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){␊ |
3384 | ␊ |
3385 | ␉␉/* Increase the buffer to prepare for a possible push. */␊ |
3386 | ␉␉int grow_size = 8 /* arbitrary grow size */;␊ |
3387 | ␊ |
3388 | ␉␉num_to_alloc = (yy_buffer_stack_max) + grow_size;␊ |
3389 | ␉␉(yy_buffer_stack) = (struct yy_buffer_state**)pycodeYYrealloc␊ |
3390 | ␉␉␉␉␉␉␉␉((yy_buffer_stack),␊ |
3391 | ␉␉␉␉␉␉␉␉num_to_alloc * sizeof(struct yy_buffer_state*)␊ |
3392 | ␉␉␉␉␉␉␉␉);␊ |
3393 | ␉␉if ( ! (yy_buffer_stack) )␊ |
3394 | ␉␉␉YY_FATAL_ERROR( "out of dynamic memory in pycodeYYensure_buffer_stack()" );␊ |
3395 | ␊ |
3396 | ␉␉/* zero only the new slots.*/␊ |
3397 | ␉␉memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));␊ |
3398 | ␉␉(yy_buffer_stack_max) = num_to_alloc;␊ |
3399 | ␉}␊ |
3400 | }␊ |
3401 | ␊ |
3402 | /** Setup the input buffer state to scan directly from a user-specified character buffer.␊ |
3403 | * @param base the character buffer␊ |
3404 | * @param size the size in bytes of the character buffer␊ |
3405 | * ␊ |
3406 | * @return the newly allocated buffer state object. ␊ |
3407 | */␊ |
3408 | YY_BUFFER_STATE pycodeYY_scan_buffer (char * base, yy_size_t size )␊ |
3409 | {␊ |
3410 | ␉YY_BUFFER_STATE b;␊ |
3411 | ␊ |
3412 | ␉if ( size < 2 ||␊ |
3413 | ␉ base[size-2] != YY_END_OF_BUFFER_CHAR ||␊ |
3414 | ␉ base[size-1] != YY_END_OF_BUFFER_CHAR )␊ |
3415 | ␉␉/* They forgot to leave room for the EOB's. */␊ |
3416 | ␉␉return 0;␊ |
3417 | ␊ |
3418 | ␉b = (YY_BUFFER_STATE) pycodeYYalloc(sizeof( struct yy_buffer_state ) );␊ |
3419 | ␉if ( ! b )␊ |
3420 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in pycodeYY_scan_buffer()" );␊ |
3421 | ␊ |
3422 | ␉b->yy_buf_size = size - 2;␉/* "- 2" to take care of EOB's */␊ |
3423 | ␉b->yy_buf_pos = b->yy_ch_buf = base;␊ |
3424 | ␉b->yy_is_our_buffer = 0;␊ |
3425 | ␉b->yy_input_file = 0;␊ |
3426 | ␉b->yy_n_chars = b->yy_buf_size;␊ |
3427 | ␉b->yy_is_interactive = 0;␊ |
3428 | ␉b->yy_at_bol = 1;␊ |
3429 | ␉b->yy_fill_buffer = 0;␊ |
3430 | ␉b->yy_buffer_status = YY_BUFFER_NEW;␊ |
3431 | ␊ |
3432 | ␉pycodeYY_switch_to_buffer(b );␊ |
3433 | ␊ |
3434 | ␉return b;␊ |
3435 | }␊ |
3436 | ␊ |
3437 | /** Setup the input buffer state to scan a string. The next call to pycodeYYlex() will␊ |
3438 | * scan from a @e copy of @a str.␊ |
3439 | * @param yystr a NUL-terminated string to scan␊ |
3440 | * ␊ |
3441 | * @return the newly allocated buffer state object.␊ |
3442 | * @note If you want to scan bytes that may contain NUL values, then use␊ |
3443 | * pycodeYY_scan_bytes() instead.␊ |
3444 | */␊ |
3445 | YY_BUFFER_STATE pycodeYY_scan_string (yyconst char * yystr )␊ |
3446 | {␊ |
3447 | ␊ |
3448 | ␉return pycodeYY_scan_bytes(yystr,strlen(yystr) );␊ |
3449 | }␊ |
3450 | ␊ |
3451 | /** Setup the input buffer state to scan the given bytes. The next call to pycodeYYlex() will␊ |
3452 | * scan from a @e copy of @a bytes.␊ |
3453 | * @param bytes the byte buffer to scan␊ |
3454 | * @param len the number of bytes in the buffer pointed to by @a bytes.␊ |
3455 | * ␊ |
3456 | * @return the newly allocated buffer state object.␊ |
3457 | */␊ |
3458 | YY_BUFFER_STATE pycodeYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )␊ |
3459 | {␊ |
3460 | ␉YY_BUFFER_STATE b;␊ |
3461 | ␉char *buf;␊ |
3462 | ␉yy_size_t n, i;␊ |
3463 | ␊ |
3464 | ␉/* Get memory for full buffer, including space for trailing EOB's. */␊ |
3465 | ␉n = _yybytes_len + 2;␊ |
3466 | ␉buf = (char *) pycodeYYalloc(n );␊ |
3467 | ␉if ( ! buf )␊ |
3468 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in pycodeYY_scan_bytes()" );␊ |
3469 | ␊ |
3470 | ␉for ( i = 0; i < _yybytes_len; ++i )␊ |
3471 | ␉␉buf[i] = yybytes[i];␊ |
3472 | ␊ |
3473 | ␉buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;␊ |
3474 | ␊ |
3475 | ␉b = pycodeYY_scan_buffer(buf,n );␊ |
3476 | ␉if ( ! b )␊ |
3477 | ␉␉YY_FATAL_ERROR( "bad buffer in pycodeYY_scan_bytes()" );␊ |
3478 | ␊ |
3479 | ␉/* It's okay to grow etc. this buffer, and we should throw it␊ |
3480 | ␉ * away when we're done.␊ |
3481 | ␉ */␊ |
3482 | ␉b->yy_is_our_buffer = 1;␊ |
3483 | ␊ |
3484 | ␉return b;␊ |
3485 | }␊ |
3486 | ␊ |
3487 | #ifndef YY_EXIT_FAILURE␊ |
3488 | #define YY_EXIT_FAILURE 2␊ |
3489 | #endif␊ |
3490 | ␊ |
3491 | static void yy_fatal_error (yyconst char* msg )␊ |
3492 | {␊ |
3493 | ␉(void) fprintf( stderr, "%s\n", msg );␊ |
3494 | ␉exit( YY_EXIT_FAILURE );␊ |
3495 | }␊ |
3496 | ␊ |
3497 | /* Redefine yyless() so it works in section 3 code. */␊ |
3498 | ␊ |
3499 | #undef yyless␊ |
3500 | #define yyless(n) \␊ |
3501 | ␉do \␊ |
3502 | ␉␉{ \␊ |
3503 | ␉␉/* Undo effects of setting up pycodeYYtext. */ \␊ |
3504 | int yyless_macro_arg = (n); \␊ |
3505 | YY_LESS_LINENO(yyless_macro_arg);\␊ |
3506 | ␉␉pycodeYYtext[pycodeYYleng] = (yy_hold_char); \␊ |
3507 | ␉␉(yy_c_buf_p) = pycodeYYtext + yyless_macro_arg; \␊ |
3508 | ␉␉(yy_hold_char) = *(yy_c_buf_p); \␊ |
3509 | ␉␉*(yy_c_buf_p) = '\0'; \␊ |
3510 | ␉␉pycodeYYleng = yyless_macro_arg; \␊ |
3511 | ␉␉} \␊ |
3512 | ␉while ( 0 )␊ |
3513 | ␊ |
3514 | /* Accessor methods (get/set functions) to struct members. */␊ |
3515 | ␊ |
3516 | /** Get the current line number.␊ |
3517 | * ␊ |
3518 | */␊ |
3519 | int pycodeYYget_lineno (void)␊ |
3520 | {␊ |
3521 | ␊ |
3522 | return pycodeYYlineno;␊ |
3523 | }␊ |
3524 | ␊ |
3525 | /** Get the input stream.␊ |
3526 | * ␊ |
3527 | */␊ |
3528 | FILE *pycodeYYget_in (void)␊ |
3529 | {␊ |
3530 | return pycodeYYin;␊ |
3531 | }␊ |
3532 | ␊ |
3533 | /** Get the output stream.␊ |
3534 | * ␊ |
3535 | */␊ |
3536 | FILE *pycodeYYget_out (void)␊ |
3537 | {␊ |
3538 | return pycodeYYout;␊ |
3539 | }␊ |
3540 | ␊ |
3541 | /** Get the length of the current token.␊ |
3542 | * ␊ |
3543 | */␊ |
3544 | yy_size_t pycodeYYget_leng (void)␊ |
3545 | {␊ |
3546 | return pycodeYYleng;␊ |
3547 | }␊ |
3548 | ␊ |
3549 | /** Get the current token.␊ |
3550 | * ␊ |
3551 | */␊ |
3552 | ␊ |
3553 | char *pycodeYYget_text (void)␊ |
3554 | {␊ |
3555 | return pycodeYYtext;␊ |
3556 | }␊ |
3557 | ␊ |
3558 | /** Set the current line number.␊ |
3559 | * @param line_number␊ |
3560 | * ␊ |
3561 | */␊ |
3562 | void pycodeYYset_lineno (int line_number )␊ |
3563 | {␊ |
3564 | ␊ |
3565 | pycodeYYlineno = line_number;␊ |
3566 | }␊ |
3567 | ␊ |
3568 | /** Set the input stream. This does not discard the current␊ |
3569 | * input buffer.␊ |
3570 | * @param in_str A readable stream.␊ |
3571 | * ␊ |
3572 | * @see pycodeYY_switch_to_buffer␊ |
3573 | */␊ |
3574 | void pycodeYYset_in (FILE * in_str )␊ |
3575 | {␊ |
3576 | pycodeYYin = in_str ;␊ |
3577 | }␊ |
3578 | ␊ |
3579 | void pycodeYYset_out (FILE * out_str )␊ |
3580 | {␊ |
3581 | pycodeYYout = out_str ;␊ |
3582 | }␊ |
3583 | ␊ |
3584 | int pycodeYYget_debug (void)␊ |
3585 | {␊ |
3586 | return pycodeYY_flex_debug;␊ |
3587 | }␊ |
3588 | ␊ |
3589 | void pycodeYYset_debug (int bdebug )␊ |
3590 | {␊ |
3591 | pycodeYY_flex_debug = bdebug ;␊ |
3592 | }␊ |
3593 | ␊ |
3594 | static int yy_init_globals (void)␊ |
3595 | {␊ |
3596 | /* Initialization is the same as for the non-reentrant scanner.␊ |
3597 | * This function is called from pycodeYYlex_destroy(), so don't allocate here.␊ |
3598 | */␊ |
3599 | ␊ |
3600 | (yy_buffer_stack) = 0;␊ |
3601 | (yy_buffer_stack_top) = 0;␊ |
3602 | (yy_buffer_stack_max) = 0;␊ |
3603 | (yy_c_buf_p) = (char *) 0;␊ |
3604 | (yy_init) = 0;␊ |
3605 | (yy_start) = 0;␊ |
3606 | ␊ |
3607 | (yy_state_buf) = 0;␊ |
3608 | (yy_state_ptr) = 0;␊ |
3609 | (yy_full_match) = 0;␊ |
3610 | (yy_lp) = 0;␊ |
3611 | ␊ |
3612 | /* Defined in main.c */␊ |
3613 | #ifdef YY_STDINIT␊ |
3614 | pycodeYYin = stdin;␊ |
3615 | pycodeYYout = stdout;␊ |
3616 | #else␊ |
3617 | pycodeYYin = (FILE *) 0;␊ |
3618 | pycodeYYout = (FILE *) 0;␊ |
3619 | #endif␊ |
3620 | ␊ |
3621 | /* For future reference: Set errno on error, since we are called by␊ |
3622 | * pycodeYYlex_init()␊ |
3623 | */␊ |
3624 | return 0;␊ |
3625 | }␊ |
3626 | ␊ |
3627 | /* pycodeYYlex_destroy is for both reentrant and non-reentrant scanners. */␊ |
3628 | int pycodeYYlex_destroy (void)␊ |
3629 | {␊ |
3630 | ␊ |
3631 | /* Pop the buffer stack, destroying each element. */␊ |
3632 | ␉while(YY_CURRENT_BUFFER){␊ |
3633 | ␉␉pycodeYY_delete_buffer(YY_CURRENT_BUFFER );␊ |
3634 | ␉␉YY_CURRENT_BUFFER_LVALUE = NULL;␊ |
3635 | ␉␉pycodeYYpop_buffer_state();␊ |
3636 | ␉}␊ |
3637 | ␊ |
3638 | ␉/* Destroy the stack itself. */␊ |
3639 | ␉pycodeYYfree((yy_buffer_stack) );␊ |
3640 | ␉(yy_buffer_stack) = NULL;␊ |
3641 | ␊ |
3642 | pycodeYYfree ( (yy_state_buf) );␊ |
3643 | (yy_state_buf) = NULL;␊ |
3644 | ␊ |
3645 | /* Reset the globals. This is important in a non-reentrant scanner so the next time␊ |
3646 | * pycodeYYlex() is called, initialization will occur. */␊ |
3647 | yy_init_globals( );␊ |
3648 | ␊ |
3649 | return 0;␊ |
3650 | }␊ |
3651 | ␊ |
3652 | /*␊ |
3653 | * Internal utility routines.␊ |
3654 | */␊ |
3655 | ␊ |
3656 | #ifndef yytext_ptr␊ |
3657 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )␊ |
3658 | {␊ |
3659 | ␉register int i;␊ |
3660 | ␉for ( i = 0; i < n; ++i )␊ |
3661 | ␉␉s1[i] = s2[i];␊ |
3662 | }␊ |
3663 | #endif␊ |
3664 | ␊ |
3665 | #ifdef YY_NEED_STRLEN␊ |
3666 | static int yy_flex_strlen (yyconst char * s )␊ |
3667 | {␊ |
3668 | ␉register int n;␊ |
3669 | ␉for ( n = 0; s[n]; ++n )␊ |
3670 | ␉␉;␊ |
3671 | ␊ |
3672 | ␉return n;␊ |
3673 | }␊ |
3674 | #endif␊ |
3675 | ␊ |
3676 | void *pycodeYYalloc (yy_size_t size )␊ |
3677 | {␊ |
3678 | ␉return (void *) malloc( size );␊ |
3679 | }␊ |
3680 | ␊ |
3681 | void *pycodeYYrealloc (void * ptr, yy_size_t size )␊ |
3682 | {␊ |
3683 | ␉/* The cast to (char *) in the following accommodates both␊ |
3684 | ␉ * implementations that use char* generic pointers, and those␊ |
3685 | ␉ * that use void* generic pointers. It works with the latter␊ |
3686 | ␉ * because both ANSI C and C++ allow castless assignment from␊ |
3687 | ␉ * any pointer type to void*, and deal with argument conversions␊ |
3688 | ␉ * as though doing an assignment.␊ |
3689 | ␉ */␊ |
3690 | ␉return (void *) realloc( (char *) ptr, size );␊ |
3691 | }␊ |
3692 | ␊ |
3693 | void pycodeYYfree (void * ptr )␊ |
3694 | {␊ |
3695 | ␉free( (char *) ptr );␉/* see pycodeYYrealloc() for (char *) cast */␊ |
3696 | }␊ |
3697 | ␊ |
3698 | #define YYTABLES_NAME "yytables"␊ |
3699 | ␊ |
3700 | #line 1352 "pycode.l"␊ |
3701 | ␊ |
3702 | ␊ |
3703 | ␊ |
3704 | /*@ ----------------------------------------------------------------------------␊ |
3705 | */␊ |
3706 | ␊ |
3707 | void resetPythonCodeParserState() ␊ |
3708 | {␊ |
3709 | g_currentDefinition = 0;␊ |
3710 | g_currentMemberDef = 0;␊ |
3711 | g_doubleStringIsDoc = FALSE;␊ |
3712 | g_paramParens = 0;␊ |
3713 | g_indents.clear();␊ |
3714 | BEGIN( Body );␊ |
3715 | }␊ |
3716 | ␊ |
3717 | /*!␊ |
3718 | Examines current stack of white-space indentations;␊ |
3719 | re-syncs the parser with the correct scope.␊ |
3720 | */␊ |
3721 | static void adjustScopesAndSuites(unsigned indentLength) ␊ |
3722 | {␊ |
3723 | // States to pop␊ |
3724 | if (!g_indents.isEmpty() && indentLength < g_indents.top()) ␊ |
3725 | {␊ |
3726 | while (!g_indents.isEmpty() && indentLength < g_indents.top()) ␊ |
3727 | {␊ |
3728 | // printf("Exited scope indent of [%d]\n", g_indents.top());␊ |
3729 | g_indents.pop(); // Pop the old suite's indentation␊ |
3730 | ␊ |
3731 | g_currentMemberDef=0;␊ |
3732 | if (g_currentDefinition) ␊ |
3733 | ␉g_currentDefinition=g_currentDefinition->getOuterScope();␊ |
3734 | }␊ |
3735 | }␊ |
3736 | ␊ |
3737 | // Are there any remaining indentation levels for suites?␊ |
3738 | if (!g_indents.isEmpty()) ␊ |
3739 | {␊ |
3740 | BEGIN( Suite );␊ |
3741 | }␊ |
3742 | else ␊ |
3743 | {␊ |
3744 | BEGIN( Body );␊ |
3745 | }␊ |
3746 | }␊ |
3747 | ␊ |
3748 | void parsePythonCode(CodeOutputInterface &od,const char *className,␊ |
3749 | const QCString &s,bool exBlock, const char *exName,␊ |
3750 | ␉␉ FileDef *fd,int startLine,int endLine,bool inlineFragment,␊ |
3751 | ␉␉ MemberDef *,bool) ␊ |
3752 | {␊ |
3753 | ␊ |
3754 | //printf("***parseCode()\n");␊ |
3755 | ␊ |
3756 | //--- some code to eliminate warnings---␊ |
3757 | className = "";␊ |
3758 | exBlock = FALSE;␊ |
3759 | exName = "";␊ |
3760 | inlineFragment = "";␊ |
3761 | //--------------------------------------␊ |
3762 | if (s.isEmpty()) return;␊ |
3763 | g_code = &od;␊ |
3764 | g_inputString = s;␊ |
3765 | g_inputPosition = 0;␊ |
3766 | g_currentFontClass = 0;␊ |
3767 | g_needsTermination = FALSE;␊ |
3768 | if (endLine!=-1)␊ |
3769 | g_inputLines = endLine+1;␊ |
3770 | else␊ |
3771 | g_inputLines = countLines();␊ |
3772 | ␊ |
3773 | if (startLine!=-1)␊ |
3774 | g_yyLineNr = startLine;␊ |
3775 | else␊ |
3776 | g_yyLineNr = 1;␊ |
3777 | ␊ |
3778 | g_exampleBlock = exBlock; ␊ |
3779 | g_exampleName = exName;␊ |
3780 | g_sourceFileDef = fd;␊ |
3781 | ␊ |
3782 | ␊ |
3783 | // Starts line 1 on the output ␊ |
3784 | startCodeLine();␊ |
3785 | ␊ |
3786 | pycodeYYrestart( pycodeYYin );␊ |
3787 | ␊ |
3788 | pycodeYYlex();␊ |
3789 | ␊ |
3790 | if (!g_indents.isEmpty()) ␊ |
3791 | {␊ |
3792 | // printf("Exited pysourceparser in inconsistent state!\n");␊ |
3793 | }␊ |
3794 | ␊ |
3795 | if (g_needsTermination)␊ |
3796 | {␊ |
3797 | endCodeLine();␊ |
3798 | }␊ |
3799 | return;␊ |
3800 | }␊ |
3801 | ␊ |
3802 | ␊ |
3803 | #if !defined(YY_FLEX_SUBMINOR_VERSION) ␊ |
3804 | extern "C" { // some bogus code to keep the compiler happy␊ |
3805 | void pycodeYYdummy() { yy_flex_realloc(0,0); } ␊ |
3806 | }␊ |
3807 | #elif YY_FLEX_SUBMINOR_VERSION<33␊ |
3808 | #error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)."␊ |
3809 | #endif␊ |
3810 | ␊ |
3811 | ␊ |
3812 |