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