2 #line 3 "scannerlexer.c"
4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 36
12 #if YY_FLEX_SUBMINOR_VERSION > 0
16 /* First, we deal with platform-specific or compiler-specific issues. */
18 /* begin standard C headers. */
24 /* end standard C headers. */
26 /* flex integer type definitions */
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
57 /* Limits of integral types. */
59 #define INT8_MIN (-128)
62 #define INT16_MIN (-32767-1)
65 #define INT32_MIN (-2147483647-1)
68 #define INT8_MAX (127)
71 #define INT16_MAX (32767)
74 #define INT32_MAX (2147483647)
77 #define UINT8_MAX (255U)
80 #define UINT16_MAX (65535U)
83 #define UINT32_MAX (4294967295U)
88 #endif /* ! FLEXINT_H */
92 /* The "const" storage-class-modifier is valid. */
95 #else /* ! __cplusplus */
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
102 #endif /* defined (__STDC__) */
103 #endif /* ! __cplusplus */
106 #define yyconst const
111 /* Returned upon end-of-file. */
114 /* Promotes a possibly negative, possibly signed char to an unsigned
115 * integer for use as an array index. If the signed char is negative,
116 * we want to instead treat it as an 8-bit unsigned char, hence the
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121 /* Enter a start condition. This macro really ought to take a parameter,
122 * but we do it the disgusting crufty way forced on us by the ()-less
123 * definition of BEGIN.
125 #define BEGIN (yy_start) = 1 + 2 *
127 /* Translate the current start state into a value that can be later handed
128 * to BEGIN to return to the state. The YYSTATE alias is for lex
131 #define YY_START (((yy_start) - 1) / 2)
132 #define YYSTATE YY_START
134 /* Action number for EOF rule of a given start state. */
135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
137 /* Special action meaning "start processing a new file". */
138 #define YY_NEW_FILE yyrestart(yyin )
140 #define YY_END_OF_BUFFER_CHAR 0
142 /* Size of default input buffer. */
144 #define YY_BUF_SIZE 16384
147 /* The state buf must be large enough to hold one state per character in the main buffer.
149 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
151 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
152 #define YY_TYPEDEF_YY_BUFFER_STATE
153 typedef struct yy_buffer_state *YY_BUFFER_STATE;
156 #ifndef YY_TYPEDEF_YY_SIZE_T
157 #define YY_TYPEDEF_YY_SIZE_T
158 typedef size_t yy_size_t;
161 extern yy_size_t yyleng;
163 extern FILE *yyin, *yyout;
165 #define EOB_ACT_CONTINUE_SCAN 0
166 #define EOB_ACT_END_OF_FILE 1
167 #define EOB_ACT_LAST_MATCH 2
169 #define YY_LESS_LINENO(n)
171 /* Return all but the first "n" matched characters back to the input stream. */
175 /* Undo effects of setting up yytext. */ \
176 int yyless_macro_arg = (n); \
177 YY_LESS_LINENO(yyless_macro_arg);\
178 *yy_cp = (yy_hold_char); \
179 YY_RESTORE_YY_MORE_OFFSET \
180 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
181 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
185 #define unput(c) yyunput( c, (yytext_ptr) )
187 #ifndef YY_STRUCT_YY_BUFFER_STATE
188 #define YY_STRUCT_YY_BUFFER_STATE
189 struct yy_buffer_state
193 char *yy_ch_buf; /* input buffer */
194 char *yy_buf_pos; /* current position in input buffer */
196 /* Size of input buffer in bytes, not including room for EOB
199 yy_size_t yy_buf_size;
201 /* Number of characters read into yy_ch_buf, not including EOB
204 yy_size_t yy_n_chars;
206 /* Whether we "own" the buffer - i.e., we know we created it,
207 * and can realloc() it to grow it, and should free() it to
210 int yy_is_our_buffer;
212 /* Whether this is an "interactive" input source; if so, and
213 * if we're using stdio for input, then we want to use getc()
214 * instead of fread(), to make sure we stop fetching input after
217 int yy_is_interactive;
219 /* Whether we're considered to be at the beginning of a line.
220 * If so, '^' rules will be active on the next match, otherwise
225 int yy_bs_lineno; /**< The line count. */
226 int yy_bs_column; /**< The column count. */
228 /* Whether to try to fill the input buffer when we reach the
233 int yy_buffer_status;
235 #define YY_BUFFER_NEW 0
236 #define YY_BUFFER_NORMAL 1
237 /* When an EOF's been seen but there's still some text to process
238 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
239 * shouldn't try reading from the input source any more. We might
240 * still have a bunch of tokens to match, though, because of
241 * possible backing-up.
243 * When we actually see the EOF, we change the status to "new"
244 * (via yyrestart()), so that the user can continue scanning by
245 * just pointing yyin at a new input file.
247 #define YY_BUFFER_EOF_PENDING 2
250 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
252 /* Stack of input buffers. */
253 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
254 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
255 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
257 /* We provide macros for accessing buffer states in case in the
258 * future we want to put the buffer states in a more general
261 * Returns the top of the stack, or NULL.
263 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
264 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
267 /* Same as previous macro, but useful when we know that the buffer stack is not
268 * NULL or when we need an lvalue. For internal use only.
270 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
272 /* yy_hold_char holds the character lost when yytext is formed. */
273 static char yy_hold_char;
274 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
277 /* Points to current character in buffer. */
278 static char *yy_c_buf_p = (char *) 0;
279 static int yy_init = 0; /* whether we need to initialize */
280 static int yy_start = 0; /* start state number */
282 /* Flag which is used to allow yywrap()'s to do buffer switches
283 * instead of setting up a fresh yyin. A bit of a hack ...
285 static int yy_did_buffer_switch_on_eof;
287 void yyrestart (FILE *input_file );
288 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
289 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
290 void yy_delete_buffer (YY_BUFFER_STATE b );
291 void yy_flush_buffer (YY_BUFFER_STATE b );
292 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
293 void yypop_buffer_state (void );
295 static void yyensure_buffer_stack (void );
296 static void yy_load_buffer_state (void );
297 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
299 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
301 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
302 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
303 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
305 void *yyalloc (yy_size_t );
306 void *yyrealloc (void *,yy_size_t );
307 void yyfree (void * );
309 #define yy_new_buffer yy_create_buffer
311 #define yy_set_interactive(is_interactive) \
313 if ( ! YY_CURRENT_BUFFER ){ \
314 yyensure_buffer_stack (); \
315 YY_CURRENT_BUFFER_LVALUE = \
316 yy_create_buffer(yyin,YY_BUF_SIZE ); \
318 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
321 #define yy_set_bol(at_bol) \
323 if ( ! YY_CURRENT_BUFFER ){\
324 yyensure_buffer_stack (); \
325 YY_CURRENT_BUFFER_LVALUE = \
326 yy_create_buffer(yyin,YY_BUF_SIZE ); \
328 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
331 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
333 /* Begin user sect3 */
335 typedef unsigned char YY_CHAR;
337 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
339 typedef int yy_state_type;
346 #define yytext_ptr yytext
348 static yy_state_type yy_get_previous_state (void );
349 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
350 static int yy_get_next_buffer (void );
351 static void yy_fatal_error (yyconst char msg[] );
353 /* Done after the current pattern has been matched and before the
354 * corresponding action - sets up yytext.
356 #define YY_DO_BEFORE_ACTION \
357 (yytext_ptr) = yy_bp; \
358 yyleng = (size_t) (yy_cp - yy_bp); \
359 (yy_hold_char) = *yy_cp; \
361 (yy_c_buf_p) = yy_cp;
363 #define YY_NUM_RULES 121
364 #define YY_END_OF_BUFFER 122
365 /* This struct is not used in this scanner,
366 but its presence is necessary. */
369 flex_int32_t yy_verify;
372 static yyconst flex_int16_t yy_acclist[711] =
374 122, 120, 121, 3, 120, 121, 1, 121, 36, 120,
375 121, 120, 121, 11, 120, 121, 31, 120, 121, 33,
376 120, 121, 120, 121, 20, 120, 121, 21, 120, 121,
377 29, 120, 121, 27, 120, 121, 60, 120, 121, 28,
378 120, 121, 26, 120, 121, 30, 120, 121, 113, 120,
379 121, 113, 120, 121, 23, 120, 121, 22, 120, 121,
380 38, 120, 121, 37, 120, 121, 39, 120, 121, 25,
381 120, 121, 74, 110, 120, 121, 74, 110, 120, 121,
382 16, 120, 121, 120, 121, 18, 120, 121, 32, 120,
383 121, 74, 110, 120, 121, 74, 110, 120, 121, 74,
385 110, 120, 121, 74, 110, 120, 121, 74, 110, 120,
386 121, 74, 110, 120, 121, 74, 110, 120, 121, 74,
387 110, 120, 121, 74, 110, 120, 121, 74, 110, 120,
388 121, 74, 110, 120, 121, 74, 110, 120, 121, 74,
389 110, 120, 121, 74, 110, 120, 121, 74, 110, 120,
390 121, 74, 110, 120, 121, 12, 120, 121, 34, 120,
391 121, 14, 120, 121, 35, 120, 121, 3, 1, 53,
392 118, 44, 15, 56, 46, 116, 42, 58, 40, 59,
393 41, 61, 114, 4, 6, 43, 114, 112, 113, 113,
394 113, 113, 19, 13, 17, 48, 54, 52, 55, 49,
396 74, 110, 2, 45, 74, 110, 74, 110, 74, 110,
397 74, 110, 74, 110, 74, 110, 74, 110, 74, 110,
398 74, 110, 74, 83, 110, 74, 110, 74, 110, 74,
399 110, 74, 110, 74, 110, 74, 110, 74, 91, 110,
400 74, 110, 74, 110, 74, 110, 74, 110, 74, 110,
401 74, 110, 74, 110, 74, 110, 74, 110, 74, 110,
402 74, 110, 47, 57, 24, 114, 6, 112, 113, 112,
403 113, 115, 113, 113, 113, 111, 50, 51, 119, 117,
404 74, 110, 74, 110, 74, 110, 74, 110, 74, 110,
405 74, 110, 74, 110, 74, 110, 74, 110, 74, 75,
407 110, 74, 110, 74, 110, 74, 110, 74, 110, 74,
408 110, 74, 110, 74, 110, 74, 110, 74, 110, 74,
409 110, 74, 110, 74, 89, 110, 74, 110, 74, 110,
410 74, 93, 110, 74, 110, 74, 110, 74, 110, 74,
411 110, 74, 110, 74, 110, 74, 110, 74, 110, 74,
412 110, 74, 110, 74, 110, 74, 110, 74, 110, 74,
413 110, 74, 110, 74, 110, 114, 112, 113, 112, 113,
414 112, 113, 115, 113, 111, 111, 74, 110, 74, 110,
415 74, 110, 74, 110, 74, 110, 74, 110, 74, 110,
416 74, 110, 74, 110, 74, 110, 74, 76, 110, 74,
418 110, 74, 78, 110, 74, 79, 110, 74, 110, 74,
419 110, 74, 110, 74, 110, 74, 85, 110, 74, 86,
420 110, 74, 110, 74, 110, 74, 90, 110, 74, 110,
421 74, 94, 110, 74, 110, 74, 110, 74, 110, 74,
422 110, 74, 110, 74, 110, 74, 110, 74, 110, 74,
423 110, 74, 110, 74, 110, 74, 110, 74, 107, 110,
424 74, 110, 74, 110, 10, 112, 113, 111, 111, 111,
425 73, 74, 110, 62, 74, 110, 74, 110, 74, 110,
426 74, 110, 74, 110, 74, 110, 74, 110, 74, 110,
427 74, 110, 74, 77, 110, 74, 80, 110, 74, 110,
429 74, 110, 74, 110, 74, 110, 74, 88, 110, 74,
430 110, 74, 110, 74, 110, 74, 110, 74, 98, 110,
431 74, 110, 74, 110, 74, 110, 74, 110, 74, 110,
432 74, 110, 74, 105, 110, 74, 110, 74, 110, 74,
433 109, 110, 111, 74, 110, 74, 110, 74, 110, 74,
434 110, 74, 110, 74, 110, 74, 110, 74, 110, 74,
435 110, 74, 110, 74, 110, 74, 84, 110, 74, 87,
436 110, 74, 92, 110, 74, 110, 74, 110, 74, 97,
437 110, 74, 99, 110, 74, 100, 110, 74, 101, 110,
438 74, 102, 110, 74, 103, 110, 74, 110, 74, 110,
440 74, 110, 5, 63, 74, 110, 74, 110, 66, 74,
441 110, 74, 110, 74, 110, 74, 110, 74, 110, 74,
442 110, 74, 110, 74, 110, 74, 82, 110, 74, 110,
443 74, 110, 74, 104, 110, 74, 110, 74, 110, 74,
444 110, 74, 110, 68, 74, 110, 74, 110, 74, 110,
445 74, 110, 72, 74, 110, 74, 81, 110, 74, 95,
446 110, 74, 96, 110, 74, 106, 110, 74, 108, 110,
447 8, 9, 74, 110, 74, 110, 69, 74, 110, 74,
448 110, 74, 110, 7, 8, 74, 110, 74, 110, 71,
449 74, 110, 70, 74, 110, 65, 74, 110, 74, 110,
451 74, 110, 74, 110, 64, 74, 110, 67, 74, 110
454 static yyconst flex_int16_t yy_accept[377] =
456 1, 1, 1, 2, 4, 7, 9, 12, 14, 17,
457 20, 23, 25, 28, 31, 34, 37, 40, 43, 46,
458 49, 52, 55, 58, 61, 64, 67, 70, 73, 77,
459 81, 84, 86, 89, 92, 96, 100, 104, 108, 112,
460 116, 120, 124, 128, 132, 136, 140, 144, 148, 152,
461 156, 159, 162, 165, 168, 169, 170, 171, 171, 172,
462 172, 172, 172, 172, 173, 174, 175, 176, 176, 177,
463 177, 178, 179, 180, 181, 182, 183, 183, 184, 185,
464 186, 187, 188, 190, 191, 191, 192, 193, 193, 194,
465 195, 196, 197, 198, 199, 200, 201, 203, 203, 203,
467 204, 205, 207, 209, 211, 213, 215, 217, 219, 221,
468 223, 226, 228, 230, 232, 234, 236, 238, 241, 243,
469 245, 247, 249, 251, 253, 255, 257, 259, 261, 263,
470 264, 265, 265, 265, 265, 266, 266, 267, 267, 267,
471 268, 270, 272, 272, 273, 274, 275, 276, 277, 278,
472 279, 279, 280, 280, 280, 281, 281, 283, 285, 287,
473 289, 291, 293, 295, 297, 299, 302, 304, 306, 308,
474 310, 312, 314, 316, 318, 320, 322, 324, 327, 329,
475 331, 334, 336, 338, 340, 342, 344, 346, 348, 350,
476 352, 354, 356, 358, 360, 362, 364, 366, 366, 366,
478 366, 366, 367, 367, 369, 371, 373, 374, 375, 376,
479 377, 379, 381, 383, 385, 387, 389, 391, 393, 395,
480 397, 400, 402, 405, 408, 410, 412, 414, 416, 419,
481 422, 424, 426, 429, 431, 434, 436, 438, 440, 442,
482 444, 446, 448, 450, 452, 454, 456, 458, 461, 463,
483 465, 465, 466, 466, 466, 466, 468, 469, 470, 471,
484 474, 477, 479, 481, 483, 485, 487, 489, 491, 493,
485 496, 499, 501, 503, 505, 507, 510, 512, 514, 516,
486 518, 521, 523, 525, 527, 529, 531, 533, 536, 538,
487 540, 543, 543, 543, 543, 543, 544, 546, 548, 550,
489 552, 554, 556, 558, 560, 562, 564, 566, 569, 572,
490 575, 577, 579, 582, 585, 588, 591, 594, 597, 599,
491 601, 603, 603, 603, 604, 607, 609, 612, 614, 616,
492 618, 620, 622, 624, 626, 629, 631, 633, 636, 638,
493 640, 640, 640, 642, 644, 647, 649, 651, 653, 656,
494 659, 662, 665, 668, 671, 672, 672, 673, 675, 677,
495 680, 682, 684, 685, 686, 688, 690, 693, 696, 699,
496 701, 703, 705, 708, 711, 711
499 static yyconst flex_int32_t yy_ec[256] =
501 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
502 4, 4, 4, 1, 1, 1, 1, 1, 1, 1,
503 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
504 1, 5, 6, 7, 8, 1, 9, 10, 11, 12,
505 13, 14, 15, 16, 17, 18, 19, 20, 21, 21,
506 21, 21, 21, 21, 21, 22, 22, 23, 24, 25,
507 26, 27, 28, 1, 29, 30, 29, 29, 31, 32,
508 33, 33, 33, 33, 33, 34, 33, 33, 33, 33,
509 33, 33, 33, 33, 35, 33, 33, 36, 33, 33,
510 37, 38, 39, 40, 41, 1, 42, 43, 44, 45,
512 46, 47, 48, 49, 50, 33, 51, 52, 53, 54,
513 55, 56, 33, 57, 58, 59, 60, 61, 62, 63,
514 64, 65, 66, 67, 68, 69, 1, 1, 1, 1,
515 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
516 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
517 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
518 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
519 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
520 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
521 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
523 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
524 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
525 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
526 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
527 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
531 static yyconst flex_int32_t yy_meta[70] =
533 1, 2, 3, 1, 2, 1, 1, 1, 1, 1,
534 1, 4, 1, 1, 1, 2, 1, 1, 1, 5,
535 5, 5, 1, 1, 1, 2, 1, 1, 6, 6,
536 6, 6, 7, 7, 7, 7, 1, 1, 1, 1,
537 7, 6, 6, 6, 6, 6, 6, 7, 7, 7,
538 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
539 7, 7, 7, 7, 7, 1, 1, 1, 1
542 static yyconst flex_int16_t yy_base[389] =
544 0, 0, 571, 572, 68, 0, 544, 64, 69, 49,
545 67, 67, 572, 572, 543, 64, 572, 65, 63, 75,
546 108, 86, 541, 572, 86, 541, 60, 572, 0, 89,
547 572, 563, 572, 539, 58, 55, 507, 61, 72, 70,
548 79, 508, 93, 507, 515, 86, 496, 505, 503, 508,
549 572, 97, 572, 572, 147, 0, 572, 112, 572, 553,
550 135, 509, 497, 572, 572, 572, 572, 142, 572, 550,
551 572, 572, 572, 572, 572, 572, 534, 141, 164, 0,
552 572, 163, 182, 201, 209, 147, 46, 0, 572, 572,
553 572, 525, 572, 572, 572, 524, 0, 152, 154, 572,
555 572, 494, 206, 495, 488, 500, 487, 502, 489, 495,
556 481, 482, 479, 479, 482, 479, 476, 0, 115, 480,
557 153, 478, 93, 134, 482, 475, 120, 127, 480, 572,
558 572, 246, 482, 486, 572, 223, 572, 502, 0, 0,
559 220, 162, 237, 249, 173, 572, 239, 240, 572, 572,
560 199, 572, 523, 187, 572, 522, 469, 218, 468, 459,
561 467, 465, 473, 468, 453, 0, 461, 473, 468, 456,
562 220, 470, 468, 464, 456, 462, 465, 0, 451, 455,
563 0, 456, 453, 443, 441, 443, 445, 452, 438, 436,
564 436, 448, 438, 442, 446, 448, 437, 485, 437, 438,
566 264, 273, 458, 227, 572, 254, 572, 572, 263, 256,
567 432, 430, 423, 427, 421, 427, 424, 419, 428, 419,
568 0, 423, 0, 0, 414, 422, 411, 418, 0, 0,
569 412, 409, 0, 413, 0, 408, 408, 407, 404, 416,
570 406, 410, 415, 414, 412, 402, 407, 0, 395, 407,
571 449, 572, 397, 397, 297, 572, 254, 572, 269, 0,
572 408, 391, 389, 400, 395, 390, 384, 388, 395, 0,
573 0, 386, 387, 392, 383, 0, 390, 376, 384, 379,
574 0, 387, 384, 386, 370, 379, 381, 0, 372, 375,
575 0, 378, 381, 408, 402, 572, 379, 369, 359, 363,
577 362, 355, 357, 367, 357, 351, 351, 0, 0, 0,
578 363, 364, 0, 0, 0, 0, 0, 0, 360, 360,
579 353, 399, 398, 572, 0, 359, 0, 343, 354, 347,
580 325, 329, 305, 282, 0, 267, 263, 0, 274, 272,
581 0, 314, 256, 263, 0, 260, 266, 268, 0, 0,
582 0, 0, 0, 0, 292, 279, 572, 190, 191, 0,
583 182, 198, 572, 215, 174, 164, 0, 0, 164, 145,
584 96, 56, 0, 0, 572, 325, 332, 339, 342, 349,
585 352, 358, 365, 371, 378, 380, 387, 391
588 static yyconst flex_int16_t yy_def[389] =
590 375, 1, 375, 375, 375, 376, 375, 377, 375, 375,
591 375, 378, 375, 375, 375, 375, 375, 375, 375, 375,
592 375, 375, 375, 375, 375, 375, 375, 375, 379, 379,
593 375, 375, 375, 375, 379, 379, 379, 379, 379, 379,
594 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
595 375, 375, 375, 375, 375, 376, 375, 377, 375, 377,
596 375, 375, 375, 375, 375, 375, 375, 378, 375, 378,
597 375, 375, 375, 375, 375, 375, 375, 375, 375, 380,
598 375, 375, 375, 375, 375, 375, 375, 381, 375, 375,
599 375, 375, 375, 375, 375, 375, 379, 382, 383, 375,
601 375, 379, 379, 379, 379, 379, 379, 379, 379, 379,
602 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
603 379, 379, 379, 379, 379, 379, 379, 379, 379, 375,
604 375, 375, 375, 375, 375, 375, 375, 375, 384, 380,
605 375, 375, 375, 375, 375, 375, 375, 381, 375, 375,
606 382, 375, 382, 383, 375, 383, 379, 379, 379, 379,
607 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
608 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
609 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
610 379, 379, 379, 379, 379, 379, 379, 385, 375, 375,
612 375, 375, 384, 375, 375, 375, 375, 375, 375, 375,
613 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
614 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
615 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
616 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
617 385, 375, 375, 375, 375, 375, 375, 375, 375, 379,
618 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
619 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
620 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
621 379, 375, 375, 375, 375, 375, 379, 379, 379, 379,
623 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
624 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
625 379, 375, 375, 375, 379, 379, 379, 379, 379, 379,
626 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
627 386, 387, 379, 379, 379, 379, 379, 379, 379, 379,
628 379, 379, 379, 379, 388, 387, 375, 379, 379, 379,
629 379, 379, 375, 388, 379, 379, 379, 379, 379, 379,
630 379, 379, 379, 379, 0, 375, 375, 375, 375, 375,
631 375, 375, 375, 375, 375, 375, 375, 375
634 static yyconst flex_int16_t yy_nxt[642] =
636 4, 5, 6, 5, 5, 7, 8, 9, 10, 11,
637 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
638 22, 22, 23, 24, 25, 26, 27, 28, 29, 29,
639 29, 29, 29, 30, 29, 29, 31, 32, 33, 34,
640 35, 36, 37, 38, 39, 40, 41, 42, 29, 43,
641 29, 44, 29, 29, 29, 29, 45, 46, 47, 48,
642 49, 50, 29, 29, 29, 51, 52, 53, 54, 55,
643 59, 55, 55, 61, 64, 65, 66, 69, 72, 147,
644 77, 74, 78, 78, 78, 95, 96, 102, 79, 73,
645 75, 76, 67, 80, 90, 98, 374, 147, 103, 99,
647 81, 60, 107, 82, 70, 84, 84, 84, 91, 108,
648 92, 93, 104, 62, 105, 109, 85, 110, 59, 86,
649 87, 112, 130, 113, 63, 82, 111, 83, 83, 84,
650 115, 85, 114, 116, 122, 123, 373, 86, 85, 118,
651 187, 86, 87, 88, 124, 87, 119, 125, 55, 60,
652 55, 55, 69, 85, 132, 132, 132, 188, 152, 86,
653 78, 78, 78, 131, 155, 138, 180, 87, 138, 193,
654 88, 136, 137, 181, 137, 189, 195, 194, 196, 70,
655 145, 146, 78, 78, 78, 372, 136, 137, 139, 153,
656 190, 156, 137, 136, 137, 206, 137, 155, 145, 82,
658 183, 83, 83, 84, 371, 152, 146, 146, 136, 137,
659 184, 185, 85, 206, 137, 141, 142, 370, 82, 369,
660 84, 84, 84, 143, 156, 143, 363, 85, 144, 144,
661 144, 85, 146, 141, 86, 87, 153, 201, 368, 201,
662 367, 142, 202, 202, 202, 366, 85, 158, 365, 159,
663 198, 160, 86, 204, 205, 161, 144, 144, 144, 162,
664 87, 205, 163, 164, 165, 132, 132, 132, 144, 144,
665 144, 204, 208, 209, 210, 212, 213, 225, 226, 205,
666 207, 357, 207, 202, 202, 202, 205, 256, 258, 259,
667 208, 209, 202, 202, 202, 207, 257, 258, 294, 210,
669 207, 294, 296, 363, 137, 256, 137, 259, 362, 361,
670 295, 360, 359, 258, 257, 358, 357, 354, 353, 137,
671 296, 352, 258, 351, 137, 56, 56, 350, 56, 56,
672 56, 56, 58, 58, 58, 58, 58, 58, 58, 68,
673 68, 68, 68, 68, 68, 68, 97, 97, 97, 140,
674 140, 349, 140, 140, 140, 140, 148, 148, 151, 151,
675 151, 151, 151, 151, 151, 154, 154, 154, 154, 154,
676 154, 154, 203, 348, 347, 203, 203, 203, 251, 251,
677 251, 251, 251, 251, 251, 355, 355, 356, 356, 356,
678 356, 356, 356, 356, 364, 364, 364, 364, 346, 345,
680 344, 343, 342, 341, 340, 339, 338, 337, 336, 335,
681 334, 333, 332, 331, 330, 329, 328, 327, 326, 325,
682 324, 295, 323, 322, 321, 320, 319, 318, 317, 316,
683 315, 314, 313, 312, 311, 310, 309, 308, 307, 306,
684 305, 304, 303, 302, 301, 300, 299, 298, 297, 293,
685 292, 252, 291, 290, 289, 288, 287, 286, 285, 284,
686 283, 282, 281, 280, 279, 278, 277, 276, 275, 274,
687 273, 272, 271, 270, 269, 268, 267, 266, 265, 264,
688 263, 262, 261, 260, 255, 254, 253, 252, 250, 249,
689 248, 247, 246, 245, 244, 243, 242, 241, 240, 239,
691 238, 237, 236, 235, 234, 233, 232, 231, 230, 229,
692 228, 227, 224, 223, 222, 221, 220, 219, 218, 217,
693 216, 215, 214, 211, 375, 375, 139, 200, 199, 197,
694 192, 191, 186, 182, 179, 178, 177, 176, 175, 174,
695 173, 172, 171, 170, 169, 168, 167, 166, 157, 150,
696 149, 135, 375, 134, 133, 375, 129, 128, 127, 126,
697 121, 120, 117, 106, 101, 100, 94, 89, 71, 57,
698 375, 3, 375, 375, 375, 375, 375, 375, 375, 375,
699 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
700 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
702 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
703 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
704 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
705 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
709 static yyconst flex_int16_t yy_chk[642] =
711 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
712 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
713 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
714 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
715 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
716 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
717 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
718 8, 5, 5, 9, 10, 10, 11, 12, 16, 87,
719 19, 18, 19, 19, 19, 27, 27, 35, 20, 16,
720 18, 18, 11, 20, 25, 30, 372, 87, 35, 30,
722 20, 8, 38, 22, 12, 22, 22, 22, 25, 38,
723 25, 25, 36, 9, 36, 38, 22, 39, 58, 22,
724 22, 40, 52, 40, 9, 21, 39, 21, 21, 21,
725 41, 22, 40, 41, 46, 46, 371, 22, 21, 43,
726 123, 21, 21, 21, 46, 22, 43, 46, 55, 58,
727 55, 55, 68, 21, 61, 61, 61, 123, 98, 21,
728 78, 78, 78, 52, 99, 79, 119, 21, 79, 127,
729 21, 78, 78, 119, 78, 124, 128, 127, 128, 68,
730 86, 86, 82, 82, 82, 370, 78, 78, 79, 98,
731 124, 99, 78, 82, 82, 142, 82, 154, 86, 83,
733 121, 83, 83, 83, 369, 151, 86, 145, 82, 82,
734 121, 121, 83, 142, 82, 83, 83, 366, 84, 365,
735 84, 84, 84, 85, 154, 85, 364, 83, 85, 85,
736 85, 84, 145, 83, 84, 84, 151, 136, 362, 136,
737 361, 83, 136, 136, 136, 359, 84, 103, 358, 103,
738 132, 103, 84, 141, 141, 103, 143, 143, 143, 103,
739 84, 204, 103, 103, 103, 132, 132, 132, 144, 144,
740 144, 141, 147, 148, 148, 158, 158, 171, 171, 141,
741 144, 356, 144, 201, 201, 201, 204, 206, 257, 210,
742 147, 148, 202, 202, 202, 144, 209, 209, 255, 148,
744 144, 255, 259, 355, 202, 206, 202, 210, 348, 347,
745 255, 346, 344, 257, 209, 343, 342, 340, 339, 202,
746 259, 337, 209, 336, 202, 376, 376, 334, 376, 376,
747 376, 376, 377, 377, 377, 377, 377, 377, 377, 378,
748 378, 378, 378, 378, 378, 378, 379, 379, 379, 380,
749 380, 333, 380, 380, 380, 380, 381, 381, 382, 382,
750 382, 382, 382, 382, 382, 383, 383, 383, 383, 383,
751 383, 383, 384, 332, 331, 384, 384, 384, 385, 385,
752 385, 385, 385, 385, 385, 386, 386, 387, 387, 387,
753 387, 387, 387, 387, 388, 388, 388, 388, 330, 329,
755 328, 326, 323, 322, 321, 320, 319, 312, 311, 307,
756 306, 305, 304, 303, 302, 301, 300, 299, 298, 297,
757 295, 294, 293, 292, 290, 289, 287, 286, 285, 284,
758 283, 282, 280, 279, 278, 277, 275, 274, 273, 272,
759 269, 268, 267, 266, 265, 264, 263, 262, 261, 254,
760 253, 251, 250, 249, 247, 246, 245, 244, 243, 242,
761 241, 240, 239, 238, 237, 236, 234, 232, 231, 228,
762 227, 226, 225, 222, 220, 219, 218, 217, 216, 215,
763 214, 213, 212, 211, 203, 200, 199, 198, 197, 196,
764 195, 194, 193, 192, 191, 190, 189, 188, 187, 186,
766 185, 184, 183, 182, 180, 179, 177, 176, 175, 174,
767 173, 172, 170, 169, 168, 167, 165, 164, 163, 162,
768 161, 160, 159, 157, 156, 153, 138, 134, 133, 129,
769 126, 125, 122, 120, 117, 116, 115, 114, 113, 112,
770 111, 110, 109, 108, 107, 106, 105, 104, 102, 96,
771 92, 77, 70, 63, 62, 60, 50, 49, 48, 47,
772 45, 44, 42, 37, 34, 32, 26, 23, 15, 7,
773 3, 375, 375, 375, 375, 375, 375, 375, 375, 375,
774 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
775 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
777 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
778 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
779 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
780 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
784 extern int yy_flex_debug;
785 int yy_flex_debug = 0;
787 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
788 static char *yy_full_match;
792 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
793 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
798 #define yymore() yymore_used_but_not_detected
799 #define YY_MORE_ADJ 0
800 #define YY_RESTORE_YY_MORE_OFFSET
802 #line 1 "scannerlexer.l"
804 * GObject introspection: C lexer
806 * Copyright (c) 1997 Sandro Sigala <ssigala@globalnet.it>
807 * Copyright (c) 2007-2008 Jürg Billeter <j@bitron.ch>
808 * Copyright (c) 2010 Andreas Rottmann <a.rottmann@gmx.at>
810 * All rights reserved.
812 * Redistribution and use in source and binary forms, with or without
813 * modification, are permitted provided that the following conditions
815 * 1. Redistributions of source code must retain the above copyright
816 * notice, this list of conditions and the following disclaimer.
817 * 2. Redistributions in binary form must reproduce the above copyright
818 * notice, this list of conditions and the following disclaimer in the
819 * documentation and/or other materials provided with the distribution.
821 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
822 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
823 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
824 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
825 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
826 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
827 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
828 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
829 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
830 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
832 #line 32 "scannerlexer.l"
837 #include "sourcescanner.h"
838 #include "scannerparser.h"
839 #include "grealpath.h"
845 #define YY_BUF_SIZE 1048576
847 extern int yylex (GISourceScanner *scanner);
848 #define YY_DECL int yylex (GISourceScanner *scanner)
849 static int yywrap (void);
850 static void parse_comment (GISourceScanner *scanner);
851 static void parse_trigraph (GISourceScanner *scanner);
852 static void process_linemarks (GISourceScanner *scanner);
853 static int check_identifier (GISourceScanner *scanner, const char *);
854 static int parse_ignored_macro (void);
855 #line 856 "scannerlexer.c"
859 #ifndef YY_NO_UNISTD_H
860 /* Special case for "unistd.h", since it is non-ANSI. We include it way
861 * down here because we want the user's section 1 to have been scanned first.
862 * The user has a chance to override it with an option.
867 #ifndef YY_EXTRA_TYPE
868 #define YY_EXTRA_TYPE void *
871 static int yy_init_globals (void );
873 /* Accessor methods to globals.
874 These are made visible to non-reentrant scanners for convenience. */
876 int yylex_destroy (void );
878 int yyget_debug (void );
880 void yyset_debug (int debug_flag );
882 YY_EXTRA_TYPE yyget_extra (void );
884 void yyset_extra (YY_EXTRA_TYPE user_defined );
886 FILE *yyget_in (void );
888 void yyset_in (FILE * in_str );
890 FILE *yyget_out (void );
892 void yyset_out (FILE * out_str );
894 yy_size_t yyget_leng (void );
896 char *yyget_text (void );
898 int yyget_lineno (void );
900 void yyset_lineno (int line_number );
902 /* Macros after this point can all be overridden by user definitions in
906 #ifndef YY_SKIP_YYWRAP
908 extern "C" int yywrap (void );
910 extern int yywrap (void );
915 static void yy_flex_strncpy (char *,yyconst char *,int );
918 #ifdef YY_NEED_STRLEN
919 static int yy_flex_strlen (yyconst char * );
925 static int yyinput (void );
927 static int input (void );
932 /* Amount of stuff to slurp up with each read. */
933 #ifndef YY_READ_BUF_SIZE
934 #define YY_READ_BUF_SIZE 8192
937 /* Copy whatever the last rule matched to the standard output. */
939 /* This used to be an fputs(), but since the string might contain NUL's,
940 * we now use fwrite().
942 #define ECHO fwrite( yytext, yyleng, 1, yyout )
945 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
946 * is returned in "result".
949 #define YY_INPUT(buf,result,max_size) \
950 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
954 for ( n = 0; n < max_size && \
955 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
958 buf[n++] = (char) c; \
959 if ( c == EOF && ferror( yyin ) ) \
960 YY_FATAL_ERROR( "input in flex scanner failed" ); \
966 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
968 if( errno != EINTR) \
970 YY_FATAL_ERROR( "input in flex scanner failed" ); \
981 /* No semi-colon after return; correct usage is to write "yyterminate();" -
982 * we don't want an extra ';' after the "return" because that will cause
983 * some compilers to complain about unreachable statements.
986 #define yyterminate() return YY_NULL
989 /* Number of entries by which start-condition stack grows. */
990 #ifndef YY_START_STACK_INCR
991 #define YY_START_STACK_INCR 25
994 /* Report a fatal error. */
995 #ifndef YY_FATAL_ERROR
996 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
999 /* end tables serialization structures and prototypes */
1001 /* Default declaration of generated scanner - a define so the user can
1002 * easily add parameters.
1005 #define YY_DECL_IS_OURS 1
1007 extern int yylex (void);
1009 #define YY_DECL int yylex (void)
1010 #endif /* !YY_DECL */
1012 /* Code executed at the beginning of each rule, after yytext and yyleng
1015 #ifndef YY_USER_ACTION
1016 #define YY_USER_ACTION
1019 /* Code executed at the end of each rule. */
1021 #define YY_BREAK break;
1024 #define YY_RULE_SETUP \
1027 /** The main scanner function which does all the work.
1031 register yy_state_type yy_current_state;
1032 register char *yy_cp, *yy_bp;
1033 register int yy_act;
1035 #line 65 "scannerlexer.l"
1038 #line 1039 "scannerlexer.c"
1048 /* Create the reject buffer large enough to save one state per allowed character. */
1049 if ( ! (yy_state_buf) )
1050 (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
1051 if ( ! (yy_state_buf) )
1052 YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
1055 (yy_start) = 1; /* first start state */
1063 if ( ! YY_CURRENT_BUFFER ) {
1064 yyensure_buffer_stack ();
1065 YY_CURRENT_BUFFER_LVALUE =
1066 yy_create_buffer(yyin,YY_BUF_SIZE );
1069 yy_load_buffer_state( );
1072 while ( 1 ) /* loops until end-of-file is reached */
1074 yy_cp = (yy_c_buf_p);
1076 /* Support of yytext. */
1077 *yy_cp = (yy_hold_char);
1079 /* yy_bp points to the position in yy_ch_buf of the start of
1084 yy_current_state = (yy_start);
1086 (yy_state_ptr) = (yy_state_buf);
1087 *(yy_state_ptr)++ = yy_current_state;
1092 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1093 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1095 yy_current_state = (int) yy_def[yy_current_state];
1096 if ( yy_current_state >= 376 )
1097 yy_c = yy_meta[(unsigned int) yy_c];
1099 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1100 *(yy_state_ptr)++ = yy_current_state;
1103 while ( yy_base[yy_current_state] != 572 );
1106 yy_current_state = *--(yy_state_ptr);
1107 (yy_lp) = yy_accept[yy_current_state];
1108 find_rule: /* we branch to this label when backing up */
1109 for ( ; ; ) /* until we find what rule we matched */
1111 if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1113 yy_act = yy_acclist[(yy_lp)];
1115 (yy_full_match) = yy_cp;
1120 yy_current_state = *--(yy_state_ptr);
1121 (yy_lp) = yy_accept[yy_current_state];
1124 YY_DO_BEFORE_ACTION;
1126 do_action: /* This label is used only to access EOF actions. */
1129 { /* beginning of action switch */
1131 /* rule 1 can match eol */
1133 #line 67 "scannerlexer.l"
1134 { strncpy(linebuf, yytext+1, sizeof(linebuf)); /* save the next line */
1135 linebuf[sizeof(linebuf)-1]='\0';
1136 /* printf("%4d:%s\n",lineno,linebuf); */
1137 yyless(1); /* give back all but the \n to rescan */
1142 /* rule 2 can match eol */
1144 #line 73 "scannerlexer.l"
1149 #line 74 "scannerlexer.l"
1150 { /* Ignore whitespace. */ }
1154 #line 76 "scannerlexer.l"
1155 { parse_comment(scanner); }
1159 #line 77 "scannerlexer.l"
1160 { parse_trigraph(scanner); }
1164 #line 78 "scannerlexer.l"
1169 #line 80 "scannerlexer.l"
1170 { yyless (yyleng - 1); return FUNCTION_MACRO; }
1174 #line 81 "scannerlexer.l"
1175 { return OBJECT_MACRO; }
1178 /* rule 9 can match eol */
1180 #line 82 "scannerlexer.l"
1181 { /* Ignore pragma. */ }
1184 /* rule 10 can match eol */
1186 #line 84 "scannerlexer.l"
1187 { process_linemarks(scanner); }
1191 #line 85 "scannerlexer.l"
1196 #line 86 "scannerlexer.l"
1201 #line 87 "scannerlexer.l"
1206 #line 88 "scannerlexer.l"
1211 #line 89 "scannerlexer.l"
1216 #line 90 "scannerlexer.l"
1221 #line 91 "scannerlexer.l"
1226 #line 92 "scannerlexer.l"
1231 #line 93 "scannerlexer.l"
1236 #line 94 "scannerlexer.l"
1241 #line 95 "scannerlexer.l"
1246 #line 96 "scannerlexer.l"
1251 #line 97 "scannerlexer.l"
1256 #line 98 "scannerlexer.l"
1257 { return ELLIPSIS; }
1261 #line 99 "scannerlexer.l"
1266 #line 100 "scannerlexer.l"
1271 #line 101 "scannerlexer.l"
1276 #line 102 "scannerlexer.l"
1281 #line 103 "scannerlexer.l"
1286 #line 104 "scannerlexer.l"
1291 #line 105 "scannerlexer.l"
1296 #line 106 "scannerlexer.l"
1301 #line 107 "scannerlexer.l"
1306 #line 108 "scannerlexer.l"
1311 #line 109 "scannerlexer.l"
1316 #line 110 "scannerlexer.l"
1321 #line 111 "scannerlexer.l"
1326 #line 112 "scannerlexer.l"
1331 #line 113 "scannerlexer.l"
1336 #line 114 "scannerlexer.l"
1341 #line 115 "scannerlexer.l"
1346 #line 116 "scannerlexer.l"
1351 #line 117 "scannerlexer.l"
1356 #line 118 "scannerlexer.l"
1361 #line 119 "scannerlexer.l"
1366 #line 120 "scannerlexer.l"
1371 #line 121 "scannerlexer.l"
1376 #line 122 "scannerlexer.l"
1381 #line 123 "scannerlexer.l"
1386 #line 124 "scannerlexer.l"
1391 #line 125 "scannerlexer.l"
1396 #line 126 "scannerlexer.l"
1401 #line 127 "scannerlexer.l"
1406 #line 128 "scannerlexer.l"
1411 #line 129 "scannerlexer.l"
1416 #line 130 "scannerlexer.l"
1421 #line 131 "scannerlexer.l"
1426 #line 132 "scannerlexer.l"
1427 { return PLUSPLUS; }
1431 #line 133 "scannerlexer.l"
1432 { return MINUSMINUS; }
1436 #line 134 "scannerlexer.l"
1441 #line 135 "scannerlexer.l"
1446 #line 137 "scannerlexer.l"
1447 { if (!parse_ignored_macro()) REJECT; }
1451 #line 138 "scannerlexer.l"
1452 { if (!parse_ignored_macro()) REJECT; }
1456 #line 139 "scannerlexer.l"
1457 { if (!parse_ignored_macro()) REJECT; }
1461 #line 140 "scannerlexer.l"
1462 { if (!parse_ignored_macro()) REJECT; }
1466 #line 141 "scannerlexer.l"
1471 #line 142 "scannerlexer.l"
1472 { return EXTENSION; }
1476 #line 143 "scannerlexer.l"
1481 #line 144 "scannerlexer.l"
1482 { if (!parse_ignored_macro()) REJECT; }
1486 #line 145 "scannerlexer.l"
1491 #line 146 "scannerlexer.l"
1492 { return RESTRICT; }
1496 #line 147 "scannerlexer.l"
1497 { if (!parse_ignored_macro()) REJECT; }
1501 #line 148 "scannerlexer.l"
1506 #line 150 "scannerlexer.l"
1507 { if (scanner->macro_scan) return IDENTIFIER; else REJECT; }
1511 #line 152 "scannerlexer.l"
1512 { if (!parse_ignored_macro()) REJECT; }
1516 #line 153 "scannerlexer.l"
1521 #line 154 "scannerlexer.l"
1526 #line 155 "scannerlexer.l"
1531 #line 156 "scannerlexer.l"
1536 #line 157 "scannerlexer.l"
1541 #line 158 "scannerlexer.l"
1542 { return CONTINUE; }
1546 #line 159 "scannerlexer.l"
1551 #line 160 "scannerlexer.l"
1556 #line 161 "scannerlexer.l"
1561 #line 162 "scannerlexer.l"
1566 #line 163 "scannerlexer.l"
1571 #line 164 "scannerlexer.l"
1576 #line 165 "scannerlexer.l"
1581 #line 166 "scannerlexer.l"
1586 #line 167 "scannerlexer.l"
1591 #line 168 "scannerlexer.l"
1596 #line 169 "scannerlexer.l"
1601 #line 170 "scannerlexer.l"
1606 #line 171 "scannerlexer.l"
1611 #line 172 "scannerlexer.l"
1612 { return REGISTER; }
1616 #line 173 "scannerlexer.l"
1617 { return RESTRICT; }
1621 #line 174 "scannerlexer.l"
1626 #line 175 "scannerlexer.l"
1631 #line 176 "scannerlexer.l"
1636 #line 177 "scannerlexer.l"
1641 #line 178 "scannerlexer.l"
1646 #line 179 "scannerlexer.l"
1651 #line 180 "scannerlexer.l"
1656 #line 181 "scannerlexer.l"
1661 #line 182 "scannerlexer.l"
1666 #line 183 "scannerlexer.l"
1667 { return UNSIGNED; }
1671 #line 184 "scannerlexer.l"
1676 #line 185 "scannerlexer.l"
1677 { return VOLATILE; }
1681 #line 186 "scannerlexer.l"
1686 #line 188 "scannerlexer.l"
1687 { return check_identifier(scanner, yytext); }
1691 #line 190 "scannerlexer.l"
1696 #line 191 "scannerlexer.l"
1701 #line 192 "scannerlexer.l"
1706 #line 194 "scannerlexer.l"
1707 { return FLOATING; }
1711 #line 195 "scannerlexer.l"
1712 { return FLOATING; }
1715 /* rule 116 can match eol */
1717 #line 197 "scannerlexer.l"
1718 { return CHARACTER; }
1721 /* rule 117 can match eol */
1723 #line 198 "scannerlexer.l"
1724 { return CHARACTER; }
1727 /* rule 118 can match eol */
1729 #line 200 "scannerlexer.l"
1733 /* rule 119 can match eol */
1735 #line 201 "scannerlexer.l"
1740 #line 203 "scannerlexer.l"
1741 { if (yytext[0]) fprintf(stderr, "%s:%d: unexpected character `%c'\n", scanner->current_filename, lineno, yytext[0]); }
1745 #line 205 "scannerlexer.l"
1748 #line 1749 "scannerlexer.c"
1749 case YY_STATE_EOF(INITIAL):
1752 case YY_END_OF_BUFFER:
1754 /* Amount of text matched not including the EOB char. */
1755 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1757 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1758 *yy_cp = (yy_hold_char);
1759 YY_RESTORE_YY_MORE_OFFSET
1761 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1763 /* We're scanning a new file or input source. It's
1764 * possible that this happened because the user
1765 * just pointed yyin at a new source and called
1766 * yylex(). If so, then we have to assure
1767 * consistency between YY_CURRENT_BUFFER and our
1768 * globals. Here is the right place to do so, because
1769 * this is the first action (other than possibly a
1770 * back-up) that will match for the new input source.
1772 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1773 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1774 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1777 /* Note that here we test for yy_c_buf_p "<=" to the position
1778 * of the first EOB in the buffer, since yy_c_buf_p will
1779 * already have been incremented past the NUL character
1780 * (since all states make transitions on EOB to the
1781 * end-of-buffer state). Contrast this with the test
1784 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1785 { /* This was really a NUL. */
1786 yy_state_type yy_next_state;
1788 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1790 yy_current_state = yy_get_previous_state( );
1792 /* Okay, we're now positioned to make the NUL
1793 * transition. We couldn't have
1794 * yy_get_previous_state() go ahead and do it
1795 * for us because it doesn't know how to deal
1796 * with the possibility of jamming (and we don't
1797 * want to build jamming into it because then it
1798 * will run more slowly).
1801 yy_next_state = yy_try_NUL_trans( yy_current_state );
1803 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1805 if ( yy_next_state )
1807 /* Consume the NUL. */
1808 yy_cp = ++(yy_c_buf_p);
1809 yy_current_state = yy_next_state;
1815 yy_cp = (yy_c_buf_p);
1816 goto yy_find_action;
1820 else switch ( yy_get_next_buffer( ) )
1822 case EOB_ACT_END_OF_FILE:
1824 (yy_did_buffer_switch_on_eof) = 0;
1828 /* Note: because we've taken care in
1829 * yy_get_next_buffer() to have set up
1830 * yytext, we can now set up
1831 * yy_c_buf_p so that if some total
1832 * hoser (like flex itself) wants to
1833 * call the scanner after we return the
1834 * YY_NULL, it'll still work - another
1835 * YY_NULL will get returned.
1837 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1839 yy_act = YY_STATE_EOF(YY_START);
1845 if ( ! (yy_did_buffer_switch_on_eof) )
1851 case EOB_ACT_CONTINUE_SCAN:
1853 (yytext_ptr) + yy_amount_of_matched_text;
1855 yy_current_state = yy_get_previous_state( );
1857 yy_cp = (yy_c_buf_p);
1858 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1861 case EOB_ACT_LAST_MATCH:
1863 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1865 yy_current_state = yy_get_previous_state( );
1867 yy_cp = (yy_c_buf_p);
1868 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1869 goto yy_find_action;
1876 "fatal flex scanner internal error--no action found" );
1877 } /* end of action switch */
1878 } /* end of scanning one token */
1879 } /* end of yylex */
1881 /* yy_get_next_buffer - try to read in a new buffer
1883 * Returns a code representing an action:
1884 * EOB_ACT_LAST_MATCH -
1885 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1886 * EOB_ACT_END_OF_FILE - end of file
1888 static int yy_get_next_buffer (void)
1890 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1891 register char *source = (yytext_ptr);
1892 register int number_to_move, i;
1895 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1897 "fatal flex scanner internal error--end of buffer missed" );
1899 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1900 { /* Don't try to fill the buffer, so this is an EOF. */
1901 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1903 /* We matched a single character, the EOB, so
1904 * treat this as a final EOF.
1906 return EOB_ACT_END_OF_FILE;
1911 /* We matched some text prior to the EOB, first
1914 return EOB_ACT_LAST_MATCH;
1918 /* Try to read more data. */
1920 /* First move last chars to start of buffer. */
1921 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1923 for ( i = 0; i < number_to_move; ++i )
1924 *(dest++) = *(source++);
1926 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1927 /* don't do the read, it's not guaranteed to return an EOF,
1930 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1934 yy_size_t num_to_read =
1935 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1937 while ( num_to_read <= 0 )
1938 { /* Not enough room in the buffer - grow it. */
1941 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1945 if ( num_to_read > YY_READ_BUF_SIZE )
1946 num_to_read = YY_READ_BUF_SIZE;
1948 /* Read in more data. */
1949 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1950 (yy_n_chars), num_to_read );
1952 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1955 if ( (yy_n_chars) == 0 )
1957 if ( number_to_move == YY_MORE_ADJ )
1959 ret_val = EOB_ACT_END_OF_FILE;
1965 ret_val = EOB_ACT_LAST_MATCH;
1966 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1967 YY_BUFFER_EOF_PENDING;
1972 ret_val = EOB_ACT_CONTINUE_SCAN;
1974 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1975 /* Extend the array by 50%, plus the number we really need. */
1976 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1977 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1978 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1979 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1982 (yy_n_chars) += number_to_move;
1983 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1984 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1986 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1991 /* yy_get_previous_state - get the state just before the EOB char was reached */
1993 static yy_state_type yy_get_previous_state (void)
1995 register yy_state_type yy_current_state;
1996 register char *yy_cp;
1998 yy_current_state = (yy_start);
2000 (yy_state_ptr) = (yy_state_buf);
2001 *(yy_state_ptr)++ = yy_current_state;
2003 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2005 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2006 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2008 yy_current_state = (int) yy_def[yy_current_state];
2009 if ( yy_current_state >= 376 )
2010 yy_c = yy_meta[(unsigned int) yy_c];
2012 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2013 *(yy_state_ptr)++ = yy_current_state;
2016 return yy_current_state;
2019 /* yy_try_NUL_trans - try to make a transition on the NUL character
2022 * next_state = yy_try_NUL_trans( current_state );
2024 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2026 register int yy_is_jam;
2028 register YY_CHAR yy_c = 1;
2029 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2031 yy_current_state = (int) yy_def[yy_current_state];
2032 if ( yy_current_state >= 376 )
2033 yy_c = yy_meta[(unsigned int) yy_c];
2035 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2036 yy_is_jam = (yy_current_state == 375);
2038 *(yy_state_ptr)++ = yy_current_state;
2040 return yy_is_jam ? 0 : yy_current_state;
2045 static int yyinput (void)
2047 static int input (void)
2053 *(yy_c_buf_p) = (yy_hold_char);
2055 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2057 /* yy_c_buf_p now points to the character we want to return.
2058 * If this occurs *before* the EOB characters, then it's a
2059 * valid NUL; if not, then we've hit the end of the buffer.
2061 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2062 /* This was really a NUL. */
2063 *(yy_c_buf_p) = '\0';
2066 { /* need more input */
2067 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
2070 switch ( yy_get_next_buffer( ) )
2072 case EOB_ACT_LAST_MATCH:
2073 /* This happens because yy_g_n_b()
2074 * sees that we've accumulated a
2075 * token and flags that we need to
2076 * try matching the token before
2077 * proceeding. But for input(),
2078 * there's no matching to consider.
2079 * So convert the EOB_ACT_LAST_MATCH
2080 * to EOB_ACT_END_OF_FILE.
2083 /* Reset buffer status. */
2088 case EOB_ACT_END_OF_FILE:
2093 if ( ! (yy_did_buffer_switch_on_eof) )
2102 case EOB_ACT_CONTINUE_SCAN:
2103 (yy_c_buf_p) = (yytext_ptr) + offset;
2109 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2110 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2111 (yy_hold_char) = *++(yy_c_buf_p);
2115 #endif /* ifndef YY_NO_INPUT */
2117 /** Immediately switch to a different input stream.
2118 * @param input_file A readable stream.
2120 * @note This function does not reset the start condition to @c INITIAL .
2122 void yyrestart (FILE * input_file )
2125 if ( ! YY_CURRENT_BUFFER ){
2126 yyensure_buffer_stack ();
2127 YY_CURRENT_BUFFER_LVALUE =
2128 yy_create_buffer(yyin,YY_BUF_SIZE );
2131 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2132 yy_load_buffer_state( );
2135 /** Switch to a different input buffer.
2136 * @param new_buffer The new input buffer.
2139 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2142 /* TODO. We should be able to replace this entire function body
2144 * yypop_buffer_state();
2145 * yypush_buffer_state(new_buffer);
2147 yyensure_buffer_stack ();
2148 if ( YY_CURRENT_BUFFER == new_buffer )
2151 if ( YY_CURRENT_BUFFER )
2153 /* Flush out information for old buffer. */
2154 *(yy_c_buf_p) = (yy_hold_char);
2155 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2156 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2159 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2160 yy_load_buffer_state( );
2162 /* We don't actually know whether we did this switch during
2163 * EOF (yywrap()) processing, but the only time this flag
2164 * is looked at is after yywrap() is called, so it's safe
2165 * to go ahead and always set it.
2167 (yy_did_buffer_switch_on_eof) = 1;
2170 static void yy_load_buffer_state (void)
2172 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2173 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2174 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2175 (yy_hold_char) = *(yy_c_buf_p);
2178 /** Allocate and initialize an input buffer state.
2179 * @param file A readable stream.
2180 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2182 * @return the allocated buffer state.
2184 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2188 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2190 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2192 b->yy_buf_size = size;
2194 /* yy_ch_buf has to be 2 characters longer than the size given because
2195 * we need to put in 2 end-of-buffer characters.
2197 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2198 if ( ! b->yy_ch_buf )
2199 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2201 b->yy_is_our_buffer = 1;
2203 yy_init_buffer(b,file );
2208 /** Destroy the buffer.
2209 * @param b a buffer created with yy_create_buffer()
2212 void yy_delete_buffer (YY_BUFFER_STATE b )
2218 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2219 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2221 if ( b->yy_is_our_buffer )
2222 yyfree((void *) b->yy_ch_buf );
2224 yyfree((void *) b );
2228 extern int isatty (int );
2229 #endif /* __cplusplus */
2231 /* Initializes or reinitializes a buffer.
2232 * This function is sometimes called more than once on the same buffer,
2233 * such as during a yyrestart() or at EOF.
2235 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2240 yy_flush_buffer(b );
2242 b->yy_input_file = file;
2243 b->yy_fill_buffer = 1;
2245 /* If b is the current buffer, then yy_init_buffer was _probably_
2246 * called from yyrestart() or through yy_get_next_buffer.
2247 * In that case, we don't want to reset the lineno or column.
2249 if (b != YY_CURRENT_BUFFER){
2250 b->yy_bs_lineno = 1;
2251 b->yy_bs_column = 0;
2254 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2259 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2260 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2263 void yy_flush_buffer (YY_BUFFER_STATE b )
2270 /* We always need two end-of-buffer characters. The first causes
2271 * a transition to the end-of-buffer state. The second causes
2272 * a jam in that state.
2274 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2275 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2277 b->yy_buf_pos = &b->yy_ch_buf[0];
2280 b->yy_buffer_status = YY_BUFFER_NEW;
2282 if ( b == YY_CURRENT_BUFFER )
2283 yy_load_buffer_state( );
2286 /** Pushes the new state onto the stack. The new state becomes
2287 * the current state. This function will allocate the stack
2289 * @param new_buffer The new state.
2292 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2294 if (new_buffer == NULL)
2297 yyensure_buffer_stack();
2299 /* This block is copied from yy_switch_to_buffer. */
2300 if ( YY_CURRENT_BUFFER )
2302 /* Flush out information for old buffer. */
2303 *(yy_c_buf_p) = (yy_hold_char);
2304 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2305 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2308 /* Only push if top exists. Otherwise, replace top. */
2309 if (YY_CURRENT_BUFFER)
2310 (yy_buffer_stack_top)++;
2311 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2313 /* copied from yy_switch_to_buffer. */
2314 yy_load_buffer_state( );
2315 (yy_did_buffer_switch_on_eof) = 1;
2318 /** Removes and deletes the top of the stack, if present.
2319 * The next element becomes the new top.
2322 void yypop_buffer_state (void)
2324 if (!YY_CURRENT_BUFFER)
2327 yy_delete_buffer(YY_CURRENT_BUFFER );
2328 YY_CURRENT_BUFFER_LVALUE = NULL;
2329 if ((yy_buffer_stack_top) > 0)
2330 --(yy_buffer_stack_top);
2332 if (YY_CURRENT_BUFFER) {
2333 yy_load_buffer_state( );
2334 (yy_did_buffer_switch_on_eof) = 1;
2338 /* Allocates the stack if it does not exist.
2339 * Guarantees space for at least one push.
2341 static void yyensure_buffer_stack (void)
2343 yy_size_t num_to_alloc;
2345 if (!(yy_buffer_stack)) {
2347 /* First allocation is just for 2 elements, since we don't know if this
2348 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2349 * immediate realloc on the next call.
2352 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2353 (num_to_alloc * sizeof(struct yy_buffer_state*)
2355 if ( ! (yy_buffer_stack) )
2356 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2358 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2360 (yy_buffer_stack_max) = num_to_alloc;
2361 (yy_buffer_stack_top) = 0;
2365 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2367 /* Increase the buffer to prepare for a possible push. */
2368 int grow_size = 8 /* arbitrary grow size */;
2370 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2371 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2373 num_to_alloc * sizeof(struct yy_buffer_state*)
2375 if ( ! (yy_buffer_stack) )
2376 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2378 /* zero only the new slots.*/
2379 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2380 (yy_buffer_stack_max) = num_to_alloc;
2384 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2385 * @param base the character buffer
2386 * @param size the size in bytes of the character buffer
2388 * @return the newly allocated buffer state object.
2390 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2395 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2396 base[size-1] != YY_END_OF_BUFFER_CHAR )
2397 /* They forgot to leave room for the EOB's. */
2400 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2402 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2404 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2405 b->yy_buf_pos = b->yy_ch_buf = base;
2406 b->yy_is_our_buffer = 0;
2407 b->yy_input_file = 0;
2408 b->yy_n_chars = b->yy_buf_size;
2409 b->yy_is_interactive = 0;
2411 b->yy_fill_buffer = 0;
2412 b->yy_buffer_status = YY_BUFFER_NEW;
2414 yy_switch_to_buffer(b );
2419 /** Setup the input buffer state to scan a string. The next call to yylex() will
2420 * scan from a @e copy of @a str.
2421 * @param yystr a NUL-terminated string to scan
2423 * @return the newly allocated buffer state object.
2424 * @note If you want to scan bytes that may contain NUL values, then use
2425 * yy_scan_bytes() instead.
2427 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
2430 return yy_scan_bytes(yystr,strlen(yystr) );
2433 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2434 * scan from a @e copy of @a bytes.
2435 * @param bytes the byte buffer to scan
2436 * @param len the number of bytes in the buffer pointed to by @a bytes.
2438 * @return the newly allocated buffer state object.
2440 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
2447 /* Get memory for full buffer, including space for trailing EOB's. */
2448 n = _yybytes_len + 2;
2449 buf = (char *) yyalloc(n );
2451 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2453 for ( i = 0; i < _yybytes_len; ++i )
2454 buf[i] = yybytes[i];
2456 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2458 b = yy_scan_buffer(buf,n );
2460 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2462 /* It's okay to grow etc. this buffer, and we should throw it
2463 * away when we're done.
2465 b->yy_is_our_buffer = 1;
2470 #ifndef YY_EXIT_FAILURE
2471 #define YY_EXIT_FAILURE 2
2474 static void yy_fatal_error (yyconst char* msg )
2476 (void) fprintf( stderr, "%s\n", msg );
2477 exit( YY_EXIT_FAILURE );
2480 /* Redefine yyless() so it works in section 3 code. */
2486 /* Undo effects of setting up yytext. */ \
2487 int yyless_macro_arg = (n); \
2488 YY_LESS_LINENO(yyless_macro_arg);\
2489 yytext[yyleng] = (yy_hold_char); \
2490 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2491 (yy_hold_char) = *(yy_c_buf_p); \
2492 *(yy_c_buf_p) = '\0'; \
2493 yyleng = yyless_macro_arg; \
2497 /* Accessor methods (get/set functions) to struct members. */
2499 /** Get the current line number.
2502 int yyget_lineno (void)
2508 /** Get the input stream.
2511 FILE *yyget_in (void)
2516 /** Get the output stream.
2519 FILE *yyget_out (void)
2524 /** Get the length of the current token.
2527 yy_size_t yyget_leng (void)
2532 /** Get the current token.
2536 char *yyget_text (void)
2541 /** Set the current line number.
2542 * @param line_number
2545 void yyset_lineno (int line_number )
2548 yylineno = line_number;
2551 /** Set the input stream. This does not discard the current
2553 * @param in_str A readable stream.
2555 * @see yy_switch_to_buffer
2557 void yyset_in (FILE * in_str )
2562 void yyset_out (FILE * out_str )
2567 int yyget_debug (void)
2569 return yy_flex_debug;
2572 void yyset_debug (int bdebug )
2574 yy_flex_debug = bdebug ;
2577 static int yy_init_globals (void)
2579 /* Initialization is the same as for the non-reentrant scanner.
2580 * This function is called from yylex_destroy(), so don't allocate here.
2583 (yy_buffer_stack) = 0;
2584 (yy_buffer_stack_top) = 0;
2585 (yy_buffer_stack_max) = 0;
2586 (yy_c_buf_p) = (char *) 0;
2592 (yy_full_match) = 0;
2595 /* Defined in main.c */
2604 /* For future reference: Set errno on error, since we are called by
2610 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2611 int yylex_destroy (void)
2614 /* Pop the buffer stack, destroying each element. */
2615 while(YY_CURRENT_BUFFER){
2616 yy_delete_buffer(YY_CURRENT_BUFFER );
2617 YY_CURRENT_BUFFER_LVALUE = NULL;
2618 yypop_buffer_state();
2621 /* Destroy the stack itself. */
2622 yyfree((yy_buffer_stack) );
2623 (yy_buffer_stack) = NULL;
2625 yyfree ( (yy_state_buf) );
2626 (yy_state_buf) = NULL;
2628 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2629 * yylex() is called, initialization will occur. */
2636 * Internal utility routines.
2640 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2643 for ( i = 0; i < n; ++i )
2648 #ifdef YY_NEED_STRLEN
2649 static int yy_flex_strlen (yyconst char * s )
2652 for ( n = 0; s[n]; ++n )
2659 void *yyalloc (yy_size_t size )
2661 return (void *) malloc( size );
2664 void *yyrealloc (void * ptr, yy_size_t size )
2666 /* The cast to (char *) in the following accommodates both
2667 * implementations that use char* generic pointers, and those
2668 * that use void* generic pointers. It works with the latter
2669 * because both ANSI C and C++ allow castless assignment from
2670 * any pointer type to void*, and deal with argument conversions
2671 * as though doing an assignment.
2673 return (void *) realloc( (char *) ptr, size );
2676 void yyfree (void * ptr )
2678 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2681 #define YYTABLES_NAME "yytables"
2683 #line 205 "scannerlexer.l"
2695 parse_comment (GISourceScanner *scanner)
2699 GISourceComment *comment;
2705 string = g_string_new ("");
2707 comment_lineno = lineno;
2709 while (c2 != EOF && !(c1 == '*' && c2 == '/'))
2711 g_string_append_c (string, c1);
2721 comment = g_slice_new (GISourceComment);
2722 comment->comment = g_string_free (string, FALSE);
2723 comment->line = comment_lineno;
2724 comment->filename = g_strdup(scanner->current_filename);
2726 scanner->comments = g_slist_prepend (scanner->comments,
2731 check_identifier (GISourceScanner *scanner,
2735 * This function checks if `s' is a type name or an
2739 if (gi_source_scanner_is_typedef (scanner, s)) {
2740 return TYPEDEF_NAME;
2741 } else if (strcmp (s, "__builtin_va_list") == 0) {
2742 return TYPEDEF_NAME;
2749 * # linenum "filename" flags
2750 * See http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
2754 process_linemarks (GISourceScanner *scanner)
2756 char filename[1025];
2760 sscanf(yytext, "# %d \"%1024[^\"]\"", &lineno, filename);
2762 compress = g_strcompress (filename);
2763 real = g_realpath (filename);
2765 g_free (scanner->current_filename);
2766 scanner->current_filename = real;
2774 * This parses a macro which is ignored, such as
2775 * __attribute__((x)) or __asm__ (x)
2778 parse_ignored_macro (void)
2783 while ((c = input ()) != EOF && isspace (c))
2789 while ((c = input ()) != EOF && (nest > 0 || c != ')')) {
2794 else if (c == '"') {
2795 while ((c = input ()) != EOF && c != '"') {
2799 } else if (c == '\'') {
2808 } else if (c == '\n')
2816 parse_trigraph (GISourceScanner *scanner)
2822 start = g_strstr_len (yytext, yyleng, "<");
2823 g_assert (start != NULL);
2824 end = g_strstr_len (yytext, yyleng, ">");
2825 g_assert (end != NULL);
2827 items = g_strsplit (start + 1, ",", 0);
2828 for (i = 0; items[i] != NULL; i++) {
2829 char *item = items[i];
2831 if (strcmp (item, "public") == 0)
2832 scanner->private = FALSE;
2833 else if (strcmp (item, "private") == 0)
2834 scanner->private = TRUE;
2835 else if (strcmp (item, "flags") == 0)
2836 scanner->flags = TRUE;