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