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