Debian Codegraph @

CodeLite/CxxLexer.cpp

raw
1
2 #define YY_INT_ALIGNED short int
3
4 /* A lexical scanner generated by flex */
5
6 #define FLEX_SCANNER
7 #define YY_FLEX_MAJOR_VERSION 2
8 #define YY_FLEX_MINOR_VERSION 6
9 #define YY_FLEX_SUBMINOR_VERSION 4
10 #if YY_FLEX_SUBMINOR_VERSION > 0
11 #define FLEX_BETA
12 #endif
13
14 /* First, we deal with platform-specific or compiler-specific issues. */
15
16 /* begin standard C headers. */
17 #include <stdio.h>
18 #include <string.h>
19 #include <errno.h>
20 #include <stdlib.h>
21
22 /* end standard C headers. */
23
24 /* flex integer type definitions */
25
26 #ifndef FLEXINT_H
27 #define FLEXINT_H
28
29 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
30
31 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
32
33 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
34 * if you want the limit (max/min) macros for int types.
35 */
36 #ifndef __STDC_LIMIT_MACROS
37 #define __STDC_LIMIT_MACROS 1
38 #endif
39
40 #include <inttypes.h>
41 typedef int8_t flex_int8_t;
42 typedef uint8_t flex_uint8_t;
43 typedef int16_t flex_int16_t;
44 typedef uint16_t flex_uint16_t;
45 typedef int32_t flex_int32_t;
46 typedef uint32_t flex_uint32_t;
47 #else
48 typedef signed char flex_int8_t;
49 typedef short int flex_int16_t;
50 typedef int flex_int32_t;
51 typedef unsigned char flex_uint8_t;
52 typedef unsigned short int flex_uint16_t;
53 typedef unsigned int flex_uint32_t;
54
55 /* Limits of integral types. */
56 #ifndef INT8_MIN
57 #define INT8_MIN (-128)
58 #endif
59 #ifndef INT16_MIN
60 #define INT16_MIN (-32767-1)
61 #endif
62 #ifndef INT32_MIN
63 #define INT32_MIN (-2147483647-1)
64 #endif
65 #ifndef INT8_MAX
66 #define INT8_MAX (127)
67 #endif
68 #ifndef INT16_MAX
69 #define INT16_MAX (32767)
70 #endif
71 #ifndef INT32_MAX
72 #define INT32_MAX (2147483647)
73 #endif
74 #ifndef UINT8_MAX
75 #define UINT8_MAX (255U)
76 #endif
77 #ifndef UINT16_MAX
78 #define UINT16_MAX (65535U)
79 #endif
80 #ifndef UINT32_MAX
81 #define UINT32_MAX (4294967295U)
82 #endif
83
84 #ifndef SIZE_MAX
85 #define SIZE_MAX (~(size_t)0)
86 #endif
87
88 #endif /* ! C99 */
89
90 #endif /* ! FLEXINT_H */
91
92 /* begin standard C++ headers. */
93
94 /* TODO: this is always defined, so inline it */
95 #define yyconst const
96
97 #if defined(__GNUC__) && __GNUC__ >= 3
98 #define yynoreturn __attribute__((__noreturn__))
99 #else
100 #define yynoreturn
101 #endif
102
103 /* Returned upon end-of-file. */
104 #define YY_NULL 0
105
106 /* Promotes a possibly negative, possibly signed char to an
107 * integer in range [0..255] for use as an array index.
108 */
109 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
110
111 /* An opaque pointer. */
112 #ifndef YY_TYPEDEF_YY_SCANNER_T
113 #define YY_TYPEDEF_YY_SCANNER_T
114 typedef void* yyscan_t;
115 #endif
116
117 /* For convenience, these vars (plus the bison vars far below)
118 are macros in the reentrant scanner. */
119 #define yyin yyg->yyin_r
120 #define yyout yyg->yyout_r
121 #define yyextra yyg->yyextra_r
122 #define yyleng yyg->yyleng_r
123 #define yytext yyg->yytext_r
124 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
125 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
126 #define yy_flex_debug yyg->yy_flex_debug_r
127
128 /* Enter a start condition. This macro really ought to take a parameter,
129 * but we do it the disgusting crufty way forced on us by the ()-less
130 * definition of BEGIN.
131 */
132 #define BEGIN yyg->yy_start = 1 + 2 *
133 /* Translate the current start state into a value that can be later handed
134 * to BEGIN to return to the state. The YYSTATE alias is for lex
135 * compatibility.
136 */
137 #define YY_START ((yyg->yy_start - 1) / 2)
138 #define YYSTATE YY_START
139 /* Action number for EOF rule of a given start state. */
140 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
141 /* Special action meaning "start processing a new file". */
142 #define YY_NEW_FILE yyrestart( yyin , yyscanner )
143 #define YY_END_OF_BUFFER_CHAR 0
144
145 /* Size of default input buffer. */
146 #ifndef YY_BUF_SIZE
147 #ifdef __ia64__
148 /* On IA-64, the buffer size is 16k, not 8k.
149 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
150 * Ditto for the __ia64__ case accordingly.
151 */
152 #define YY_BUF_SIZE 32768
153 #else
154 #define YY_BUF_SIZE 16384
155 #endif /* __ia64__ */
156 #endif
157
158 /* The state buf must be large enough to hold one state per character in the main buffer.
159 */
160 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
161
162 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
163 #define YY_TYPEDEF_YY_BUFFER_STATE
164 typedef struct yy_buffer_state *YY_BUFFER_STATE;
165 #endif
166
167 #ifndef YY_TYPEDEF_YY_SIZE_T
168 #define YY_TYPEDEF_YY_SIZE_T
169 typedef size_t yy_size_t;
170 #endif
171
172 #define EOB_ACT_CONTINUE_SCAN 0
173 #define EOB_ACT_END_OF_FILE 1
174 #define EOB_ACT_LAST_MATCH 2
175
176 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
177 * access to the local variable yy_act. Since yyless() is a macro, it would break
178 * existing scanners that call yyless() from OUTSIDE yylex.
179 * One obvious solution it to make yy_act a global. I tried that, and saw
180 * a 5% performance hit in a non-yylineno scanner, because yy_act is
181 * normally declared as a register variable-- so it is not worth it.
182 */
183 #define YY_LESS_LINENO(n) \
184 do { \
185 int yyl;\
186 for ( yyl = n; yyl < yyleng; ++yyl )\
187 if ( yytext[yyl] == '\n' )\
188 --yylineno;\
189 }while(0)
190 #define YY_LINENO_REWIND_TO(dst) \
191 do {\
192 const char *p;\
193 for ( p = yy_cp-1; p >= (dst); --p)\
194 if ( *p == '\n' )\
195 --yylineno;\
196 }while(0)
197
198 /* Return all but the first "n" matched characters back to the input stream. */
199 #define yyless(n) \
200 do \
201 { \
202 /* Undo effects of setting up yytext. */ \
203 int yyless_macro_arg = (n); \
204 YY_LESS_LINENO(yyless_macro_arg);\
205 *yy_cp = yyg->yy_hold_char; \
206 YY_RESTORE_YY_MORE_OFFSET \
207 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
208 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
209 } \
210 while ( 0 )
211 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
212
213 #ifndef YY_STRUCT_YY_BUFFER_STATE
214 #define YY_STRUCT_YY_BUFFER_STATE
215 struct yy_buffer_state
216 {
217 FILE *yy_input_file;
218
219 char *yy_ch_buf; /* input buffer */
220 char *yy_buf_pos; /* current position in input buffer */
221
222 /* Size of input buffer in bytes, not including room for EOB
223 * characters.
224 */
225 int yy_buf_size;
226
227 /* Number of characters read into yy_ch_buf, not including EOB
228 * characters.
229 */
230 int yy_n_chars;
231
232 /* Whether we "own" the buffer - i.e., we know we created it,
233 * and can realloc() it to grow it, and should free() it to
234 * delete it.
235 */
236 int yy_is_our_buffer;
237
238 /* Whether this is an "interactive" input source; if so, and
239 * if we're using stdio for input, then we want to use getc()
240 * instead of fread(), to make sure we stop fetching input after
241 * each newline.
242 */
243 int yy_is_interactive;
244
245 /* Whether we're considered to be at the beginning of a line.
246 * If so, '^' rules will be active on the next match, otherwise
247 * not.
248 */
249 int yy_at_bol;
250
251 int yy_bs_lineno; /**< The line count. */
252 int yy_bs_column; /**< The column count. */
253
254 /* Whether to try to fill the input buffer when we reach the
255 * end of it.
256 */
257 int yy_fill_buffer;
258
259 int yy_buffer_status;
260
261 #define YY_BUFFER_NEW 0
262 #define YY_BUFFER_NORMAL 1
263 /* When an EOF's been seen but there's still some text to process
264 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
265 * shouldn't try reading from the input source any more. We might
266 * still have a bunch of tokens to match, though, because of
267 * possible backing-up.
268 *
269 * When we actually see the EOF, we change the status to "new"
270 * (via yyrestart()), so that the user can continue scanning by
271 * just pointing yyin at a new input file.
272 */
273 #define YY_BUFFER_EOF_PENDING 2
274
275 };
276 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
277
278 /* We provide macros for accessing buffer states in case in the
279 * future we want to put the buffer states in a more general
280 * "scanner state".
281 *
282 * Returns the top of the stack, or NULL.
283 */
284 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
285 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
286 : NULL)
287 /* Same as previous macro, but useful when we know that the buffer stack is not
288 * NULL or when we need an lvalue. For internal use only.
289 */
290 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
291
292 void yyrestart ( FILE *input_file , yyscan_t yyscanner );
293 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
294 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
295 void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
296 void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
297 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
298 void yypop_buffer_state ( yyscan_t yyscanner );
299
300 static void yyensure_buffer_stack ( yyscan_t yyscanner );
301 static void yy_load_buffer_state ( yyscan_t yyscanner );
302 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
303 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
304
305 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
306 YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
307 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
308
309 void *yyalloc ( yy_size_t , yyscan_t yyscanner );
310 void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
311 void yyfree ( void * , yyscan_t yyscanner );
312
313 #define yy_new_buffer yy_create_buffer
314 #define yy_set_interactive(is_interactive) \
315 { \
316 if ( ! YY_CURRENT_BUFFER ){ \
317 yyensure_buffer_stack (yyscanner); \
318 YY_CURRENT_BUFFER_LVALUE = \
319 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
320 } \
321 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
322 }
323 #define yy_set_bol(at_bol) \
324 { \
325 if ( ! YY_CURRENT_BUFFER ){\
326 yyensure_buffer_stack (yyscanner); \
327 YY_CURRENT_BUFFER_LVALUE = \
328 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
329 } \
330 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
331 }
332 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
333
334 /* Begin user sect3 */
335 typedef flex_uint8_t YY_CHAR;
336
337 typedef int yy_state_type;
338
339 #define yytext_ptr yytext_r
340
341 static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
342 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
343 static int yy_get_next_buffer ( yyscan_t yyscanner );
344 static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
345
346 /* Done after the current pattern has been matched and before the
347 * corresponding action - sets up yytext.
348 */
349 #define YY_DO_BEFORE_ACTION \
350 yyg->yytext_ptr = yy_bp; \
351 yyleng = (int) (yy_cp - yy_bp); \
352 yyg->yy_hold_char = *yy_cp; \
353 *yy_cp = '\0'; \
354 yyg->yy_c_buf_p = yy_cp;
355 #define YY_NUM_RULES 171
356 #define YY_END_OF_BUFFER 172
357 /* This struct is not used in this scanner,
358 but its presence is necessary. */
359 struct yy_trans_info
360 {
361 flex_int32_t yy_verify;
362 flex_int32_t yy_nxt;
363 };
364 static const flex_int16_t yy_accept[701] =
365 { 0,
366 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
367 169, 169, 0, 0, 172, 133, 88, 87, 89, 133,
368 133, 132, 133, 133, 133, 133, 133, 133, 133, 133,
369 92, 91, 133, 133, 133, 133, 131, 131, 131, 133,
370 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
371 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
372 133, 164, 136, 137, 164, 164, 164, 164, 164, 160,
373 159, 154, 152, 163, 163, 164, 163, 163, 163, 163,
374 163, 163, 164, 171, 130, 129, 130, 125, 124, 125,
375 169, 168, 171, 167, 166, 167, 88, 90, 0, 89,
376
377 105, 0, 120, 0, 110, 106, 115, 0, 0, 108,
378 99, 111, 100, 112, 97, 95, 0, 94, 122, 126,
379 109, 94, 92, 0, 0, 92, 92, 0, 91, 91,
380 91, 96, 101, 102, 104, 103, 0, 131, 0, 0,
381 0, 116, 131, 131, 131, 131, 131, 131, 131, 131,
382 131, 131, 131, 131, 25, 131, 131, 131, 131, 131,
383 131, 131, 131, 131, 131, 39, 131, 131, 131, 131,
384 131, 131, 131, 131, 51, 131, 131, 131, 131, 131,
385 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
386 131, 131, 131, 131, 117, 107, 136, 0, 158, 0,
387
388 150, 0, 0, 162, 162, 160, 0, 0, 160, 160,
389 0, 159, 159, 159, 155, 153, 163, 0, 0, 134,
390 0, 163, 163, 163, 163, 140, 163, 163, 163, 163,
391 151, 127, 0, 123, 169, 0, 0, 165, 0, 0,
392 119, 0, 0, 98, 118, 0, 94, 0, 94, 92,
393 93, 91, 113, 114, 0, 121, 131, 3, 5, 131,
394 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
395 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
396 131, 36, 131, 131, 131, 41, 131, 131, 131, 45,
397 131, 47, 131, 131, 131, 131, 131, 131, 131, 131,
398
399 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
400 131, 131, 73, 131, 131, 131, 131, 131, 131, 131,
401 131, 131, 85, 0, 0, 157, 0, 0, 0, 162,
402 0, 162, 160, 161, 159, 135, 163, 163, 163, 163,
403 163, 163, 163, 163, 163, 163, 163, 128, 170, 0,
404 165, 0, 0, 0, 0, 0, 94, 93, 93, 0,
405 131, 131, 6, 131, 131, 9, 131, 11, 131, 13,
406 131, 131, 131, 131, 131, 131, 131, 131, 131, 28,
407 29, 131, 131, 131, 131, 131, 131, 131, 38, 131,
408 42, 131, 131, 131, 131, 131, 131, 131, 131, 131,
409
410 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
411 131, 131, 69, 131, 131, 72, 131, 131, 131, 131,
412 131, 81, 131, 131, 131, 131, 0, 0, 0, 0,
413 0, 162, 161, 161, 163, 144, 143, 163, 163, 163,
414 163, 163, 146, 163, 163, 0, 165, 0, 0, 0,
415 0, 93, 0, 131, 131, 131, 8, 10, 12, 131,
416 131, 16, 17, 18, 131, 131, 131, 131, 131, 131,
417 131, 131, 131, 33, 34, 35, 131, 131, 131, 131,
418 131, 131, 131, 131, 52, 131, 131, 131, 131, 131,
419 131, 131, 60, 131, 131, 131, 131, 131, 131, 131,
420
421 71, 131, 131, 131, 77, 131, 79, 131, 131, 131,
422 84, 131, 0, 0, 0, 0, 161, 163, 145, 149,
423 141, 163, 163, 163, 148, 0, 165, 0, 131, 131,
424 4, 7, 131, 131, 131, 131, 131, 131, 131, 24,
425 26, 131, 131, 31, 32, 37, 40, 131, 131, 131,
426 48, 131, 131, 131, 131, 131, 56, 131, 131, 59,
427 61, 62, 63, 66, 67, 131, 131, 131, 75, 131,
428 131, 131, 131, 131, 86, 138, 142, 163, 147, 0,
429 165, 0, 1, 2, 131, 131, 131, 131, 131, 131,
430 23, 131, 131, 43, 131, 131, 49, 131, 131, 54,
431
432 131, 131, 131, 131, 131, 131, 74, 131, 131, 80,
433 131, 83, 139, 156, 0, 165, 0, 14, 15, 131,
434 131, 21, 22, 131, 30, 131, 46, 50, 53, 131,
435 57, 131, 131, 131, 68, 131, 76, 78, 82, 0,
436 165, 0, 131, 19, 131, 44, 55, 131, 131, 131,
437 131, 0, 165, 0, 20, 131, 131, 131, 131, 131,
438 0, 165, 0, 131, 131, 131, 65, 131, 0, 165,
439 0, 27, 131, 131, 70, 0, 165, 0, 131, 64,
440 0, 165, 0, 131, 0, 165, 0, 131, 0, 165,
441 0, 58, 0, 165, 0, 0, 165, 0, 165, 0
442
443 } ;
444
445 static const YY_CHAR yy_ec[256] =
446 { 0,
447 1, 1, 1, 1, 1, 1, 1, 2, 3, 4,
448 5, 6, 7, 1, 1, 1, 1, 1, 1, 1,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 1, 8, 9, 10, 11, 1, 12, 13, 14, 15,
451 16, 17, 18, 1, 19, 20, 21, 22, 23, 24,
452 25, 26, 26, 27, 26, 28, 28, 29, 1, 30,
453 31, 32, 33, 1, 34, 34, 34, 34, 35, 36,
454 37, 37, 37, 37, 37, 38, 37, 37, 37, 37,
455 37, 39, 37, 37, 40, 37, 37, 41, 37, 37,
456 1, 42, 1, 43, 44, 1, 45, 46, 47, 48,
457
458 49, 50, 51, 52, 53, 37, 54, 55, 56, 57,
459 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
460 68, 69, 1, 70, 1, 1, 1, 1, 1, 1,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1
475 } ;
476
477 static const YY_CHAR yy_meta[71] =
478 { 0,
479 1, 1, 2, 3, 4, 4, 4, 2, 1, 5,
480 1, 1, 1, 6, 7, 4, 1, 1, 1, 1,
481 1, 8, 8, 8, 8, 8, 8, 9, 1, 1,
482 1, 1, 5, 10, 10, 9, 11, 12, 11, 11,
483 11, 13, 1, 11, 14, 14, 10, 10, 10, 8,
484 11, 11, 11, 11, 12, 11, 15, 11, 11, 11,
485 15, 11, 15, 11, 15, 11, 15, 11, 11, 1
486 } ;
487
488 static const flex_int16_t yy_base[758] =
489 { 0,
490 0, 0, 70, 0, 0, 0, 137, 138, 139, 140,
491 142, 145, 143, 147, 1688, 1689, 161, 1689, 178, 1656,
492 148, 1689, 1655, 147, 1643, 1653, 143, 157, 174, 156,
493 183, 231, 1654, 140, 1651, 161, 0, 202, 1671, 1649,
494 158, 172, 182, 146, 162, 191, 1621, 178, 1620, 1613,
495 215, 180, 201, 1627, 215, 223, 169, 190, 230, 1617,
496 230, 1689, 285, 1689, 232, 1661, 1631, 279, 1651, 288,
497 336, 1640, 1639, 0, 275, 290, 1620, 263, 213, 1615,
498 1606, 1609, 1595, 1689, 1689, 1689, 292, 1689, 1689, 1643,
499 314, 1689, 0, 1689, 1689, 1653, 327, 1689, 341, 362,
500
501 1689, 299, 1689, 355, 1689, 1689, 1689, 311, 370, 1689,
502 1689, 1689, 1689, 1689, 1645, 1689, 1641, 416, 1689, 1689,
503 1689, 0, 316, 379, 393, 287, 281, 0, 0, 344,
504 283, 1689, 1629, 1689, 1689, 1689, 1628, 0, 330, 1616,
505 1642, 1689, 1603, 1607, 1598, 1590, 1589, 1593, 1601, 324,
506 1604, 1603, 332, 376, 1583, 1589, 1583, 1580, 291, 1588,
507 1585, 1583, 1579, 1586, 1575, 0, 99, 1580, 1573, 1579,
508 1568, 361, 1578, 1583, 1587, 1581, 372, 1583, 382, 1570,
509 358, 368, 1574, 1570, 337, 368, 1566, 393, 1571, 1562,
510 320, 1570, 1568, 1559, 1689, 1689, 454, 437, 1689, 450,
511
512 1689, 436, 458, 504, 0, 393, 466, 480, 423, 415,
513 0, 0, 455, 458, 1689, 1689, 0, 458, 1577, 1689,
514 1614, 1567, 396, 1568, 1554, 461, 1567, 1556, 1567, 1563,
515 1689, 1689, 1606, 1689, 461, 266, 1599, 1598, 523, 0,
516 1689, 544, 0, 1689, 1689, 554, 1689, 565, 486, 1689,
517 497, 1689, 1689, 1689, 1592, 1689, 1555, 1561, 0, 1546,
518 452, 1548, 1557, 1552, 1553, 1538, 1536, 1538, 449, 1541,
519 1550, 1545, 1547, 1547, 1542, 1534, 284, 1540, 1526, 1542,
520 1541, 0, 1536, 1526, 1528, 0, 1521, 1526, 1521, 0,
521 1499, 1516, 1502, 1495, 1506, 1490, 1477, 1478, 1485, 1483,
522
523 1473, 1463, 1465, 1468, 1472, 1449, 1447, 1447, 1447, 1438,
524 465, 1448, 0, 1447, 1437, 1438, 1425, 1418, 1432, 1431,
525 1425, 1412, 1422, 573, 0, 1689, 580, 0, 601, 1689,
526 586, 580, 1689, 593, 1689, 1689, 1412, 1411, 1403, 1398,
527 1392, 1397, 1392, 1382, 1387, 1384, 1382, 1689, 506, 1412,
528 1411, 627, 660, 618, 697, 639, 642, 480, 496, 1405,
529 1359, 1361, 0, 1350, 1345, 0, 1351, 0, 1349, 532,
530 1330, 1336, 1327, 1333, 1317, 1313, 1313, 1320, 1315, 0,
531 0, 1309, 1300, 1299, 1307, 1295, 1284, 1289, 0, 1288,
532 0, 1295, 1270, 1284, 1281, 1267, 1275, 1257, 1255, 1270,
533
534 1262, 1249, 1239, 1237, 1235, 1227, 1238, 1228, 1232, 1234,
535 1225, 1216, 0, 1225, 1200, 0, 620, 1203, 1206, 1205,
536 1191, 0, 1188, 1181, 1192, 1191, 726, 759, 748, 796,
537 690, 643, 520, 579, 1179, 0, 0, 1180, 1166, 1176,
538 1176, 1157, 0, 1156, 1161, 1200, 1196, 533, 0, 632,
539 0, 1689, 1185, 613, 1137, 1148, 0, 0, 0, 1168,
540 1168, 0, 0, 655, 1134, 1118, 1122, 1127, 1126, 1119,
541 1124, 1103, 1103, 0, 0, 0, 1109, 1107, 1100, 1093,
542 1102, 1087, 1083, 1082, 0, 1087, 1076, 1091, 1085, 1060,
543 1073, 1064, 0, 1070, 1067, 1066, 1049, 1059, 1061, 1057,
544
545 0, 1055, 1050, 1047, 0, 1032, 0, 1043, 1034, 1040,
546 0, 1023, 649, 0, 633, 0, 1689, 1033, 0, 0,
547 0, 1025, 1026, 1028, 0, 1062, 1060, 1049, 1001, 1012,
548 0, 0, 1017, 1015, 1007, 978, 980, 984, 977, 0,
549 0, 992, 985, 0, 0, 0, 0, 982, 985, 970,
550 0, 967, 968, 972, 970, 955, 0, 968, 954, 0,
551 0, 0, 966, 0, 0, 941, 957, 950, 0, 943,
552 936, 929, 925, 902, 0, 914, 0, 898, 0, 932,
553 917, 909, 0, 0, 846, 777, 794, 778, 787, 786,
554 0, 790, 770, 0, 782, 765, 0, 766, 777, 0,
555
556 776, 756, 757, 517, 766, 759, 0, 764, 764, 0,
557 762, 0, 0, 0, 793, 792, 785, 0, 0, 737,
558 737, 0, 0, 750, 0, 747, 0, 0, 0, 744,
559 0, 730, 727, 743, 0, 722, 0, 0, 0, 769,
560 768, 762, 713, 0, 722, 0, 0, 717, 703, 702,
561 716, 751, 750, 744, 0, 696, 694, 707, 692, 709,
562 731, 730, 723, 674, 691, 673, 0, 675, 719, 718,
563 712, 0, 679, 640, 0, 691, 690, 675, 644, 0,
564 666, 662, 641, 593, 629, 628, 621, 558, 591, 575,
565 559, 0, 553, 546, 506, 457, 438, 268, 1689, 1689,
566
567 846, 861, 876, 891, 906, 921, 929, 944, 959, 967,
568 982, 997, 1008, 1019, 1027, 1041, 1052, 1063, 1071, 1085,
569 1093, 1100, 1107, 1119, 1127, 1134, 1141, 1153, 1161, 1173,
570 1181, 1193, 1208, 1223, 1238, 1253, 1268, 1283, 1298, 1313,
571 1328, 1343, 1358, 1373, 1388, 1403, 1418, 1433, 1448, 1463,
572 1478, 1493, 1508, 1523, 1538, 1553, 1568
573 } ;
574
575 static const flex_int16_t yy_def[758] =
576 { 0,
577 700, 1, 700, 3, 701, 701, 702, 702, 703, 703,
578 701, 701, 704, 704, 700, 700, 700, 700, 700, 700,
579 705, 700, 700, 700, 706, 700, 700, 700, 700, 700,
580 700, 700, 700, 700, 700, 700, 707, 707, 707, 700,
581 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
582 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
583 700, 700, 700, 700, 708, 700, 709, 700, 700, 700,
584 700, 700, 700, 710, 710, 700, 710, 710, 710, 710,
585 710, 710, 700, 700, 700, 700, 700, 700, 700, 700,
586 700, 700, 711, 700, 700, 712, 700, 700, 700, 700,
587
588 700, 705, 700, 713, 700, 700, 700, 706, 714, 700,
589 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
590 700, 118, 31, 700, 700, 700, 700, 715, 32, 700,
591 700, 700, 700, 700, 700, 700, 700, 707, 705, 706,
592 716, 700, 707, 707, 707, 707, 707, 707, 707, 707,
593 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
594 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
595 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
596 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
597 707, 707, 707, 707, 700, 700, 700, 708, 700, 717,
598
599 700, 709, 718, 700, 204, 70, 700, 700, 700, 700,
600 719, 71, 700, 700, 700, 700, 710, 708, 709, 700,
601 700, 710, 710, 710, 710, 710, 710, 710, 710, 710,
602 700, 700, 700, 700, 700, 711, 720, 720, 705, 721,
603 700, 706, 722, 700, 700, 700, 700, 700, 723, 700,
604 715, 700, 700, 700, 724, 700, 707, 707, 707, 707,
605 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
606 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
607 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
608 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
609
610 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
611 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
612 707, 707, 707, 708, 725, 700, 709, 726, 700, 700,
613 700, 727, 700, 719, 700, 700, 710, 710, 710, 710,
614 710, 710, 710, 710, 710, 710, 710, 700, 711, 728,
615 728, 705, 705, 706, 706, 700, 729, 700, 700, 730,
616 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
617 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
618 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
619 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
620
621 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
622 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
623 707, 707, 707, 707, 707, 707, 708, 708, 709, 709,
624 700, 731, 700, 700, 710, 710, 710, 710, 710, 710,
625 710, 710, 710, 710, 710, 732, 732, 705, 353, 706,
626 355, 700, 733, 707, 707, 707, 707, 707, 707, 707,
627 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
628 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
629 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
630 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
631
632 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
633 707, 707, 708, 428, 709, 430, 700, 710, 710, 710,
634 710, 710, 710, 710, 710, 734, 734, 735, 707, 707,
635 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
636 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
637 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
638 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
639 707, 707, 707, 707, 707, 710, 710, 710, 710, 736,
640 736, 737, 707, 707, 707, 707, 707, 707, 707, 707,
641 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
642
643 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
644 707, 707, 710, 710, 738, 738, 739, 707, 707, 707,
645 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
646 707, 707, 707, 707, 707, 707, 707, 707, 707, 740,
647 740, 741, 707, 707, 707, 707, 707, 707, 707, 707,
648 707, 742, 742, 743, 707, 707, 707, 707, 707, 707,
649 744, 744, 745, 707, 707, 707, 707, 707, 746, 746,
650 747, 707, 707, 707, 707, 748, 748, 749, 707, 707,
651 750, 750, 751, 707, 752, 752, 753, 707, 754, 754,
652 755, 707, 756, 756, 757, 700, 700, 700, 700, 0,
653
654 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
655 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
656 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
657 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
658 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
659 700, 700, 700, 700, 700, 700, 700
660 } ;
661
662 static const flex_int16_t yy_nxt[1760] =
663 { 0,
664 16, 16, 17, 18, 19, 19, 19, 17, 20, 21,
665 22, 23, 24, 25, 16, 16, 26, 27, 28, 29,
666 30, 31, 32, 32, 32, 32, 32, 32, 33, 34,
667 35, 36, 16, 37, 37, 37, 37, 38, 39, 37,
668 37, 16, 40, 37, 41, 42, 43, 44, 45, 46,
669 47, 37, 48, 37, 49, 50, 51, 52, 53, 37,
670 54, 55, 56, 57, 58, 59, 60, 37, 37, 61,
671 62, 63, 63, 64, 63, 62, 63, 63, 62, 65,
672 62, 62, 66, 67, 62, 62, 62, 62, 62, 68,
673 69, 70, 71, 71, 71, 71, 71, 71, 62, 72,
674
675 62, 73, 62, 74, 74, 74, 74, 75, 74, 74,
676 74, 76, 62, 74, 74, 74, 74, 77, 78, 74,
677 74, 74, 79, 74, 80, 74, 74, 74, 81, 74,
678 74, 74, 74, 82, 74, 74, 74, 74, 74, 83,
679 86, 86, 89, 89, 91, 92, 95, 91, 92, 91,
680 95, 93, 91, 285, 93, 90, 90, 103, 96, 106,
681 111, 286, 96, 97, 98, 99, 99, 99, 97, 133,
682 134, 93, 119, 112, 93, 113, 120, 107, 87, 87,
683 99, 98, 100, 100, 100, 99, 121, 114, 115, 104,
684 116, 136, 137, 117, 154, 118, 118, 118, 118, 118,
685
686 118, 118, 122, 155, 123, 123, 123, 123, 123, 123,
687 124, 139, 143, 156, 144, 140, 157, 125, 158, 145,
688 126, 146, 127, 128, 147, 188, 150, 166, 159, 148,
689 189, 125, 149, 151, 167, 160, 152, 126, 174, 153,
690 175, 199, 190, 161, 176, 162, 127, 191, 163, 128,
691 122, 164, 129, 129, 129, 129, 129, 129, 129, 170,
692 195, 177, 226, 171, 178, 125, 180, 181, 130, 227,
693 131, 184, 172, 200, 185, 349, 192, 182, 173, 125,
694 183, 193, 256, 186, 218, 130, 197, 197, 219, 197,
695 187, 197, 197, 220, 131, 232, 221, 349, 233, 196,
696
697 204, 204, 204, 204, 204, 204, 204, 205, 103, 206,
698 206, 206, 206, 206, 206, 207, 235, 223, 250, 224,
699 252, 235, 208, 225, 241, 209, 250, 210, 211, 97,
700 98, 99, 99, 99, 97, 250, 208, 252, 382, 103,
701 104, 383, 209, 99, 98, 99, 99, 99, 99, 277,
702 250, 210, 109, 278, 211, 205, 700, 212, 212, 212,
703 212, 212, 212, 212, 99, 98, 100, 100, 100, 99,
704 208, 104, 319, 213, 320, 214, 239, 239, 239, 239,
705 239, 239, 700, 252, 208, 264, 265, 268, 269, 310,
706 213, 242, 242, 242, 242, 242, 242, 311, 122, 214,
707
708 124, 124, 124, 124, 124, 124, 124, 252, 304, 291,
709 248, 248, 306, 125, 249, 249, 249, 249, 249, 249,
710 249, 240, 270, 292, 297, 271, 305, 125, 307, 298,
711 272, 312, 300, 700, 301, 313, 243, 118, 118, 118,
712 118, 118, 118, 118, 302, 315, 199, 699, 338, 326,
713 246, 247, 333, 247, 316, 197, 197, 339, 197, 700,
714 197, 197, 333, 235, 246, 247, 699, 199, 235, 333,
715 247, 324, 324, 324, 324, 324, 324, 203, 200, 327,
716 327, 327, 327, 327, 327, 205, 333, 207, 207, 207,
717 207, 207, 207, 207, 335, 335, 364, 331, 331, 200,
718
719 208, 332, 332, 332, 332, 332, 332, 332, 342, 365,
720 373, 374, 335, 414, 208, 349, 325, 343, 335, 452,
721 256, 247, 415, 247, 328, 204, 204, 204, 204, 204,
722 204, 204, 103, 452, 358, 247, 359, 349, 329, 330,
723 247, 330, 103, 452, 352, 352, 352, 352, 352, 352,
724 452, 358, 329, 330, 460, 697, 461, 241, 330, 517,
725 359, 633, 697, 634, 104, 354, 354, 354, 354, 354,
726 354, 356, 356, 256, 104, 357, 357, 357, 357, 357,
727 357, 357, 199, 517, 694, 109, 249, 249, 249, 249,
728 249, 249, 249, 326, 427, 427, 427, 427, 427, 427,
729
730 694, 429, 429, 429, 429, 429, 429, 332, 332, 332,
731 332, 332, 332, 332, 200, 330, 517, 330, 431, 431,
732 692, 203, 432, 432, 432, 432, 432, 432, 432, 330,
733 433, 241, 434, 517, 330, 256, 103, 690, 690, 450,
734 450, 450, 450, 450, 450, 241, 326, 433, 448, 448,
735 448, 448, 448, 448, 688, 256, 434, 529, 199, 109,
736 357, 357, 357, 357, 357, 357, 357, 502, 104, 103,
737 530, 686, 503, 109, 203, 686, 504, 247, 330, 247,
738 330, 449, 449, 449, 449, 449, 449, 449, 684, 256,
739 200, 247, 330, 449, 449, 449, 247, 330, 535, 682,
740
741 682, 104, 680, 536, 449, 449, 449, 449, 449, 449,
742 241, 432, 432, 432, 432, 432, 432, 432, 451, 451,
743 451, 451, 451, 451, 451, 679, 256, 677, 677, 675,
744 451, 451, 451, 674, 673, 199, 672, 256, 109, 670,
745 670, 451, 451, 451, 451, 451, 451, 513, 513, 513,
746 513, 513, 513, 668, 667, 666, 665, 664, 256, 662,
747 662, 326, 660, 659, 658, 657, 656, 200, 199, 515,
748 515, 515, 515, 515, 515, 655, 256, 653, 653, 651,
749 514, 514, 514, 514, 514, 514, 514, 650, 649, 203,
750 648, 647, 514, 514, 514, 646, 645, 644, 643, 256,
751
752 200, 641, 641, 514, 514, 514, 514, 514, 514, 326,
753 639, 638, 637, 636, 635, 632, 631, 516, 516, 516,
754 516, 516, 516, 516, 630, 629, 628, 627, 626, 516,
755 516, 516, 625, 624, 623, 622, 621, 203, 620, 619,
756 516, 516, 516, 516, 516, 516, 84, 84, 84, 84,
757 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
758 84, 85, 85, 85, 85, 85, 85, 85, 85, 85,
759 85, 85, 85, 85, 85, 85, 88, 88, 88, 88,
760 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
761 88, 94, 94, 94, 94, 94, 94, 94, 94, 94,
762
763 94, 94, 94, 94, 94, 94, 102, 102, 618, 102,
764 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
765 102, 108, 108, 256, 108, 108, 616, 108, 108, 108,
766 108, 108, 108, 108, 108, 108, 138, 138, 138, 138,
767 138, 616, 138, 138, 198, 198, 614, 198, 198, 198,
768 198, 198, 198, 198, 198, 198, 198, 198, 198, 202,
769 202, 613, 202, 202, 612, 202, 202, 202, 202, 202,
770 202, 202, 202, 202, 217, 217, 217, 217, 217, 611,
771 217, 217, 236, 610, 609, 236, 236, 236, 236, 236,
772 236, 236, 236, 236, 236, 236, 236, 237, 608, 607,
773
774 606, 237, 237, 605, 237, 237, 237, 237, 237, 604,
775 237, 237, 102, 102, 603, 102, 602, 601, 600, 599,
776 102, 102, 102, 108, 108, 598, 108, 597, 596, 595,
777 594, 108, 108, 108, 251, 251, 251, 593, 592, 591,
778 251, 255, 590, 589, 588, 255, 255, 255, 255, 255,
779 255, 255, 255, 587, 255, 255, 198, 198, 586, 198,
780 585, 584, 583, 256, 198, 198, 198, 202, 202, 581,
781 202, 581, 579, 578, 577, 202, 202, 202, 334, 334,
782 334, 576, 575, 574, 334, 350, 573, 572, 571, 350,
783 350, 570, 350, 350, 350, 350, 350, 569, 350, 350,
784
785 353, 353, 353, 568, 567, 566, 353, 355, 355, 355,
786 565, 564, 563, 355, 249, 249, 562, 561, 249, 360,
787 560, 559, 558, 360, 360, 360, 360, 360, 360, 360,
788 360, 557, 360, 360, 428, 428, 428, 556, 555, 554,
789 428, 430, 430, 430, 553, 552, 551, 430, 332, 332,
790 550, 549, 332, 446, 548, 547, 546, 446, 446, 545,
791 446, 446, 446, 446, 446, 544, 446, 446, 357, 357,
792 543, 542, 357, 453, 541, 540, 539, 453, 453, 453,
793 453, 453, 453, 453, 453, 538, 453, 453, 432, 432,
794 537, 534, 432, 526, 533, 532, 531, 526, 526, 256,
795
796 526, 526, 526, 526, 526, 527, 526, 526, 528, 527,
797 525, 524, 528, 528, 528, 528, 528, 528, 528, 528,
798 523, 528, 528, 580, 522, 521, 520, 580, 580, 519,
799 580, 580, 580, 580, 580, 518, 580, 580, 582, 512,
800 511, 510, 582, 582, 582, 582, 582, 582, 582, 582,
801 509, 582, 582, 615, 508, 507, 506, 615, 615, 505,
802 615, 615, 615, 615, 615, 501, 615, 615, 617, 500,
803 499, 498, 617, 617, 617, 617, 617, 617, 617, 617,
804 497, 617, 617, 640, 496, 495, 494, 640, 640, 493,
805 640, 640, 640, 640, 640, 492, 640, 640, 642, 491,
806
807 490, 489, 642, 642, 642, 642, 642, 642, 642, 642,
808 488, 642, 642, 652, 487, 486, 485, 652, 652, 484,
809 652, 652, 652, 652, 652, 483, 652, 652, 654, 482,
810 481, 480, 654, 654, 654, 654, 654, 654, 654, 654,
811 479, 654, 654, 661, 478, 477, 476, 661, 661, 475,
812 661, 661, 661, 661, 661, 474, 661, 661, 663, 473,
813 472, 471, 663, 663, 663, 663, 663, 663, 663, 663,
814 470, 663, 663, 669, 469, 468, 467, 669, 669, 466,
815 669, 669, 669, 669, 669, 465, 669, 669, 671, 464,
816 463, 462, 671, 671, 671, 671, 671, 671, 671, 671,
817
818 459, 671, 671, 676, 458, 457, 456, 676, 676, 455,
819 676, 676, 676, 676, 676, 454, 676, 676, 678, 256,
820 447, 447, 678, 678, 678, 678, 678, 678, 678, 678,
821 445, 678, 678, 681, 444, 443, 442, 681, 681, 441,
822 681, 681, 681, 681, 681, 440, 681, 681, 683, 439,
823 438, 437, 683, 683, 683, 683, 683, 683, 683, 683,
824 436, 683, 683, 685, 435, 426, 425, 685, 685, 424,
825 685, 685, 685, 685, 685, 423, 685, 685, 687, 422,
826 421, 420, 687, 687, 687, 687, 687, 687, 687, 687,
827 419, 687, 687, 689, 418, 417, 416, 689, 689, 413,
828
829 689, 689, 689, 689, 689, 412, 689, 689, 691, 411,
830 410, 409, 691, 691, 691, 691, 691, 691, 691, 691,
831 408, 691, 691, 693, 407, 406, 405, 693, 693, 404,
832 693, 693, 693, 693, 693, 403, 693, 693, 695, 402,
833 401, 400, 695, 695, 695, 695, 695, 695, 695, 695,
834 399, 695, 695, 696, 398, 397, 396, 696, 696, 395,
835 696, 696, 696, 696, 696, 394, 696, 696, 698, 393,
836 392, 391, 698, 698, 698, 698, 698, 698, 698, 698,
837 390, 698, 698, 389, 388, 387, 386, 385, 384, 381,
838 380, 379, 378, 377, 376, 375, 372, 371, 370, 369,
839
840 368, 367, 366, 363, 362, 361, 256, 351, 351, 348,
841 347, 346, 345, 344, 341, 340, 337, 336, 203, 323,
842 322, 321, 318, 317, 314, 309, 308, 303, 299, 296,
843 295, 294, 293, 290, 289, 288, 287, 284, 283, 282,
844 281, 280, 279, 276, 275, 274, 273, 267, 266, 263,
845 262, 261, 260, 259, 258, 257, 256, 109, 254, 253,
846 245, 244, 238, 234, 231, 230, 229, 228, 222, 216,
847 215, 120, 203, 201, 194, 179, 169, 168, 165, 142,
848 141, 135, 132, 110, 109, 105, 101, 700, 15, 700,
849 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
850
851 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
852 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
853 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
854 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
855 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
856 700, 700, 700, 700, 700, 700, 700, 700, 700
857 } ;
858
859 static const flex_int16_t yy_chk[1760] =
860 { 0,
861 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
862 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
863 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
864 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
865 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
866 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
867 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
868 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
869 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
870 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
871
872 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
873 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
874 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
875 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
876 7, 8, 9, 10, 11, 11, 13, 12, 12, 11,
877 14, 11, 12, 167, 12, 9, 10, 21, 13, 24,
878 27, 167, 14, 17, 17, 17, 17, 17, 17, 34,
879 34, 11, 30, 27, 12, 28, 30, 24, 7, 8,
880 19, 19, 19, 19, 19, 19, 30, 28, 28, 21,
881 29, 36, 36, 29, 44, 29, 29, 29, 29, 29,
882
883 29, 29, 31, 44, 31, 31, 31, 31, 31, 31,
884 31, 38, 41, 44, 41, 38, 45, 31, 45, 41,
885 31, 41, 31, 31, 42, 57, 43, 48, 45, 42,
886 57, 31, 42, 43, 48, 46, 43, 31, 52, 43,
887 52, 65, 58, 46, 52, 46, 31, 58, 46, 31,
888 32, 46, 32, 32, 32, 32, 32, 32, 32, 51,
889 61, 53, 79, 51, 53, 32, 55, 55, 32, 79,
890 32, 56, 51, 65, 56, 236, 59, 55, 51, 32,
891 55, 59, 698, 56, 75, 32, 63, 63, 75, 63,
892 56, 63, 63, 76, 32, 87, 76, 236, 87, 61,
893
894 68, 68, 68, 68, 68, 68, 68, 70, 102, 70,
895 70, 70, 70, 70, 70, 70, 91, 78, 127, 78,
896 131, 91, 70, 78, 108, 70, 126, 70, 70, 97,
897 97, 97, 97, 97, 97, 127, 70, 131, 277, 139,
898 102, 277, 70, 99, 99, 99, 99, 99, 99, 159,
899 126, 70, 108, 159, 70, 71, 123, 71, 71, 71,
900 71, 71, 71, 71, 100, 100, 100, 100, 100, 100,
901 71, 139, 191, 71, 191, 71, 104, 104, 104, 104,
902 104, 104, 123, 130, 71, 150, 150, 153, 153, 185,
903 71, 109, 109, 109, 109, 109, 109, 185, 124, 71,
904
905 124, 124, 124, 124, 124, 124, 124, 130, 181, 172,
906 125, 125, 182, 124, 125, 125, 125, 125, 125, 125,
907 125, 104, 154, 172, 177, 154, 181, 124, 182, 177,
908 154, 186, 179, 206, 179, 186, 109, 118, 118, 118,
909 118, 118, 118, 118, 179, 188, 198, 697, 223, 202,
910 118, 118, 210, 118, 188, 197, 197, 223, 197, 206,
911 197, 197, 209, 235, 118, 118, 696, 218, 235, 210,
912 118, 200, 200, 200, 200, 200, 200, 202, 198, 203,
913 203, 203, 203, 203, 203, 207, 209, 207, 207, 207,
914 207, 207, 207, 207, 213, 214, 261, 208, 208, 218,
915
916 207, 208, 208, 208, 208, 208, 208, 208, 226, 261,
917 269, 269, 214, 311, 207, 349, 200, 226, 213, 358,
918 695, 249, 311, 249, 203, 204, 204, 204, 204, 204,
919 204, 204, 239, 359, 251, 249, 251, 349, 204, 204,
920 249, 204, 448, 358, 239, 239, 239, 239, 239, 239,
921 359, 251, 204, 204, 370, 694, 370, 242, 204, 433,
922 251, 604, 693, 604, 239, 242, 242, 242, 242, 242,
923 242, 246, 246, 691, 448, 246, 246, 246, 246, 246,
924 246, 246, 324, 433, 690, 242, 248, 248, 248, 248,
925 248, 248, 248, 327, 324, 324, 324, 324, 324, 324,
926
927 689, 327, 327, 327, 327, 327, 327, 331, 331, 331,
928 331, 331, 331, 331, 324, 332, 434, 332, 329, 329,
929 688, 327, 329, 329, 329, 329, 329, 329, 329, 332,
930 334, 354, 334, 434, 332, 687, 352, 686, 685, 354,
931 354, 354, 354, 354, 354, 450, 515, 334, 352, 352,
932 352, 352, 352, 352, 684, 683, 334, 454, 513, 354,
933 356, 356, 356, 356, 356, 356, 356, 417, 352, 353,
934 454, 682, 417, 450, 515, 681, 417, 357, 432, 357,
935 432, 353, 353, 353, 353, 353, 353, 353, 679, 678,
936 513, 357, 432, 353, 353, 353, 357, 432, 464, 677,
937
938 676, 353, 674, 464, 353, 353, 353, 353, 353, 353,
939 355, 431, 431, 431, 431, 431, 431, 431, 355, 355,
940 355, 355, 355, 355, 355, 673, 671, 670, 669, 668,
941 355, 355, 355, 666, 665, 427, 664, 663, 355, 662,
942 661, 355, 355, 355, 355, 355, 355, 427, 427, 427,
943 427, 427, 427, 660, 659, 658, 657, 656, 654, 653,
944 652, 429, 651, 650, 649, 648, 645, 427, 428, 429,
945 429, 429, 429, 429, 429, 643, 642, 641, 640, 636,
946 428, 428, 428, 428, 428, 428, 428, 634, 633, 429,
947 632, 630, 428, 428, 428, 626, 624, 621, 620, 617,
948
949 428, 616, 615, 428, 428, 428, 428, 428, 428, 430,
950 611, 609, 608, 606, 605, 603, 602, 430, 430, 430,
951 430, 430, 430, 430, 601, 599, 598, 596, 595, 430,
952 430, 430, 593, 592, 590, 589, 588, 430, 587, 586,
953 430, 430, 430, 430, 430, 430, 701, 701, 701, 701,
954 701, 701, 701, 701, 701, 701, 701, 701, 701, 701,
955 701, 702, 702, 702, 702, 702, 702, 702, 702, 702,
956 702, 702, 702, 702, 702, 702, 703, 703, 703, 703,
957 703, 703, 703, 703, 703, 703, 703, 703, 703, 703,
958 703, 704, 704, 704, 704, 704, 704, 704, 704, 704,
959
960 704, 704, 704, 704, 704, 704, 705, 705, 585, 705,
961 705, 705, 705, 705, 705, 705, 705, 705, 705, 705,
962 705, 706, 706, 582, 706, 706, 581, 706, 706, 706,
963 706, 706, 706, 706, 706, 706, 707, 707, 707, 707,
964 707, 580, 707, 707, 708, 708, 578, 708, 708, 708,
965 708, 708, 708, 708, 708, 708, 708, 708, 708, 709,
966 709, 576, 709, 709, 574, 709, 709, 709, 709, 709,
967 709, 709, 709, 709, 710, 710, 710, 710, 710, 573,
968 710, 710, 711, 572, 571, 711, 711, 711, 711, 711,
969 711, 711, 711, 711, 711, 711, 711, 712, 570, 568,
970
971 567, 712, 712, 566, 712, 712, 712, 712, 712, 563,
972 712, 712, 713, 713, 559, 713, 558, 556, 555, 554,
973 713, 713, 713, 714, 714, 553, 714, 552, 550, 549,
974 548, 714, 714, 714, 715, 715, 715, 543, 542, 539,
975 715, 716, 538, 537, 536, 716, 716, 716, 716, 716,
976 716, 716, 716, 535, 716, 716, 717, 717, 534, 717,
977 533, 530, 529, 528, 717, 717, 717, 718, 718, 527,
978 718, 526, 524, 523, 522, 718, 718, 718, 719, 719,
979 719, 518, 512, 510, 719, 720, 509, 508, 506, 720,
980 720, 504, 720, 720, 720, 720, 720, 503, 720, 720,
981
982 721, 721, 721, 502, 500, 499, 721, 722, 722, 722,
983 498, 497, 496, 722, 723, 723, 495, 494, 723, 724,
984 492, 491, 490, 724, 724, 724, 724, 724, 724, 724,
985 724, 489, 724, 724, 725, 725, 725, 488, 487, 486,
986 725, 726, 726, 726, 484, 483, 482, 726, 727, 727,
987 481, 480, 727, 728, 479, 478, 477, 728, 728, 473,
988 728, 728, 728, 728, 728, 472, 728, 728, 729, 729,
989 471, 470, 729, 730, 469, 468, 467, 730, 730, 730,
990 730, 730, 730, 730, 730, 466, 730, 730, 731, 731,
991 465, 461, 731, 732, 460, 456, 455, 732, 732, 453,
992
993 732, 732, 732, 732, 732, 447, 732, 732, 733, 446,
994 445, 444, 733, 733, 733, 733, 733, 733, 733, 733,
995 442, 733, 733, 734, 441, 440, 439, 734, 734, 438,
996 734, 734, 734, 734, 734, 435, 734, 734, 735, 426,
997 425, 424, 735, 735, 735, 735, 735, 735, 735, 735,
998 423, 735, 735, 736, 421, 420, 419, 736, 736, 418,
999 736, 736, 736, 736, 736, 415, 736, 736, 737, 414,
1000 412, 411, 737, 737, 737, 737, 737, 737, 737, 737,
1001 410, 737, 737, 738, 409, 408, 407, 738, 738, 406,
1002 738, 738, 738, 738, 738, 405, 738, 738, 739, 404,
1003
1004 403, 402, 739, 739, 739, 739, 739, 739, 739, 739,
1005 401, 739, 739, 740, 400, 399, 398, 740, 740, 397,
1006 740, 740, 740, 740, 740, 396, 740, 740, 741, 395,
1007 394, 393, 741, 741, 741, 741, 741, 741, 741, 741,
1008 392, 741, 741, 742, 390, 388, 387, 742, 742, 386,
1009 742, 742, 742, 742, 742, 385, 742, 742, 743, 384,
1010 383, 382, 743, 743, 743, 743, 743, 743, 743, 743,
1011 379, 743, 743, 744, 378, 377, 376, 744, 744, 375,
1012 744, 744, 744, 744, 744, 374, 744, 744, 745, 373,
1013 372, 371, 745, 745, 745, 745, 745, 745, 745, 745,
1014
1015 369, 745, 745, 746, 367, 365, 364, 746, 746, 362,
1016 746, 746, 746, 746, 746, 361, 746, 746, 747, 360,
1017 351, 350, 747, 747, 747, 747, 747, 747, 747, 747,
1018 347, 747, 747, 748, 346, 345, 344, 748, 748, 343,
1019 748, 748, 748, 748, 748, 342, 748, 748, 749, 341,
1020 340, 339, 749, 749, 749, 749, 749, 749, 749, 749,
1021 338, 749, 749, 750, 337, 323, 322, 750, 750, 321,
1022 750, 750, 750, 750, 750, 320, 750, 750, 751, 319,
1023 318, 317, 751, 751, 751, 751, 751, 751, 751, 751,
1024 316, 751, 751, 752, 315, 314, 312, 752, 752, 310,
1025
1026 752, 752, 752, 752, 752, 309, 752, 752, 753, 308,
1027 307, 306, 753, 753, 753, 753, 753, 753, 753, 753,
1028 305, 753, 753, 754, 304, 303, 302, 754, 754, 301,
1029 754, 754, 754, 754, 754, 300, 754, 754, 755, 299,
1030 298, 297, 755, 755, 755, 755, 755, 755, 755, 755,
1031 296, 755, 755, 756, 295, 294, 293, 756, 756, 292,
1032 756, 756, 756, 756, 756, 291, 756, 756, 757, 289,
1033 288, 287, 757, 757, 757, 757, 757, 757, 757, 757,
1034 285, 757, 757, 284, 283, 281, 280, 279, 278, 276,
1035 275, 274, 273, 272, 271, 270, 268, 267, 266, 265,
1036
1037 264, 263, 262, 260, 258, 257, 255, 238, 237, 233,
1038 230, 229, 228, 227, 225, 224, 222, 221, 219, 194,
1039 193, 192, 190, 189, 187, 184, 183, 180, 178, 176,
1040 175, 174, 173, 171, 170, 169, 168, 165, 164, 163,
1041 162, 161, 160, 158, 157, 156, 155, 152, 151, 149,
1042 148, 147, 146, 145, 144, 143, 141, 140, 137, 133,
1043 117, 115, 96, 90, 83, 82, 81, 80, 77, 73,
1044 72, 69, 67, 66, 60, 54, 50, 49, 47, 40,
1045 39, 35, 33, 26, 25, 23, 20, 15, 700, 700,
1046 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
1047
1048 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
1049 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
1050 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
1051 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
1052 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
1053 700, 700, 700, 700, 700, 700, 700, 700, 700
1054 } ;
1055
1056 /* Table of booleans, true if rule could match eol. */
1057 static const flex_int32_t yy_rule_can_match_eol[172] =
1058 { 0,
1059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1061 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1062 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1063 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1064 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1065 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0,
1066 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1067 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, };
1068
1069 /* The intent behind this definition is that it'll catch
1070 * any uses of REJECT which flex missed.
1071 */
1072 #define REJECT reject_used_but_not_detected
1073 #define yymore() yymore_used_but_not_detected
1074 #define YY_MORE_ADJ 0
1075 #define YY_RESTORE_YY_MORE_OFFSET
1076 //
1077 //====================--------------------------------------------------------------
1078 // Eran Ifrah 2014 (c)
1079 //====================--------------------------------------------------------------
1080 //
1081 // To generate a source file from this .l file, you will need
1082 // a flex version 2.5.34 and later
1083 // Under Windows, you will need to run the following command
1084 // from within *MSYS* terminal (or run codelite from an MSYS shell):
1085 // /usr/bin/flex --noline --batch --outfile=CxxLexer.cpp CxxScanner.l
1086 //
1087 //====================--------------------------------------------------------------
1088 //
1089 extern "C" int yywrap(void*) { return 1; }
1090
1091 #include <wx/string.h>
1092 #include <string>
1093 #include <wx/filename.h>
1094 #include "CxxLexerAPI.h"
1095 #include "CxxScannerTokens.h"
1096
1097 #define YY_FATAL_ERROR(x)
1098 #define YYSTYPE char*
1099 #define ECHO
1100 #define P(s)
1101
1102 #define YY_NO_UNISTD_H
1103 #define YY_USER_ACTION yycolumn += yyleng;
1104 #define RETURN_WHITESPACE() \
1105 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; \
1106 if(userData->IsCollectingWhitespace()) { \
1107 return T_WHITESPACE; \
1108 }
1109 #define RETURN_NEWLINE() \
1110 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r; \
1111 if(userData->IsCollectingWhitespace()) { \
1112 return T_NEWLINE; \
1113 }
1114
1115 /* regex and modes */
1116 /* options */
1117
1118 #define INITIAL 0
1119 #define PREPR 1
1120 #define WRAP_PREP 2
1121 #define CPP_COMMENT 3
1122 #define C_COMMENT 4
1123 #define INCLUDE 5
1124 #define RAW_STRING 6
1125
1126 #ifndef YY_NO_UNISTD_H
1127 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1128 * down here because we want the user's section 1 to have been scanned first.
1129 * The user has a chance to override it with an option.
1130 */
1131 #include <unistd.h>
1132 #endif
1133
1134 #ifndef YY_EXTRA_TYPE
1135 #define YY_EXTRA_TYPE void *
1136 #endif
1137
1138 /* Holds the entire state of the reentrant scanner. */
1139 struct yyguts_t
1140 {
1141
1142 /* User-defined. Not touched by flex. */
1143 YY_EXTRA_TYPE yyextra_r;
1144
1145 /* The rest are the same as the globals declared in the non-reentrant scanner. */
1146 FILE *yyin_r, *yyout_r;
1147 size_t yy_buffer_stack_top; /**< index of top of stack. */
1148 size_t yy_buffer_stack_max; /**< capacity of stack. */
1149 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1150 char yy_hold_char;
1151 int yy_n_chars;
1152 int yyleng_r;
1153 char *yy_c_buf_p;
1154 int yy_init;
1155 int yy_start;
1156 int yy_did_buffer_switch_on_eof;
1157 int yy_start_stack_ptr;
1158 int yy_start_stack_depth;
1159 int *yy_start_stack;
1160 yy_state_type yy_last_accepting_state;
1161 char* yy_last_accepting_cpos;
1162
1163 int yylineno_r;
1164 int yy_flex_debug_r;
1165
1166 char *yytext_r;
1167 int yy_more_flag;
1168 int yy_more_len;
1169
1170 }; /* end struct yyguts_t */
1171
1172 static int yy_init_globals ( yyscan_t yyscanner );
1173
1174 int yylex_init (yyscan_t* scanner);
1175
1176 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
1177
1178 /* Accessor methods to globals.
1179 These are made visible to non-reentrant scanners for convenience. */
1180
1181 int yylex_destroy ( yyscan_t yyscanner );
1182
1183 int yyget_debug ( yyscan_t yyscanner );
1184
1185 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
1186
1187 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
1188
1189 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
1190
1191 FILE *yyget_in ( yyscan_t yyscanner );
1192
1193 void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
1194
1195 FILE *yyget_out ( yyscan_t yyscanner );
1196
1197 void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
1198
1199 int yyget_leng ( yyscan_t yyscanner );
1200
1201 char *yyget_text ( yyscan_t yyscanner );
1202
1203 int yyget_lineno ( yyscan_t yyscanner );
1204
1205 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
1206
1207 int yyget_column ( yyscan_t yyscanner );
1208
1209 void yyset_column ( int _column_no , yyscan_t yyscanner );
1210
1211 /* Macros after this point can all be overridden by user definitions in
1212 * section 1.
1213 */
1214
1215 #ifndef YY_SKIP_YYWRAP
1216 #ifdef __cplusplus
1217 extern "C" int yywrap ( yyscan_t yyscanner );
1218 #else
1219 extern int yywrap ( yyscan_t yyscanner );
1220 #endif
1221 #endif
1222
1223 #ifndef YY_NO_UNPUT
1224
1225 static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner);
1226
1227 #endif
1228
1229 #ifndef yytext_ptr
1230 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
1231 #endif
1232
1233 #ifdef YY_NEED_STRLEN
1234 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
1235 #endif
1236
1237 #ifndef YY_NO_INPUT
1238 #ifdef __cplusplus
1239 static int yyinput ( yyscan_t yyscanner );
1240 #else
1241 static int input ( yyscan_t yyscanner );
1242 #endif
1243
1244 #endif
1245
1246 /* Amount of stuff to slurp up with each read. */
1247 #ifndef YY_READ_BUF_SIZE
1248 #ifdef __ia64__
1249 /* On IA-64, the buffer size is 16k, not 8k */
1250 #define YY_READ_BUF_SIZE 16384
1251 #else
1252 #define YY_READ_BUF_SIZE 8192
1253 #endif /* __ia64__ */
1254 #endif
1255
1256 /* Copy whatever the last rule matched to the standard output. */
1257 #ifndef ECHO
1258 /* This used to be an fputs(), but since the string might contain NUL's,
1259 * we now use fwrite().
1260 */
1261 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1262 #endif
1263
1264 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1265 * is returned in "result".
1266 */
1267 #ifndef YY_INPUT
1268 #define YY_INPUT(buf,result,max_size) \
1269 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1270 { \
1271 int c = '*'; \
1272 int n; \
1273 for ( n = 0; n < max_size && \
1274 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1275 buf[n] = (char) c; \
1276 if ( c == '\n' ) \
1277 buf[n++] = (char) c; \
1278 if ( c == EOF && ferror( yyin ) ) \
1279 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1280 result = n; \
1281 } \
1282 else \
1283 { \
1284 errno=0; \
1285 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1286 { \
1287 if( errno != EINTR) \
1288 { \
1289 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1290 break; \
1291 } \
1292 errno=0; \
1293 clearerr(yyin); \
1294 } \
1295 }\
1296 \
1297
1298 #endif
1299
1300 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1301 * we don't want an extra ';' after the "return" because that will cause
1302 * some compilers to complain about unreachable statements.
1303 */
1304 #ifndef yyterminate
1305 #define yyterminate() return YY_NULL
1306 #endif
1307
1308 /* Number of entries by which start-condition stack grows. */
1309 #ifndef YY_START_STACK_INCR
1310 #define YY_START_STACK_INCR 25
1311 #endif
1312
1313 /* Report a fatal error. */
1314 #ifndef YY_FATAL_ERROR
1315 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1316 #endif
1317
1318 /* end tables serialization structures and prototypes */
1319
1320 /* Default declaration of generated scanner - a define so the user can
1321 * easily add parameters.
1322 */
1323 #ifndef YY_DECL
1324 #define YY_DECL_IS_OURS 1
1325
1326 extern int yylex (yyscan_t yyscanner);
1327
1328 #define YY_DECL int yylex (yyscan_t yyscanner)
1329 #endif /* !YY_DECL */
1330
1331 /* Code executed at the beginning of each rule, after yytext and yyleng
1332 * have been set up.
1333 */
1334 #ifndef YY_USER_ACTION
1335 #define YY_USER_ACTION
1336 #endif
1337
1338 /* Code executed at the end of each rule. */
1339 #ifndef YY_BREAK
1340 #define YY_BREAK /*LINTED*/break;
1341 #endif
1342
1343 #define YY_RULE_SETUP \
1344 YY_USER_ACTION
1345
1346 /** The main scanner function which does all the work.
1347 */
1348 YY_DECL
1349 {
1350 yy_state_type yy_current_state;
1351 char *yy_cp, *yy_bp;
1352 int yy_act;
1353 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1354
1355 if ( !yyg->yy_init )
1356 {
1357 yyg->yy_init = 1;
1358
1359 #ifdef YY_USER_INIT
1360 YY_USER_INIT;
1361 #endif
1362
1363 if ( ! yyg->yy_start )
1364 yyg->yy_start = 1; /* first start state */
1365
1366 if ( ! yyin )
1367 yyin = stdin;
1368
1369 if ( ! yyout )
1370 yyout = stdout;
1371
1372 if ( ! YY_CURRENT_BUFFER ) {
1373 yyensure_buffer_stack (yyscanner);
1374 YY_CURRENT_BUFFER_LVALUE =
1375 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1376 }
1377
1378 yy_load_buffer_state( yyscanner );
1379 }
1380
1381 {
1382
1383 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1384 {
1385 yy_cp = yyg->yy_c_buf_p;
1386
1387 /* Support of yytext. */
1388 *yy_cp = yyg->yy_hold_char;
1389
1390 /* yy_bp points to the position in yy_ch_buf of the start of
1391 * the current run.
1392 */
1393 yy_bp = yy_cp;
1394
1395 yy_current_state = yyg->yy_start;
1396 yy_match:
1397 do
1398 {
1399 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1400 if ( yy_accept[yy_current_state] )
1401 {
1402 yyg->yy_last_accepting_state = yy_current_state;
1403 yyg->yy_last_accepting_cpos = yy_cp;
1404 }
1405 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1406 {
1407 yy_current_state = (int) yy_def[yy_current_state];
1408 if ( yy_current_state >= 701 )
1409 yy_c = yy_meta[yy_c];
1410 }
1411 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1412 ++yy_cp;
1413 }
1414 while ( yy_current_state != 700 );
1415 yy_cp = yyg->yy_last_accepting_cpos;
1416 yy_current_state = yyg->yy_last_accepting_state;
1417
1418 yy_find_action:
1419 yy_act = yy_accept[yy_current_state];
1420
1421 YY_DO_BEFORE_ACTION;
1422
1423 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1424 {
1425 int yyl;
1426 for ( yyl = 0; yyl < yyleng; ++yyl )
1427 if ( yytext[yyl] == '\n' )
1428
1429 do{ yylineno++;
1430 yycolumn=0;
1431 }while(0)
1432 ;
1433 }
1434
1435 do_action: /* This label is used only to access EOF actions. */
1436
1437 switch ( yy_act )
1438 { /* beginning of action switch */
1439 case 0: /* must back up */
1440 /* undo the effects of YY_DO_BEFORE_ACTION */
1441 *yy_cp = yyg->yy_hold_char;
1442 yy_cp = yyg->yy_last_accepting_cpos;
1443 yy_current_state = yyg->yy_last_accepting_state;
1444 goto yy_find_action;
1445
1446 case YY_STATE_EOF(INITIAL):
1447 case YY_STATE_EOF(PREPR):
1448 case YY_STATE_EOF(WRAP_PREP):
1449 case YY_STATE_EOF(CPP_COMMENT):
1450 case YY_STATE_EOF(C_COMMENT):
1451 case YY_STATE_EOF(INCLUDE):
1452 case YY_STATE_EOF(RAW_STRING):
1453 {yyterminate();}
1454 YY_BREAK
1455 case 1:
1456 YY_RULE_SETUP
1457 { return T_ALIGNAS; }
1458 YY_BREAK
1459 case 2:
1460 YY_RULE_SETUP
1461 { return T_ALIGNOF; }
1462 YY_BREAK
1463 case 3:
1464 YY_RULE_SETUP
1465 { return T_AND; }
1466 YY_BREAK
1467 case 4:
1468 YY_RULE_SETUP
1469 { return T_AND_EQ; }
1470 YY_BREAK
1471 case 5:
1472 YY_RULE_SETUP
1473 { return T_ASM; }
1474 YY_BREAK
1475 case 6:
1476 YY_RULE_SETUP
1477 { return T_AUTO; }
1478 YY_BREAK
1479 case 7:
1480 YY_RULE_SETUP
1481 { return T_BITAND; }
1482 YY_BREAK
1483 case 8:
1484 YY_RULE_SETUP
1485 { return T_BITOR; }
1486 YY_BREAK
1487 case 9:
1488 YY_RULE_SETUP
1489 { return T_BOOL; }
1490 YY_BREAK
1491 case 10:
1492 YY_RULE_SETUP
1493 { return T_BREAK; }
1494 YY_BREAK
1495 case 11:
1496 YY_RULE_SETUP
1497 { return T_CASE; }
1498 YY_BREAK
1499 case 12:
1500 YY_RULE_SETUP
1501 { return T_CATCH;}
1502 YY_BREAK
1503 case 13:
1504 YY_RULE_SETUP
1505 { return T_CHAR;}
1506 YY_BREAK
1507 case 14:
1508 YY_RULE_SETUP
1509 { return T_CHAR16_T;}
1510 YY_BREAK
1511 case 15:
1512 YY_RULE_SETUP
1513 { return T_CHAR32_T;}
1514 YY_BREAK
1515 case 16:
1516 YY_RULE_SETUP
1517 { return T_CLASS;}
1518 YY_BREAK
1519 case 17:
1520 YY_RULE_SETUP
1521 { return T_COMPL;}
1522 YY_BREAK
1523 case 18:
1524 YY_RULE_SETUP
1525 { return T_CONST;}
1526 YY_BREAK
1527 case 19:
1528 YY_RULE_SETUP
1529 { return T_CONSTEXPR;}
1530 YY_BREAK
1531 case 20:
1532 YY_RULE_SETUP
1533 { return T_CONST_CAST;}
1534 YY_BREAK
1535 case 21:
1536 YY_RULE_SETUP
1537 { return T_CONTINUE;}
1538 YY_BREAK
1539 case 22:
1540 YY_RULE_SETUP
1541 { return T_DECLTYPE;}
1542 YY_BREAK
1543 case 23:
1544 YY_RULE_SETUP
1545 { return T_DEFAULT;}
1546 YY_BREAK
1547 case 24:
1548 YY_RULE_SETUP
1549 { return T_DELETE;}
1550 YY_BREAK
1551 case 25:
1552 YY_RULE_SETUP
1553 { return T_DO;}
1554 YY_BREAK
1555 case 26:
1556 YY_RULE_SETUP
1557 { return T_DOUBLE;}
1558 YY_BREAK
1559 case 27:
1560 YY_RULE_SETUP
1561 { return T_DYNAMIC_CAST;}
1562 YY_BREAK
1563 case 28:
1564 YY_RULE_SETUP
1565 { return T_ELSE;}
1566 YY_BREAK
1567 case 29:
1568 YY_RULE_SETUP
1569 { return T_ENUM;}
1570 YY_BREAK
1571 case 30:
1572 YY_RULE_SETUP
1573 { return T_EXPLICIT;}
1574 YY_BREAK
1575 case 31:
1576 YY_RULE_SETUP
1577 { return T_EXPORT;}
1578 YY_BREAK
1579 case 32:
1580 YY_RULE_SETUP
1581 { return T_EXTERN;}
1582 YY_BREAK
1583 case 33:
1584 YY_RULE_SETUP
1585 { return T_FALSE;}
1586 YY_BREAK
1587 case 34:
1588 YY_RULE_SETUP
1589 { return T_FINAL;}
1590 YY_BREAK
1591 case 35:
1592 YY_RULE_SETUP
1593 { return T_FLOAT;}
1594 YY_BREAK
1595 case 36:
1596 YY_RULE_SETUP
1597 { return T_FOR;}
1598 YY_BREAK
1599 case 37:
1600 YY_RULE_SETUP
1601 { return T_FRIEND;}
1602 YY_BREAK
1603 case 38:
1604 YY_RULE_SETUP
1605 { return T_GOTO;}
1606 YY_BREAK
1607 case 39:
1608 YY_RULE_SETUP
1609 { return T_IF;}
1610 YY_BREAK
1611 case 40:
1612 YY_RULE_SETUP
1613 { return T_INLINE;}
1614 YY_BREAK
1615 case 41:
1616 YY_RULE_SETUP
1617 { return T_INT;}
1618 YY_BREAK
1619 case 42:
1620 YY_RULE_SETUP
1621 { return T_LONG;}
1622 YY_BREAK
1623 case 43:
1624 YY_RULE_SETUP
1625 { return T_MUTABLE;}
1626 YY_BREAK
1627 case 44:
1628 YY_RULE_SETUP
1629 { return T_NAMESPACE;}
1630 YY_BREAK
1631 case 45:
1632 YY_RULE_SETUP
1633 { return T_NEW;}
1634 YY_BREAK
1635 case 46:
1636 YY_RULE_SETUP
1637 { return T_NOEXCEPT;}
1638 YY_BREAK
1639 case 47:
1640 YY_RULE_SETUP
1641 { return T_NOT;}
1642 YY_BREAK
1643 case 48:
1644 YY_RULE_SETUP
1645 { return T_NOT_EQ;}
1646 YY_BREAK
1647 case 49:
1648 YY_RULE_SETUP
1649 { return T_NULLPTR;}
1650 YY_BREAK
1651 case 50:
1652 YY_RULE_SETUP
1653 { return T_OPERATOR;}
1654 YY_BREAK
1655 case 51:
1656 YY_RULE_SETUP
1657 { return T_OR;}
1658 YY_BREAK
1659 case 52:
1660 YY_RULE_SETUP
1661 { return T_OR_EQ;}
1662 YY_BREAK
1663 case 53:
1664 YY_RULE_SETUP
1665 { return T_OVERRIDE;}
1666 YY_BREAK
1667 case 54:
1668 YY_RULE_SETUP
1669 { return T_PRIVATE;}
1670 YY_BREAK
1671 case 55:
1672 YY_RULE_SETUP
1673 { return T_PROTECTED;}
1674 YY_BREAK
1675 case 56:
1676 YY_RULE_SETUP
1677 { return T_PUBLIC;}
1678 YY_BREAK
1679 case 57:
1680 YY_RULE_SETUP
1681 { return T_REGISTER;}
1682 YY_BREAK
1683 case 58:
1684 YY_RULE_SETUP
1685 { return T_REINTERPRET_CAST;}
1686 YY_BREAK
1687 case 59:
1688 YY_RULE_SETUP
1689 { return T_RETURN;}
1690 YY_BREAK
1691 case 60:
1692 YY_RULE_SETUP
1693 { return T_SHORT;}
1694 YY_BREAK
1695 case 61:
1696 YY_RULE_SETUP
1697 { return T_SIGNED;}
1698 YY_BREAK
1699 case 62:
1700 YY_RULE_SETUP
1701 { return T_SIZEOF;}
1702 YY_BREAK
1703 case 63:
1704 YY_RULE_SETUP
1705 { return T_STATIC;}
1706 YY_BREAK
1707 case 64:
1708 YY_RULE_SETUP
1709 { return T_STATIC_ASSERT;}
1710 YY_BREAK
1711 case 65:
1712 YY_RULE_SETUP
1713 { return T_STATIC_CAST;}
1714 YY_BREAK
1715 case 66:
1716 YY_RULE_SETUP
1717 { return T_STRUCT;}
1718 YY_BREAK
1719 case 67:
1720 YY_RULE_SETUP
1721 { return T_SWITCH;}
1722 YY_BREAK
1723 case 68:
1724 YY_RULE_SETUP
1725 { return T_TEMPLATE;}
1726 YY_BREAK
1727 case 69:
1728 YY_RULE_SETUP
1729 { return T_THIS;}
1730 YY_BREAK
1731 case 70:
1732 YY_RULE_SETUP
1733 { return T_THREAD_LOCAL;}
1734 YY_BREAK
1735 case 71:
1736 YY_RULE_SETUP
1737 { return T_THROW;}
1738 YY_BREAK
1739 case 72:
1740 YY_RULE_SETUP
1741 { return T_TRUE;}
1742 YY_BREAK
1743 case 73:
1744 YY_RULE_SETUP
1745 { return T_TRY;}
1746 YY_BREAK
1747 case 74:
1748 YY_RULE_SETUP
1749 { return T_TYPEDEF;}
1750 YY_BREAK
1751 case 75:
1752 YY_RULE_SETUP
1753 { return T_TYPEID;}
1754 YY_BREAK
1755 case 76:
1756 YY_RULE_SETUP
1757 { return T_TYPENAME;}
1758 YY_BREAK
1759 case 77:
1760 YY_RULE_SETUP
1761 { return T_UNION;}
1762 YY_BREAK
1763 case 78:
1764 YY_RULE_SETUP
1765 { return T_UNSIGNED;}
1766 YY_BREAK
1767 case 79:
1768 YY_RULE_SETUP
1769 { return T_USING;}
1770 YY_BREAK
1771 case 80:
1772 YY_RULE_SETUP
1773 { return T_VIRTUAL;}
1774 YY_BREAK
1775 case 81:
1776 YY_RULE_SETUP
1777 { return T_VOID;}
1778 YY_BREAK
1779 case 82:
1780 YY_RULE_SETUP
1781 { return T_VOLATILE;}
1782 YY_BREAK
1783 case 83:
1784 YY_RULE_SETUP
1785 { return T_WCHAR_T;}
1786 YY_BREAK
1787 case 84:
1788 YY_RULE_SETUP
1789 { return T_WHILE;}
1790 YY_BREAK
1791 case 85:
1792 YY_RULE_SETUP
1793 { return T_XOR;}
1794 YY_BREAK
1795 case 86:
1796 YY_RULE_SETUP
1797 { return T_XOR_EQ;}
1798 YY_BREAK
1799 case 87:
1800 /* rule 87 can match eol */
1801 YY_RULE_SETUP
1802 {}
1803 YY_BREAK
1804 case 88:
1805 YY_RULE_SETUP
1806 { RETURN_WHITESPACE(); }
1807 YY_BREAK
1808 case 89:
1809 YY_RULE_SETUP
1810 {RETURN_WHITESPACE();}
1811 YY_BREAK
1812 case 90:
1813 /* rule 90 can match eol */
1814 YY_RULE_SETUP
1815 { RETURN_NEWLINE(); }
1816 YY_BREAK
1817 case 91:
1818 YY_RULE_SETUP
1819 { return T_DEC_NUMBER;}
1820 YY_BREAK
1821 case 92:
1822 YY_RULE_SETUP
1823 { return T_OCTAL_NUMBER;}
1824 YY_BREAK
1825 case 93:
1826 YY_RULE_SETUP
1827 { return T_HEX_NUMBER; }
1828 YY_BREAK
1829 case 94:
1830 YY_RULE_SETUP
1831 { return T_FLOAT_NUMBER;}
1832 YY_BREAK
1833 case 95:
1834 YY_RULE_SETUP
1835 { return T_DOT_STAR; }
1836 YY_BREAK
1837 case 96:
1838 YY_RULE_SETUP
1839 { return T_DOUBLE_COLONS; }
1840 YY_BREAK
1841 case 97:
1842 YY_RULE_SETUP
1843 { return T_ARROW; }
1844 YY_BREAK
1845 case 98:
1846 YY_RULE_SETUP
1847 { return T_ARROW_STAR; }
1848 YY_BREAK
1849 case 99:
1850 YY_RULE_SETUP
1851 { return T_PLUS_PLUS; }
1852 YY_BREAK
1853 case 100:
1854 YY_RULE_SETUP
1855 { return T_MINUS_MINUS; }
1856 YY_BREAK
1857 case 101:
1858 YY_RULE_SETUP
1859 { return T_LS; }
1860 YY_BREAK
1861 case 102:
1862 YY_RULE_SETUP
1863 { return T_LE; }
1864 YY_BREAK
1865 case 103:
1866 YY_RULE_SETUP
1867 { return T_GE; }
1868 YY_BREAK
1869 case 104:
1870 YY_RULE_SETUP
1871 { return T_EQUAL; }
1872 YY_BREAK
1873 case 105:
1874 YY_RULE_SETUP
1875 { return T_NOT_EQUAL; }
1876 YY_BREAK
1877 case 106:
1878 YY_RULE_SETUP
1879 { return T_AND_AND;}
1880 YY_BREAK
1881 case 107:
1882 YY_RULE_SETUP
1883 { return T_OR_OR;}
1884 YY_BREAK
1885 case 108:
1886 YY_RULE_SETUP
1887 { return T_STAR_EQUAL;}
1888 YY_BREAK
1889 case 109:
1890 YY_RULE_SETUP
1891 { return T_SLASH_EQUAL;}
1892 YY_BREAK
1893 case 110:
1894 YY_RULE_SETUP
1895 { return T_DIV_EQUAL;}
1896 YY_BREAK
1897 case 111:
1898 YY_RULE_SETUP
1899 { return T_PLUS_EQUAL;}
1900 YY_BREAK
1901 case 112:
1902 YY_RULE_SETUP
1903 { return T_MINUS_EQUAL;}
1904 YY_BREAK
1905 case 113:
1906 YY_RULE_SETUP
1907 { return T_LS_ASSIGN;}
1908 YY_BREAK
1909 case 114:
1910 YY_RULE_SETUP
1911 { return T_RS_ASSIGN;}
1912 YY_BREAK
1913 case 115:
1914 YY_RULE_SETUP
1915 { return T_AND_EQUAL;}
1916 YY_BREAK
1917 case 116:
1918 YY_RULE_SETUP
1919 { return T_POW_EQUAL;}
1920 YY_BREAK
1921 case 117:
1922 YY_RULE_SETUP
1923 { return T_OR_EQUAL;}
1924 YY_BREAK
1925 case 118:
1926 YY_RULE_SETUP
1927 { return T_3_DOTS;}
1928 YY_BREAK
1929 case 119:
1930 YY_RULE_SETUP
1931 {
1932 return T_STRING;
1933 }
1934 YY_BREAK
1935 case 120:
1936 YY_RULE_SETUP
1937 {
1938 return T_STRING;
1939 }
1940 YY_BREAK
1941 case 121:
1942 YY_RULE_SETUP
1943 {
1944 BEGIN(RAW_STRING);
1945 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
1946 // R"<d-char>(
1947 userData->set_raw_string_label(yytext + 2 /* skip the `R"` */, yyleng - 3 /* we want just the d-char */);
1948 userData->clear_raw_string();
1949 }
1950 YY_BREAK
1951 case 122:
1952 YY_RULE_SETUP
1953 {
1954 // Clear the comment collected
1955 BEGIN C_COMMENT;
1956
1957 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
1958 if(userData->IsCollectingComments()) {
1959 userData->ClearComment();
1960 userData->AppendToComment("/*");
1961 userData->SetCommentStartLine(yylineno);
1962 }
1963 }
1964 YY_BREAK
1965 case 123:
1966 YY_RULE_SETUP
1967 {
1968 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
1969 if(userData->IsCollectingComments()) {
1970 userData->AppendToComment("*/");
1971 userData->SetCommentEndLine(yylineno);
1972 }
1973 BEGIN INITIAL;
1974 if(userData->IsCollectingComments()) {
1975 return T_C_COMMENT;
1976 }
1977 }
1978 YY_BREAK
1979 case 124:
1980 /* rule 124 can match eol */
1981 YY_RULE_SETUP
1982 {
1983 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
1984 if(userData->IsCollectingComments()) {
1985 userData->AppendToComment("\n");
1986 }
1987 }
1988 YY_BREAK
1989 case 125:
1990 YY_RULE_SETUP
1991 {
1992 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
1993 if(userData->IsCollectingComments()) {
1994 userData->AppendToComment(yytext[0]);
1995 }
1996 }
1997 YY_BREAK
1998 case 126:
1999 YY_RULE_SETUP
2000 {
2001 int oldState = yyg->yy_start;
2002 BEGIN CPP_COMMENT;
2003 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2004 if(userData->IsCollectingComments()) {
2005 userData->ClearComment();
2006 userData->AppendToComment("//");
2007 userData->SetCommentStartLine(yylineno);
2008 }
2009 if((1 + 2 * PREPR) == oldState) {
2010 return T_PP_STATE_EXIT;
2011 }
2012 }
2013 YY_BREAK
2014 case 127:
2015 /* rule 127 can match eol */
2016 YY_RULE_SETUP
2017 {
2018 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2019 if(userData->IsCollectingComments()) {
2020 userData->AppendToComment("\\\n");
2021 }
2022 }
2023 YY_BREAK
2024 case 128:
2025 /* rule 128 can match eol */
2026 YY_RULE_SETUP
2027 {
2028 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2029 if(userData->IsCollectingComments()) {
2030 userData->AppendToComment("\\\r\n");
2031 }
2032 }
2033 YY_BREAK
2034 case 129:
2035 /* rule 129 can match eol */
2036 YY_RULE_SETUP
2037 {
2038 BEGIN INITIAL;
2039 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2040 if(userData->IsCollectingComments()) {
2041 userData->AppendToComment("\n");
2042 return T_CXX_COMMENT;
2043 }
2044 }
2045 YY_BREAK
2046 case 130:
2047 YY_RULE_SETUP
2048 {
2049 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2050 if(userData->IsCollectingComments()) {
2051 userData->AppendToComment(yytext[0]);
2052 }
2053 }
2054 YY_BREAK
2055 case 131:
2056 YY_RULE_SETUP
2057 {
2058 return T_IDENTIFIER;
2059 }
2060 YY_BREAK
2061 case 132:
2062 YY_RULE_SETUP
2063 {
2064 BEGIN(PREPR);
2065 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2066 userData->SetPreProcessorSection(true);
2067 }
2068 YY_BREAK
2069 case 133:
2070 YY_RULE_SETUP
2071 {
2072 return yytext[0];
2073 }
2074 YY_BREAK
2075 case 134:
2076 /* rule 134 can match eol */
2077 YY_RULE_SETUP
2078 {
2079 /* keep the current state */
2080 }
2081 YY_BREAK
2082 case 135:
2083 /* rule 135 can match eol */
2084 YY_RULE_SETUP
2085 {
2086 /* keep the current state */
2087 }
2088 YY_BREAK
2089 case 136:
2090 YY_RULE_SETUP
2091 {
2092 /* do nothing */
2093 RETURN_WHITESPACE();
2094 }
2095 YY_BREAK
2096 case 137:
2097 /* rule 137 can match eol */
2098 YY_RULE_SETUP
2099 {
2100 BEGIN(INITIAL);
2101 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2102 userData->SetPreProcessorSection(false);
2103 return T_PP_STATE_EXIT;
2104 }
2105 YY_BREAK
2106 case 138:
2107 YY_RULE_SETUP
2108 {
2109 return T_PP_DEFINE;
2110 }
2111 YY_BREAK
2112 case 139:
2113 YY_RULE_SETUP
2114 {
2115 return T_PP_DEFINED;
2116 }
2117 YY_BREAK
2118 case 140:
2119 YY_RULE_SETUP
2120 {
2121 return T_PP_IF;
2122 }
2123 YY_BREAK
2124 case 141:
2125 YY_RULE_SETUP
2126 {
2127 return T_PP_IFDEF;
2128 }
2129 YY_BREAK
2130 case 142:
2131 YY_RULE_SETUP
2132 {
2133 return T_PP_IFNDEF;
2134 }
2135 YY_BREAK
2136 case 143:
2137 YY_RULE_SETUP
2138 {
2139 return T_PP_ELSE;
2140 }
2141 YY_BREAK
2142 case 144:
2143 YY_RULE_SETUP
2144 {
2145 return T_PP_ELIF;
2146 }
2147 YY_BREAK
2148 case 145:
2149 YY_RULE_SETUP
2150 {
2151 return T_PP_ENDIF;
2152 }
2153 YY_BREAK
2154 case 146:
2155 YY_RULE_SETUP
2156 {
2157 return T_PP_LINE;
2158 }
2159 YY_BREAK
2160 case 147:
2161 YY_RULE_SETUP
2162 {
2163 return T_PP_PRAGMA;
2164 }
2165 YY_BREAK
2166 case 148:
2167 YY_RULE_SETUP
2168 {
2169 return T_PP_UNDEF;
2170 }
2171 YY_BREAK
2172 case 149:
2173 YY_RULE_SETUP
2174 {
2175 return T_PP_ERROR;
2176 }
2177 YY_BREAK
2178 case 150:
2179 YY_RULE_SETUP
2180 {
2181 return T_PP_AND;
2182 }
2183 YY_BREAK
2184 case 151:
2185 YY_RULE_SETUP
2186 {
2187 return T_PP_OR;
2188 }
2189 YY_BREAK
2190 case 152:
2191 YY_RULE_SETUP
2192 {
2193 return T_PP_GT;
2194 }
2195 YY_BREAK
2196 case 153:
2197 YY_RULE_SETUP
2198 {
2199 return T_PP_GTEQ;
2200 }
2201 YY_BREAK
2202 case 154:
2203 YY_RULE_SETUP
2204 {
2205 return T_PP_LT;
2206 }
2207 YY_BREAK
2208 case 155:
2209 YY_RULE_SETUP
2210 {
2211 return T_PP_LTEQ;
2212 }
2213 YY_BREAK
2214 case 156:
2215 YY_RULE_SETUP
2216 {
2217 BEGIN(INCLUDE);
2218 }
2219 YY_BREAK
2220 case 157:
2221 YY_RULE_SETUP
2222 {
2223 return T_PP_STRING;
2224 }
2225 YY_BREAK
2226 case 158:
2227 YY_RULE_SETUP
2228 {
2229 return T_PP_STRING;
2230 }
2231 YY_BREAK
2232 case 159:
2233 YY_RULE_SETUP
2234 { return T_PP_DEC_NUMBER;}
2235 YY_BREAK
2236 case 160:
2237 YY_RULE_SETUP
2238 { return T_PP_OCTAL_NUMBER;}
2239 YY_BREAK
2240 case 161:
2241 YY_RULE_SETUP
2242 { return T_PP_HEX_NUMBER; }
2243 YY_BREAK
2244 case 162:
2245 YY_RULE_SETUP
2246 { return T_PP_FLOAT_NUMBER;}
2247 YY_BREAK
2248 case 163:
2249 YY_RULE_SETUP
2250 {
2251 return T_PP_IDENTIFIER;
2252 }
2253 YY_BREAK
2254 case 164:
2255 YY_RULE_SETUP
2256 {
2257 return yytext[0];
2258 }
2259 YY_BREAK
2260 case 165:
2261 YY_RULE_SETUP
2262 {
2263 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2264 std::string delim_found(yytext + 1, yyleng - 2); // we just want the `dchar_seq` sequence
2265 if(delim_found == userData->get_raw_string_label()) {
2266 BEGIN(INITIAL);
2267 return T_RAW_STRING;
2268 } else {
2269 userData->append_raw_string(yytext, yyleng);
2270 }
2271 }
2272 YY_BREAK
2273 case 166:
2274 /* rule 166 can match eol */
2275 YY_RULE_SETUP
2276 {
2277 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2278 userData->append_raw_string('\n');
2279 }
2280 YY_BREAK
2281 case 167:
2282 YY_RULE_SETUP
2283 {
2284 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2285 userData->append_raw_string(yytext[0]);
2286 }
2287 YY_BREAK
2288 case 168:
2289 /* rule 168 can match eol */
2290 YY_RULE_SETUP
2291 {
2292 BEGIN(INITIAL);
2293 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
2294 userData->SetPreProcessorSection(false);
2295 return T_PP_STATE_EXIT;
2296 }
2297 YY_BREAK
2298 case 169:
2299 YY_RULE_SETUP
2300 { RETURN_WHITESPACE(); }
2301 YY_BREAK
2302 case 170:
2303 YY_RULE_SETUP
2304 { /* got the include file name */
2305 return T_PP_INCLUDE_FILENAME;
2306 }
2307 YY_BREAK
2308 case 171:
2309 YY_RULE_SETUP
2310 ECHO;
2311 YY_BREAK
2312
2313 case YY_END_OF_BUFFER:
2314 {
2315 /* Amount of text matched not including the EOB char. */
2316 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
2317
2318 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2319 *yy_cp = yyg->yy_hold_char;
2320 YY_RESTORE_YY_MORE_OFFSET
2321
2322 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2323 {
2324 /* We're scanning a new file or input source. It's
2325 * possible that this happened because the user
2326 * just pointed yyin at a new source and called
2327 * yylex(). If so, then we have to assure
2328 * consistency between YY_CURRENT_BUFFER and our
2329 * globals. Here is the right place to do so, because
2330 * this is the first action (other than possibly a
2331 * back-up) that will match for the new input source.
2332 */
2333 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2334 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2335 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2336 }
2337
2338 /* Note that here we test for yy_c_buf_p "<=" to the position
2339 * of the first EOB in the buffer, since yy_c_buf_p will
2340 * already have been incremented past the NUL character
2341 * (since all states make transitions on EOB to the
2342 * end-of-buffer state). Contrast this with the test
2343 * in input().
2344 */
2345 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2346 { /* This was really a NUL. */
2347 yy_state_type yy_next_state;
2348
2349 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
2350
2351 yy_current_state = yy_get_previous_state( yyscanner );
2352
2353 /* Okay, we're now positioned to make the NUL
2354 * transition. We couldn't have
2355 * yy_get_previous_state() go ahead and do it
2356 * for us because it doesn't know how to deal
2357 * with the possibility of jamming (and we don't
2358 * want to build jamming into it because then it
2359 * will run more slowly).
2360 */
2361
2362 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
2363
2364 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2365
2366 if ( yy_next_state )
2367 {
2368 /* Consume the NUL. */
2369 yy_cp = ++yyg->yy_c_buf_p;
2370 yy_current_state = yy_next_state;
2371 goto yy_match;
2372 }
2373
2374 else
2375 {
2376 yy_cp = yyg->yy_last_accepting_cpos;
2377 yy_current_state = yyg->yy_last_accepting_state;
2378 goto yy_find_action;
2379 }
2380 }
2381
2382 else switch ( yy_get_next_buffer( yyscanner ) )
2383 {
2384 case EOB_ACT_END_OF_FILE:
2385 {
2386 yyg->yy_did_buffer_switch_on_eof = 0;
2387
2388 if ( yywrap( yyscanner ) )
2389 {
2390 /* Note: because we've taken care in
2391 * yy_get_next_buffer() to have set up
2392 * yytext, we can now set up
2393 * yy_c_buf_p so that if some total
2394 * hoser (like flex itself) wants to
2395 * call the scanner after we return the
2396 * YY_NULL, it'll still work - another
2397 * YY_NULL will get returned.
2398 */
2399 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
2400
2401 yy_act = YY_STATE_EOF(YY_START);
2402 goto do_action;
2403 }
2404
2405 else
2406 {
2407 if ( ! yyg->yy_did_buffer_switch_on_eof )
2408 YY_NEW_FILE;
2409 }
2410 break;
2411 }
2412
2413 case EOB_ACT_CONTINUE_SCAN:
2414 yyg->yy_c_buf_p =
2415 yyg->yytext_ptr + yy_amount_of_matched_text;
2416
2417 yy_current_state = yy_get_previous_state( yyscanner );
2418
2419 yy_cp = yyg->yy_c_buf_p;
2420 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2421 goto yy_match;
2422
2423 case EOB_ACT_LAST_MATCH:
2424 yyg->yy_c_buf_p =
2425 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
2426
2427 yy_current_state = yy_get_previous_state( yyscanner );
2428
2429 yy_cp = yyg->yy_c_buf_p;
2430 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2431 goto yy_find_action;
2432 }
2433 break;
2434 }
2435
2436 default:
2437 YY_FATAL_ERROR(
2438 "fatal flex scanner internal error--no action found" );
2439 } /* end of action switch */
2440 } /* end of scanning one token */
2441 } /* end of user's declarations */
2442 } /* end of yylex */
2443
2444 /* yy_get_next_buffer - try to read in a new buffer
2445 *
2446 * Returns a code representing an action:
2447 * EOB_ACT_LAST_MATCH -
2448 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2449 * EOB_ACT_END_OF_FILE - end of file
2450 */
2451 static int yy_get_next_buffer (yyscan_t yyscanner)
2452 {
2453 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2454 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2455 char *source = yyg->yytext_ptr;
2456 int number_to_move, i;
2457 int ret_val;
2458
2459 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2460 YY_FATAL_ERROR(
2461 "fatal flex scanner internal error--end of buffer missed" );
2462
2463 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2464 { /* Don't try to fill the buffer, so this is an EOF. */
2465 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2466 {
2467 /* We matched a single character, the EOB, so
2468 * treat this as a final EOF.
2469 */
2470 return EOB_ACT_END_OF_FILE;
2471 }
2472
2473 else
2474 {
2475 /* We matched some text prior to the EOB, first
2476 * process it.
2477 */
2478 return EOB_ACT_LAST_MATCH;
2479 }
2480 }
2481
2482 /* Try to read more data. */
2483
2484 /* First move last chars to start of buffer. */
2485 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
2486
2487 for ( i = 0; i < number_to_move; ++i )
2488 *(dest++) = *(source++);
2489
2490 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2491 /* don't do the read, it's not guaranteed to return an EOF,
2492 * just force an EOF
2493 */
2494 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2495
2496 else
2497 {
2498 int num_to_read =
2499 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2500
2501 while ( num_to_read <= 0 )
2502 { /* Not enough room in the buffer - grow it. */
2503
2504 /* just a shorter name for the current buffer */
2505 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2506
2507 int yy_c_buf_p_offset =
2508 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2509
2510 if ( b->yy_is_our_buffer )
2511 {
2512 int new_size = b->yy_buf_size * 2;
2513
2514 if ( new_size <= 0 )
2515 b->yy_buf_size += b->yy_buf_size / 8;
2516 else
2517 b->yy_buf_size *= 2;
2518
2519 b->yy_ch_buf = (char *)
2520 /* Include room in for 2 EOB chars. */
2521 yyrealloc( (void *) b->yy_ch_buf,
2522 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2523 }
2524 else
2525 /* Can't grow it, we don't own it. */
2526 b->yy_ch_buf = NULL;
2527
2528 if ( ! b->yy_ch_buf )
2529 YY_FATAL_ERROR(
2530 "fatal error - scanner input buffer overflow" );
2531
2532 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2533
2534 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2535 number_to_move - 1;
2536
2537 }
2538
2539 if ( num_to_read > YY_READ_BUF_SIZE )
2540 num_to_read = YY_READ_BUF_SIZE;
2541
2542 /* Read in more data. */
2543 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2544 yyg->yy_n_chars, num_to_read );
2545
2546 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2547 }
2548
2549 if ( yyg->yy_n_chars == 0 )
2550 {
2551 if ( number_to_move == YY_MORE_ADJ )
2552 {
2553 ret_val = EOB_ACT_END_OF_FILE;
2554 yyrestart( yyin , yyscanner);
2555 }
2556
2557 else
2558 {
2559 ret_val = EOB_ACT_LAST_MATCH;
2560 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2561 YY_BUFFER_EOF_PENDING;
2562 }
2563 }
2564
2565 else
2566 ret_val = EOB_ACT_CONTINUE_SCAN;
2567
2568 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2569 /* Extend the array by 50%, plus the number we really need. */
2570 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
2571 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2572 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
2573 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2574 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2575 /* "- 2" to take care of EOB's */
2576 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2577 }
2578
2579 yyg->yy_n_chars += number_to_move;
2580 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2581 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2582
2583 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2584
2585 return ret_val;
2586 }
2587
2588 /* yy_get_previous_state - get the state just before the EOB char was reached */
2589
2590 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
2591 {
2592 yy_state_type yy_current_state;
2593 char *yy_cp;
2594 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2595
2596 yy_current_state = yyg->yy_start;
2597
2598 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2599 {
2600 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2601 if ( yy_accept[yy_current_state] )
2602 {
2603 yyg->yy_last_accepting_state = yy_current_state;
2604 yyg->yy_last_accepting_cpos = yy_cp;
2605 }
2606 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2607 {
2608 yy_current_state = (int) yy_def[yy_current_state];
2609 if ( yy_current_state >= 701 )
2610 yy_c = yy_meta[yy_c];
2611 }
2612 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2613 }
2614
2615 return yy_current_state;
2616 }
2617
2618 /* yy_try_NUL_trans - try to make a transition on the NUL character
2619 *
2620 * synopsis
2621 * next_state = yy_try_NUL_trans( current_state );
2622 */
2623 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
2624 {
2625 int yy_is_jam;
2626 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2627 char *yy_cp = yyg->yy_c_buf_p;
2628
2629 YY_CHAR yy_c = 1;
2630 if ( yy_accept[yy_current_state] )
2631 {
2632 yyg->yy_last_accepting_state = yy_current_state;
2633 yyg->yy_last_accepting_cpos = yy_cp;
2634 }
2635 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2636 {
2637 yy_current_state = (int) yy_def[yy_current_state];
2638 if ( yy_current_state >= 701 )
2639 yy_c = yy_meta[yy_c];
2640 }
2641 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2642 yy_is_jam = (yy_current_state == 700);
2643
2644 (void)yyg;
2645 return yy_is_jam ? 0 : yy_current_state;
2646 }
2647
2648 #ifndef YY_NO_UNPUT
2649
2650 static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
2651 {
2652 char *yy_cp;
2653 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2654
2655 yy_cp = yyg->yy_c_buf_p;
2656
2657 /* undo effects of setting up yytext */
2658 *yy_cp = yyg->yy_hold_char;
2659
2660 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2661 { /* need to shift things up to make room */
2662 /* +2 for EOB chars. */
2663 int number_to_move = yyg->yy_n_chars + 2;
2664 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2665 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2666 char *source =
2667 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2668
2669 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2670 *--dest = *--source;
2671
2672 yy_cp += (int) (dest - source);
2673 yy_bp += (int) (dest - source);
2674 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2675 yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2676
2677 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2678 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2679 }
2680
2681 *--yy_cp = (char) c;
2682
2683 if ( c == '\n' ){
2684 --yylineno;
2685 }
2686
2687 yyg->yytext_ptr = yy_bp;
2688 yyg->yy_hold_char = *yy_cp;
2689 yyg->yy_c_buf_p = yy_cp;
2690 }
2691
2692 #endif
2693
2694 #ifndef YY_NO_INPUT
2695 #ifdef __cplusplus
2696 static int yyinput (yyscan_t yyscanner)
2697 #else
2698 static int input (yyscan_t yyscanner)
2699 #endif
2700
2701 {
2702 int c;
2703 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2704
2705 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2706
2707 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2708 {
2709 /* yy_c_buf_p now points to the character we want to return.
2710 * If this occurs *before* the EOB characters, then it's a
2711 * valid NUL; if not, then we've hit the end of the buffer.
2712 */
2713 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2714 /* This was really a NUL. */
2715 *yyg->yy_c_buf_p = '\0';
2716
2717 else
2718 { /* need more input */
2719 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
2720 ++yyg->yy_c_buf_p;
2721
2722 switch ( yy_get_next_buffer( yyscanner ) )
2723 {
2724 case EOB_ACT_LAST_MATCH:
2725 /* This happens because yy_g_n_b()
2726 * sees that we've accumulated a
2727 * token and flags that we need to
2728 * try matching the token before
2729 * proceeding. But for input(),
2730 * there's no matching to consider.
2731 * So convert the EOB_ACT_LAST_MATCH
2732 * to EOB_ACT_END_OF_FILE.
2733 */
2734
2735 /* Reset buffer status. */
2736 yyrestart( yyin , yyscanner);
2737
2738 /*FALLTHROUGH*/
2739
2740 case EOB_ACT_END_OF_FILE:
2741 {
2742 if ( yywrap( yyscanner ) )
2743 return 0;
2744
2745 if ( ! yyg->yy_did_buffer_switch_on_eof )
2746 YY_NEW_FILE;
2747 #ifdef __cplusplus
2748 return yyinput(yyscanner);
2749 #else
2750 return input(yyscanner);
2751 #endif
2752 }
2753
2754 case EOB_ACT_CONTINUE_SCAN:
2755 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2756 break;
2757 }
2758 }
2759 }
2760
2761 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2762 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2763 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2764
2765 if ( c == '\n' )
2766
2767 do{ yylineno++;
2768 yycolumn=0;
2769 }while(0)
2770 ;
2771
2772 return c;
2773 }
2774 #endif /* ifndef YY_NO_INPUT */
2775
2776 /** Immediately switch to a different input stream.
2777 * @param input_file A readable stream.
2778 * @param yyscanner The scanner object.
2779 * @note This function does not reset the start condition to @c INITIAL .
2780 */
2781 void yyrestart (FILE * input_file , yyscan_t yyscanner)
2782 {
2783 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2784
2785 if ( ! YY_CURRENT_BUFFER ){
2786 yyensure_buffer_stack (yyscanner);
2787 YY_CURRENT_BUFFER_LVALUE =
2788 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
2789 }
2790
2791 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2792 yy_load_buffer_state( yyscanner );
2793 }
2794
2795 /** Switch to a different input buffer.
2796 * @param new_buffer The new input buffer.
2797 * @param yyscanner The scanner object.
2798 */
2799 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2800 {
2801 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2802
2803 /* TODO. We should be able to replace this entire function body
2804 * with
2805 * yypop_buffer_state();
2806 * yypush_buffer_state(new_buffer);
2807 */
2808 yyensure_buffer_stack (yyscanner);
2809 if ( YY_CURRENT_BUFFER == new_buffer )
2810 return;
2811
2812 if ( YY_CURRENT_BUFFER )
2813 {
2814 /* Flush out information for old buffer. */
2815 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2816 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2817 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2818 }
2819
2820 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2821 yy_load_buffer_state( yyscanner );
2822
2823 /* We don't actually know whether we did this switch during
2824 * EOF (yywrap()) processing, but the only time this flag
2825 * is looked at is after yywrap() is called, so it's safe
2826 * to go ahead and always set it.
2827 */
2828 yyg->yy_did_buffer_switch_on_eof = 1;
2829 }
2830
2831 static void yy_load_buffer_state (yyscan_t yyscanner)
2832 {
2833 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2834 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2835 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2836 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2837 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2838 }
2839
2840 /** Allocate and initialize an input buffer state.
2841 * @param file A readable stream.
2842 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2843 * @param yyscanner The scanner object.
2844 * @return the allocated buffer state.
2845 */
2846 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2847 {
2848 YY_BUFFER_STATE b;
2849
2850 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2851 if ( ! b )
2852 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2853
2854 b->yy_buf_size = size;
2855
2856 /* yy_ch_buf has to be 2 characters longer than the size given because
2857 * we need to put in 2 end-of-buffer characters.
2858 */
2859 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2860 if ( ! b->yy_ch_buf )
2861 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2862
2863 b->yy_is_our_buffer = 1;
2864
2865 yy_init_buffer( b, file , yyscanner);
2866
2867 return b;
2868 }
2869
2870 /** Destroy the buffer.
2871 * @param b a buffer created with yy_create_buffer()
2872 * @param yyscanner The scanner object.
2873 */
2874 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2875 {
2876 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2877
2878 if ( ! b )
2879 return;
2880
2881 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2882 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2883
2884 if ( b->yy_is_our_buffer )
2885 yyfree( (void *) b->yy_ch_buf , yyscanner );
2886
2887 yyfree( (void *) b , yyscanner );
2888 }
2889
2890 /* Initializes or reinitializes a buffer.
2891 * This function is sometimes called more than once on the same buffer,
2892 * such as during a yyrestart() or at EOF.
2893 */
2894 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2895
2896 {
2897 int oerrno = errno;
2898 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2899
2900 yy_flush_buffer( b , yyscanner);
2901
2902 b->yy_input_file = file;
2903 b->yy_fill_buffer = 1;
2904
2905 /* If b is the current buffer, then yy_init_buffer was _probably_
2906 * called from yyrestart() or through yy_get_next_buffer.
2907 * In that case, we don't want to reset the lineno or column.
2908 */
2909 if (b != YY_CURRENT_BUFFER){
2910 b->yy_bs_lineno = 1;
2911 b->yy_bs_column = 0;
2912 }
2913
2914 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2915
2916 errno = oerrno;
2917 }
2918
2919 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2920 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2921 * @param yyscanner The scanner object.
2922 */
2923 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2924 {
2925 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2926 if ( ! b )
2927 return;
2928
2929 b->yy_n_chars = 0;
2930
2931 /* We always need two end-of-buffer characters. The first causes
2932 * a transition to the end-of-buffer state. The second causes
2933 * a jam in that state.
2934 */
2935 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2936 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2937
2938 b->yy_buf_pos = &b->yy_ch_buf[0];
2939
2940 b->yy_at_bol = 1;
2941 b->yy_buffer_status = YY_BUFFER_NEW;
2942
2943 if ( b == YY_CURRENT_BUFFER )
2944 yy_load_buffer_state( yyscanner );
2945 }
2946
2947 /** Pushes the new state onto the stack. The new state becomes
2948 * the current state. This function will allocate the stack
2949 * if necessary.
2950 * @param new_buffer The new state.
2951 * @param yyscanner The scanner object.
2952 */
2953 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2954 {
2955 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2956 if (new_buffer == NULL)
2957 return;
2958
2959 yyensure_buffer_stack(yyscanner);
2960
2961 /* This block is copied from yy_switch_to_buffer. */
2962 if ( YY_CURRENT_BUFFER )
2963 {
2964 /* Flush out information for old buffer. */
2965 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2966 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2967 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2968 }
2969
2970 /* Only push if top exists. Otherwise, replace top. */
2971 if (YY_CURRENT_BUFFER)
2972 yyg->yy_buffer_stack_top++;
2973 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2974
2975 /* copied from yy_switch_to_buffer. */
2976 yy_load_buffer_state( yyscanner );
2977 yyg->yy_did_buffer_switch_on_eof = 1;
2978 }
2979
2980 /** Removes and deletes the top of the stack, if present.
2981 * The next element becomes the new top.
2982 * @param yyscanner The scanner object.
2983 */
2984 void yypop_buffer_state (yyscan_t yyscanner)
2985 {
2986 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2987 if (!YY_CURRENT_BUFFER)
2988 return;
2989
2990 yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
2991 YY_CURRENT_BUFFER_LVALUE = NULL;
2992 if (yyg->yy_buffer_stack_top > 0)
2993 --yyg->yy_buffer_stack_top;
2994
2995 if (YY_CURRENT_BUFFER) {
2996 yy_load_buffer_state( yyscanner );
2997 yyg->yy_did_buffer_switch_on_eof = 1;
2998 }
2999 }
3000
3001 /* Allocates the stack if it does not exist.
3002 * Guarantees space for at least one push.
3003 */
3004 static void yyensure_buffer_stack (yyscan_t yyscanner)
3005 {
3006 yy_size_t num_to_alloc;
3007 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3008
3009 if (!yyg->yy_buffer_stack) {
3010
3011 /* First allocation is just for 2 elements, since we don't know if this
3012 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3013 * immediate realloc on the next call.
3014 */
3015 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
3016 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
3017 (num_to_alloc * sizeof(struct yy_buffer_state*)
3018 , yyscanner);
3019 if ( ! yyg->yy_buffer_stack )
3020 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3021
3022 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3023
3024 yyg->yy_buffer_stack_max = num_to_alloc;
3025 yyg->yy_buffer_stack_top = 0;
3026 return;
3027 }
3028
3029 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
3030
3031 /* Increase the buffer to prepare for a possible push. */
3032 yy_size_t grow_size = 8 /* arbitrary grow size */;
3033
3034 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
3035 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
3036 (yyg->yy_buffer_stack,
3037 num_to_alloc * sizeof(struct yy_buffer_state*)
3038 , yyscanner);
3039 if ( ! yyg->yy_buffer_stack )
3040 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3041
3042 /* zero only the new slots.*/
3043 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
3044 yyg->yy_buffer_stack_max = num_to_alloc;
3045 }
3046 }
3047
3048 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3049 * @param base the character buffer
3050 * @param size the size in bytes of the character buffer
3051 * @param yyscanner The scanner object.
3052 * @return the newly allocated buffer state object.
3053 */
3054 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
3055 {
3056 YY_BUFFER_STATE b;
3057
3058 if ( size < 2 ||
3059 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3060 base[size-1] != YY_END_OF_BUFFER_CHAR )
3061 /* They forgot to leave room for the EOB's. */
3062 return NULL;
3063
3064 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
3065 if ( ! b )
3066 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3067
3068 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
3069 b->yy_buf_pos = b->yy_ch_buf = base;
3070 b->yy_is_our_buffer = 0;
3071 b->yy_input_file = NULL;
3072 b->yy_n_chars = b->yy_buf_size;
3073 b->yy_is_interactive = 0;
3074 b->yy_at_bol = 1;
3075 b->yy_fill_buffer = 0;
3076 b->yy_buffer_status = YY_BUFFER_NEW;
3077
3078 yy_switch_to_buffer( b , yyscanner );
3079
3080 return b;
3081 }
3082
3083 /** Setup the input buffer state to scan a string. The next call to yylex() will
3084 * scan from a @e copy of @a str.
3085 * @param yystr a NUL-terminated string to scan
3086 * @param yyscanner The scanner object.
3087 * @return the newly allocated buffer state object.
3088 * @note If you want to scan bytes that may contain NUL values, then use
3089 * yy_scan_bytes() instead.
3090 */
3091 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
3092 {
3093
3094 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
3095 }
3096
3097 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3098 * scan from a @e copy of @a bytes.
3099 * @param yybytes the byte buffer to scan
3100 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
3101 * @param yyscanner The scanner object.
3102 * @return the newly allocated buffer state object.
3103 */
3104 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
3105 {
3106 YY_BUFFER_STATE b;
3107 char *buf;
3108 yy_size_t n;
3109 int i;
3110
3111 /* Get memory for full buffer, including space for trailing EOB's. */
3112 n = (yy_size_t) (_yybytes_len + 2);
3113 buf = (char *) yyalloc( n , yyscanner );
3114 if ( ! buf )
3115 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3116
3117 for ( i = 0; i < _yybytes_len; ++i )
3118 buf[i] = yybytes[i];
3119
3120 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3121
3122 b = yy_scan_buffer( buf, n , yyscanner);
3123 if ( ! b )
3124 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3125
3126 /* It's okay to grow etc. this buffer, and we should throw it
3127 * away when we're done.
3128 */
3129 b->yy_is_our_buffer = 1;
3130
3131 return b;
3132 }
3133
3134 #ifndef YY_EXIT_FAILURE
3135 #define YY_EXIT_FAILURE 2
3136 #endif
3137
3138 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
3139 {
3140 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3141 (void)yyg;
3142 fprintf( stderr, "%s\n", msg );
3143 exit( YY_EXIT_FAILURE );
3144 }
3145
3146 /* Redefine yyless() so it works in section 3 code. */
3147
3148 #undef yyless
3149 #define yyless(n) \
3150 do \
3151 { \
3152 /* Undo effects of setting up yytext. */ \
3153 int yyless_macro_arg = (n); \
3154 YY_LESS_LINENO(yyless_macro_arg);\
3155 yytext[yyleng] = yyg->yy_hold_char; \
3156 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
3157 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
3158 *yyg->yy_c_buf_p = '\0'; \
3159 yyleng = yyless_macro_arg; \
3160 } \
3161 while ( 0 )
3162
3163 /* Accessor methods (get/set functions) to struct members. */
3164
3165 /** Get the user-defined data for this scanner.
3166 * @param yyscanner The scanner object.
3167 */
3168 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
3169 {
3170 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3171 return yyextra;
3172 }
3173
3174 /** Get the current line number.
3175 * @param yyscanner The scanner object.
3176 */
3177 int yyget_lineno (yyscan_t yyscanner)
3178 {
3179 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3180
3181 if (! YY_CURRENT_BUFFER)
3182 return 0;
3183
3184 return yylineno;
3185 }
3186
3187 /** Get the current column number.
3188 * @param yyscanner The scanner object.
3189 */
3190 int yyget_column (yyscan_t yyscanner)
3191 {
3192 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3193
3194 if (! YY_CURRENT_BUFFER)
3195 return 0;
3196
3197 return yycolumn;
3198 }
3199
3200 /** Get the input stream.
3201 * @param yyscanner The scanner object.
3202 */
3203 FILE *yyget_in (yyscan_t yyscanner)
3204 {
3205 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3206 return yyin;
3207 }
3208
3209 /** Get the output stream.
3210 * @param yyscanner The scanner object.
3211 */
3212 FILE *yyget_out (yyscan_t yyscanner)
3213 {
3214 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3215 return yyout;
3216 }
3217
3218 /** Get the length of the current token.
3219 * @param yyscanner The scanner object.
3220 */
3221 int yyget_leng (yyscan_t yyscanner)
3222 {
3223 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3224 return yyleng;
3225 }
3226
3227 /** Get the current token.
3228 * @param yyscanner The scanner object.
3229 */
3230
3231 char *yyget_text (yyscan_t yyscanner)
3232 {
3233 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3234 return yytext;
3235 }
3236
3237 /** Set the user-defined data. This data is never touched by the scanner.
3238 * @param user_defined The data to be associated with this scanner.
3239 * @param yyscanner The scanner object.
3240 */
3241 void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
3242 {
3243 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3244 yyextra = user_defined ;
3245 }
3246
3247 /** Set the current line number.
3248 * @param _line_number line number
3249 * @param yyscanner The scanner object.
3250 */
3251 void yyset_lineno (int _line_number , yyscan_t yyscanner)
3252 {
3253 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3254
3255 /* lineno is only valid if an input buffer exists. */
3256 if (! YY_CURRENT_BUFFER )
3257 YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
3258
3259 yylineno = _line_number;
3260 }
3261
3262 /** Set the current column.
3263 * @param _column_no column number
3264 * @param yyscanner The scanner object.
3265 */
3266 void yyset_column (int _column_no , yyscan_t yyscanner)
3267 {
3268 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3269
3270 /* column is only valid if an input buffer exists. */
3271 if (! YY_CURRENT_BUFFER )
3272 YY_FATAL_ERROR( "yyset_column called with no buffer" );
3273
3274 yycolumn = _column_no;
3275 }
3276
3277 /** Set the input stream. This does not discard the current
3278 * input buffer.
3279 * @param _in_str A readable stream.
3280 * @param yyscanner The scanner object.
3281 * @see yy_switch_to_buffer
3282 */
3283 void yyset_in (FILE * _in_str , yyscan_t yyscanner)
3284 {
3285 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3286 yyin = _in_str ;
3287 }
3288
3289 void yyset_out (FILE * _out_str , yyscan_t yyscanner)
3290 {
3291 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3292 yyout = _out_str ;
3293 }
3294
3295 int yyget_debug (yyscan_t yyscanner)
3296 {
3297 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3298 return yy_flex_debug;
3299 }
3300
3301 void yyset_debug (int _bdebug , yyscan_t yyscanner)
3302 {
3303 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3304 yy_flex_debug = _bdebug ;
3305 }
3306
3307 /* Accessor methods for yylval and yylloc */
3308
3309 /* User-visible API */
3310
3311 /* yylex_init is special because it creates the scanner itself, so it is
3312 * the ONLY reentrant function that doesn't take the scanner as the last argument.
3313 * That's why we explicitly handle the declaration, instead of using our macros.
3314 */
3315 int yylex_init(yyscan_t* ptr_yy_globals)
3316 {
3317 if (ptr_yy_globals == NULL){
3318 errno = EINVAL;
3319 return 1;
3320 }
3321
3322 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
3323
3324 if (*ptr_yy_globals == NULL){
3325 errno = ENOMEM;
3326 return 1;
3327 }
3328
3329 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
3330 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3331
3332 return yy_init_globals ( *ptr_yy_globals );
3333 }
3334
3335 /* yylex_init_extra has the same functionality as yylex_init, but follows the
3336 * convention of taking the scanner as the last argument. Note however, that
3337 * this is a *pointer* to a scanner, as it will be allocated by this call (and
3338 * is the reason, too, why this function also must handle its own declaration).
3339 * The user defined value in the first argument will be available to yyalloc in
3340 * the yyextra field.
3341 */
3342 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
3343 {
3344 struct yyguts_t dummy_yyguts;
3345
3346 yyset_extra (yy_user_defined, &dummy_yyguts);
3347
3348 if (ptr_yy_globals == NULL){
3349 errno = EINVAL;
3350 return 1;
3351 }
3352
3353 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
3354
3355 if (*ptr_yy_globals == NULL){
3356 errno = ENOMEM;
3357 return 1;
3358 }
3359
3360 /* By setting to 0xAA, we expose bugs in
3361 yy_init_globals. Leave at 0x00 for releases. */
3362 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3363
3364 yyset_extra (yy_user_defined, *ptr_yy_globals);
3365
3366 return yy_init_globals ( *ptr_yy_globals );
3367 }
3368
3369 static int yy_init_globals (yyscan_t yyscanner)
3370 {
3371 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3372 /* Initialization is the same as for the non-reentrant scanner.
3373 * This function is called from yylex_destroy(), so don't allocate here.
3374 */
3375
3376 yyg->yy_buffer_stack = NULL;
3377 yyg->yy_buffer_stack_top = 0;
3378 yyg->yy_buffer_stack_max = 0;
3379 yyg->yy_c_buf_p = NULL;
3380 yyg->yy_init = 0;
3381 yyg->yy_start = 0;
3382
3383 yyg->yy_start_stack_ptr = 0;
3384 yyg->yy_start_stack_depth = 0;
3385 yyg->yy_start_stack = NULL;
3386
3387 /* Defined in main.c */
3388 #ifdef YY_STDINIT
3389 yyin = stdin;
3390 yyout = stdout;
3391 #else
3392 yyin = NULL;
3393 yyout = NULL;
3394 #endif
3395
3396 /* For future reference: Set errno on error, since we are called by
3397 * yylex_init()
3398 */
3399 return 0;
3400 }
3401
3402 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3403 int yylex_destroy (yyscan_t yyscanner)
3404 {
3405 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3406
3407 /* Pop the buffer stack, destroying each element. */
3408 while(YY_CURRENT_BUFFER){
3409 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
3410 YY_CURRENT_BUFFER_LVALUE = NULL;
3411 yypop_buffer_state(yyscanner);
3412 }
3413
3414 /* Destroy the stack itself. */
3415 yyfree(yyg->yy_buffer_stack , yyscanner);
3416 yyg->yy_buffer_stack = NULL;
3417
3418 /* Destroy the start condition stack. */
3419 yyfree( yyg->yy_start_stack , yyscanner );
3420 yyg->yy_start_stack = NULL;
3421
3422 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3423 * yylex() is called, initialization will occur. */
3424 yy_init_globals( yyscanner);
3425
3426 /* Destroy the main struct (reentrant only). */
3427 yyfree ( yyscanner , yyscanner );
3428 yyscanner = NULL;
3429 return 0;
3430 }
3431
3432 /*
3433 * Internal utility routines.
3434 */
3435
3436 #ifndef yytext_ptr
3437 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
3438 {
3439 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3440 (void)yyg;
3441
3442 int i;
3443 for ( i = 0; i < n; ++i )
3444 s1[i] = s2[i];
3445 }
3446 #endif
3447
3448 #ifdef YY_NEED_STRLEN
3449 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
3450 {
3451 int n;
3452 for ( n = 0; s[n]; ++n )
3453 ;
3454
3455 return n;
3456 }
3457 #endif
3458
3459 void *yyalloc (yy_size_t size , yyscan_t yyscanner)
3460 {
3461 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3462 (void)yyg;
3463 return malloc(size);
3464 }
3465
3466 void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
3467 {
3468 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3469 (void)yyg;
3470
3471 /* The cast to (char *) in the following accommodates both
3472 * implementations that use char* generic pointers, and those
3473 * that use void* generic pointers. It works with the latter
3474 * because both ANSI C and C++ allow castless assignment from
3475 * any pointer type to void*, and deal with argument conversions
3476 * as though doing an assignment.
3477 */
3478 return realloc(ptr, size);
3479 }
3480
3481 void yyfree (void * ptr , yyscan_t yyscanner)
3482 {
3483 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3484 (void)yyg;
3485 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3486 }
3487
3488 #define YYTABLES_NAME "yytables"
3489
3490 //=============-------------------------------
3491 // API methods implementation
3492 //=============-------------------------------
3493
3494 void* LexerNew(const wxString& content, size_t options )
3495 {
3496 yyscan_t scanner;
3497 yylex_init(&scanner);
3498 struct yyguts_t * yyg = (struct yyguts_t*)scanner;
3499 CppLexerUserData *userData = new CppLexerUserData(options);
3500
3501 // keep the file pointer (and make sure we close it at the end)
3502 userData->SetCurrentPF(NULL);
3503 yyg->yyextra_r = userData;
3504
3505 wxCharBuffer cb = content.mb_str(wxConvUTF8);
3506 yy_switch_to_buffer(yy_scan_string(cb.data(), scanner), scanner);
3507 yycolumn = 0;
3508 yylineno = 0;
3509 return scanner;
3510 }
3511
3512 void* LexerNew(const wxFileName& filename, size_t options )
3513 {
3514 wxFileName fn = filename;
3515 if(fn.IsRelative()) {
3516 fn.MakeAbsolute();
3517 }
3518
3519 FILE* fp = ::fopen(fn.GetFullPath().mb_str(wxConvUTF8).data(), "rb");
3520 if(!fp) {
3521 return NULL;
3522 }
3523 yyscan_t scanner;
3524 yylex_init(&scanner);
3525 struct yyguts_t * yyg = (struct yyguts_t*)scanner;
3526 CppLexerUserData *userData = new CppLexerUserData(options);
3527
3528 // keep the file pointer (and make sure we close it at the end)
3529 userData->SetCurrentPF(fp);
3530 yyg->yyextra_r = userData;
3531
3532 yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE, scanner), scanner);
3533 yycolumn = 1;
3534 yylineno = 0;
3535 return scanner;
3536 }
3537
3538 void LexerDestroy(void** scanner)
3539 {
3540 struct yyguts_t * yyg = (struct yyguts_t*)(*scanner);
3541 delete (CppLexerUserData*)yyg->yyextra_r;
3542 yy_delete_buffer(YY_CURRENT_BUFFER, *scanner);
3543
3544 yylex_destroy(*scanner);
3545 *scanner = NULL;
3546 }
3547
3548 void LexerUnget(void* scanner)
3549 {
3550 // return the entire token back to the input stream
3551 struct yyguts_t * yyg = (struct yyguts_t*)scanner;
3552 yyless(0);
3553 }
3554
3555 bool LexerNext(void* scanner, CxxLexerToken& token)
3556 {
3557 token.SetColumn(0);
3558 token.SetType(yylex(scanner));
3559 token.ClearComment();
3560 token.ClearRawString();
3561 if(!token.IsEOF()) {
3562 struct yyguts_t * yyg = (struct yyguts_t*)scanner;
3563 CppLexerUserData* userData = (CppLexerUserData*)yyg->yyextra_r;
3564 switch(token.GetType()) {
3565 case T_RAW_STRING:
3566 token.SetLineNumber(yylineno);
3567 token.SetRawString(userData->get_raw_string());
3568 userData->clear_raw_string_label();
3569 break;
3570 case T_CXX_COMMENT:
3571 // One line up for CXX comments
3572 token.SetLineNumber(userData->GetCommentStartLine());
3573 token.SetComment(userData->GetComment());
3574 userData->ClearComment();
3575 break;
3576 case T_C_COMMENT:
3577 token.SetLineNumber(userData->GetCommentStartLine());
3578 token.SetComment(userData->GetComment());
3579 userData->ClearComment();
3580 break;
3581 default:
3582 token.SetLineNumber(yylineno);
3583 token.SetText(yytext);
3584 token.SetColumn(yycolumn);
3585 break;
3586 }
3587
3588 } else {
3589 token.SetText(NULL);
3590 token.SetLineNumber(0);
3591 token.SetColumn(0);
3592 }
3593 return !token.IsEOF();
3594 }
3595
3596 wxString LexerCurrentToken(void* scanner)
3597 {
3598 struct yyguts_t * yyg = (struct yyguts_t*)scanner;
3599 return yytext;
3600 }
3601
3602 CppLexerUserData* LexerGetUserData(void* scanner)
3603 {
3604 struct yyguts_t * yyg = (struct yyguts_t*)scanner;
3605 return (CppLexerUserData*) yyg->yyextra_r;
3606 }
3607