Initial packaging for Tizen
[profile/ivi/gobject-introspection.git] / scannerlexer.c
1
2 #line 3 "scannerlexer.c"
3
4 #define  YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex */
7
8 #define FLEX_SCANNER
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
13 #define FLEX_BETA
14 #endif
15
16 /* First, we deal with  platform-specific or compiler-specific issues. */
17
18 /* begin standard C headers. */
19 #include <stdio.h>
20 #include <string.h>
21 #include <errno.h>
22 #include <stdlib.h>
23
24 /* end standard C headers. */
25
26 /* flex integer type definitions */
27
28 #ifndef FLEXINT_H
29 #define FLEXINT_H
30
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36  * if you want the limit (max/min) macros for int types. 
37  */
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
40 #endif
41
42 #include <inttypes.h>
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;
49 #else
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;
56
57 /* Limits of integral types. */
58 #ifndef INT8_MIN
59 #define INT8_MIN               (-128)
60 #endif
61 #ifndef INT16_MIN
62 #define INT16_MIN              (-32767-1)
63 #endif
64 #ifndef INT32_MIN
65 #define INT32_MIN              (-2147483647-1)
66 #endif
67 #ifndef INT8_MAX
68 #define INT8_MAX               (127)
69 #endif
70 #ifndef INT16_MAX
71 #define INT16_MAX              (32767)
72 #endif
73 #ifndef INT32_MAX
74 #define INT32_MAX              (2147483647)
75 #endif
76 #ifndef UINT8_MAX
77 #define UINT8_MAX              (255U)
78 #endif
79 #ifndef UINT16_MAX
80 #define UINT16_MAX             (65535U)
81 #endif
82 #ifndef UINT32_MAX
83 #define UINT32_MAX             (4294967295U)
84 #endif
85
86 #endif /* ! C99 */
87
88 #endif /* ! FLEXINT_H */
89
90 #ifdef __cplusplus
91
92 /* The "const" storage-class-modifier is valid. */
93 #define YY_USE_CONST
94
95 #else   /* ! __cplusplus */
96
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
99
100 #define YY_USE_CONST
101
102 #endif  /* defined (__STDC__) */
103 #endif  /* ! __cplusplus */
104
105 #ifdef YY_USE_CONST
106 #define yyconst const
107 #else
108 #define yyconst
109 #endif
110
111 /* Returned upon end-of-file. */
112 #define YY_NULL 0
113
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
117  * double cast.
118  */
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120
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.
124  */
125 #define BEGIN (yy_start) = 1 + 2 *
126
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
129  * compatibility.
130  */
131 #define YY_START (((yy_start) - 1) / 2)
132 #define YYSTATE YY_START
133
134 /* Action number for EOF rule of a given start state. */
135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136
137 /* Special action meaning "start processing a new file". */
138 #define YY_NEW_FILE yyrestart(yyin  )
139
140 #define YY_END_OF_BUFFER_CHAR 0
141
142 /* Size of default input buffer. */
143 #ifndef YY_BUF_SIZE
144 #define YY_BUF_SIZE 16384
145 #endif
146
147 /* The state buf must be large enough to hold one state per character in the main buffer.
148  */
149 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
150
151 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
152 #define YY_TYPEDEF_YY_BUFFER_STATE
153 typedef struct yy_buffer_state *YY_BUFFER_STATE;
154 #endif
155
156 #ifndef YY_TYPEDEF_YY_SIZE_T
157 #define YY_TYPEDEF_YY_SIZE_T
158 typedef size_t yy_size_t;
159 #endif
160
161 extern yy_size_t yyleng;
162
163 extern FILE *yyin, *yyout;
164
165 #define EOB_ACT_CONTINUE_SCAN 0
166 #define EOB_ACT_END_OF_FILE 1
167 #define EOB_ACT_LAST_MATCH 2
168
169     #define YY_LESS_LINENO(n)
170     
171 /* Return all but the first "n" matched characters back to the input stream. */
172 #define yyless(n) \
173         do \
174                 { \
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 */ \
182                 } \
183         while ( 0 )
184
185 #define unput(c) yyunput( c, (yytext_ptr)  )
186
187 #ifndef YY_STRUCT_YY_BUFFER_STATE
188 #define YY_STRUCT_YY_BUFFER_STATE
189 struct yy_buffer_state
190         {
191         FILE *yy_input_file;
192
193         char *yy_ch_buf;                /* input buffer */
194         char *yy_buf_pos;               /* current position in input buffer */
195
196         /* Size of input buffer in bytes, not including room for EOB
197          * characters.
198          */
199         yy_size_t yy_buf_size;
200
201         /* Number of characters read into yy_ch_buf, not including EOB
202          * characters.
203          */
204         yy_size_t yy_n_chars;
205
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
208          * delete it.
209          */
210         int yy_is_our_buffer;
211
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
215          * each newline.
216          */
217         int yy_is_interactive;
218
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
221          * not.
222          */
223         int yy_at_bol;
224
225     int yy_bs_lineno; /**< The line count. */
226     int yy_bs_column; /**< The column count. */
227     
228         /* Whether to try to fill the input buffer when we reach the
229          * end of it.
230          */
231         int yy_fill_buffer;
232
233         int yy_buffer_status;
234
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.
242          *
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.
246          */
247 #define YY_BUFFER_EOF_PENDING 2
248
249         };
250 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
251
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. */
256
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
259  * "scanner state".
260  *
261  * Returns the top of the stack, or NULL.
262  */
263 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
264                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
265                           : NULL)
266
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.
269  */
270 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
271
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 */
275 yy_size_t yyleng;
276
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 */
281
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 ...
284  */
285 static int yy_did_buffer_switch_on_eof;
286
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 );
294
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  );
298
299 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
300
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  );
304
305 void *yyalloc (yy_size_t  );
306 void *yyrealloc (void *,yy_size_t  );
307 void yyfree (void *  );
308
309 #define yy_new_buffer yy_create_buffer
310
311 #define yy_set_interactive(is_interactive) \
312         { \
313         if ( ! YY_CURRENT_BUFFER ){ \
314         yyensure_buffer_stack (); \
315                 YY_CURRENT_BUFFER_LVALUE =    \
316             yy_create_buffer(yyin,YY_BUF_SIZE ); \
317         } \
318         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
319         }
320
321 #define yy_set_bol(at_bol) \
322         { \
323         if ( ! YY_CURRENT_BUFFER ){\
324         yyensure_buffer_stack (); \
325                 YY_CURRENT_BUFFER_LVALUE =    \
326             yy_create_buffer(yyin,YY_BUF_SIZE ); \
327         } \
328         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
329         }
330
331 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
332
333 /* Begin user sect3 */
334
335 typedef unsigned char YY_CHAR;
336
337 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
338
339 typedef int yy_state_type;
340
341 extern int yylineno;
342
343 int yylineno = 1;
344
345 extern char *yytext;
346 #define yytext_ptr yytext
347
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[]  );
352
353 /* Done after the current pattern has been matched and before the
354  * corresponding action - sets up yytext.
355  */
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; \
360         *yy_cp = '\0'; \
361         (yy_c_buf_p) = yy_cp;
362
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. */
367 struct yy_trans_info
368         {
369         flex_int32_t yy_verify;
370         flex_int32_t yy_nxt;
371         };
372 static yyconst flex_int16_t yy_acclist[711] =
373     {   0,
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,
384
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,
395
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,
406
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,
417
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,
428
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,
439
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,
450
451        74,  110,   74,  110,   64,   74,  110,   67,   74,  110
452     } ;
453
454 static yyconst flex_int16_t yy_accept[377] =
455     {   0,
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,
466
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,
477
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,
488
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
497     } ;
498
499 static yyconst flex_int32_t yy_ec[256] =
500     {   0,
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,
511
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,
522
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,
528         1,    1,    1,    1,    1
529     } ;
530
531 static yyconst flex_int32_t yy_meta[70] =
532     {   0,
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
540     } ;
541
542 static yyconst flex_int16_t yy_base[389] =
543     {   0,
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,
554
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,
565
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,
576
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
586     } ;
587
588 static yyconst flex_int16_t yy_def[389] =
589     {   0,
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,
600
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,
611
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,
622
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
632     } ;
633
634 static yyconst flex_int16_t yy_nxt[642] =
635     {   0,
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,
646
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,
657
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,
668
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,
679
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,
690
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,
701
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,
706       375
707     } ;
708
709 static yyconst flex_int16_t yy_chk[642] =
710     {   0,
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,
721
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,
732
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,
743
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,
754
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,
765
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,
776
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,
781       375
782     } ;
783
784 extern int yy_flex_debug;
785 int yy_flex_debug = 0;
786
787 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
788 static char *yy_full_match;
789 static int yy_lp;
790 #define REJECT \
791 { \
792 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
793 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
794 ++(yy_lp); \
795 goto find_rule; \
796 }
797
798 #define yymore() yymore_used_but_not_detected
799 #define YY_MORE_ADJ 0
800 #define YY_RESTORE_YY_MORE_OFFSET
801 char *yytext;
802 #line 1 "scannerlexer.l"
803 /* -*- Mode: C -*-
804  * GObject introspection: C lexer
805  *
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>
809  *
810  * All rights reserved.
811  *
812  * Redistribution and use in source and binary forms, with or without
813  * modification, are permitted provided that the following conditions
814  * are met:
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.
820  *
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.
831  */
832 #line 32 "scannerlexer.l"
833 #include <ctype.h>
834 #include <stdio.h>
835
836 #include <glib.h>
837 #include "sourcescanner.h"
838 #include "scannerparser.h"
839 #include "grealpath.h"
840
841 int lineno;
842 char linebuf[2000];
843
844 #undef YY_BUF_SIZE
845 #define YY_BUF_SIZE 1048576
846
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"
856
857 #define INITIAL 0
858
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.
863  */
864 #include <unistd.h>
865 #endif
866
867 #ifndef YY_EXTRA_TYPE
868 #define YY_EXTRA_TYPE void *
869 #endif
870
871 static int yy_init_globals (void );
872
873 /* Accessor methods to globals.
874    These are made visible to non-reentrant scanners for convenience. */
875
876 int yylex_destroy (void );
877
878 int yyget_debug (void );
879
880 void yyset_debug (int debug_flag  );
881
882 YY_EXTRA_TYPE yyget_extra (void );
883
884 void yyset_extra (YY_EXTRA_TYPE user_defined  );
885
886 FILE *yyget_in (void );
887
888 void yyset_in  (FILE * in_str  );
889
890 FILE *yyget_out (void );
891
892 void yyset_out  (FILE * out_str  );
893
894 yy_size_t yyget_leng (void );
895
896 char *yyget_text (void );
897
898 int yyget_lineno (void );
899
900 void yyset_lineno (int line_number  );
901
902 /* Macros after this point can all be overridden by user definitions in
903  * section 1.
904  */
905
906 #ifndef YY_SKIP_YYWRAP
907 #ifdef __cplusplus
908 extern "C" int yywrap (void );
909 #else
910 extern int yywrap (void );
911 #endif
912 #endif
913
914 #ifndef yytext_ptr
915 static void yy_flex_strncpy (char *,yyconst char *,int );
916 #endif
917
918 #ifdef YY_NEED_STRLEN
919 static int yy_flex_strlen (yyconst char * );
920 #endif
921
922 #ifndef YY_NO_INPUT
923
924 #ifdef __cplusplus
925 static int yyinput (void );
926 #else
927 static int input (void );
928 #endif
929
930 #endif
931
932 /* Amount of stuff to slurp up with each read. */
933 #ifndef YY_READ_BUF_SIZE
934 #define YY_READ_BUF_SIZE 8192
935 #endif
936
937 /* Copy whatever the last rule matched to the standard output. */
938 #ifndef ECHO
939 /* This used to be an fputs(), but since the string might contain NUL's,
940  * we now use fwrite().
941  */
942 #define ECHO fwrite( yytext, yyleng, 1, yyout )
943 #endif
944
945 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
946  * is returned in "result".
947  */
948 #ifndef YY_INPUT
949 #define YY_INPUT(buf,result,max_size) \
950         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
951                 { \
952                 int c = '*'; \
953                 size_t n; \
954                 for ( n = 0; n < max_size && \
955                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
956                         buf[n] = (char) c; \
957                 if ( c == '\n' ) \
958                         buf[n++] = (char) c; \
959                 if ( c == EOF && ferror( yyin ) ) \
960                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
961                 result = n; \
962                 } \
963         else \
964                 { \
965                 errno=0; \
966                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
967                         { \
968                         if( errno != EINTR) \
969                                 { \
970                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
971                                 break; \
972                                 } \
973                         errno=0; \
974                         clearerr(yyin); \
975                         } \
976                 }\
977 \
978
979 #endif
980
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.
984  */
985 #ifndef yyterminate
986 #define yyterminate() return YY_NULL
987 #endif
988
989 /* Number of entries by which start-condition stack grows. */
990 #ifndef YY_START_STACK_INCR
991 #define YY_START_STACK_INCR 25
992 #endif
993
994 /* Report a fatal error. */
995 #ifndef YY_FATAL_ERROR
996 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
997 #endif
998
999 /* end tables serialization structures and prototypes */
1000
1001 /* Default declaration of generated scanner - a define so the user can
1002  * easily add parameters.
1003  */
1004 #ifndef YY_DECL
1005 #define YY_DECL_IS_OURS 1
1006
1007 extern int yylex (void);
1008
1009 #define YY_DECL int yylex (void)
1010 #endif /* !YY_DECL */
1011
1012 /* Code executed at the beginning of each rule, after yytext and yyleng
1013  * have been set up.
1014  */
1015 #ifndef YY_USER_ACTION
1016 #define YY_USER_ACTION
1017 #endif
1018
1019 /* Code executed at the end of each rule. */
1020 #ifndef YY_BREAK
1021 #define YY_BREAK break;
1022 #endif
1023
1024 #define YY_RULE_SETUP \
1025         YY_USER_ACTION
1026
1027 /** The main scanner function which does all the work.
1028  */
1029 YY_DECL
1030 {
1031         register yy_state_type yy_current_state;
1032         register char *yy_cp, *yy_bp;
1033         register int yy_act;
1034     
1035 #line 65 "scannerlexer.l"
1036
1037
1038 #line 1039 "scannerlexer.c"
1039
1040         if ( !(yy_init) )
1041                 {
1042                 (yy_init) = 1;
1043
1044 #ifdef YY_USER_INIT
1045                 YY_USER_INIT;
1046 #endif
1047
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()" );
1053
1054                 if ( ! (yy_start) )
1055                         (yy_start) = 1; /* first start state */
1056
1057                 if ( ! yyin )
1058                         yyin = stdin;
1059
1060                 if ( ! yyout )
1061                         yyout = stdout;
1062
1063                 if ( ! YY_CURRENT_BUFFER ) {
1064                         yyensure_buffer_stack ();
1065                         YY_CURRENT_BUFFER_LVALUE =
1066                                 yy_create_buffer(yyin,YY_BUF_SIZE );
1067                 }
1068
1069                 yy_load_buffer_state( );
1070                 }
1071
1072         while ( 1 )             /* loops until end-of-file is reached */
1073                 {
1074                 yy_cp = (yy_c_buf_p);
1075
1076                 /* Support of yytext. */
1077                 *yy_cp = (yy_hold_char);
1078
1079                 /* yy_bp points to the position in yy_ch_buf of the start of
1080                  * the current run.
1081                  */
1082                 yy_bp = yy_cp;
1083
1084                 yy_current_state = (yy_start);
1085
1086                 (yy_state_ptr) = (yy_state_buf);
1087                 *(yy_state_ptr)++ = yy_current_state;
1088
1089 yy_match:
1090                 do
1091                         {
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 )
1094                                 {
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];
1098                                 }
1099                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1100                         *(yy_state_ptr)++ = yy_current_state;
1101                         ++yy_cp;
1102                         }
1103                 while ( yy_base[yy_current_state] != 572 );
1104
1105 yy_find_action:
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 */
1110                         {
1111                         if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1112                                 {
1113                                 yy_act = yy_acclist[(yy_lp)];
1114                                         {
1115                                         (yy_full_match) = yy_cp;
1116                                         break;
1117                                         }
1118                                 }
1119                         --yy_cp;
1120                         yy_current_state = *--(yy_state_ptr);
1121                         (yy_lp) = yy_accept[yy_current_state];
1122                         }
1123
1124                 YY_DO_BEFORE_ACTION;
1125
1126 do_action:      /* This label is used only to access EOF actions. */
1127
1128                 switch ( yy_act )
1129         { /* beginning of action switch */
1130 case 1:
1131 /* rule 1 can match eol */
1132 YY_RULE_SETUP
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 */
1138                                                 ++lineno;
1139                                         }
1140         YY_BREAK
1141 case 2:
1142 /* rule 2 can match eol */
1143 YY_RULE_SETUP
1144 #line 73 "scannerlexer.l"
1145 { ++lineno; }
1146         YY_BREAK
1147 case 3:
1148 YY_RULE_SETUP
1149 #line 74 "scannerlexer.l"
1150 { /* Ignore whitespace. */ }
1151         YY_BREAK
1152 case 4:
1153 YY_RULE_SETUP
1154 #line 76 "scannerlexer.l"
1155 { parse_comment(scanner); }
1156         YY_BREAK
1157 case 5:
1158 YY_RULE_SETUP
1159 #line 77 "scannerlexer.l"
1160 { parse_trigraph(scanner); }
1161         YY_BREAK
1162 case 6:
1163 YY_RULE_SETUP
1164 #line 78 "scannerlexer.l"
1165 { }
1166         YY_BREAK
1167 case 7:
1168 YY_RULE_SETUP
1169 #line 80 "scannerlexer.l"
1170 { yyless (yyleng - 1); return FUNCTION_MACRO; }
1171         YY_BREAK
1172 case 8:
1173 YY_RULE_SETUP
1174 #line 81 "scannerlexer.l"
1175 { return OBJECT_MACRO; }
1176         YY_BREAK
1177 case 9:
1178 /* rule 9 can match eol */
1179 YY_RULE_SETUP
1180 #line 82 "scannerlexer.l"
1181 { /* Ignore pragma. */ }
1182         YY_BREAK
1183 case 10:
1184 /* rule 10 can match eol */
1185 YY_RULE_SETUP
1186 #line 84 "scannerlexer.l"
1187 { process_linemarks(scanner); }
1188         YY_BREAK
1189 case 11:
1190 YY_RULE_SETUP
1191 #line 85 "scannerlexer.l"
1192 { }
1193         YY_BREAK
1194 case 12:
1195 YY_RULE_SETUP
1196 #line 86 "scannerlexer.l"
1197 { return '{'; }
1198         YY_BREAK
1199 case 13:
1200 YY_RULE_SETUP
1201 #line 87 "scannerlexer.l"
1202 { return '{'; }
1203         YY_BREAK
1204 case 14:
1205 YY_RULE_SETUP
1206 #line 88 "scannerlexer.l"
1207 { return '}'; }
1208         YY_BREAK
1209 case 15:
1210 YY_RULE_SETUP
1211 #line 89 "scannerlexer.l"
1212 { return '}'; }
1213         YY_BREAK
1214 case 16:
1215 YY_RULE_SETUP
1216 #line 90 "scannerlexer.l"
1217 { return '['; }
1218         YY_BREAK
1219 case 17:
1220 YY_RULE_SETUP
1221 #line 91 "scannerlexer.l"
1222 { return '['; }
1223         YY_BREAK
1224 case 18:
1225 YY_RULE_SETUP
1226 #line 92 "scannerlexer.l"
1227 { return ']'; }
1228         YY_BREAK
1229 case 19:
1230 YY_RULE_SETUP
1231 #line 93 "scannerlexer.l"
1232 { return ']'; }
1233         YY_BREAK
1234 case 20:
1235 YY_RULE_SETUP
1236 #line 94 "scannerlexer.l"
1237 { return '('; }
1238         YY_BREAK
1239 case 21:
1240 YY_RULE_SETUP
1241 #line 95 "scannerlexer.l"
1242 { return ')'; }
1243         YY_BREAK
1244 case 22:
1245 YY_RULE_SETUP
1246 #line 96 "scannerlexer.l"
1247 { return ';'; }
1248         YY_BREAK
1249 case 23:
1250 YY_RULE_SETUP
1251 #line 97 "scannerlexer.l"
1252 { return ':'; }
1253         YY_BREAK
1254 case 24:
1255 YY_RULE_SETUP
1256 #line 98 "scannerlexer.l"
1257 { return ELLIPSIS; }
1258         YY_BREAK
1259 case 25:
1260 YY_RULE_SETUP
1261 #line 99 "scannerlexer.l"
1262 { return '?'; }
1263         YY_BREAK
1264 case 26:
1265 YY_RULE_SETUP
1266 #line 100 "scannerlexer.l"
1267 { return '.'; }
1268         YY_BREAK
1269 case 27:
1270 YY_RULE_SETUP
1271 #line 101 "scannerlexer.l"
1272 { return '+'; }
1273         YY_BREAK
1274 case 28:
1275 YY_RULE_SETUP
1276 #line 102 "scannerlexer.l"
1277 { return '-'; }
1278         YY_BREAK
1279 case 29:
1280 YY_RULE_SETUP
1281 #line 103 "scannerlexer.l"
1282 { return '*'; }
1283         YY_BREAK
1284 case 30:
1285 YY_RULE_SETUP
1286 #line 104 "scannerlexer.l"
1287 { return '/'; }
1288         YY_BREAK
1289 case 31:
1290 YY_RULE_SETUP
1291 #line 105 "scannerlexer.l"
1292 { return '%'; }
1293         YY_BREAK
1294 case 32:
1295 YY_RULE_SETUP
1296 #line 106 "scannerlexer.l"
1297 { return '^'; }
1298         YY_BREAK
1299 case 33:
1300 YY_RULE_SETUP
1301 #line 107 "scannerlexer.l"
1302 { return '&'; }
1303         YY_BREAK
1304 case 34:
1305 YY_RULE_SETUP
1306 #line 108 "scannerlexer.l"
1307 { return '|'; }
1308         YY_BREAK
1309 case 35:
1310 YY_RULE_SETUP
1311 #line 109 "scannerlexer.l"
1312 { return '~'; }
1313         YY_BREAK
1314 case 36:
1315 YY_RULE_SETUP
1316 #line 110 "scannerlexer.l"
1317 { return '!'; }
1318         YY_BREAK
1319 case 37:
1320 YY_RULE_SETUP
1321 #line 111 "scannerlexer.l"
1322 { return '='; }
1323         YY_BREAK
1324 case 38:
1325 YY_RULE_SETUP
1326 #line 112 "scannerlexer.l"
1327 { return '<'; }
1328         YY_BREAK
1329 case 39:
1330 YY_RULE_SETUP
1331 #line 113 "scannerlexer.l"
1332 { return '>'; }
1333         YY_BREAK
1334 case 40:
1335 YY_RULE_SETUP
1336 #line 114 "scannerlexer.l"
1337 { return ADDEQ; }
1338         YY_BREAK
1339 case 41:
1340 YY_RULE_SETUP
1341 #line 115 "scannerlexer.l"
1342 { return SUBEQ; }
1343         YY_BREAK
1344 case 42:
1345 YY_RULE_SETUP
1346 #line 116 "scannerlexer.l"
1347 { return MULEQ; }
1348         YY_BREAK
1349 case 43:
1350 YY_RULE_SETUP
1351 #line 117 "scannerlexer.l"
1352 { return DIVEQ; }
1353         YY_BREAK
1354 case 44:
1355 YY_RULE_SETUP
1356 #line 118 "scannerlexer.l"
1357 { return MODEQ; }
1358         YY_BREAK
1359 case 45:
1360 YY_RULE_SETUP
1361 #line 119 "scannerlexer.l"
1362 { return XOREQ; }
1363         YY_BREAK
1364 case 46:
1365 YY_RULE_SETUP
1366 #line 120 "scannerlexer.l"
1367 { return ANDEQ; }
1368         YY_BREAK
1369 case 47:
1370 YY_RULE_SETUP
1371 #line 121 "scannerlexer.l"
1372 { return OREQ; }
1373         YY_BREAK
1374 case 48:
1375 YY_RULE_SETUP
1376 #line 122 "scannerlexer.l"
1377 { return SL; }
1378         YY_BREAK
1379 case 49:
1380 YY_RULE_SETUP
1381 #line 123 "scannerlexer.l"
1382 { return SR; }
1383         YY_BREAK
1384 case 50:
1385 YY_RULE_SETUP
1386 #line 124 "scannerlexer.l"
1387 { return SLEQ; }
1388         YY_BREAK
1389 case 51:
1390 YY_RULE_SETUP
1391 #line 125 "scannerlexer.l"
1392 { return SREQ; }
1393         YY_BREAK
1394 case 52:
1395 YY_RULE_SETUP
1396 #line 126 "scannerlexer.l"
1397 { return EQ; }
1398         YY_BREAK
1399 case 53:
1400 YY_RULE_SETUP
1401 #line 127 "scannerlexer.l"
1402 { return NOTEQ; }
1403         YY_BREAK
1404 case 54:
1405 YY_RULE_SETUP
1406 #line 128 "scannerlexer.l"
1407 { return LTEQ; }
1408         YY_BREAK
1409 case 55:
1410 YY_RULE_SETUP
1411 #line 129 "scannerlexer.l"
1412 { return GTEQ; }
1413         YY_BREAK
1414 case 56:
1415 YY_RULE_SETUP
1416 #line 130 "scannerlexer.l"
1417 { return ANDAND; }
1418         YY_BREAK
1419 case 57:
1420 YY_RULE_SETUP
1421 #line 131 "scannerlexer.l"
1422 { return OROR; }
1423         YY_BREAK
1424 case 58:
1425 YY_RULE_SETUP
1426 #line 132 "scannerlexer.l"
1427 { return PLUSPLUS; }
1428         YY_BREAK
1429 case 59:
1430 YY_RULE_SETUP
1431 #line 133 "scannerlexer.l"
1432 { return MINUSMINUS; }
1433         YY_BREAK
1434 case 60:
1435 YY_RULE_SETUP
1436 #line 134 "scannerlexer.l"
1437 { return ','; }
1438         YY_BREAK
1439 case 61:
1440 YY_RULE_SETUP
1441 #line 135 "scannerlexer.l"
1442 { return ARROW; }
1443         YY_BREAK
1444 case 62:
1445 YY_RULE_SETUP
1446 #line 137 "scannerlexer.l"
1447 { if (!parse_ignored_macro()) REJECT; }
1448         YY_BREAK
1449 case 63:
1450 YY_RULE_SETUP
1451 #line 138 "scannerlexer.l"
1452 { if (!parse_ignored_macro()) REJECT; }
1453         YY_BREAK
1454 case 64:
1455 YY_RULE_SETUP
1456 #line 139 "scannerlexer.l"
1457 { if (!parse_ignored_macro()) REJECT; }
1458         YY_BREAK
1459 case 65:
1460 YY_RULE_SETUP
1461 #line 140 "scannerlexer.l"
1462 { if (!parse_ignored_macro()) REJECT; }
1463         YY_BREAK
1464 case 66:
1465 YY_RULE_SETUP
1466 #line 141 "scannerlexer.l"
1467 { return CONST; }
1468         YY_BREAK
1469 case 67:
1470 YY_RULE_SETUP
1471 #line 142 "scannerlexer.l"
1472 { return EXTENSION; }
1473         YY_BREAK
1474 case 68:
1475 YY_RULE_SETUP
1476 #line 143 "scannerlexer.l"
1477 { return INLINE; }
1478         YY_BREAK
1479 case 69:
1480 YY_RULE_SETUP
1481 #line 144 "scannerlexer.l"
1482 { if (!parse_ignored_macro()) REJECT; }
1483         YY_BREAK
1484 case 70:
1485 YY_RULE_SETUP
1486 #line 145 "scannerlexer.l"
1487 { return SIGNED; }
1488         YY_BREAK
1489 case 71:
1490 YY_RULE_SETUP
1491 #line 146 "scannerlexer.l"
1492 { return RESTRICT; }
1493         YY_BREAK
1494 case 72:
1495 YY_RULE_SETUP
1496 #line 147 "scannerlexer.l"
1497 { if (!parse_ignored_macro()) REJECT; }
1498         YY_BREAK
1499 case 73:
1500 YY_RULE_SETUP
1501 #line 148 "scannerlexer.l"
1502 { return BOOL; }
1503         YY_BREAK
1504 case 74:
1505 YY_RULE_SETUP
1506 #line 150 "scannerlexer.l"
1507 { if (scanner->macro_scan) return IDENTIFIER; else REJECT; }
1508         YY_BREAK
1509 case 75:
1510 YY_RULE_SETUP
1511 #line 152 "scannerlexer.l"
1512 { if (!parse_ignored_macro()) REJECT; }
1513         YY_BREAK
1514 case 76:
1515 YY_RULE_SETUP
1516 #line 153 "scannerlexer.l"
1517 { return AUTO; }
1518         YY_BREAK
1519 case 77:
1520 YY_RULE_SETUP
1521 #line 154 "scannerlexer.l"
1522 { return BREAK; }
1523         YY_BREAK
1524 case 78:
1525 YY_RULE_SETUP
1526 #line 155 "scannerlexer.l"
1527 { return CASE; }
1528         YY_BREAK
1529 case 79:
1530 YY_RULE_SETUP
1531 #line 156 "scannerlexer.l"
1532 { return CHAR; }
1533         YY_BREAK
1534 case 80:
1535 YY_RULE_SETUP
1536 #line 157 "scannerlexer.l"
1537 { return CONST; }
1538         YY_BREAK
1539 case 81:
1540 YY_RULE_SETUP
1541 #line 158 "scannerlexer.l"
1542 { return CONTINUE; }
1543         YY_BREAK
1544 case 82:
1545 YY_RULE_SETUP
1546 #line 159 "scannerlexer.l"
1547 { return DEFAULT; }
1548         YY_BREAK
1549 case 83:
1550 YY_RULE_SETUP
1551 #line 160 "scannerlexer.l"
1552 { return DO; }
1553         YY_BREAK
1554 case 84:
1555 YY_RULE_SETUP
1556 #line 161 "scannerlexer.l"
1557 { return DOUBLE; }
1558         YY_BREAK
1559 case 85:
1560 YY_RULE_SETUP
1561 #line 162 "scannerlexer.l"
1562 { return ELSE; }
1563         YY_BREAK
1564 case 86:
1565 YY_RULE_SETUP
1566 #line 163 "scannerlexer.l"
1567 { return ENUM; }
1568         YY_BREAK
1569 case 87:
1570 YY_RULE_SETUP
1571 #line 164 "scannerlexer.l"
1572 { return EXTERN; }
1573         YY_BREAK
1574 case 88:
1575 YY_RULE_SETUP
1576 #line 165 "scannerlexer.l"
1577 { return FLOAT; }
1578         YY_BREAK
1579 case 89:
1580 YY_RULE_SETUP
1581 #line 166 "scannerlexer.l"
1582 { return FOR; }
1583         YY_BREAK
1584 case 90:
1585 YY_RULE_SETUP
1586 #line 167 "scannerlexer.l"
1587 { return GOTO; }
1588         YY_BREAK
1589 case 91:
1590 YY_RULE_SETUP
1591 #line 168 "scannerlexer.l"
1592 { return IF; }
1593         YY_BREAK
1594 case 92:
1595 YY_RULE_SETUP
1596 #line 169 "scannerlexer.l"
1597 { return INLINE; }
1598         YY_BREAK
1599 case 93:
1600 YY_RULE_SETUP
1601 #line 170 "scannerlexer.l"
1602 { return INT; }
1603         YY_BREAK
1604 case 94:
1605 YY_RULE_SETUP
1606 #line 171 "scannerlexer.l"
1607 { return LONG; }
1608         YY_BREAK
1609 case 95:
1610 YY_RULE_SETUP
1611 #line 172 "scannerlexer.l"
1612 { return REGISTER; }
1613         YY_BREAK
1614 case 96:
1615 YY_RULE_SETUP
1616 #line 173 "scannerlexer.l"
1617 { return RESTRICT; }
1618         YY_BREAK
1619 case 97:
1620 YY_RULE_SETUP
1621 #line 174 "scannerlexer.l"
1622 { return RETURN; }
1623         YY_BREAK
1624 case 98:
1625 YY_RULE_SETUP
1626 #line 175 "scannerlexer.l"
1627 { return SHORT; }
1628         YY_BREAK
1629 case 99:
1630 YY_RULE_SETUP
1631 #line 176 "scannerlexer.l"
1632 { return SIGNED; }
1633         YY_BREAK
1634 case 100:
1635 YY_RULE_SETUP
1636 #line 177 "scannerlexer.l"
1637 { return SIZEOF; }
1638         YY_BREAK
1639 case 101:
1640 YY_RULE_SETUP
1641 #line 178 "scannerlexer.l"
1642 { return STATIC; }
1643         YY_BREAK
1644 case 102:
1645 YY_RULE_SETUP
1646 #line 179 "scannerlexer.l"
1647 { return STRUCT; }
1648         YY_BREAK
1649 case 103:
1650 YY_RULE_SETUP
1651 #line 180 "scannerlexer.l"
1652 { return SWITCH; }
1653         YY_BREAK
1654 case 104:
1655 YY_RULE_SETUP
1656 #line 181 "scannerlexer.l"
1657 { return TYPEDEF; }
1658         YY_BREAK
1659 case 105:
1660 YY_RULE_SETUP
1661 #line 182 "scannerlexer.l"
1662 { return UNION; }
1663         YY_BREAK
1664 case 106:
1665 YY_RULE_SETUP
1666 #line 183 "scannerlexer.l"
1667 { return UNSIGNED; }
1668         YY_BREAK
1669 case 107:
1670 YY_RULE_SETUP
1671 #line 184 "scannerlexer.l"
1672 { return VOID; }
1673         YY_BREAK
1674 case 108:
1675 YY_RULE_SETUP
1676 #line 185 "scannerlexer.l"
1677 { return VOLATILE; }
1678         YY_BREAK
1679 case 109:
1680 YY_RULE_SETUP
1681 #line 186 "scannerlexer.l"
1682 { return WHILE; }
1683         YY_BREAK
1684 case 110:
1685 YY_RULE_SETUP
1686 #line 188 "scannerlexer.l"
1687 { return check_identifier(scanner, yytext); }
1688         YY_BREAK
1689 case 111:
1690 YY_RULE_SETUP
1691 #line 190 "scannerlexer.l"
1692 { return INTEGER; }
1693         YY_BREAK
1694 case 112:
1695 YY_RULE_SETUP
1696 #line 191 "scannerlexer.l"
1697 { return INTEGER; }
1698         YY_BREAK
1699 case 113:
1700 YY_RULE_SETUP
1701 #line 192 "scannerlexer.l"
1702 { return INTEGER; }
1703         YY_BREAK
1704 case 114:
1705 YY_RULE_SETUP
1706 #line 194 "scannerlexer.l"
1707 { return FLOATING; }
1708         YY_BREAK
1709 case 115:
1710 YY_RULE_SETUP
1711 #line 195 "scannerlexer.l"
1712 { return FLOATING; }
1713         YY_BREAK
1714 case 116:
1715 /* rule 116 can match eol */
1716 YY_RULE_SETUP
1717 #line 197 "scannerlexer.l"
1718 { return CHARACTER; }
1719         YY_BREAK
1720 case 117:
1721 /* rule 117 can match eol */
1722 YY_RULE_SETUP
1723 #line 198 "scannerlexer.l"
1724 { return CHARACTER; }
1725         YY_BREAK
1726 case 118:
1727 /* rule 118 can match eol */
1728 YY_RULE_SETUP
1729 #line 200 "scannerlexer.l"
1730 { return STRING; }
1731         YY_BREAK
1732 case 119:
1733 /* rule 119 can match eol */
1734 YY_RULE_SETUP
1735 #line 201 "scannerlexer.l"
1736 { return STRING; }
1737         YY_BREAK
1738 case 120:
1739 YY_RULE_SETUP
1740 #line 203 "scannerlexer.l"
1741 { if (yytext[0]) fprintf(stderr, "%s:%d: unexpected character `%c'\n", scanner->current_filename, lineno, yytext[0]); }
1742         YY_BREAK
1743 case 121:
1744 YY_RULE_SETUP
1745 #line 205 "scannerlexer.l"
1746 ECHO;
1747         YY_BREAK
1748 #line 1749 "scannerlexer.c"
1749                         case YY_STATE_EOF(INITIAL):
1750                                 yyterminate();
1751
1752         case YY_END_OF_BUFFER:
1753                 {
1754                 /* Amount of text matched not including the EOB char. */
1755                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1756
1757                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1758                 *yy_cp = (yy_hold_char);
1759                 YY_RESTORE_YY_MORE_OFFSET
1760
1761                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1762                         {
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.
1771                          */
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;
1775                         }
1776
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
1782                  * in input().
1783                  */
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;
1787
1788                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1789
1790                         yy_current_state = yy_get_previous_state(  );
1791
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).
1799                          */
1800
1801                         yy_next_state = yy_try_NUL_trans( yy_current_state );
1802
1803                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1804
1805                         if ( yy_next_state )
1806                                 {
1807                                 /* Consume the NUL. */
1808                                 yy_cp = ++(yy_c_buf_p);
1809                                 yy_current_state = yy_next_state;
1810                                 goto yy_match;
1811                                 }
1812
1813                         else
1814                                 {
1815                                 yy_cp = (yy_c_buf_p);
1816                                 goto yy_find_action;
1817                                 }
1818                         }
1819
1820                 else switch ( yy_get_next_buffer(  ) )
1821                         {
1822                         case EOB_ACT_END_OF_FILE:
1823                                 {
1824                                 (yy_did_buffer_switch_on_eof) = 0;
1825
1826                                 if ( yywrap( ) )
1827                                         {
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.
1836                                          */
1837                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1838
1839                                         yy_act = YY_STATE_EOF(YY_START);
1840                                         goto do_action;
1841                                         }
1842
1843                                 else
1844                                         {
1845                                         if ( ! (yy_did_buffer_switch_on_eof) )
1846                                                 YY_NEW_FILE;
1847                                         }
1848                                 break;
1849                                 }
1850
1851                         case EOB_ACT_CONTINUE_SCAN:
1852                                 (yy_c_buf_p) =
1853                                         (yytext_ptr) + yy_amount_of_matched_text;
1854
1855                                 yy_current_state = yy_get_previous_state(  );
1856
1857                                 yy_cp = (yy_c_buf_p);
1858                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1859                                 goto yy_match;
1860
1861                         case EOB_ACT_LAST_MATCH:
1862                                 (yy_c_buf_p) =
1863                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1864
1865                                 yy_current_state = yy_get_previous_state(  );
1866
1867                                 yy_cp = (yy_c_buf_p);
1868                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1869                                 goto yy_find_action;
1870                         }
1871                 break;
1872                 }
1873
1874         default:
1875                 YY_FATAL_ERROR(
1876                         "fatal flex scanner internal error--no action found" );
1877         } /* end of action switch */
1878                 } /* end of scanning one token */
1879 } /* end of yylex */
1880
1881 /* yy_get_next_buffer - try to read in a new buffer
1882  *
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
1887  */
1888 static int yy_get_next_buffer (void)
1889 {
1890         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1891         register char *source = (yytext_ptr);
1892         register int number_to_move, i;
1893         int ret_val;
1894
1895         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1896                 YY_FATAL_ERROR(
1897                 "fatal flex scanner internal error--end of buffer missed" );
1898
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 )
1902                         {
1903                         /* We matched a single character, the EOB, so
1904                          * treat this as a final EOF.
1905                          */
1906                         return EOB_ACT_END_OF_FILE;
1907                         }
1908
1909                 else
1910                         {
1911                         /* We matched some text prior to the EOB, first
1912                          * process it.
1913                          */
1914                         return EOB_ACT_LAST_MATCH;
1915                         }
1916                 }
1917
1918         /* Try to read more data. */
1919
1920         /* First move last chars to start of buffer. */
1921         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1922
1923         for ( i = 0; i < number_to_move; ++i )
1924                 *(dest++) = *(source++);
1925
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,
1928                  * just force an EOF
1929                  */
1930                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1931
1932         else
1933                 {
1934                         yy_size_t num_to_read =
1935                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1936
1937                 while ( num_to_read <= 0 )
1938                         { /* Not enough room in the buffer - grow it. */
1939
1940                         YY_FATAL_ERROR(
1941 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1942
1943                         }
1944
1945                 if ( num_to_read > YY_READ_BUF_SIZE )
1946                         num_to_read = YY_READ_BUF_SIZE;
1947
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 );
1951
1952                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1953                 }
1954
1955         if ( (yy_n_chars) == 0 )
1956                 {
1957                 if ( number_to_move == YY_MORE_ADJ )
1958                         {
1959                         ret_val = EOB_ACT_END_OF_FILE;
1960                         yyrestart(yyin  );
1961                         }
1962
1963                 else
1964                         {
1965                         ret_val = EOB_ACT_LAST_MATCH;
1966                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1967                                 YY_BUFFER_EOF_PENDING;
1968                         }
1969                 }
1970
1971         else
1972                 ret_val = EOB_ACT_CONTINUE_SCAN;
1973
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()" );
1980         }
1981
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;
1985
1986         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1987
1988         return ret_val;
1989 }
1990
1991 /* yy_get_previous_state - get the state just before the EOB char was reached */
1992
1993     static yy_state_type yy_get_previous_state (void)
1994 {
1995         register yy_state_type yy_current_state;
1996         register char *yy_cp;
1997     
1998         yy_current_state = (yy_start);
1999
2000         (yy_state_ptr) = (yy_state_buf);
2001         *(yy_state_ptr)++ = yy_current_state;
2002
2003         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2004                 {
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 )
2007                         {
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];
2011                         }
2012                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2013                 *(yy_state_ptr)++ = yy_current_state;
2014                 }
2015
2016         return yy_current_state;
2017 }
2018
2019 /* yy_try_NUL_trans - try to make a transition on the NUL character
2020  *
2021  * synopsis
2022  *      next_state = yy_try_NUL_trans( current_state );
2023  */
2024     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
2025 {
2026         register int yy_is_jam;
2027     
2028         register YY_CHAR yy_c = 1;
2029         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2030                 {
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];
2034                 }
2035         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2036         yy_is_jam = (yy_current_state == 375);
2037         if ( ! yy_is_jam )
2038                 *(yy_state_ptr)++ = yy_current_state;
2039
2040         return yy_is_jam ? 0 : yy_current_state;
2041 }
2042
2043 #ifndef YY_NO_INPUT
2044 #ifdef __cplusplus
2045     static int yyinput (void)
2046 #else
2047     static int input  (void)
2048 #endif
2049
2050 {
2051         int c;
2052     
2053         *(yy_c_buf_p) = (yy_hold_char);
2054
2055         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2056                 {
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.
2060                  */
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';
2064
2065                 else
2066                         { /* need more input */
2067                         yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
2068                         ++(yy_c_buf_p);
2069
2070                         switch ( yy_get_next_buffer(  ) )
2071                                 {
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.
2081                                          */
2082
2083                                         /* Reset buffer status. */
2084                                         yyrestart(yyin );
2085
2086                                         /*FALLTHROUGH*/
2087
2088                                 case EOB_ACT_END_OF_FILE:
2089                                         {
2090                                         if ( yywrap( ) )
2091                                                 return EOF;
2092
2093                                         if ( ! (yy_did_buffer_switch_on_eof) )
2094                                                 YY_NEW_FILE;
2095 #ifdef __cplusplus
2096                                         return yyinput();
2097 #else
2098                                         return input();
2099 #endif
2100                                         }
2101
2102                                 case EOB_ACT_CONTINUE_SCAN:
2103                                         (yy_c_buf_p) = (yytext_ptr) + offset;
2104                                         break;
2105                                 }
2106                         }
2107                 }
2108
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);
2112
2113         return c;
2114 }
2115 #endif  /* ifndef YY_NO_INPUT */
2116
2117 /** Immediately switch to a different input stream.
2118  * @param input_file A readable stream.
2119  * 
2120  * @note This function does not reset the start condition to @c INITIAL .
2121  */
2122     void yyrestart  (FILE * input_file )
2123 {
2124     
2125         if ( ! YY_CURRENT_BUFFER ){
2126         yyensure_buffer_stack ();
2127                 YY_CURRENT_BUFFER_LVALUE =
2128             yy_create_buffer(yyin,YY_BUF_SIZE );
2129         }
2130
2131         yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2132         yy_load_buffer_state( );
2133 }
2134
2135 /** Switch to a different input buffer.
2136  * @param new_buffer The new input buffer.
2137  * 
2138  */
2139     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
2140 {
2141     
2142         /* TODO. We should be able to replace this entire function body
2143          * with
2144          *              yypop_buffer_state();
2145          *              yypush_buffer_state(new_buffer);
2146      */
2147         yyensure_buffer_stack ();
2148         if ( YY_CURRENT_BUFFER == new_buffer )
2149                 return;
2150
2151         if ( YY_CURRENT_BUFFER )
2152                 {
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);
2157                 }
2158
2159         YY_CURRENT_BUFFER_LVALUE = new_buffer;
2160         yy_load_buffer_state( );
2161
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.
2166          */
2167         (yy_did_buffer_switch_on_eof) = 1;
2168 }
2169
2170 static void yy_load_buffer_state  (void)
2171 {
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);
2176 }
2177
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.
2181  * 
2182  * @return the allocated buffer state.
2183  */
2184     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
2185 {
2186         YY_BUFFER_STATE b;
2187     
2188         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
2189         if ( ! b )
2190                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2191
2192         b->yy_buf_size = size;
2193
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.
2196          */
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()" );
2200
2201         b->yy_is_our_buffer = 1;
2202
2203         yy_init_buffer(b,file );
2204
2205         return b;
2206 }
2207
2208 /** Destroy the buffer.
2209  * @param b a buffer created with yy_create_buffer()
2210  * 
2211  */
2212     void yy_delete_buffer (YY_BUFFER_STATE  b )
2213 {
2214     
2215         if ( ! b )
2216                 return;
2217
2218         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2219                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2220
2221         if ( b->yy_is_our_buffer )
2222                 yyfree((void *) b->yy_ch_buf  );
2223
2224         yyfree((void *) b  );
2225 }
2226
2227 #ifndef __cplusplus
2228 extern int isatty (int );
2229 #endif /* __cplusplus */
2230     
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.
2234  */
2235     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
2236
2237 {
2238         int oerrno = errno;
2239     
2240         yy_flush_buffer(b );
2241
2242         b->yy_input_file = file;
2243         b->yy_fill_buffer = 1;
2244
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.
2248      */
2249     if (b != YY_CURRENT_BUFFER){
2250         b->yy_bs_lineno = 1;
2251         b->yy_bs_column = 0;
2252     }
2253
2254         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2255     
2256         errno = oerrno;
2257 }
2258
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.
2261  * 
2262  */
2263     void yy_flush_buffer (YY_BUFFER_STATE  b )
2264 {
2265         if ( ! b )
2266                 return;
2267
2268         b->yy_n_chars = 0;
2269
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.
2273          */
2274         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2275         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2276
2277         b->yy_buf_pos = &b->yy_ch_buf[0];
2278
2279         b->yy_at_bol = 1;
2280         b->yy_buffer_status = YY_BUFFER_NEW;
2281
2282         if ( b == YY_CURRENT_BUFFER )
2283                 yy_load_buffer_state( );
2284 }
2285
2286 /** Pushes the new state onto the stack. The new state becomes
2287  *  the current state. This function will allocate the stack
2288  *  if necessary.
2289  *  @param new_buffer The new state.
2290  *  
2291  */
2292 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2293 {
2294         if (new_buffer == NULL)
2295                 return;
2296
2297         yyensure_buffer_stack();
2298
2299         /* This block is copied from yy_switch_to_buffer. */
2300         if ( YY_CURRENT_BUFFER )
2301                 {
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);
2306                 }
2307
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;
2312
2313         /* copied from yy_switch_to_buffer. */
2314         yy_load_buffer_state( );
2315         (yy_did_buffer_switch_on_eof) = 1;
2316 }
2317
2318 /** Removes and deletes the top of the stack, if present.
2319  *  The next element becomes the new top.
2320  *  
2321  */
2322 void yypop_buffer_state (void)
2323 {
2324         if (!YY_CURRENT_BUFFER)
2325                 return;
2326
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);
2331
2332         if (YY_CURRENT_BUFFER) {
2333                 yy_load_buffer_state( );
2334                 (yy_did_buffer_switch_on_eof) = 1;
2335         }
2336 }
2337
2338 /* Allocates the stack if it does not exist.
2339  *  Guarantees space for at least one push.
2340  */
2341 static void yyensure_buffer_stack (void)
2342 {
2343         yy_size_t num_to_alloc;
2344     
2345         if (!(yy_buffer_stack)) {
2346
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.
2350          */
2351                 num_to_alloc = 1;
2352                 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2353                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
2354                                                                 );
2355                 if ( ! (yy_buffer_stack) )
2356                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2357                                                                   
2358                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2359                                 
2360                 (yy_buffer_stack_max) = num_to_alloc;
2361                 (yy_buffer_stack_top) = 0;
2362                 return;
2363         }
2364
2365         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2366
2367                 /* Increase the buffer to prepare for a possible push. */
2368                 int grow_size = 8 /* arbitrary grow size */;
2369
2370                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2371                 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2372                                                                 ((yy_buffer_stack),
2373                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
2374                                                                 );
2375                 if ( ! (yy_buffer_stack) )
2376                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2377
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;
2381         }
2382 }
2383
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
2387  * 
2388  * @return the newly allocated buffer state object. 
2389  */
2390 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
2391 {
2392         YY_BUFFER_STATE b;
2393     
2394         if ( size < 2 ||
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. */
2398                 return 0;
2399
2400         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
2401         if ( ! b )
2402                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2403
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;
2410         b->yy_at_bol = 1;
2411         b->yy_fill_buffer = 0;
2412         b->yy_buffer_status = YY_BUFFER_NEW;
2413
2414         yy_switch_to_buffer(b  );
2415
2416         return b;
2417 }
2418
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
2422  * 
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.
2426  */
2427 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
2428 {
2429     
2430         return yy_scan_bytes(yystr,strlen(yystr) );
2431 }
2432
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.
2437  * 
2438  * @return the newly allocated buffer state object.
2439  */
2440 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
2441 {
2442         YY_BUFFER_STATE b;
2443         char *buf;
2444         yy_size_t n;
2445         int i;
2446     
2447         /* Get memory for full buffer, including space for trailing EOB's. */
2448         n = _yybytes_len + 2;
2449         buf = (char *) yyalloc(n  );
2450         if ( ! buf )
2451                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2452
2453         for ( i = 0; i < _yybytes_len; ++i )
2454                 buf[i] = yybytes[i];
2455
2456         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2457
2458         b = yy_scan_buffer(buf,n );
2459         if ( ! b )
2460                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2461
2462         /* It's okay to grow etc. this buffer, and we should throw it
2463          * away when we're done.
2464          */
2465         b->yy_is_our_buffer = 1;
2466
2467         return b;
2468 }
2469
2470 #ifndef YY_EXIT_FAILURE
2471 #define YY_EXIT_FAILURE 2
2472 #endif
2473
2474 static void yy_fatal_error (yyconst char* msg )
2475 {
2476         (void) fprintf( stderr, "%s\n", msg );
2477         exit( YY_EXIT_FAILURE );
2478 }
2479
2480 /* Redefine yyless() so it works in section 3 code. */
2481
2482 #undef yyless
2483 #define yyless(n) \
2484         do \
2485                 { \
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; \
2494                 } \
2495         while ( 0 )
2496
2497 /* Accessor  methods (get/set functions) to struct members. */
2498
2499 /** Get the current line number.
2500  * 
2501  */
2502 int yyget_lineno  (void)
2503 {
2504         
2505     return yylineno;
2506 }
2507
2508 /** Get the input stream.
2509  * 
2510  */
2511 FILE *yyget_in  (void)
2512 {
2513         return yyin;
2514 }
2515
2516 /** Get the output stream.
2517  * 
2518  */
2519 FILE *yyget_out  (void)
2520 {
2521         return yyout;
2522 }
2523
2524 /** Get the length of the current token.
2525  * 
2526  */
2527 yy_size_t yyget_leng  (void)
2528 {
2529         return yyleng;
2530 }
2531
2532 /** Get the current token.
2533  * 
2534  */
2535
2536 char *yyget_text  (void)
2537 {
2538         return yytext;
2539 }
2540
2541 /** Set the current line number.
2542  * @param line_number
2543  * 
2544  */
2545 void yyset_lineno (int  line_number )
2546 {
2547     
2548     yylineno = line_number;
2549 }
2550
2551 /** Set the input stream. This does not discard the current
2552  * input buffer.
2553  * @param in_str A readable stream.
2554  * 
2555  * @see yy_switch_to_buffer
2556  */
2557 void yyset_in (FILE *  in_str )
2558 {
2559         yyin = in_str ;
2560 }
2561
2562 void yyset_out (FILE *  out_str )
2563 {
2564         yyout = out_str ;
2565 }
2566
2567 int yyget_debug  (void)
2568 {
2569         return yy_flex_debug;
2570 }
2571
2572 void yyset_debug (int  bdebug )
2573 {
2574         yy_flex_debug = bdebug ;
2575 }
2576
2577 static int yy_init_globals (void)
2578 {
2579         /* Initialization is the same as for the non-reentrant scanner.
2580      * This function is called from yylex_destroy(), so don't allocate here.
2581      */
2582
2583     (yy_buffer_stack) = 0;
2584     (yy_buffer_stack_top) = 0;
2585     (yy_buffer_stack_max) = 0;
2586     (yy_c_buf_p) = (char *) 0;
2587     (yy_init) = 0;
2588     (yy_start) = 0;
2589
2590     (yy_state_buf) = 0;
2591     (yy_state_ptr) = 0;
2592     (yy_full_match) = 0;
2593     (yy_lp) = 0;
2594
2595 /* Defined in main.c */
2596 #ifdef YY_STDINIT
2597     yyin = stdin;
2598     yyout = stdout;
2599 #else
2600     yyin = (FILE *) 0;
2601     yyout = (FILE *) 0;
2602 #endif
2603
2604     /* For future reference: Set errno on error, since we are called by
2605      * yylex_init()
2606      */
2607     return 0;
2608 }
2609
2610 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2611 int yylex_destroy  (void)
2612 {
2613     
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();
2619         }
2620
2621         /* Destroy the stack itself. */
2622         yyfree((yy_buffer_stack) );
2623         (yy_buffer_stack) = NULL;
2624
2625     yyfree ( (yy_state_buf) );
2626     (yy_state_buf)  = NULL;
2627
2628     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2629      * yylex() is called, initialization will occur. */
2630     yy_init_globals( );
2631
2632     return 0;
2633 }
2634
2635 /*
2636  * Internal utility routines.
2637  */
2638
2639 #ifndef yytext_ptr
2640 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2641 {
2642         register int i;
2643         for ( i = 0; i < n; ++i )
2644                 s1[i] = s2[i];
2645 }
2646 #endif
2647
2648 #ifdef YY_NEED_STRLEN
2649 static int yy_flex_strlen (yyconst char * s )
2650 {
2651         register int n;
2652         for ( n = 0; s[n]; ++n )
2653                 ;
2654
2655         return n;
2656 }
2657 #endif
2658
2659 void *yyalloc (yy_size_t  size )
2660 {
2661         return (void *) malloc( size );
2662 }
2663
2664 void *yyrealloc  (void * ptr, yy_size_t  size )
2665 {
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.
2672          */
2673         return (void *) realloc( (char *) ptr, size );
2674 }
2675
2676 void yyfree (void * ptr )
2677 {
2678         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
2679 }
2680
2681 #define YYTABLES_NAME "yytables"
2682
2683 #line 205 "scannerlexer.l"
2684
2685
2686
2687 static int
2688 yywrap (void)
2689 {
2690   return 1;
2691 }
2692
2693
2694 static void
2695 parse_comment (GISourceScanner *scanner)
2696 {
2697   GString *string;
2698   int c1, c2;
2699   GISourceComment *comment;
2700   int comment_lineno;
2701
2702   c1 = input();
2703   c2 = input();
2704
2705   string = g_string_new ("");
2706
2707   comment_lineno = lineno;
2708
2709   while (c2 != EOF && !(c1 == '*' && c2 == '/'))
2710     {
2711       g_string_append_c (string, c1);
2712
2713       if (c1 == '\n')
2714         lineno++;
2715
2716       c1 = c2;
2717       c2 = input();
2718
2719     }
2720
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);
2725
2726   scanner->comments = g_slist_prepend (scanner->comments,
2727                                        comment);
2728 }
2729
2730 static int
2731 check_identifier (GISourceScanner *scanner,
2732                   const char  *s)
2733 {
2734         /*
2735          * This function checks if `s' is a type name or an
2736          * identifier.
2737          */
2738
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;
2743         }
2744
2745         return IDENTIFIER;
2746 }
2747
2748 /*
2749  * # linenum "filename" flags
2750  *  See http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
2751  **/
2752
2753 static void
2754 process_linemarks (GISourceScanner *scanner)
2755 {
2756         char filename[1025];
2757         char *compress;
2758         char *real;
2759
2760         sscanf(yytext, "# %d \"%1024[^\"]\"", &lineno, filename);
2761
2762         compress = g_strcompress (filename);
2763         real = g_realpath (filename);
2764         if (real) {
2765                 g_free (scanner->current_filename);
2766                 scanner->current_filename = real;
2767         } else {
2768                 g_free (real);
2769         }
2770         g_free (compress);
2771 }
2772
2773 /*
2774  * This parses a macro which is ignored, such as
2775  * __attribute__((x)) or __asm__ (x)
2776  */
2777 static int
2778 parse_ignored_macro (void)
2779 {
2780         int c;
2781         int nest;
2782
2783         while ((c = input ()) != EOF && isspace (c))
2784                 ;
2785         if (c != '(')
2786                 return FALSE;
2787
2788         nest = 0;
2789         while ((c = input ()) != EOF && (nest > 0 || c != ')')) {
2790                 if (c == '(')
2791                         nest++;
2792                 else if (c == ')')
2793                         nest--;
2794                 else if (c == '"') {
2795                         while ((c = input ()) != EOF && c != '"') {
2796                                 if (c == '\\')
2797                                         c = input ();
2798                         }
2799                 } else if (c == '\'') {
2800                         c = input ();
2801                         if (c == '\\')
2802                                 c = input ();
2803                         else if (c == '\'')
2804                                 return FALSE;
2805                         c = input ();
2806                         if (c != '\'')
2807                                 return FALSE;
2808                 } else if (c == '\n')
2809                         lineno++;
2810         }
2811
2812         return TRUE;
2813 }
2814
2815 static void
2816 parse_trigraph (GISourceScanner *scanner)
2817 {
2818         char **items;
2819         char *start, *end;
2820         int i;
2821
2822         start = g_strstr_len (yytext, yyleng, "<");
2823         g_assert (start != NULL);
2824         end = g_strstr_len (yytext, yyleng, ">");
2825         g_assert (end != NULL);
2826         *end = '\0';
2827         items = g_strsplit (start + 1, ",", 0);
2828         for (i = 0; items[i] != NULL; i++) {
2829                 char *item = items[i];
2830                 g_strstrip (item);
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;
2837         }
2838         g_strfreev (items);
2839 }
2840