Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
88b38a4327fe8fb8d7d5c535fb14e7d2472c0c60
[simgrid.git] / src / gras / DataDesc / ddt_parse.yy.c
1 #define yy_create_buffer gras_ddt_parse__create_buffer
2 #define yy_delete_buffer gras_ddt_parse__delete_buffer
3 #define yy_scan_buffer gras_ddt_parse__scan_buffer
4 #define yy_scan_string gras_ddt_parse__scan_string
5 #define yy_scan_bytes gras_ddt_parse__scan_bytes
6 #define yy_flex_debug gras_ddt_parse__flex_debug
7 #define yy_init_buffer gras_ddt_parse__init_buffer
8 #define yy_flush_buffer gras_ddt_parse__flush_buffer
9 #define yy_load_buffer_state gras_ddt_parse__load_buffer_state
10 #define yy_switch_to_buffer gras_ddt_parse__switch_to_buffer
11 #define yyin gras_ddt_parse_in
12 #define yyleng gras_ddt_parse_leng
13 #define yylex gras_ddt_parse_lex
14 #define yyout gras_ddt_parse_out
15 #define yyrestart gras_ddt_parse_restart
16 #define yytext gras_ddt_parse_text
17
18 #line 19 "gras/DataDesc/ddt_parse.yy.c"
19 /* A lexical scanner generated by flex */
20
21 /* Scanner skeleton version:
22  * $Header$
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 26
310 #define YY_END_OF_BUFFER 27
311 static yyconst short int yy_accept[61] =
312     {   0,
313        14,   14,    7,    7,   10,   10,    0,    0,   27,   25,
314        24,   19,   20,   21,   23,   14,   25,   22,   17,   18,
315        15,   16,    7,    7,    6,    7,    7,   10,   12,   11,
316        26,   26,   14,    0,    1,    7,    7,    7,    5,    7,
317        10,   11,   11,   13,    0,    0,    2,    1,    4,    0,
318         3,    0,    2,    0,    3,    0,    0,    8,    9,    0
319     } ;
320
321 static yyconst int yy_ec[256] =
322     {   0,
323         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
324         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
325         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
326         1,    2,    1,    1,    1,    1,    1,    1,    1,    4,
327         5,    6,    1,    7,    8,    8,    9,   10,   10,   10,
328        10,   10,   10,   10,   10,   10,   10,    1,   11,    1,
329         1,    1,    1,    1,    8,    8,    8,    8,    8,    8,
330         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
331         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
332        12,    1,   13,   14,    8,    1,    8,    8,    8,    8,
333
334         8,    8,   15,    8,    8,    8,    8,    8,    8,    8,
335         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
336         8,    8,   16,    1,   17,    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         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
344
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,    1,    1,    1,    1,    1,
350         1,    1,    1,    1,    1
351     } ;
352
353 static yyconst int yy_meta[18] =
354     {   0,
355         1,    1,    2,    1,    1,    3,    1,    4,    1,    4,
356         1,    1,    1,    1,    4,    1,    1
357     } ;
358
359 static yyconst short int yy_base[69] =
360     {   0,
361         0,    0,   16,   30,   17,   18,   78,   77,   85,   88,
362        88,   88,   88,   88,   88,    0,   19,   88,   88,   88,
363        88,   88,    0,   24,   88,   75,   77,    0,   88,   21,
364        88,   76,    0,   22,    0,    0,   27,   75,    0,   71,
365         0,   29,   34,   88,   29,   65,   76,    0,    0,   63,
366        74,   60,   72,   56,   65,   51,   50,   88,   88,   88,
367        45,   49,   53,   55,   57,   61,   65,   69
368     } ;
369
370 static yyconst short int yy_def[69] =
371     {   0,
372        60,    1,   61,   61,   62,   62,   63,   63,   60,   60,
373        60,   60,   60,   60,   60,   64,   60,   60,   60,   60,
374        60,   60,   65,   65,   60,   65,   65,   66,   60,   67,
375        60,   60,   64,   60,   68,   65,   65,   65,   65,   65,
376        66,   67,   67,   60,   60,   60,   60,   68,   65,   60,
377        60,   60,   60,   60,   60,   60,   60,   60,   60,    0,
378        60,   60,   60,   60,   60,   60,   60,   60
379     } ;
380
381 static yyconst short int yy_nxt[106] =
382     {   0,
383        10,   10,   11,   12,   13,   14,   15,   16,   17,   16,
384        18,   19,   20,   10,   16,   21,   22,   24,   25,   29,
385        29,   26,   30,   30,   34,   37,   43,   35,   37,   44,
386        27,   24,   25,   46,   60,   26,   47,   60,   38,   43,
387        50,   38,   44,   51,   27,   23,   23,   23,   23,   28,
388        28,   28,   28,   31,   31,   31,   31,   36,   33,   36,
389        36,   41,   59,   58,   41,   42,   55,   42,   42,   48,
390        57,   48,   48,   53,   56,   55,   54,   53,   52,   49,
391        40,   45,   40,   39,   60,   32,   32,    9,   60,   60,
392        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
393
394        60,   60,   60,   60,   60
395     } ;
396
397 static yyconst short int yy_chk[106] =
398     {   0,
399         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
400         1,    1,    1,    1,    1,    1,    1,    3,    3,    5,
401         6,    3,    5,    6,   17,   24,   30,   17,   37,   30,
402         3,    4,    4,   34,   42,    4,   34,   42,   24,   43,
403        45,   37,   43,   45,    4,   61,   61,   61,   61,   62,
404        62,   62,   62,   63,   63,   63,   63,   65,   64,   65,
405        65,   66,   57,   56,   66,   67,   55,   67,   67,   68,
406        54,   68,   68,   53,   52,   51,   50,   47,   46,   40,
407        38,   32,   27,   26,    9,    8,    7,   60,   60,   60,
408        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
409
410        60,   60,   60,   60,   60
411     } ;
412
413 static yy_state_type yy_last_accepting_state;
414 static char *yy_last_accepting_cpos;
415
416 /* The intent behind this definition is that it'll catch
417  * any uses of REJECT which flex missed.
418  */
419 #define REJECT reject_used_but_not_detected
420 #define yymore() yymore_used_but_not_detected
421 #define YY_MORE_ADJ 0
422 #define YY_RESTORE_YY_MORE_OFFSET
423 char *yytext;
424 #line 1 "gras/DataDesc/ddt_parse.yy.l"
425 #define INITIAL 0
426 /* $Id$ */
427 /* DataDesc/ddt_parse -- automatic parsing of data structures */
428 /* Authors: Arnaud Legrand, Martin Quinson            */
429 /* Copyright (C) 2003, 2004 Martin Quinson.                                 */
430 /* This program is free software; you can redistribute it and/or modify it
431    under the terms of the license (GNU LGPL) which comes with this package. */
432 #line 13 "gras/DataDesc/ddt_parse.yy.l"
433 #include "gras/DataDesc/datadesc_private.h"
434 #include "gras/DataDesc/ddt_parse.yy.h"
435 #include <string.h>
436   YY_BUFFER_STATE input_buffer;
437   FILE *file_to_parse;
438
439   int gras_ddt_parse_line_pos = 1;
440   int gras_ddt_parse_col_pos = 0;
441   int gras_ddt_parse_char_pos = 0;
442   int gras_ddt_parse_tok_num = 0;
443   const char *definition;
444   GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(lexer,ddt_parse,"The crude internals of the lexer used for type parsing");
445 #define SHOW_WHERE DEBUG4("%d:%d (char #%d): seen '%s'", gras_ddt_parse_line_pos,gras_ddt_parse_col_pos,gras_ddt_parse_char_pos,yytext)
446 #define annotate 1
447 #define comment 2
448 #define foo 3
449
450 #line 451 "gras/DataDesc/ddt_parse.yy.c"
451
452 /* Macros after this point can all be overridden by user definitions in
453  * section 1.
454  */
455
456 #ifndef YY_SKIP_YYWRAP
457 #ifdef __cplusplus
458 extern "C" int yywrap YY_PROTO(( void ));
459 #else
460 extern int yywrap YY_PROTO(( void ));
461 #endif
462 #endif
463
464 #ifndef YY_NO_UNPUT
465 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
466 #endif
467
468 #ifndef yytext_ptr
469 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
470 #endif
471
472 #ifdef YY_NEED_STRLEN
473 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
474 #endif
475
476 #ifndef YY_NO_INPUT
477 #ifdef __cplusplus
478 static int yyinput YY_PROTO(( void ));
479 #else
480 static int input YY_PROTO(( void ));
481 #endif
482 #endif
483
484 #if YY_STACK_USED
485 static int yy_start_stack_ptr = 0;
486 static int yy_start_stack_depth = 0;
487 static int *yy_start_stack = 0;
488 #ifndef YY_NO_PUSH_STATE
489 static void yy_push_state YY_PROTO(( int new_state ));
490 #endif
491 #ifndef YY_NO_POP_STATE
492 static void yy_pop_state YY_PROTO(( void ));
493 #endif
494 #ifndef YY_NO_TOP_STATE
495 static int yy_top_state YY_PROTO(( void ));
496 #endif
497
498 #else
499 #define YY_NO_PUSH_STATE 1
500 #define YY_NO_POP_STATE 1
501 #define YY_NO_TOP_STATE 1
502 #endif
503
504 #ifdef YY_MALLOC_DECL
505 YY_MALLOC_DECL
506 #else
507 #if __STDC__
508 #ifndef __cplusplus
509 #include <stdlib.h>
510 #endif
511 #else
512 /* Just try to get by without declaring the routines.  This will fail
513  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
514  * or sizeof(void*) != sizeof(int).
515  */
516 #endif
517 #endif
518
519 /* Amount of stuff to slurp up with each read. */
520 #ifndef YY_READ_BUF_SIZE
521 #define YY_READ_BUF_SIZE 8192
522 #endif
523
524 /* Copy whatever the last rule matched to the standard output. */
525
526 #ifndef ECHO
527 /* This used to be an fputs(), but since the string might contain NUL's,
528  * we now use fwrite().
529  */
530 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
531 #endif
532
533 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
534  * is returned in "result".
535  */
536 #ifndef YY_INPUT
537 #define YY_INPUT(buf,result,max_size) \
538         if ( yy_current_buffer->yy_is_interactive ) \
539                 { \
540                 int c = '*', n; \
541                 for ( n = 0; n < max_size && \
542                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
543                         buf[n] = (char) c; \
544                 if ( c == '\n' ) \
545                         buf[n++] = (char) c; \
546                 if ( c == EOF && ferror( yyin ) ) \
547                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
548                 result = n; \
549                 } \
550         else \
551                 { \
552                 errno=0; \
553                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
554                         { \
555                         if( errno != EINTR) \
556                                 { \
557                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
558                                 break; \
559                                 } \
560                         errno=0; \
561                         clearerr(yyin); \
562                         } \
563                 }
564 #endif
565
566 /* No semi-colon after return; correct usage is to write "yyterminate();" -
567  * we don't want an extra ';' after the "return" because that will cause
568  * some compilers to complain about unreachable statements.
569  */
570 #ifndef yyterminate
571 #define yyterminate() return YY_NULL
572 #endif
573
574 /* Number of entries by which start-condition stack grows. */
575 #ifndef YY_START_STACK_INCR
576 #define YY_START_STACK_INCR 25
577 #endif
578
579 /* Report a fatal error. */
580 #ifndef YY_FATAL_ERROR
581 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
582 #endif
583
584 /* Default declaration of generated scanner - a define so the user can
585  * easily add parameters.
586  */
587 #ifndef YY_DECL
588 #define YY_DECL int yylex YY_PROTO(( void ))
589 #endif
590
591 /* Code executed at the beginning of each rule, after yytext and yyleng
592  * have been set up.
593  */
594 #ifndef YY_USER_ACTION
595 #define YY_USER_ACTION
596 #endif
597
598 /* Code executed at the end of each rule. */
599 #ifndef YY_BREAK
600 #define YY_BREAK break;
601 #endif
602
603 #define YY_RULE_SETUP \
604         YY_USER_ACTION
605
606 YY_DECL
607         {
608         register yy_state_type yy_current_state;
609         register char *yy_cp, *yy_bp;
610         register int yy_act;
611
612 #line 33 "gras/DataDesc/ddt_parse.yy.l"
613
614    int comment_caller=0;
615    int annotate_caller=0;
616
617    char string_buf[GRAS_DDT_PARSE_MAX_STR_CONST];
618    char *string_buf_ptr = NULL;
619
620 #line 621 "gras/DataDesc/ddt_parse.yy.c"
621
622         if ( yy_init )
623                 {
624                 yy_init = 0;
625
626 #ifdef YY_USER_INIT
627                 YY_USER_INIT;
628 #endif
629
630                 if ( ! yy_start )
631                         yy_start = 1;   /* first start state */
632
633                 if ( ! yyin )
634                         yyin = stdin;
635
636                 if ( ! yyout )
637                         yyout = stdout;
638
639                 if ( ! yy_current_buffer )
640                         yy_current_buffer =
641                                 yy_create_buffer( yyin, YY_BUF_SIZE );
642
643                 yy_load_buffer_state();
644                 }
645
646         while ( 1 )             /* loops until end-of-file is reached */
647                 {
648                 yy_cp = yy_c_buf_p;
649
650                 /* Support of yytext. */
651                 *yy_cp = yy_hold_char;
652
653                 /* yy_bp points to the position in yy_ch_buf of the start of
654                  * the current run.
655                  */
656                 yy_bp = yy_cp;
657
658                 yy_current_state = yy_start;
659 yy_match:
660                 do
661                         {
662                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
663                         if ( yy_accept[yy_current_state] )
664                                 {
665                                 yy_last_accepting_state = yy_current_state;
666                                 yy_last_accepting_cpos = yy_cp;
667                                 }
668                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
669                                 {
670                                 yy_current_state = (int) yy_def[yy_current_state];
671                                 if ( yy_current_state >= 61 )
672                                         yy_c = yy_meta[(unsigned int) yy_c];
673                                 }
674                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
675                         ++yy_cp;
676                         }
677                 while ( yy_base[yy_current_state] != 88 );
678
679 yy_find_action:
680                 yy_act = yy_accept[yy_current_state];
681                 if ( yy_act == 0 )
682                         { /* have to back up */
683                         yy_cp = yy_last_accepting_cpos;
684                         yy_current_state = yy_last_accepting_state;
685                         yy_act = yy_accept[yy_current_state];
686                         }
687
688                 YY_DO_BEFORE_ACTION;
689
690
691 do_action:      /* This label is used only to access EOF actions. */
692
693
694                 switch ( yy_act )
695         { /* beginning of action switch */
696                         case 0: /* must back up */
697                         /* undo the effects of YY_DO_BEFORE_ACTION */
698                         *yy_cp = yy_hold_char;
699                         yy_cp = yy_last_accepting_cpos;
700                         yy_current_state = yy_last_accepting_state;
701                         goto yy_find_action;
702
703 case 1:
704 YY_RULE_SETUP
705 #line 40 "gras/DataDesc/ddt_parse.yy.l"
706
707         YY_BREAK
708 case 2:
709 YY_RULE_SETUP
710 #line 42 "gras/DataDesc/ddt_parse.yy.l"
711 { /****************** ANNOTATION ************************/
712   DEBUG0("Begin annotation");
713   annotate_caller = INITIAL;
714   gras_ddt_parse_char_pos+= strlen(yytext);
715   gras_ddt_parse_col_pos+= strlen(yytext);
716   BEGIN(annotate);
717 }
718         YY_BREAK
719 case 3:
720 YY_RULE_SETUP
721 #line 49 "gras/DataDesc/ddt_parse.yy.l"
722 { /* trim annotation */
723   DEBUG0("Begin annotation");
724   annotate_caller = foo;
725   gras_ddt_parse_char_pos+= strlen(yytext);
726   gras_ddt_parse_col_pos+= strlen(yytext);
727   BEGIN(annotate);
728 }
729         YY_BREAK
730 case 4:
731 YY_RULE_SETUP
732 #line 57 "gras/DataDesc/ddt_parse.yy.l"
733 {
734   DEBUG0("End annotation");
735   gras_ddt_parse_char_pos+= strlen(yytext);
736   gras_ddt_parse_col_pos+= strlen(yytext);
737   BEGIN(annotate_caller);
738 }
739         YY_BREAK
740 case 5:
741 YY_RULE_SETUP
742 #line 64 "gras/DataDesc/ddt_parse.yy.l"
743 {
744   PARSE_ERROR0("``/*g'' construct closed by a regular ``*/''");
745 }
746         YY_BREAK
747 case 6:
748 YY_RULE_SETUP
749 #line 67 "gras/DataDesc/ddt_parse.yy.l"
750 {
751   PARSE_ERROR0("Type annotation cannot spread over several lines");
752 }
753         YY_BREAK
754 case 7:
755 YY_RULE_SETUP
756 #line 71 "gras/DataDesc/ddt_parse.yy.l"
757 { /* eat the rest */
758   gras_ddt_parse_char_pos+= strlen(yytext);
759   gras_ddt_parse_col_pos+= strlen(yytext);
760   return GRAS_DDT_PARSE_TOKEN_ANNOTATE;
761 }
762         YY_BREAK
763 case 8:
764 YY_RULE_SETUP
765 #line 77 "gras/DataDesc/ddt_parse.yy.l"
766 { /****************** COMMENTS ************************/
767   /* constructs like : */
768     /*g [string] g*/ 
769   /* are not comments but size annotations */
770   comment_caller = INITIAL;
771   BEGIN(comment);
772 }
773         YY_BREAK
774 case 9:
775 YY_RULE_SETUP
776 #line 85 "gras/DataDesc/ddt_parse.yy.l"
777 {
778   comment_caller = foo;
779   BEGIN(comment);
780 }
781         YY_BREAK
782 case 10:
783 YY_RULE_SETUP
784 #line 90 "gras/DataDesc/ddt_parse.yy.l"
785 { /* eat anything that's not a '*' */
786 }
787         YY_BREAK
788 case 11:
789 YY_RULE_SETUP
790 #line 92 "gras/DataDesc/ddt_parse.yy.l"
791 { /* eat up '*'s not followed by '/'s */
792 }
793         YY_BREAK
794 case 12:
795 YY_RULE_SETUP
796 #line 94 "gras/DataDesc/ddt_parse.yy.l"
797 {
798   ++gras_ddt_parse_line_pos;
799   gras_ddt_parse_col_pos=0;
800   gras_ddt_parse_char_pos++;
801 }
802         YY_BREAK
803 case 13:
804 YY_RULE_SETUP
805 #line 99 "gras/DataDesc/ddt_parse.yy.l"
806 {
807   gras_ddt_parse_char_pos+= strlen(yytext);
808   gras_ddt_parse_col_pos+= strlen(yytext);
809   BEGIN(comment_caller);
810 }
811         YY_BREAK
812 case 14:
813 YY_RULE_SETUP
814 #line 105 "gras/DataDesc/ddt_parse.yy.l"
815 {  /****************** STATEMENTS ************************/
816   gras_ddt_parse_char_pos += strlen(yytext);
817   gras_ddt_parse_col_pos += strlen(yytext);
818   SHOW_WHERE;
819   return(GRAS_DDT_PARSE_TOKEN_WORD);
820 }
821         YY_BREAK
822 case 15:
823 YY_RULE_SETUP
824 #line 111 "gras/DataDesc/ddt_parse.yy.l"
825
826   gras_ddt_parse_char_pos++; 
827   gras_ddt_parse_col_pos++; 
828   SHOW_WHERE;
829   return(GRAS_DDT_PARSE_TOKEN_LA);
830 }
831         YY_BREAK
832 case 16:
833 YY_RULE_SETUP
834 #line 117 "gras/DataDesc/ddt_parse.yy.l"
835 {
836   gras_ddt_parse_char_pos++;
837   gras_ddt_parse_col_pos++;
838   SHOW_WHERE;
839   return(GRAS_DDT_PARSE_TOKEN_RA);
840 }
841         YY_BREAK
842 case 17:
843 YY_RULE_SETUP
844 #line 123 "gras/DataDesc/ddt_parse.yy.l"
845
846   gras_ddt_parse_char_pos++; 
847   gras_ddt_parse_col_pos++; 
848   SHOW_WHERE;
849   return(GRAS_DDT_PARSE_TOKEN_LB);
850 }
851         YY_BREAK
852 case 18:
853 YY_RULE_SETUP
854 #line 129 "gras/DataDesc/ddt_parse.yy.l"
855 {
856   gras_ddt_parse_char_pos++;
857   gras_ddt_parse_col_pos++;
858   SHOW_WHERE;
859   return(GRAS_DDT_PARSE_TOKEN_RB);
860 }
861         YY_BREAK
862 case 19:
863 YY_RULE_SETUP
864 #line 135 "gras/DataDesc/ddt_parse.yy.l"
865
866   gras_ddt_parse_char_pos++; 
867   gras_ddt_parse_col_pos++; 
868   SHOW_WHERE;
869   return(GRAS_DDT_PARSE_TOKEN_LP);
870 }
871         YY_BREAK
872 case 20:
873 YY_RULE_SETUP
874 #line 141 "gras/DataDesc/ddt_parse.yy.l"
875 {
876   gras_ddt_parse_char_pos++;
877   gras_ddt_parse_col_pos++;
878   SHOW_WHERE;
879   return(GRAS_DDT_PARSE_TOKEN_RP);
880 }
881         YY_BREAK
882 case 21:
883 YY_RULE_SETUP
884 #line 147 "gras/DataDesc/ddt_parse.yy.l"
885 {
886   gras_ddt_parse_char_pos++;
887   gras_ddt_parse_col_pos++;
888   SHOW_WHERE;
889   return(GRAS_DDT_PARSE_TOKEN_STAR);
890 }
891         YY_BREAK
892 case 22:
893 YY_RULE_SETUP
894 #line 153 "gras/DataDesc/ddt_parse.yy.l"
895 {
896   gras_ddt_parse_char_pos++;
897   gras_ddt_parse_col_pos++;
898   SHOW_WHERE;
899   return(GRAS_DDT_PARSE_TOKEN_SEMI_COLON);
900 }
901         YY_BREAK
902 case 23:
903 YY_RULE_SETUP
904 #line 159 "gras/DataDesc/ddt_parse.yy.l"
905
906   gras_ddt_parse_char_pos++;
907   gras_ddt_parse_col_pos++;
908   SHOW_WHERE;
909   return(GRAS_DDT_PARSE_TOKEN_COLON);
910 }
911         YY_BREAK
912 case 24:
913 YY_RULE_SETUP
914 #line 165 "gras/DataDesc/ddt_parse.yy.l"
915 {
916  gras_ddt_parse_line_pos++; 
917  gras_ddt_parse_char_pos++;
918  gras_ddt_parse_col_pos=0;
919   SHOW_WHERE;
920 }
921         YY_BREAK
922 case 25:
923 YY_RULE_SETUP
924 #line 171 "gras/DataDesc/ddt_parse.yy.l"
925
926   gras_ddt_parse_char_pos++;
927   gras_ddt_parse_col_pos++;
928   SHOW_WHERE;
929 }
930         YY_BREAK
931 case 26:
932 YY_RULE_SETUP
933 #line 176 "gras/DataDesc/ddt_parse.yy.l"
934 ECHO;
935         YY_BREAK
936 #line 937 "gras/DataDesc/ddt_parse.yy.c"
937 case YY_STATE_EOF(INITIAL):
938 case YY_STATE_EOF(annotate):
939 case YY_STATE_EOF(comment):
940 case YY_STATE_EOF(foo):
941         yyterminate();
942
943         case YY_END_OF_BUFFER:
944                 {
945                 /* Amount of text matched not including the EOB char. */
946                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
947
948                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
949                 *yy_cp = yy_hold_char;
950                 YY_RESTORE_YY_MORE_OFFSET
951
952                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
953                         {
954                         /* We're scanning a new file or input source.  It's
955                          * possible that this happened because the user
956                          * just pointed yyin at a new source and called
957                          * yylex().  If so, then we have to assure
958                          * consistency between yy_current_buffer and our
959                          * globals.  Here is the right place to do so, because
960                          * this is the first action (other than possibly a
961                          * back-up) that will match for the new input source.
962                          */
963                         yy_n_chars = yy_current_buffer->yy_n_chars;
964                         yy_current_buffer->yy_input_file = yyin;
965                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
966                         }
967
968                 /* Note that here we test for yy_c_buf_p "<=" to the position
969                  * of the first EOB in the buffer, since yy_c_buf_p will
970                  * already have been incremented past the NUL character
971                  * (since all states make transitions on EOB to the
972                  * end-of-buffer state).  Contrast this with the test
973                  * in input().
974                  */
975                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
976                         { /* This was really a NUL. */
977                         yy_state_type yy_next_state;
978
979                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
980
981                         yy_current_state = yy_get_previous_state();
982
983                         /* Okay, we're now positioned to make the NUL
984                          * transition.  We couldn't have
985                          * yy_get_previous_state() go ahead and do it
986                          * for us because it doesn't know how to deal
987                          * with the possibility of jamming (and we don't
988                          * want to build jamming into it because then it
989                          * will run more slowly).
990                          */
991
992                         yy_next_state = yy_try_NUL_trans( yy_current_state );
993
994                         yy_bp = yytext_ptr + YY_MORE_ADJ;
995
996                         if ( yy_next_state )
997                                 {
998                                 /* Consume the NUL. */
999                                 yy_cp = ++yy_c_buf_p;
1000                                 yy_current_state = yy_next_state;
1001                                 goto yy_match;
1002                                 }
1003
1004                         else
1005                                 {
1006                                 yy_cp = yy_c_buf_p;
1007                                 goto yy_find_action;
1008                                 }
1009                         }
1010
1011                 else switch ( yy_get_next_buffer() )
1012                         {
1013                         case EOB_ACT_END_OF_FILE:
1014                                 {
1015                                 yy_did_buffer_switch_on_eof = 0;
1016
1017                                 if ( yywrap() )
1018                                         {
1019                                         /* Note: because we've taken care in
1020                                          * yy_get_next_buffer() to have set up
1021                                          * yytext, we can now set up
1022                                          * yy_c_buf_p so that if some total
1023                                          * hoser (like flex itself) wants to
1024                                          * call the scanner after we return the
1025                                          * YY_NULL, it'll still work - another
1026                                          * YY_NULL will get returned.
1027                                          */
1028                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1029
1030                                         yy_act = YY_STATE_EOF(YY_START);
1031                                         goto do_action;
1032                                         }
1033
1034                                 else
1035                                         {
1036                                         if ( ! yy_did_buffer_switch_on_eof )
1037                                                 YY_NEW_FILE;
1038                                         }
1039                                 break;
1040                                 }
1041
1042                         case EOB_ACT_CONTINUE_SCAN:
1043                                 yy_c_buf_p =
1044                                         yytext_ptr + yy_amount_of_matched_text;
1045
1046                                 yy_current_state = yy_get_previous_state();
1047
1048                                 yy_cp = yy_c_buf_p;
1049                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1050                                 goto yy_match;
1051
1052                         case EOB_ACT_LAST_MATCH:
1053                                 yy_c_buf_p =
1054                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1055
1056                                 yy_current_state = yy_get_previous_state();
1057
1058                                 yy_cp = yy_c_buf_p;
1059                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1060                                 goto yy_find_action;
1061                         }
1062                 break;
1063                 }
1064
1065         default:
1066                 YY_FATAL_ERROR(
1067                         "fatal flex scanner internal error--no action found" );
1068         } /* end of action switch */
1069                 } /* end of scanning one token */
1070         } /* end of yylex */
1071
1072
1073 /* yy_get_next_buffer - try to read in a new buffer
1074  *
1075  * Returns a code representing an action:
1076  *      EOB_ACT_LAST_MATCH -
1077  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1078  *      EOB_ACT_END_OF_FILE - end of file
1079  */
1080
1081 static int yy_get_next_buffer()
1082         {
1083         register char *dest = yy_current_buffer->yy_ch_buf;
1084         register char *source = yytext_ptr;
1085         register int number_to_move, i;
1086         int ret_val;
1087
1088         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1089                 YY_FATAL_ERROR(
1090                 "fatal flex scanner internal error--end of buffer missed" );
1091
1092         if ( yy_current_buffer->yy_fill_buffer == 0 )
1093                 { /* Don't try to fill the buffer, so this is an EOF. */
1094                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1095                         {
1096                         /* We matched a single character, the EOB, so
1097                          * treat this as a final EOF.
1098                          */
1099                         return EOB_ACT_END_OF_FILE;
1100                         }
1101
1102                 else
1103                         {
1104                         /* We matched some text prior to the EOB, first
1105                          * process it.
1106                          */
1107                         return EOB_ACT_LAST_MATCH;
1108                         }
1109                 }
1110
1111         /* Try to read more data. */
1112
1113         /* First move last chars to start of buffer. */
1114         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1115
1116         for ( i = 0; i < number_to_move; ++i )
1117                 *(dest++) = *(source++);
1118
1119         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1120                 /* don't do the read, it's not guaranteed to return an EOF,
1121                  * just force an EOF
1122                  */
1123                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1124
1125         else
1126                 {
1127                 int num_to_read =
1128                         yy_current_buffer->yy_buf_size - number_to_move - 1;
1129
1130                 while ( num_to_read <= 0 )
1131                         { /* Not enough room in the buffer - grow it. */
1132 #ifdef YY_USES_REJECT
1133                         YY_FATAL_ERROR(
1134 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1135 #else
1136
1137                         /* just a shorter name for the current buffer */
1138                         YY_BUFFER_STATE b = yy_current_buffer;
1139
1140                         int yy_c_buf_p_offset =
1141                                 (int) (yy_c_buf_p - b->yy_ch_buf);
1142
1143                         if ( b->yy_is_our_buffer )
1144                                 {
1145                                 int new_size = b->yy_buf_size * 2;
1146
1147                                 if ( new_size <= 0 )
1148                                         b->yy_buf_size += b->yy_buf_size / 8;
1149                                 else
1150                                         b->yy_buf_size *= 2;
1151
1152                                 b->yy_ch_buf = (char *)
1153                                         /* Include room in for 2 EOB chars. */
1154                                         yy_flex_realloc( (void *) b->yy_ch_buf,
1155                                                          b->yy_buf_size + 2 );
1156                                 }
1157                         else
1158                                 /* Can't grow it, we don't own it. */
1159                                 b->yy_ch_buf = 0;
1160
1161                         if ( ! b->yy_ch_buf )
1162                                 YY_FATAL_ERROR(
1163                                 "fatal error - scanner input buffer overflow" );
1164
1165                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1166
1167                         num_to_read = yy_current_buffer->yy_buf_size -
1168                                                 number_to_move - 1;
1169 #endif
1170                         }
1171
1172                 if ( num_to_read > YY_READ_BUF_SIZE )
1173                         num_to_read = YY_READ_BUF_SIZE;
1174
1175                 /* Read in more data. */
1176                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1177                         yy_n_chars, num_to_read );
1178
1179                 yy_current_buffer->yy_n_chars = yy_n_chars;
1180                 }
1181
1182         if ( yy_n_chars == 0 )
1183                 {
1184                 if ( number_to_move == YY_MORE_ADJ )
1185                         {
1186                         ret_val = EOB_ACT_END_OF_FILE;
1187                         yyrestart( yyin );
1188                         }
1189
1190                 else
1191                         {
1192                         ret_val = EOB_ACT_LAST_MATCH;
1193                         yy_current_buffer->yy_buffer_status =
1194                                 YY_BUFFER_EOF_PENDING;
1195                         }
1196                 }
1197
1198         else
1199                 ret_val = EOB_ACT_CONTINUE_SCAN;
1200
1201         yy_n_chars += number_to_move;
1202         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1203         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1204
1205         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1206
1207         return ret_val;
1208         }
1209
1210
1211 /* yy_get_previous_state - get the state just before the EOB char was reached */
1212
1213 static yy_state_type yy_get_previous_state()
1214         {
1215         register yy_state_type yy_current_state;
1216         register char *yy_cp;
1217
1218         yy_current_state = yy_start;
1219
1220         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1221                 {
1222                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1223                 if ( yy_accept[yy_current_state] )
1224                         {
1225                         yy_last_accepting_state = yy_current_state;
1226                         yy_last_accepting_cpos = yy_cp;
1227                         }
1228                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1229                         {
1230                         yy_current_state = (int) yy_def[yy_current_state];
1231                         if ( yy_current_state >= 61 )
1232                                 yy_c = yy_meta[(unsigned int) yy_c];
1233                         }
1234                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1235                 }
1236
1237         return yy_current_state;
1238         }
1239
1240
1241 /* yy_try_NUL_trans - try to make a transition on the NUL character
1242  *
1243  * synopsis
1244  *      next_state = yy_try_NUL_trans( current_state );
1245  */
1246
1247 #ifdef YY_USE_PROTOS
1248 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1249 #else
1250 static yy_state_type yy_try_NUL_trans( yy_current_state )
1251 yy_state_type yy_current_state;
1252 #endif
1253         {
1254         register int yy_is_jam;
1255         register char *yy_cp = yy_c_buf_p;
1256
1257         register YY_CHAR yy_c = 1;
1258         if ( yy_accept[yy_current_state] )
1259                 {
1260                 yy_last_accepting_state = yy_current_state;
1261                 yy_last_accepting_cpos = yy_cp;
1262                 }
1263         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1264                 {
1265                 yy_current_state = (int) yy_def[yy_current_state];
1266                 if ( yy_current_state >= 61 )
1267                         yy_c = yy_meta[(unsigned int) yy_c];
1268                 }
1269         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1270         yy_is_jam = (yy_current_state == 60);
1271
1272         return yy_is_jam ? 0 : yy_current_state;
1273         }
1274
1275
1276 #ifndef YY_NO_UNPUT
1277 #ifdef YY_USE_PROTOS
1278 static void yyunput( int c, register char *yy_bp )
1279 #else
1280 static void yyunput( c, yy_bp )
1281 int c;
1282 register char *yy_bp;
1283 #endif
1284         {
1285         register char *yy_cp = yy_c_buf_p;
1286
1287         /* undo effects of setting up yytext */
1288         *yy_cp = yy_hold_char;
1289
1290         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1291                 { /* need to shift things up to make room */
1292                 /* +2 for EOB chars. */
1293                 register int number_to_move = yy_n_chars + 2;
1294                 register char *dest = &yy_current_buffer->yy_ch_buf[
1295                                         yy_current_buffer->yy_buf_size + 2];
1296                 register char *source =
1297                                 &yy_current_buffer->yy_ch_buf[number_to_move];
1298
1299                 while ( source > yy_current_buffer->yy_ch_buf )
1300                         *--dest = *--source;
1301
1302                 yy_cp += (int) (dest - source);
1303                 yy_bp += (int) (dest - source);
1304                 yy_current_buffer->yy_n_chars =
1305                         yy_n_chars = yy_current_buffer->yy_buf_size;
1306
1307                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1308                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1309                 }
1310
1311         *--yy_cp = (char) c;
1312
1313
1314         yytext_ptr = yy_bp;
1315         yy_hold_char = *yy_cp;
1316         yy_c_buf_p = yy_cp;
1317         }
1318 #endif  /* ifndef YY_NO_UNPUT */
1319
1320
1321 #ifdef __cplusplus
1322 static int yyinput()
1323 #else
1324 static int input()
1325 #endif
1326         {
1327         int c;
1328
1329         *yy_c_buf_p = yy_hold_char;
1330
1331         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1332                 {
1333                 /* yy_c_buf_p now points to the character we want to return.
1334                  * If this occurs *before* the EOB characters, then it's a
1335                  * valid NUL; if not, then we've hit the end of the buffer.
1336                  */
1337                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1338                         /* This was really a NUL. */
1339                         *yy_c_buf_p = '\0';
1340
1341                 else
1342                         { /* need more input */
1343                         int offset = yy_c_buf_p - yytext_ptr;
1344                         ++yy_c_buf_p;
1345
1346                         switch ( yy_get_next_buffer() )
1347                                 {
1348                                 case EOB_ACT_LAST_MATCH:
1349                                         /* This happens because yy_g_n_b()
1350                                          * sees that we've accumulated a
1351                                          * token and flags that we need to
1352                                          * try matching the token before
1353                                          * proceeding.  But for input(),
1354                                          * there's no matching to consider.
1355                                          * So convert the EOB_ACT_LAST_MATCH
1356                                          * to EOB_ACT_END_OF_FILE.
1357                                          */
1358
1359                                         /* Reset buffer status. */
1360                                         yyrestart( yyin );
1361
1362                                         /* fall through */
1363
1364                                 case EOB_ACT_END_OF_FILE:
1365                                         {
1366                                         if ( yywrap() )
1367                                                 return EOF;
1368
1369                                         if ( ! yy_did_buffer_switch_on_eof )
1370                                                 YY_NEW_FILE;
1371 #ifdef __cplusplus
1372                                         return yyinput();
1373 #else
1374                                         return input();
1375 #endif
1376                                         }
1377
1378                                 case EOB_ACT_CONTINUE_SCAN:
1379                                         yy_c_buf_p = yytext_ptr + offset;
1380                                         break;
1381                                 }
1382                         }
1383                 }
1384
1385         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1386         *yy_c_buf_p = '\0';     /* preserve yytext */
1387         yy_hold_char = *++yy_c_buf_p;
1388
1389
1390         return c;
1391         }
1392
1393
1394 #ifdef YY_USE_PROTOS
1395 void yyrestart( FILE *input_file )
1396 #else
1397 void yyrestart( input_file )
1398 FILE *input_file;
1399 #endif
1400         {
1401         if ( ! yy_current_buffer )
1402                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1403
1404         yy_init_buffer( yy_current_buffer, input_file );
1405         yy_load_buffer_state();
1406         }
1407
1408
1409 #ifdef YY_USE_PROTOS
1410 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1411 #else
1412 void yy_switch_to_buffer( new_buffer )
1413 YY_BUFFER_STATE new_buffer;
1414 #endif
1415         {
1416         if ( yy_current_buffer == new_buffer )
1417                 return;
1418
1419         if ( yy_current_buffer )
1420                 {
1421                 /* Flush out information for old buffer. */
1422                 *yy_c_buf_p = yy_hold_char;
1423                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1424                 yy_current_buffer->yy_n_chars = yy_n_chars;
1425                 }
1426
1427         yy_current_buffer = new_buffer;
1428         yy_load_buffer_state();
1429
1430         /* We don't actually know whether we did this switch during
1431          * EOF (yywrap()) processing, but the only time this flag
1432          * is looked at is after yywrap() is called, so it's safe
1433          * to go ahead and always set it.
1434          */
1435         yy_did_buffer_switch_on_eof = 1;
1436         }
1437
1438
1439 #ifdef YY_USE_PROTOS
1440 void yy_load_buffer_state( void )
1441 #else
1442 void yy_load_buffer_state()
1443 #endif
1444         {
1445         yy_n_chars = yy_current_buffer->yy_n_chars;
1446         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1447         yyin = yy_current_buffer->yy_input_file;
1448         yy_hold_char = *yy_c_buf_p;
1449         }
1450
1451
1452 #ifdef YY_USE_PROTOS
1453 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1454 #else
1455 YY_BUFFER_STATE yy_create_buffer( file, size )
1456 FILE *file;
1457 int size;
1458 #endif
1459         {
1460         YY_BUFFER_STATE b;
1461
1462         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1463         if ( ! b )
1464                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1465
1466         b->yy_buf_size = size;
1467
1468         /* yy_ch_buf has to be 2 characters longer than the size given because
1469          * we need to put in 2 end-of-buffer characters.
1470          */
1471         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1472         if ( ! b->yy_ch_buf )
1473                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1474
1475         b->yy_is_our_buffer = 1;
1476
1477         yy_init_buffer( b, file );
1478
1479         return b;
1480         }
1481
1482
1483 #ifdef YY_USE_PROTOS
1484 void yy_delete_buffer( YY_BUFFER_STATE b )
1485 #else
1486 void yy_delete_buffer( b )
1487 YY_BUFFER_STATE b;
1488 #endif
1489         {
1490         if ( ! b )
1491                 return;
1492
1493         if ( b == yy_current_buffer )
1494                 yy_current_buffer = (YY_BUFFER_STATE) 0;
1495
1496         if ( b->yy_is_our_buffer )
1497                 yy_flex_free( (void *) b->yy_ch_buf );
1498
1499         yy_flex_free( (void *) b );
1500         }
1501
1502
1503 #ifndef _WIN32
1504 #include <unistd.h>
1505 #else
1506 #ifndef YY_ALWAYS_INTERACTIVE
1507 #ifndef YY_NEVER_INTERACTIVE
1508 extern int isatty YY_PROTO(( int ));
1509 #endif
1510 #endif
1511 #endif
1512
1513 #ifdef YY_USE_PROTOS
1514 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1515 #else
1516 void yy_init_buffer( b, file )
1517 YY_BUFFER_STATE b;
1518 FILE *file;
1519 #endif
1520
1521
1522         {
1523         yy_flush_buffer( b );
1524
1525         b->yy_input_file = file;
1526         b->yy_fill_buffer = 1;
1527
1528 #if YY_ALWAYS_INTERACTIVE
1529         b->yy_is_interactive = 1;
1530 #else
1531 #if YY_NEVER_INTERACTIVE
1532         b->yy_is_interactive = 0;
1533 #else
1534         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1535 #endif
1536 #endif
1537         }
1538
1539
1540 #ifdef YY_USE_PROTOS
1541 void yy_flush_buffer( YY_BUFFER_STATE b )
1542 #else
1543 void yy_flush_buffer( b )
1544 YY_BUFFER_STATE b;
1545 #endif
1546
1547         {
1548         if ( ! b )
1549                 return;
1550
1551         b->yy_n_chars = 0;
1552
1553         /* We always need two end-of-buffer characters.  The first causes
1554          * a transition to the end-of-buffer state.  The second causes
1555          * a jam in that state.
1556          */
1557         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1558         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1559
1560         b->yy_buf_pos = &b->yy_ch_buf[0];
1561
1562         b->yy_at_bol = 1;
1563         b->yy_buffer_status = YY_BUFFER_NEW;
1564
1565         if ( b == yy_current_buffer )
1566                 yy_load_buffer_state();
1567         }
1568
1569
1570 #ifndef YY_NO_SCAN_BUFFER
1571 #ifdef YY_USE_PROTOS
1572 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1573 #else
1574 YY_BUFFER_STATE yy_scan_buffer( base, size )
1575 char *base;
1576 yy_size_t size;
1577 #endif
1578         {
1579         YY_BUFFER_STATE b;
1580
1581         if ( size < 2 ||
1582              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1583              base[size-1] != YY_END_OF_BUFFER_CHAR )
1584                 /* They forgot to leave room for the EOB's. */
1585                 return 0;
1586
1587         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1588         if ( ! b )
1589                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1590
1591         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1592         b->yy_buf_pos = b->yy_ch_buf = base;
1593         b->yy_is_our_buffer = 0;
1594         b->yy_input_file = 0;
1595         b->yy_n_chars = b->yy_buf_size;
1596         b->yy_is_interactive = 0;
1597         b->yy_at_bol = 1;
1598         b->yy_fill_buffer = 0;
1599         b->yy_buffer_status = YY_BUFFER_NEW;
1600
1601         yy_switch_to_buffer( b );
1602
1603         return b;
1604         }
1605 #endif
1606
1607
1608 #ifndef YY_NO_SCAN_STRING
1609 #ifdef YY_USE_PROTOS
1610 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1611 #else
1612 YY_BUFFER_STATE yy_scan_string( yy_str )
1613 yyconst char *yy_str;
1614 #endif
1615         {
1616         int len;
1617         for ( len = 0; yy_str[len]; ++len )
1618                 ;
1619
1620         return yy_scan_bytes( yy_str, len );
1621         }
1622 #endif
1623
1624
1625 #ifndef YY_NO_SCAN_BYTES
1626 #ifdef YY_USE_PROTOS
1627 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1628 #else
1629 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1630 yyconst char *bytes;
1631 int len;
1632 #endif
1633         {
1634         YY_BUFFER_STATE b;
1635         char *buf;
1636         yy_size_t n;
1637         int i;
1638
1639         /* Get memory for full buffer, including space for trailing EOB's. */
1640         n = len + 2;
1641         buf = (char *) yy_flex_alloc( n );
1642         if ( ! buf )
1643                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1644
1645         for ( i = 0; i < len; ++i )
1646                 buf[i] = bytes[i];
1647
1648         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1649
1650         b = yy_scan_buffer( buf, n );
1651         if ( ! b )
1652                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1653
1654         /* It's okay to grow etc. this buffer, and we should throw it
1655          * away when we're done.
1656          */
1657         b->yy_is_our_buffer = 1;
1658
1659         return b;
1660         }
1661 #endif
1662
1663
1664 #ifndef YY_NO_PUSH_STATE
1665 #ifdef YY_USE_PROTOS
1666 static void yy_push_state( int new_state )
1667 #else
1668 static void yy_push_state( new_state )
1669 int new_state;
1670 #endif
1671         {
1672         if ( yy_start_stack_ptr >= yy_start_stack_depth )
1673                 {
1674                 yy_size_t new_size;
1675
1676                 yy_start_stack_depth += YY_START_STACK_INCR;
1677                 new_size = yy_start_stack_depth * sizeof( int );
1678
1679                 if ( ! yy_start_stack )
1680                         yy_start_stack = (int *) yy_flex_alloc( new_size );
1681
1682                 else
1683                         yy_start_stack = (int *) yy_flex_realloc(
1684                                         (void *) yy_start_stack, new_size );
1685
1686                 if ( ! yy_start_stack )
1687                         YY_FATAL_ERROR(
1688                         "out of memory expanding start-condition stack" );
1689                 }
1690
1691         yy_start_stack[yy_start_stack_ptr++] = YY_START;
1692
1693         BEGIN(new_state);
1694         }
1695 #endif
1696
1697
1698 #ifndef YY_NO_POP_STATE
1699 static void yy_pop_state()
1700         {
1701         if ( --yy_start_stack_ptr < 0 )
1702                 YY_FATAL_ERROR( "start-condition stack underflow" );
1703
1704         BEGIN(yy_start_stack[yy_start_stack_ptr]);
1705         }
1706 #endif
1707
1708
1709 #ifndef YY_NO_TOP_STATE
1710 static int yy_top_state()
1711         {
1712         return yy_start_stack[yy_start_stack_ptr - 1];
1713         }
1714 #endif
1715
1716 #ifndef YY_EXIT_FAILURE
1717 #define YY_EXIT_FAILURE 2
1718 #endif
1719
1720 #ifdef YY_USE_PROTOS
1721 static void yy_fatal_error( yyconst char msg[] )
1722 #else
1723 static void yy_fatal_error( msg )
1724 char msg[];
1725 #endif
1726         {
1727         (void) fprintf( stderr, "%s\n", msg );
1728         exit( YY_EXIT_FAILURE );
1729         }
1730
1731
1732
1733 /* Redefine yyless() so it works in section 3 code. */
1734
1735 #undef yyless
1736 #define yyless(n) \
1737         do \
1738                 { \
1739                 /* Undo effects of setting up yytext. */ \
1740                 yytext[yyleng] = yy_hold_char; \
1741                 yy_c_buf_p = yytext + n; \
1742                 yy_hold_char = *yy_c_buf_p; \
1743                 *yy_c_buf_p = '\0'; \
1744                 yyleng = n; \
1745                 } \
1746         while ( 0 )
1747
1748
1749 /* Internal utility routines. */
1750
1751 #ifndef yytext_ptr
1752 #ifdef YY_USE_PROTOS
1753 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1754 #else
1755 static void yy_flex_strncpy( s1, s2, n )
1756 char *s1;
1757 yyconst char *s2;
1758 int n;
1759 #endif
1760         {
1761         register int i;
1762         for ( i = 0; i < n; ++i )
1763                 s1[i] = s2[i];
1764         }
1765 #endif
1766
1767 #ifdef YY_NEED_STRLEN
1768 #ifdef YY_USE_PROTOS
1769 static int yy_flex_strlen( yyconst char *s )
1770 #else
1771 static int yy_flex_strlen( s )
1772 yyconst char *s;
1773 #endif
1774         {
1775         register int n;
1776         for ( n = 0; s[n]; ++n )
1777                 ;
1778
1779         return n;
1780         }
1781 #endif
1782
1783
1784 #ifdef YY_USE_PROTOS
1785 static void *yy_flex_alloc( yy_size_t size )
1786 #else
1787 static void *yy_flex_alloc( size )
1788 yy_size_t size;
1789 #endif
1790         {
1791         return (void *) malloc( size );
1792         }
1793
1794 #ifdef YY_USE_PROTOS
1795 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1796 #else
1797 static void *yy_flex_realloc( ptr, size )
1798 void *ptr;
1799 yy_size_t size;
1800 #endif
1801         {
1802         /* The cast to (char *) in the following accommodates both
1803          * implementations that use char* generic pointers, and those
1804          * that use void* generic pointers.  It works with the latter
1805          * because both ANSI C and C++ allow castless assignment from
1806          * any pointer type to void*, and deal with argument conversions
1807          * as though doing an assignment.
1808          */
1809         return (void *) realloc( (char *) ptr, size );
1810         }
1811
1812 #ifdef YY_USE_PROTOS
1813 static void yy_flex_free( void *ptr )
1814 #else
1815 static void yy_flex_free( ptr )
1816 void *ptr;
1817 #endif
1818         {
1819         free( ptr );
1820         }
1821
1822 #if YY_MAIN
1823 int main()
1824         {
1825         yylex();
1826         return 0;
1827         }
1828 #endif
1829 #line 176 "gras/DataDesc/ddt_parse.yy.l"
1830
1831 /* {space}+                { return(TOKEN_SPACE);} */
1832
1833 void gras_ddt_parse_dump(void) {
1834   switch(gras_ddt_parse_tok_num) {
1835   case GRAS_DDT_PARSE_TOKEN_LA      : {printf("TOKEN_LA ");break;}
1836   case GRAS_DDT_PARSE_TOKEN_RA      : {printf("TOKEN_RA ");break;}
1837   case GRAS_DDT_PARSE_TOKEN_WORD    : {printf("TOKEN_WORD ");break;}
1838     /*  case GRAS_DDT_PARSE_TOKEN_SPACE   : {printf("TOKEN_SPACE ");break;}*/
1839     /*  case GRAS_DDT_PARSE_TOKEN_COMMENT : {printf("TOKEN_COMMENT ");break;}*/
1840   case GRAS_DDT_PARSE_TOKEN_NEWLINE : {printf("TOKEN_NEWLINE\n");return;}
1841   case GRAS_DDT_PARSE_TOKEN_EMPTY : {printf("TOKEN_EMPTY\n");return;}
1842   default             : {printf("Unknown token %d\n", gras_ddt_parse_tok_num);return;}
1843   }
1844   printf("-->%s<-- [line %d, pos %d]\n",yytext,gras_ddt_parse_line_pos,gras_ddt_parse_char_pos);
1845   return;
1846 }
1847
1848 int gras_ddt_parse_lex_n_dump(void) {
1849   gras_ddt_parse_tok_num = gras_ddt_parse_lex();
1850   /*  gras_ddt_parse_char_pos += strlen(yytext);*/
1851   return(gras_ddt_parse_tok_num);
1852 }
1853
1854 void  gras_ddt_parse_pointer_init(const char *file) {
1855   file_to_parse = fopen(file,"r");
1856   input_buffer = yy_create_buffer( file_to_parse, 10 );
1857   yy_switch_to_buffer(input_buffer);
1858
1859   gras_ddt_parse_line_pos = 1;
1860   gras_ddt_parse_char_pos = 0;
1861   gras_ddt_parse_col_pos = 0;
1862   gras_ddt_parse_tok_num = 0;
1863 }
1864
1865 void  gras_ddt_parse_pointer_close(void) {
1866   yy_delete_buffer(input_buffer);
1867   fclose(file_to_parse);
1868
1869   gras_ddt_parse_line_pos = 1;
1870   gras_ddt_parse_char_pos = 0;
1871   gras_ddt_parse_tok_num = 0;
1872 }
1873
1874
1875 void  gras_ddt_parse_pointer_string_init(const char *string_to_parse) {
1876   input_buffer = yy_scan_string (string_to_parse);
1877   definition = string_to_parse;
1878   yy_switch_to_buffer(input_buffer);
1879
1880   gras_ddt_parse_line_pos = 1;
1881   gras_ddt_parse_char_pos = 0;
1882   gras_ddt_parse_tok_num = 0;
1883 }
1884
1885 void  gras_ddt_parse_pointer_string_close(void) {
1886   yy_delete_buffer(input_buffer);
1887
1888   gras_ddt_parse_line_pos = 1;
1889   gras_ddt_parse_char_pos = 0;
1890   gras_ddt_parse_tok_num = 0;
1891 }
1892
1893 /* Local variables:*/
1894 /* mode: c */
1895 /* End: */