]> git.draconx.ca Git - gob-dx.git/blob - src/lexer.c
Release 1.99.1
[gob-dx.git] / src / lexer.c
1 /* A lexical scanner generated by flex */
2
3 /* Scanner skeleton version:
4  * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
5  */
6
7 #define FLEX_SCANNER
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
10
11 #include <stdio.h>
12
13
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
15 #ifdef c_plusplus
16 #ifndef __cplusplus
17 #define __cplusplus
18 #endif
19 #endif
20
21
22 #ifdef __cplusplus
23
24 #include <stdlib.h>
25 #include <unistd.h>
26
27 /* Use prototypes in function declarations. */
28 #define YY_USE_PROTOS
29
30 /* The "const" storage-class-modifier is valid. */
31 #define YY_USE_CONST
32
33 #else   /* ! __cplusplus */
34
35 #if __STDC__
36
37 #define YY_USE_PROTOS
38 #define YY_USE_CONST
39
40 #endif  /* __STDC__ */
41 #endif  /* ! __cplusplus */
42
43 #ifdef __TURBOC__
44  #pragma warn -rch
45  #pragma warn -use
46 #include <io.h>
47 #include <stdlib.h>
48 #define YY_USE_CONST
49 #define YY_USE_PROTOS
50 #endif
51
52 #ifdef YY_USE_CONST
53 #define yyconst const
54 #else
55 #define yyconst
56 #endif
57
58
59 #ifdef YY_USE_PROTOS
60 #define YY_PROTO(proto) proto
61 #else
62 #define YY_PROTO(proto) ()
63 #endif
64
65 /* Returned upon end-of-file. */
66 #define YY_NULL 0
67
68 /* Promotes a possibly negative, possibly signed char to an unsigned
69  * integer for use as an array index.  If the signed char is negative,
70  * we want to instead treat it as an 8-bit unsigned char, hence the
71  * double cast.
72  */
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
74
75 /* Enter a start condition.  This macro really ought to take a parameter,
76  * but we do it the disgusting crufty way forced on us by the ()-less
77  * definition of BEGIN.
78  */
79 #define BEGIN yy_start = 1 + 2 *
80
81 /* Translate the current start state into a value that can be later handed
82  * to BEGIN to return to the state.  The YYSTATE alias is for lex
83  * compatibility.
84  */
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
87
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
90
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
93
94 #define YY_END_OF_BUFFER_CHAR 0
95
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
98
99 typedef struct yy_buffer_state *YY_BUFFER_STATE;
100
101 extern int yyleng;
102 extern FILE *yyin, *yyout;
103
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
107
108 /* The funky do-while in the following #define is used to turn the definition
109  * int a single C statement (which needs a semi-colon terminator).  This
110  * avoids problems with code like:
111  *
112  *      if ( condition_holds )
113  *              yyless( 5 );
114  *      else
115  *              do_something_else();
116  *
117  * Prior to using the do-while the compiler would get upset at the
118  * "else" because it interpreted the "if" statement as being all
119  * done when it reached the ';' after the yyless() call.
120  */
121
122 /* Return all but the first 'n' matched characters back to the input stream. */
123
124 #define yyless(n) \
125         do \
126                 { \
127                 /* Undo effects of setting up yytext. */ \
128                 *yy_cp = yy_hold_char; \
129                 YY_RESTORE_YY_MORE_OFFSET \
130                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
131                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
132                 } \
133         while ( 0 )
134
135 #define unput(c) yyunput( c, yytext_ptr )
136
137 /* The following is because we cannot portably get our hands on size_t
138  * (without autoconf's help, which isn't available because we want
139  * flex-generated scanners to compile on their own).
140  */
141 typedef unsigned int yy_size_t;
142
143
144 struct yy_buffer_state
145         {
146         FILE *yy_input_file;
147
148         char *yy_ch_buf;                /* input buffer */
149         char *yy_buf_pos;               /* current position in input buffer */
150
151         /* Size of input buffer in bytes, not including room for EOB
152          * characters.
153          */
154         yy_size_t yy_buf_size;
155
156         /* Number of characters read into yy_ch_buf, not including EOB
157          * characters.
158          */
159         int yy_n_chars;
160
161         /* Whether we "own" the buffer - i.e., we know we created it,
162          * and can realloc() it to grow it, and should free() it to
163          * delete it.
164          */
165         int yy_is_our_buffer;
166
167         /* Whether this is an "interactive" input source; if so, and
168          * if we're using stdio for input, then we want to use getc()
169          * instead of fread(), to make sure we stop fetching input after
170          * each newline.
171          */
172         int yy_is_interactive;
173
174         /* Whether we're considered to be at the beginning of a line.
175          * If so, '^' rules will be active on the next match, otherwise
176          * not.
177          */
178         int yy_at_bol;
179
180         /* Whether to try to fill the input buffer when we reach the
181          * end of it.
182          */
183         int yy_fill_buffer;
184
185         int yy_buffer_status;
186 #define YY_BUFFER_NEW 0
187 #define YY_BUFFER_NORMAL 1
188         /* When an EOF's been seen but there's still some text to process
189          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
190          * shouldn't try reading from the input source any more.  We might
191          * still have a bunch of tokens to match, though, because of
192          * possible backing-up.
193          *
194          * When we actually see the EOF, we change the status to "new"
195          * (via yyrestart()), so that the user can continue scanning by
196          * just pointing yyin at a new input file.
197          */
198 #define YY_BUFFER_EOF_PENDING 2
199         };
200
201 static YY_BUFFER_STATE yy_current_buffer = 0;
202
203 /* We provide macros for accessing buffer states in case in the
204  * future we want to put the buffer states in a more general
205  * "scanner state".
206  */
207 #define YY_CURRENT_BUFFER yy_current_buffer
208
209
210 /* yy_hold_char holds the character lost when yytext is formed. */
211 static char yy_hold_char;
212
213 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
214
215
216 int yyleng;
217
218 /* Points to current character in buffer. */
219 static char *yy_c_buf_p = (char *) 0;
220 static int yy_init = 1;         /* whether we need to initialize */
221 static int yy_start = 0;        /* start state number */
222
223 /* Flag which is used to allow yywrap()'s to do buffer switches
224  * instead of setting up a fresh yyin.  A bit of a hack ...
225  */
226 static int yy_did_buffer_switch_on_eof;
227
228 void yyrestart YY_PROTO(( FILE *input_file ));
229
230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
231 void yy_load_buffer_state YY_PROTO(( void ));
232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
237
238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
241
242 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
244 static void yy_flex_free YY_PROTO(( void * ));
245
246 #define yy_new_buffer yy_create_buffer
247
248 #define yy_set_interactive(is_interactive) \
249         { \
250         if ( ! yy_current_buffer ) \
251                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
252         yy_current_buffer->yy_is_interactive = is_interactive; \
253         }
254
255 #define yy_set_bol(at_bol) \
256         { \
257         if ( ! yy_current_buffer ) \
258                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
259         yy_current_buffer->yy_at_bol = at_bol; \
260         }
261
262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
263
264
265 #define YY_USES_REJECT
266 typedef unsigned char YY_CHAR;
267 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
268 typedef int yy_state_type;
269 extern char *yytext;
270 #define yytext_ptr yytext
271
272 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
273 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
274 static int yy_get_next_buffer YY_PROTO(( void ));
275 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
276
277 /* Done after the current pattern has been matched and before the
278  * corresponding action - sets up yytext.
279  */
280 #define YY_DO_BEFORE_ACTION \
281         yytext_ptr = yy_bp; \
282         yyleng = (int) (yy_cp - yy_bp); \
283         yy_hold_char = *yy_cp; \
284         *yy_cp = '\0'; \
285         yy_c_buf_p = yy_cp;
286
287 #define YY_NUM_RULES 106
288 #define YY_END_OF_BUFFER 107
289 static yyconst short int yy_acclist[554] =
290     {   0,
291       107,  104,  106,  103,  104,  106,    1,  105,  106,  104,
292       105,  106,  104,  106,  104,  106,  103,  104,  106,  104,
293       106,  104,  106,   26,  104,  106,    1,   27,  105,  106,
294        26,  104,  105,  106,   26,  104,  106,   26,  104,  106,
295        50,  104,  106,    1,   51,  105,  106,   50,  104,  105,
296       106,   42,   50,  104,  106,   50,  104,  106,   50,  104,
297       106,   50,  104,  106,   48,   50,  104,  106,   49,   50,
298       104,  106,   50,  104,  106,   50,  104,  106,   46,  104,
299       106,    1,   47,  105,  106,   46,  104,  105,  106,   45,
300        46,  104,  106,   46,  104,  106,  104,  106,  104,  106,
301
302       104,  106,   94,  104,  106,   94,  104,  106,  104,  106,
303        97,  104,  106,   97,  104,  106,   97,  104,  106,   97,
304       104,  106,  100,  104,  106,  104,  106,  104,  106,  104,
305       106,   97,  104,  106,   97,  104,  106,   97,  104,  106,
306        97,  104,  106,   97,  104,  106,   97,  104,  106,   97,
307       104,  106,   97,  104,  106,   97,  104,  106,   97,  104,
308       106,   97,  104,  106,   97,  104,  106,  101,  104,  106,
309       102,  104,  106,   91,  104,  106,   43,  104,  106,   92,
310       104,  106,   93,  104,  106,   97,  104,  106,   97,  104,
311       106,   97,  104,  106,   97,  104,  106,   97,  104,  106,
312
313        97,  104,  106,   97,  104,  106,   97,  104,  106,   97,
314       104,  106,   97,  104,  106,   97,  104,  106,   97,  104,
315       106,    9,  104,  106,    9,  104,  105,  106,    9,  104,
316       106,    9,  104,  106,    9,  104,  106,   14,  104,  106,
317        14,  104,  105,  106,   14,  104,  106,   14,  104,  106,
318        14,  104,  106,   17,  104,  106,   17,  104,  105,  106,
319        17,  104,  106,   21,   33,   25,   22,   41,   34,   44,
320        94,   23,   94,   94,   96,   97,   95,   97,   97,   97,
321        24,   99,   97,   97,   97,   97,   97,   97,   97,   97,
322        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
323
324        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
325        97,   97,    8,    6,   13,   10,   12,   11,   13,   16,
326        15,    3,   28,   32,   39,   35,   37,   18,   98,   98,
327        94,   19,   94,   94,   96,   96,   95,   97,   97,   97,
328        69,   20,   97,   97,   97,   97,   97,   97,   97,   64,
329        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
330        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
331        97,   97,   97,   97,   97,   11,   29,   30,   31,   40,
332        36,   38,   96,   97,   55,   97,   54,   97,    5,   97,
333        67,   97,   97,   97,   97,   59,   97,   97,   62,   97,
334
335        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
336        97,   56,   97,   97,   97,   97,   59,   97,   97,   97,
337        97,   79,   97,   97,   97,   97,   85,   97,    7,   52,
338        97,   54,   97,   68,   97,   97,   65,   97,   97,   97,
339        97,   97,   97,   63,   97,   97,   97,   97,   58,   97,
340        97,   97,   80,   97,   97,   97,   97,   84,   97,   97,
341        97,   97,   97,   97,   97,   66,   97,   97,   97,   97,
342        97,   70,   97,   76,   97,   60,   97,   57,   97,   97,
343        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
344        97,   97,   71,   97,   97,   97,   97,   75,   97,   97,
345
346        97,   97,   97,   81,   97,   82,   97,   97,   97,   74,
347        97,   97,   77,   97,   78,   97,   97,   61,   97,   97,
348        97,   97,   97,   97,   97,   73,   97,   72,   97,   97,
349        97,   87,   97,   97,   97,   97,    2,   89,   97,   97,
350        86,   97,   97,   88,   97,    4,   97,   90,   97,   97,
351        83,   97,   53
352     } ;
353
354 static yyconst short int yy_accept[472] =
355     {   0,
356         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
357         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
358         1,    1,    1,    2,    4,    7,   10,   13,   15,   17,
359        20,   22,   24,   27,   31,   35,   38,   41,   44,   48,
360        52,   56,   59,   62,   65,   69,   73,   76,   79,   82,
361        86,   90,   94,   97,   99,  101,  103,  106,  109,  111,
362       114,  117,  120,  123,  126,  128,  130,  132,  135,  138,
363       141,  144,  147,  150,  153,  156,  159,  162,  165,  168,
364       171,  174,  177,  180,  183,  186,  189,  192,  195,  198,
365       201,  204,  207,  210,  213,  216,  219,  222,  225,  229,
366
367       232,  235,  238,  241,  245,  248,  251,  254,  257,  261,
368       264,  265,  265,  265,  265,  265,  265,  265,  265,  266,
369       266,  267,  267,  267,  267,  267,  267,  268,  268,  269,
370       269,  269,  270,  271,  271,  271,  272,  273,  273,  273,
371       274,  274,  274,  275,  276,  277,  278,  279,  280,  281,
372       281,  282,  282,  282,  282,  283,  284,  285,  286,  287,
373       288,  289,  290,  291,  292,  293,  294,  295,  296,  297,
374       298,  299,  300,  301,  302,  303,  304,  305,  306,  307,
375       308,  309,  310,  311,  312,  313,  314,  314,  314,  314,
376       315,  315,  316,  316,  316,  316,  317,  318,  318,  320,
377
378       321,  322,  322,  323,  323,  323,  323,  324,  324,  324,
379       325,  325,  325,  325,  325,  326,  326,  326,  326,  327,
380       328,  328,  329,  329,  330,  330,  331,  332,  332,  333,
381       334,  335,  336,  337,  338,  339,  340,  341,  342,  342,
382       342,  343,  343,  343,  344,  345,  346,  347,  348,  349,
383       350,  352,  353,  354,  355,  356,  357,  358,  359,  360,
384       361,  362,  363,  364,  365,  366,  367,  368,  369,  370,
385       371,  372,  373,  374,  375,  376,  376,  377,  377,  377,
386       378,  378,  379,  380,  380,  380,  380,  381,  382,  383,
387       383,  384,  385,  387,  389,  389,  390,  391,  393,  394,
388
389       395,  396,  398,  399,  401,  402,  403,  404,  405,  406,
390       407,  408,  409,  410,  411,  412,  414,  415,  416,  417,
391       419,  420,  421,  422,  424,  425,  426,  427,  429,  429,
392       430,  430,  430,  431,  431,  431,  431,  431,  431,  431,
393       432,  434,  436,  437,  439,  440,  441,  442,  443,  444,
394       446,  447,  448,  449,  451,  452,  453,  455,  456,  457,
395       458,  460,  461,  462,  463,  464,  464,  464,  464,  464,
396       464,  464,  465,  466,  468,  469,  470,  471,  472,  474,
397       476,  478,  480,  481,  482,  483,  484,  485,  486,  487,
398       488,  489,  490,  490,  490,  490,  490,  490,  491,  492,
399
400       493,  495,  496,  497,  498,  500,  501,  502,  503,  504,
401       506,  508,  509,  510,  510,  510,  510,  510,  510,  512,
402       513,  515,  517,  518,  520,  521,  522,  523,  524,  525,
403       526,  526,  526,  526,  526,  526,  526,  528,  530,  531,
404       532,  534,  535,  536,  537,  537,  537,  537,  538,  538,
405       540,  541,  543,  544,  546,  546,  546,  546,  547,  548,
406       550,  550,  550,  551,  551,  551,  553,  553,  553,  554,
407       554
408     } ;
409
410 static yyconst int yy_ec[256] =
411     {   0,
412         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
413         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
414         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
415         1,    5,    1,    6,    7,    1,    8,    1,    9,   10,
416        11,   12,    1,    1,    1,   13,   14,   15,   16,   17,
417        17,   17,   17,   17,   17,   18,   18,   19,    1,   20,
418         1,   21,    1,    1,   22,   22,   22,   22,   23,   22,
419        24,   24,   25,   24,   24,   24,   24,   24,   24,   24,
420        24,   26,   27,   24,   24,   24,   24,   24,   24,   24,
421        28,   29,   30,    1,   31,    1,   32,   33,   34,   35,
422
423        36,   37,   38,   39,   40,   41,   42,   43,   44,   45,
424        46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
425        56,   24,   57,    1,   58,    1,    1,    1,    1,    1,
426         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
427         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
428         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
429         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
430         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
431         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
432         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
433
434         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
435         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
436         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
437         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
438         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
439         1,    1,    1,    1,    1
440     } ;
441
442 static yyconst int yy_meta[59] =
443     {   0,
444         1,    2,    3,    1,    2,    1,    1,    1,    1,    1,
445         1,    1,    1,    1,    4,    4,    4,    4,    5,    1,
446         1,    6,    6,    7,    7,    7,    7,    1,    1,    8,
447         7,    6,    6,    6,    6,    6,    6,    7,    7,    7,
448         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
449         7,    7,    7,    7,    7,    7,    1,    1
450     } ;
451
452 static yyconst short int yy_base[499] =
453     {   0,
454         0,    4,    7,   12,   17,   73,   26,   36,  131,    0,
455       177,    0,   33,   34,  230,    0,   24,   47,   54,   91,
456        57,   60, 1099, 1100, 1100, 1100, 1100,   21, 1055,  190,
457        60, 1061, 1100, 1100, 1100, 1082, 1068, 1100, 1100, 1100,
458      1100,  190,   42,    0, 1100, 1100,   81, 1036, 1100, 1100,
459      1100, 1100,    0, 1064,   93,   86,  236,  107,    0, 1073,
460        54,   69,    6, 1100,  184,   92,   97,   70,  179,   59,
461       187,  185,  188,   82,  184,  207,  239,  197,  175, 1100,
462      1100, 1100, 1100, 1100, 1100,  226,  249,  265,  212,  219,
463       266,   22,  227,   97,  270,  236,  267, 1100, 1100, 1077,
464
465       291,  302, 1100, 1100, 1076,  310,  315, 1086, 1085,  247,
466      1100, 1084, 1054,  292, 1049,  257,  283,  284, 1100, 1036,
467      1100,    0, 1074,  293, 1073, 1072, 1100, 1077, 1100,  323,
468      1034, 1100, 1100, 1069, 1068,  320, 1100, 1073,  327,  339,
469       349,    0,  355, 1056, 1055, 1054,  307,  312,  313, 1059,
470      1059, 1067,  331, 1039, 1040,  340,  350,  355,  341,  191,
471       356,  357,  358,  360,  361,  364,  362,  365,  369,  366,
472       372,  370,  373,  371,  374,  377,  375,  398,  379,  380,
473       174,  283,  382,  383,  381, 1100,  430,  434,  438, 1100,
474       443, 1100,  445,  449,  453, 1100,  457, 1053, 1100, 1100,
475
476      1100, 1063, 1100, 1015, 1021, 1006, 1100, 1030, 1004, 1100,
477      1003, 1019, 1006, 1031, 1100, 1047, 1046, 1045, 1100, 1100,
478      1050, 1100, 1018, 1100, 1042, 1041,  449, 1046, 1100,  453,
479         0, 1029, 1028, 1027,  399,  434,  453, 1100,  471, 1042,
480      1100, 1014,  464,  456,  458,  464,  465,  387,  466,  467,
481      1024,  468,  469,  470,  473,  474,  472,  471,  476,  479,
482       482,  478,  477,  481,  397,  494,  483,  500,  492,  512,
483       514,  515,  516,  517,  518,  538, 1100,  992,  488, 1100,
484      1006, 1100, 1100,  987,  999, 1013, 1100, 1100, 1100,  994,
485      1017,  523, 1016, 1015,  544, 1100,  525, 1014,  531,  534,
486
487       536, 1013,  539, 1012,  540,  542,  541,  544,  546,  545,
488       551,  548,  547,  553,  549, 1011,  405,  559,  552,  557,
489       556,  565,  574, 1010,  576,  578,  579, 1009,  597, 1100,
490       609,  614, 1100,  981,  990,  993,  975,    0,  971,  584,
491       586, 1003,  588, 1002,  589,  594,  602,  604,  607, 1001,
492       606,  608,  611, 1000,  612,  614,  999,  613,  615,  616,
493       617,  618,  620,  623,  628,  970,  967,  964,  978,  990,
494       977,  631,  633,  992,  634,  635,  636,  637,  991,  990,
495       984,  976,  641,  642,  644,  645,  646,  647,  649,  656,
496       659,  660,  629,  944,  929,  963,  918,  662,  664,  665,
497
498       920,  663,  670,  672,  904,  673,  678,  675,  684,  890,
499       877,  685,  686,  842,  841,  710,  700,  718,  798,  689,
500       797,  791,  691,  790,  702,  695,  705,  708,  709,  711,
501       753,  756,  729,  735,  745,  737,  772,  761,  718,  740,
502       760,  745,  719,  748,  707,  758,  771, 1100,  762,  490,
503       750,  486,  758,  485,  391,  780,  764, 1100,  759,  311,
504       235,  786,  771,   77,  797,    3,  803,  730, 1100, 1100,
505       821,  829,  837,  845,  853,  861,  869,  877,  885,  893,
506       896,  900,  904,  912,  920,  928,  936,  944,  949,  952,
507       956,  963,  968,  975,  979,  985,  992, 1000
508
509     } ;
510
511 static yyconst short int yy_def[499] =
512     {   0,
513       471,  471,  472,  472,  473,  473,  474,  474,  470,    9,
514         9,   11,    9,    9,    9,   15,  475,  475,  476,  476,
515       477,  477,  470,  470,  470,  470,  470,  470,  470,  470,
516       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
517       470,  470,  470,  478,  470,  470,  470,  470,  470,  470,
518       470,  470,  479,  480,  470,  470,  470,  470,  481,  482,
519       482,  482,  482,  470,  470,  470,  483,  482,  482,  482,
520       482,  482,  482,  482,  482,  482,  482,  482,  482,  470,
521       470,  470,  470,  470,  470,  482,  482,  482,  482,  482,
522       482,  482,  482,  482,  482,  482,  482,  470,  470,  470,
523
524       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
525       470,  484,  470,  470,  470,  470,  470,  470,  470,  470,
526       470,  485,  470,  470,  470,  470,  470,  486,  470,  470,
527       470,  470,  470,  470,  487,  470,  470,  488,  470,  470,
528       470,  489,  470,  490,  482,  491,  482,  482,  482,  470,
529       470,  492,  470,  493,  470,  482,  482,  482,  482,  482,
530       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
531       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
532       482,  482,  482,  482,  482,  470,  470,  470,  470,  470,
533       494,  470,  470,  470,  470,  470,  470,  470,  470,  470,
534
535       470,  484,  470,  470,  470,  470,  470,  470,  470,  470,
536       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
537       486,  470,  470,  470,  470,  470,  470,  488,  470,  470,
538       489,  490,  495,  491,  482,  482,  482,  470,  470,  492,
539       470,  493,  483,  482,  482,  482,  482,  482,  482,  482,
540       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
541       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
542       482,  482,  482,  482,  482,  496,  470,  470,  470,  470,
543       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
544       495,  482,  482,  482,  470,  470,  482,  482,  482,  482,
545
546       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
547       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
548       482,  482,  482,  482,  482,  482,  482,  482,  470,  470,
549       496,  470,  470,  470,  470,  470,  470,  497,  470,  482,
550       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
551       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
552       482,  482,  482,  482,  482,  470,  470,  470,  470,  470,
553       470,  482,  482,  482,  482,  482,  482,  482,  482,  482,
554       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
555       482,  482,  470,  470,  470,  470,  470,  482,  482,  482,
556
557       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
558       482,  482,  482,  470,  470,  470,  470,  470,  482,  482,
559       482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
560       470,  470,  470,  470,  470,  470,  482,  482,  482,  482,
561       482,  482,  482,  482,  470,  470,  470,  470,  498,  482,
562       482,  482,  482,  482,  470,  470,  498,  470,  482,  482,
563       470,  470,  482,  470,  470,  482,  470,  470,  470,    0,
564       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
565       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
566       470,  470,  470,  470,  470,  470,  470,  470
567
568     } ;
569
570 static yyconst short int yy_nxt[1159] =
571     {   0,
572       470,   25,   26,   27,   25,   30,   26,   27,   30,   34,
573        35,   31,  470,   28,   34,   35,  470,   28,   36,   39,
574        40,  146,   41,   36,  146,   42,   26,   99,   50,   51,
575        43,   52,  111,   29,  112,  100,   37,   29,   50,   51,
576       146,   52,   82,   82,  149,   44,   24,   24,  101,   26,
577        99,  101,   32,  127,   53,  128,   26,  104,  102,   26,
578       109,  181,   26,  109,   53,  105,   60,   60,  110,   60,
579        60,  110,  146,   45,   46,   39,   40,  146,   41,   47,
580        48,   42,  130,   60,   60,  130,   43,  146,  146,   24,
581        24,  116,  106,   26,  104,  106,  147,  137,  117,  138,
582
583       146,   44,  107,  151,  160,  152,  118,  136,  136,  136,
584       136,  153,  153,  153,  153,  146,  119,  148,  156,  139,
585       131,  143,  143,  143,  143,  211,  155,  164,  183,   45,
586        46,   24,   25,   26,   27,   25,   24,   24,   24,   54,
587        24,   24,   24,   55,   56,   57,   58,   58,   58,   59,
588        24,   24,   60,   60,   60,   60,   60,   60,   24,   24,
589        24,   60,   60,   60,   61,   60,   60,   62,   60,   60,
590        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
591        60,   63,   60,   60,   60,   60,   60,   64,   24,   65,
592        66,  114,  146,  146,  114,  123,  150,  146,  136,  136,
593
594       136,  136,  146,  146,   67,  146,  146,  271,   68,  146,
595        69,   70,   71,   72,  172,  146,   73,  157,  124,   74,
596       173,  158,   75,   76,  159,  146,   77,  162,   78,   79,
597       146,  161,  163,   80,   81,   83,  165,  146,  115,   84,
598        85,  171,  248,   24,  146,  146,  125,  126,  139,  200,
599       140,  140,  140,  141,  146,  166,  177,  146,  167,  182,
600       201,  178,   86,   87,   88,   89,   90,  146,  174,   73,
601       464,  175,   74,   91,   92,   93,   94,  168,  169,   95,
602        96,   78,   97,  146,  146,  146,   24,  157,  146,  170,
603       142,  185,  187,  114,  159,  187,  114,  179,  216,  205,
604
605       176,  146,  188,  189,  190,  180,  191,  206,  168,  184,
606       160,  193,  173,  207,  193,  186,  195,  196,  208,  197,
607       170,  194,  211,  272,  130,  146,  198,  130,  199,  146,
608       146,  146,  212,  209,  227,  227,  227,  227,  235,  210,
609       115,  230,  230,  230,  230,  153,  153,  153,  153,  217,
610       218,  139,  237,  140,  140,  140,  141,  236,  146,  146,
611       155,  139,  131,  141,  141,  141,  141,  139,  146,  143,
612       143,  143,  143,  146,  146,  146,  146,  244,  146,  146,
613       146,  245,  146,  146,  146,  247,  246,  146,  146,  146,
614       146,  146,  146,  146,  256,  146,  253,  146,  146,  146,
615
616       146,  146,  250,  254,  252,  146,  258,  249,  251,  255,
617       257,  260,  263,  266,  259,  146,  146,  146,  262,  301,
618       274,  261,  264,  146,  270,  461,  267,  275,  265,  268,
619       273,  187,  318,  269,  187,  189,  190,  357,  191,  189,
620       190,  188,  189,  250,  189,  190,  193,  189,  292,  193,
621       195,  196,  146,  197,  195,  196,  194,  195,  195,  196,
622       198,  195,  277,  227,  227,  227,  227,  230,  230,  230,
623       230,  146,  295,  296,  146,  295,  146,  293,  153,  153,
624       153,  153,  146,  146,  146,  146,  146,  146,  146,  146,
625       146,  146,  146,  155,  146,  146,  146,  146,  303,  146,
626
627       146,  146,  294,  146,  146,  304,  298,  297,  146,  302,
628       146,  316,  146,  299,  300,  311,  309,  305,  146,  307,
629       310,  314,  306,  308,  313,  319,  320,  312,  315,  317,
630       146,  322,  146,  146,  146,  146,  146,  321,  334,  329,
631       330,  146,  329,  146,  207,  295,  296,  326,  295,  146,
632       325,  323,  146,  328,  146,  324,  332,  146,  146,  146,
633       146,  327,  146,  146,  146,  146,  146,  146,  340,  146,
634       146,  146,  294,  346,  146,  146,  347,  146,  343,  348,
635       341,  353,  351,  146,  342,  349,  352,  360,  345,  344,
636       355,  354,  146,  358,  146,  350,  146,  146,  329,  330,
637
638       356,  329,  146,  359,  146,  361,  146,  146,  362,  364,
639       329,  330,  146,  329,  352,  329,  330,  363,  329,  372,
640       146,  365,  146,  374,  146,  146,  146,  332,  375,  146,
641       146,  146,  146,  146,  146,  146,  146,  378,  146,  373,
642       379,  146,  381,  385,  376,  384,  146,  388,  380,  146,
643       377,  146,  146,  146,  146,  146,  383,  386,  392,  146,
644       146,  382,  146,  146,  146,  146,  387,  146,  400,  389,
645       401,  390,  399,  391,  146,  398,  404,  146,  146,  414,
646       146,  146,  146,  146,  405,  210,  402,  403,  146,  412,
647       146,  146,  410,  146,  406,  407,  146,  409,  420,  411,
648
649       421,  408,  146,  146,  146,  423,  424,  146,  426,  146,
650       413,  433,  419,  146,  433,  434,  435,  435,  422,  436,
651       146,  427,  436,  146,  437,  438,  146,  146,  425,  146,
652       433,  468,  469,  433,  468,  429,  146,  146,  455,  428,
653       441,  430,  449,  446,  446,  446,  446,  440,  439,  447,
654       447,  447,  447,  450,  442,  448,  449,  444,  146,  447,
655       447,  447,  447,  146,  443,  453,  146,  458,  146,  458,
656       456,  451,  446,  446,  446,  446,  146,  146,  146,  146,
657       452,  448,  458,  454,  458,  447,  447,  447,  447,  146,
658       146,  445,  459,  460,  462,  462,  462,  462,  465,  209,
659
660       462,  462,  462,  462,  468,  469,  466,  468,  146,  146,
661       463,  467,  467,  467,  467,  146,  146,  467,  467,  467,
662       467,   24,   24,   24,   24,   24,   24,   24,   24,   33,
663        33,   33,   33,   33,   33,   33,   33,   38,   38,   38,
664        38,   38,   38,   38,   38,   49,   49,   49,   49,   49,
665        49,   49,   49,   98,   98,   98,   98,   98,   98,   98,
666        98,  103,  103,  103,  103,  103,  103,  103,  103,  108,
667       108,  108,  108,  108,  108,  108,  108,  129,  129,  432,
668       129,  129,  129,  129,  129,  133,  133,  431,  133,  133,
669       133,  133,  133,  134,  134,  146,  134,  134,  134,  134,
670
671       134,  144,  144,  145,  145,  145,  145,  154,  146,  154,
672       154,  154,  202,  202,  202,  202,  202,  202,  202,  202,
673       214,  214,  146,  214,  214,  214,  214,  214,  221,  221,
674       221,  221,  221,  221,  221,  221,  225,  225,  146,  225,
675       225,  225,  225,  225,  228,  228,  228,  228,  228,  228,
676       228,  228,  231,  418,  231,  232,  232,  232,  232,  234,
677       234,  234,  234,  240,  240,  240,  240,  240,  240,  240,
678       240,  242,  417,  242,  242,  242,  276,  276,  416,  415,
679       276,  276,  291,  291,  291,  291,  331,  331,  331,  331,
680       331,  331,  370,  370,  146,  370,  370,  370,  370,  370,
681
682       457,  457,  146,  457,  457,  457,  457,  457,  146,  146,
683       146,  397,  396,  395,  394,  393,  206,  146,  146,  146,
684       146,  146,  371,  369,  368,  367,  366,  146,  146,  146,
685       146,  146,  146,  146,  146,  233,  339,  338,  337,  336,
686       335,  333,  146,  155,  241,  146,  233,  233,  229,  224,
687       224,  290,  222,  289,  288,  287,  286,  285,  284,  283,
688       282,  281,  280,  279,  278,  203,  277,  243,  155,  241,
689       239,  238,  146,  146,  233,  229,  226,  224,  223,  222,
690       220,  219,  215,  213,  120,  204,  203,  200,  200,  192,
691       186,  146,  135,  132,  122,  121,  120,  113,  470,   23,
692
693       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
694       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
695       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
696       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
697       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
698       470,  470,  470,  470,  470,  470,  470,  470
699     } ;
700
701 static yyconst short int yy_chk[1159] =
702     {   0,
703         0,    1,    1,    1,    1,    2,    2,    2,    2,    3,
704         3,    2,    0,    1,    4,    4,    0,    2,    3,    5,
705         5,  466,    5,    4,   63,    5,   17,   17,    7,    7,
706         5,    7,   28,    1,   28,   17,    4,    2,    8,    8,
707        92,    8,   13,   14,   63,    5,   13,   14,   18,   18,
708        18,   18,    2,   43,    7,   43,   19,   19,   18,   21,
709        21,   92,   22,   22,    8,   19,   13,   14,   21,   13,
710        14,   22,   61,    5,    5,    6,    6,   70,    6,    6,
711         6,    6,   47,   13,   14,   47,    6,   62,   68,   13,
712        14,   31,   20,   20,   20,   20,   61,   56,   31,   56,
713
714        74,    6,   20,   66,   70,   66,   31,   55,   55,   55,
715        55,   67,   67,   67,   67,   94,   31,   62,   68,   58,
716        47,   58,   58,   58,   58,  464,   67,   74,   94,    6,
717         6,    9,    9,    9,    9,    9,    9,    9,    9,    9,
718         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
719         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
720         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
721         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
722         9,    9,    9,    9,    9,    9,    9,    9,    9,   11,
723        11,   30,  181,   79,   30,   42,   65,   69,   65,   65,
724
725        65,   65,   75,   72,   11,   71,   73,  181,   11,  160,
726        11,   11,   11,   11,   79,   78,   11,   69,   42,   11,
727        79,   69,   11,   11,   69,   76,   11,   72,   11,   11,
728        89,   71,   73,   11,   11,   15,   75,   90,   30,   15,
729        15,   78,  160,   15,   86,   93,   42,   42,   57,  110,
730        57,   57,   57,   57,   96,   76,   89,   77,   76,   93,
731       110,   90,   15,   15,   15,   15,   15,   87,   86,   15,
732       461,   86,   15,   15,   15,   15,   15,   77,   77,   15,
733        15,   15,   15,   88,   91,   97,   15,   87,   95,   77,
734        57,   96,  101,  114,   87,  101,  114,   91,  124,  116,
735
736        88,  182,  101,  102,  102,   91,  102,  116,   95,   95,
737        88,  106,   97,  116,  106,  102,  107,  107,  117,  107,
738        95,  106,  118,  182,  130,  147,  107,  130,  107,  460,
739       148,  149,  118,  117,  136,  136,  136,  136,  147,  117,
740       114,  139,  139,  139,  139,  153,  153,  153,  153,  124,
741       124,  140,  149,  140,  140,  140,  140,  148,  156,  159,
742       153,  141,  130,  141,  141,  141,  141,  143,  157,  143,
743       143,  143,  143,  158,  161,  162,  163,  156,  164,  165,
744       167,  157,  166,  168,  170,  159,  158,  169,  172,  174,
745       171,  173,  175,  177,  167,  176,  165,  179,  180,  185,
746
747       183,  184,  162,  166,  164,  248,  169,  161,  163,  166,
748       168,  171,  173,  176,  170,  265,  178,  235,  172,  248,
749       184,  171,  174,  317,  180,  455,  177,  185,  175,  178,
750       183,  187,  265,  179,  187,  188,  188,  317,  188,  189,
751       189,  187,  189,  178,  191,  191,  193,  191,  235,  193,
752       194,  194,  236,  194,  195,  195,  193,  195,  197,  197,
753       194,  197,  194,  227,  227,  227,  227,  230,  230,  230,
754       230,  237,  239,  239,  244,  239,  245,  236,  243,  243,
755       243,  243,  246,  247,  249,  250,  252,  253,  254,  258,
756       257,  255,  256,  243,  259,  263,  262,  260,  250,  264,
757
758       261,  267,  237,  454,  452,  252,  245,  244,  450,  249,
759       269,  263,  266,  246,  247,  258,  256,  253,  268,  255,
760       257,  261,  254,  255,  260,  266,  267,  259,  262,  264,
761       270,  269,  271,  272,  273,  274,  275,  268,  279,  276,
762       276,  292,  276,  297,  279,  295,  295,  273,  295,  299,
763       272,  270,  300,  275,  301,  271,  276,  303,  305,  307,
764       306,  274,  308,  310,  309,  313,  312,  315,  297,  311,
765       319,  314,  292,  306,  321,  320,  307,  318,  301,  308,
766       299,  312,  311,  322,  300,  309,  311,  320,  305,  303,
767       314,  313,  323,  318,  325,  310,  326,  327,  329,  329,
768
769       315,  329,  340,  319,  341,  321,  343,  345,  322,  325,
770       331,  331,  346,  331,  327,  332,  332,  323,  332,  340,
771       347,  326,  348,  343,  351,  349,  352,  331,  345,  353,
772       355,  358,  356,  359,  360,  361,  362,  348,  363,  341,
773       349,  364,  352,  358,  346,  356,  365,  361,  351,  372,
774       347,  373,  375,  376,  377,  378,  355,  359,  365,  383,
775       384,  353,  385,  386,  387,  388,  360,  389,  375,  362,
776       376,  363,  373,  364,  390,  372,  383,  391,  392,  393,
777       398,  402,  399,  400,  384,  393,  377,  378,  403,  391,
778       404,  406,  389,  408,  385,  386,  407,  388,  399,  390,
779
780       400,  387,  409,  412,  413,  403,  404,  420,  407,  423,
781       392,  416,  398,  426,  416,  417,  417,  417,  402,  418,
782       425,  408,  418,  427,  420,  423,  428,  429,  406,  430,
783       433,  468,  468,  433,  468,  412,  439,  443,  445,  409,
784       427,  413,  436,  433,  433,  433,  433,  426,  425,  434,
785       434,  434,  434,  439,  428,  435,  436,  430,  440,  435,
786       435,  435,  435,  442,  429,  443,  444,  449,  451,  457,
787       446,  440,  446,  446,  446,  446,  453,  459,  441,  438,
788       442,  447,  449,  444,  457,  447,  447,  447,  447,  463,
789       437,  432,  451,  453,  456,  456,  456,  456,  462,  431,
790
791       462,  462,  462,  462,  467,  467,  463,  467,  424,  422,
792       459,  465,  465,  465,  465,  421,  419,  467,  467,  467,
793       467,  471,  471,  471,  471,  471,  471,  471,  471,  472,
794       472,  472,  472,  472,  472,  472,  472,  473,  473,  473,
795       473,  473,  473,  473,  473,  474,  474,  474,  474,  474,
796       474,  474,  474,  475,  475,  475,  475,  475,  475,  475,
797       475,  476,  476,  476,  476,  476,  476,  476,  476,  477,
798       477,  477,  477,  477,  477,  477,  477,  478,  478,  415,
799       478,  478,  478,  478,  478,  479,  479,  414,  479,  479,
800       479,  479,  479,  480,  480,  411,  480,  480,  480,  480,
801
802       480,  481,  481,  482,  482,  482,  482,  483,  410,  483,
803       483,  483,  484,  484,  484,  484,  484,  484,  484,  484,
804       485,  485,  405,  485,  485,  485,  485,  485,  486,  486,
805       486,  486,  486,  486,  486,  486,  487,  487,  401,  487,
806       487,  487,  487,  487,  488,  488,  488,  488,  488,  488,
807       488,  488,  489,  397,  489,  490,  490,  490,  490,  491,
808       491,  491,  491,  492,  492,  492,  492,  492,  492,  492,
809       492,  493,  396,  493,  493,  493,  494,  494,  395,  394,
810       494,  494,  495,  495,  495,  495,  496,  496,  496,  496,
811       496,  496,  497,  497,  382,  497,  497,  497,  497,  497,
812
813       498,  498,  381,  498,  498,  498,  498,  498,  380,  379,
814       374,  371,  370,  369,  368,  367,  366,  357,  354,  350,
815       344,  342,  339,  337,  336,  335,  334,  328,  324,  316,
816       304,  302,  298,  294,  293,  291,  290,  286,  285,  284,
817       281,  278,  251,  242,  240,  234,  233,  232,  228,  226,
818       225,  223,  221,  218,  217,  216,  214,  213,  212,  211,
819       209,  208,  206,  205,  204,  202,  198,  155,  154,  152,
820       151,  150,  146,  145,  144,  138,  135,  134,  131,  128,
821       126,  125,  123,  120,  115,  113,  112,  109,  108,  105,
822       100,   60,   54,   48,   37,   36,   32,   29,   23,  470,
823
824       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
825       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
826       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
827       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
828       470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
829       470,  470,  470,  470,  470,  470,  470,  470
830     } ;
831
832 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
833 static char *yy_full_match;
834 static int yy_lp;
835 #define REJECT \
836 { \
837 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
838 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
839 ++yy_lp; \
840 goto find_rule; \
841 }
842 #define yymore() yymore_used_but_not_detected
843 #define YY_MORE_ADJ 0
844 #define YY_RESTORE_YY_MORE_OFFSET
845 char *yytext;
846 #line 1 "lexer.l"
847 #define INITIAL 0
848 /* GOB C Preprocessor
849  * Copyright (C) 1999 the Free Software Foundation.
850  *
851  * Author: George Lebl
852  *
853  * This program is free software; you can redistribute it and/or modify
854  * it under the terms of the GNU General Public License as published by
855  * the Free Software Foundation; either version 2 of the License, or
856  * (at your option) any later version.
857  *
858  * This program is distributed in the hope that it will be useful,
859  * but WITHOUT ANY WARRANTY; without even the implied warranty of
860  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
861  * GNU General Public License for more details.
862  *
863  * You should have received a copy of the GNU General Public License
864  * along with this program; if not, write to the  Free Software
865  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
866  * USA.
867  */
868 #line 22 "lexer.l"
869
870 #include "config.h"
871 #include <glib.h>
872 #include <string.h>
873
874 #include "treefuncs.h"
875 #include "parse.h"
876 #include "main.h"
877 #include "util.h"
878
879 static int parenth_depth = 0;
880 static int before_comment = INITIAL;
881 static gboolean class_after_c = FALSE;
882 static int code_type = CCODE;
883 static int before_string;
884 static int property_paren_depth = 0;
885
886 /* GTK+ doc stuff */
887 static char *gtk_doc_func = NULL; /* current gtk-doc func */
888 GHashTable *gtk_doc_hash = NULL;
889
890 static GString *cbuf = NULL;
891 int ccode_line = 1;
892
893 GList *include_files = NULL;
894 /* 0 no, 1 means yes, 2+ means don't even start looking anymore */
895 static int look_for_includes = 0;
896
897 int line_no = 1;
898
899 static void
900 clear_cbuf(void)
901 {
902         if(!cbuf) {
903                 cbuf = g_string_new(NULL);
904         } else {
905                 cbuf = g_string_assign(cbuf, "");
906         }
907 }
908
909 static void
910 add_to_cbuf(char *s)
911 {
912         if(!cbuf) {
913                 cbuf = g_string_new(s);
914         } else {
915                 cbuf = g_string_append(cbuf,s);
916         }
917 }
918
919 static void
920 add_gtk_doc_func(void)
921 {
922         if(!gtk_doc_func)
923                 return;
924
925         if(!gtk_doc_hash)
926                 gtk_doc_hash = g_hash_table_new(g_str_hash, g_str_equal);
927         g_hash_table_insert(gtk_doc_hash, gtk_doc_func, g_strdup(cbuf->str));
928         clear_cbuf();
929
930         gtk_doc_func = NULL;
931 }
932
933 /* Ugly warning avoiding */
934 #ifdef FLEX_SCANNER
935 int yylex(void);
936 #endif
937
938 #define COMMENT 1
939
940 #define C_CODE 2
941
942 #define CODE_STRING 3
943
944 #define CLASS_CODE 4
945
946 #define CLASS_CODE_I 5
947
948 #define PROPERTY_CODE 6
949
950 #define PROPERTY_CODE_I 7
951
952 #define GTK_DOC_BEFORE_NAME 8
953
954 #define GTK_DOC 9
955
956 #define GTK_DOC_LINE 10
957
958 #line 959 "lex.yy.c"
959
960 /* Macros after this point can all be overridden by user definitions in
961  * section 1.
962  */
963
964 #ifndef YY_SKIP_YYWRAP
965 #ifdef __cplusplus
966 extern "C" int yywrap YY_PROTO(( void ));
967 #else
968 extern int yywrap YY_PROTO(( void ));
969 #endif
970 #endif
971
972 #ifndef YY_NO_UNPUT
973 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
974 #endif
975
976 #ifndef yytext_ptr
977 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
978 #endif
979
980 #ifdef YY_NEED_STRLEN
981 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
982 #endif
983
984 #ifndef YY_NO_INPUT
985 #ifdef __cplusplus
986 static int yyinput YY_PROTO(( void ));
987 #else
988 static int input YY_PROTO(( void ));
989 #endif
990 #endif
991
992 #if YY_STACK_USED
993 static int yy_start_stack_ptr = 0;
994 static int yy_start_stack_depth = 0;
995 static int *yy_start_stack = 0;
996 #ifndef YY_NO_PUSH_STATE
997 static void yy_push_state YY_PROTO(( int new_state ));
998 #endif
999 #ifndef YY_NO_POP_STATE
1000 static void yy_pop_state YY_PROTO(( void ));
1001 #endif
1002 #ifndef YY_NO_TOP_STATE
1003 static int yy_top_state YY_PROTO(( void ));
1004 #endif
1005
1006 #else
1007 #define YY_NO_PUSH_STATE 1
1008 #define YY_NO_POP_STATE 1
1009 #define YY_NO_TOP_STATE 1
1010 #endif
1011
1012 #ifdef YY_MALLOC_DECL
1013 YY_MALLOC_DECL
1014 #else
1015 #if __STDC__
1016 #ifndef __cplusplus
1017 #include <stdlib.h>
1018 #endif
1019 #else
1020 /* Just try to get by without declaring the routines.  This will fail
1021  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1022  * or sizeof(void*) != sizeof(int).
1023  */
1024 #endif
1025 #endif
1026
1027 /* Amount of stuff to slurp up with each read. */
1028 #ifndef YY_READ_BUF_SIZE
1029 #define YY_READ_BUF_SIZE 8192
1030 #endif
1031
1032 /* Copy whatever the last rule matched to the standard output. */
1033
1034 #ifndef ECHO
1035 /* This used to be an fputs(), but since the string might contain NUL's,
1036  * we now use fwrite().
1037  */
1038 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1039 #endif
1040
1041 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1042  * is returned in "result".
1043  */
1044 #ifndef YY_INPUT
1045 #define YY_INPUT(buf,result,max_size) \
1046         if ( yy_current_buffer->yy_is_interactive ) \
1047                 { \
1048                 int c = '*', n; \
1049                 for ( n = 0; n < max_size && \
1050                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1051                         buf[n] = (char) c; \
1052                 if ( c == '\n' ) \
1053                         buf[n++] = (char) c; \
1054                 if ( c == EOF && ferror( yyin ) ) \
1055                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
1056                 result = n; \
1057                 } \
1058         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1059                   && ferror( yyin ) ) \
1060                 YY_FATAL_ERROR( "input in flex scanner failed" );
1061 #endif
1062
1063 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1064  * we don't want an extra ';' after the "return" because that will cause
1065  * some compilers to complain about unreachable statements.
1066  */
1067 #ifndef yyterminate
1068 #define yyterminate() return YY_NULL
1069 #endif
1070
1071 /* Number of entries by which start-condition stack grows. */
1072 #ifndef YY_START_STACK_INCR
1073 #define YY_START_STACK_INCR 25
1074 #endif
1075
1076 /* Report a fatal error. */
1077 #ifndef YY_FATAL_ERROR
1078 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1079 #endif
1080
1081 /* Default declaration of generated scanner - a define so the user can
1082  * easily add parameters.
1083  */
1084 #ifndef YY_DECL
1085 #define YY_DECL int yylex YY_PROTO(( void ))
1086 #endif
1087
1088 /* Code executed at the beginning of each rule, after yytext and yyleng
1089  * have been set up.
1090  */
1091 #ifndef YY_USER_ACTION
1092 #define YY_USER_ACTION
1093 #endif
1094
1095 /* Code executed at the end of each rule. */
1096 #ifndef YY_BREAK
1097 #define YY_BREAK break;
1098 #endif
1099
1100 #define YY_RULE_SETUP \
1101         if ( yyleng > 0 ) \
1102                 yy_current_buffer->yy_at_bol = \
1103                                 (yytext[yyleng - 1] == '\n'); \
1104         YY_USER_ACTION
1105
1106 YY_DECL
1107         {
1108         register yy_state_type yy_current_state;
1109         register char *yy_cp = NULL, *yy_bp = NULL;
1110         register int yy_act;
1111
1112 #line 106 "lexer.l"
1113
1114
1115
1116 /* Avoid warning from flex, cuz flex sucks */
1117 #ifdef FLEX_SCANNER
1118 yy_current_state = 0;
1119 #endif
1120
1121
1122
1123 #line 1124 "lex.yy.c"
1124
1125         if ( yy_init )
1126                 {
1127                 yy_init = 0;
1128
1129 #ifdef YY_USER_INIT
1130                 YY_USER_INIT;
1131 #endif
1132
1133                 if ( ! yy_start )
1134                         yy_start = 1;   /* first start state */
1135
1136                 if ( ! yyin )
1137                         yyin = stdin;
1138
1139                 if ( ! yyout )
1140                         yyout = stdout;
1141
1142                 if ( ! yy_current_buffer )
1143                         yy_current_buffer =
1144                                 yy_create_buffer( yyin, YY_BUF_SIZE );
1145
1146                 yy_load_buffer_state();
1147                 }
1148
1149         while ( 1 )             /* loops until end-of-file is reached */
1150                 {
1151                 yy_cp = yy_c_buf_p;
1152
1153                 /* Support of yytext. */
1154                 *yy_cp = yy_hold_char;
1155
1156                 /* yy_bp points to the position in yy_ch_buf of the start of
1157                  * the current run.
1158                  */
1159                 yy_bp = yy_cp;
1160
1161                 yy_current_state = yy_start;
1162                 yy_current_state += YY_AT_BOL();
1163                 yy_state_ptr = yy_state_buf;
1164                 *yy_state_ptr++ = yy_current_state;
1165 yy_match:
1166                 do
1167                         {
1168                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1169                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1170                                 {
1171                                 yy_current_state = (int) yy_def[yy_current_state];
1172                                 if ( yy_current_state >= 471 )
1173                                         yy_c = yy_meta[(unsigned int) yy_c];
1174                                 }
1175                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1176                         *yy_state_ptr++ = yy_current_state;
1177                         ++yy_cp;
1178                         }
1179                 while ( yy_base[yy_current_state] != 1100 );
1180
1181 yy_find_action:
1182                 yy_current_state = *--yy_state_ptr;
1183                 yy_lp = yy_accept[yy_current_state];
1184 find_rule: /* we branch to this label when backing up */
1185                 for ( ; ; ) /* until we find what rule we matched */
1186                         {
1187                         if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1188                                 {
1189                                 yy_act = yy_acclist[yy_lp];
1190                                         {
1191                                         yy_full_match = yy_cp;
1192                                         break;
1193                                         }
1194                                 }
1195                         --yy_cp;
1196                         yy_current_state = *--yy_state_ptr;
1197                         yy_lp = yy_accept[yy_current_state];
1198                         }
1199
1200                 YY_DO_BEFORE_ACTION;
1201
1202
1203 do_action:      /* This label is used only to access EOF actions. */
1204
1205
1206                 switch ( yy_act )
1207         { /* beginning of action switch */
1208 case 1:
1209 YY_RULE_SETUP
1210 #line 116 "lexer.l"
1211 { line_no++; REJECT; }
1212         YY_BREAK
1213 case 2:
1214 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1215 yy_c_buf_p = yy_cp -= 1;
1216 YY_DO_BEFORE_ACTION; /* set up yytext again */
1217 YY_RULE_SETUP
1218 #line 118 "lexer.l"
1219 {
1220 /* Thy evil easter egg */
1221 #define QQ(x) long x
1222 #define KK(x) =atoi(__(&,,x,))
1223 #define MM(x,a) {QQ(i);for(i=2;i<x;i++){a}}
1224 #define PP(Q) (P%Q)==0
1225 #define ___(x,y,z) if(x z y)
1226 #define __(a,x,y,z) a(yytext[y] x z)
1227 #define O__O(a,b) fprintf(stderr,"%s is %s!\n",a,b)
1228 QQ(m)=1;___(__(,==,2,'P'),__(,==,5,'M'),&&
1229 ){QQ(P)KK(8);MM(P,___(PP(i),,)m=0;)}__(,=,
1230 7,0);___(,,m){O__O(__( &,,8,),__(&,,2,));}
1231 #undef QQ
1232 #undef KK
1233 #undef MM
1234 #undef PP
1235 #undef ___
1236 #undef __
1237 #undef O__O
1238 REJECT;
1239 }
1240         YY_BREAK
1241 case 3:
1242 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1243 yy_c_buf_p = yy_cp -= 1;
1244 YY_DO_BEFORE_ACTION; /* set up yytext again */
1245 YY_RULE_SETUP
1246 #line 140 "lexer.l"
1247 { ; /*comment, ignore*/ }
1248         YY_BREAK
1249 case 4:
1250 YY_RULE_SETUP
1251 #line 141 "lexer.l"
1252 {
1253         if(look_for_includes==1) {
1254                 char *p;
1255                 char *file;
1256                 char *str = g_strdup(yytext);
1257                 file = strchr(str,'"');
1258                 if(!file) file = strchr(str,'<');
1259                 file++;
1260                 p = strchr(file,'"');
1261                 if(!p) p = strchr(file,'>');
1262                 *p = '\0';
1263                 include_files = g_list_prepend(include_files,g_strdup(file));
1264                 g_free(str);
1265         }
1266         REJECT;
1267 }
1268         YY_BREAK
1269 case 5:
1270 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1271 yy_c_buf_p = yy_cp -= 1;
1272 YY_DO_BEFORE_ACTION; /* set up yytext again */
1273 YY_RULE_SETUP
1274 #line 158 "lexer.l"
1275 {
1276                         /* eat out gtk doc stuff */
1277                         BEGIN(GTK_DOC_BEFORE_NAME);
1278                         clear_cbuf();
1279                 }
1280         YY_BREAK
1281 case 6:
1282 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1283 yy_c_buf_p = yy_cp -= 1;
1284 YY_DO_BEFORE_ACTION; /* set up yytext again */
1285 YY_RULE_SETUP
1286 #line 163 "lexer.l"
1287 {
1288                         /* empty doc lines */
1289                         ;
1290                 }       
1291         YY_BREAK
1292 case 7:
1293 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1294 yy_c_buf_p = yy_cp -= 1;
1295 YY_DO_BEFORE_ACTION; /* set up yytext again */
1296 YY_RULE_SETUP
1297 #line 167 "lexer.l"
1298 {
1299                         char *p;
1300                         BEGIN(GTK_DOC);
1301                         p = strchr(yytext, '*');
1302                         g_free(gtk_doc_func);
1303                         gtk_doc_func = g_strdup(p+2);
1304                         p = strchr(gtk_doc_func, ':');
1305                         if(p) *p='\0';
1306                         g_strstrip(gtk_doc_func);
1307                 }
1308         YY_BREAK
1309 case 8:
1310 YY_RULE_SETUP
1311 #line 177 "lexer.l"
1312 {
1313                         BEGIN(CLASS_CODE_I);
1314                 }
1315         YY_BREAK
1316 case 9:
1317 YY_RULE_SETUP
1318 #line 180 "lexer.l"
1319 {
1320                         BEGIN(COMMENT);
1321                         before_comment = CLASS_CODE_I;
1322                 }
1323         YY_BREAK
1324 case 10:
1325 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1326 yy_c_buf_p = yy_cp -= 1;
1327 YY_DO_BEFORE_ACTION; /* set up yytext again */
1328 YY_RULE_SETUP
1329 #line 184 "lexer.l"
1330 {
1331                         /* empty doc lines */
1332                         add_to_cbuf(" *\n");
1333                 }       
1334         YY_BREAK
1335 case 11:
1336 YY_RULE_SETUP
1337 #line 188 "lexer.l"
1338 {
1339                         BEGIN(CLASS_CODE_I);
1340                         add_gtk_doc_func();
1341                 }
1342         YY_BREAK
1343 case 12:
1344 YY_RULE_SETUP
1345 #line 192 "lexer.l"
1346 {
1347                         fflush(stdout);
1348                         add_to_cbuf(" * ");
1349                         BEGIN(GTK_DOC_LINE);
1350                 }
1351         YY_BREAK
1352 case 13:
1353 YY_RULE_SETUP
1354 #line 197 "lexer.l"
1355 {
1356                         BEGIN(CLASS_CODE_I);
1357                 }
1358         YY_BREAK
1359 case 14:
1360 YY_RULE_SETUP
1361 #line 200 "lexer.l"
1362 {
1363                         BEGIN(COMMENT);
1364                         before_comment = CLASS_CODE_I;
1365                 }
1366         YY_BREAK
1367 case 15:
1368 YY_RULE_SETUP
1369 #line 204 "lexer.l"
1370 {
1371                         BEGIN(CLASS_CODE_I);
1372                         add_to_cbuf("\n");
1373                         add_gtk_doc_func();
1374                 }
1375         YY_BREAK
1376 case 16:
1377 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1378 yy_c_buf_p = yy_cp -= 1;
1379 YY_DO_BEFORE_ACTION; /* set up yytext again */
1380 YY_RULE_SETUP
1381 #line 209 "lexer.l"
1382 {
1383                         BEGIN(GTK_DOC);
1384                         add_to_cbuf(yytext);
1385                         add_to_cbuf("\n");
1386                 }
1387         YY_BREAK
1388 case 17:
1389 YY_RULE_SETUP
1390 #line 214 "lexer.l"
1391 {
1392                         fflush(stdout);
1393                         add_to_cbuf(yytext);
1394                 }
1395         YY_BREAK
1396 case 18:
1397 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1398 yy_c_buf_p = yy_cp -= 1;
1399 YY_DO_BEFORE_ACTION; /* set up yytext again */
1400 YY_RULE_SETUP
1401 #line 219 "lexer.l"
1402 { add_to_cbuf(yytext); /*comment, ignore*/ }
1403         YY_BREAK
1404 case 19:
1405 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1406 yy_c_buf_p = yy_cp -= 1;
1407 YY_DO_BEFORE_ACTION; /* set up yytext again */
1408 YY_RULE_SETUP
1409 #line 220 "lexer.l"
1410 { ; /*comment, ignore*/ }
1411         YY_BREAK
1412 case 20:
1413 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1414 yy_c_buf_p = yy_cp -= 1;
1415 YY_DO_BEFORE_ACTION; /* set up yytext again */
1416 YY_RULE_SETUP
1417 #line 221 "lexer.l"
1418 { ; /*comment, ignore*/ }
1419         YY_BREAK
1420 case 21:
1421 YY_RULE_SETUP
1422 #line 222 "lexer.l"
1423 {BEGIN(COMMENT); before_comment = INITIAL; }
1424         YY_BREAK
1425 case 22:
1426 YY_RULE_SETUP
1427 #line 223 "lexer.l"
1428 {
1429         add_to_cbuf(yytext);
1430         BEGIN(COMMENT);
1431         before_comment = C_CODE;
1432 }
1433         YY_BREAK
1434 case 23:
1435 YY_RULE_SETUP
1436 #line 228 "lexer.l"
1437 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
1438         YY_BREAK
1439 case 24:
1440 YY_RULE_SETUP
1441 #line 229 "lexer.l"
1442 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
1443         YY_BREAK
1444 case 25:
1445 YY_RULE_SETUP
1446 #line 230 "lexer.l"
1447 {
1448         if(before_comment == C_CODE) add_to_cbuf(yytext);
1449         BEGIN(before_comment);
1450                 }
1451         YY_BREAK
1452 case 26:
1453 YY_RULE_SETUP
1454 #line 234 "lexer.l"
1455 {
1456         /* comment, ignore */
1457         if(before_comment == C_CODE) add_to_cbuf(yytext);
1458                 }
1459         YY_BREAK
1460 case 27:
1461 YY_RULE_SETUP
1462 #line 238 "lexer.l"
1463 {
1464         /* comment, ignore */
1465         if(before_comment == C_CODE) add_to_cbuf(yytext);
1466                 }
1467         YY_BREAK
1468 case 28:
1469 YY_RULE_SETUP
1470 #line 243 "lexer.l"
1471 {
1472                         BEGIN(C_CODE);
1473                         parenth_depth = 1;
1474                         class_after_c = FALSE;
1475                         code_type = ACODE;
1476                         clear_cbuf();
1477                         ccode_line = line_no;
1478                 }
1479         YY_BREAK
1480 case 29:
1481 YY_RULE_SETUP
1482 #line 251 "lexer.l"
1483 {
1484                         BEGIN(C_CODE);
1485                         parenth_depth = 1;
1486                         class_after_c = FALSE;
1487                         code_type = ATCODE;
1488                         clear_cbuf();
1489                         ccode_line = line_no;
1490                 }
1491         YY_BREAK
1492 case 30:
1493 YY_RULE_SETUP
1494 #line 260 "lexer.l"
1495 {
1496                         BEGIN(C_CODE);
1497                         parenth_depth = 1;
1498                         class_after_c = FALSE;
1499                         code_type = HTCODE;
1500                         clear_cbuf();
1501                         ccode_line = line_no;
1502                 }
1503         YY_BREAK
1504 case 31:
1505 YY_RULE_SETUP
1506 #line 268 "lexer.l"
1507 {
1508                         BEGIN(C_CODE);
1509                         parenth_depth = 1;
1510                         class_after_c = FALSE;
1511                         code_type = PHCODE;
1512                         clear_cbuf();
1513                         ccode_line = line_no;
1514                 }
1515         YY_BREAK
1516 case 32:
1517 YY_RULE_SETUP
1518 #line 276 "lexer.l"
1519 {
1520                         BEGIN(C_CODE);
1521                         parenth_depth = 1;
1522                         class_after_c = FALSE;
1523                         code_type = HCODE;
1524                         clear_cbuf();
1525                         ccode_line = line_no;
1526                 }
1527         YY_BREAK
1528 case 33:
1529 YY_RULE_SETUP
1530 #line 284 "lexer.l"
1531 {
1532                         BEGIN(C_CODE);
1533                         parenth_depth = 1;
1534                         class_after_c = FALSE;
1535                         code_type = CCODE;
1536                         clear_cbuf();
1537                         ccode_line = line_no;
1538                         if(look_for_includes==0)
1539                                 look_for_includes=1;
1540                 }
1541         YY_BREAK
1542 case 34:
1543 YY_RULE_SETUP
1544 #line 294 "lexer.l"
1545 {
1546                         BEGIN(INITIAL);
1547                         yylval.cbuf = cbuf;
1548                         cbuf = NULL;
1549                         if(look_for_includes==1)
1550                                 look_for_includes=0;
1551                         return code_type;
1552                 }
1553         YY_BREAK
1554 case 35:
1555 YY_RULE_SETUP
1556 #line 303 "lexer.l"
1557 { add_to_cbuf(yytext); }
1558         YY_BREAK
1559 case 36:
1560 YY_RULE_SETUP
1561 #line 304 "lexer.l"
1562 { add_to_cbuf(yytext); }
1563         YY_BREAK
1564 case 37:
1565 YY_RULE_SETUP
1566 #line 305 "lexer.l"
1567 { add_to_cbuf(yytext); }
1568         YY_BREAK
1569 case 38:
1570 YY_RULE_SETUP
1571 #line 306 "lexer.l"
1572 { add_to_cbuf(yytext); }
1573         YY_BREAK
1574 case 39:
1575 YY_RULE_SETUP
1576 #line 307 "lexer.l"
1577 { add_to_cbuf(yytext); }
1578         YY_BREAK
1579 case 40:
1580 YY_RULE_SETUP
1581 #line 308 "lexer.l"
1582 { add_to_cbuf(yytext); }
1583         YY_BREAK
1584 case 41:
1585 YY_RULE_SETUP
1586 #line 310 "lexer.l"
1587 { add_to_cbuf(yytext); }
1588         YY_BREAK
1589 case 42:
1590 YY_RULE_SETUP
1591 #line 313 "lexer.l"
1592 {
1593                         BEGIN(CODE_STRING);
1594                         before_string = C_CODE;
1595                         add_to_cbuf(yytext);
1596                 }
1597         YY_BREAK
1598 case 43:
1599 YY_RULE_SETUP
1600 #line 318 "lexer.l"
1601 {
1602                         BEGIN(CODE_STRING);
1603                         before_string = PROPERTY_CODE_I;
1604                         add_to_cbuf(yytext);
1605                 }
1606         YY_BREAK
1607 case 44:
1608 YY_RULE_SETUP
1609 #line 323 "lexer.l"
1610 { add_to_cbuf(yytext); }
1611         YY_BREAK
1612 case 45:
1613 YY_RULE_SETUP
1614 #line 324 "lexer.l"
1615 {
1616                         BEGIN(before_string);
1617                         add_to_cbuf(yytext);
1618                         if (before_string == PROPERTY_CODE_I) {
1619                                 yylval.id = cbuf->str;
1620                                 g_string_free (cbuf, FALSE);
1621                                 cbuf = NULL;
1622                                 return STRING;
1623                         }
1624                 }
1625         YY_BREAK
1626 case 46:
1627 YY_RULE_SETUP
1628 #line 334 "lexer.l"
1629 { add_to_cbuf(yytext); }
1630         YY_BREAK
1631 case 47:
1632 YY_RULE_SETUP
1633 #line 335 "lexer.l"
1634 { add_to_cbuf(yytext); }
1635         YY_BREAK
1636 case 48:
1637 YY_RULE_SETUP
1638 #line 337 "lexer.l"
1639 {
1640                         parenth_depth++;
1641                         add_to_cbuf(yytext);
1642                 }
1643         YY_BREAK
1644 case 49:
1645 YY_RULE_SETUP
1646 #line 341 "lexer.l"
1647 {
1648                         parenth_depth--;
1649                         if(parenth_depth<0) {
1650                                 REJECT;
1651                         } else if(parenth_depth==0 && class_after_c) {
1652                                 BEGIN(CLASS_CODE_I);
1653                                 yylval.cbuf = cbuf;
1654                                 cbuf = NULL;
1655                                 return CCODE;
1656                         }
1657                         add_to_cbuf(yytext);
1658                 }
1659         YY_BREAK
1660 case 50:
1661 YY_RULE_SETUP
1662 #line 354 "lexer.l"
1663 { add_to_cbuf(yytext); }
1664         YY_BREAK
1665 case 51:
1666 YY_RULE_SETUP
1667 #line 355 "lexer.l"
1668 { add_to_cbuf(yytext); }
1669         YY_BREAK
1670 case 52:
1671 YY_RULE_SETUP
1672 #line 357 "lexer.l"
1673 {
1674                         static int found_classes = 0;
1675                         look_for_includes = 2;
1676                         BEGIN(CLASS_CODE);
1677
1678                         if(++found_classes > 1) {
1679                                 error_print(GOB_ERROR, line_no,
1680                                             "Only one class per file allowed");
1681                         }
1682
1683                         return CLASS;
1684                 }
1685         YY_BREAK
1686 case 53:
1687 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1688 yy_c_buf_p = yy_cp -= 1;
1689 YY_DO_BEFORE_ACTION; /* set up yytext again */
1690 YY_RULE_SETUP
1691 #line 370 "lexer.l"
1692 {
1693                         int maj = 0, min = 0, pl = 0;
1694                         int rmaj = 0, rmin = 0, rpl = 0;
1695                         int effective_maj = 0;
1696                         int effective_rmaj = 0;
1697                         char *p;
1698                         
1699                         sscanf (VERSION, "%d.%d.%d", &rmaj, &rmin, &rpl);
1700                         effective_rmaj = rmaj;
1701                         if (rmin >= 90)
1702                                 effective_rmaj = rmaj + 1;
1703
1704                         p = strchr (yytext,'r');
1705                         g_assert (p); /* we MUST have found it */
1706                         sscanf (p, "requires %d.%d.%d", &maj, &min, &pl);
1707                         effective_maj = maj;
1708                         if (min >= 90)
1709                                 effective_maj = maj + 1;
1710
1711                         if(rmaj < maj ||
1712                            (rmaj == maj && rmin < min) ||
1713                            (rmaj == maj && rmin == min && rpl < pl)) {
1714                                 error_printf (GOB_ERROR, line_no,
1715                                               "GOB version at least %d.%d.%d required "
1716                                               "(this is %s)\n"
1717                                               "To upgrade your gob, see: "
1718                                               "http://www.5z.com/jirka/gob.html",
1719                                               maj, min, pl, VERSION);
1720                         }
1721
1722                         if(effective_rmaj != effective_maj) {
1723                                 error_printf(GOB_ERROR, line_no,
1724                                              "GOB major version %d required "
1725                                              "(this is %s)\n"
1726                                              "To upgrade your gob, see: "
1727                                              "http://www.5z.com/jirka/gob.html",
1728                                              maj, VERSION);
1729                         }
1730
1731                 }
1732         YY_BREAK
1733 case 54:
1734 YY_RULE_SETUP
1735 #line 411 "lexer.l"
1736 {
1737                         if(for_cpp) {
1738                                 error_printf(GOB_WARN, line_no,
1739                                              "'%s' keyword should not "
1740                                              "be used when generating "
1741                                              "C++ code", yytext);
1742                         }
1743                         REJECT;
1744                 }
1745         YY_BREAK
1746 case 55:
1747 YY_RULE_SETUP
1748 #line 421 "lexer.l"
1749 {return FROM;}
1750         YY_BREAK
1751 case 56:
1752 YY_RULE_SETUP
1753 #line 423 "lexer.l"
1754 {return VOID;}
1755         YY_BREAK
1756 case 57:
1757 YY_RULE_SETUP
1758 #line 424 "lexer.l"
1759 {return STRUCT;}
1760         YY_BREAK
1761 case 58:
1762 YY_RULE_SETUP
1763 #line 425 "lexer.l"
1764 {return UNION;}
1765         YY_BREAK
1766 case 59:
1767 YY_RULE_SETUP
1768 #line 426 "lexer.l"
1769 {return ENUM;}
1770         YY_BREAK
1771 case 60:
1772 YY_RULE_SETUP
1773 #line 427 "lexer.l"
1774 {return SIGNED;}
1775         YY_BREAK
1776 case 61:
1777 YY_RULE_SETUP
1778 #line 428 "lexer.l"
1779 {return UNSIGNED;}
1780         YY_BREAK
1781 case 62:
1782 YY_RULE_SETUP
1783 #line 429 "lexer.l"
1784 {return LONG;}
1785         YY_BREAK
1786 case 63:
1787 YY_RULE_SETUP
1788 #line 430 "lexer.l"
1789 {return SHORT;}
1790         YY_BREAK
1791 case 64:
1792 YY_RULE_SETUP
1793 #line 431 "lexer.l"
1794 {return INT;}
1795         YY_BREAK
1796 case 65:
1797 YY_RULE_SETUP
1798 #line 432 "lexer.l"
1799 {return FLOAT;}
1800         YY_BREAK
1801 case 66:
1802 YY_RULE_SETUP
1803 #line 433 "lexer.l"
1804 {return DOUBLE;}
1805         YY_BREAK
1806 case 67:
1807 YY_RULE_SETUP
1808 #line 434 "lexer.l"
1809 {return CHAR;}
1810         YY_BREAK
1811 case 68:
1812 YY_RULE_SETUP
1813 #line 435 "lexer.l"
1814 {return CONST;}
1815         YY_BREAK
1816 case 69:
1817 YY_RULE_SETUP
1818 #line 437 "lexer.l"
1819 {return THREEDOTS;}
1820         YY_BREAK
1821 case 70:
1822 YY_RULE_SETUP
1823 #line 439 "lexer.l"
1824 {yylval.line = line_no; return PUBLIC;}
1825         YY_BREAK
1826 case 71:
1827 YY_RULE_SETUP
1828 #line 440 "lexer.l"
1829 {yylval.line = line_no; return PRIVATE;}
1830         YY_BREAK
1831 case 72:
1832 YY_RULE_SETUP
1833 #line 441 "lexer.l"
1834 {yylval.line = line_no; return PROTECTED;}
1835         YY_BREAK
1836 case 73:
1837 YY_RULE_SETUP
1838 #line 442 "lexer.l"
1839 {yylval.line = line_no; return CLASSWIDE;}
1840         YY_BREAK
1841 case 74:
1842 YY_RULE_SETUP
1843 #line 443 "lexer.l"
1844 {yylval.line = line_no; return ARGUMENT;}
1845         YY_BREAK
1846 case 75:
1847 YY_RULE_SETUP
1848 #line 444 "lexer.l"
1849 {yylval.line = line_no; return VIRTUAL;}
1850         YY_BREAK
1851 case 76:
1852 YY_RULE_SETUP
1853 #line 445 "lexer.l"
1854 {yylval.line = line_no; return SIGNAL;}
1855         YY_BREAK
1856 case 77:
1857 YY_RULE_SETUP
1858 #line 446 "lexer.l"
1859 {yylval.line = line_no; return OVERRIDE;}
1860         YY_BREAK
1861 case 78:
1862 YY_RULE_SETUP
1863 #line 447 "lexer.l"
1864 {
1865                                 yylval.line = line_no;
1866                                 BEGIN(PROPERTY_CODE);
1867                                 return PROPERTY;
1868                         }
1869         YY_BREAK
1870 case 79:
1871 YY_RULE_SETUP
1872 #line 452 "lexer.l"
1873 { yylval.line = line_no; return NICK; }
1874         YY_BREAK
1875 case 80:
1876 YY_RULE_SETUP
1877 #line 453 "lexer.l"
1878 { yylval.line = line_no; return BLURB; }
1879         YY_BREAK
1880 case 81:
1881 YY_RULE_SETUP
1882 #line 454 "lexer.l"
1883 { yylval.line = line_no; return MAXIMUM; }
1884         YY_BREAK
1885 case 82:
1886 YY_RULE_SETUP
1887 #line 455 "lexer.l"
1888 { yylval.line = line_no; return MINIMUM; }
1889         YY_BREAK
1890 case 83:
1891 YY_RULE_SETUP
1892 #line 456 "lexer.l"
1893 { yylval.line = line_no; return DEFAULT_VALUE; }
1894         YY_BREAK
1895 case 84:
1896 YY_RULE_SETUP
1897 #line 457 "lexer.l"
1898 { yylval.line = line_no; return FLAGS; }
1899         YY_BREAK
1900 case 85:
1901 YY_RULE_SETUP
1902 #line 458 "lexer.l"
1903 { yylval.line = line_no; return TYPE; }
1904         YY_BREAK
1905 case 86:
1906 YY_RULE_SETUP
1907 #line 459 "lexer.l"
1908 { yylval.line = line_no; return FLAGS_TYPE; }
1909         YY_BREAK
1910 case 87:
1911 YY_RULE_SETUP
1912 #line 460 "lexer.l"
1913 { yylval.line = line_no; return ENUM_TYPE; }
1914         YY_BREAK
1915 case 88:
1916 YY_RULE_SETUP
1917 #line 461 "lexer.l"
1918 { yylval.line = line_no; return PARAM_TYPE; }
1919         YY_BREAK
1920 case 89:
1921 YY_RULE_SETUP
1922 #line 462 "lexer.l"
1923 { yylval.line = line_no; return BOXED_TYPE; }
1924         YY_BREAK
1925 case 90:
1926 YY_RULE_SETUP
1927 #line 463 "lexer.l"
1928 { yylval.line = line_no; return OBJECT_TYPE; }
1929         YY_BREAK
1930 case 91:
1931 YY_RULE_SETUP
1932 #line 464 "lexer.l"
1933 {
1934                 yylval.line = line_no;
1935                 property_paren_depth = 1;
1936                 BEGIN(PROPERTY_CODE_I);
1937                 return '(';
1938                         }
1939         YY_BREAK
1940 case 92:
1941 YY_RULE_SETUP
1942 #line 470 "lexer.l"
1943 {
1944                 yylval.line = line_no;
1945                 property_paren_depth++;
1946                 return '(';
1947                         }
1948         YY_BREAK
1949 case 93:
1950 YY_RULE_SETUP
1951 #line 475 "lexer.l"
1952 {
1953                 yylval.line = line_no;
1954                 property_paren_depth--;
1955                 if (property_paren_depth == 0) {
1956                         BEGIN(CLASS_CODE_I);
1957                 }
1958                 return ')';
1959                         }
1960         YY_BREAK
1961 case 94:
1962 YY_RULE_SETUP
1963 #line 484 "lexer.l"
1964 {
1965                         yylval.id = g_strdup(yytext);
1966                         return NUMBER;
1967                 }
1968         YY_BREAK
1969 case 95:
1970 YY_RULE_SETUP
1971 #line 488 "lexer.l"
1972 {
1973                         /* this one is for a classname with a namespace */
1974                         yylval.id = g_strdup(yytext);
1975                         return TYPETOKEN;
1976                 }
1977         YY_BREAK
1978 case 96:
1979 YY_RULE_SETUP
1980 #line 493 "lexer.l"
1981 {
1982                         /* this is for a classname with an empty namespace */
1983                         yylval.id = g_strdup(yytext);
1984                         return TYPETOKEN;
1985                 }
1986         YY_BREAK
1987 case 97:
1988 YY_RULE_SETUP
1989 #line 498 "lexer.l"
1990 {
1991                         yylval.id = g_strdup(yytext);
1992                         return TOKEN;
1993                 }
1994         YY_BREAK
1995 case 98:
1996 YY_RULE_SETUP
1997 #line 502 "lexer.l"
1998 {
1999                         yylval.id = g_strdup(yytext);
2000                         return SINGLE_CHAR;
2001                 }
2002         YY_BREAK
2003 case 99:
2004 YY_RULE_SETUP
2005 #line 507 "lexer.l"
2006 {
2007                         yylval.id = g_strdup(yytext);
2008                         return ARRAY_DIM;
2009                 }
2010         YY_BREAK
2011 case 100:
2012 YY_RULE_SETUP
2013 #line 512 "lexer.l"
2014 {
2015                         BEGIN(CLASS_CODE_I);
2016                         return '{';
2017                 }
2018         YY_BREAK
2019 case 101:
2020 YY_RULE_SETUP
2021 #line 516 "lexer.l"
2022 {
2023                         BEGIN(C_CODE);
2024                         parenth_depth=1;
2025                         class_after_c = TRUE;
2026                         yylval.line = line_no;
2027                         clear_cbuf();
2028                         ccode_line = line_no;
2029                         return '{';
2030                 }
2031         YY_BREAK
2032 case 102:
2033 YY_RULE_SETUP
2034 #line 525 "lexer.l"
2035 {
2036                                 BEGIN(INITIAL);
2037                                 return '}';
2038                         }
2039         YY_BREAK
2040 case 103:
2041 YY_RULE_SETUP
2042 #line 530 "lexer.l"
2043 ;  /*ignore*/
2044         YY_BREAK
2045 case 104:
2046 YY_RULE_SETUP
2047 #line 532 "lexer.l"
2048 {
2049                         yylval.line = line_no;
2050                         return yytext[0];
2051                 }
2052         YY_BREAK
2053 case 105:
2054 YY_RULE_SETUP
2055 #line 537 "lexer.l"
2056 ;  /*ignore*/
2057         YY_BREAK
2058 case 106:
2059 YY_RULE_SETUP
2060 #line 539 "lexer.l"
2061 ECHO;
2062         YY_BREAK
2063 #line 2064 "lex.yy.c"
2064                         case YY_STATE_EOF(INITIAL):
2065                         case YY_STATE_EOF(COMMENT):
2066                         case YY_STATE_EOF(C_CODE):
2067                         case YY_STATE_EOF(CODE_STRING):
2068                         case YY_STATE_EOF(CLASS_CODE):
2069                         case YY_STATE_EOF(CLASS_CODE_I):
2070                         case YY_STATE_EOF(PROPERTY_CODE):
2071                         case YY_STATE_EOF(PROPERTY_CODE_I):
2072                         case YY_STATE_EOF(GTK_DOC_BEFORE_NAME):
2073                         case YY_STATE_EOF(GTK_DOC):
2074                         case YY_STATE_EOF(GTK_DOC_LINE):
2075                                 yyterminate();
2076
2077         case YY_END_OF_BUFFER:
2078                 {
2079                 /* Amount of text matched not including the EOB char. */
2080                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
2081
2082                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2083                 *yy_cp = yy_hold_char;
2084                 YY_RESTORE_YY_MORE_OFFSET
2085
2086                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
2087                         {
2088                         /* We're scanning a new file or input source.  It's
2089                          * possible that this happened because the user
2090                          * just pointed yyin at a new source and called
2091                          * yylex().  If so, then we have to assure
2092                          * consistency between yy_current_buffer and our
2093                          * globals.  Here is the right place to do so, because
2094                          * this is the first action (other than possibly a
2095                          * back-up) that will match for the new input source.
2096                          */
2097                         yy_n_chars = yy_current_buffer->yy_n_chars;
2098                         yy_current_buffer->yy_input_file = yyin;
2099                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
2100                         }
2101
2102                 /* Note that here we test for yy_c_buf_p "<=" to the position
2103                  * of the first EOB in the buffer, since yy_c_buf_p will
2104                  * already have been incremented past the NUL character
2105                  * (since all states make transitions on EOB to the
2106                  * end-of-buffer state).  Contrast this with the test
2107                  * in input().
2108                  */
2109                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2110                         { /* This was really a NUL. */
2111                         yy_state_type yy_next_state;
2112
2113                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2114
2115                         yy_current_state = yy_get_previous_state();
2116
2117                         /* Okay, we're now positioned to make the NUL
2118                          * transition.  We couldn't have
2119                          * yy_get_previous_state() go ahead and do it
2120                          * for us because it doesn't know how to deal
2121                          * with the possibility of jamming (and we don't
2122                          * want to build jamming into it because then it
2123                          * will run more slowly).
2124                          */
2125
2126                         yy_next_state = yy_try_NUL_trans( yy_current_state );
2127
2128                         yy_bp = yytext_ptr + YY_MORE_ADJ;
2129
2130                         if ( yy_next_state )
2131                                 {
2132                                 /* Consume the NUL. */
2133                                 yy_cp = ++yy_c_buf_p;
2134                                 yy_current_state = yy_next_state;
2135                                 goto yy_match;
2136                                 }
2137
2138                         else
2139                                 {
2140                                 yy_cp = yy_c_buf_p;
2141                                 goto yy_find_action;
2142                                 }
2143                         }
2144
2145                 else switch ( yy_get_next_buffer() )
2146                         {
2147                         case EOB_ACT_END_OF_FILE:
2148                                 {
2149                                 yy_did_buffer_switch_on_eof = 0;
2150
2151                                 if ( yywrap() )
2152                                         {
2153                                         /* Note: because we've taken care in
2154                                          * yy_get_next_buffer() to have set up
2155                                          * yytext, we can now set up
2156                                          * yy_c_buf_p so that if some total
2157                                          * hoser (like flex itself) wants to
2158                                          * call the scanner after we return the
2159                                          * YY_NULL, it'll still work - another
2160                                          * YY_NULL will get returned.
2161                                          */
2162                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
2163
2164                                         yy_act = YY_STATE_EOF(YY_START);
2165                                         goto do_action;
2166                                         }
2167
2168                                 else
2169                                         {
2170                                         if ( ! yy_did_buffer_switch_on_eof )
2171                                                 YY_NEW_FILE;
2172                                         }
2173                                 break;
2174                                 }
2175
2176                         case EOB_ACT_CONTINUE_SCAN:
2177                                 yy_c_buf_p =
2178                                         yytext_ptr + yy_amount_of_matched_text;
2179
2180                                 yy_current_state = yy_get_previous_state();
2181
2182                                 yy_cp = yy_c_buf_p;
2183                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
2184                                 goto yy_match;
2185
2186                         case EOB_ACT_LAST_MATCH:
2187                                 yy_c_buf_p =
2188                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
2189
2190                                 yy_current_state = yy_get_previous_state();
2191
2192                                 yy_cp = yy_c_buf_p;
2193                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
2194                                 goto yy_find_action;
2195                         }
2196                 break;
2197                 }
2198
2199         default:
2200                 YY_FATAL_ERROR(
2201                         "fatal flex scanner internal error--no action found" );
2202         } /* end of action switch */
2203                 } /* end of scanning one token */
2204         } /* end of yylex */
2205
2206
2207 /* yy_get_next_buffer - try to read in a new buffer
2208  *
2209  * Returns a code representing an action:
2210  *      EOB_ACT_LAST_MATCH -
2211  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2212  *      EOB_ACT_END_OF_FILE - end of file
2213  */
2214
2215 static int yy_get_next_buffer()
2216         {
2217         register char *dest = yy_current_buffer->yy_ch_buf;
2218         register char *source = yytext_ptr;
2219         register int number_to_move, i;
2220         int ret_val;
2221
2222         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2223                 YY_FATAL_ERROR(
2224                 "fatal flex scanner internal error--end of buffer missed" );
2225
2226         if ( yy_current_buffer->yy_fill_buffer == 0 )
2227                 { /* Don't try to fill the buffer, so this is an EOF. */
2228                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2229                         {
2230                         /* We matched a single character, the EOB, so
2231                          * treat this as a final EOF.
2232                          */
2233                         return EOB_ACT_END_OF_FILE;
2234                         }
2235
2236                 else
2237                         {
2238                         /* We matched some text prior to the EOB, first
2239                          * process it.
2240                          */
2241                         return EOB_ACT_LAST_MATCH;
2242                         }
2243                 }
2244
2245         /* Try to read more data. */
2246
2247         /* First move last chars to start of buffer. */
2248         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2249
2250         for ( i = 0; i < number_to_move; ++i )
2251                 *(dest++) = *(source++);
2252
2253         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2254                 /* don't do the read, it's not guaranteed to return an EOF,
2255                  * just force an EOF
2256                  */
2257                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2258
2259         else
2260                 {
2261                 int num_to_read =
2262                         yy_current_buffer->yy_buf_size - number_to_move - 1;
2263
2264                 while ( num_to_read <= 0 )
2265                         { /* Not enough room in the buffer - grow it. */
2266 #ifdef YY_USES_REJECT
2267                         YY_FATAL_ERROR(
2268 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2269 #else
2270
2271                         /* just a shorter name for the current buffer */
2272                         YY_BUFFER_STATE b = yy_current_buffer;
2273
2274                         int yy_c_buf_p_offset =
2275                                 (int) (yy_c_buf_p - b->yy_ch_buf);
2276
2277                         if ( b->yy_is_our_buffer )
2278                                 {
2279                                 int new_size = b->yy_buf_size * 2;
2280
2281                                 if ( new_size <= 0 )
2282                                         b->yy_buf_size += b->yy_buf_size / 8;
2283                                 else
2284                                         b->yy_buf_size *= 2;
2285
2286                                 b->yy_ch_buf = (char *)
2287                                         /* Include room in for 2 EOB chars. */
2288                                         yy_flex_realloc( (void *) b->yy_ch_buf,
2289                                                          b->yy_buf_size + 2 );
2290                                 }
2291                         else
2292                                 /* Can't grow it, we don't own it. */
2293                                 b->yy_ch_buf = 0;
2294
2295                         if ( ! b->yy_ch_buf )
2296                                 YY_FATAL_ERROR(
2297                                 "fatal error - scanner input buffer overflow" );
2298
2299                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2300
2301                         num_to_read = yy_current_buffer->yy_buf_size -
2302                                                 number_to_move - 1;
2303 #endif
2304                         }
2305
2306                 if ( num_to_read > YY_READ_BUF_SIZE )
2307                         num_to_read = YY_READ_BUF_SIZE;
2308
2309                 /* Read in more data. */
2310                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2311                         yy_n_chars, num_to_read );
2312
2313                 yy_current_buffer->yy_n_chars = yy_n_chars;
2314                 }
2315
2316         if ( yy_n_chars == 0 )
2317                 {
2318                 if ( number_to_move == YY_MORE_ADJ )
2319                         {
2320                         ret_val = EOB_ACT_END_OF_FILE;
2321                         yyrestart( yyin );
2322                         }
2323
2324                 else
2325                         {
2326                         ret_val = EOB_ACT_LAST_MATCH;
2327                         yy_current_buffer->yy_buffer_status =
2328                                 YY_BUFFER_EOF_PENDING;
2329                         }
2330                 }
2331
2332         else
2333                 ret_val = EOB_ACT_CONTINUE_SCAN;
2334
2335         yy_n_chars += number_to_move;
2336         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2337         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2338
2339         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2340
2341         return ret_val;
2342         }
2343
2344
2345 /* yy_get_previous_state - get the state just before the EOB char was reached */
2346
2347 static yy_state_type yy_get_previous_state()
2348         {
2349         register yy_state_type yy_current_state;
2350         register char *yy_cp;
2351
2352         yy_current_state = yy_start;
2353         yy_current_state += YY_AT_BOL();
2354         yy_state_ptr = yy_state_buf;
2355         *yy_state_ptr++ = yy_current_state;
2356
2357         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2358                 {
2359                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2360                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2361                         {
2362                         yy_current_state = (int) yy_def[yy_current_state];
2363                         if ( yy_current_state >= 471 )
2364                                 yy_c = yy_meta[(unsigned int) yy_c];
2365                         }
2366                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2367                 *yy_state_ptr++ = yy_current_state;
2368                 }
2369
2370         return yy_current_state;
2371         }
2372
2373
2374 /* yy_try_NUL_trans - try to make a transition on the NUL character
2375  *
2376  * synopsis
2377  *      next_state = yy_try_NUL_trans( current_state );
2378  */
2379
2380 #ifdef YY_USE_PROTOS
2381 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2382 #else
2383 static yy_state_type yy_try_NUL_trans( yy_current_state )
2384 yy_state_type yy_current_state;
2385 #endif
2386         {
2387         register int yy_is_jam;
2388
2389         register YY_CHAR yy_c = 1;
2390         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2391                 {
2392                 yy_current_state = (int) yy_def[yy_current_state];
2393                 if ( yy_current_state >= 471 )
2394                         yy_c = yy_meta[(unsigned int) yy_c];
2395                 }
2396         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2397         yy_is_jam = (yy_current_state == 470);
2398         if ( ! yy_is_jam )
2399                 *yy_state_ptr++ = yy_current_state;
2400
2401         return yy_is_jam ? 0 : yy_current_state;
2402         }
2403
2404
2405 #ifndef YY_NO_UNPUT
2406 #ifdef YY_USE_PROTOS
2407 static void yyunput( int c, register char *yy_bp )
2408 #else
2409 static void yyunput( c, yy_bp )
2410 int c;
2411 register char *yy_bp;
2412 #endif
2413         {
2414         register char *yy_cp = yy_c_buf_p;
2415
2416         /* undo effects of setting up yytext */
2417         *yy_cp = yy_hold_char;
2418
2419         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2420                 { /* need to shift things up to make room */
2421                 /* +2 for EOB chars. */
2422                 register int number_to_move = yy_n_chars + 2;
2423                 register char *dest = &yy_current_buffer->yy_ch_buf[
2424                                         yy_current_buffer->yy_buf_size + 2];
2425                 register char *source =
2426                                 &yy_current_buffer->yy_ch_buf[number_to_move];
2427
2428                 while ( source > yy_current_buffer->yy_ch_buf )
2429                         *--dest = *--source;
2430
2431                 yy_cp += (int) (dest - source);
2432                 yy_bp += (int) (dest - source);
2433                 yy_current_buffer->yy_n_chars =
2434                         yy_n_chars = yy_current_buffer->yy_buf_size;
2435
2436                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2437                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
2438                 }
2439
2440         *--yy_cp = (char) c;
2441
2442
2443         yytext_ptr = yy_bp;
2444         yy_hold_char = *yy_cp;
2445         yy_c_buf_p = yy_cp;
2446         }
2447 #endif  /* ifndef YY_NO_UNPUT */
2448
2449
2450 #ifdef __cplusplus
2451 static int yyinput()
2452 #else
2453 static int input()
2454 #endif
2455         {
2456         int c;
2457
2458         *yy_c_buf_p = yy_hold_char;
2459
2460         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2461                 {
2462                 /* yy_c_buf_p now points to the character we want to return.
2463                  * If this occurs *before* the EOB characters, then it's a
2464                  * valid NUL; if not, then we've hit the end of the buffer.
2465                  */
2466                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2467                         /* This was really a NUL. */
2468                         *yy_c_buf_p = '\0';
2469
2470                 else
2471                         { /* need more input */
2472                         int offset = yy_c_buf_p - yytext_ptr;
2473                         ++yy_c_buf_p;
2474
2475                         switch ( yy_get_next_buffer() )
2476                                 {
2477                                 case EOB_ACT_LAST_MATCH:
2478                                         /* This happens because yy_g_n_b()
2479                                          * sees that we've accumulated a
2480                                          * token and flags that we need to
2481                                          * try matching the token before
2482                                          * proceeding.  But for input(),
2483                                          * there's no matching to consider.
2484                                          * So convert the EOB_ACT_LAST_MATCH
2485                                          * to EOB_ACT_END_OF_FILE.
2486                                          */
2487
2488                                         /* Reset buffer status. */
2489                                         yyrestart( yyin );
2490
2491                                         /* fall through */
2492
2493                                 case EOB_ACT_END_OF_FILE:
2494                                         {
2495                                         if ( yywrap() )
2496                                                 return EOF;
2497
2498                                         if ( ! yy_did_buffer_switch_on_eof )
2499                                                 YY_NEW_FILE;
2500 #ifdef __cplusplus
2501                                         return yyinput();
2502 #else
2503                                         return input();
2504 #endif
2505                                         }
2506
2507                                 case EOB_ACT_CONTINUE_SCAN:
2508                                         yy_c_buf_p = yytext_ptr + offset;
2509                                         break;
2510                                 }
2511                         }
2512                 }
2513
2514         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
2515         *yy_c_buf_p = '\0';     /* preserve yytext */
2516         yy_hold_char = *++yy_c_buf_p;
2517
2518         yy_current_buffer->yy_at_bol = (c == '\n');
2519
2520         return c;
2521         }
2522
2523
2524 #ifdef YY_USE_PROTOS
2525 void yyrestart( FILE *input_file )
2526 #else
2527 void yyrestart( input_file )
2528 FILE *input_file;
2529 #endif
2530         {
2531         if ( ! yy_current_buffer )
2532                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2533
2534         yy_init_buffer( yy_current_buffer, input_file );
2535         yy_load_buffer_state();
2536         }
2537
2538
2539 #ifdef YY_USE_PROTOS
2540 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2541 #else
2542 void yy_switch_to_buffer( new_buffer )
2543 YY_BUFFER_STATE new_buffer;
2544 #endif
2545         {
2546         if ( yy_current_buffer == new_buffer )
2547                 return;
2548
2549         if ( yy_current_buffer )
2550                 {
2551                 /* Flush out information for old buffer. */
2552                 *yy_c_buf_p = yy_hold_char;
2553                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2554                 yy_current_buffer->yy_n_chars = yy_n_chars;
2555                 }
2556
2557         yy_current_buffer = new_buffer;
2558         yy_load_buffer_state();
2559
2560         /* We don't actually know whether we did this switch during
2561          * EOF (yywrap()) processing, but the only time this flag
2562          * is looked at is after yywrap() is called, so it's safe
2563          * to go ahead and always set it.
2564          */
2565         yy_did_buffer_switch_on_eof = 1;
2566         }
2567
2568
2569 #ifdef YY_USE_PROTOS
2570 void yy_load_buffer_state( void )
2571 #else
2572 void yy_load_buffer_state()
2573 #endif
2574         {
2575         yy_n_chars = yy_current_buffer->yy_n_chars;
2576         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2577         yyin = yy_current_buffer->yy_input_file;
2578         yy_hold_char = *yy_c_buf_p;
2579         }
2580
2581
2582 #ifdef YY_USE_PROTOS
2583 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2584 #else
2585 YY_BUFFER_STATE yy_create_buffer( file, size )
2586 FILE *file;
2587 int size;
2588 #endif
2589         {
2590         YY_BUFFER_STATE b;
2591
2592         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2593         if ( ! b )
2594                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2595
2596         b->yy_buf_size = size;
2597
2598         /* yy_ch_buf has to be 2 characters longer than the size given because
2599          * we need to put in 2 end-of-buffer characters.
2600          */
2601         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2602         if ( ! b->yy_ch_buf )
2603                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2604
2605         b->yy_is_our_buffer = 1;
2606
2607         yy_init_buffer( b, file );
2608
2609         return b;
2610         }
2611
2612
2613 #ifdef YY_USE_PROTOS
2614 void yy_delete_buffer( YY_BUFFER_STATE b )
2615 #else
2616 void yy_delete_buffer( b )
2617 YY_BUFFER_STATE b;
2618 #endif
2619         {
2620         if ( ! b )
2621                 return;
2622
2623         if ( b == yy_current_buffer )
2624                 yy_current_buffer = (YY_BUFFER_STATE) 0;
2625
2626         if ( b->yy_is_our_buffer )
2627                 yy_flex_free( (void *) b->yy_ch_buf );
2628
2629         yy_flex_free( (void *) b );
2630         }
2631
2632
2633 #ifndef YY_ALWAYS_INTERACTIVE
2634 #ifndef YY_NEVER_INTERACTIVE
2635 extern int isatty YY_PROTO(( int ));
2636 #endif
2637 #endif
2638
2639 #ifdef YY_USE_PROTOS
2640 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2641 #else
2642 void yy_init_buffer( b, file )
2643 YY_BUFFER_STATE b;
2644 FILE *file;
2645 #endif
2646
2647
2648         {
2649         yy_flush_buffer( b );
2650
2651         b->yy_input_file = file;
2652         b->yy_fill_buffer = 1;
2653
2654 #if YY_ALWAYS_INTERACTIVE
2655         b->yy_is_interactive = 1;
2656 #else
2657 #if YY_NEVER_INTERACTIVE
2658         b->yy_is_interactive = 0;
2659 #else
2660         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2661 #endif
2662 #endif
2663         }
2664
2665
2666 #ifdef YY_USE_PROTOS
2667 void yy_flush_buffer( YY_BUFFER_STATE b )
2668 #else
2669 void yy_flush_buffer( b )
2670 YY_BUFFER_STATE b;
2671 #endif
2672
2673         {
2674         if ( ! b )
2675                 return;
2676
2677         b->yy_n_chars = 0;
2678
2679         /* We always need two end-of-buffer characters.  The first causes
2680          * a transition to the end-of-buffer state.  The second causes
2681          * a jam in that state.
2682          */
2683         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2684         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2685
2686         b->yy_buf_pos = &b->yy_ch_buf[0];
2687
2688         b->yy_at_bol = 1;
2689         b->yy_buffer_status = YY_BUFFER_NEW;
2690
2691         if ( b == yy_current_buffer )
2692                 yy_load_buffer_state();
2693         }
2694
2695
2696 #ifndef YY_NO_SCAN_BUFFER
2697 #ifdef YY_USE_PROTOS
2698 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2699 #else
2700 YY_BUFFER_STATE yy_scan_buffer( base, size )
2701 char *base;
2702 yy_size_t size;
2703 #endif
2704         {
2705         YY_BUFFER_STATE b;
2706
2707         if ( size < 2 ||
2708              base[size-2] != YY_END_OF_BUFFER_CHAR ||
2709              base[size-1] != YY_END_OF_BUFFER_CHAR )
2710                 /* They forgot to leave room for the EOB's. */
2711                 return 0;
2712
2713         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2714         if ( ! b )
2715                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2716
2717         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
2718         b->yy_buf_pos = b->yy_ch_buf = base;
2719         b->yy_is_our_buffer = 0;
2720         b->yy_input_file = 0;
2721         b->yy_n_chars = b->yy_buf_size;
2722         b->yy_is_interactive = 0;
2723         b->yy_at_bol = 1;
2724         b->yy_fill_buffer = 0;
2725         b->yy_buffer_status = YY_BUFFER_NEW;
2726
2727         yy_switch_to_buffer( b );
2728
2729         return b;
2730         }
2731 #endif
2732
2733
2734 #ifndef YY_NO_SCAN_STRING
2735 #ifdef YY_USE_PROTOS
2736 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2737 #else
2738 YY_BUFFER_STATE yy_scan_string( yy_str )
2739 yyconst char *yy_str;
2740 #endif
2741         {
2742         int len;
2743         for ( len = 0; yy_str[len]; ++len )
2744                 ;
2745
2746         return yy_scan_bytes( yy_str, len );
2747         }
2748 #endif
2749
2750
2751 #ifndef YY_NO_SCAN_BYTES
2752 #ifdef YY_USE_PROTOS
2753 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2754 #else
2755 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2756 yyconst char *bytes;
2757 int len;
2758 #endif
2759         {
2760         YY_BUFFER_STATE b;
2761         char *buf;
2762         yy_size_t n;
2763         int i;
2764
2765         /* Get memory for full buffer, including space for trailing EOB's. */
2766         n = len + 2;
2767         buf = (char *) yy_flex_alloc( n );
2768         if ( ! buf )
2769                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2770
2771         for ( i = 0; i < len; ++i )
2772                 buf[i] = bytes[i];
2773
2774         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2775
2776         b = yy_scan_buffer( buf, n );
2777         if ( ! b )
2778                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2779
2780         /* It's okay to grow etc. this buffer, and we should throw it
2781          * away when we're done.
2782          */
2783         b->yy_is_our_buffer = 1;
2784
2785         return b;
2786         }
2787 #endif
2788
2789
2790 #ifndef YY_NO_PUSH_STATE
2791 #ifdef YY_USE_PROTOS
2792 static void yy_push_state( int new_state )
2793 #else
2794 static void yy_push_state( new_state )
2795 int new_state;
2796 #endif
2797         {
2798         if ( yy_start_stack_ptr >= yy_start_stack_depth )
2799                 {
2800                 yy_size_t new_size;
2801
2802                 yy_start_stack_depth += YY_START_STACK_INCR;
2803                 new_size = yy_start_stack_depth * sizeof( int );
2804
2805                 if ( ! yy_start_stack )
2806                         yy_start_stack = (int *) yy_flex_alloc( new_size );
2807
2808                 else
2809                         yy_start_stack = (int *) yy_flex_realloc(
2810                                         (void *) yy_start_stack, new_size );
2811
2812                 if ( ! yy_start_stack )
2813                         YY_FATAL_ERROR(
2814                         "out of memory expanding start-condition stack" );
2815                 }
2816
2817         yy_start_stack[yy_start_stack_ptr++] = YY_START;
2818
2819         BEGIN(new_state);
2820         }
2821 #endif
2822
2823
2824 #ifndef YY_NO_POP_STATE
2825 static void yy_pop_state()
2826         {
2827         if ( --yy_start_stack_ptr < 0 )
2828                 YY_FATAL_ERROR( "start-condition stack underflow" );
2829
2830         BEGIN(yy_start_stack[yy_start_stack_ptr]);
2831         }
2832 #endif
2833
2834
2835 #ifndef YY_NO_TOP_STATE
2836 static int yy_top_state()
2837         {
2838         return yy_start_stack[yy_start_stack_ptr - 1];
2839         }
2840 #endif
2841
2842 #ifndef YY_EXIT_FAILURE
2843 #define YY_EXIT_FAILURE 2
2844 #endif
2845
2846 #ifdef YY_USE_PROTOS
2847 static void yy_fatal_error( yyconst char msg[] )
2848 #else
2849 static void yy_fatal_error( msg )
2850 char msg[];
2851 #endif
2852         {
2853         (void) fprintf( stderr, "%s\n", msg );
2854         exit( YY_EXIT_FAILURE );
2855         }
2856
2857
2858
2859 /* Redefine yyless() so it works in section 3 code. */
2860
2861 #undef yyless
2862 #define yyless(n) \
2863         do \
2864                 { \
2865                 /* Undo effects of setting up yytext. */ \
2866                 yytext[yyleng] = yy_hold_char; \
2867                 yy_c_buf_p = yytext + n; \
2868                 yy_hold_char = *yy_c_buf_p; \
2869                 *yy_c_buf_p = '\0'; \
2870                 yyleng = n; \
2871                 } \
2872         while ( 0 )
2873
2874
2875 /* Internal utility routines. */
2876
2877 #ifndef yytext_ptr
2878 #ifdef YY_USE_PROTOS
2879 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2880 #else
2881 static void yy_flex_strncpy( s1, s2, n )
2882 char *s1;
2883 yyconst char *s2;
2884 int n;
2885 #endif
2886         {
2887         register int i;
2888         for ( i = 0; i < n; ++i )
2889                 s1[i] = s2[i];
2890         }
2891 #endif
2892
2893 #ifdef YY_NEED_STRLEN
2894 #ifdef YY_USE_PROTOS
2895 static int yy_flex_strlen( yyconst char *s )
2896 #else
2897 static int yy_flex_strlen( s )
2898 yyconst char *s;
2899 #endif
2900         {
2901         register int n;
2902         for ( n = 0; s[n]; ++n )
2903                 ;
2904
2905         return n;
2906         }
2907 #endif
2908
2909
2910 #ifdef YY_USE_PROTOS
2911 static void *yy_flex_alloc( yy_size_t size )
2912 #else
2913 static void *yy_flex_alloc( size )
2914 yy_size_t size;
2915 #endif
2916         {
2917         return (void *) malloc( size );
2918         }
2919
2920 #ifdef YY_USE_PROTOS
2921 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2922 #else
2923 static void *yy_flex_realloc( ptr, size )
2924 void *ptr;
2925 yy_size_t size;
2926 #endif
2927         {
2928         /* The cast to (char *) in the following accommodates both
2929          * implementations that use char* generic pointers, and those
2930          * that use void* generic pointers.  It works with the latter
2931          * because both ANSI C and C++ allow castless assignment from
2932          * any pointer type to void*, and deal with argument conversions
2933          * as though doing an assignment.
2934          */
2935         return (void *) realloc( (char *) ptr, size );
2936         }
2937
2938 #ifdef YY_USE_PROTOS
2939 static void yy_flex_free( void *ptr )
2940 #else
2941 static void yy_flex_free( ptr )
2942 void *ptr;
2943 #endif
2944         {
2945         free( ptr );
2946         }
2947
2948 #if YY_MAIN
2949 int main()
2950         {
2951         yylex();
2952         return 0;
2953         }
2954 #endif
2955 #line 539 "lexer.l"
2956
2957
2958 /* Ugly warning avoiding */
2959 #ifdef FLEX_SCANNER
2960 static void warning_avoider(void) G_GNUC_UNUSED;
2961 static void warning_avoider(void) {
2962         yy_flex_realloc(NULL, 0);
2963         yyunput(0, NULL);
2964         warning_avoider();
2965 }
2966 #endif
2967