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