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