Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
b0775f779aff6cad700bd979e108936d6e4d1cfa
[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);
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 /*g [string] g*/ are not comments but size annotations
768   comment_caller = INITIAL;
769   BEGIN(comment);
770 }
771         YY_BREAK
772 case 9:
773 YY_RULE_SETUP
774 #line 83 "gras/DataDesc/ddt_parse.yy.l"
775 {
776   comment_caller = foo;
777   BEGIN(comment);
778 }
779         YY_BREAK
780 case 10:
781 YY_RULE_SETUP
782 #line 88 "gras/DataDesc/ddt_parse.yy.l"
783 { /* eat anything that's not a '*' */
784 }
785         YY_BREAK
786 case 11:
787 YY_RULE_SETUP
788 #line 90 "gras/DataDesc/ddt_parse.yy.l"
789 { /* eat up '*'s not followed by '/'s */
790 }
791         YY_BREAK
792 case 12:
793 YY_RULE_SETUP
794 #line 92 "gras/DataDesc/ddt_parse.yy.l"
795 {
796   ++gras_ddt_parse_line_pos;
797   gras_ddt_parse_col_pos=0;
798   gras_ddt_parse_char_pos++;
799 }
800         YY_BREAK
801 case 13:
802 YY_RULE_SETUP
803 #line 97 "gras/DataDesc/ddt_parse.yy.l"
804 {
805   gras_ddt_parse_char_pos+= strlen(yytext);
806   gras_ddt_parse_col_pos+= strlen(yytext);
807   BEGIN(comment_caller);
808 }
809         YY_BREAK
810 case 14:
811 YY_RULE_SETUP
812 #line 103 "gras/DataDesc/ddt_parse.yy.l"
813 {  /****************** STATEMENTS ************************/
814   gras_ddt_parse_char_pos += strlen(yytext);
815   gras_ddt_parse_col_pos += strlen(yytext);
816   SHOW_WHERE;
817   return(GRAS_DDT_PARSE_TOKEN_WORD);
818 }
819         YY_BREAK
820 case 15:
821 YY_RULE_SETUP
822 #line 109 "gras/DataDesc/ddt_parse.yy.l"
823
824   gras_ddt_parse_char_pos++; 
825   gras_ddt_parse_col_pos++; 
826   SHOW_WHERE;
827   return(GRAS_DDT_PARSE_TOKEN_LA);
828 }
829         YY_BREAK
830 case 16:
831 YY_RULE_SETUP
832 #line 115 "gras/DataDesc/ddt_parse.yy.l"
833 {
834   gras_ddt_parse_char_pos++;
835   gras_ddt_parse_col_pos++;
836   SHOW_WHERE;
837   return(GRAS_DDT_PARSE_TOKEN_RA);
838 }
839         YY_BREAK
840 case 17:
841 YY_RULE_SETUP
842 #line 121 "gras/DataDesc/ddt_parse.yy.l"
843
844   gras_ddt_parse_char_pos++; 
845   gras_ddt_parse_col_pos++; 
846   SHOW_WHERE;
847   return(GRAS_DDT_PARSE_TOKEN_LB);
848 }
849         YY_BREAK
850 case 18:
851 YY_RULE_SETUP
852 #line 127 "gras/DataDesc/ddt_parse.yy.l"
853 {
854   gras_ddt_parse_char_pos++;
855   gras_ddt_parse_col_pos++;
856   SHOW_WHERE;
857   return(GRAS_DDT_PARSE_TOKEN_RB);
858 }
859         YY_BREAK
860 case 19:
861 YY_RULE_SETUP
862 #line 133 "gras/DataDesc/ddt_parse.yy.l"
863
864   gras_ddt_parse_char_pos++; 
865   gras_ddt_parse_col_pos++; 
866   SHOW_WHERE;
867   return(GRAS_DDT_PARSE_TOKEN_LP);
868 }
869         YY_BREAK
870 case 20:
871 YY_RULE_SETUP
872 #line 139 "gras/DataDesc/ddt_parse.yy.l"
873 {
874   gras_ddt_parse_char_pos++;
875   gras_ddt_parse_col_pos++;
876   SHOW_WHERE;
877   return(GRAS_DDT_PARSE_TOKEN_RP);
878 }
879         YY_BREAK
880 case 21:
881 YY_RULE_SETUP
882 #line 145 "gras/DataDesc/ddt_parse.yy.l"
883 {
884   gras_ddt_parse_char_pos++;
885   gras_ddt_parse_col_pos++;
886   SHOW_WHERE;
887   return(GRAS_DDT_PARSE_TOKEN_STAR);
888 }
889         YY_BREAK
890 case 22:
891 YY_RULE_SETUP
892 #line 151 "gras/DataDesc/ddt_parse.yy.l"
893 {
894   gras_ddt_parse_char_pos++;
895   gras_ddt_parse_col_pos++;
896   SHOW_WHERE;
897   return(GRAS_DDT_PARSE_TOKEN_SEMI_COLON);
898 }
899         YY_BREAK
900 case 23:
901 YY_RULE_SETUP
902 #line 157 "gras/DataDesc/ddt_parse.yy.l"
903
904   gras_ddt_parse_char_pos++;
905   gras_ddt_parse_col_pos++;
906   SHOW_WHERE;
907   return(GRAS_DDT_PARSE_TOKEN_COLON);
908 }
909         YY_BREAK
910 case 24:
911 YY_RULE_SETUP
912 #line 163 "gras/DataDesc/ddt_parse.yy.l"
913 {
914  gras_ddt_parse_line_pos++; 
915  gras_ddt_parse_char_pos++;
916  gras_ddt_parse_col_pos=0;
917   SHOW_WHERE;
918 }
919         YY_BREAK
920 case 25:
921 YY_RULE_SETUP
922 #line 169 "gras/DataDesc/ddt_parse.yy.l"
923
924   gras_ddt_parse_char_pos++;
925   gras_ddt_parse_col_pos++;
926   SHOW_WHERE;
927 }
928         YY_BREAK
929 case 26:
930 YY_RULE_SETUP
931 #line 174 "gras/DataDesc/ddt_parse.yy.l"
932 ECHO;
933         YY_BREAK
934 #line 935 "gras/DataDesc/ddt_parse.yy.c"
935 case YY_STATE_EOF(INITIAL):
936 case YY_STATE_EOF(annotate):
937 case YY_STATE_EOF(comment):
938 case YY_STATE_EOF(foo):
939         yyterminate();
940
941         case YY_END_OF_BUFFER:
942                 {
943                 /* Amount of text matched not including the EOB char. */
944                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
945
946                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
947                 *yy_cp = yy_hold_char;
948                 YY_RESTORE_YY_MORE_OFFSET
949
950                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
951                         {
952                         /* We're scanning a new file or input source.  It's
953                          * possible that this happened because the user
954                          * just pointed yyin at a new source and called
955                          * yylex().  If so, then we have to assure
956                          * consistency between yy_current_buffer and our
957                          * globals.  Here is the right place to do so, because
958                          * this is the first action (other than possibly a
959                          * back-up) that will match for the new input source.
960                          */
961                         yy_n_chars = yy_current_buffer->yy_n_chars;
962                         yy_current_buffer->yy_input_file = yyin;
963                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
964                         }
965
966                 /* Note that here we test for yy_c_buf_p "<=" to the position
967                  * of the first EOB in the buffer, since yy_c_buf_p will
968                  * already have been incremented past the NUL character
969                  * (since all states make transitions on EOB to the
970                  * end-of-buffer state).  Contrast this with the test
971                  * in input().
972                  */
973                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
974                         { /* This was really a NUL. */
975                         yy_state_type yy_next_state;
976
977                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
978
979                         yy_current_state = yy_get_previous_state();
980
981                         /* Okay, we're now positioned to make the NUL
982                          * transition.  We couldn't have
983                          * yy_get_previous_state() go ahead and do it
984                          * for us because it doesn't know how to deal
985                          * with the possibility of jamming (and we don't
986                          * want to build jamming into it because then it
987                          * will run more slowly).
988                          */
989
990                         yy_next_state = yy_try_NUL_trans( yy_current_state );
991
992                         yy_bp = yytext_ptr + YY_MORE_ADJ;
993
994                         if ( yy_next_state )
995                                 {
996                                 /* Consume the NUL. */
997                                 yy_cp = ++yy_c_buf_p;
998                                 yy_current_state = yy_next_state;
999                                 goto yy_match;
1000                                 }
1001
1002                         else
1003                                 {
1004                                 yy_cp = yy_c_buf_p;
1005                                 goto yy_find_action;
1006                                 }
1007                         }
1008
1009                 else switch ( yy_get_next_buffer() )
1010                         {
1011                         case EOB_ACT_END_OF_FILE:
1012                                 {
1013                                 yy_did_buffer_switch_on_eof = 0;
1014
1015                                 if ( yywrap() )
1016                                         {
1017                                         /* Note: because we've taken care in
1018                                          * yy_get_next_buffer() to have set up
1019                                          * yytext, we can now set up
1020                                          * yy_c_buf_p so that if some total
1021                                          * hoser (like flex itself) wants to
1022                                          * call the scanner after we return the
1023                                          * YY_NULL, it'll still work - another
1024                                          * YY_NULL will get returned.
1025                                          */
1026                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1027
1028                                         yy_act = YY_STATE_EOF(YY_START);
1029                                         goto do_action;
1030                                         }
1031
1032                                 else
1033                                         {
1034                                         if ( ! yy_did_buffer_switch_on_eof )
1035                                                 YY_NEW_FILE;
1036                                         }
1037                                 break;
1038                                 }
1039
1040                         case EOB_ACT_CONTINUE_SCAN:
1041                                 yy_c_buf_p =
1042                                         yytext_ptr + yy_amount_of_matched_text;
1043
1044                                 yy_current_state = yy_get_previous_state();
1045
1046                                 yy_cp = yy_c_buf_p;
1047                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1048                                 goto yy_match;
1049
1050                         case EOB_ACT_LAST_MATCH:
1051                                 yy_c_buf_p =
1052                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1053
1054                                 yy_current_state = yy_get_previous_state();
1055
1056                                 yy_cp = yy_c_buf_p;
1057                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1058                                 goto yy_find_action;
1059                         }
1060                 break;
1061                 }
1062
1063         default:
1064                 YY_FATAL_ERROR(
1065                         "fatal flex scanner internal error--no action found" );
1066         } /* end of action switch */
1067                 } /* end of scanning one token */
1068         } /* end of yylex */
1069
1070
1071 /* yy_get_next_buffer - try to read in a new buffer
1072  *
1073  * Returns a code representing an action:
1074  *      EOB_ACT_LAST_MATCH -
1075  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1076  *      EOB_ACT_END_OF_FILE - end of file
1077  */
1078
1079 static int yy_get_next_buffer()
1080         {
1081         register char *dest = yy_current_buffer->yy_ch_buf;
1082         register char *source = yytext_ptr;
1083         register int number_to_move, i;
1084         int ret_val;
1085
1086         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1087                 YY_FATAL_ERROR(
1088                 "fatal flex scanner internal error--end of buffer missed" );
1089
1090         if ( yy_current_buffer->yy_fill_buffer == 0 )
1091                 { /* Don't try to fill the buffer, so this is an EOF. */
1092                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1093                         {
1094                         /* We matched a single character, the EOB, so
1095                          * treat this as a final EOF.
1096                          */
1097                         return EOB_ACT_END_OF_FILE;
1098                         }
1099
1100                 else
1101                         {
1102                         /* We matched some text prior to the EOB, first
1103                          * process it.
1104                          */
1105                         return EOB_ACT_LAST_MATCH;
1106                         }
1107                 }
1108
1109         /* Try to read more data. */
1110
1111         /* First move last chars to start of buffer. */
1112         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1113
1114         for ( i = 0; i < number_to_move; ++i )
1115                 *(dest++) = *(source++);
1116
1117         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1118                 /* don't do the read, it's not guaranteed to return an EOF,
1119                  * just force an EOF
1120                  */
1121                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1122
1123         else
1124                 {
1125                 int num_to_read =
1126                         yy_current_buffer->yy_buf_size - number_to_move - 1;
1127
1128                 while ( num_to_read <= 0 )
1129                         { /* Not enough room in the buffer - grow it. */
1130 #ifdef YY_USES_REJECT
1131                         YY_FATAL_ERROR(
1132 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1133 #else
1134
1135                         /* just a shorter name for the current buffer */
1136                         YY_BUFFER_STATE b = yy_current_buffer;
1137
1138                         int yy_c_buf_p_offset =
1139                                 (int) (yy_c_buf_p - b->yy_ch_buf);
1140
1141                         if ( b->yy_is_our_buffer )
1142                                 {
1143                                 int new_size = b->yy_buf_size * 2;
1144
1145                                 if ( new_size <= 0 )
1146                                         b->yy_buf_size += b->yy_buf_size / 8;
1147                                 else
1148                                         b->yy_buf_size *= 2;
1149
1150                                 b->yy_ch_buf = (char *)
1151                                         /* Include room in for 2 EOB chars. */
1152                                         yy_flex_realloc( (void *) b->yy_ch_buf,
1153                                                          b->yy_buf_size + 2 );
1154                                 }
1155                         else
1156                                 /* Can't grow it, we don't own it. */
1157                                 b->yy_ch_buf = 0;
1158
1159                         if ( ! b->yy_ch_buf )
1160                                 YY_FATAL_ERROR(
1161                                 "fatal error - scanner input buffer overflow" );
1162
1163                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1164
1165                         num_to_read = yy_current_buffer->yy_buf_size -
1166                                                 number_to_move - 1;
1167 #endif
1168                         }
1169
1170                 if ( num_to_read > YY_READ_BUF_SIZE )
1171                         num_to_read = YY_READ_BUF_SIZE;
1172
1173                 /* Read in more data. */
1174                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1175                         yy_n_chars, num_to_read );
1176
1177                 yy_current_buffer->yy_n_chars = yy_n_chars;
1178                 }
1179
1180         if ( yy_n_chars == 0 )
1181                 {
1182                 if ( number_to_move == YY_MORE_ADJ )
1183                         {
1184                         ret_val = EOB_ACT_END_OF_FILE;
1185                         yyrestart( yyin );
1186                         }
1187
1188                 else
1189                         {
1190                         ret_val = EOB_ACT_LAST_MATCH;
1191                         yy_current_buffer->yy_buffer_status =
1192                                 YY_BUFFER_EOF_PENDING;
1193                         }
1194                 }
1195
1196         else
1197                 ret_val = EOB_ACT_CONTINUE_SCAN;
1198
1199         yy_n_chars += number_to_move;
1200         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1201         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1202
1203         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1204
1205         return ret_val;
1206         }
1207
1208
1209 /* yy_get_previous_state - get the state just before the EOB char was reached */
1210
1211 static yy_state_type yy_get_previous_state()
1212         {
1213         register yy_state_type yy_current_state;
1214         register char *yy_cp;
1215
1216         yy_current_state = yy_start;
1217
1218         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1219                 {
1220                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1221                 if ( yy_accept[yy_current_state] )
1222                         {
1223                         yy_last_accepting_state = yy_current_state;
1224                         yy_last_accepting_cpos = yy_cp;
1225                         }
1226                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1227                         {
1228                         yy_current_state = (int) yy_def[yy_current_state];
1229                         if ( yy_current_state >= 61 )
1230                                 yy_c = yy_meta[(unsigned int) yy_c];
1231                         }
1232                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1233                 }
1234
1235         return yy_current_state;
1236         }
1237
1238
1239 /* yy_try_NUL_trans - try to make a transition on the NUL character
1240  *
1241  * synopsis
1242  *      next_state = yy_try_NUL_trans( current_state );
1243  */
1244
1245 #ifdef YY_USE_PROTOS
1246 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1247 #else
1248 static yy_state_type yy_try_NUL_trans( yy_current_state )
1249 yy_state_type yy_current_state;
1250 #endif
1251         {
1252         register int yy_is_jam;
1253         register char *yy_cp = yy_c_buf_p;
1254
1255         register YY_CHAR yy_c = 1;
1256         if ( yy_accept[yy_current_state] )
1257                 {
1258                 yy_last_accepting_state = yy_current_state;
1259                 yy_last_accepting_cpos = yy_cp;
1260                 }
1261         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1262                 {
1263                 yy_current_state = (int) yy_def[yy_current_state];
1264                 if ( yy_current_state >= 61 )
1265                         yy_c = yy_meta[(unsigned int) yy_c];
1266                 }
1267         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1268         yy_is_jam = (yy_current_state == 60);
1269
1270         return yy_is_jam ? 0 : yy_current_state;
1271         }
1272
1273
1274 #ifndef YY_NO_UNPUT
1275 #ifdef YY_USE_PROTOS
1276 static void yyunput( int c, register char *yy_bp )
1277 #else
1278 static void yyunput( c, yy_bp )
1279 int c;
1280 register char *yy_bp;
1281 #endif
1282         {
1283         register char *yy_cp = yy_c_buf_p;
1284
1285         /* undo effects of setting up yytext */
1286         *yy_cp = yy_hold_char;
1287
1288         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1289                 { /* need to shift things up to make room */
1290                 /* +2 for EOB chars. */
1291                 register int number_to_move = yy_n_chars + 2;
1292                 register char *dest = &yy_current_buffer->yy_ch_buf[
1293                                         yy_current_buffer->yy_buf_size + 2];
1294                 register char *source =
1295                                 &yy_current_buffer->yy_ch_buf[number_to_move];
1296
1297                 while ( source > yy_current_buffer->yy_ch_buf )
1298                         *--dest = *--source;
1299
1300                 yy_cp += (int) (dest - source);
1301                 yy_bp += (int) (dest - source);
1302                 yy_current_buffer->yy_n_chars =
1303                         yy_n_chars = yy_current_buffer->yy_buf_size;
1304
1305                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1306                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1307                 }
1308
1309         *--yy_cp = (char) c;
1310
1311
1312         yytext_ptr = yy_bp;
1313         yy_hold_char = *yy_cp;
1314         yy_c_buf_p = yy_cp;
1315         }
1316 #endif  /* ifndef YY_NO_UNPUT */
1317
1318
1319 #ifdef __cplusplus
1320 static int yyinput()
1321 #else
1322 static int input()
1323 #endif
1324         {
1325         int c;
1326
1327         *yy_c_buf_p = yy_hold_char;
1328
1329         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1330                 {
1331                 /* yy_c_buf_p now points to the character we want to return.
1332                  * If this occurs *before* the EOB characters, then it's a
1333                  * valid NUL; if not, then we've hit the end of the buffer.
1334                  */
1335                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1336                         /* This was really a NUL. */
1337                         *yy_c_buf_p = '\0';
1338
1339                 else
1340                         { /* need more input */
1341                         int offset = yy_c_buf_p - yytext_ptr;
1342                         ++yy_c_buf_p;
1343
1344                         switch ( yy_get_next_buffer() )
1345                                 {
1346                                 case EOB_ACT_LAST_MATCH:
1347                                         /* This happens because yy_g_n_b()
1348                                          * sees that we've accumulated a
1349                                          * token and flags that we need to
1350                                          * try matching the token before
1351                                          * proceeding.  But for input(),
1352                                          * there's no matching to consider.
1353                                          * So convert the EOB_ACT_LAST_MATCH
1354                                          * to EOB_ACT_END_OF_FILE.
1355                                          */
1356
1357                                         /* Reset buffer status. */
1358                                         yyrestart( yyin );
1359
1360                                         /* fall through */
1361
1362                                 case EOB_ACT_END_OF_FILE:
1363                                         {
1364                                         if ( yywrap() )
1365                                                 return EOF;
1366
1367                                         if ( ! yy_did_buffer_switch_on_eof )
1368                                                 YY_NEW_FILE;
1369 #ifdef __cplusplus
1370                                         return yyinput();
1371 #else
1372                                         return input();
1373 #endif
1374                                         }
1375
1376                                 case EOB_ACT_CONTINUE_SCAN:
1377                                         yy_c_buf_p = yytext_ptr + offset;
1378                                         break;
1379                                 }
1380                         }
1381                 }
1382
1383         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1384         *yy_c_buf_p = '\0';     /* preserve yytext */
1385         yy_hold_char = *++yy_c_buf_p;
1386
1387
1388         return c;
1389         }
1390
1391
1392 #ifdef YY_USE_PROTOS
1393 void yyrestart( FILE *input_file )
1394 #else
1395 void yyrestart( input_file )
1396 FILE *input_file;
1397 #endif
1398         {
1399         if ( ! yy_current_buffer )
1400                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1401
1402         yy_init_buffer( yy_current_buffer, input_file );
1403         yy_load_buffer_state();
1404         }
1405
1406
1407 #ifdef YY_USE_PROTOS
1408 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1409 #else
1410 void yy_switch_to_buffer( new_buffer )
1411 YY_BUFFER_STATE new_buffer;
1412 #endif
1413         {
1414         if ( yy_current_buffer == new_buffer )
1415                 return;
1416
1417         if ( yy_current_buffer )
1418                 {
1419                 /* Flush out information for old buffer. */
1420                 *yy_c_buf_p = yy_hold_char;
1421                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1422                 yy_current_buffer->yy_n_chars = yy_n_chars;
1423                 }
1424
1425         yy_current_buffer = new_buffer;
1426         yy_load_buffer_state();
1427
1428         /* We don't actually know whether we did this switch during
1429          * EOF (yywrap()) processing, but the only time this flag
1430          * is looked at is after yywrap() is called, so it's safe
1431          * to go ahead and always set it.
1432          */
1433         yy_did_buffer_switch_on_eof = 1;
1434         }
1435
1436
1437 #ifdef YY_USE_PROTOS
1438 void yy_load_buffer_state( void )
1439 #else
1440 void yy_load_buffer_state()
1441 #endif
1442         {
1443         yy_n_chars = yy_current_buffer->yy_n_chars;
1444         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1445         yyin = yy_current_buffer->yy_input_file;
1446         yy_hold_char = *yy_c_buf_p;
1447         }
1448
1449
1450 #ifdef YY_USE_PROTOS
1451 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1452 #else
1453 YY_BUFFER_STATE yy_create_buffer( file, size )
1454 FILE *file;
1455 int size;
1456 #endif
1457         {
1458         YY_BUFFER_STATE b;
1459
1460         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1461         if ( ! b )
1462                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1463
1464         b->yy_buf_size = size;
1465
1466         /* yy_ch_buf has to be 2 characters longer than the size given because
1467          * we need to put in 2 end-of-buffer characters.
1468          */
1469         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1470         if ( ! b->yy_ch_buf )
1471                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1472
1473         b->yy_is_our_buffer = 1;
1474
1475         yy_init_buffer( b, file );
1476
1477         return b;
1478         }
1479
1480
1481 #ifdef YY_USE_PROTOS
1482 void yy_delete_buffer( YY_BUFFER_STATE b )
1483 #else
1484 void yy_delete_buffer( b )
1485 YY_BUFFER_STATE b;
1486 #endif
1487         {
1488         if ( ! b )
1489                 return;
1490
1491         if ( b == yy_current_buffer )
1492                 yy_current_buffer = (YY_BUFFER_STATE) 0;
1493
1494         if ( b->yy_is_our_buffer )
1495                 yy_flex_free( (void *) b->yy_ch_buf );
1496
1497         yy_flex_free( (void *) b );
1498         }
1499
1500
1501 #ifndef _WIN32
1502 #include <unistd.h>
1503 #else
1504 #ifndef YY_ALWAYS_INTERACTIVE
1505 #ifndef YY_NEVER_INTERACTIVE
1506 extern int isatty YY_PROTO(( int ));
1507 #endif
1508 #endif
1509 #endif
1510
1511 #ifdef YY_USE_PROTOS
1512 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1513 #else
1514 void yy_init_buffer( b, file )
1515 YY_BUFFER_STATE b;
1516 FILE *file;
1517 #endif
1518
1519
1520         {
1521         yy_flush_buffer( b );
1522
1523         b->yy_input_file = file;
1524         b->yy_fill_buffer = 1;
1525
1526 #if YY_ALWAYS_INTERACTIVE
1527         b->yy_is_interactive = 1;
1528 #else
1529 #if YY_NEVER_INTERACTIVE
1530         b->yy_is_interactive = 0;
1531 #else
1532         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1533 #endif
1534 #endif
1535         }
1536
1537
1538 #ifdef YY_USE_PROTOS
1539 void yy_flush_buffer( YY_BUFFER_STATE b )
1540 #else
1541 void yy_flush_buffer( b )
1542 YY_BUFFER_STATE b;
1543 #endif
1544
1545         {
1546         if ( ! b )
1547                 return;
1548
1549         b->yy_n_chars = 0;
1550
1551         /* We always need two end-of-buffer characters.  The first causes
1552          * a transition to the end-of-buffer state.  The second causes
1553          * a jam in that state.
1554          */
1555         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1556         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1557
1558         b->yy_buf_pos = &b->yy_ch_buf[0];
1559
1560         b->yy_at_bol = 1;
1561         b->yy_buffer_status = YY_BUFFER_NEW;
1562
1563         if ( b == yy_current_buffer )
1564                 yy_load_buffer_state();
1565         }
1566
1567
1568 #ifndef YY_NO_SCAN_BUFFER
1569 #ifdef YY_USE_PROTOS
1570 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1571 #else
1572 YY_BUFFER_STATE yy_scan_buffer( base, size )
1573 char *base;
1574 yy_size_t size;
1575 #endif
1576         {
1577         YY_BUFFER_STATE b;
1578
1579         if ( size < 2 ||
1580              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1581              base[size-1] != YY_END_OF_BUFFER_CHAR )
1582                 /* They forgot to leave room for the EOB's. */
1583                 return 0;
1584
1585         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1586         if ( ! b )
1587                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1588
1589         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1590         b->yy_buf_pos = b->yy_ch_buf = base;
1591         b->yy_is_our_buffer = 0;
1592         b->yy_input_file = 0;
1593         b->yy_n_chars = b->yy_buf_size;
1594         b->yy_is_interactive = 0;
1595         b->yy_at_bol = 1;
1596         b->yy_fill_buffer = 0;
1597         b->yy_buffer_status = YY_BUFFER_NEW;
1598
1599         yy_switch_to_buffer( b );
1600
1601         return b;
1602         }
1603 #endif
1604
1605
1606 #ifndef YY_NO_SCAN_STRING
1607 #ifdef YY_USE_PROTOS
1608 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1609 #else
1610 YY_BUFFER_STATE yy_scan_string( yy_str )
1611 yyconst char *yy_str;
1612 #endif
1613         {
1614         int len;
1615         for ( len = 0; yy_str[len]; ++len )
1616                 ;
1617
1618         return yy_scan_bytes( yy_str, len );
1619         }
1620 #endif
1621
1622
1623 #ifndef YY_NO_SCAN_BYTES
1624 #ifdef YY_USE_PROTOS
1625 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1626 #else
1627 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1628 yyconst char *bytes;
1629 int len;
1630 #endif
1631         {
1632         YY_BUFFER_STATE b;
1633         char *buf;
1634         yy_size_t n;
1635         int i;
1636
1637         /* Get memory for full buffer, including space for trailing EOB's. */
1638         n = len + 2;
1639         buf = (char *) yy_flex_alloc( n );
1640         if ( ! buf )
1641                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1642
1643         for ( i = 0; i < len; ++i )
1644                 buf[i] = bytes[i];
1645
1646         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1647
1648         b = yy_scan_buffer( buf, n );
1649         if ( ! b )
1650                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1651
1652         /* It's okay to grow etc. this buffer, and we should throw it
1653          * away when we're done.
1654          */
1655         b->yy_is_our_buffer = 1;
1656
1657         return b;
1658         }
1659 #endif
1660
1661
1662 #ifndef YY_NO_PUSH_STATE
1663 #ifdef YY_USE_PROTOS
1664 static void yy_push_state( int new_state )
1665 #else
1666 static void yy_push_state( new_state )
1667 int new_state;
1668 #endif
1669         {
1670         if ( yy_start_stack_ptr >= yy_start_stack_depth )
1671                 {
1672                 yy_size_t new_size;
1673
1674                 yy_start_stack_depth += YY_START_STACK_INCR;
1675                 new_size = yy_start_stack_depth * sizeof( int );
1676
1677                 if ( ! yy_start_stack )
1678                         yy_start_stack = (int *) yy_flex_alloc( new_size );
1679
1680                 else
1681                         yy_start_stack = (int *) yy_flex_realloc(
1682                                         (void *) yy_start_stack, new_size );
1683
1684                 if ( ! yy_start_stack )
1685                         YY_FATAL_ERROR(
1686                         "out of memory expanding start-condition stack" );
1687                 }
1688
1689         yy_start_stack[yy_start_stack_ptr++] = YY_START;
1690
1691         BEGIN(new_state);
1692         }
1693 #endif
1694
1695
1696 #ifndef YY_NO_POP_STATE
1697 static void yy_pop_state()
1698         {
1699         if ( --yy_start_stack_ptr < 0 )
1700                 YY_FATAL_ERROR( "start-condition stack underflow" );
1701
1702         BEGIN(yy_start_stack[yy_start_stack_ptr]);
1703         }
1704 #endif
1705
1706
1707 #ifndef YY_NO_TOP_STATE
1708 static int yy_top_state()
1709         {
1710         return yy_start_stack[yy_start_stack_ptr - 1];
1711         }
1712 #endif
1713
1714 #ifndef YY_EXIT_FAILURE
1715 #define YY_EXIT_FAILURE 2
1716 #endif
1717
1718 #ifdef YY_USE_PROTOS
1719 static void yy_fatal_error( yyconst char msg[] )
1720 #else
1721 static void yy_fatal_error( msg )
1722 char msg[];
1723 #endif
1724         {
1725         (void) fprintf( stderr, "%s\n", msg );
1726         exit( YY_EXIT_FAILURE );
1727         }
1728
1729
1730
1731 /* Redefine yyless() so it works in section 3 code. */
1732
1733 #undef yyless
1734 #define yyless(n) \
1735         do \
1736                 { \
1737                 /* Undo effects of setting up yytext. */ \
1738                 yytext[yyleng] = yy_hold_char; \
1739                 yy_c_buf_p = yytext + n; \
1740                 yy_hold_char = *yy_c_buf_p; \
1741                 *yy_c_buf_p = '\0'; \
1742                 yyleng = n; \
1743                 } \
1744         while ( 0 )
1745
1746
1747 /* Internal utility routines. */
1748
1749 #ifndef yytext_ptr
1750 #ifdef YY_USE_PROTOS
1751 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1752 #else
1753 static void yy_flex_strncpy( s1, s2, n )
1754 char *s1;
1755 yyconst char *s2;
1756 int n;
1757 #endif
1758         {
1759         register int i;
1760         for ( i = 0; i < n; ++i )
1761                 s1[i] = s2[i];
1762         }
1763 #endif
1764
1765 #ifdef YY_NEED_STRLEN
1766 #ifdef YY_USE_PROTOS
1767 static int yy_flex_strlen( yyconst char *s )
1768 #else
1769 static int yy_flex_strlen( s )
1770 yyconst char *s;
1771 #endif
1772         {
1773         register int n;
1774         for ( n = 0; s[n]; ++n )
1775                 ;
1776
1777         return n;
1778         }
1779 #endif
1780
1781
1782 #ifdef YY_USE_PROTOS
1783 static void *yy_flex_alloc( yy_size_t size )
1784 #else
1785 static void *yy_flex_alloc( size )
1786 yy_size_t size;
1787 #endif
1788         {
1789         return (void *) malloc( size );
1790         }
1791
1792 #ifdef YY_USE_PROTOS
1793 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1794 #else
1795 static void *yy_flex_realloc( ptr, size )
1796 void *ptr;
1797 yy_size_t size;
1798 #endif
1799         {
1800         /* The cast to (char *) in the following accommodates both
1801          * implementations that use char* generic pointers, and those
1802          * that use void* generic pointers.  It works with the latter
1803          * because both ANSI C and C++ allow castless assignment from
1804          * any pointer type to void*, and deal with argument conversions
1805          * as though doing an assignment.
1806          */
1807         return (void *) realloc( (char *) ptr, size );
1808         }
1809
1810 #ifdef YY_USE_PROTOS
1811 static void yy_flex_free( void *ptr )
1812 #else
1813 static void yy_flex_free( ptr )
1814 void *ptr;
1815 #endif
1816         {
1817         free( ptr );
1818         }
1819
1820 #if YY_MAIN
1821 int main()
1822         {
1823         yylex();
1824         return 0;
1825         }
1826 #endif
1827 #line 174 "gras/DataDesc/ddt_parse.yy.l"
1828
1829 /* {space}+                { return(TOKEN_SPACE);} */
1830
1831 void gras_ddt_parse_dump(void) {
1832   switch(gras_ddt_parse_tok_num) {
1833   case GRAS_DDT_PARSE_TOKEN_LA      : {printf("TOKEN_LA ");break;}
1834   case GRAS_DDT_PARSE_TOKEN_RA      : {printf("TOKEN_RA ");break;}
1835   case GRAS_DDT_PARSE_TOKEN_WORD    : {printf("TOKEN_WORD ");break;}
1836     //  case GRAS_DDT_PARSE_TOKEN_SPACE   : {printf("TOKEN_SPACE ");break;}
1837     //  case GRAS_DDT_PARSE_TOKEN_COMMENT : {printf("TOKEN_COMMENT ");break;}
1838   case GRAS_DDT_PARSE_TOKEN_NEWLINE : {printf("TOKEN_NEWLINE\n");return;}
1839   case GRAS_DDT_PARSE_TOKEN_EMPTY : {printf("TOKEN_EMPTY\n");return;}
1840   default             : {printf("Unknown token %d\n", gras_ddt_parse_tok_num);return;}
1841   }
1842   printf("-->%s<-- [line %d, pos %d]\n",yytext,gras_ddt_parse_line_pos,gras_ddt_parse_char_pos);
1843   return;
1844 }
1845
1846 int gras_ddt_parse_lex_n_dump(void) {
1847   gras_ddt_parse_tok_num = gras_ddt_parse_lex();
1848   //  gras_ddt_parse_char_pos += strlen(yytext);
1849   return(gras_ddt_parse_tok_num);
1850 }
1851
1852 void  gras_ddt_parse_pointer_init(const char *file) {
1853   file_to_parse = fopen(file,"r");
1854   input_buffer = yy_create_buffer( file_to_parse, 10 );
1855   yy_switch_to_buffer(input_buffer);
1856
1857   gras_ddt_parse_line_pos = 1;
1858   gras_ddt_parse_char_pos = 0;
1859   gras_ddt_parse_col_pos = 0;
1860   gras_ddt_parse_tok_num = 0;
1861 }
1862
1863 void  gras_ddt_parse_pointer_close(void) {
1864   yy_delete_buffer(input_buffer);
1865   fclose(file_to_parse);
1866
1867   gras_ddt_parse_line_pos = 1;
1868   gras_ddt_parse_char_pos = 0;
1869   gras_ddt_parse_tok_num = 0;
1870 }
1871
1872
1873 void  gras_ddt_parse_pointer_string_init(const char *string_to_parse) {
1874   input_buffer = yy_scan_string (string_to_parse);
1875   definition = string_to_parse;
1876   yy_switch_to_buffer(input_buffer);
1877
1878   gras_ddt_parse_line_pos = 1;
1879   gras_ddt_parse_char_pos = 0;
1880   gras_ddt_parse_tok_num = 0;
1881 }
1882
1883 void  gras_ddt_parse_pointer_string_close(void) {
1884   yy_delete_buffer(input_buffer);
1885
1886   gras_ddt_parse_line_pos = 1;
1887   gras_ddt_parse_char_pos = 0;
1888   gras_ddt_parse_tok_num = 0;
1889 }
1890
1891 // Local variables:
1892 // mode: c
1893 // End: