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