Root/
Source at commit 1322 created 12 years 7 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 cppExpYY_create_buffer␊ |
9 | #define yy_delete_buffer cppExpYY_delete_buffer␊ |
10 | #define yy_flex_debug cppExpYY_flex_debug␊ |
11 | #define yy_init_buffer cppExpYY_init_buffer␊ |
12 | #define yy_flush_buffer cppExpYY_flush_buffer␊ |
13 | #define yy_load_buffer_state cppExpYY_load_buffer_state␊ |
14 | #define yy_switch_to_buffer cppExpYY_switch_to_buffer␊ |
15 | #define yyin cppExpYYin␊ |
16 | #define yyleng cppExpYYleng␊ |
17 | #define yylex cppExpYYlex␊ |
18 | #define yylineno cppExpYYlineno␊ |
19 | #define yyout cppExpYYout␊ |
20 | #define yyrestart cppExpYYrestart␊ |
21 | #define yytext cppExpYYtext␊ |
22 | #define yywrap cppExpYYwrap␊ |
23 | #define yyalloc cppExpYYalloc␊ |
24 | #define yyrealloc cppExpYYrealloc␊ |
25 | #define yyfree cppExpYYfree␊ |
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 cppExpYYrestart(cppExpYYin )␊ |
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 cppExpYYleng;␊ |
180 | ␊ |
181 | extern FILE *cppExpYYin, *cppExpYYout;␊ |
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 cppExpYYtext. */ \␊ |
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 cppExpYYtext 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 cppExpYYrestart()), so that the user can continue scanning by␊ |
263 | ␉ * just pointing cppExpYYin 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 cppExpYYtext 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 cppExpYYleng;␊ |
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 cppExpYYwrap()'s to do buffer switches␊ |
301 | * instead of setting up a fresh cppExpYYin. A bit of a hack ...␊ |
302 | */␊ |
303 | static int yy_did_buffer_switch_on_eof;␊ |
304 | ␊ |
305 | void cppExpYYrestart (FILE *input_file );␊ |
306 | void cppExpYY_switch_to_buffer (YY_BUFFER_STATE new_buffer );␊ |
307 | YY_BUFFER_STATE cppExpYY_create_buffer (FILE *file,int size );␊ |
308 | void cppExpYY_delete_buffer (YY_BUFFER_STATE b );␊ |
309 | void cppExpYY_flush_buffer (YY_BUFFER_STATE b );␊ |
310 | void cppExpYYpush_buffer_state (YY_BUFFER_STATE new_buffer );␊ |
311 | void cppExpYYpop_buffer_state (void );␊ |
312 | ␊ |
313 | static void cppExpYYensure_buffer_stack (void );␊ |
314 | static void cppExpYY_load_buffer_state (void );␊ |
315 | static void cppExpYY_init_buffer (YY_BUFFER_STATE b,FILE *file );␊ |
316 | ␊ |
317 | #define YY_FLUSH_BUFFER cppExpYY_flush_buffer(YY_CURRENT_BUFFER )␊ |
318 | ␊ |
319 | YY_BUFFER_STATE cppExpYY_scan_buffer (char *base,yy_size_t size );␊ |
320 | YY_BUFFER_STATE cppExpYY_scan_string (yyconst char *yy_str );␊ |
321 | YY_BUFFER_STATE cppExpYY_scan_bytes (yyconst char *bytes,yy_size_t len );␊ |
322 | ␊ |
323 | void *cppExpYYalloc (yy_size_t );␊ |
324 | void *cppExpYYrealloc (void *,yy_size_t );␊ |
325 | void cppExpYYfree (void * );␊ |
326 | ␊ |
327 | #define yy_new_buffer cppExpYY_create_buffer␊ |
328 | ␊ |
329 | #define yy_set_interactive(is_interactive) \␊ |
330 | ␉{ \␊ |
331 | ␉if ( ! YY_CURRENT_BUFFER ){ \␊ |
332 | cppExpYYensure_buffer_stack (); \␊ |
333 | ␉␉YY_CURRENT_BUFFER_LVALUE = \␊ |
334 | cppExpYY_create_buffer(cppExpYYin,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 | cppExpYYensure_buffer_stack (); \␊ |
343 | ␉␉YY_CURRENT_BUFFER_LVALUE = \␊ |
344 | cppExpYY_create_buffer(cppExpYYin,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 | typedef unsigned char YY_CHAR;␊ |
354 | ␊ |
355 | FILE *cppExpYYin = (FILE *) 0, *cppExpYYout = (FILE *) 0;␊ |
356 | ␊ |
357 | typedef int yy_state_type;␊ |
358 | ␊ |
359 | extern int cppExpYYlineno;␊ |
360 | ␊ |
361 | int cppExpYYlineno = 1;␊ |
362 | ␊ |
363 | extern char *cppExpYYtext;␊ |
364 | #define yytext_ptr cppExpYYtext␊ |
365 | ␊ |
366 | static yy_state_type yy_get_previous_state (void );␊ |
367 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state );␊ |
368 | static int yy_get_next_buffer (void );␊ |
369 | static void yy_fatal_error (yyconst char msg[] );␊ |
370 | ␊ |
371 | /* Done after the current pattern has been matched and before the␊ |
372 | * corresponding action - sets up cppExpYYtext.␊ |
373 | */␊ |
374 | #define YY_DO_BEFORE_ACTION \␊ |
375 | ␉(yytext_ptr) = yy_bp; \␊ |
376 | ␉cppExpYYleng = (size_t) (yy_cp - yy_bp); \␊ |
377 | ␉(yy_hold_char) = *yy_cp; \␊ |
378 | ␉*yy_cp = '\0'; \␊ |
379 | ␉(yy_c_buf_p) = yy_cp;␊ |
380 | ␊ |
381 | #define YY_NUM_RULES 33␊ |
382 | #define YY_END_OF_BUFFER 34␊ |
383 | /* This struct is not used in this scanner,␊ |
384 | but its presence is necessary. */␊ |
385 | struct yy_trans_info␊ |
386 | ␉{␊ |
387 | ␉flex_int32_t yy_verify;␊ |
388 | ␉flex_int32_t yy_nxt;␊ |
389 | ␉};␊ |
390 | static yyconst flex_int16_t yy_accept[77] =␊ |
391 | { 0,␊ |
392 | 0, 0, 34, 31, 32, 22, 20, 7, 31, 23,␊ |
393 | 24, 18, 16, 17, 31, 19, 26, 27, 2, 10,␊ |
394 | 31, 11, 1, 6, 5, 21, 8, 4, 0, 0,␊ |
395 | 29, 29, 26, 0, 0, 26, 26, 0, 27, 27,␊ |
396 | 27, 14, 12, 9, 13, 15, 3, 25, 0, 0,␊ |
397 | 0, 0, 29, 29, 0, 30, 26, 26, 26, 28,␊ |
398 | 27, 27, 27, 0, 0, 29, 30, 26, 28, 28,␊ |
399 | 27, 28, 28, 28, 28, 0␊ |
400 | } ;␊ |
401 | ␊ |
402 | static yyconst flex_int32_t yy_ec[256] =␊ |
403 | { 0,␊ |
404 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,␊ |
405 | 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,␊ |
406 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
407 | 1, 1, 4, 5, 1, 1, 6, 7, 8, 9,␊ |
408 | 10, 11, 12, 1, 13, 14, 15, 16, 17, 17,␊ |
409 | 17, 17, 17, 17, 17, 18, 18, 19, 1, 20,␊ |
410 | 21, 22, 23, 1, 24, 24, 24, 24, 25, 26,␊ |
411 | 1, 1, 1, 1, 1, 27, 1, 1, 1, 1,␊ |
412 | 1, 1, 1, 1, 28, 1, 1, 29, 1, 1,␊ |
413 | 1, 30, 1, 31, 1, 1, 32, 32, 24, 24,␊ |
414 | ␊ |
415 | 25, 33, 1, 1, 1, 1, 1, 27, 1, 5,␊ |
416 | 1, 1, 1, 5, 1, 5, 28, 5, 1, 34,␊ |
417 | 1, 1, 1, 35, 1, 36, 1, 1, 1, 1,␊ |
418 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
419 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
420 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
421 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
422 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
423 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
424 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
425 | ␊ |
426 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
427 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
428 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
429 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
430 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
431 | 1, 1, 1, 1, 1␊ |
432 | } ;␊ |
433 | ␊ |
434 | static yyconst flex_int32_t yy_meta[37] =␊ |
435 | { 0,␊ |
436 | 1, 2, 2, 1, 1, 1, 1, 2, 1, 1,␊ |
437 | 1, 1, 1, 1, 1, 3, 3, 3, 1, 1,␊ |
438 | 1, 1, 1, 3, 3, 3, 1, 1, 1, 1,␊ |
439 | 1, 3, 3, 1, 1, 1␊ |
440 | } ;␊ |
441 | ␊ |
442 | static yyconst flex_int16_t yy_base[80] =␊ |
443 | { 0,␊ |
444 | 0, 0, 145, 163, 163, 119, 163, 132, 108, 163,␊ |
445 | 163, 163, 163, 163, 21, 163, 26, 47, 163, 25,␊ |
446 | 116, 26, 163, 163, 101, 163, 163, 163, 41, 71,␊ |
447 | 90, 40, 33, 52, 68, 55, 106, 0, 0, 63,␊ |
448 | 105, 163, 163, 163, 163, 163, 163, 163, 123, 94,␊ |
449 | 0, 80, 163, 0, 102, 108, 102, 163, 82, 86,␊ |
450 | 71, 163, 68, 70, 111, 126, 163, 163, 94, 46,␊ |
451 | 163, 31, 163, 25, 163, 163, 159, 47, 38␊ |
452 | } ;␊ |
453 | ␊ |
454 | static yyconst flex_int16_t yy_def[80] =␊ |
455 | { 0,␊ |
456 | 76, 1, 76, 76, 76, 76, 76, 76, 77, 76,␊ |
457 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,␊ |
458 | 76, 76, 76, 76, 76, 76, 76, 76, 77, 76,␊ |
459 | 76, 31, 17, 76, 76, 76, 76, 78, 18, 76,␊ |
460 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,␊ |
461 | 79, 76, 76, 32, 76, 76, 76, 76, 76, 78,␊ |
462 | 76, 76, 76, 79, 76, 76, 76, 76, 76, 76,␊ |
463 | 76, 76, 76, 76, 76, 0, 76, 76, 76␊ |
464 | } ;␊ |
465 | ␊ |
466 | static yyconst flex_int16_t yy_nxt[200] =␊ |
467 | { 0,␊ |
468 | 4, 5, 4, 6, 4, 7, 8, 9, 10, 11,␊ |
469 | 12, 13, 14, 15, 16, 17, 18, 18, 19, 20,␊ |
470 | 21, 22, 23, 4, 4, 4, 4, 4, 4, 4,␊ |
471 | 24, 4, 4, 4, 25, 26, 31, 31, 31, 32,␊ |
472 | 64, 33, 33, 34, 42, 43, 45, 46, 48, 60,␊ |
473 | 35, 75, 36, 37, 38, 54, 54, 54, 73, 38,␊ |
474 | 32, 76, 39, 39, 39, 32, 76, 34, 34, 34,␊ |
475 | 76, 35, 74, 40, 41, 49, 35, 48, 49, 55,␊ |
476 | 55, 57, 58, 56, 56, 56, 50, 50, 50, 61,␊ |
477 | 62, 65, 65, 49, 71, 66, 66, 66, 62, 51,␊ |
478 | ␊ |
479 | 49, 48, 49, 49, 51, 31, 31, 31, 68, 50,␊ |
480 | 50, 50, 69, 70, 52, 53, 53, 56, 56, 56,␊ |
481 | 72, 73, 53, 56, 56, 56, 66, 66, 66, 58,␊ |
482 | 48, 63, 59, 67, 67, 47, 44, 30, 28, 27,␊ |
483 | 67, 66, 66, 66, 76, 76, 76, 76, 76, 76,␊ |
484 | 76, 53, 53, 76, 76, 76, 76, 76, 53, 29,␊ |
485 | 76, 29, 3, 76, 76, 76, 76, 76, 76, 76,␊ |
486 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,␊ |
487 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,␊ |
488 | 76, 76, 76, 76, 76, 76, 76, 76, 76␊ |
489 | ␊ |
490 | } ;␊ |
491 | ␊ |
492 | static yyconst flex_int16_t yy_chk[200] =␊ |
493 | { 0,␊ |
494 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
495 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
496 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,␊ |
497 | 1, 1, 1, 1, 1, 1, 15, 15, 15, 17,␊ |
498 | 79, 17, 17, 17, 20, 20, 22, 22, 29, 78,␊ |
499 | 17, 74, 17, 17, 17, 32, 32, 32, 72, 17,␊ |
500 | 18, 33, 18, 18, 18, 34, 33, 34, 34, 34,␊ |
501 | 29, 18, 70, 18, 18, 30, 34, 64, 30, 35,␊ |
502 | 35, 36, 36, 35, 35, 35, 30, 30, 30, 40,␊ |
503 | 40, 52, 52, 30, 63, 52, 52, 52, 61, 30,␊ |
504 | ␊ |
505 | 30, 50, 30, 30, 30, 31, 31, 31, 59, 50,␊ |
506 | 50, 50, 60, 60, 31, 31, 31, 55, 55, 55,␊ |
507 | 69, 69, 31, 56, 56, 56, 65, 65, 65, 57,␊ |
508 | 49, 41, 37, 56, 56, 25, 21, 9, 8, 6,␊ |
509 | 56, 66, 66, 66, 3, 0, 0, 0, 0, 0,␊ |
510 | 0, 66, 66, 0, 0, 0, 0, 0, 66, 77,␊ |
511 | 0, 77, 76, 76, 76, 76, 76, 76, 76, 76,␊ |
512 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,␊ |
513 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,␊ |
514 | 76, 76, 76, 76, 76, 76, 76, 76, 76␊ |
515 | ␊ |
516 | } ;␊ |
517 | ␊ |
518 | static yy_state_type yy_last_accepting_state;␊ |
519 | static char *yy_last_accepting_cpos;␊ |
520 | ␊ |
521 | extern int cppExpYY_flex_debug;␊ |
522 | int cppExpYY_flex_debug = 0;␊ |
523 | ␊ |
524 | /* The intent behind this definition is that it'll catch␊ |
525 | * any uses of REJECT which flex missed.␊ |
526 | */␊ |
527 | #define REJECT reject_used_but_not_detected␊ |
528 | #define yymore() yymore_used_but_not_detected␊ |
529 | #define YY_MORE_ADJ 0␊ |
530 | #define YY_RESTORE_YY_MORE_OFFSET␊ |
531 | char *cppExpYYtext;␊ |
532 | #line 1 "constexp.l"␊ |
533 | /******************************************************************************␊ |
534 | *␊ |
535 | * $Id: constexp.l,v 1.11 2001/03/19 19:27:40 root Exp $␊ |
536 | *␊ |
537 | *␊ |
538 | * Copyright (C) 1997-2011 by Dimitri van Heesch.␊ |
539 | *␊ |
540 | * Permission to use, copy, modify, and distribute this software and its␊ |
541 | * documentation under the terms of the GNU General Public License is hereby ␊ |
542 | * granted. No representations are made about the suitability of this software ␊ |
543 | * for any purpose. It is provided "as is" without express or implied warranty.␊ |
544 | * See the GNU General Public License for more details.␊ |
545 | *␊ |
546 | * Documents produced by Doxygen are derivative works derived from the␊ |
547 | * input used in their production; they are not affected by this license.␊ |
548 | *␊ |
549 | */␊ |
550 | #line 20 "constexp.l"␊ |
551 | ␊ |
552 | #include "constexp.h" ␊ |
553 | #include "cppvalue.h"␊ |
554 | #include "ce_parse.h" // generated header file␊ |
555 | ␊ |
556 | #define YY_NEVER_INTERACTIVE 1␊ |
557 | ␊ |
558 | QCString g_strToken; ␊ |
559 | CPPValue g_resultValue;␊ |
560 | int g_constExpLineNr;␊ |
561 | QCString g_constExpFileName;␊ |
562 | ␊ |
563 | static const char *g_inputString;␊ |
564 | static int g_inputPosition;␊ |
565 | ␊ |
566 | #undef YY_INPUT␊ |
567 | #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);␊ |
568 | ␊ |
569 | static int yyread(char *buf,int max_size)␊ |
570 | {␊ |
571 | int c=0;␊ |
572 | while( c < max_size && g_inputString[g_inputPosition] )␊ |
573 | {␊ |
574 | *buf = g_inputString[g_inputPosition++] ;␊ |
575 | c++; buf++;␊ |
576 | }␊ |
577 | return c;␊ |
578 | }␊ |
579 | ␊ |
580 | #line 581 "<stdout>"␊ |
581 | ␊ |
582 | #define INITIAL 0␊ |
583 | ␊ |
584 | #ifndef YY_NO_UNISTD_H␊ |
585 | /* Special case for "unistd.h", since it is non-ANSI. We include it way␊ |
586 | * down here because we want the user's section 1 to have been scanned first.␊ |
587 | * The user has a chance to override it with an option.␊ |
588 | */␊ |
589 | #include <unistd.h>␊ |
590 | #endif␊ |
591 | ␊ |
592 | #ifndef YY_EXTRA_TYPE␊ |
593 | #define YY_EXTRA_TYPE void *␊ |
594 | #endif␊ |
595 | ␊ |
596 | static int yy_init_globals (void );␊ |
597 | ␊ |
598 | /* Accessor methods to globals.␊ |
599 | These are made visible to non-reentrant scanners for convenience. */␊ |
600 | ␊ |
601 | int cppExpYYlex_destroy (void );␊ |
602 | ␊ |
603 | int cppExpYYget_debug (void );␊ |
604 | ␊ |
605 | void cppExpYYset_debug (int debug_flag );␊ |
606 | ␊ |
607 | YY_EXTRA_TYPE cppExpYYget_extra (void );␊ |
608 | ␊ |
609 | void cppExpYYset_extra (YY_EXTRA_TYPE user_defined );␊ |
610 | ␊ |
611 | FILE *cppExpYYget_in (void );␊ |
612 | ␊ |
613 | void cppExpYYset_in (FILE * in_str );␊ |
614 | ␊ |
615 | FILE *cppExpYYget_out (void );␊ |
616 | ␊ |
617 | void cppExpYYset_out (FILE * out_str );␊ |
618 | ␊ |
619 | yy_size_t cppExpYYget_leng (void );␊ |
620 | ␊ |
621 | char *cppExpYYget_text (void );␊ |
622 | ␊ |
623 | int cppExpYYget_lineno (void );␊ |
624 | ␊ |
625 | void cppExpYYset_lineno (int line_number );␊ |
626 | ␊ |
627 | /* Macros after this point can all be overridden by user definitions in␊ |
628 | * section 1.␊ |
629 | */␊ |
630 | ␊ |
631 | #ifndef YY_SKIP_YYWRAP␊ |
632 | #ifdef __cplusplus␊ |
633 | extern "C" int cppExpYYwrap (void );␊ |
634 | #else␊ |
635 | extern int cppExpYYwrap (void );␊ |
636 | #endif␊ |
637 | #endif␊ |
638 | ␊ |
639 | #ifndef yytext_ptr␊ |
640 | static void yy_flex_strncpy (char *,yyconst char *,int );␊ |
641 | #endif␊ |
642 | ␊ |
643 | #ifdef YY_NEED_STRLEN␊ |
644 | static int yy_flex_strlen (yyconst char * );␊ |
645 | #endif␊ |
646 | ␊ |
647 | #ifndef YY_NO_INPUT␊ |
648 | ␊ |
649 | #ifdef __cplusplus␊ |
650 | static int yyinput (void );␊ |
651 | #else␊ |
652 | static int input (void );␊ |
653 | #endif␊ |
654 | ␊ |
655 | #endif␊ |
656 | ␊ |
657 | /* Amount of stuff to slurp up with each read. */␊ |
658 | #ifndef YY_READ_BUF_SIZE␊ |
659 | #define YY_READ_BUF_SIZE 262144␊ |
660 | #endif␊ |
661 | ␊ |
662 | /* Copy whatever the last rule matched to the standard output. */␊ |
663 | #ifndef ECHO␊ |
664 | /* This used to be an fputs(), but since the string might contain NUL's,␊ |
665 | * we now use fwrite().␊ |
666 | */␊ |
667 | #define ECHO fwrite( cppExpYYtext, cppExpYYleng, 1, cppExpYYout )␊ |
668 | #endif␊ |
669 | ␊ |
670 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,␊ |
671 | * is returned in "result".␊ |
672 | */␊ |
673 | #ifndef YY_INPUT␊ |
674 | #define YY_INPUT(buf,result,max_size) \␊ |
675 | ␉if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \␊ |
676 | ␉␉{ \␊ |
677 | ␉␉int c = '*'; \␊ |
678 | ␉␉yy_size_t n; \␊ |
679 | ␉␉for ( n = 0; n < max_size && \␊ |
680 | ␉␉␉ (c = getc( cppExpYYin )) != EOF && c != '\n'; ++n ) \␊ |
681 | ␉␉␉buf[n] = (char) c; \␊ |
682 | ␉␉if ( c == '\n' ) \␊ |
683 | ␉␉␉buf[n++] = (char) c; \␊ |
684 | ␉␉if ( c == EOF && ferror( cppExpYYin ) ) \␊ |
685 | ␉␉␉YY_FATAL_ERROR( "input in flex scanner failed" ); \␊ |
686 | ␉␉result = n; \␊ |
687 | ␉␉} \␊ |
688 | ␉else \␊ |
689 | ␉␉{ \␊ |
690 | ␉␉errno=0; \␊ |
691 | ␉␉while ( (result = fread(buf, 1, max_size, cppExpYYin))==0 && ferror(cppExpYYin)) \␊ |
692 | ␉␉␉{ \␊ |
693 | ␉␉␉if( errno != EINTR) \␊ |
694 | ␉␉␉␉{ \␊ |
695 | ␉␉␉␉YY_FATAL_ERROR( "input in flex scanner failed" ); \␊ |
696 | ␉␉␉␉break; \␊ |
697 | ␉␉␉␉} \␊ |
698 | ␉␉␉errno=0; \␊ |
699 | ␉␉␉clearerr(cppExpYYin); \␊ |
700 | ␉␉␉} \␊ |
701 | ␉␉}\␊ |
702 | \␊ |
703 | ␊ |
704 | #endif␊ |
705 | ␊ |
706 | /* No semi-colon after return; correct usage is to write "yyterminate();" -␊ |
707 | * we don't want an extra ';' after the "return" because that will cause␊ |
708 | * some compilers to complain about unreachable statements.␊ |
709 | */␊ |
710 | #ifndef yyterminate␊ |
711 | #define yyterminate() return YY_NULL␊ |
712 | #endif␊ |
713 | ␊ |
714 | /* Number of entries by which start-condition stack grows. */␊ |
715 | #ifndef YY_START_STACK_INCR␊ |
716 | #define YY_START_STACK_INCR 25␊ |
717 | #endif␊ |
718 | ␊ |
719 | /* Report a fatal error. */␊ |
720 | #ifndef YY_FATAL_ERROR␊ |
721 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )␊ |
722 | #endif␊ |
723 | ␊ |
724 | /* end tables serialization structures and prototypes */␊ |
725 | ␊ |
726 | /* Default declaration of generated scanner - a define so the user can␊ |
727 | * easily add parameters.␊ |
728 | */␊ |
729 | #ifndef YY_DECL␊ |
730 | #define YY_DECL_IS_OURS 1␊ |
731 | ␊ |
732 | extern int cppExpYYlex (void);␊ |
733 | ␊ |
734 | #define YY_DECL int cppExpYYlex (void)␊ |
735 | #endif /* !YY_DECL */␊ |
736 | ␊ |
737 | /* Code executed at the beginning of each rule, after cppExpYYtext and cppExpYYleng␊ |
738 | * have been set up.␊ |
739 | */␊ |
740 | #ifndef YY_USER_ACTION␊ |
741 | #define YY_USER_ACTION␊ |
742 | #endif␊ |
743 | ␊ |
744 | /* Code executed at the end of each rule. */␊ |
745 | #ifndef YY_BREAK␊ |
746 | #define YY_BREAK break;␊ |
747 | #endif␊ |
748 | ␊ |
749 | #define YY_RULE_SETUP \␊ |
750 | ␉YY_USER_ACTION␊ |
751 | ␊ |
752 | /** The main scanner function which does all the work.␊ |
753 | */␊ |
754 | YY_DECL␊ |
755 | {␊ |
756 | ␉register yy_state_type yy_current_state;␊ |
757 | ␉register char *yy_cp, *yy_bp;␊ |
758 | ␉register int yy_act;␊ |
759 | ␊ |
760 | #line 55 "constexp.l"␊ |
761 | ␊ |
762 | ␊ |
763 | #line 764 "<stdout>"␊ |
764 | ␊ |
765 | ␉if ( !(yy_init) )␊ |
766 | ␉␉{␊ |
767 | ␉␉(yy_init) = 1;␊ |
768 | ␊ |
769 | #ifdef YY_USER_INIT␊ |
770 | ␉␉YY_USER_INIT;␊ |
771 | #endif␊ |
772 | ␊ |
773 | ␉␉if ( ! (yy_start) )␊ |
774 | ␉␉␉(yy_start) = 1;␉/* first start state */␊ |
775 | ␊ |
776 | ␉␉if ( ! cppExpYYin )␊ |
777 | ␉␉␉cppExpYYin = stdin;␊ |
778 | ␊ |
779 | ␉␉if ( ! cppExpYYout )␊ |
780 | ␉␉␉cppExpYYout = stdout;␊ |
781 | ␊ |
782 | ␉␉if ( ! YY_CURRENT_BUFFER ) {␊ |
783 | ␉␉␉cppExpYYensure_buffer_stack ();␊ |
784 | ␉␉␉YY_CURRENT_BUFFER_LVALUE =␊ |
785 | ␉␉␉␉cppExpYY_create_buffer(cppExpYYin,YY_BUF_SIZE );␊ |
786 | ␉␉}␊ |
787 | ␊ |
788 | ␉␉cppExpYY_load_buffer_state( );␊ |
789 | ␉␉}␊ |
790 | ␊ |
791 | ␉while ( 1 )␉␉/* loops until end-of-file is reached */␊ |
792 | ␉␉{␊ |
793 | ␉␉yy_cp = (yy_c_buf_p);␊ |
794 | ␊ |
795 | ␉␉/* Support of cppExpYYtext. */␊ |
796 | ␉␉*yy_cp = (yy_hold_char);␊ |
797 | ␊ |
798 | ␉␉/* yy_bp points to the position in yy_ch_buf of the start of␊ |
799 | ␉␉ * the current run.␊ |
800 | ␉␉ */␊ |
801 | ␉␉yy_bp = yy_cp;␊ |
802 | ␊ |
803 | ␉␉yy_current_state = (yy_start);␊ |
804 | yy_match:␊ |
805 | ␉␉do␊ |
806 | ␉␉␉{␊ |
807 | ␉␉␉register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];␊ |
808 | ␉␉␉if ( yy_accept[yy_current_state] )␊ |
809 | ␉␉␉␉{␊ |
810 | ␉␉␉␉(yy_last_accepting_state) = yy_current_state;␊ |
811 | ␉␉␉␉(yy_last_accepting_cpos) = yy_cp;␊ |
812 | ␉␉␉␉}␊ |
813 | ␉␉␉while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )␊ |
814 | ␉␉␉␉{␊ |
815 | ␉␉␉␉yy_current_state = (int) yy_def[yy_current_state];␊ |
816 | ␉␉␉␉if ( yy_current_state >= 77 )␊ |
817 | ␉␉␉␉␉yy_c = yy_meta[(unsigned int) yy_c];␊ |
818 | ␉␉␉␉}␊ |
819 | ␉␉␉yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];␊ |
820 | ␉␉␉++yy_cp;␊ |
821 | ␉␉␉}␊ |
822 | ␉␉while ( yy_base[yy_current_state] != 163 );␊ |
823 | ␊ |
824 | yy_find_action:␊ |
825 | ␉␉yy_act = yy_accept[yy_current_state];␊ |
826 | ␉␉if ( yy_act == 0 )␊ |
827 | ␉␉␉{ /* have to back up */␊ |
828 | ␉␉␉yy_cp = (yy_last_accepting_cpos);␊ |
829 | ␉␉␉yy_current_state = (yy_last_accepting_state);␊ |
830 | ␉␉␉yy_act = yy_accept[yy_current_state];␊ |
831 | ␉␉␉}␊ |
832 | ␊ |
833 | ␉␉YY_DO_BEFORE_ACTION;␊ |
834 | ␊ |
835 | do_action:␉/* This label is used only to access EOF actions. */␊ |
836 | ␊ |
837 | ␉␉switch ( yy_act )␊ |
838 | ␉{ /* beginning of action switch */␊ |
839 | ␉␉␉case 0: /* must back up */␊ |
840 | ␉␉␉/* undo the effects of YY_DO_BEFORE_ACTION */␊ |
841 | ␉␉␉*yy_cp = (yy_hold_char);␊ |
842 | ␉␉␉yy_cp = (yy_last_accepting_cpos);␊ |
843 | ␉␉␉yy_current_state = (yy_last_accepting_state);␊ |
844 | ␉␉␉goto yy_find_action;␊ |
845 | ␊ |
846 | case 1:␊ |
847 | YY_RULE_SETUP␊ |
848 | #line 57 "constexp.l"␊ |
849 | { return TOK_QUESTIONMARK; }␊ |
850 | ␉YY_BREAK␊ |
851 | case 2:␊ |
852 | YY_RULE_SETUP␊ |
853 | #line 58 "constexp.l"␊ |
854 | { return TOK_COLON; }␊ |
855 | ␉YY_BREAK␊ |
856 | case 3:␊ |
857 | YY_RULE_SETUP␊ |
858 | #line 59 "constexp.l"␊ |
859 | { return TOK_OR; }␊ |
860 | ␉YY_BREAK␊ |
861 | case 4:␊ |
862 | YY_RULE_SETUP␊ |
863 | #line 60 "constexp.l"␊ |
864 | { return TOK_AND; }␊ |
865 | ␉YY_BREAK␊ |
866 | case 5:␊ |
867 | YY_RULE_SETUP␊ |
868 | #line 61 "constexp.l"␊ |
869 | { return TOK_BITWISEOR; }␊ |
870 | ␉YY_BREAK␊ |
871 | case 6:␊ |
872 | YY_RULE_SETUP␊ |
873 | #line 62 "constexp.l"␊ |
874 | { return TOK_BITWISEXOR; }␊ |
875 | ␉YY_BREAK␊ |
876 | case 7:␊ |
877 | YY_RULE_SETUP␊ |
878 | #line 63 "constexp.l"␊ |
879 | { return TOK_AMPERSAND; }␊ |
880 | ␉YY_BREAK␊ |
881 | case 8:␊ |
882 | YY_RULE_SETUP␊ |
883 | #line 64 "constexp.l"␊ |
884 | { return TOK_NOTEQUAL; }␊ |
885 | ␉YY_BREAK␊ |
886 | case 9:␊ |
887 | YY_RULE_SETUP␊ |
888 | #line 65 "constexp.l"␊ |
889 | { return TOK_EQUAL; }␊ |
890 | ␉YY_BREAK␊ |
891 | case 10:␊ |
892 | YY_RULE_SETUP␊ |
893 | #line 66 "constexp.l"␊ |
894 | { return TOK_LESSTHAN; }␊ |
895 | ␉YY_BREAK␊ |
896 | case 11:␊ |
897 | YY_RULE_SETUP␊ |
898 | #line 67 "constexp.l"␊ |
899 | { return TOK_GREATERTHAN; }␊ |
900 | ␉YY_BREAK␊ |
901 | case 12:␊ |
902 | YY_RULE_SETUP␊ |
903 | #line 68 "constexp.l"␊ |
904 | { return TOK_LESSTHANOREQUALTO; }␊ |
905 | ␉YY_BREAK␊ |
906 | case 13:␊ |
907 | YY_RULE_SETUP␊ |
908 | #line 69 "constexp.l"␊ |
909 | { return TOK_GREATERTHANOREQUALTO; }␊ |
910 | ␉YY_BREAK␊ |
911 | case 14:␊ |
912 | YY_RULE_SETUP␊ |
913 | #line 70 "constexp.l"␊ |
914 | { return TOK_SHIFTLEFT; }␊ |
915 | ␉YY_BREAK␊ |
916 | case 15:␊ |
917 | YY_RULE_SETUP␊ |
918 | #line 71 "constexp.l"␊ |
919 | { return TOK_SHIFTRIGHT; }␊ |
920 | ␉YY_BREAK␊ |
921 | case 16:␊ |
922 | YY_RULE_SETUP␊ |
923 | #line 72 "constexp.l"␊ |
924 | { return TOK_PLUS; }␊ |
925 | ␉YY_BREAK␊ |
926 | case 17:␊ |
927 | YY_RULE_SETUP␊ |
928 | #line 73 "constexp.l"␊ |
929 | { return TOK_MINUS; }␊ |
930 | ␉YY_BREAK␊ |
931 | case 18:␊ |
932 | YY_RULE_SETUP␊ |
933 | #line 74 "constexp.l"␊ |
934 | { return TOK_STAR; }␊ |
935 | ␉YY_BREAK␊ |
936 | case 19:␊ |
937 | YY_RULE_SETUP␊ |
938 | #line 75 "constexp.l"␊ |
939 | { return TOK_DIVIDE; }␊ |
940 | ␉YY_BREAK␊ |
941 | case 20:␊ |
942 | YY_RULE_SETUP␊ |
943 | #line 76 "constexp.l"␊ |
944 | { return TOK_MOD; }␊ |
945 | ␉YY_BREAK␊ |
946 | case 21:␊ |
947 | YY_RULE_SETUP␊ |
948 | #line 77 "constexp.l"␊ |
949 | { return TOK_TILDE; }␊ |
950 | ␉YY_BREAK␊ |
951 | case 22:␊ |
952 | YY_RULE_SETUP␊ |
953 | #line 78 "constexp.l"␊ |
954 | { return TOK_NOT; }␊ |
955 | ␉YY_BREAK␊ |
956 | case 23:␊ |
957 | YY_RULE_SETUP␊ |
958 | #line 79 "constexp.l"␊ |
959 | { return TOK_LPAREN; }␊ |
960 | ␉YY_BREAK␊ |
961 | case 24:␊ |
962 | YY_RULE_SETUP␊ |
963 | #line 80 "constexp.l"␊ |
964 | { return TOK_RPAREN; }␊ |
965 | ␉YY_BREAK␊ |
966 | case 25:␊ |
967 | YY_RULE_SETUP␊ |
968 | #line 81 "constexp.l"␊ |
969 | { ␊ |
970 | g_strToken=cppExpYYtext; ␊ |
971 | ␉␉␉␉ return TOK_CHARACTER; ␊ |
972 | ␉␉␉␉ }␊ |
973 | ␉YY_BREAK␊ |
974 | case 26:␊ |
975 | YY_RULE_SETUP␊ |
976 | #line 85 "constexp.l"␊ |
977 | { g_strToken=cppExpYYtext; ␊ |
978 | ␉␉␉␉ return TOK_OCTALINT; ␊ |
979 | ␉␉␉␉ }␊ |
980 | ␉YY_BREAK␊ |
981 | case 27:␊ |
982 | YY_RULE_SETUP␊ |
983 | #line 88 "constexp.l"␊ |
984 | { g_strToken=cppExpYYtext; ␊ |
985 | ␉␉␉␉ return TOK_DECIMALINT; ␊ |
986 | ␉␉␉␉ }␊ |
987 | ␉YY_BREAK␊ |
988 | case 28:␊ |
989 | YY_RULE_SETUP␊ |
990 | #line 91 "constexp.l"␊ |
991 | { g_strToken=cppExpYYtext+2; ␊ |
992 | return TOK_HEXADECIMALINT; ␊ |
993 | }␊ |
994 | ␉YY_BREAK␊ |
995 | case 29:␊ |
996 | YY_RULE_SETUP␊ |
997 | #line 94 "constexp.l"␊ |
998 | { ␊ |
999 | g_strToken=cppExpYYtext; return TOK_FLOAT; ␊ |
1000 | }␊ |
1001 | ␉YY_BREAK␊ |
1002 | case 30:␊ |
1003 | YY_RULE_SETUP␊ |
1004 | #line 97 "constexp.l"␊ |
1005 | { ␊ |
1006 | g_strToken=cppExpYYtext; return TOK_FLOAT; ␊ |
1007 | ␉␉␉ }␊ |
1008 | ␉YY_BREAK␊ |
1009 | case 31:␊ |
1010 | YY_RULE_SETUP␊ |
1011 | #line 100 "constexp.l"␊ |
1012 | ␊ |
1013 | ␉YY_BREAK␊ |
1014 | case 32:␊ |
1015 | /* rule 32 can match eol */␊ |
1016 | YY_RULE_SETUP␊ |
1017 | #line 101 "constexp.l"␊ |
1018 | ␊ |
1019 | ␉YY_BREAK␊ |
1020 | case 33:␊ |
1021 | YY_RULE_SETUP␊ |
1022 | #line 103 "constexp.l"␊ |
1023 | ECHO;␊ |
1024 | ␉YY_BREAK␊ |
1025 | #line 1026 "<stdout>"␊ |
1026 | case YY_STATE_EOF(INITIAL):␊ |
1027 | ␉yyterminate();␊ |
1028 | ␊ |
1029 | ␉case YY_END_OF_BUFFER:␊ |
1030 | ␉␉{␊ |
1031 | ␉␉/* Amount of text matched not including the EOB char. */␊ |
1032 | ␉␉int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;␊ |
1033 | ␊ |
1034 | ␉␉/* Undo the effects of YY_DO_BEFORE_ACTION. */␊ |
1035 | ␉␉*yy_cp = (yy_hold_char);␊ |
1036 | ␉␉YY_RESTORE_YY_MORE_OFFSET␊ |
1037 | ␊ |
1038 | ␉␉if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )␊ |
1039 | ␉␉␉{␊ |
1040 | ␉␉␉/* We're scanning a new file or input source. It's␊ |
1041 | ␉␉␉ * possible that this happened because the user␊ |
1042 | ␉␉␉ * just pointed cppExpYYin at a new source and called␊ |
1043 | ␉␉␉ * cppExpYYlex(). If so, then we have to assure␊ |
1044 | ␉␉␉ * consistency between YY_CURRENT_BUFFER and our␊ |
1045 | ␉␉␉ * globals. Here is the right place to do so, because␊ |
1046 | ␉␉␉ * this is the first action (other than possibly a␊ |
1047 | ␉␉␉ * back-up) that will match for the new input source.␊ |
1048 | ␉␉␉ */␊ |
1049 | ␉␉␉(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;␊ |
1050 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_input_file = cppExpYYin;␊ |
1051 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;␊ |
1052 | ␉␉␉}␊ |
1053 | ␊ |
1054 | ␉␉/* Note that here we test for yy_c_buf_p "<=" to the position␊ |
1055 | ␉␉ * of the first EOB in the buffer, since yy_c_buf_p will␊ |
1056 | ␉␉ * already have been incremented past the NUL character␊ |
1057 | ␉␉ * (since all states make transitions on EOB to the␊ |
1058 | ␉␉ * end-of-buffer state). Contrast this with the test␊ |
1059 | ␉␉ * in input().␊ |
1060 | ␉␉ */␊ |
1061 | ␉␉if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )␊ |
1062 | ␉␉␉{ /* This was really a NUL. */␊ |
1063 | ␉␉␉yy_state_type yy_next_state;␊ |
1064 | ␊ |
1065 | ␉␉␉(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;␊ |
1066 | ␊ |
1067 | ␉␉␉yy_current_state = yy_get_previous_state( );␊ |
1068 | ␊ |
1069 | ␉␉␉/* Okay, we're now positioned to make the NUL␊ |
1070 | ␉␉␉ * transition. We couldn't have␊ |
1071 | ␉␉␉ * yy_get_previous_state() go ahead and do it␊ |
1072 | ␉␉␉ * for us because it doesn't know how to deal␊ |
1073 | ␉␉␉ * with the possibility of jamming (and we don't␊ |
1074 | ␉␉␉ * want to build jamming into it because then it␊ |
1075 | ␉␉␉ * will run more slowly).␊ |
1076 | ␉␉␉ */␊ |
1077 | ␊ |
1078 | ␉␉␉yy_next_state = yy_try_NUL_trans( yy_current_state );␊ |
1079 | ␊ |
1080 | ␉␉␉yy_bp = (yytext_ptr) + YY_MORE_ADJ;␊ |
1081 | ␊ |
1082 | ␉␉␉if ( yy_next_state )␊ |
1083 | ␉␉␉␉{␊ |
1084 | ␉␉␉␉/* Consume the NUL. */␊ |
1085 | ␉␉␉␉yy_cp = ++(yy_c_buf_p);␊ |
1086 | ␉␉␉␉yy_current_state = yy_next_state;␊ |
1087 | ␉␉␉␉goto yy_match;␊ |
1088 | ␉␉␉␉}␊ |
1089 | ␊ |
1090 | ␉␉␉else␊ |
1091 | ␉␉␉␉{␊ |
1092 | ␉␉␉␉yy_cp = (yy_c_buf_p);␊ |
1093 | ␉␉␉␉goto yy_find_action;␊ |
1094 | ␉␉␉␉}␊ |
1095 | ␉␉␉}␊ |
1096 | ␊ |
1097 | ␉␉else switch ( yy_get_next_buffer( ) )␊ |
1098 | ␉␉␉{␊ |
1099 | ␉␉␉case EOB_ACT_END_OF_FILE:␊ |
1100 | ␉␉␉␉{␊ |
1101 | ␉␉␉␉(yy_did_buffer_switch_on_eof) = 0;␊ |
1102 | ␊ |
1103 | ␉␉␉␉if ( cppExpYYwrap( ) )␊ |
1104 | ␉␉␉␉␉{␊ |
1105 | ␉␉␉␉␉/* Note: because we've taken care in␊ |
1106 | ␉␉␉␉␉ * yy_get_next_buffer() to have set up␊ |
1107 | ␉␉␉␉␉ * cppExpYYtext, we can now set up␊ |
1108 | ␉␉␉␉␉ * yy_c_buf_p so that if some total␊ |
1109 | ␉␉␉␉␉ * hoser (like flex itself) wants to␊ |
1110 | ␉␉␉␉␉ * call the scanner after we return the␊ |
1111 | ␉␉␉␉␉ * YY_NULL, it'll still work - another␊ |
1112 | ␉␉␉␉␉ * YY_NULL will get returned.␊ |
1113 | ␉␉␉␉␉ */␊ |
1114 | ␉␉␉␉␉(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;␊ |
1115 | ␊ |
1116 | ␉␉␉␉␉yy_act = YY_STATE_EOF(YY_START);␊ |
1117 | ␉␉␉␉␉goto do_action;␊ |
1118 | ␉␉␉␉␉}␊ |
1119 | ␊ |
1120 | ␉␉␉␉else␊ |
1121 | ␉␉␉␉␉{␊ |
1122 | ␉␉␉␉␉if ( ! (yy_did_buffer_switch_on_eof) )␊ |
1123 | ␉␉␉␉␉␉YY_NEW_FILE;␊ |
1124 | ␉␉␉␉␉}␊ |
1125 | ␉␉␉␉break;␊ |
1126 | ␉␉␉␉}␊ |
1127 | ␊ |
1128 | ␉␉␉case EOB_ACT_CONTINUE_SCAN:␊ |
1129 | ␉␉␉␉(yy_c_buf_p) =␊ |
1130 | ␉␉␉␉␉(yytext_ptr) + yy_amount_of_matched_text;␊ |
1131 | ␊ |
1132 | ␉␉␉␉yy_current_state = yy_get_previous_state( );␊ |
1133 | ␊ |
1134 | ␉␉␉␉yy_cp = (yy_c_buf_p);␊ |
1135 | ␉␉␉␉yy_bp = (yytext_ptr) + YY_MORE_ADJ;␊ |
1136 | ␉␉␉␉goto yy_match;␊ |
1137 | ␊ |
1138 | ␉␉␉case EOB_ACT_LAST_MATCH:␊ |
1139 | ␉␉␉␉(yy_c_buf_p) =␊ |
1140 | ␉␉␉␉&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];␊ |
1141 | ␊ |
1142 | ␉␉␉␉yy_current_state = yy_get_previous_state( );␊ |
1143 | ␊ |
1144 | ␉␉␉␉yy_cp = (yy_c_buf_p);␊ |
1145 | ␉␉␉␉yy_bp = (yytext_ptr) + YY_MORE_ADJ;␊ |
1146 | ␉␉␉␉goto yy_find_action;␊ |
1147 | ␉␉␉}␊ |
1148 | ␉␉break;␊ |
1149 | ␉␉}␊ |
1150 | ␊ |
1151 | ␉default:␊ |
1152 | ␉␉YY_FATAL_ERROR(␊ |
1153 | ␉␉␉"fatal flex scanner internal error--no action found" );␊ |
1154 | ␉} /* end of action switch */␊ |
1155 | ␉␉} /* end of scanning one token */␊ |
1156 | } /* end of cppExpYYlex */␊ |
1157 | ␊ |
1158 | /* yy_get_next_buffer - try to read in a new buffer␊ |
1159 | *␊ |
1160 | * Returns a code representing an action:␊ |
1161 | *␉EOB_ACT_LAST_MATCH -␊ |
1162 | *␉EOB_ACT_CONTINUE_SCAN - continue scanning from current position␊ |
1163 | *␉EOB_ACT_END_OF_FILE - end of file␊ |
1164 | */␊ |
1165 | static int yy_get_next_buffer (void)␊ |
1166 | {␊ |
1167 | ␉register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;␊ |
1168 | ␉register char *source = (yytext_ptr);␊ |
1169 | ␉register int number_to_move, i;␊ |
1170 | ␉int ret_val;␊ |
1171 | ␊ |
1172 | ␉if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )␊ |
1173 | ␉␉YY_FATAL_ERROR(␊ |
1174 | ␉␉"fatal flex scanner internal error--end of buffer missed" );␊ |
1175 | ␊ |
1176 | ␉if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )␊ |
1177 | ␉␉{ /* Don't try to fill the buffer, so this is an EOF. */␊ |
1178 | ␉␉if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )␊ |
1179 | ␉␉␉{␊ |
1180 | ␉␉␉/* We matched a single character, the EOB, so␊ |
1181 | ␉␉␉ * treat this as a final EOF.␊ |
1182 | ␉␉␉ */␊ |
1183 | ␉␉␉return EOB_ACT_END_OF_FILE;␊ |
1184 | ␉␉␉}␊ |
1185 | ␊ |
1186 | ␉␉else␊ |
1187 | ␉␉␉{␊ |
1188 | ␉␉␉/* We matched some text prior to the EOB, first␊ |
1189 | ␉␉␉ * process it.␊ |
1190 | ␉␉␉ */␊ |
1191 | ␉␉␉return EOB_ACT_LAST_MATCH;␊ |
1192 | ␉␉␉}␊ |
1193 | ␉␉}␊ |
1194 | ␊ |
1195 | ␉/* Try to read more data. */␊ |
1196 | ␊ |
1197 | ␉/* First move last chars to start of buffer. */␊ |
1198 | ␉number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;␊ |
1199 | ␊ |
1200 | ␉for ( i = 0; i < number_to_move; ++i )␊ |
1201 | ␉␉*(dest++) = *(source++);␊ |
1202 | ␊ |
1203 | ␉if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )␊ |
1204 | ␉␉/* don't do the read, it's not guaranteed to return an EOF,␊ |
1205 | ␉␉ * just force an EOF␊ |
1206 | ␉␉ */␊ |
1207 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;␊ |
1208 | ␊ |
1209 | ␉else␊ |
1210 | ␉␉{␊ |
1211 | ␉␉␉yy_size_t num_to_read =␊ |
1212 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;␊ |
1213 | ␊ |
1214 | ␉␉while ( num_to_read <= 0 )␊ |
1215 | ␉␉␉{ /* Not enough room in the buffer - grow it. */␊ |
1216 | ␊ |
1217 | ␉␉␉/* just a shorter name for the current buffer */␊ |
1218 | ␉␉␉YY_BUFFER_STATE b = YY_CURRENT_BUFFER;␊ |
1219 | ␊ |
1220 | ␉␉␉int yy_c_buf_p_offset =␊ |
1221 | ␉␉␉␉(int) ((yy_c_buf_p) - b->yy_ch_buf);␊ |
1222 | ␊ |
1223 | ␉␉␉if ( b->yy_is_our_buffer )␊ |
1224 | ␉␉␉␉{␊ |
1225 | ␉␉␉␉yy_size_t new_size = b->yy_buf_size * 2;␊ |
1226 | ␊ |
1227 | ␉␉␉␉if ( new_size <= 0 )␊ |
1228 | ␉␉␉␉␉b->yy_buf_size += b->yy_buf_size / 8;␊ |
1229 | ␉␉␉␉else␊ |
1230 | ␉␉␉␉␉b->yy_buf_size *= 2;␊ |
1231 | ␊ |
1232 | ␉␉␉␉b->yy_ch_buf = (char *)␊ |
1233 | ␉␉␉␉␉/* Include room in for 2 EOB chars. */␊ |
1234 | ␉␉␉␉␉cppExpYYrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );␊ |
1235 | ␉␉␉␉}␊ |
1236 | ␉␉␉else␊ |
1237 | ␉␉␉␉/* Can't grow it, we don't own it. */␊ |
1238 | ␉␉␉␉b->yy_ch_buf = 0;␊ |
1239 | ␊ |
1240 | ␉␉␉if ( ! b->yy_ch_buf )␊ |
1241 | ␉␉␉␉YY_FATAL_ERROR(␊ |
1242 | ␉␉␉␉"fatal error - scanner input buffer overflow" );␊ |
1243 | ␊ |
1244 | ␉␉␉(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];␊ |
1245 | ␊ |
1246 | ␉␉␉num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -␊ |
1247 | ␉␉␉␉␉␉number_to_move - 1;␊ |
1248 | ␊ |
1249 | ␉␉␉}␊ |
1250 | ␊ |
1251 | ␉␉if ( num_to_read > YY_READ_BUF_SIZE )␊ |
1252 | ␉␉␉num_to_read = YY_READ_BUF_SIZE;␊ |
1253 | ␊ |
1254 | ␉␉/* Read in more data. */␊ |
1255 | ␉␉YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),␊ |
1256 | ␉␉␉(yy_n_chars), num_to_read );␊ |
1257 | ␊ |
1258 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);␊ |
1259 | ␉␉}␊ |
1260 | ␊ |
1261 | ␉if ( (yy_n_chars) == 0 )␊ |
1262 | ␉␉{␊ |
1263 | ␉␉if ( number_to_move == YY_MORE_ADJ )␊ |
1264 | ␉␉␉{␊ |
1265 | ␉␉␉ret_val = EOB_ACT_END_OF_FILE;␊ |
1266 | ␉␉␉cppExpYYrestart(cppExpYYin );␊ |
1267 | ␉␉␉}␊ |
1268 | ␊ |
1269 | ␉␉else␊ |
1270 | ␉␉␉{␊ |
1271 | ␉␉␉ret_val = EOB_ACT_LAST_MATCH;␊ |
1272 | ␉␉␉YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =␊ |
1273 | ␉␉␉␉YY_BUFFER_EOF_PENDING;␊ |
1274 | ␉␉␉}␊ |
1275 | ␉␉}␊ |
1276 | ␊ |
1277 | ␉else␊ |
1278 | ␉␉ret_val = EOB_ACT_CONTINUE_SCAN;␊ |
1279 | ␊ |
1280 | ␉if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {␊ |
1281 | ␉␉/* Extend the array by 50%, plus the number we really need. */␊ |
1282 | ␉␉yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);␊ |
1283 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cppExpYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );␊ |
1284 | ␉␉if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )␊ |
1285 | ␉␉␉YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );␊ |
1286 | ␉}␊ |
1287 | ␊ |
1288 | ␉(yy_n_chars) += number_to_move;␊ |
1289 | ␉YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;␊ |
1290 | ␉YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;␊ |
1291 | ␊ |
1292 | ␉(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];␊ |
1293 | ␊ |
1294 | ␉return ret_val;␊ |
1295 | }␊ |
1296 | ␊ |
1297 | /* yy_get_previous_state - get the state just before the EOB char was reached */␊ |
1298 | ␊ |
1299 | static yy_state_type yy_get_previous_state (void)␊ |
1300 | {␊ |
1301 | ␉register yy_state_type yy_current_state;␊ |
1302 | ␉register char *yy_cp;␊ |
1303 | ␊ |
1304 | ␉yy_current_state = (yy_start);␊ |
1305 | ␊ |
1306 | ␉for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )␊ |
1307 | ␉␉{␊ |
1308 | ␉␉register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);␊ |
1309 | ␉␉if ( yy_accept[yy_current_state] )␊ |
1310 | ␉␉␉{␊ |
1311 | ␉␉␉(yy_last_accepting_state) = yy_current_state;␊ |
1312 | ␉␉␉(yy_last_accepting_cpos) = yy_cp;␊ |
1313 | ␉␉␉}␊ |
1314 | ␉␉while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )␊ |
1315 | ␉␉␉{␊ |
1316 | ␉␉␉yy_current_state = (int) yy_def[yy_current_state];␊ |
1317 | ␉␉␉if ( yy_current_state >= 77 )␊ |
1318 | ␉␉␉␉yy_c = yy_meta[(unsigned int) yy_c];␊ |
1319 | ␉␉␉}␊ |
1320 | ␉␉yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];␊ |
1321 | ␉␉}␊ |
1322 | ␊ |
1323 | ␉return yy_current_state;␊ |
1324 | }␊ |
1325 | ␊ |
1326 | /* yy_try_NUL_trans - try to make a transition on the NUL character␊ |
1327 | *␊ |
1328 | * synopsis␊ |
1329 | *␉next_state = yy_try_NUL_trans( current_state );␊ |
1330 | */␊ |
1331 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )␊ |
1332 | {␊ |
1333 | ␉register int yy_is_jam;␊ |
1334 | ␉register char *yy_cp = (yy_c_buf_p);␊ |
1335 | ␊ |
1336 | ␉register YY_CHAR yy_c = 1;␊ |
1337 | ␉if ( yy_accept[yy_current_state] )␊ |
1338 | ␉␉{␊ |
1339 | ␉␉(yy_last_accepting_state) = yy_current_state;␊ |
1340 | ␉␉(yy_last_accepting_cpos) = yy_cp;␊ |
1341 | ␉␉}␊ |
1342 | ␉while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )␊ |
1343 | ␉␉{␊ |
1344 | ␉␉yy_current_state = (int) yy_def[yy_current_state];␊ |
1345 | ␉␉if ( yy_current_state >= 77 )␊ |
1346 | ␉␉␉yy_c = yy_meta[(unsigned int) yy_c];␊ |
1347 | ␉␉}␊ |
1348 | ␉yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];␊ |
1349 | ␉yy_is_jam = (yy_current_state == 76);␊ |
1350 | ␊ |
1351 | ␉return yy_is_jam ? 0 : yy_current_state;␊ |
1352 | }␊ |
1353 | ␊ |
1354 | #ifndef YY_NO_INPUT␊ |
1355 | #ifdef __cplusplus␊ |
1356 | static int yyinput (void)␊ |
1357 | #else␊ |
1358 | static int input (void)␊ |
1359 | #endif␊ |
1360 | ␊ |
1361 | {␊ |
1362 | ␉int c;␊ |
1363 | ␊ |
1364 | ␉*(yy_c_buf_p) = (yy_hold_char);␊ |
1365 | ␊ |
1366 | ␉if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )␊ |
1367 | ␉␉{␊ |
1368 | ␉␉/* yy_c_buf_p now points to the character we want to return.␊ |
1369 | ␉␉ * If this occurs *before* the EOB characters, then it's a␊ |
1370 | ␉␉ * valid NUL; if not, then we've hit the end of the buffer.␊ |
1371 | ␉␉ */␊ |
1372 | ␉␉if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )␊ |
1373 | ␉␉␉/* This was really a NUL. */␊ |
1374 | ␉␉␉*(yy_c_buf_p) = '\0';␊ |
1375 | ␊ |
1376 | ␉␉else␊ |
1377 | ␉␉␉{ /* need more input */␊ |
1378 | ␉␉␉yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);␊ |
1379 | ␉␉␉++(yy_c_buf_p);␊ |
1380 | ␊ |
1381 | ␉␉␉switch ( yy_get_next_buffer( ) )␊ |
1382 | ␉␉␉␉{␊ |
1383 | ␉␉␉␉case EOB_ACT_LAST_MATCH:␊ |
1384 | ␉␉␉␉␉/* This happens because yy_g_n_b()␊ |
1385 | ␉␉␉␉␉ * sees that we've accumulated a␊ |
1386 | ␉␉␉␉␉ * token and flags that we need to␊ |
1387 | ␉␉␉␉␉ * try matching the token before␊ |
1388 | ␉␉␉␉␉ * proceeding. But for input(),␊ |
1389 | ␉␉␉␉␉ * there's no matching to consider.␊ |
1390 | ␉␉␉␉␉ * So convert the EOB_ACT_LAST_MATCH␊ |
1391 | ␉␉␉␉␉ * to EOB_ACT_END_OF_FILE.␊ |
1392 | ␉␉␉␉␉ */␊ |
1393 | ␊ |
1394 | ␉␉␉␉␉/* Reset buffer status. */␊ |
1395 | ␉␉␉␉␉cppExpYYrestart(cppExpYYin );␊ |
1396 | ␊ |
1397 | ␉␉␉␉␉/*FALLTHROUGH*/␊ |
1398 | ␊ |
1399 | ␉␉␉␉case EOB_ACT_END_OF_FILE:␊ |
1400 | ␉␉␉␉␉{␊ |
1401 | ␉␉␉␉␉if ( cppExpYYwrap( ) )␊ |
1402 | ␉␉␉␉␉␉return 0;␊ |
1403 | ␊ |
1404 | ␉␉␉␉␉if ( ! (yy_did_buffer_switch_on_eof) )␊ |
1405 | ␉␉␉␉␉␉YY_NEW_FILE;␊ |
1406 | #ifdef __cplusplus␊ |
1407 | ␉␉␉␉␉return yyinput();␊ |
1408 | #else␊ |
1409 | ␉␉␉␉␉return input();␊ |
1410 | #endif␊ |
1411 | ␉␉␉␉␉}␊ |
1412 | ␊ |
1413 | ␉␉␉␉case EOB_ACT_CONTINUE_SCAN:␊ |
1414 | ␉␉␉␉␉(yy_c_buf_p) = (yytext_ptr) + offset;␊ |
1415 | ␉␉␉␉␉break;␊ |
1416 | ␉␉␉␉}␊ |
1417 | ␉␉␉}␊ |
1418 | ␉␉}␊ |
1419 | ␊ |
1420 | ␉c = *(unsigned char *) (yy_c_buf_p);␉/* cast for 8-bit char's */␊ |
1421 | ␉*(yy_c_buf_p) = '\0';␉/* preserve cppExpYYtext */␊ |
1422 | ␉(yy_hold_char) = *++(yy_c_buf_p);␊ |
1423 | ␊ |
1424 | ␉return c;␊ |
1425 | }␊ |
1426 | #endif␉/* ifndef YY_NO_INPUT */␊ |
1427 | ␊ |
1428 | /** Immediately switch to a different input stream.␊ |
1429 | * @param input_file A readable stream.␊ |
1430 | * ␊ |
1431 | * @note This function does not reset the start condition to @c INITIAL .␊ |
1432 | */␊ |
1433 | void cppExpYYrestart (FILE * input_file )␊ |
1434 | {␊ |
1435 | ␊ |
1436 | ␉if ( ! YY_CURRENT_BUFFER ){␊ |
1437 | cppExpYYensure_buffer_stack ();␊ |
1438 | ␉␉YY_CURRENT_BUFFER_LVALUE =␊ |
1439 | cppExpYY_create_buffer(cppExpYYin,YY_BUF_SIZE );␊ |
1440 | ␉}␊ |
1441 | ␊ |
1442 | ␉cppExpYY_init_buffer(YY_CURRENT_BUFFER,input_file );␊ |
1443 | ␉cppExpYY_load_buffer_state( );␊ |
1444 | }␊ |
1445 | ␊ |
1446 | /** Switch to a different input buffer.␊ |
1447 | * @param new_buffer The new input buffer.␊ |
1448 | * ␊ |
1449 | */␊ |
1450 | void cppExpYY_switch_to_buffer (YY_BUFFER_STATE new_buffer )␊ |
1451 | {␊ |
1452 | ␊ |
1453 | ␉/* TODO. We should be able to replace this entire function body␊ |
1454 | ␉ * with␊ |
1455 | ␉ *␉␉cppExpYYpop_buffer_state();␊ |
1456 | ␉ *␉␉cppExpYYpush_buffer_state(new_buffer);␊ |
1457 | */␊ |
1458 | ␉cppExpYYensure_buffer_stack ();␊ |
1459 | ␉if ( YY_CURRENT_BUFFER == new_buffer )␊ |
1460 | ␉␉return;␊ |
1461 | ␊ |
1462 | ␉if ( YY_CURRENT_BUFFER )␊ |
1463 | ␉␉{␊ |
1464 | ␉␉/* Flush out information for old buffer. */␊ |
1465 | ␉␉*(yy_c_buf_p) = (yy_hold_char);␊ |
1466 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);␊ |
1467 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);␊ |
1468 | ␉␉}␊ |
1469 | ␊ |
1470 | ␉YY_CURRENT_BUFFER_LVALUE = new_buffer;␊ |
1471 | ␉cppExpYY_load_buffer_state( );␊ |
1472 | ␊ |
1473 | ␉/* We don't actually know whether we did this switch during␊ |
1474 | ␉ * EOF (cppExpYYwrap()) processing, but the only time this flag␊ |
1475 | ␉ * is looked at is after cppExpYYwrap() is called, so it's safe␊ |
1476 | ␉ * to go ahead and always set it.␊ |
1477 | ␉ */␊ |
1478 | ␉(yy_did_buffer_switch_on_eof) = 1;␊ |
1479 | }␊ |
1480 | ␊ |
1481 | static void cppExpYY_load_buffer_state (void)␊ |
1482 | {␊ |
1483 | ␉(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;␊ |
1484 | ␉(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;␊ |
1485 | ␉cppExpYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;␊ |
1486 | ␉(yy_hold_char) = *(yy_c_buf_p);␊ |
1487 | }␊ |
1488 | ␊ |
1489 | /** Allocate and initialize an input buffer state.␊ |
1490 | * @param file A readable stream.␊ |
1491 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.␊ |
1492 | * ␊ |
1493 | * @return the allocated buffer state.␊ |
1494 | */␊ |
1495 | YY_BUFFER_STATE cppExpYY_create_buffer (FILE * file, int size )␊ |
1496 | {␊ |
1497 | ␉YY_BUFFER_STATE b;␊ |
1498 | ␊ |
1499 | ␉b = (YY_BUFFER_STATE) cppExpYYalloc(sizeof( struct yy_buffer_state ) );␊ |
1500 | ␉if ( ! b )␊ |
1501 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in cppExpYY_create_buffer()" );␊ |
1502 | ␊ |
1503 | ␉b->yy_buf_size = size;␊ |
1504 | ␊ |
1505 | ␉/* yy_ch_buf has to be 2 characters longer than the size given because␊ |
1506 | ␉ * we need to put in 2 end-of-buffer characters.␊ |
1507 | ␉ */␊ |
1508 | ␉b->yy_ch_buf = (char *) cppExpYYalloc(b->yy_buf_size + 2 );␊ |
1509 | ␉if ( ! b->yy_ch_buf )␊ |
1510 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in cppExpYY_create_buffer()" );␊ |
1511 | ␊ |
1512 | ␉b->yy_is_our_buffer = 1;␊ |
1513 | ␊ |
1514 | ␉cppExpYY_init_buffer(b,file );␊ |
1515 | ␊ |
1516 | ␉return b;␊ |
1517 | }␊ |
1518 | ␊ |
1519 | /** Destroy the buffer.␊ |
1520 | * @param b a buffer created with cppExpYY_create_buffer()␊ |
1521 | * ␊ |
1522 | */␊ |
1523 | void cppExpYY_delete_buffer (YY_BUFFER_STATE b )␊ |
1524 | {␊ |
1525 | ␊ |
1526 | ␉if ( ! b )␊ |
1527 | ␉␉return;␊ |
1528 | ␊ |
1529 | ␉if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */␊ |
1530 | ␉␉YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;␊ |
1531 | ␊ |
1532 | ␉if ( b->yy_is_our_buffer )␊ |
1533 | ␉␉cppExpYYfree((void *) b->yy_ch_buf );␊ |
1534 | ␊ |
1535 | ␉cppExpYYfree((void *) b );␊ |
1536 | }␊ |
1537 | ␊ |
1538 | #ifndef __cplusplus␊ |
1539 | extern int isatty (int );␊ |
1540 | #endif /* __cplusplus */␊ |
1541 | ␊ |
1542 | /* Initializes or reinitializes a buffer.␊ |
1543 | * This function is sometimes called more than once on the same buffer,␊ |
1544 | * such as during a cppExpYYrestart() or at EOF.␊ |
1545 | */␊ |
1546 | static void cppExpYY_init_buffer (YY_BUFFER_STATE b, FILE * file )␊ |
1547 | ␊ |
1548 | {␊ |
1549 | ␉int oerrno = errno;␊ |
1550 | ␊ |
1551 | ␉cppExpYY_flush_buffer(b );␊ |
1552 | ␊ |
1553 | ␉b->yy_input_file = file;␊ |
1554 | ␉b->yy_fill_buffer = 1;␊ |
1555 | ␊ |
1556 | /* If b is the current buffer, then cppExpYY_init_buffer was _probably_␊ |
1557 | * called from cppExpYYrestart() or through yy_get_next_buffer.␊ |
1558 | * In that case, we don't want to reset the lineno or column.␊ |
1559 | */␊ |
1560 | if (b != YY_CURRENT_BUFFER){␊ |
1561 | b->yy_bs_lineno = 1;␊ |
1562 | b->yy_bs_column = 0;␊ |
1563 | }␊ |
1564 | ␊ |
1565 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;␊ |
1566 | ␊ |
1567 | ␉errno = oerrno;␊ |
1568 | }␊ |
1569 | ␊ |
1570 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called.␊ |
1571 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.␊ |
1572 | * ␊ |
1573 | */␊ |
1574 | void cppExpYY_flush_buffer (YY_BUFFER_STATE b )␊ |
1575 | {␊ |
1576 | ␉if ( ! b )␊ |
1577 | ␉␉return;␊ |
1578 | ␊ |
1579 | ␉b->yy_n_chars = 0;␊ |
1580 | ␊ |
1581 | ␉/* We always need two end-of-buffer characters. The first causes␊ |
1582 | ␉ * a transition to the end-of-buffer state. The second causes␊ |
1583 | ␉ * a jam in that state.␊ |
1584 | ␉ */␊ |
1585 | ␉b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;␊ |
1586 | ␉b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;␊ |
1587 | ␊ |
1588 | ␉b->yy_buf_pos = &b->yy_ch_buf[0];␊ |
1589 | ␊ |
1590 | ␉b->yy_at_bol = 1;␊ |
1591 | ␉b->yy_buffer_status = YY_BUFFER_NEW;␊ |
1592 | ␊ |
1593 | ␉if ( b == YY_CURRENT_BUFFER )␊ |
1594 | ␉␉cppExpYY_load_buffer_state( );␊ |
1595 | }␊ |
1596 | ␊ |
1597 | /** Pushes the new state onto the stack. The new state becomes␊ |
1598 | * the current state. This function will allocate the stack␊ |
1599 | * if necessary.␊ |
1600 | * @param new_buffer The new state.␊ |
1601 | * ␊ |
1602 | */␊ |
1603 | void cppExpYYpush_buffer_state (YY_BUFFER_STATE new_buffer )␊ |
1604 | {␊ |
1605 | ␉if (new_buffer == NULL)␊ |
1606 | ␉␉return;␊ |
1607 | ␊ |
1608 | ␉cppExpYYensure_buffer_stack();␊ |
1609 | ␊ |
1610 | ␉/* This block is copied from cppExpYY_switch_to_buffer. */␊ |
1611 | ␉if ( YY_CURRENT_BUFFER )␊ |
1612 | ␉␉{␊ |
1613 | ␉␉/* Flush out information for old buffer. */␊ |
1614 | ␉␉*(yy_c_buf_p) = (yy_hold_char);␊ |
1615 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);␊ |
1616 | ␉␉YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);␊ |
1617 | ␉␉}␊ |
1618 | ␊ |
1619 | ␉/* Only push if top exists. Otherwise, replace top. */␊ |
1620 | ␉if (YY_CURRENT_BUFFER)␊ |
1621 | ␉␉(yy_buffer_stack_top)++;␊ |
1622 | ␉YY_CURRENT_BUFFER_LVALUE = new_buffer;␊ |
1623 | ␊ |
1624 | ␉/* copied from cppExpYY_switch_to_buffer. */␊ |
1625 | ␉cppExpYY_load_buffer_state( );␊ |
1626 | ␉(yy_did_buffer_switch_on_eof) = 1;␊ |
1627 | }␊ |
1628 | ␊ |
1629 | /** Removes and deletes the top of the stack, if present.␊ |
1630 | * The next element becomes the new top.␊ |
1631 | * ␊ |
1632 | */␊ |
1633 | void cppExpYYpop_buffer_state (void)␊ |
1634 | {␊ |
1635 | ␉if (!YY_CURRENT_BUFFER)␊ |
1636 | ␉␉return;␊ |
1637 | ␊ |
1638 | ␉cppExpYY_delete_buffer(YY_CURRENT_BUFFER );␊ |
1639 | ␉YY_CURRENT_BUFFER_LVALUE = NULL;␊ |
1640 | ␉if ((yy_buffer_stack_top) > 0)␊ |
1641 | ␉␉--(yy_buffer_stack_top);␊ |
1642 | ␊ |
1643 | ␉if (YY_CURRENT_BUFFER) {␊ |
1644 | ␉␉cppExpYY_load_buffer_state( );␊ |
1645 | ␉␉(yy_did_buffer_switch_on_eof) = 1;␊ |
1646 | ␉}␊ |
1647 | }␊ |
1648 | ␊ |
1649 | /* Allocates the stack if it does not exist.␊ |
1650 | * Guarantees space for at least one push.␊ |
1651 | */␊ |
1652 | static void cppExpYYensure_buffer_stack (void)␊ |
1653 | {␊ |
1654 | ␉yy_size_t num_to_alloc;␊ |
1655 | ␊ |
1656 | ␉if (!(yy_buffer_stack)) {␊ |
1657 | ␊ |
1658 | ␉␉/* First allocation is just for 2 elements, since we don't know if this␊ |
1659 | ␉␉ * scanner will even need a stack. We use 2 instead of 1 to avoid an␊ |
1660 | ␉␉ * immediate realloc on the next call.␊ |
1661 | */␊ |
1662 | ␉␉num_to_alloc = 1;␊ |
1663 | ␉␉(yy_buffer_stack) = (struct yy_buffer_state**)cppExpYYalloc␊ |
1664 | ␉␉␉␉␉␉␉␉(num_to_alloc * sizeof(struct yy_buffer_state*)␊ |
1665 | ␉␉␉␉␉␉␉␉);␊ |
1666 | ␉␉if ( ! (yy_buffer_stack) )␊ |
1667 | ␉␉␉YY_FATAL_ERROR( "out of dynamic memory in cppExpYYensure_buffer_stack()" );␊ |
1668 | ␉␉␉␉␉␉␉␉ ␊ |
1669 | ␉␉memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));␊ |
1670 | ␉␉␉␉␊ |
1671 | ␉␉(yy_buffer_stack_max) = num_to_alloc;␊ |
1672 | ␉␉(yy_buffer_stack_top) = 0;␊ |
1673 | ␉␉return;␊ |
1674 | ␉}␊ |
1675 | ␊ |
1676 | ␉if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){␊ |
1677 | ␊ |
1678 | ␉␉/* Increase the buffer to prepare for a possible push. */␊ |
1679 | ␉␉int grow_size = 8 /* arbitrary grow size */;␊ |
1680 | ␊ |
1681 | ␉␉num_to_alloc = (yy_buffer_stack_max) + grow_size;␊ |
1682 | ␉␉(yy_buffer_stack) = (struct yy_buffer_state**)cppExpYYrealloc␊ |
1683 | ␉␉␉␉␉␉␉␉((yy_buffer_stack),␊ |
1684 | ␉␉␉␉␉␉␉␉num_to_alloc * sizeof(struct yy_buffer_state*)␊ |
1685 | ␉␉␉␉␉␉␉␉);␊ |
1686 | ␉␉if ( ! (yy_buffer_stack) )␊ |
1687 | ␉␉␉YY_FATAL_ERROR( "out of dynamic memory in cppExpYYensure_buffer_stack()" );␊ |
1688 | ␊ |
1689 | ␉␉/* zero only the new slots.*/␊ |
1690 | ␉␉memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));␊ |
1691 | ␉␉(yy_buffer_stack_max) = num_to_alloc;␊ |
1692 | ␉}␊ |
1693 | }␊ |
1694 | ␊ |
1695 | /** Setup the input buffer state to scan directly from a user-specified character buffer.␊ |
1696 | * @param base the character buffer␊ |
1697 | * @param size the size in bytes of the character buffer␊ |
1698 | * ␊ |
1699 | * @return the newly allocated buffer state object. ␊ |
1700 | */␊ |
1701 | YY_BUFFER_STATE cppExpYY_scan_buffer (char * base, yy_size_t size )␊ |
1702 | {␊ |
1703 | ␉YY_BUFFER_STATE b;␊ |
1704 | ␊ |
1705 | ␉if ( size < 2 ||␊ |
1706 | ␉ base[size-2] != YY_END_OF_BUFFER_CHAR ||␊ |
1707 | ␉ base[size-1] != YY_END_OF_BUFFER_CHAR )␊ |
1708 | ␉␉/* They forgot to leave room for the EOB's. */␊ |
1709 | ␉␉return 0;␊ |
1710 | ␊ |
1711 | ␉b = (YY_BUFFER_STATE) cppExpYYalloc(sizeof( struct yy_buffer_state ) );␊ |
1712 | ␉if ( ! b )␊ |
1713 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in cppExpYY_scan_buffer()" );␊ |
1714 | ␊ |
1715 | ␉b->yy_buf_size = size - 2;␉/* "- 2" to take care of EOB's */␊ |
1716 | ␉b->yy_buf_pos = b->yy_ch_buf = base;␊ |
1717 | ␉b->yy_is_our_buffer = 0;␊ |
1718 | ␉b->yy_input_file = 0;␊ |
1719 | ␉b->yy_n_chars = b->yy_buf_size;␊ |
1720 | ␉b->yy_is_interactive = 0;␊ |
1721 | ␉b->yy_at_bol = 1;␊ |
1722 | ␉b->yy_fill_buffer = 0;␊ |
1723 | ␉b->yy_buffer_status = YY_BUFFER_NEW;␊ |
1724 | ␊ |
1725 | ␉cppExpYY_switch_to_buffer(b );␊ |
1726 | ␊ |
1727 | ␉return b;␊ |
1728 | }␊ |
1729 | ␊ |
1730 | /** Setup the input buffer state to scan a string. The next call to cppExpYYlex() will␊ |
1731 | * scan from a @e copy of @a str.␊ |
1732 | * @param yystr a NUL-terminated string to scan␊ |
1733 | * ␊ |
1734 | * @return the newly allocated buffer state object.␊ |
1735 | * @note If you want to scan bytes that may contain NUL values, then use␊ |
1736 | * cppExpYY_scan_bytes() instead.␊ |
1737 | */␊ |
1738 | YY_BUFFER_STATE cppExpYY_scan_string (yyconst char * yystr )␊ |
1739 | {␊ |
1740 | ␊ |
1741 | ␉return cppExpYY_scan_bytes(yystr,strlen(yystr) );␊ |
1742 | }␊ |
1743 | ␊ |
1744 | /** Setup the input buffer state to scan the given bytes. The next call to cppExpYYlex() will␊ |
1745 | * scan from a @e copy of @a bytes.␊ |
1746 | * @param bytes the byte buffer to scan␊ |
1747 | * @param len the number of bytes in the buffer pointed to by @a bytes.␊ |
1748 | * ␊ |
1749 | * @return the newly allocated buffer state object.␊ |
1750 | */␊ |
1751 | YY_BUFFER_STATE cppExpYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )␊ |
1752 | {␊ |
1753 | ␉YY_BUFFER_STATE b;␊ |
1754 | ␉char *buf;␊ |
1755 | ␉yy_size_t n, i;␊ |
1756 | ␊ |
1757 | ␉/* Get memory for full buffer, including space for trailing EOB's. */␊ |
1758 | ␉n = _yybytes_len + 2;␊ |
1759 | ␉buf = (char *) cppExpYYalloc(n );␊ |
1760 | ␉if ( ! buf )␊ |
1761 | ␉␉YY_FATAL_ERROR( "out of dynamic memory in cppExpYY_scan_bytes()" );␊ |
1762 | ␊ |
1763 | ␉for ( i = 0; i < _yybytes_len; ++i )␊ |
1764 | ␉␉buf[i] = yybytes[i];␊ |
1765 | ␊ |
1766 | ␉buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;␊ |
1767 | ␊ |
1768 | ␉b = cppExpYY_scan_buffer(buf,n );␊ |
1769 | ␉if ( ! b )␊ |
1770 | ␉␉YY_FATAL_ERROR( "bad buffer in cppExpYY_scan_bytes()" );␊ |
1771 | ␊ |
1772 | ␉/* It's okay to grow etc. this buffer, and we should throw it␊ |
1773 | ␉ * away when we're done.␊ |
1774 | ␉ */␊ |
1775 | ␉b->yy_is_our_buffer = 1;␊ |
1776 | ␊ |
1777 | ␉return b;␊ |
1778 | }␊ |
1779 | ␊ |
1780 | #ifndef YY_EXIT_FAILURE␊ |
1781 | #define YY_EXIT_FAILURE 2␊ |
1782 | #endif␊ |
1783 | ␊ |
1784 | static void yy_fatal_error (yyconst char* msg )␊ |
1785 | {␊ |
1786 | ␉(void) fprintf( stderr, "%s\n", msg );␊ |
1787 | ␉exit( YY_EXIT_FAILURE );␊ |
1788 | }␊ |
1789 | ␊ |
1790 | /* Redefine yyless() so it works in section 3 code. */␊ |
1791 | ␊ |
1792 | #undef yyless␊ |
1793 | #define yyless(n) \␊ |
1794 | ␉do \␊ |
1795 | ␉␉{ \␊ |
1796 | ␉␉/* Undo effects of setting up cppExpYYtext. */ \␊ |
1797 | int yyless_macro_arg = (n); \␊ |
1798 | YY_LESS_LINENO(yyless_macro_arg);\␊ |
1799 | ␉␉cppExpYYtext[cppExpYYleng] = (yy_hold_char); \␊ |
1800 | ␉␉(yy_c_buf_p) = cppExpYYtext + yyless_macro_arg; \␊ |
1801 | ␉␉(yy_hold_char) = *(yy_c_buf_p); \␊ |
1802 | ␉␉*(yy_c_buf_p) = '\0'; \␊ |
1803 | ␉␉cppExpYYleng = yyless_macro_arg; \␊ |
1804 | ␉␉} \␊ |
1805 | ␉while ( 0 )␊ |
1806 | ␊ |
1807 | /* Accessor methods (get/set functions) to struct members. */␊ |
1808 | ␊ |
1809 | /** Get the current line number.␊ |
1810 | * ␊ |
1811 | */␊ |
1812 | int cppExpYYget_lineno (void)␊ |
1813 | {␊ |
1814 | ␊ |
1815 | return cppExpYYlineno;␊ |
1816 | }␊ |
1817 | ␊ |
1818 | /** Get the input stream.␊ |
1819 | * ␊ |
1820 | */␊ |
1821 | FILE *cppExpYYget_in (void)␊ |
1822 | {␊ |
1823 | return cppExpYYin;␊ |
1824 | }␊ |
1825 | ␊ |
1826 | /** Get the output stream.␊ |
1827 | * ␊ |
1828 | */␊ |
1829 | FILE *cppExpYYget_out (void)␊ |
1830 | {␊ |
1831 | return cppExpYYout;␊ |
1832 | }␊ |
1833 | ␊ |
1834 | /** Get the length of the current token.␊ |
1835 | * ␊ |
1836 | */␊ |
1837 | yy_size_t cppExpYYget_leng (void)␊ |
1838 | {␊ |
1839 | return cppExpYYleng;␊ |
1840 | }␊ |
1841 | ␊ |
1842 | /** Get the current token.␊ |
1843 | * ␊ |
1844 | */␊ |
1845 | ␊ |
1846 | char *cppExpYYget_text (void)␊ |
1847 | {␊ |
1848 | return cppExpYYtext;␊ |
1849 | }␊ |
1850 | ␊ |
1851 | /** Set the current line number.␊ |
1852 | * @param line_number␊ |
1853 | * ␊ |
1854 | */␊ |
1855 | void cppExpYYset_lineno (int line_number )␊ |
1856 | {␊ |
1857 | ␊ |
1858 | cppExpYYlineno = line_number;␊ |
1859 | }␊ |
1860 | ␊ |
1861 | /** Set the input stream. This does not discard the current␊ |
1862 | * input buffer.␊ |
1863 | * @param in_str A readable stream.␊ |
1864 | * ␊ |
1865 | * @see cppExpYY_switch_to_buffer␊ |
1866 | */␊ |
1867 | void cppExpYYset_in (FILE * in_str )␊ |
1868 | {␊ |
1869 | cppExpYYin = in_str ;␊ |
1870 | }␊ |
1871 | ␊ |
1872 | void cppExpYYset_out (FILE * out_str )␊ |
1873 | {␊ |
1874 | cppExpYYout = out_str ;␊ |
1875 | }␊ |
1876 | ␊ |
1877 | int cppExpYYget_debug (void)␊ |
1878 | {␊ |
1879 | return cppExpYY_flex_debug;␊ |
1880 | }␊ |
1881 | ␊ |
1882 | void cppExpYYset_debug (int bdebug )␊ |
1883 | {␊ |
1884 | cppExpYY_flex_debug = bdebug ;␊ |
1885 | }␊ |
1886 | ␊ |
1887 | static int yy_init_globals (void)␊ |
1888 | {␊ |
1889 | /* Initialization is the same as for the non-reentrant scanner.␊ |
1890 | * This function is called from cppExpYYlex_destroy(), so don't allocate here.␊ |
1891 | */␊ |
1892 | ␊ |
1893 | (yy_buffer_stack) = 0;␊ |
1894 | (yy_buffer_stack_top) = 0;␊ |
1895 | (yy_buffer_stack_max) = 0;␊ |
1896 | (yy_c_buf_p) = (char *) 0;␊ |
1897 | (yy_init) = 0;␊ |
1898 | (yy_start) = 0;␊ |
1899 | ␊ |
1900 | /* Defined in main.c */␊ |
1901 | #ifdef YY_STDINIT␊ |
1902 | cppExpYYin = stdin;␊ |
1903 | cppExpYYout = stdout;␊ |
1904 | #else␊ |
1905 | cppExpYYin = (FILE *) 0;␊ |
1906 | cppExpYYout = (FILE *) 0;␊ |
1907 | #endif␊ |
1908 | ␊ |
1909 | /* For future reference: Set errno on error, since we are called by␊ |
1910 | * cppExpYYlex_init()␊ |
1911 | */␊ |
1912 | return 0;␊ |
1913 | }␊ |
1914 | ␊ |
1915 | /* cppExpYYlex_destroy is for both reentrant and non-reentrant scanners. */␊ |
1916 | int cppExpYYlex_destroy (void)␊ |
1917 | {␊ |
1918 | ␊ |
1919 | /* Pop the buffer stack, destroying each element. */␊ |
1920 | ␉while(YY_CURRENT_BUFFER){␊ |
1921 | ␉␉cppExpYY_delete_buffer(YY_CURRENT_BUFFER );␊ |
1922 | ␉␉YY_CURRENT_BUFFER_LVALUE = NULL;␊ |
1923 | ␉␉cppExpYYpop_buffer_state();␊ |
1924 | ␉}␊ |
1925 | ␊ |
1926 | ␉/* Destroy the stack itself. */␊ |
1927 | ␉cppExpYYfree((yy_buffer_stack) );␊ |
1928 | ␉(yy_buffer_stack) = NULL;␊ |
1929 | ␊ |
1930 | /* Reset the globals. This is important in a non-reentrant scanner so the next time␊ |
1931 | * cppExpYYlex() is called, initialization will occur. */␊ |
1932 | yy_init_globals( );␊ |
1933 | ␊ |
1934 | return 0;␊ |
1935 | }␊ |
1936 | ␊ |
1937 | /*␊ |
1938 | * Internal utility routines.␊ |
1939 | */␊ |
1940 | ␊ |
1941 | #ifndef yytext_ptr␊ |
1942 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )␊ |
1943 | {␊ |
1944 | ␉register int i;␊ |
1945 | ␉for ( i = 0; i < n; ++i )␊ |
1946 | ␉␉s1[i] = s2[i];␊ |
1947 | }␊ |
1948 | #endif␊ |
1949 | ␊ |
1950 | #ifdef YY_NEED_STRLEN␊ |
1951 | static int yy_flex_strlen (yyconst char * s )␊ |
1952 | {␊ |
1953 | ␉register int n;␊ |
1954 | ␉for ( n = 0; s[n]; ++n )␊ |
1955 | ␉␉;␊ |
1956 | ␊ |
1957 | ␉return n;␊ |
1958 | }␊ |
1959 | #endif␊ |
1960 | ␊ |
1961 | void *cppExpYYalloc (yy_size_t size )␊ |
1962 | {␊ |
1963 | ␉return (void *) malloc( size );␊ |
1964 | }␊ |
1965 | ␊ |
1966 | void *cppExpYYrealloc (void * ptr, yy_size_t size )␊ |
1967 | {␊ |
1968 | ␉/* The cast to (char *) in the following accommodates both␊ |
1969 | ␉ * implementations that use char* generic pointers, and those␊ |
1970 | ␉ * that use void* generic pointers. It works with the latter␊ |
1971 | ␉ * because both ANSI C and C++ allow castless assignment from␊ |
1972 | ␉ * any pointer type to void*, and deal with argument conversions␊ |
1973 | ␉ * as though doing an assignment.␊ |
1974 | ␉ */␊ |
1975 | ␉return (void *) realloc( (char *) ptr, size );␊ |
1976 | }␊ |
1977 | ␊ |
1978 | void cppExpYYfree (void * ptr )␊ |
1979 | {␊ |
1980 | ␉free( (char *) ptr );␉/* see cppExpYYrealloc() for (char *) cast */␊ |
1981 | }␊ |
1982 | ␊ |
1983 | #define YYTABLES_NAME "yytables"␊ |
1984 | ␊ |
1985 | #line 103 "constexp.l"␊ |
1986 | ␊ |
1987 | ␊ |
1988 | ␊ |
1989 | bool parseCppExpression(const char *fileName,int lineNr,const QCString &s)␊ |
1990 | {␊ |
1991 | //printf("Expression: `%s'\n",s.data());␊ |
1992 | g_constExpFileName = fileName;␊ |
1993 | g_constExpLineNr = lineNr;␊ |
1994 | g_inputString = s;␊ |
1995 | g_inputPosition = 0;␊ |
1996 | cppExpYYrestart( cppExpYYin );␊ |
1997 | cppExpYYparse();␊ |
1998 | //printf("Result: %ld\n",(long)g_resultValue);␊ |
1999 | return (long)g_resultValue!=0;␊ |
2000 | }␊ |
2001 | ␊ |
2002 | extern "C" {␊ |
2003 | int cppExpYYwrap() { return 1; }␊ |
2004 | }␊ |
2005 | ␊ |
2006 |