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