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