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 35
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;
58
/* Limits of integral types. */
60
#define INT8_MIN (-128)
63
#define INT16_MIN (-32767-1)
66
#define INT32_MIN (-2147483647-1)
69
#define INT8_MAX (127)
72
#define INT16_MAX (32767)
75
#define INT32_MAX (2147483647)
78
#define UINT8_MAX (255U)
81
#define UINT16_MAX (65535U)
84
#define UINT32_MAX (4294967295U)
87
#endif /* ! FLEXINT_H */
91
/* The "const" storage-class-modifier is valid. */
94
#else /* ! __cplusplus */
96
/* C99 requires __STDC__ to be defined as 1. */
97
#if defined (__STDC__)
101
#endif /* defined (__STDC__) */
102
#endif /* ! __cplusplus */
105
#define yyconst const
110
/* Returned upon end-of-file. */
113
/* Promotes a possibly negative, possibly signed char to an unsigned
114
* integer for use as an array index. If the signed char is negative,
115
* we want to instead treat it as an 8-bit unsigned char, hence the
118
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120
/* Enter a start condition. This macro really ought to take a parameter,
121
* but we do it the disgusting crufty way forced on us by the ()-less
122
* definition of BEGIN.
124
#define BEGIN (yy_start) = 1 + 2 *
126
/* Translate the current start state into a value that can be later handed
127
* to BEGIN to return to the state. The YYSTATE alias is for lex
130
#define YY_START (((yy_start) - 1) / 2)
131
#define YYSTATE YY_START
133
/* Action number for EOF rule of a given start state. */
134
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136
/* Special action meaning "start processing a new file". */
137
#define YY_NEW_FILE yyrestart(yyin )
139
#define YY_END_OF_BUFFER_CHAR 0
141
/* Size of default input buffer. */
143
#define YY_BUF_SIZE 16384
146
/* The state buf must be large enough to hold one state per character in the main buffer.
148
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
150
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
151
#define YY_TYPEDEF_YY_BUFFER_STATE
152
typedef struct yy_buffer_state *YY_BUFFER_STATE;
157
extern FILE *yyin, *yyout;
159
#define EOB_ACT_CONTINUE_SCAN 0
160
#define EOB_ACT_END_OF_FILE 1
161
#define EOB_ACT_LAST_MATCH 2
163
#define YY_LESS_LINENO(n)
165
/* Return all but the first "n" matched characters back to the input stream. */
169
/* Undo effects of setting up yytext. */ \
170
int yyless_macro_arg = (n); \
171
YY_LESS_LINENO(yyless_macro_arg);\
172
*yy_cp = (yy_hold_char); \
173
YY_RESTORE_YY_MORE_OFFSET \
174
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
175
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
179
#define unput(c) yyunput( c, (yytext_ptr) )
181
#ifndef YY_TYPEDEF_YY_SIZE_T
182
#define YY_TYPEDEF_YY_SIZE_T
183
typedef size_t yy_size_t;
186
#ifndef YY_STRUCT_YY_BUFFER_STATE
187
#define YY_STRUCT_YY_BUFFER_STATE
188
struct yy_buffer_state
192
char *yy_ch_buf; /* input buffer */
193
char *yy_buf_pos; /* current position in input buffer */
195
/* Size of input buffer in bytes, not including room for EOB
198
yy_size_t yy_buf_size;
200
/* Number of characters read into yy_ch_buf, not including EOB
205
/* Whether we "own" the buffer - i.e., we know we created it,
206
* and can realloc() it to grow it, and should free() it to
209
int yy_is_our_buffer;
211
/* Whether this is an "interactive" input source; if so, and
212
* if we're using stdio for input, then we want to use getc()
213
* instead of fread(), to make sure we stop fetching input after
216
int yy_is_interactive;
218
/* Whether we're considered to be at the beginning of a line.
219
* If so, '^' rules will be active on the next match, otherwise
224
int yy_bs_lineno; /**< The line count. */
225
int yy_bs_column; /**< The column count. */
227
/* Whether to try to fill the input buffer when we reach the
232
int yy_buffer_status;
234
#define YY_BUFFER_NEW 0
235
#define YY_BUFFER_NORMAL 1
236
/* When an EOF's been seen but there's still some text to process
237
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
238
* shouldn't try reading from the input source any more. We might
239
* still have a bunch of tokens to match, though, because of
240
* possible backing-up.
242
* When we actually see the EOF, we change the status to "new"
243
* (via yyrestart()), so that the user can continue scanning by
244
* just pointing yyin at a new input file.
246
#define YY_BUFFER_EOF_PENDING 2
249
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
251
/* Stack of input buffers. */
252
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
253
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
254
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
256
/* We provide macros for accessing buffer states in case in the
257
* future we want to put the buffer states in a more general
260
* Returns the top of the stack, or NULL.
262
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
263
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
266
/* Same as previous macro, but useful when we know that the buffer stack is not
267
* NULL or when we need an lvalue. For internal use only.
269
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
271
/* yy_hold_char holds the character lost when yytext is formed. */
272
static char yy_hold_char;
273
static int yy_n_chars; /* number of characters read into yy_ch_buf */
276
/* Points to current character in buffer. */
277
static char *yy_c_buf_p = (char *) 0;
278
static int yy_init = 0; /* whether we need to initialize */
279
static int yy_start = 0; /* start state number */
281
/* Flag which is used to allow yywrap()'s to do buffer switches
282
* instead of setting up a fresh yyin. A bit of a hack ...
284
static int yy_did_buffer_switch_on_eof;
286
void yyrestart (FILE *input_file );
287
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
288
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
289
void yy_delete_buffer (YY_BUFFER_STATE b );
290
void yy_flush_buffer (YY_BUFFER_STATE b );
291
void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
292
void yypop_buffer_state (void );
294
static void yyensure_buffer_stack (void );
295
static void yy_load_buffer_state (void );
296
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
298
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
300
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
301
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
302
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
304
void *yyalloc (yy_size_t );
305
void *yyrealloc (void *,yy_size_t );
306
void yyfree (void * );
308
#define yy_new_buffer yy_create_buffer
310
#define yy_set_interactive(is_interactive) \
312
if ( ! YY_CURRENT_BUFFER ){ \
313
yyensure_buffer_stack (); \
314
YY_CURRENT_BUFFER_LVALUE = \
315
yy_create_buffer(yyin,YY_BUF_SIZE ); \
317
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
320
#define yy_set_bol(at_bol) \
322
if ( ! YY_CURRENT_BUFFER ){\
323
yyensure_buffer_stack (); \
324
YY_CURRENT_BUFFER_LVALUE = \
325
yy_create_buffer(yyin,YY_BUF_SIZE ); \
327
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
330
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
332
/* Begin user sect3 */
334
typedef unsigned char YY_CHAR;
336
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
338
typedef int yy_state_type;
345
#define yytext_ptr yytext
347
static yy_state_type yy_get_previous_state (void );
348
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
349
static int yy_get_next_buffer (void );
350
static void yy_fatal_error (yyconst char msg[] );
352
/* Done after the current pattern has been matched and before the
353
* corresponding action - sets up yytext.
355
#define YY_DO_BEFORE_ACTION \
356
(yytext_ptr) = yy_bp; \
357
yyleng = (size_t) (yy_cp - yy_bp); \
358
(yy_hold_char) = *yy_cp; \
360
(yy_c_buf_p) = yy_cp;
362
#define YY_NUM_RULES 118
363
#define YY_END_OF_BUFFER 119
364
/* This struct is not used in this scanner,
365
but its presence is necessary. */
368
flex_int32_t yy_verify;
371
static yyconst flex_int16_t yy_acclist[708] =
373
119, 117, 118, 3, 117, 118, 1, 118, 33, 117,
374
118, 117, 118, 8, 117, 118, 28, 117, 118, 30,
375
117, 118, 117, 118, 17, 117, 118, 18, 117, 118,
376
26, 117, 118, 24, 117, 118, 57, 117, 118, 25,
377
117, 118, 23, 117, 118, 27, 117, 118, 110, 117,
378
118, 110, 117, 118, 20, 117, 118, 19, 117, 118,
379
35, 117, 118, 34, 117, 118, 36, 117, 118, 22,
380
117, 118, 71, 107, 117, 118, 71, 107, 117, 118,
381
13, 117, 118, 117, 118, 15, 117, 118, 29, 117,
382
118, 71, 107, 117, 118, 71, 107, 117, 118, 71,
384
107, 117, 118, 71, 107, 117, 118, 71, 107, 117,
385
118, 71, 107, 117, 118, 71, 107, 117, 118, 71,
386
107, 117, 118, 71, 107, 117, 118, 71, 107, 117,
387
118, 71, 107, 117, 118, 71, 107, 117, 118, 71,
388
107, 117, 118, 71, 107, 117, 118, 71, 107, 117,
389
118, 71, 107, 117, 118, 9, 117, 118, 31, 117,
390
118, 11, 117, 118, 32, 117, 118, 3, 1, 50,
391
115, 41, 12, 53, 43, 113, 39, 55, 37, 56,
392
38, 58, 111, 4, 5, 40, 111, 109, 110, 110,
393
110, 110, 16, 10, 14, 45, 51, 49, 52, 46,
395
71, 107, 2, 42, 71, 107, 71, 107, 71, 107,
396
71, 107, 71, 107, 71, 107, 71, 107, 71, 107,
397
71, 107, 71, 80, 107, 71, 107, 71, 107, 71,
398
107, 71, 107, 71, 107, 71, 107, 71, 88, 107,
399
71, 107, 71, 107, 71, 107, 71, 107, 71, 107,
400
71, 107, 71, 107, 71, 107, 71, 107, 71, 107,
401
71, 107, 44, 54, 21, 111, 5, 109, 110, 109,
402
110, 112, 110, 110, 110, 108, 47, 48, 116, 114,
403
71, 107, 71, 107, 71, 107, 71, 107, 71, 107,
404
71, 107, 71, 107, 71, 107, 71, 107, 71, 72,
406
107, 71, 107, 71, 107, 71, 107, 71, 107, 71,
407
107, 71, 107, 71, 107, 71, 107, 71, 107, 71,
408
107, 71, 107, 71, 86, 107, 71, 107, 71, 107,
409
71, 90, 107, 71, 107, 71, 107, 71, 107, 71,
410
107, 71, 107, 71, 107, 71, 107, 71, 107, 71,
411
107, 71, 107, 71, 107, 71, 107, 71, 107, 71,
412
107, 71, 107, 71, 107, 111, 109, 110, 109, 110,
413
109, 110, 112, 110, 108, 108, 71, 107, 71, 107,
414
71, 107, 71, 107, 71, 107, 71, 107, 71, 107,
415
71, 107, 71, 107, 71, 107, 71, 73, 107, 71,
417
107, 71, 75, 107, 71, 76, 107, 71, 107, 71,
418
107, 71, 107, 71, 107, 71, 82, 107, 71, 83,
419
107, 71, 107, 71, 107, 71, 87, 107, 71, 107,
420
71, 91, 107, 71, 107, 71, 107, 71, 107, 71,
421
107, 71, 107, 71, 107, 71, 107, 71, 107, 71,
422
107, 71, 107, 71, 107, 71, 107, 71, 104, 107,
423
71, 107, 71, 107, 109, 110, 108, 108, 108, 70,
424
71, 107, 59, 71, 107, 71, 107, 71, 107, 71,
425
107, 71, 107, 71, 107, 71, 107, 71, 107, 71,
426
107, 71, 74, 107, 71, 77, 107, 71, 107, 71,
428
107, 71, 107, 71, 107, 71, 85, 107, 71, 107,
429
71, 107, 71, 107, 71, 107, 71, 95, 107, 71,
430
107, 71, 107, 71, 107, 71, 107, 71, 107, 71,
431
107, 71, 102, 107, 71, 107, 71, 107, 71, 106,
432
107, 108, 71, 107, 71, 107, 71, 107, 71, 107,
433
71, 107, 71, 107, 71, 107, 71, 107, 71, 107,
434
71, 107, 71, 107, 71, 81, 107, 71, 84, 107,
435
71, 89, 107, 71, 107, 71, 107, 71, 94, 107,
436
71, 96, 107, 71, 97, 107, 71, 98, 107, 71,
437
99, 107, 71, 100, 107, 71, 107, 71, 107, 71,
439
107, 60, 71, 107, 71, 107, 63, 71, 107, 71,
440
107, 71, 107, 71, 107, 71, 107, 71, 107, 71,
441
107, 71, 107, 71, 79, 107, 71, 107, 71, 107,
442
71, 101, 107, 71, 107, 71, 107, 71, 107, 71,
443
107, 65, 71, 107, 71, 107, 71, 107, 71, 107,
444
69, 71, 107, 71, 78, 107, 71, 92, 107, 71,
445
93, 107, 71, 103, 107, 71, 105, 107, 7, 71,
446
107, 71, 107, 66, 71, 107, 71, 107, 71, 107,
447
6, 7, 71, 107, 71, 107, 68, 71, 107, 67,
448
71, 107, 62, 71, 107, 71, 107, 71, 107, 71,
450
107, 61, 71, 107, 64, 71, 107
453
static yyconst flex_int16_t yy_accept[356] =
455
1, 1, 1, 2, 4, 7, 9, 12, 14, 17,
456
20, 23, 25, 28, 31, 34, 37, 40, 43, 46,
457
49, 52, 55, 58, 61, 64, 67, 70, 73, 77,
458
81, 84, 86, 89, 92, 96, 100, 104, 108, 112,
459
116, 120, 124, 128, 132, 136, 140, 144, 148, 152,
460
156, 159, 162, 165, 168, 169, 170, 171, 171, 172,
461
172, 172, 173, 174, 175, 176, 176, 177, 177, 178,
462
179, 180, 181, 182, 183, 183, 184, 185, 186, 187,
463
188, 190, 191, 191, 192, 193, 193, 194, 195, 196,
464
197, 198, 199, 200, 201, 203, 203, 203, 204, 205,
466
207, 209, 211, 213, 215, 217, 219, 221, 223, 226,
467
228, 230, 232, 234, 236, 238, 241, 243, 245, 247,
468
249, 251, 253, 255, 257, 259, 261, 263, 264, 265,
469
265, 266, 266, 267, 268, 270, 272, 272, 273, 274,
470
275, 276, 277, 278, 279, 279, 280, 280, 280, 281,
471
281, 283, 285, 287, 289, 291, 293, 295, 297, 299,
472
302, 304, 306, 308, 310, 312, 314, 316, 318, 320,
473
322, 324, 327, 329, 331, 334, 336, 338, 340, 342,
474
344, 346, 348, 350, 352, 354, 356, 358, 360, 362,
475
364, 366, 366, 366, 367, 369, 371, 373, 374, 375,
477
376, 377, 379, 381, 383, 385, 387, 389, 391, 393,
478
395, 397, 400, 402, 405, 408, 410, 412, 414, 416,
479
419, 422, 424, 426, 429, 431, 434, 436, 438, 440,
480
442, 444, 446, 448, 450, 452, 454, 456, 458, 461,
481
463, 465, 465, 467, 468, 469, 470, 473, 476, 478,
482
480, 482, 484, 486, 488, 490, 492, 495, 498, 500,
483
502, 504, 506, 509, 511, 513, 515, 517, 520, 522,
484
524, 526, 528, 530, 532, 535, 537, 539, 542, 542,
485
543, 545, 547, 549, 551, 553, 555, 557, 559, 561,
486
563, 565, 568, 571, 574, 576, 578, 581, 584, 587,
488
590, 593, 596, 598, 600, 602, 602, 605, 607, 610,
489
612, 614, 616, 618, 620, 622, 624, 627, 629, 631,
490
634, 636, 638, 638, 640, 642, 645, 647, 649, 651,
491
654, 657, 660, 663, 666, 669, 670, 672, 674, 677,
492
679, 681, 682, 683, 685, 687, 690, 693, 696, 698,
493
700, 702, 705, 708, 708
496
static yyconst flex_int32_t yy_ec[256] =
498
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
499
2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
500
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
501
1, 4, 5, 6, 7, 1, 8, 9, 10, 11,
502
12, 13, 14, 15, 16, 17, 18, 19, 20, 20,
503
20, 20, 20, 20, 20, 21, 21, 22, 23, 24,
504
25, 26, 27, 1, 28, 29, 28, 28, 30, 31,
505
32, 32, 32, 32, 32, 33, 32, 32, 32, 32,
506
32, 32, 32, 32, 34, 32, 32, 35, 32, 32,
507
36, 37, 38, 39, 40, 1, 41, 42, 43, 44,
509
45, 46, 47, 48, 49, 32, 50, 51, 52, 53,
510
54, 55, 32, 56, 57, 58, 59, 60, 61, 62,
511
63, 64, 65, 66, 67, 68, 1, 1, 1, 1,
512
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
513
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
514
1, 1, 1, 1, 1, 1, 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,
520
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
521
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
522
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,
528
static yyconst flex_int32_t yy_meta[69] =
530
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
531
3, 1, 1, 1, 1, 1, 1, 1, 4, 4,
532
4, 1, 1, 1, 1, 1, 1, 5, 5, 5,
533
5, 6, 6, 6, 6, 1, 1, 1, 1, 6,
534
5, 5, 5, 5, 5, 5, 6, 6, 6, 6,
535
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
536
6, 6, 6, 6, 1, 1, 1, 1
539
static yyconst flex_int16_t yy_base[365] =
541
0, 0, 515, 516, 67, 0, 489, 64, 469, 47,
542
65, 65, 516, 516, 487, 62, 516, 63, 61, 73,
543
86, 93, 485, 516, 75, 485, 59, 516, 0, 86,
544
516, 506, 516, 483, 64, 52, 451, 74, 63, 79,
545
82, 452, 72, 451, 459, 98, 440, 449, 447, 452,
546
516, 69, 516, 516, 138, 0, 516, 118, 516, 496,
547
453, 516, 516, 516, 516, 124, 516, 494, 516, 516,
548
516, 516, 516, 516, 479, 143, 516, 0, 516, 147,
549
166, 185, 193, 120, 44, 0, 516, 516, 516, 470,
550
516, 516, 516, 469, 0, 123, 133, 516, 516, 439,
552
190, 440, 433, 445, 432, 447, 434, 440, 426, 427,
553
424, 424, 427, 424, 421, 0, 99, 425, 163, 423,
554
111, 128, 427, 420, 133, 100, 425, 516, 516, 427,
555
516, 208, 516, 0, 204, 175, 221, 231, 138, 516,
556
183, 220, 516, 516, 195, 516, 469, 235, 516, 468,
557
416, 199, 415, 406, 414, 412, 420, 415, 400, 0,
558
408, 420, 415, 403, 201, 417, 415, 411, 403, 409,
559
412, 0, 398, 402, 0, 403, 400, 390, 388, 390,
560
392, 399, 385, 383, 383, 395, 385, 389, 393, 395,
561
384, 385, 246, 254, 227, 516, 227, 516, 516, 247,
563
237, 382, 380, 373, 377, 371, 377, 374, 369, 378,
564
369, 0, 373, 0, 0, 364, 372, 361, 368, 0,
565
0, 362, 359, 0, 363, 0, 358, 358, 357, 354,
566
366, 356, 360, 365, 364, 362, 352, 357, 0, 345,
567
357, 348, 516, 234, 516, 243, 0, 360, 343, 341,
568
352, 347, 342, 336, 340, 347, 0, 0, 338, 339,
569
344, 335, 0, 342, 328, 336, 331, 0, 339, 336,
570
338, 322, 331, 333, 0, 324, 327, 0, 330, 516,
571
334, 324, 314, 318, 317, 310, 312, 322, 312, 306,
572
306, 0, 0, 0, 318, 319, 0, 0, 0, 0,
574
0, 0, 315, 315, 308, 354, 0, 315, 0, 299,
575
310, 303, 280, 264, 258, 258, 0, 246, 243, 0,
576
255, 252, 0, 237, 246, 0, 241, 248, 250, 0,
577
0, 0, 0, 0, 0, 278, 226, 229, 0, 211,
578
209, 516, 212, 158, 142, 0, 0, 151, 141, 125,
579
99, 0, 0, 516, 306, 312, 318, 321, 327, 330,
583
static yyconst flex_int16_t yy_def[365] =
585
354, 1, 354, 354, 354, 355, 354, 356, 354, 354,
586
354, 357, 354, 354, 354, 354, 354, 354, 354, 354,
587
354, 354, 354, 354, 354, 354, 354, 354, 358, 358,
588
354, 354, 354, 354, 358, 358, 358, 358, 358, 358,
589
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
590
354, 354, 354, 354, 354, 355, 354, 356, 354, 356,
591
354, 354, 354, 354, 354, 357, 354, 357, 354, 354,
592
354, 354, 354, 354, 354, 354, 354, 359, 354, 354,
593
354, 354, 354, 354, 354, 360, 354, 354, 354, 354,
594
354, 354, 354, 354, 358, 361, 362, 354, 354, 358,
596
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
597
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
598
358, 358, 358, 358, 358, 358, 358, 354, 354, 354,
599
354, 354, 354, 359, 354, 354, 354, 354, 354, 354,
600
354, 360, 354, 354, 361, 354, 361, 362, 354, 362,
601
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
602
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
603
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
604
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
605
358, 354, 354, 354, 354, 354, 354, 354, 354, 354,
607
354, 358, 358, 358, 358, 358, 358, 358, 358, 358,
608
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
609
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
610
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
611
358, 354, 354, 354, 354, 354, 358, 358, 358, 358,
612
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
613
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
614
358, 358, 358, 358, 358, 358, 358, 358, 354, 354,
615
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
616
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
618
358, 358, 358, 358, 358, 354, 358, 358, 358, 358,
619
358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
620
358, 358, 363, 358, 358, 358, 358, 358, 358, 358,
621
358, 358, 358, 358, 358, 364, 358, 358, 358, 358,
622
358, 354, 364, 358, 358, 358, 358, 358, 358, 358,
623
358, 358, 358, 0, 354, 354, 354, 354, 354, 354,
627
static yyconst flex_int16_t yy_nxt[585] =
629
4, 5, 6, 5, 7, 8, 9, 10, 11, 12,
630
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
631
22, 23, 24, 25, 26, 27, 28, 29, 29, 29,
632
29, 29, 30, 29, 29, 31, 32, 33, 34, 35,
633
36, 37, 38, 39, 40, 41, 42, 29, 43, 29,
634
44, 29, 29, 29, 29, 45, 46, 47, 48, 49,
635
50, 29, 29, 29, 51, 52, 53, 54, 55, 59,
636
55, 62, 63, 64, 67, 70, 141, 75, 72, 76,
637
76, 76, 88, 93, 94, 77, 71, 73, 74, 65,
638
78, 96, 100, 128, 141, 97, 89, 79, 90, 91,
640
60, 68, 80, 101, 81, 81, 82, 108, 102, 80,
641
103, 82, 82, 82, 105, 83, 109, 116, 84, 85,
642
86, 106, 83, 59, 117, 84, 85, 107, 146, 110,
643
83, 111, 113, 67, 129, 114, 84, 83, 353, 55,
644
112, 55, 149, 84, 85, 120, 121, 86, 189, 174,
645
190, 85, 139, 140, 60, 122, 175, 181, 123, 147,
646
68, 76, 76, 76, 352, 76, 76, 76, 183, 150,
647
139, 140, 132, 133, 182, 133, 132, 133, 140, 133,
648
351, 187, 80, 184, 81, 81, 82, 132, 133, 188,
649
350, 132, 133, 133, 349, 83, 140, 133, 135, 136,
651
146, 80, 348, 82, 82, 82, 137, 197, 137, 177,
652
83, 138, 138, 138, 83, 199, 135, 84, 85, 178,
653
179, 193, 342, 193, 136, 197, 194, 194, 194, 83,
654
152, 147, 153, 199, 154, 84, 195, 196, 155, 138,
655
138, 138, 156, 85, 149, 157, 158, 159, 347, 138,
656
138, 138, 200, 201, 195, 203, 204, 216, 217, 243,
657
196, 198, 196, 198, 194, 194, 194, 245, 346, 246,
658
200, 150, 194, 194, 194, 280, 198, 243, 201, 244,
659
245, 198, 345, 344, 133, 196, 133, 246, 342, 341,
660
340, 339, 245, 280, 338, 337, 335, 244, 334, 133,
662
333, 332, 331, 330, 133, 245, 56, 329, 56, 56,
663
56, 56, 58, 58, 58, 58, 58, 58, 66, 66,
664
66, 66, 66, 66, 95, 95, 95, 134, 328, 134,
665
134, 134, 134, 142, 142, 145, 145, 145, 145, 145,
666
145, 148, 148, 148, 148, 148, 148, 336, 336, 343,
667
343, 343, 343, 327, 326, 325, 324, 323, 322, 321,
668
320, 319, 318, 317, 316, 315, 314, 313, 312, 311,
669
310, 309, 308, 307, 306, 305, 304, 303, 302, 301,
670
300, 299, 298, 297, 296, 295, 294, 293, 292, 291,
671
290, 289, 288, 287, 286, 285, 284, 283, 282, 281,
673
279, 278, 277, 276, 275, 274, 273, 272, 271, 270,
674
269, 268, 267, 266, 265, 264, 263, 262, 261, 260,
675
259, 258, 257, 256, 255, 254, 253, 252, 251, 250,
676
249, 248, 247, 242, 241, 240, 239, 238, 237, 236,
677
235, 234, 233, 232, 231, 230, 229, 228, 227, 226,
678
225, 224, 223, 222, 221, 220, 219, 218, 215, 214,
679
213, 212, 211, 210, 209, 208, 207, 206, 205, 202,
680
354, 354, 192, 191, 186, 185, 180, 176, 173, 172,
681
171, 170, 169, 168, 167, 166, 165, 164, 163, 162,
682
161, 160, 151, 144, 143, 131, 354, 130, 354, 127,
684
126, 125, 124, 119, 118, 115, 104, 99, 98, 92,
685
87, 69, 61, 57, 354, 3, 354, 354, 354, 354,
686
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
687
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
688
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
689
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
690
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
691
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
695
static yyconst flex_int16_t yy_chk[585] =
697
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
698
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
699
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
700
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
701
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
702
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
703
1, 1, 1, 1, 1, 1, 1, 1, 5, 8,
704
5, 10, 10, 11, 12, 16, 85, 19, 18, 19,
705
19, 19, 25, 27, 27, 20, 16, 18, 18, 11,
706
20, 30, 35, 52, 85, 30, 25, 20, 25, 25,
708
8, 12, 21, 35, 21, 21, 21, 39, 36, 22,
709
36, 22, 22, 22, 38, 21, 39, 43, 21, 21,
710
21, 38, 22, 58, 43, 22, 22, 38, 96, 40,
711
21, 40, 41, 66, 52, 41, 21, 22, 351, 55,
712
40, 55, 97, 22, 21, 46, 46, 21, 126, 117,
713
126, 22, 84, 84, 58, 46, 117, 121, 46, 96,
714
66, 76, 76, 76, 350, 80, 80, 80, 122, 97,
715
84, 139, 76, 76, 121, 76, 80, 80, 84, 80,
716
349, 125, 81, 122, 81, 81, 81, 76, 76, 125,
717
348, 80, 80, 76, 345, 81, 139, 80, 81, 81,
719
145, 82, 344, 82, 82, 82, 83, 136, 83, 119,
720
81, 83, 83, 83, 82, 141, 81, 82, 82, 119,
721
119, 132, 343, 132, 81, 136, 132, 132, 132, 82,
722
101, 145, 101, 141, 101, 82, 135, 135, 101, 137,
723
137, 137, 101, 82, 148, 101, 101, 101, 341, 138,
724
138, 138, 142, 142, 135, 152, 152, 165, 165, 197,
725
195, 138, 135, 138, 193, 193, 193, 244, 340, 201,
726
142, 148, 194, 194, 194, 246, 138, 197, 142, 200,
727
200, 138, 338, 337, 194, 195, 194, 201, 336, 329,
728
328, 327, 244, 246, 325, 324, 322, 200, 321, 194,
730
319, 318, 316, 315, 194, 200, 355, 314, 355, 355,
731
355, 355, 356, 356, 356, 356, 356, 356, 357, 357,
732
357, 357, 357, 357, 358, 358, 358, 359, 313, 359,
733
359, 359, 359, 360, 360, 361, 361, 361, 361, 361,
734
361, 362, 362, 362, 362, 362, 362, 363, 363, 364,
735
364, 364, 364, 312, 311, 310, 308, 306, 305, 304,
736
303, 296, 295, 291, 290, 289, 288, 287, 286, 285,
737
284, 283, 282, 281, 279, 277, 276, 274, 273, 272,
738
271, 270, 269, 267, 266, 265, 264, 262, 261, 260,
739
259, 256, 255, 254, 253, 252, 251, 250, 249, 248,
741
242, 241, 240, 238, 237, 236, 235, 234, 233, 232,
742
231, 230, 229, 228, 227, 225, 223, 222, 219, 218,
743
217, 216, 213, 211, 210, 209, 208, 207, 206, 205,
744
204, 203, 202, 192, 191, 190, 189, 188, 187, 186,
745
185, 184, 183, 182, 181, 180, 179, 178, 177, 176,
746
174, 173, 171, 170, 169, 168, 167, 166, 164, 163,
747
162, 161, 159, 158, 157, 156, 155, 154, 153, 151,
748
150, 147, 130, 127, 124, 123, 120, 118, 115, 114,
749
113, 112, 111, 110, 109, 108, 107, 106, 105, 104,
750
103, 102, 100, 94, 90, 75, 68, 61, 60, 50,
752
49, 48, 47, 45, 44, 42, 37, 34, 32, 26,
753
23, 15, 9, 7, 3, 354, 354, 354, 354, 354,
754
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
755
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
756
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
757
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
758
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
759
354, 354, 354, 354, 354, 354, 354, 354, 354, 354,
763
extern int yy_flex_debug;
764
int yy_flex_debug = 0;
766
static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
767
static char *yy_full_match;
771
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
772
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
777
#define yymore() yymore_used_but_not_detected
778
#define YY_MORE_ADJ 0
779
#define YY_RESTORE_YY_MORE_OFFSET
781
#line 1 "scannerlexer.l"
783
* GObject introspection: C lexer
785
* Copyright (c) 1997 Sandro Sigala <ssigala@globalnet.it>
786
* Copyright (c) 2007-2008 Jürg Billeter <j@bitron.ch>
788
* All rights reserved.
790
* Redistribution and use in source and binary forms, with or without
791
* modification, are permitted provided that the following conditions
793
* 1. Redistributions of source code must retain the above copyright
794
* notice, this list of conditions and the following disclaimer.
795
* 2. Redistributions in binary form must reproduce the above copyright
796
* notice, this list of conditions and the following disclaimer in the
797
* documentation and/or other materials provided with the distribution.
799
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
800
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
801
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
802
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
803
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
804
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
805
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
806
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
807
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
808
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
810
#line 31 "scannerlexer.l"
815
#include "sourcescanner.h"
816
#include "scannerparser.h"
817
#include "grealpath.h"
823
#define YY_BUF_SIZE 1048576
825
extern int yylex (GISourceScanner *scanner);
826
#define YY_DECL int yylex (GISourceScanner *scanner)
827
static int yywrap (void);
828
static void parse_comment (GISourceScanner *scanner);
829
static void process_directive (GISourceScanner *scanner);
830
static int check_identifier (GISourceScanner *scanner, const char *);
831
static int parse_ignored_macro (void);
832
#line 833 "scannerlexer.c"
836
#ifndef YY_NO_UNISTD_H
837
/* Special case for "unistd.h", since it is non-ANSI. We include it way
838
* down here because we want the user's section 1 to have been scanned first.
839
* The user has a chance to override it with an option.
844
#ifndef YY_EXTRA_TYPE
845
#define YY_EXTRA_TYPE void *
848
static int yy_init_globals (void );
850
/* Accessor methods to globals.
851
These are made visible to non-reentrant scanners for convenience. */
853
int yylex_destroy (void );
855
int yyget_debug (void );
857
void yyset_debug (int debug_flag );
859
YY_EXTRA_TYPE yyget_extra (void );
861
void yyset_extra (YY_EXTRA_TYPE user_defined );
863
FILE *yyget_in (void );
865
void yyset_in (FILE * in_str );
867
FILE *yyget_out (void );
869
void yyset_out (FILE * out_str );
871
int yyget_leng (void );
873
char *yyget_text (void );
875
int yyget_lineno (void );
877
void yyset_lineno (int line_number );
879
/* Macros after this point can all be overridden by user definitions in
883
#ifndef YY_SKIP_YYWRAP
885
extern "C" int yywrap (void );
887
extern int yywrap (void );
892
static void yy_flex_strncpy (char *,yyconst char *,int );
895
#ifdef YY_NEED_STRLEN
896
static int yy_flex_strlen (yyconst char * );
902
static int yyinput (void );
904
static int input (void );
909
/* Amount of stuff to slurp up with each read. */
910
#ifndef YY_READ_BUF_SIZE
911
#define YY_READ_BUF_SIZE 8192
914
/* Copy whatever the last rule matched to the standard output. */
916
/* This used to be an fputs(), but since the string might contain NUL's,
917
* we now use fwrite().
919
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
922
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
923
* is returned in "result".
926
#define YY_INPUT(buf,result,max_size) \
927
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
931
for ( n = 0; n < max_size && \
932
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
935
buf[n++] = (char) c; \
936
if ( c == EOF && ferror( yyin ) ) \
937
YY_FATAL_ERROR( "input in flex scanner failed" ); \
943
while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
945
if( errno != EINTR) \
947
YY_FATAL_ERROR( "input in flex scanner failed" ); \
958
/* No semi-colon after return; correct usage is to write "yyterminate();" -
959
* we don't want an extra ';' after the "return" because that will cause
960
* some compilers to complain about unreachable statements.
963
#define yyterminate() return YY_NULL
966
/* Number of entries by which start-condition stack grows. */
967
#ifndef YY_START_STACK_INCR
968
#define YY_START_STACK_INCR 25
971
/* Report a fatal error. */
972
#ifndef YY_FATAL_ERROR
973
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
976
/* end tables serialization structures and prototypes */
978
/* Default declaration of generated scanner - a define so the user can
979
* easily add parameters.
982
#define YY_DECL_IS_OURS 1
984
extern int yylex (void);
986
#define YY_DECL int yylex (void)
987
#endif /* !YY_DECL */
989
/* Code executed at the beginning of each rule, after yytext and yyleng
992
#ifndef YY_USER_ACTION
993
#define YY_USER_ACTION
996
/* Code executed at the end of each rule. */
998
#define YY_BREAK break;
1001
#define YY_RULE_SETUP \
1004
/** The main scanner function which does all the work.
1008
register yy_state_type yy_current_state;
1009
register char *yy_cp, *yy_bp;
1010
register int yy_act;
1012
#line 63 "scannerlexer.l"
1015
#line 1016 "scannerlexer.c"
1025
/* Create the reject buffer large enough to save one state per allowed character. */
1026
if ( ! (yy_state_buf) )
1027
(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
1028
if ( ! (yy_state_buf) )
1029
YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
1032
(yy_start) = 1; /* first start state */
1040
if ( ! YY_CURRENT_BUFFER ) {
1041
yyensure_buffer_stack ();
1042
YY_CURRENT_BUFFER_LVALUE =
1043
yy_create_buffer(yyin,YY_BUF_SIZE );
1046
yy_load_buffer_state( );
1049
while ( 1 ) /* loops until end-of-file is reached */
1051
yy_cp = (yy_c_buf_p);
1053
/* Support of yytext. */
1054
*yy_cp = (yy_hold_char);
1056
/* yy_bp points to the position in yy_ch_buf of the start of
1061
yy_current_state = (yy_start);
1063
(yy_state_ptr) = (yy_state_buf);
1064
*(yy_state_ptr)++ = yy_current_state;
1069
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1070
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1072
yy_current_state = (int) yy_def[yy_current_state];
1073
if ( yy_current_state >= 355 )
1074
yy_c = yy_meta[(unsigned int) yy_c];
1076
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1077
*(yy_state_ptr)++ = yy_current_state;
1080
while ( yy_base[yy_current_state] != 516 );
1083
yy_current_state = *--(yy_state_ptr);
1084
(yy_lp) = yy_accept[yy_current_state];
1085
find_rule: /* we branch to this label when backing up */
1086
for ( ; ; ) /* until we find what rule we matched */
1088
if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1090
yy_act = yy_acclist[(yy_lp)];
1092
(yy_full_match) = yy_cp;
1097
yy_current_state = *--(yy_state_ptr);
1098
(yy_lp) = yy_accept[yy_current_state];
1101
YY_DO_BEFORE_ACTION;
1103
do_action: /* This label is used only to access EOF actions. */
1106
{ /* beginning of action switch */
1108
/* rule 1 can match eol */
1110
#line 65 "scannerlexer.l"
1111
{ strncpy(linebuf, yytext+1, sizeof(linebuf)); /* save the next line */
1112
linebuf[sizeof(linebuf)-1]='\0';
1113
/* printf("%4d:%s\n",lineno,linebuf); */
1114
yyless(1); /* give back all but the \n to rescan */
1119
/* rule 2 can match eol */
1121
#line 71 "scannerlexer.l"
1126
#line 72 "scannerlexer.l"
1127
{ /* Ignore whitespace. */ }
1131
#line 74 "scannerlexer.l"
1132
{ parse_comment(scanner); }
1136
#line 75 "scannerlexer.l"
1141
#line 77 "scannerlexer.l"
1142
{ yyless (yyleng - 1); return FUNCTION_MACRO; }
1146
#line 78 "scannerlexer.l"
1147
{ return OBJECT_MACRO; }
1151
#line 80 "scannerlexer.l"
1152
{ process_directive(scanner); }
1156
#line 82 "scannerlexer.l"
1161
#line 83 "scannerlexer.l"
1166
#line 84 "scannerlexer.l"
1171
#line 85 "scannerlexer.l"
1176
#line 86 "scannerlexer.l"
1181
#line 87 "scannerlexer.l"
1186
#line 88 "scannerlexer.l"
1191
#line 89 "scannerlexer.l"
1196
#line 90 "scannerlexer.l"
1201
#line 91 "scannerlexer.l"
1206
#line 92 "scannerlexer.l"
1211
#line 93 "scannerlexer.l"
1216
#line 94 "scannerlexer.l"
1217
{ return ELLIPSIS; }
1221
#line 95 "scannerlexer.l"
1226
#line 96 "scannerlexer.l"
1231
#line 97 "scannerlexer.l"
1236
#line 98 "scannerlexer.l"
1241
#line 99 "scannerlexer.l"
1246
#line 100 "scannerlexer.l"
1251
#line 101 "scannerlexer.l"
1256
#line 102 "scannerlexer.l"
1261
#line 103 "scannerlexer.l"
1266
#line 104 "scannerlexer.l"
1271
#line 105 "scannerlexer.l"
1276
#line 106 "scannerlexer.l"
1281
#line 107 "scannerlexer.l"
1286
#line 108 "scannerlexer.l"
1291
#line 109 "scannerlexer.l"
1296
#line 110 "scannerlexer.l"
1301
#line 111 "scannerlexer.l"
1306
#line 112 "scannerlexer.l"
1311
#line 113 "scannerlexer.l"
1316
#line 114 "scannerlexer.l"
1321
#line 115 "scannerlexer.l"
1326
#line 116 "scannerlexer.l"
1331
#line 117 "scannerlexer.l"
1336
#line 118 "scannerlexer.l"
1341
#line 119 "scannerlexer.l"
1346
#line 120 "scannerlexer.l"
1351
#line 121 "scannerlexer.l"
1356
#line 122 "scannerlexer.l"
1361
#line 123 "scannerlexer.l"
1366
#line 124 "scannerlexer.l"
1371
#line 125 "scannerlexer.l"
1376
#line 126 "scannerlexer.l"
1381
#line 127 "scannerlexer.l"
1386
#line 128 "scannerlexer.l"
1387
{ return PLUSPLUS; }
1391
#line 129 "scannerlexer.l"
1392
{ return MINUSMINUS; }
1396
#line 130 "scannerlexer.l"
1401
#line 131 "scannerlexer.l"
1406
#line 133 "scannerlexer.l"
1407
{ if (!parse_ignored_macro()) REJECT; }
1411
#line 134 "scannerlexer.l"
1412
{ if (!parse_ignored_macro()) REJECT; }
1416
#line 135 "scannerlexer.l"
1417
{ if (!parse_ignored_macro()) REJECT; }
1421
#line 136 "scannerlexer.l"
1422
{ if (!parse_ignored_macro()) REJECT; }
1426
#line 137 "scannerlexer.l"
1431
#line 138 "scannerlexer.l"
1432
{ return EXTENSION; }
1436
#line 139 "scannerlexer.l"
1441
#line 140 "scannerlexer.l"
1442
{ if (!parse_ignored_macro()) REJECT; }
1446
#line 141 "scannerlexer.l"
1451
#line 142 "scannerlexer.l"
1452
{ return RESTRICT; }
1456
#line 143 "scannerlexer.l"
1457
{ if (!parse_ignored_macro()) REJECT; }
1461
#line 144 "scannerlexer.l"
1466
#line 146 "scannerlexer.l"
1467
{ if (scanner->macro_scan) return IDENTIFIER; else REJECT; }
1471
#line 148 "scannerlexer.l"
1472
{ if (!parse_ignored_macro()) REJECT; }
1476
#line 149 "scannerlexer.l"
1481
#line 150 "scannerlexer.l"
1486
#line 151 "scannerlexer.l"
1491
#line 152 "scannerlexer.l"
1496
#line 153 "scannerlexer.l"
1501
#line 154 "scannerlexer.l"
1502
{ return CONTINUE; }
1506
#line 155 "scannerlexer.l"
1511
#line 156 "scannerlexer.l"
1516
#line 157 "scannerlexer.l"
1521
#line 158 "scannerlexer.l"
1526
#line 159 "scannerlexer.l"
1531
#line 160 "scannerlexer.l"
1536
#line 161 "scannerlexer.l"
1541
#line 162 "scannerlexer.l"
1546
#line 163 "scannerlexer.l"
1551
#line 164 "scannerlexer.l"
1556
#line 165 "scannerlexer.l"
1561
#line 166 "scannerlexer.l"
1566
#line 167 "scannerlexer.l"
1571
#line 168 "scannerlexer.l"
1572
{ return REGISTER; }
1576
#line 169 "scannerlexer.l"
1577
{ return RESTRICT; }
1581
#line 170 "scannerlexer.l"
1586
#line 171 "scannerlexer.l"
1591
#line 172 "scannerlexer.l"
1596
#line 173 "scannerlexer.l"
1601
#line 174 "scannerlexer.l"
1606
#line 175 "scannerlexer.l"
1611
#line 176 "scannerlexer.l"
1616
#line 177 "scannerlexer.l"
1621
#line 178 "scannerlexer.l"
1626
#line 179 "scannerlexer.l"
1627
{ return UNSIGNED; }
1631
#line 180 "scannerlexer.l"
1636
#line 181 "scannerlexer.l"
1637
{ return VOLATILE; }
1641
#line 182 "scannerlexer.l"
1646
#line 184 "scannerlexer.l"
1647
{ return check_identifier(scanner, yytext); }
1651
#line 186 "scannerlexer.l"
1656
#line 187 "scannerlexer.l"
1661
#line 188 "scannerlexer.l"
1666
#line 190 "scannerlexer.l"
1667
{ return FLOATING; }
1671
#line 191 "scannerlexer.l"
1672
{ return FLOATING; }
1675
/* rule 113 can match eol */
1677
#line 193 "scannerlexer.l"
1678
{ return CHARACTER; }
1681
/* rule 114 can match eol */
1683
#line 194 "scannerlexer.l"
1684
{ return CHARACTER; }
1687
/* rule 115 can match eol */
1689
#line 196 "scannerlexer.l"
1693
/* rule 116 can match eol */
1695
#line 197 "scannerlexer.l"
1700
#line 199 "scannerlexer.l"
1701
{ if (yytext[0]) fprintf(stderr, "%s:%d: unexpected character `%c'\n", scanner->current_filename, lineno, yytext[0]); }
1705
#line 201 "scannerlexer.l"
1708
#line 1709 "scannerlexer.c"
1709
case YY_STATE_EOF(INITIAL):
1712
case YY_END_OF_BUFFER:
1714
/* Amount of text matched not including the EOB char. */
1715
int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1717
/* Undo the effects of YY_DO_BEFORE_ACTION. */
1718
*yy_cp = (yy_hold_char);
1719
YY_RESTORE_YY_MORE_OFFSET
1721
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1723
/* We're scanning a new file or input source. It's
1724
* possible that this happened because the user
1725
* just pointed yyin at a new source and called
1726
* yylex(). If so, then we have to assure
1727
* consistency between YY_CURRENT_BUFFER and our
1728
* globals. Here is the right place to do so, because
1729
* this is the first action (other than possibly a
1730
* back-up) that will match for the new input source.
1732
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1733
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1734
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1737
/* Note that here we test for yy_c_buf_p "<=" to the position
1738
* of the first EOB in the buffer, since yy_c_buf_p will
1739
* already have been incremented past the NUL character
1740
* (since all states make transitions on EOB to the
1741
* end-of-buffer state). Contrast this with the test
1744
if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1745
{ /* This was really a NUL. */
1746
yy_state_type yy_next_state;
1748
(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1750
yy_current_state = yy_get_previous_state( );
1752
/* Okay, we're now positioned to make the NUL
1753
* transition. We couldn't have
1754
* yy_get_previous_state() go ahead and do it
1755
* for us because it doesn't know how to deal
1756
* with the possibility of jamming (and we don't
1757
* want to build jamming into it because then it
1758
* will run more slowly).
1761
yy_next_state = yy_try_NUL_trans( yy_current_state );
1763
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1765
if ( yy_next_state )
1767
/* Consume the NUL. */
1768
yy_cp = ++(yy_c_buf_p);
1769
yy_current_state = yy_next_state;
1775
yy_cp = (yy_c_buf_p);
1776
goto yy_find_action;
1780
else switch ( yy_get_next_buffer( ) )
1782
case EOB_ACT_END_OF_FILE:
1784
(yy_did_buffer_switch_on_eof) = 0;
1788
/* Note: because we've taken care in
1789
* yy_get_next_buffer() to have set up
1790
* yytext, we can now set up
1791
* yy_c_buf_p so that if some total
1792
* hoser (like flex itself) wants to
1793
* call the scanner after we return the
1794
* YY_NULL, it'll still work - another
1795
* YY_NULL will get returned.
1797
(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1799
yy_act = YY_STATE_EOF(YY_START);
1805
if ( ! (yy_did_buffer_switch_on_eof) )
1811
case EOB_ACT_CONTINUE_SCAN:
1813
(yytext_ptr) + yy_amount_of_matched_text;
1815
yy_current_state = yy_get_previous_state( );
1817
yy_cp = (yy_c_buf_p);
1818
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1821
case EOB_ACT_LAST_MATCH:
1823
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1825
yy_current_state = yy_get_previous_state( );
1827
yy_cp = (yy_c_buf_p);
1828
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1829
goto yy_find_action;
1836
"fatal flex scanner internal error--no action found" );
1837
} /* end of action switch */
1838
} /* end of scanning one token */
1839
} /* end of yylex */
1841
/* yy_get_next_buffer - try to read in a new buffer
1843
* Returns a code representing an action:
1844
* EOB_ACT_LAST_MATCH -
1845
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1846
* EOB_ACT_END_OF_FILE - end of file
1848
static int yy_get_next_buffer (void)
1850
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1851
register char *source = (yytext_ptr);
1852
register int number_to_move, i;
1855
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1857
"fatal flex scanner internal error--end of buffer missed" );
1859
if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1860
{ /* Don't try to fill the buffer, so this is an EOF. */
1861
if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1863
/* We matched a single character, the EOB, so
1864
* treat this as a final EOF.
1866
return EOB_ACT_END_OF_FILE;
1871
/* We matched some text prior to the EOB, first
1874
return EOB_ACT_LAST_MATCH;
1878
/* Try to read more data. */
1880
/* First move last chars to start of buffer. */
1881
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1883
for ( i = 0; i < number_to_move; ++i )
1884
*(dest++) = *(source++);
1886
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1887
/* don't do the read, it's not guaranteed to return an EOF,
1890
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1895
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1897
while ( num_to_read <= 0 )
1898
{ /* Not enough room in the buffer - grow it. */
1901
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1905
if ( num_to_read > YY_READ_BUF_SIZE )
1906
num_to_read = YY_READ_BUF_SIZE;
1908
/* Read in more data. */
1909
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1910
(yy_n_chars), (size_t) num_to_read );
1912
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1915
if ( (yy_n_chars) == 0 )
1917
if ( number_to_move == YY_MORE_ADJ )
1919
ret_val = EOB_ACT_END_OF_FILE;
1925
ret_val = EOB_ACT_LAST_MATCH;
1926
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1927
YY_BUFFER_EOF_PENDING;
1932
ret_val = EOB_ACT_CONTINUE_SCAN;
1934
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1935
/* Extend the array by 50%, plus the number we really need. */
1936
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1937
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1938
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1939
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1942
(yy_n_chars) += number_to_move;
1943
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1944
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1946
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1951
/* yy_get_previous_state - get the state just before the EOB char was reached */
1953
static yy_state_type yy_get_previous_state (void)
1955
register yy_state_type yy_current_state;
1956
register char *yy_cp;
1958
yy_current_state = (yy_start);
1960
(yy_state_ptr) = (yy_state_buf);
1961
*(yy_state_ptr)++ = yy_current_state;
1963
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1965
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1966
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1968
yy_current_state = (int) yy_def[yy_current_state];
1969
if ( yy_current_state >= 355 )
1970
yy_c = yy_meta[(unsigned int) yy_c];
1972
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1973
*(yy_state_ptr)++ = yy_current_state;
1976
return yy_current_state;
1979
/* yy_try_NUL_trans - try to make a transition on the NUL character
1982
* next_state = yy_try_NUL_trans( current_state );
1984
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1986
register int yy_is_jam;
1988
register YY_CHAR yy_c = 1;
1989
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1991
yy_current_state = (int) yy_def[yy_current_state];
1992
if ( yy_current_state >= 355 )
1993
yy_c = yy_meta[(unsigned int) yy_c];
1995
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1996
yy_is_jam = (yy_current_state == 354);
1998
*(yy_state_ptr)++ = yy_current_state;
2000
return yy_is_jam ? 0 : yy_current_state;
2005
static int yyinput (void)
2007
static int input (void)
2013
*(yy_c_buf_p) = (yy_hold_char);
2015
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2017
/* yy_c_buf_p now points to the character we want to return.
2018
* If this occurs *before* the EOB characters, then it's a
2019
* valid NUL; if not, then we've hit the end of the buffer.
2021
if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2022
/* This was really a NUL. */
2023
*(yy_c_buf_p) = '\0';
2026
{ /* need more input */
2027
int offset = (yy_c_buf_p) - (yytext_ptr);
2030
switch ( yy_get_next_buffer( ) )
2032
case EOB_ACT_LAST_MATCH:
2033
/* This happens because yy_g_n_b()
2034
* sees that we've accumulated a
2035
* token and flags that we need to
2036
* try matching the token before
2037
* proceeding. But for input(),
2038
* there's no matching to consider.
2039
* So convert the EOB_ACT_LAST_MATCH
2040
* to EOB_ACT_END_OF_FILE.
2043
/* Reset buffer status. */
2048
case EOB_ACT_END_OF_FILE:
2053
if ( ! (yy_did_buffer_switch_on_eof) )
2062
case EOB_ACT_CONTINUE_SCAN:
2063
(yy_c_buf_p) = (yytext_ptr) + offset;
2069
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2070
*(yy_c_buf_p) = '\0'; /* preserve yytext */
2071
(yy_hold_char) = *++(yy_c_buf_p);
2075
#endif /* ifndef YY_NO_INPUT */
2077
/** Immediately switch to a different input stream.
2078
* @param input_file A readable stream.
2080
* @note This function does not reset the start condition to @c INITIAL .
2082
void yyrestart (FILE * input_file )
2085
if ( ! YY_CURRENT_BUFFER ){
2086
yyensure_buffer_stack ();
2087
YY_CURRENT_BUFFER_LVALUE =
2088
yy_create_buffer(yyin,YY_BUF_SIZE );
2091
yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2092
yy_load_buffer_state( );
2095
/** Switch to a different input buffer.
2096
* @param new_buffer The new input buffer.
2099
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2102
/* TODO. We should be able to replace this entire function body
2104
* yypop_buffer_state();
2105
* yypush_buffer_state(new_buffer);
2107
yyensure_buffer_stack ();
2108
if ( YY_CURRENT_BUFFER == new_buffer )
2111
if ( YY_CURRENT_BUFFER )
2113
/* Flush out information for old buffer. */
2114
*(yy_c_buf_p) = (yy_hold_char);
2115
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2116
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2119
YY_CURRENT_BUFFER_LVALUE = new_buffer;
2120
yy_load_buffer_state( );
2122
/* We don't actually know whether we did this switch during
2123
* EOF (yywrap()) processing, but the only time this flag
2124
* is looked at is after yywrap() is called, so it's safe
2125
* to go ahead and always set it.
2127
(yy_did_buffer_switch_on_eof) = 1;
2130
static void yy_load_buffer_state (void)
2132
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2133
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2134
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2135
(yy_hold_char) = *(yy_c_buf_p);
2138
/** Allocate and initialize an input buffer state.
2139
* @param file A readable stream.
2140
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2142
* @return the allocated buffer state.
2144
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2148
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2150
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2152
b->yy_buf_size = size;
2154
/* yy_ch_buf has to be 2 characters longer than the size given because
2155
* we need to put in 2 end-of-buffer characters.
2157
b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2158
if ( ! b->yy_ch_buf )
2159
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2161
b->yy_is_our_buffer = 1;
2163
yy_init_buffer(b,file );
2168
/** Destroy the buffer.
2169
* @param b a buffer created with yy_create_buffer()
2172
void yy_delete_buffer (YY_BUFFER_STATE b )
2178
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2179
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2181
if ( b->yy_is_our_buffer )
2182
yyfree((void *) b->yy_ch_buf );
2184
yyfree((void *) b );
2188
extern int isatty (int );
2189
#endif /* __cplusplus */
2191
/* Initializes or reinitializes a buffer.
2192
* This function is sometimes called more than once on the same buffer,
2193
* such as during a yyrestart() or at EOF.
2195
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2200
yy_flush_buffer(b );
2202
b->yy_input_file = file;
2203
b->yy_fill_buffer = 1;
2205
/* If b is the current buffer, then yy_init_buffer was _probably_
2206
* called from yyrestart() or through yy_get_next_buffer.
2207
* In that case, we don't want to reset the lineno or column.
2209
if (b != YY_CURRENT_BUFFER){
2210
b->yy_bs_lineno = 1;
2211
b->yy_bs_column = 0;
2214
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2219
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2220
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2223
void yy_flush_buffer (YY_BUFFER_STATE b )
2230
/* We always need two end-of-buffer characters. The first causes
2231
* a transition to the end-of-buffer state. The second causes
2232
* a jam in that state.
2234
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2235
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2237
b->yy_buf_pos = &b->yy_ch_buf[0];
2240
b->yy_buffer_status = YY_BUFFER_NEW;
2242
if ( b == YY_CURRENT_BUFFER )
2243
yy_load_buffer_state( );
2246
/** Pushes the new state onto the stack. The new state becomes
2247
* the current state. This function will allocate the stack
2249
* @param new_buffer The new state.
2252
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2254
if (new_buffer == NULL)
2257
yyensure_buffer_stack();
2259
/* This block is copied from yy_switch_to_buffer. */
2260
if ( YY_CURRENT_BUFFER )
2262
/* Flush out information for old buffer. */
2263
*(yy_c_buf_p) = (yy_hold_char);
2264
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2265
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2268
/* Only push if top exists. Otherwise, replace top. */
2269
if (YY_CURRENT_BUFFER)
2270
(yy_buffer_stack_top)++;
2271
YY_CURRENT_BUFFER_LVALUE = new_buffer;
2273
/* copied from yy_switch_to_buffer. */
2274
yy_load_buffer_state( );
2275
(yy_did_buffer_switch_on_eof) = 1;
2278
/** Removes and deletes the top of the stack, if present.
2279
* The next element becomes the new top.
2282
void yypop_buffer_state (void)
2284
if (!YY_CURRENT_BUFFER)
2287
yy_delete_buffer(YY_CURRENT_BUFFER );
2288
YY_CURRENT_BUFFER_LVALUE = NULL;
2289
if ((yy_buffer_stack_top) > 0)
2290
--(yy_buffer_stack_top);
2292
if (YY_CURRENT_BUFFER) {
2293
yy_load_buffer_state( );
2294
(yy_did_buffer_switch_on_eof) = 1;
2298
/* Allocates the stack if it does not exist.
2299
* Guarantees space for at least one push.
2301
static void yyensure_buffer_stack (void)
2305
if (!(yy_buffer_stack)) {
2307
/* First allocation is just for 2 elements, since we don't know if this
2308
* scanner will even need a stack. We use 2 instead of 1 to avoid an
2309
* immediate realloc on the next call.
2312
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2313
(num_to_alloc * sizeof(struct yy_buffer_state*)
2315
if ( ! (yy_buffer_stack) )
2316
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2318
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2320
(yy_buffer_stack_max) = num_to_alloc;
2321
(yy_buffer_stack_top) = 0;
2325
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2327
/* Increase the buffer to prepare for a possible push. */
2328
int grow_size = 8 /* arbitrary grow size */;
2330
num_to_alloc = (yy_buffer_stack_max) + grow_size;
2331
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2333
num_to_alloc * sizeof(struct yy_buffer_state*)
2335
if ( ! (yy_buffer_stack) )
2336
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2338
/* zero only the new slots.*/
2339
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2340
(yy_buffer_stack_max) = num_to_alloc;
2344
/** Setup the input buffer state to scan directly from a user-specified character buffer.
2345
* @param base the character buffer
2346
* @param size the size in bytes of the character buffer
2348
* @return the newly allocated buffer state object.
2350
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2355
base[size-2] != YY_END_OF_BUFFER_CHAR ||
2356
base[size-1] != YY_END_OF_BUFFER_CHAR )
2357
/* They forgot to leave room for the EOB's. */
2360
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2362
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2364
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2365
b->yy_buf_pos = b->yy_ch_buf = base;
2366
b->yy_is_our_buffer = 0;
2367
b->yy_input_file = 0;
2368
b->yy_n_chars = b->yy_buf_size;
2369
b->yy_is_interactive = 0;
2371
b->yy_fill_buffer = 0;
2372
b->yy_buffer_status = YY_BUFFER_NEW;
2374
yy_switch_to_buffer(b );
2379
/** Setup the input buffer state to scan a string. The next call to yylex() will
2380
* scan from a @e copy of @a str.
2381
* @param yystr a NUL-terminated string to scan
2383
* @return the newly allocated buffer state object.
2384
* @note If you want to scan bytes that may contain NUL values, then use
2385
* yy_scan_bytes() instead.
2387
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
2390
return yy_scan_bytes(yystr,strlen(yystr) );
2393
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2394
* scan from a @e copy of @a bytes.
2395
* @param bytes the byte buffer to scan
2396
* @param len the number of bytes in the buffer pointed to by @a bytes.
2398
* @return the newly allocated buffer state object.
2400
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2407
/* Get memory for full buffer, including space for trailing EOB's. */
2408
n = _yybytes_len + 2;
2409
buf = (char *) yyalloc(n );
2411
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2413
for ( i = 0; i < _yybytes_len; ++i )
2414
buf[i] = yybytes[i];
2416
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2418
b = yy_scan_buffer(buf,n );
2420
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2422
/* It's okay to grow etc. this buffer, and we should throw it
2423
* away when we're done.
2425
b->yy_is_our_buffer = 1;
2430
#ifndef YY_EXIT_FAILURE
2431
#define YY_EXIT_FAILURE 2
2434
static void yy_fatal_error (yyconst char* msg )
2436
(void) fprintf( stderr, "%s\n", msg );
2437
exit( YY_EXIT_FAILURE );
2440
/* Redefine yyless() so it works in section 3 code. */
2446
/* Undo effects of setting up yytext. */ \
2447
int yyless_macro_arg = (n); \
2448
YY_LESS_LINENO(yyless_macro_arg);\
2449
yytext[yyleng] = (yy_hold_char); \
2450
(yy_c_buf_p) = yytext + yyless_macro_arg; \
2451
(yy_hold_char) = *(yy_c_buf_p); \
2452
*(yy_c_buf_p) = '\0'; \
2453
yyleng = yyless_macro_arg; \
2457
/* Accessor methods (get/set functions) to struct members. */
2459
/** Get the current line number.
2462
int yyget_lineno (void)
2468
/** Get the input stream.
2471
FILE *yyget_in (void)
2476
/** Get the output stream.
2479
FILE *yyget_out (void)
2484
/** Get the length of the current token.
2487
int yyget_leng (void)
2492
/** Get the current token.
2496
char *yyget_text (void)
2501
/** Set the current line number.
2502
* @param line_number
2505
void yyset_lineno (int line_number )
2508
yylineno = line_number;
2511
/** Set the input stream. This does not discard the current
2513
* @param in_str A readable stream.
2515
* @see yy_switch_to_buffer
2517
void yyset_in (FILE * in_str )
2522
void yyset_out (FILE * out_str )
2527
int yyget_debug (void)
2529
return yy_flex_debug;
2532
void yyset_debug (int bdebug )
2534
yy_flex_debug = bdebug ;
2537
static int yy_init_globals (void)
2539
/* Initialization is the same as for the non-reentrant scanner.
2540
* This function is called from yylex_destroy(), so don't allocate here.
2543
(yy_buffer_stack) = 0;
2544
(yy_buffer_stack_top) = 0;
2545
(yy_buffer_stack_max) = 0;
2546
(yy_c_buf_p) = (char *) 0;
2552
(yy_full_match) = 0;
2555
/* Defined in main.c */
2564
/* For future reference: Set errno on error, since we are called by
2570
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2571
int yylex_destroy (void)
2574
/* Pop the buffer stack, destroying each element. */
2575
while(YY_CURRENT_BUFFER){
2576
yy_delete_buffer(YY_CURRENT_BUFFER );
2577
YY_CURRENT_BUFFER_LVALUE = NULL;
2578
yypop_buffer_state();
2581
/* Destroy the stack itself. */
2582
yyfree((yy_buffer_stack) );
2583
(yy_buffer_stack) = NULL;
2585
yyfree ( (yy_state_buf) );
2586
(yy_state_buf) = NULL;
2588
/* Reset the globals. This is important in a non-reentrant scanner so the next time
2589
* yylex() is called, initialization will occur. */
2596
* Internal utility routines.
2600
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2603
for ( i = 0; i < n; ++i )
2608
#ifdef YY_NEED_STRLEN
2609
static int yy_flex_strlen (yyconst char * s )
2612
for ( n = 0; s[n]; ++n )
2619
void *yyalloc (yy_size_t size )
2621
return (void *) malloc( size );
2624
void *yyrealloc (void * ptr, yy_size_t size )
2626
/* The cast to (char *) in the following accommodates both
2627
* implementations that use char* generic pointers, and those
2628
* that use void* generic pointers. It works with the latter
2629
* because both ANSI C and C++ allow castless assignment from
2630
* any pointer type to void*, and deal with argument conversions
2631
* as though doing an assignment.
2633
return (void *) realloc( (char *) ptr, size );
2636
void yyfree (void * ptr )
2638
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2641
#define YYTABLES_NAME "yytables"
2643
#line 201 "scannerlexer.l"
2655
parse_comment (GISourceScanner *scanner)
2663
comment = g_string_new ("");
2665
while (c2 != EOF && !(c1 == '*' && c2 == '/'))
2667
g_string_append_c (comment, c1);
2677
scanner->comments = g_slist_prepend (scanner->comments,
2678
g_string_free (comment, FALSE));
2682
check_identifier (GISourceScanner *scanner,
2686
* This function checks if `s' is a type name or an
2690
if (gi_source_scanner_is_typedef (scanner, s)) {
2691
return TYPEDEF_NAME;
2692
} else if (strcmp (s, "__builtin_va_list") == 0) {
2693
return TYPEDEF_NAME;
2700
process_directive (GISourceScanner *scanner)
2702
/* extract current filename from #line directives */
2703
GString *filename_builder;
2704
gboolean in_string, found_filename;
2707
found_filename = FALSE;
2709
filename_builder = g_string_new ("");
2712
while (c != EOF && c != '\n') {
2716
found_filename = TRUE;
2717
} else if (c >= '0' && c <= '9') {
2718
if (!found_filename) {
2719
lineno = lineno * 10 + (c - '0');
2725
} else if (c == '\\') {
2726
g_string_append_c (filename_builder, c);
2728
g_string_append_c (filename_builder, c);
2730
g_string_append_c (filename_builder, c);
2736
if (filename_builder->len > 0) {
2737
char *filename = g_strcompress (filename_builder->str);
2738
if (g_realpath (filename))
2740
g_free (scanner->current_filename);
2741
scanner->current_filename = g_realpath (filename);
2742
g_assert (scanner->current_filename);
2747
g_string_free (filename_builder, TRUE);
2751
* This parses a macro which is ignored, such as
2752
* __attribute__((x)) or __asm__ (x)
2755
parse_ignored_macro (void)
2760
while ((c = input ()) != EOF && isspace (c))
2766
while ((c = input ()) != EOF && (nest > 0 || c != ')')) {
2771
else if (c == '"') {
2772
while ((c = input ()) != EOF && c != '"') {
2776
} else if (c == '\'') {
2785
} else if (c == '\n')