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