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