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