Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mv gs/ DataDesc/
[simgrid.git] / src / gras / DataDesc / parse.yy.c
1 #define yy_create_buffer gs_parse__create_buffer
2 #define yy_delete_buffer gs_parse__delete_buffer
3 #define yy_scan_buffer gs_parse__scan_buffer
4 #define yy_scan_string gs_parse__scan_string
5 #define yy_scan_bytes gs_parse__scan_bytes
6 #define yy_flex_debug gs_parse__flex_debug
7 #define yy_init_buffer gs_parse__init_buffer
8 #define yy_flush_buffer gs_parse__flush_buffer
9 #define yy_load_buffer_state gs_parse__load_buffer_state
10 #define yy_switch_to_buffer gs_parse__switch_to_buffer
11 #define yyin gs_parse_in
12 #define yyleng gs_parse_leng
13 #define yylex gs_parse_lex
14 #define yyout gs_parse_out
15 #define yyrestart gs_parse_restart
16 #define yytext gs_parse_text
17
18 #line 19 "gs/parse.yy.c"
19 /* A lexical scanner generated by flex */
20
21 /* Scanner skeleton version:
22  * 
23  */
24
25 #define FLEX_SCANNER
26 #define YY_FLEX_MAJOR_VERSION 2
27 #define YY_FLEX_MINOR_VERSION 5
28
29 #include <stdio.h>
30 #include <errno.h>
31
32 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
33 #ifdef c_plusplus
34 #ifndef __cplusplus
35 #define __cplusplus
36 #endif
37 #endif
38
39
40 #ifdef __cplusplus
41
42 #include <stdlib.h>
43 #ifndef _WIN32
44 #include <unistd.h>
45 #endif
46
47 /* Use prototypes in function declarations. */
48 #define YY_USE_PROTOS
49
50 /* The "const" storage-class-modifier is valid. */
51 #define YY_USE_CONST
52
53 #else   /* ! __cplusplus */
54
55 #if __STDC__
56
57 #define YY_USE_PROTOS
58 #define YY_USE_CONST
59
60 #endif  /* __STDC__ */
61 #endif  /* ! __cplusplus */
62
63 #ifdef __TURBOC__
64  #pragma warn -rch
65  #pragma warn -use
66 #include <io.h>
67 #include <stdlib.h>
68 #define YY_USE_CONST
69 #define YY_USE_PROTOS
70 #endif
71
72 #ifdef YY_USE_CONST
73 #define yyconst const
74 #else
75 #define yyconst
76 #endif
77
78
79 #ifdef YY_USE_PROTOS
80 #define YY_PROTO(proto) proto
81 #else
82 #define YY_PROTO(proto) ()
83 #endif
84
85
86 /* Returned upon end-of-file. */
87 #define YY_NULL 0
88
89 /* Promotes a possibly negative, possibly signed char to an unsigned
90  * integer for use as an array index.  If the signed char is negative,
91  * we want to instead treat it as an 8-bit unsigned char, hence the
92  * double cast.
93  */
94 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
95
96 /* Enter a start condition.  This macro really ought to take a parameter,
97  * but we do it the disgusting crufty way forced on us by the ()-less
98  * definition of BEGIN.
99  */
100 #define BEGIN yy_start = 1 + 2 *
101
102 /* Translate the current start state into a value that can be later handed
103  * to BEGIN to return to the state.  The YYSTATE alias is for lex
104  * compatibility.
105  */
106 #define YY_START ((yy_start - 1) / 2)
107 #define YYSTATE YY_START
108
109 /* Action number for EOF rule of a given start state. */
110 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
111
112 /* Special action meaning "start processing a new file". */
113 #define YY_NEW_FILE yyrestart( yyin )
114
115 #define YY_END_OF_BUFFER_CHAR 0
116
117 /* Size of default input buffer. */
118 #define YY_BUF_SIZE 16384
119
120 typedef struct yy_buffer_state *YY_BUFFER_STATE;
121
122 extern int yyleng;
123 extern FILE *yyin, *yyout;
124
125 #define EOB_ACT_CONTINUE_SCAN 0
126 #define EOB_ACT_END_OF_FILE 1
127 #define EOB_ACT_LAST_MATCH 2
128
129 /* The funky do-while in the following #define is used to turn the definition
130  * int a single C statement (which needs a semi-colon terminator).  This
131  * avoids problems with code like:
132  *
133  *      if ( condition_holds )
134  *              yyless( 5 );
135  *      else
136  *              do_something_else();
137  *
138  * Prior to using the do-while the compiler would get upset at the
139  * "else" because it interpreted the "if" statement as being all
140  * done when it reached the ';' after the yyless() call.
141  */
142
143 /* Return all but the first 'n' matched characters back to the input stream. */
144
145 #define yyless(n) \
146         do \
147                 { \
148                 /* Undo effects of setting up yytext. */ \
149                 *yy_cp = yy_hold_char; \
150                 YY_RESTORE_YY_MORE_OFFSET \
151                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
152                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
153                 } \
154         while ( 0 )
155
156 #define unput(c) yyunput( c, yytext_ptr )
157
158 /* The following is because we cannot portably get our hands on size_t
159  * (without autoconf's help, which isn't available because we want
160  * flex-generated scanners to compile on their own).
161  */
162 typedef unsigned int yy_size_t;
163
164
165 struct yy_buffer_state
166         {
167         FILE *yy_input_file;
168
169         char *yy_ch_buf;                /* input buffer */
170         char *yy_buf_pos;               /* current position in input buffer */
171
172         /* Size of input buffer in bytes, not including room for EOB
173          * characters.
174          */
175         yy_size_t yy_buf_size;
176
177         /* Number of characters read into yy_ch_buf, not including EOB
178          * characters.
179          */
180         int yy_n_chars;
181
182         /* Whether we "own" the buffer - i.e., we know we created it,
183          * and can realloc() it to grow it, and should free() it to
184          * delete it.
185          */
186         int yy_is_our_buffer;
187
188         /* Whether this is an "interactive" input source; if so, and
189          * if we're using stdio for input, then we want to use getc()
190          * instead of fread(), to make sure we stop fetching input after
191          * each newline.
192          */
193         int yy_is_interactive;
194
195         /* Whether we're considered to be at the beginning of a line.
196          * If so, '^' rules will be active on the next match, otherwise
197          * not.
198          */
199         int yy_at_bol;
200
201         /* Whether to try to fill the input buffer when we reach the
202          * end of it.
203          */
204         int yy_fill_buffer;
205
206         int yy_buffer_status;
207 #define YY_BUFFER_NEW 0
208 #define YY_BUFFER_NORMAL 1
209         /* When an EOF's been seen but there's still some text to process
210          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
211          * shouldn't try reading from the input source any more.  We might
212          * still have a bunch of tokens to match, though, because of
213          * possible backing-up.
214          *
215          * When we actually see the EOF, we change the status to "new"
216          * (via yyrestart()), so that the user can continue scanning by
217          * just pointing yyin at a new input file.
218          */
219 #define YY_BUFFER_EOF_PENDING 2
220         };
221
222 static YY_BUFFER_STATE yy_current_buffer = 0;
223
224 /* We provide macros for accessing buffer states in case in the
225  * future we want to put the buffer states in a more general
226  * "scanner state".
227  */
228 #define YY_CURRENT_BUFFER yy_current_buffer
229
230
231 /* yy_hold_char holds the character lost when yytext is formed. */
232 static char yy_hold_char;
233
234 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
235
236
237 int yyleng;
238
239 /* Points to current character in buffer. */
240 static char *yy_c_buf_p = (char *) 0;
241 static int yy_init = 1;         /* whether we need to initialize */
242 static int yy_start = 0;        /* start state number */
243
244 /* Flag which is used to allow yywrap()'s to do buffer switches
245  * instead of setting up a fresh yyin.  A bit of a hack ...
246  */
247 static int yy_did_buffer_switch_on_eof;
248
249 void yyrestart YY_PROTO(( FILE *input_file ));
250
251 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
252 void yy_load_buffer_state YY_PROTO(( void ));
253 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
254 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
255 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
256 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
257 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
258
259 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
260 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
261 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
262
263 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
264 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
265 static void yy_flex_free YY_PROTO(( void * ));
266
267 #define yy_new_buffer yy_create_buffer
268
269 #define yy_set_interactive(is_interactive) \
270         { \
271         if ( ! yy_current_buffer ) \
272                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
273         yy_current_buffer->yy_is_interactive = is_interactive; \
274         }
275
276 #define yy_set_bol(at_bol) \
277         { \
278         if ( ! yy_current_buffer ) \
279                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
280         yy_current_buffer->yy_at_bol = at_bol; \
281         }
282
283 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
284
285
286 #define yywrap() 1
287 #define YY_SKIP_YYWRAP
288 typedef unsigned char YY_CHAR;
289 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
290 typedef int yy_state_type;
291 extern char *yytext;
292 #define yytext_ptr yytext
293
294 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
295 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
296 static int yy_get_next_buffer YY_PROTO(( void ));
297 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
298
299 /* Done after the current pattern has been matched and before the
300  * corresponding action - sets up yytext.
301  */
302 #define YY_DO_BEFORE_ACTION \
303         yytext_ptr = yy_bp; \
304         yyleng = (int) (yy_cp - yy_bp); \
305         yy_hold_char = *yy_cp; \
306         *yy_cp = '\0'; \
307         yy_c_buf_p = yy_cp;
308
309 #define YY_NUM_RULES 28
310 #define YY_END_OF_BUFFER 29
311 static yyconst short int yy_accept[51] =
312     {   0,
313        20,   20,    4,    4,    0,    0,    0,    0,   29,   27,
314        26,    8,   23,   25,   20,   27,   24,   21,   22,    4,
315         6,    5,   28,   28,   19,   10,    9,   28,   20,    2,
316         1,    4,    5,    5,    7,    3,   19,   18,   11,   12,
317        16,   17,   13,   15,   14,    1,   11,   12,   11,    0
318     } ;
319
320 static yyconst int yy_ec[256] =
321     {   0,
322         1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
323         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
324         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
325         1,    1,    1,    3,    1,    1,    1,    1,    1,    1,
326         1,    4,    1,    5,    6,    6,    7,    8,    8,    8,
327         8,    8,    8,    8,    8,    9,    9,    1,   10,    1,
328         1,    1,    1,    1,    6,    6,    6,    6,    6,    6,
329         6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
330         6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
331         1,   11,    1,    1,    6,    1,    6,   12,    6,    6,
332
333         6,   13,    6,    6,    6,    6,    6,    6,    6,   14,
334         6,    6,    6,   15,    6,   16,    6,    6,    6,    6,
335         6,    6,   17,    1,   18,    1,    1,    1,    1,    1,
336         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
337         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
338         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
339         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
340         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
341         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
342         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
343
344         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
345         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
346         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
347         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
348         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
349         1,    1,    1,    1,    1
350     } ;
351
352 static yyconst int yy_meta[19] =
353     {   0,
354         1,    2,    3,    4,    1,    5,    1,    5,    5,    1,
355         3,    5,    5,    5,    5,    5,    1,    1
356     } ;
357
358 static yyconst short int yy_base[59] =
359     {   0,
360         0,    0,   17,   18,   81,   78,   21,   31,   83,  102,
361       102,  102,  102,  102,    0,   21,  102,  102,  102,    0,
362       102,   22,  102,   37,    0,  102,  102,   42,    0,  102,
363         0,    0,   23,   31,  102,  102,    0,  102,   28,   31,
364       102,  102,  102,  102,  102,    0,   53,   55,   57,  102,
365        66,   71,   76,   26,   81,   86,   91,   96
366     } ;
367
368 static yyconst short int yy_def[59] =
369     {   0,
370        50,    1,   51,   51,   52,   52,   53,   53,   50,   50,
371        50,   50,   50,   50,   54,   50,   50,   50,   50,   55,
372        50,   56,   50,   50,   57,   50,   50,   50,   54,   50,
373        58,   55,   56,   56,   50,   50,   57,   50,   50,   50,
374        50,   50,   50,   50,   50,   58,   50,   50,   50,    0,
375        50,   50,   50,   50,   50,   50,   50,   50
376     } ;
377
378 static yyconst short int yy_nxt[121] =
379     {   0,
380        10,   11,   12,   13,   14,   15,   16,   15,   15,   17,
381        10,   15,   15,   15,   15,   15,   18,   19,   21,   21,
382        22,   22,   26,   27,   30,   34,   50,   31,   35,   50,
383        29,   28,   26,   27,   34,   47,   48,   35,   48,   48,
384        36,   28,   38,   38,   38,   38,   38,   38,   38,   39,
385        40,   38,   38,   41,   42,   43,   44,   45,   38,   38,
386        49,   48,   48,   48,   48,   48,   20,   20,   20,   20,
387        20,   23,   23,   23,   23,   23,   25,   25,   25,   25,
388        25,   32,   50,   32,   24,   32,   33,   24,   33,   33,
389        33,   37,   50,   50,   37,   37,   46,   50,   46,   46,
390
391        46,    9,   50,   50,   50,   50,   50,   50,   50,   50,
392        50,   50,   50,   50,   50,   50,   50,   50,   50,   50
393     } ;
394
395 static yyconst short int yy_chk[121] =
396     {   0,
397         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
398         1,    1,    1,    1,    1,    1,    1,    1,    3,    4,
399         3,    4,    7,    7,   16,   22,   33,   16,   22,   33,
400        54,    7,    8,    8,   34,   39,   39,   34,   40,   40,
401        24,    8,   28,   28,   28,   28,   28,   28,   28,   28,
402        28,   28,   28,   28,   28,   28,   28,   28,   28,   28,
403        47,   47,   48,   48,   49,   49,   51,   51,   51,   51,
404        51,   52,   52,   52,   52,   52,   53,   53,   53,   53,
405        53,   55,    9,   55,    6,   55,   56,    5,   56,   56,
406        56,   57,    0,    0,   57,   57,   58,    0,   58,   58,
407
408        58,   50,   50,   50,   50,   50,   50,   50,   50,   50,
409        50,   50,   50,   50,   50,   50,   50,   50,   50,   50
410     } ;
411
412 static yy_state_type yy_last_accepting_state;
413 static char *yy_last_accepting_cpos;
414
415 /* The intent behind this definition is that it'll catch
416  * any uses of REJECT which flex missed.
417  */
418 #define REJECT reject_used_but_not_detected
419 #define yymore() yymore_used_but_not_detected
420 #define YY_MORE_ADJ 0
421 #define YY_RESTORE_YY_MORE_OFFSET
422 char *yytext;
423 #line 1 "gs/parse.yy.l"
424 #define INITIAL 0
425 /**** MSG_LICENCE DO NOT REMOVE ****/
426 #line 5 "gs/parse.yy.l"
427 #include"gs/gs_private.h"
428 #include"gs/parse.yy.h"
429 #include <string.h>
430   YY_BUFFER_STATE input_buffer;
431   FILE *file_to_parse;
432
433   int gs_parse_line_pos = 1;
434   int gs_parse_char_pos = 0;
435   int gs_parse_tok_num = 0;
436 #define comment 1
437 #define foo 2
438 #define str 3
439
440 #line 441 "gs/parse.yy.c"
441
442 /* Macros after this point can all be overridden by user definitions in
443  * section 1.
444  */
445
446 #ifndef YY_SKIP_YYWRAP
447 #ifdef __cplusplus
448 extern "C" int yywrap YY_PROTO(( void ));
449 #else
450 extern int yywrap YY_PROTO(( void ));
451 #endif
452 #endif
453
454 #ifndef YY_NO_UNPUT
455 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
456 #endif
457
458 #ifndef yytext_ptr
459 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
460 #endif
461
462 #ifdef YY_NEED_STRLEN
463 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
464 #endif
465
466 #ifndef YY_NO_INPUT
467 #ifdef __cplusplus
468 static int yyinput YY_PROTO(( void ));
469 #else
470 static int input YY_PROTO(( void ));
471 #endif
472 #endif
473
474 #if YY_STACK_USED
475 static int yy_start_stack_ptr = 0;
476 static int yy_start_stack_depth = 0;
477 static int *yy_start_stack = 0;
478 #ifndef YY_NO_PUSH_STATE
479 static void yy_push_state YY_PROTO(( int new_state ));
480 #endif
481 #ifndef YY_NO_POP_STATE
482 static void yy_pop_state YY_PROTO(( void ));
483 #endif
484 #ifndef YY_NO_TOP_STATE
485 static int yy_top_state YY_PROTO(( void ));
486 #endif
487
488 #else
489 #define YY_NO_PUSH_STATE 1
490 #define YY_NO_POP_STATE 1
491 #define YY_NO_TOP_STATE 1
492 #endif
493
494 #ifdef YY_MALLOC_DECL
495 YY_MALLOC_DECL
496 #else
497 #if __STDC__
498 #ifndef __cplusplus
499 #include <stdlib.h>
500 #endif
501 #else
502 /* Just try to get by without declaring the routines.  This will fail
503  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
504  * or sizeof(void*) != sizeof(int).
505  */
506 #endif
507 #endif
508
509 /* Amount of stuff to slurp up with each read. */
510 #ifndef YY_READ_BUF_SIZE
511 #define YY_READ_BUF_SIZE 8192
512 #endif
513
514 /* Copy whatever the last rule matched to the standard output. */
515
516 #ifndef ECHO
517 /* This used to be an fputs(), but since the string might contain NUL's,
518  * we now use fwrite().
519  */
520 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
521 #endif
522
523 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
524  * is returned in "result".
525  */
526 #ifndef YY_INPUT
527 #define YY_INPUT(buf,result,max_size) \
528         if ( yy_current_buffer->yy_is_interactive ) \
529                 { \
530                 int c = '*', n; \
531                 for ( n = 0; n < max_size && \
532                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
533                         buf[n] = (char) c; \
534                 if ( c == '\n' ) \
535                         buf[n++] = (char) c; \
536                 if ( c == EOF && ferror( yyin ) ) \
537                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
538                 result = n; \
539                 } \
540         else \
541                 { \
542                 errno=0; \
543                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
544                         { \
545                         if( errno != EINTR) \
546                                 { \
547                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
548                                 break; \
549                                 } \
550                         errno=0; \
551                         clearerr(yyin); \
552                         } \
553                 }
554 #endif
555
556 /* No semi-colon after return; correct usage is to write "yyterminate();" -
557  * we don't want an extra ';' after the "return" because that will cause
558  * some compilers to complain about unreachable statements.
559  */
560 #ifndef yyterminate
561 #define yyterminate() return YY_NULL
562 #endif
563
564 /* Number of entries by which start-condition stack grows. */
565 #ifndef YY_START_STACK_INCR
566 #define YY_START_STACK_INCR 25
567 #endif
568
569 /* Report a fatal error. */
570 #ifndef YY_FATAL_ERROR
571 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
572 #endif
573
574 /* Default declaration of generated scanner - a define so the user can
575  * easily add parameters.
576  */
577 #ifndef YY_DECL
578 #define YY_DECL int yylex YY_PROTO(( void ))
579 #endif
580
581 /* Code executed at the beginning of each rule, after yytext and yyleng
582  * have been set up.
583  */
584 #ifndef YY_USER_ACTION
585 #define YY_USER_ACTION
586 #endif
587
588 /* Code executed at the end of each rule. */
589 #ifndef YY_BREAK
590 #define YY_BREAK break;
591 #endif
592
593 #define YY_RULE_SETUP \
594         YY_USER_ACTION
595
596 YY_DECL
597         {
598         register yy_state_type yy_current_state;
599         register char *yy_cp, *yy_bp;
600         register int yy_act;
601
602 #line 21 "gs/parse.yy.l"
603
604         int comment_caller=0;
605
606         char string_buf[GS_PARSE_MAX_STR_CONST];
607         char *string_buf_ptr = NULL;
608
609 #line 610 "gs/parse.yy.c"
610
611         if ( yy_init )
612                 {
613                 yy_init = 0;
614
615 #ifdef YY_USER_INIT
616                 YY_USER_INIT;
617 #endif
618
619                 if ( ! yy_start )
620                         yy_start = 1;   /* first start state */
621
622                 if ( ! yyin )
623                         yyin = stdin;
624
625                 if ( ! yyout )
626                         yyout = stdout;
627
628                 if ( ! yy_current_buffer )
629                         yy_current_buffer =
630                                 yy_create_buffer( yyin, YY_BUF_SIZE );
631
632                 yy_load_buffer_state();
633                 }
634
635         while ( 1 )             /* loops until end-of-file is reached */
636                 {
637                 yy_cp = yy_c_buf_p;
638
639                 /* Support of yytext. */
640                 *yy_cp = yy_hold_char;
641
642                 /* yy_bp points to the position in yy_ch_buf of the start of
643                  * the current run.
644                  */
645                 yy_bp = yy_cp;
646
647                 yy_current_state = yy_start;
648 yy_match:
649                 do
650                         {
651                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
652                         if ( yy_accept[yy_current_state] )
653                                 {
654                                 yy_last_accepting_state = yy_current_state;
655                                 yy_last_accepting_cpos = yy_cp;
656                                 }
657                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
658                                 {
659                                 yy_current_state = (int) yy_def[yy_current_state];
660                                 if ( yy_current_state >= 51 )
661                                         yy_c = yy_meta[(unsigned int) yy_c];
662                                 }
663                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
664                         ++yy_cp;
665                         }
666                 while ( yy_base[yy_current_state] != 102 );
667
668 yy_find_action:
669                 yy_act = yy_accept[yy_current_state];
670                 if ( yy_act == 0 )
671                         { /* have to back up */
672                         yy_cp = yy_last_accepting_cpos;
673                         yy_current_state = yy_last_accepting_state;
674                         yy_act = yy_accept[yy_current_state];
675                         }
676
677                 YY_DO_BEFORE_ACTION;
678
679
680 do_action:      /* This label is used only to access EOF actions. */
681
682
683                 switch ( yy_act )
684         { /* beginning of action switch */
685                         case 0: /* must back up */
686                         /* undo the effects of YY_DO_BEFORE_ACTION */
687                         *yy_cp = yy_hold_char;
688                         yy_cp = yy_last_accepting_cpos;
689                         yy_current_state = yy_last_accepting_state;
690                         goto yy_find_action;
691
692 case 1:
693 YY_RULE_SETUP
694 #line 27 "gs/parse.yy.l"
695
696         YY_BREAK
697 case 2:
698 YY_RULE_SETUP
699 #line 28 "gs/parse.yy.l"
700 {
701              comment_caller = INITIAL;
702              BEGIN(comment);
703              }
704         YY_BREAK
705 case 3:
706 YY_RULE_SETUP
707 #line 33 "gs/parse.yy.l"
708 {
709              comment_caller = foo;
710              BEGIN(comment);
711              }
712         YY_BREAK
713 case 4:
714 YY_RULE_SETUP
715 #line 38 "gs/parse.yy.l"
716 /* eat anything that's not a '*' */
717         YY_BREAK
718 case 5:
719 YY_RULE_SETUP
720 #line 39 "gs/parse.yy.l"
721 /* eat up '*'s not followed by '/'s */
722         YY_BREAK
723 case 6:
724 YY_RULE_SETUP
725 #line 40 "gs/parse.yy.l"
726 {++gs_parse_line_pos;gs_parse_char_pos=0;}
727         YY_BREAK
728 case 7:
729 YY_RULE_SETUP
730 #line 41 "gs/parse.yy.l"
731 BEGIN(comment_caller);
732         YY_BREAK
733 case 8:
734 YY_RULE_SETUP
735 #line 43 "gs/parse.yy.l"
736 string_buf_ptr = string_buf; gs_parse_char_pos++; BEGIN(str);
737         YY_BREAK
738 case 9:
739 YY_RULE_SETUP
740 #line 45 "gs/parse.yy.l"
741 { /* saw closing quote - all done */
742         BEGIN(INITIAL);
743         *string_buf_ptr = '\0';
744         yytext=string_buf;
745         gs_parse_char_pos++;
746         return GS_PARSE_TOKEN_WORD;
747         /* return string constant token type and
748          * value to parser
749          */
750         }
751         YY_BREAK
752 case 10:
753 YY_RULE_SETUP
754 #line 56 "gs/parse.yy.l"
755 {
756         /* error - unterminated string constant */
757         /* generate error message */
758         }
759         YY_BREAK
760 case 11:
761 YY_RULE_SETUP
762 #line 61 "gs/parse.yy.l"
763 {
764         /* octal escape sequence */
765         int result;
766
767         (void) sscanf( yytext + 1, "%o", &result );
768
769         if ( result > 0xff )
770                 /* error, constant is out-of-bounds */
771
772         *string_buf_ptr++ = result;
773         gs_parse_char_pos++;
774         }
775         YY_BREAK
776 case 12:
777 YY_RULE_SETUP
778 #line 74 "gs/parse.yy.l"
779 {
780         /* generate error - bad escape sequence; something
781          * like '\48' or '\0777777'
782          */
783         }
784         YY_BREAK
785 case 13:
786 YY_RULE_SETUP
787 #line 80 "gs/parse.yy.l"
788 {*string_buf_ptr++ = '\n';      gs_parse_char_pos++;}
789         YY_BREAK
790 case 14:
791 YY_RULE_SETUP
792 #line 81 "gs/parse.yy.l"
793 {*string_buf_ptr++ = '\t';      gs_parse_char_pos++;}
794         YY_BREAK
795 case 15:
796 YY_RULE_SETUP
797 #line 82 "gs/parse.yy.l"
798 {*string_buf_ptr++ = '\r';      gs_parse_char_pos++;}
799         YY_BREAK
800 case 16:
801 YY_RULE_SETUP
802 #line 83 "gs/parse.yy.l"
803 {*string_buf_ptr++ = '\b';      gs_parse_char_pos++;}
804         YY_BREAK
805 case 17:
806 YY_RULE_SETUP
807 #line 84 "gs/parse.yy.l"
808 {*string_buf_ptr++ = '\f';      gs_parse_char_pos++;}
809         YY_BREAK
810 case 18:
811 YY_RULE_SETUP
812 #line 86 "gs/parse.yy.l"
813 {*string_buf_ptr++ = yytext[1];         
814                 if(yytext[1]=='\n') {
815                   ++gs_parse_line_pos;gs_parse_char_pos=0;
816                 } else { gs_parse_char_pos++;}
817                }
818         YY_BREAK
819 case 19:
820 YY_RULE_SETUP
821 #line 92 "gs/parse.yy.l"
822 {
823         char *yptr = yytext;
824
825         while ( *yptr )
826           *string_buf_ptr++ = *yptr++;
827           gs_parse_char_pos++;
828         }
829         YY_BREAK
830 case 20:
831 YY_RULE_SETUP
832 #line 100 "gs/parse.yy.l"
833 { gs_parse_char_pos+= strlen(yytext); return(GS_PARSE_TOKEN_WORD);}
834         YY_BREAK
835 case 21:
836 YY_RULE_SETUP
837 #line 101 "gs/parse.yy.l"
838 { gs_parse_char_pos++; return(GS_PARSE_TOKEN_LP);}
839         YY_BREAK
840 case 22:
841 YY_RULE_SETUP
842 #line 102 "gs/parse.yy.l"
843 { gs_parse_char_pos++;return(GS_PARSE_TOKEN_RP);}
844         YY_BREAK
845 case 23:
846 YY_RULE_SETUP
847 #line 103 "gs/parse.yy.l"
848 { gs_parse_char_pos++;return(GS_PARSE_TOKEN_STAR);}
849         YY_BREAK
850 case 24:
851 YY_RULE_SETUP
852 #line 104 "gs/parse.yy.l"
853 { gs_parse_char_pos++;return(GS_PARSE_TOKEN_SEMI_COLON);}
854         YY_BREAK
855 case 25:
856 YY_RULE_SETUP
857 #line 105 "gs/parse.yy.l"
858 { gs_parse_char_pos++;return(GS_PARSE_TOKEN_COLON);}
859         YY_BREAK
860 case 26:
861 YY_RULE_SETUP
862 #line 106 "gs/parse.yy.l"
863 { gs_parse_line_pos++; gs_parse_char_pos=0;}
864         YY_BREAK
865 case 27:
866 YY_RULE_SETUP
867 #line 107 "gs/parse.yy.l"
868 { gs_parse_char_pos++;}
869         YY_BREAK
870 case 28:
871 YY_RULE_SETUP
872 #line 108 "gs/parse.yy.l"
873 ECHO;
874         YY_BREAK
875 #line 876 "gs/parse.yy.c"
876 case YY_STATE_EOF(INITIAL):
877 case YY_STATE_EOF(comment):
878 case YY_STATE_EOF(foo):
879 case YY_STATE_EOF(str):
880         yyterminate();
881
882         case YY_END_OF_BUFFER:
883                 {
884                 /* Amount of text matched not including the EOB char. */
885                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
886
887                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
888                 *yy_cp = yy_hold_char;
889                 YY_RESTORE_YY_MORE_OFFSET
890
891                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
892                         {
893                         /* We're scanning a new file or input source.  It's
894                          * possible that this happened because the user
895                          * just pointed yyin at a new source and called
896                          * yylex().  If so, then we have to assure
897                          * consistency between yy_current_buffer and our
898                          * globals.  Here is the right place to do so, because
899                          * this is the first action (other than possibly a
900                          * back-up) that will match for the new input source.
901                          */
902                         yy_n_chars = yy_current_buffer->yy_n_chars;
903                         yy_current_buffer->yy_input_file = yyin;
904                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
905                         }
906
907                 /* Note that here we test for yy_c_buf_p "<=" to the position
908                  * of the first EOB in the buffer, since yy_c_buf_p will
909                  * already have been incremented past the NUL character
910                  * (since all states make transitions on EOB to the
911                  * end-of-buffer state).  Contrast this with the test
912                  * in input().
913                  */
914                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
915                         { /* This was really a NUL. */
916                         yy_state_type yy_next_state;
917
918                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
919
920                         yy_current_state = yy_get_previous_state();
921
922                         /* Okay, we're now positioned to make the NUL
923                          * transition.  We couldn't have
924                          * yy_get_previous_state() go ahead and do it
925                          * for us because it doesn't know how to deal
926                          * with the possibility of jamming (and we don't
927                          * want to build jamming into it because then it
928                          * will run more slowly).
929                          */
930
931                         yy_next_state = yy_try_NUL_trans( yy_current_state );
932
933                         yy_bp = yytext_ptr + YY_MORE_ADJ;
934
935                         if ( yy_next_state )
936                                 {
937                                 /* Consume the NUL. */
938                                 yy_cp = ++yy_c_buf_p;
939                                 yy_current_state = yy_next_state;
940                                 goto yy_match;
941                                 }
942
943                         else
944                                 {
945                                 yy_cp = yy_c_buf_p;
946                                 goto yy_find_action;
947                                 }
948                         }
949
950                 else switch ( yy_get_next_buffer() )
951                         {
952                         case EOB_ACT_END_OF_FILE:
953                                 {
954                                 yy_did_buffer_switch_on_eof = 0;
955
956                                 if ( yywrap() )
957                                         {
958                                         /* Note: because we've taken care in
959                                          * yy_get_next_buffer() to have set up
960                                          * yytext, we can now set up
961                                          * yy_c_buf_p so that if some total
962                                          * hoser (like flex itself) wants to
963                                          * call the scanner after we return the
964                                          * YY_NULL, it'll still work - another
965                                          * YY_NULL will get returned.
966                                          */
967                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
968
969                                         yy_act = YY_STATE_EOF(YY_START);
970                                         goto do_action;
971                                         }
972
973                                 else
974                                         {
975                                         if ( ! yy_did_buffer_switch_on_eof )
976                                                 YY_NEW_FILE;
977                                         }
978                                 break;
979                                 }
980
981                         case EOB_ACT_CONTINUE_SCAN:
982                                 yy_c_buf_p =
983                                         yytext_ptr + yy_amount_of_matched_text;
984
985                                 yy_current_state = yy_get_previous_state();
986
987                                 yy_cp = yy_c_buf_p;
988                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
989                                 goto yy_match;
990
991                         case EOB_ACT_LAST_MATCH:
992                                 yy_c_buf_p =
993                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
994
995                                 yy_current_state = yy_get_previous_state();
996
997                                 yy_cp = yy_c_buf_p;
998                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
999                                 goto yy_find_action;
1000                         }
1001                 break;
1002                 }
1003
1004         default:
1005                 YY_FATAL_ERROR(
1006                         "fatal flex scanner internal error--no action found" );
1007         } /* end of action switch */
1008                 } /* end of scanning one token */
1009         } /* end of yylex */
1010
1011
1012 /* yy_get_next_buffer - try to read in a new buffer
1013  *
1014  * Returns a code representing an action:
1015  *      EOB_ACT_LAST_MATCH -
1016  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1017  *      EOB_ACT_END_OF_FILE - end of file
1018  */
1019
1020 static int yy_get_next_buffer()
1021         {
1022         register char *dest = yy_current_buffer->yy_ch_buf;
1023         register char *source = yytext_ptr;
1024         register int number_to_move, i;
1025         int ret_val;
1026
1027         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1028                 YY_FATAL_ERROR(
1029                 "fatal flex scanner internal error--end of buffer missed" );
1030
1031         if ( yy_current_buffer->yy_fill_buffer == 0 )
1032                 { /* Don't try to fill the buffer, so this is an EOF. */
1033                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1034                         {
1035                         /* We matched a single character, the EOB, so
1036                          * treat this as a final EOF.
1037                          */
1038                         return EOB_ACT_END_OF_FILE;
1039                         }
1040
1041                 else
1042                         {
1043                         /* We matched some text prior to the EOB, first
1044                          * process it.
1045                          */
1046                         return EOB_ACT_LAST_MATCH;
1047                         }
1048                 }
1049
1050         /* Try to read more data. */
1051
1052         /* First move last chars to start of buffer. */
1053         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1054
1055         for ( i = 0; i < number_to_move; ++i )
1056                 *(dest++) = *(source++);
1057
1058         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1059                 /* don't do the read, it's not guaranteed to return an EOF,
1060                  * just force an EOF
1061                  */
1062                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1063
1064         else
1065                 {
1066                 int num_to_read =
1067                         yy_current_buffer->yy_buf_size - number_to_move - 1;
1068
1069                 while ( num_to_read <= 0 )
1070                         { /* Not enough room in the buffer - grow it. */
1071 #ifdef YY_USES_REJECT
1072                         YY_FATAL_ERROR(
1073 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1074 #else
1075
1076                         /* just a shorter name for the current buffer */
1077                         YY_BUFFER_STATE b = yy_current_buffer;
1078
1079                         int yy_c_buf_p_offset =
1080                                 (int) (yy_c_buf_p - b->yy_ch_buf);
1081
1082                         if ( b->yy_is_our_buffer )
1083                                 {
1084                                 int new_size = b->yy_buf_size * 2;
1085
1086                                 if ( new_size <= 0 )
1087                                         b->yy_buf_size += b->yy_buf_size / 8;
1088                                 else
1089                                         b->yy_buf_size *= 2;
1090
1091                                 b->yy_ch_buf = (char *)
1092                                         /* Include room in for 2 EOB chars. */
1093                                         yy_flex_realloc( (void *) b->yy_ch_buf,
1094                                                          b->yy_buf_size + 2 );
1095                                 }
1096                         else
1097                                 /* Can't grow it, we don't own it. */
1098                                 b->yy_ch_buf = 0;
1099
1100                         if ( ! b->yy_ch_buf )
1101                                 YY_FATAL_ERROR(
1102                                 "fatal error - scanner input buffer overflow" );
1103
1104                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1105
1106                         num_to_read = yy_current_buffer->yy_buf_size -
1107                                                 number_to_move - 1;
1108 #endif
1109                         }
1110
1111                 if ( num_to_read > YY_READ_BUF_SIZE )
1112                         num_to_read = YY_READ_BUF_SIZE;
1113
1114                 /* Read in more data. */
1115                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1116                         yy_n_chars, num_to_read );
1117
1118                 yy_current_buffer->yy_n_chars = yy_n_chars;
1119                 }
1120
1121         if ( yy_n_chars == 0 )
1122                 {
1123                 if ( number_to_move == YY_MORE_ADJ )
1124                         {
1125                         ret_val = EOB_ACT_END_OF_FILE;
1126                         yyrestart( yyin );
1127                         }
1128
1129                 else
1130                         {
1131                         ret_val = EOB_ACT_LAST_MATCH;
1132                         yy_current_buffer->yy_buffer_status =
1133                                 YY_BUFFER_EOF_PENDING;
1134                         }
1135                 }
1136
1137         else
1138                 ret_val = EOB_ACT_CONTINUE_SCAN;
1139
1140         yy_n_chars += number_to_move;
1141         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1142         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1143
1144         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1145
1146         return ret_val;
1147         }
1148
1149
1150 /* yy_get_previous_state - get the state just before the EOB char was reached */
1151
1152 static yy_state_type yy_get_previous_state()
1153         {
1154         register yy_state_type yy_current_state;
1155         register char *yy_cp;
1156
1157         yy_current_state = yy_start;
1158
1159         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1160                 {
1161                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1162                 if ( yy_accept[yy_current_state] )
1163                         {
1164                         yy_last_accepting_state = yy_current_state;
1165                         yy_last_accepting_cpos = yy_cp;
1166                         }
1167                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1168                         {
1169                         yy_current_state = (int) yy_def[yy_current_state];
1170                         if ( yy_current_state >= 51 )
1171                                 yy_c = yy_meta[(unsigned int) yy_c];
1172                         }
1173                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1174                 }
1175
1176         return yy_current_state;
1177         }
1178
1179
1180 /* yy_try_NUL_trans - try to make a transition on the NUL character
1181  *
1182  * synopsis
1183  *      next_state = yy_try_NUL_trans( current_state );
1184  */
1185
1186 #ifdef YY_USE_PROTOS
1187 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1188 #else
1189 static yy_state_type yy_try_NUL_trans( yy_current_state )
1190 yy_state_type yy_current_state;
1191 #endif
1192         {
1193         register int yy_is_jam;
1194         register char *yy_cp = yy_c_buf_p;
1195
1196         register YY_CHAR yy_c = 1;
1197         if ( yy_accept[yy_current_state] )
1198                 {
1199                 yy_last_accepting_state = yy_current_state;
1200                 yy_last_accepting_cpos = yy_cp;
1201                 }
1202         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1203                 {
1204                 yy_current_state = (int) yy_def[yy_current_state];
1205                 if ( yy_current_state >= 51 )
1206                         yy_c = yy_meta[(unsigned int) yy_c];
1207                 }
1208         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1209         yy_is_jam = (yy_current_state == 50);
1210
1211         return yy_is_jam ? 0 : yy_current_state;
1212         }
1213
1214
1215 #ifndef YY_NO_UNPUT
1216 #ifdef YY_USE_PROTOS
1217 static void yyunput( int c, register char *yy_bp )
1218 #else
1219 static void yyunput( c, yy_bp )
1220 int c;
1221 register char *yy_bp;
1222 #endif
1223         {
1224         register char *yy_cp = yy_c_buf_p;
1225
1226         /* undo effects of setting up yytext */
1227         *yy_cp = yy_hold_char;
1228
1229         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1230                 { /* need to shift things up to make room */
1231                 /* +2 for EOB chars. */
1232                 register int number_to_move = yy_n_chars + 2;
1233                 register char *dest = &yy_current_buffer->yy_ch_buf[
1234                                         yy_current_buffer->yy_buf_size + 2];
1235                 register char *source =
1236                                 &yy_current_buffer->yy_ch_buf[number_to_move];
1237
1238                 while ( source > yy_current_buffer->yy_ch_buf )
1239                         *--dest = *--source;
1240
1241                 yy_cp += (int) (dest - source);
1242                 yy_bp += (int) (dest - source);
1243                 yy_current_buffer->yy_n_chars =
1244                         yy_n_chars = yy_current_buffer->yy_buf_size;
1245
1246                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1247                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1248                 }
1249
1250         *--yy_cp = (char) c;
1251
1252
1253         yytext_ptr = yy_bp;
1254         yy_hold_char = *yy_cp;
1255         yy_c_buf_p = yy_cp;
1256         }
1257 #endif  /* ifndef YY_NO_UNPUT */
1258
1259
1260 #ifdef __cplusplus
1261 static int yyinput()
1262 #else
1263 static int input()
1264 #endif
1265         {
1266         int c;
1267
1268         *yy_c_buf_p = yy_hold_char;
1269
1270         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1271                 {
1272                 /* yy_c_buf_p now points to the character we want to return.
1273                  * If this occurs *before* the EOB characters, then it's a
1274                  * valid NUL; if not, then we've hit the end of the buffer.
1275                  */
1276                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1277                         /* This was really a NUL. */
1278                         *yy_c_buf_p = '\0';
1279
1280                 else
1281                         { /* need more input */
1282                         int offset = yy_c_buf_p - yytext_ptr;
1283                         ++yy_c_buf_p;
1284
1285                         switch ( yy_get_next_buffer() )
1286                                 {
1287                                 case EOB_ACT_LAST_MATCH:
1288                                         /* This happens because yy_g_n_b()
1289                                          * sees that we've accumulated a
1290                                          * token and flags that we need to
1291                                          * try matching the token before
1292                                          * proceeding.  But for input(),
1293                                          * there's no matching to consider.
1294                                          * So convert the EOB_ACT_LAST_MATCH
1295                                          * to EOB_ACT_END_OF_FILE.
1296                                          */
1297
1298                                         /* Reset buffer status. */
1299                                         yyrestart( yyin );
1300
1301                                         /* fall through */
1302
1303                                 case EOB_ACT_END_OF_FILE:
1304                                         {
1305                                         if ( yywrap() )
1306                                                 return EOF;
1307
1308                                         if ( ! yy_did_buffer_switch_on_eof )
1309                                                 YY_NEW_FILE;
1310 #ifdef __cplusplus
1311                                         return yyinput();
1312 #else
1313                                         return input();
1314 #endif
1315                                         }
1316
1317                                 case EOB_ACT_CONTINUE_SCAN:
1318                                         yy_c_buf_p = yytext_ptr + offset;
1319                                         break;
1320                                 }
1321                         }
1322                 }
1323
1324         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1325         *yy_c_buf_p = '\0';     /* preserve yytext */
1326         yy_hold_char = *++yy_c_buf_p;
1327
1328
1329         return c;
1330         }
1331
1332
1333 #ifdef YY_USE_PROTOS
1334 void yyrestart( FILE *input_file )
1335 #else
1336 void yyrestart( input_file )
1337 FILE *input_file;
1338 #endif
1339         {
1340         if ( ! yy_current_buffer )
1341                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1342
1343         yy_init_buffer( yy_current_buffer, input_file );
1344         yy_load_buffer_state();
1345         }
1346
1347
1348 #ifdef YY_USE_PROTOS
1349 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1350 #else
1351 void yy_switch_to_buffer( new_buffer )
1352 YY_BUFFER_STATE new_buffer;
1353 #endif
1354         {
1355         if ( yy_current_buffer == new_buffer )
1356                 return;
1357
1358         if ( yy_current_buffer )
1359                 {
1360                 /* Flush out information for old buffer. */
1361                 *yy_c_buf_p = yy_hold_char;
1362                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1363                 yy_current_buffer->yy_n_chars = yy_n_chars;
1364                 }
1365
1366         yy_current_buffer = new_buffer;
1367         yy_load_buffer_state();
1368
1369         /* We don't actually know whether we did this switch during
1370          * EOF (yywrap()) processing, but the only time this flag
1371          * is looked at is after yywrap() is called, so it's safe
1372          * to go ahead and always set it.
1373          */
1374         yy_did_buffer_switch_on_eof = 1;
1375         }
1376
1377
1378 #ifdef YY_USE_PROTOS
1379 void yy_load_buffer_state( void )
1380 #else
1381 void yy_load_buffer_state()
1382 #endif
1383         {
1384         yy_n_chars = yy_current_buffer->yy_n_chars;
1385         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1386         yyin = yy_current_buffer->yy_input_file;
1387         yy_hold_char = *yy_c_buf_p;
1388         }
1389
1390
1391 #ifdef YY_USE_PROTOS
1392 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1393 #else
1394 YY_BUFFER_STATE yy_create_buffer( file, size )
1395 FILE *file;
1396 int size;
1397 #endif
1398         {
1399         YY_BUFFER_STATE b;
1400
1401         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1402         if ( ! b )
1403                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1404
1405         b->yy_buf_size = size;
1406
1407         /* yy_ch_buf has to be 2 characters longer than the size given because
1408          * we need to put in 2 end-of-buffer characters.
1409          */
1410         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1411         if ( ! b->yy_ch_buf )
1412                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1413
1414         b->yy_is_our_buffer = 1;
1415
1416         yy_init_buffer( b, file );
1417
1418         return b;
1419         }
1420
1421
1422 #ifdef YY_USE_PROTOS
1423 void yy_delete_buffer( YY_BUFFER_STATE b )
1424 #else
1425 void yy_delete_buffer( b )
1426 YY_BUFFER_STATE b;
1427 #endif
1428         {
1429         if ( ! b )
1430                 return;
1431
1432         if ( b == yy_current_buffer )
1433                 yy_current_buffer = (YY_BUFFER_STATE) 0;
1434
1435         if ( b->yy_is_our_buffer )
1436                 yy_flex_free( (void *) b->yy_ch_buf );
1437
1438         yy_flex_free( (void *) b );
1439         }
1440
1441
1442 #ifndef _WIN32
1443 #include <unistd.h>
1444 #else
1445 #ifndef YY_ALWAYS_INTERACTIVE
1446 #ifndef YY_NEVER_INTERACTIVE
1447 extern int isatty YY_PROTO(( int ));
1448 #endif
1449 #endif
1450 #endif
1451
1452 #ifdef YY_USE_PROTOS
1453 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1454 #else
1455 void yy_init_buffer( b, file )
1456 YY_BUFFER_STATE b;
1457 FILE *file;
1458 #endif
1459
1460
1461         {
1462         yy_flush_buffer( b );
1463
1464         b->yy_input_file = file;
1465         b->yy_fill_buffer = 1;
1466
1467 #if YY_ALWAYS_INTERACTIVE
1468         b->yy_is_interactive = 1;
1469 #else
1470 #if YY_NEVER_INTERACTIVE
1471         b->yy_is_interactive = 0;
1472 #else
1473         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1474 #endif
1475 #endif
1476         }
1477
1478
1479 #ifdef YY_USE_PROTOS
1480 void yy_flush_buffer( YY_BUFFER_STATE b )
1481 #else
1482 void yy_flush_buffer( b )
1483 YY_BUFFER_STATE b;
1484 #endif
1485
1486         {
1487         if ( ! b )
1488                 return;
1489
1490         b->yy_n_chars = 0;
1491
1492         /* We always need two end-of-buffer characters.  The first causes
1493          * a transition to the end-of-buffer state.  The second causes
1494          * a jam in that state.
1495          */
1496         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1497         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1498
1499         b->yy_buf_pos = &b->yy_ch_buf[0];
1500
1501         b->yy_at_bol = 1;
1502         b->yy_buffer_status = YY_BUFFER_NEW;
1503
1504         if ( b == yy_current_buffer )
1505                 yy_load_buffer_state();
1506         }
1507
1508
1509 #ifndef YY_NO_SCAN_BUFFER
1510 #ifdef YY_USE_PROTOS
1511 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1512 #else
1513 YY_BUFFER_STATE yy_scan_buffer( base, size )
1514 char *base;
1515 yy_size_t size;
1516 #endif
1517         {
1518         YY_BUFFER_STATE b;
1519
1520         if ( size < 2 ||
1521              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1522              base[size-1] != YY_END_OF_BUFFER_CHAR )
1523                 /* They forgot to leave room for the EOB's. */
1524                 return 0;
1525
1526         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1527         if ( ! b )
1528                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1529
1530         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1531         b->yy_buf_pos = b->yy_ch_buf = base;
1532         b->yy_is_our_buffer = 0;
1533         b->yy_input_file = 0;
1534         b->yy_n_chars = b->yy_buf_size;
1535         b->yy_is_interactive = 0;
1536         b->yy_at_bol = 1;
1537         b->yy_fill_buffer = 0;
1538         b->yy_buffer_status = YY_BUFFER_NEW;
1539
1540         yy_switch_to_buffer( b );
1541
1542         return b;
1543         }
1544 #endif
1545
1546
1547 #ifndef YY_NO_SCAN_STRING
1548 #ifdef YY_USE_PROTOS
1549 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1550 #else
1551 YY_BUFFER_STATE yy_scan_string( yy_str )
1552 yyconst char *yy_str;
1553 #endif
1554         {
1555         int len;
1556         for ( len = 0; yy_str[len]; ++len )
1557                 ;
1558
1559         return yy_scan_bytes( yy_str, len );
1560         }
1561 #endif
1562
1563
1564 #ifndef YY_NO_SCAN_BYTES
1565 #ifdef YY_USE_PROTOS
1566 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1567 #else
1568 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1569 yyconst char *bytes;
1570 int len;
1571 #endif
1572         {
1573         YY_BUFFER_STATE b;
1574         char *buf;
1575         yy_size_t n;
1576         int i;
1577
1578         /* Get memory for full buffer, including space for trailing EOB's. */
1579         n = len + 2;
1580         buf = (char *) yy_flex_alloc( n );
1581         if ( ! buf )
1582                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1583
1584         for ( i = 0; i < len; ++i )
1585                 buf[i] = bytes[i];
1586
1587         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1588
1589         b = yy_scan_buffer( buf, n );
1590         if ( ! b )
1591                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1592
1593         /* It's okay to grow etc. this buffer, and we should throw it
1594          * away when we're done.
1595          */
1596         b->yy_is_our_buffer = 1;
1597
1598         return b;
1599         }
1600 #endif
1601
1602
1603 #ifndef YY_NO_PUSH_STATE
1604 #ifdef YY_USE_PROTOS
1605 static void yy_push_state( int new_state )
1606 #else
1607 static void yy_push_state( new_state )
1608 int new_state;
1609 #endif
1610         {
1611         if ( yy_start_stack_ptr >= yy_start_stack_depth )
1612                 {
1613                 yy_size_t new_size;
1614
1615                 yy_start_stack_depth += YY_START_STACK_INCR;
1616                 new_size = yy_start_stack_depth * sizeof( int );
1617
1618                 if ( ! yy_start_stack )
1619                         yy_start_stack = (int *) yy_flex_alloc( new_size );
1620
1621                 else
1622                         yy_start_stack = (int *) yy_flex_realloc(
1623                                         (void *) yy_start_stack, new_size );
1624
1625                 if ( ! yy_start_stack )
1626                         YY_FATAL_ERROR(
1627                         "out of memory expanding start-condition stack" );
1628                 }
1629
1630         yy_start_stack[yy_start_stack_ptr++] = YY_START;
1631
1632         BEGIN(new_state);
1633         }
1634 #endif
1635
1636
1637 #ifndef YY_NO_POP_STATE
1638 static void yy_pop_state()
1639         {
1640         if ( --yy_start_stack_ptr < 0 )
1641                 YY_FATAL_ERROR( "start-condition stack underflow" );
1642
1643         BEGIN(yy_start_stack[yy_start_stack_ptr]);
1644         }
1645 #endif
1646
1647
1648 #ifndef YY_NO_TOP_STATE
1649 static int yy_top_state()
1650         {
1651         return yy_start_stack[yy_start_stack_ptr - 1];
1652         }
1653 #endif
1654
1655 #ifndef YY_EXIT_FAILURE
1656 #define YY_EXIT_FAILURE 2
1657 #endif
1658
1659 #ifdef YY_USE_PROTOS
1660 static void yy_fatal_error( yyconst char msg[] )
1661 #else
1662 static void yy_fatal_error( msg )
1663 char msg[];
1664 #endif
1665         {
1666         (void) fprintf( stderr, "%s\n", msg );
1667         exit( YY_EXIT_FAILURE );
1668         }
1669
1670
1671
1672 /* Redefine yyless() so it works in section 3 code. */
1673
1674 #undef yyless
1675 #define yyless(n) \
1676         do \
1677                 { \
1678                 /* Undo effects of setting up yytext. */ \
1679                 yytext[yyleng] = yy_hold_char; \
1680                 yy_c_buf_p = yytext + n; \
1681                 yy_hold_char = *yy_c_buf_p; \
1682                 *yy_c_buf_p = '\0'; \
1683                 yyleng = n; \
1684                 } \
1685         while ( 0 )
1686
1687
1688 /* Internal utility routines. */
1689
1690 #ifndef yytext_ptr
1691 #ifdef YY_USE_PROTOS
1692 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1693 #else
1694 static void yy_flex_strncpy( s1, s2, n )
1695 char *s1;
1696 yyconst char *s2;
1697 int n;
1698 #endif
1699         {
1700         register int i;
1701         for ( i = 0; i < n; ++i )
1702                 s1[i] = s2[i];
1703         }
1704 #endif
1705
1706 #ifdef YY_NEED_STRLEN
1707 #ifdef YY_USE_PROTOS
1708 static int yy_flex_strlen( yyconst char *s )
1709 #else
1710 static int yy_flex_strlen( s )
1711 yyconst char *s;
1712 #endif
1713         {
1714         register int n;
1715         for ( n = 0; s[n]; ++n )
1716                 ;
1717
1718         return n;
1719         }
1720 #endif
1721
1722
1723 #ifdef YY_USE_PROTOS
1724 static void *yy_flex_alloc( yy_size_t size )
1725 #else
1726 static void *yy_flex_alloc( size )
1727 yy_size_t size;
1728 #endif
1729         {
1730         return (void *) malloc( size );
1731         }
1732
1733 #ifdef YY_USE_PROTOS
1734 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1735 #else
1736 static void *yy_flex_realloc( ptr, size )
1737 void *ptr;
1738 yy_size_t size;
1739 #endif
1740         {
1741         /* The cast to (char *) in the following accommodates both
1742          * implementations that use char* generic pointers, and those
1743          * that use void* generic pointers.  It works with the latter
1744          * because both ANSI C and C++ allow castless assignment from
1745          * any pointer type to void*, and deal with argument conversions
1746          * as though doing an assignment.
1747          */
1748         return (void *) realloc( (char *) ptr, size );
1749         }
1750
1751 #ifdef YY_USE_PROTOS
1752 static void yy_flex_free( void *ptr )
1753 #else
1754 static void yy_flex_free( ptr )
1755 void *ptr;
1756 #endif
1757         {
1758         free( ptr );
1759         }
1760
1761 #if YY_MAIN
1762 int main()
1763         {
1764         yylex();
1765         return 0;
1766         }
1767 #endif
1768 #line 108 "gs/parse.yy.l"
1769
1770 /* {space}+                { return(TOKEN_SPACE);} */
1771
1772 void gs_parse_dump(void) {
1773   switch(gs_parse_tok_num) {
1774   case GS_PARSE_TOKEN_LP      : {printf("TOKEN_LP ");break;}
1775   case GS_PARSE_TOKEN_RP      : {printf("TOKEN_RP ");break;}
1776   case GS_PARSE_TOKEN_WORD    : {printf("TOKEN_WORD ");break;}
1777     //  case GS_PARSE_TOKEN_SPACE   : {printf("TOKEN_SPACE ");break;}
1778     //  case GS_PARSE_TOKEN_COMMENT : {printf("TOKEN_COMMENT ");break;}
1779   case GS_PARSE_TOKEN_NEWLINE : {printf("TOKEN_NEWLINE\n");return;}
1780   case GS_PARSE_TOKEN_EMPTY : {printf("TOKEN_EMPTY\n");return;}
1781   default             : {printf("Unknown token %d\n", gs_parse_tok_num);return;}
1782   }
1783   printf("-->%s<-- [line %d, pos %d]\n",yytext,gs_parse_line_pos,gs_parse_char_pos);
1784   return;
1785 }
1786
1787 int gs_parse_lex_n_dump(void) {
1788   gs_parse_tok_num = gs_parse_lex();
1789   //  voir_val();
1790   //  gs_parse_char_pos += strlen(yytext);
1791   return(gs_parse_tok_num);
1792 }
1793
1794 void  gs_parse_pointer_init(const char *file) {
1795   file_to_parse = fopen(file,"r");
1796   input_buffer = yy_create_buffer( file_to_parse, 10 );
1797   yy_switch_to_buffer(input_buffer);
1798
1799   gs_parse_line_pos = 1;
1800   gs_parse_char_pos = 0;
1801   gs_parse_tok_num = 0;
1802 }
1803
1804 void  gs_parse_pointer_close(void) {
1805   yy_delete_buffer(input_buffer);
1806   fclose(file_to_parse);
1807
1808   gs_parse_line_pos = 1;
1809   gs_parse_char_pos = 0;
1810   gs_parse_tok_num = 0;
1811 }
1812
1813
1814 void  gs_parse_pointer_string_init(const char *string_to_parse) {
1815   input_buffer = yy_scan_string (string_to_parse);
1816   yy_switch_to_buffer(input_buffer);
1817
1818   gs_parse_line_pos = 1;
1819   gs_parse_char_pos = 0;
1820   gs_parse_tok_num = 0;
1821 }
1822
1823 void  gs_parse_pointer_string_close(void) {
1824   yy_delete_buffer(input_buffer);
1825
1826   gs_parse_line_pos = 1;
1827   gs_parse_char_pos = 0;
1828   gs_parse_tok_num = 0;
1829 }
1830
1831 // Local variables:
1832 // mode: c
1833 // End: