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
18 #line 19 "gras/DataDesc/ddt_parse.yy.c"
19 /* A lexical scanner generated by flex */
21 /* Scanner skeleton version:
26 #define YY_FLEX_MAJOR_VERSION 2
27 #define YY_FLEX_MINOR_VERSION 5
32 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
47 /* Use prototypes in function declarations. */
50 /* The "const" storage-class-modifier is valid. */
53 #else /* ! __cplusplus */
61 #endif /* ! __cplusplus */
80 #define YY_PROTO(proto) proto
82 #define YY_PROTO(proto) ()
86 /* Returned upon end-of-file. */
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
94 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
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.
100 #define BEGIN yy_start = 1 + 2 *
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
106 #define YY_START ((yy_start - 1) / 2)
107 #define YYSTATE YY_START
109 /* Action number for EOF rule of a given start state. */
110 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
112 /* Special action meaning "start processing a new file". */
113 #define YY_NEW_FILE yyrestart( yyin )
115 #define YY_END_OF_BUFFER_CHAR 0
117 /* Size of default input buffer. */
118 #define YY_BUF_SIZE 16384
120 typedef struct yy_buffer_state *YY_BUFFER_STATE;
123 extern FILE *yyin, *yyout;
125 #define EOB_ACT_CONTINUE_SCAN 0
126 #define EOB_ACT_END_OF_FILE 1
127 #define EOB_ACT_LAST_MATCH 2
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:
133 * if ( condition_holds )
136 * do_something_else();
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.
143 /* Return all but the first 'n' matched characters back to the input stream. */
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 */ \
156 #define unput(c) yyunput( c, yytext_ptr )
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).
162 typedef unsigned int yy_size_t;
165 struct yy_buffer_state
169 char *yy_ch_buf; /* input buffer */
170 char *yy_buf_pos; /* current position in input buffer */
172 /* Size of input buffer in bytes, not including room for EOB
175 yy_size_t yy_buf_size;
177 /* Number of characters read into yy_ch_buf, not including EOB
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
186 int yy_is_our_buffer;
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
193 int yy_is_interactive;
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
201 /* Whether to try to fill the input buffer when we reach the
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.
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.
219 #define YY_BUFFER_EOF_PENDING 2
222 static YY_BUFFER_STATE yy_current_buffer = 0;
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
228 #define YY_CURRENT_BUFFER yy_current_buffer
231 /* yy_hold_char holds the character lost when yytext is formed. */
232 static char yy_hold_char;
234 static int yy_n_chars; /* number of characters read into yy_ch_buf */
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 */
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 ...
247 static int yy_did_buffer_switch_on_eof;
249 void yyrestart YY_PROTO(( FILE *input_file ));
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 )
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 ));
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 * ));
267 #define yy_new_buffer yy_create_buffer
269 #define yy_set_interactive(is_interactive) \
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; \
276 #define yy_set_bol(at_bol) \
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; \
283 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
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;
292 #define yytext_ptr yytext
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[] ));
299 /* Done after the current pattern has been matched and before the
300 * corresponding action - sets up yytext.
302 #define YY_DO_BEFORE_ACTION \
303 yytext_ptr = yy_bp; \
304 yyleng = (int) (yy_cp - yy_bp); \
305 yy_hold_char = *yy_cp; \
309 #define YY_NUM_RULES 26
310 #define YY_END_OF_BUFFER 27
311 static yyconst short int yy_accept[61] =
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
321 static yyconst int yy_ec[256] =
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,
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,
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,
353 static yyconst int yy_meta[18] =
355 1, 1, 2, 1, 1, 3, 1, 4, 1, 4,
359 static yyconst short int yy_base[69] =
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
370 static yyconst short int yy_def[69] =
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
381 static yyconst short int yy_nxt[106] =
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,
397 static yyconst short int yy_chk[106] =
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,
413 static yy_state_type yy_last_accepting_state;
414 static char *yy_last_accepting_cpos;
416 /* The intent behind this definition is that it'll catch
417 * any uses of REJECT which flex missed.
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
424 #line 1 "gras/DataDesc/ddt_parse.yy.l"
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"
436 YY_BUFFER_STATE input_buffer;
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)
450 #line 451 "gras/DataDesc/ddt_parse.yy.c"
452 /* Macros after this point can all be overridden by user definitions in
456 #ifndef YY_SKIP_YYWRAP
458 extern "C" int yywrap YY_PROTO(( void ));
460 extern int yywrap YY_PROTO(( void ));
465 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
469 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
472 #ifdef YY_NEED_STRLEN
473 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
478 static int yyinput YY_PROTO(( void ));
480 static int input YY_PROTO(( void ));
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 ));
491 #ifndef YY_NO_POP_STATE
492 static void yy_pop_state YY_PROTO(( void ));
494 #ifndef YY_NO_TOP_STATE
495 static int yy_top_state YY_PROTO(( void ));
499 #define YY_NO_PUSH_STATE 1
500 #define YY_NO_POP_STATE 1
501 #define YY_NO_TOP_STATE 1
504 #ifdef YY_MALLOC_DECL
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).
519 /* Amount of stuff to slurp up with each read. */
520 #ifndef YY_READ_BUF_SIZE
521 #define YY_READ_BUF_SIZE 8192
524 /* Copy whatever the last rule matched to the standard output. */
527 /* This used to be an fputs(), but since the string might contain NUL's,
528 * we now use fwrite().
530 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
533 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
534 * is returned in "result".
537 #define YY_INPUT(buf,result,max_size) \
538 if ( yy_current_buffer->yy_is_interactive ) \
541 for ( n = 0; n < max_size && \
542 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
545 buf[n++] = (char) c; \
546 if ( c == EOF && ferror( yyin ) ) \
547 YY_FATAL_ERROR( "input in flex scanner failed" ); \
553 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
555 if( errno != EINTR) \
557 YY_FATAL_ERROR( "input in flex scanner failed" ); \
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.
571 #define yyterminate() return YY_NULL
574 /* Number of entries by which start-condition stack grows. */
575 #ifndef YY_START_STACK_INCR
576 #define YY_START_STACK_INCR 25
579 /* Report a fatal error. */
580 #ifndef YY_FATAL_ERROR
581 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
584 /* Default declaration of generated scanner - a define so the user can
585 * easily add parameters.
588 #define YY_DECL int yylex YY_PROTO(( void ))
591 /* Code executed at the beginning of each rule, after yytext and yyleng
594 #ifndef YY_USER_ACTION
595 #define YY_USER_ACTION
598 /* Code executed at the end of each rule. */
600 #define YY_BREAK break;
603 #define YY_RULE_SETUP \
608 register yy_state_type yy_current_state;
609 register char *yy_cp, *yy_bp;
612 #line 33 "gras/DataDesc/ddt_parse.yy.l"
614 int comment_caller=0;
615 int annotate_caller=0;
617 char string_buf[GRAS_DDT_PARSE_MAX_STR_CONST];
618 char *string_buf_ptr = NULL;
620 #line 621 "gras/DataDesc/ddt_parse.yy.c"
631 yy_start = 1; /* first start state */
639 if ( ! yy_current_buffer )
641 yy_create_buffer( yyin, YY_BUF_SIZE );
643 yy_load_buffer_state();
646 while ( 1 ) /* loops until end-of-file is reached */
650 /* Support of yytext. */
651 *yy_cp = yy_hold_char;
653 /* yy_bp points to the position in yy_ch_buf of the start of
658 yy_current_state = yy_start;
662 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
663 if ( yy_accept[yy_current_state] )
665 yy_last_accepting_state = yy_current_state;
666 yy_last_accepting_cpos = yy_cp;
668 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
674 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
677 while ( yy_base[yy_current_state] != 88 );
680 yy_act = yy_accept[yy_current_state];
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];
691 do_action: /* This label is used only to access EOF actions. */
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;
705 #line 40 "gras/DataDesc/ddt_parse.yy.l"
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);
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);
732 #line 57 "gras/DataDesc/ddt_parse.yy.l"
734 DEBUG0("End annotation");
735 gras_ddt_parse_char_pos+= strlen(yytext);
736 gras_ddt_parse_col_pos+= strlen(yytext);
737 BEGIN(annotate_caller);
742 #line 64 "gras/DataDesc/ddt_parse.yy.l"
744 PARSE_ERROR0("``/*g'' construct closed by a regular ``*/''");
749 #line 67 "gras/DataDesc/ddt_parse.yy.l"
751 PARSE_ERROR0("Type annotation cannot spread over several lines");
756 #line 71 "gras/DataDesc/ddt_parse.yy.l"
758 gras_ddt_parse_char_pos+= strlen(yytext);
759 gras_ddt_parse_col_pos+= strlen(yytext);
760 return GRAS_DDT_PARSE_TOKEN_ANNOTATE;
765 #line 77 "gras/DataDesc/ddt_parse.yy.l"
766 { /****************** COMMENTS ************************/
767 /* constructs like : */
769 /* are not comments but size annotations */
770 comment_caller = INITIAL;
776 #line 85 "gras/DataDesc/ddt_parse.yy.l"
778 comment_caller = foo;
784 #line 90 "gras/DataDesc/ddt_parse.yy.l"
785 { /* eat anything that's not a '*' */
790 #line 92 "gras/DataDesc/ddt_parse.yy.l"
791 { /* eat up '*'s not followed by '/'s */
796 #line 94 "gras/DataDesc/ddt_parse.yy.l"
798 ++gras_ddt_parse_line_pos;
799 gras_ddt_parse_col_pos=0;
800 gras_ddt_parse_char_pos++;
805 #line 99 "gras/DataDesc/ddt_parse.yy.l"
807 gras_ddt_parse_char_pos+= strlen(yytext);
808 gras_ddt_parse_col_pos+= strlen(yytext);
809 BEGIN(comment_caller);
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);
819 return(GRAS_DDT_PARSE_TOKEN_WORD);
824 #line 111 "gras/DataDesc/ddt_parse.yy.l"
826 gras_ddt_parse_char_pos++;
827 gras_ddt_parse_col_pos++;
829 return(GRAS_DDT_PARSE_TOKEN_LA);
834 #line 117 "gras/DataDesc/ddt_parse.yy.l"
836 gras_ddt_parse_char_pos++;
837 gras_ddt_parse_col_pos++;
839 return(GRAS_DDT_PARSE_TOKEN_RA);
844 #line 123 "gras/DataDesc/ddt_parse.yy.l"
846 gras_ddt_parse_char_pos++;
847 gras_ddt_parse_col_pos++;
849 return(GRAS_DDT_PARSE_TOKEN_LB);
854 #line 129 "gras/DataDesc/ddt_parse.yy.l"
856 gras_ddt_parse_char_pos++;
857 gras_ddt_parse_col_pos++;
859 return(GRAS_DDT_PARSE_TOKEN_RB);
864 #line 135 "gras/DataDesc/ddt_parse.yy.l"
866 gras_ddt_parse_char_pos++;
867 gras_ddt_parse_col_pos++;
869 return(GRAS_DDT_PARSE_TOKEN_LP);
874 #line 141 "gras/DataDesc/ddt_parse.yy.l"
876 gras_ddt_parse_char_pos++;
877 gras_ddt_parse_col_pos++;
879 return(GRAS_DDT_PARSE_TOKEN_RP);
884 #line 147 "gras/DataDesc/ddt_parse.yy.l"
886 gras_ddt_parse_char_pos++;
887 gras_ddt_parse_col_pos++;
889 return(GRAS_DDT_PARSE_TOKEN_STAR);
894 #line 153 "gras/DataDesc/ddt_parse.yy.l"
896 gras_ddt_parse_char_pos++;
897 gras_ddt_parse_col_pos++;
899 return(GRAS_DDT_PARSE_TOKEN_SEMI_COLON);
904 #line 159 "gras/DataDesc/ddt_parse.yy.l"
906 gras_ddt_parse_char_pos++;
907 gras_ddt_parse_col_pos++;
909 return(GRAS_DDT_PARSE_TOKEN_COLON);
914 #line 165 "gras/DataDesc/ddt_parse.yy.l"
916 gras_ddt_parse_line_pos++;
917 gras_ddt_parse_char_pos++;
918 gras_ddt_parse_col_pos=0;
924 #line 171 "gras/DataDesc/ddt_parse.yy.l"
926 gras_ddt_parse_char_pos++;
927 gras_ddt_parse_col_pos++;
933 #line 176 "gras/DataDesc/ddt_parse.yy.l"
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):
943 case YY_END_OF_BUFFER:
945 /* Amount of text matched not including the EOB char. */
946 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
948 /* Undo the effects of YY_DO_BEFORE_ACTION. */
949 *yy_cp = yy_hold_char;
950 YY_RESTORE_YY_MORE_OFFSET
952 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
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.
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;
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
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;
979 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
981 yy_current_state = yy_get_previous_state();
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).
992 yy_next_state = yy_try_NUL_trans( yy_current_state );
994 yy_bp = yytext_ptr + YY_MORE_ADJ;
998 /* Consume the NUL. */
999 yy_cp = ++yy_c_buf_p;
1000 yy_current_state = yy_next_state;
1007 goto yy_find_action;
1011 else switch ( yy_get_next_buffer() )
1013 case EOB_ACT_END_OF_FILE:
1015 yy_did_buffer_switch_on_eof = 0;
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.
1028 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1030 yy_act = YY_STATE_EOF(YY_START);
1036 if ( ! yy_did_buffer_switch_on_eof )
1042 case EOB_ACT_CONTINUE_SCAN:
1044 yytext_ptr + yy_amount_of_matched_text;
1046 yy_current_state = yy_get_previous_state();
1049 yy_bp = yytext_ptr + YY_MORE_ADJ;
1052 case EOB_ACT_LAST_MATCH:
1054 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1056 yy_current_state = yy_get_previous_state();
1059 yy_bp = yytext_ptr + YY_MORE_ADJ;
1060 goto yy_find_action;
1067 "fatal flex scanner internal error--no action found" );
1068 } /* end of action switch */
1069 } /* end of scanning one token */
1070 } /* end of yylex */
1073 /* yy_get_next_buffer - try to read in a new buffer
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
1081 static int yy_get_next_buffer()
1083 register char *dest = yy_current_buffer->yy_ch_buf;
1084 register char *source = yytext_ptr;
1085 register int number_to_move, i;
1088 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1090 "fatal flex scanner internal error--end of buffer missed" );
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 )
1096 /* We matched a single character, the EOB, so
1097 * treat this as a final EOF.
1099 return EOB_ACT_END_OF_FILE;
1104 /* We matched some text prior to the EOB, first
1107 return EOB_ACT_LAST_MATCH;
1111 /* Try to read more data. */
1113 /* First move last chars to start of buffer. */
1114 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1116 for ( i = 0; i < number_to_move; ++i )
1117 *(dest++) = *(source++);
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,
1123 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1128 yy_current_buffer->yy_buf_size - number_to_move - 1;
1130 while ( num_to_read <= 0 )
1131 { /* Not enough room in the buffer - grow it. */
1132 #ifdef YY_USES_REJECT
1134 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1137 /* just a shorter name for the current buffer */
1138 YY_BUFFER_STATE b = yy_current_buffer;
1140 int yy_c_buf_p_offset =
1141 (int) (yy_c_buf_p - b->yy_ch_buf);
1143 if ( b->yy_is_our_buffer )
1145 int new_size = b->yy_buf_size * 2;
1147 if ( new_size <= 0 )
1148 b->yy_buf_size += b->yy_buf_size / 8;
1150 b->yy_buf_size *= 2;
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 );
1158 /* Can't grow it, we don't own it. */
1161 if ( ! b->yy_ch_buf )
1163 "fatal error - scanner input buffer overflow" );
1165 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1167 num_to_read = yy_current_buffer->yy_buf_size -
1172 if ( num_to_read > YY_READ_BUF_SIZE )
1173 num_to_read = YY_READ_BUF_SIZE;
1175 /* Read in more data. */
1176 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1177 yy_n_chars, num_to_read );
1179 yy_current_buffer->yy_n_chars = yy_n_chars;
1182 if ( yy_n_chars == 0 )
1184 if ( number_to_move == YY_MORE_ADJ )
1186 ret_val = EOB_ACT_END_OF_FILE;
1192 ret_val = EOB_ACT_LAST_MATCH;
1193 yy_current_buffer->yy_buffer_status =
1194 YY_BUFFER_EOF_PENDING;
1199 ret_val = EOB_ACT_CONTINUE_SCAN;
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;
1205 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1211 /* yy_get_previous_state - get the state just before the EOB char was reached */
1213 static yy_state_type yy_get_previous_state()
1215 register yy_state_type yy_current_state;
1216 register char *yy_cp;
1218 yy_current_state = yy_start;
1220 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1222 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1223 if ( yy_accept[yy_current_state] )
1225 yy_last_accepting_state = yy_current_state;
1226 yy_last_accepting_cpos = yy_cp;
1228 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
1234 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1237 return yy_current_state;
1241 /* yy_try_NUL_trans - try to make a transition on the NUL character
1244 * next_state = yy_try_NUL_trans( current_state );
1247 #ifdef YY_USE_PROTOS
1248 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1250 static yy_state_type yy_try_NUL_trans( yy_current_state )
1251 yy_state_type yy_current_state;
1254 register int yy_is_jam;
1255 register char *yy_cp = yy_c_buf_p;
1257 register YY_CHAR yy_c = 1;
1258 if ( yy_accept[yy_current_state] )
1260 yy_last_accepting_state = yy_current_state;
1261 yy_last_accepting_cpos = yy_cp;
1263 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
1269 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1270 yy_is_jam = (yy_current_state == 60);
1272 return yy_is_jam ? 0 : yy_current_state;
1277 #ifdef YY_USE_PROTOS
1278 static void yyunput( int c, register char *yy_bp )
1280 static void yyunput( c, yy_bp )
1282 register char *yy_bp;
1285 register char *yy_cp = yy_c_buf_p;
1287 /* undo effects of setting up yytext */
1288 *yy_cp = yy_hold_char;
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];
1299 while ( source > yy_current_buffer->yy_ch_buf )
1300 *--dest = *--source;
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;
1307 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1308 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1311 *--yy_cp = (char) c;
1315 yy_hold_char = *yy_cp;
1318 #endif /* ifndef YY_NO_UNPUT */
1322 static int yyinput()
1329 *yy_c_buf_p = yy_hold_char;
1331 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
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.
1337 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1338 /* This was really a NUL. */
1342 { /* need more input */
1343 int offset = yy_c_buf_p - yytext_ptr;
1346 switch ( yy_get_next_buffer() )
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.
1359 /* Reset buffer status. */
1364 case EOB_ACT_END_OF_FILE:
1369 if ( ! yy_did_buffer_switch_on_eof )
1378 case EOB_ACT_CONTINUE_SCAN:
1379 yy_c_buf_p = yytext_ptr + offset;
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;
1394 #ifdef YY_USE_PROTOS
1395 void yyrestart( FILE *input_file )
1397 void yyrestart( input_file )
1401 if ( ! yy_current_buffer )
1402 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1404 yy_init_buffer( yy_current_buffer, input_file );
1405 yy_load_buffer_state();
1409 #ifdef YY_USE_PROTOS
1410 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1412 void yy_switch_to_buffer( new_buffer )
1413 YY_BUFFER_STATE new_buffer;
1416 if ( yy_current_buffer == new_buffer )
1419 if ( yy_current_buffer )
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;
1427 yy_current_buffer = new_buffer;
1428 yy_load_buffer_state();
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.
1435 yy_did_buffer_switch_on_eof = 1;
1439 #ifdef YY_USE_PROTOS
1440 void yy_load_buffer_state( void )
1442 void yy_load_buffer_state()
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;
1452 #ifdef YY_USE_PROTOS
1453 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1455 YY_BUFFER_STATE yy_create_buffer( file, size )
1462 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1464 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1466 b->yy_buf_size = size;
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.
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()" );
1475 b->yy_is_our_buffer = 1;
1477 yy_init_buffer( b, file );
1483 #ifdef YY_USE_PROTOS
1484 void yy_delete_buffer( YY_BUFFER_STATE b )
1486 void yy_delete_buffer( b )
1493 if ( b == yy_current_buffer )
1494 yy_current_buffer = (YY_BUFFER_STATE) 0;
1496 if ( b->yy_is_our_buffer )
1497 yy_flex_free( (void *) b->yy_ch_buf );
1499 yy_flex_free( (void *) b );
1506 #ifndef YY_ALWAYS_INTERACTIVE
1507 #ifndef YY_NEVER_INTERACTIVE
1508 extern int isatty YY_PROTO(( int ));
1513 #ifdef YY_USE_PROTOS
1514 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1516 void yy_init_buffer( b, file )
1523 yy_flush_buffer( b );
1525 b->yy_input_file = file;
1526 b->yy_fill_buffer = 1;
1528 #if YY_ALWAYS_INTERACTIVE
1529 b->yy_is_interactive = 1;
1531 #if YY_NEVER_INTERACTIVE
1532 b->yy_is_interactive = 0;
1534 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1540 #ifdef YY_USE_PROTOS
1541 void yy_flush_buffer( YY_BUFFER_STATE b )
1543 void yy_flush_buffer( b )
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.
1557 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1558 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1560 b->yy_buf_pos = &b->yy_ch_buf[0];
1563 b->yy_buffer_status = YY_BUFFER_NEW;
1565 if ( b == yy_current_buffer )
1566 yy_load_buffer_state();
1570 #ifndef YY_NO_SCAN_BUFFER
1571 #ifdef YY_USE_PROTOS
1572 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1574 YY_BUFFER_STATE yy_scan_buffer( base, size )
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. */
1587 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1589 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
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;
1598 b->yy_fill_buffer = 0;
1599 b->yy_buffer_status = YY_BUFFER_NEW;
1601 yy_switch_to_buffer( b );
1608 #ifndef YY_NO_SCAN_STRING
1609 #ifdef YY_USE_PROTOS
1610 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1612 YY_BUFFER_STATE yy_scan_string( yy_str )
1613 yyconst char *yy_str;
1617 for ( len = 0; yy_str[len]; ++len )
1620 return yy_scan_bytes( yy_str, len );
1625 #ifndef YY_NO_SCAN_BYTES
1626 #ifdef YY_USE_PROTOS
1627 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1629 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1630 yyconst char *bytes;
1639 /* Get memory for full buffer, including space for trailing EOB's. */
1641 buf = (char *) yy_flex_alloc( n );
1643 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1645 for ( i = 0; i < len; ++i )
1648 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1650 b = yy_scan_buffer( buf, n );
1652 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1654 /* It's okay to grow etc. this buffer, and we should throw it
1655 * away when we're done.
1657 b->yy_is_our_buffer = 1;
1664 #ifndef YY_NO_PUSH_STATE
1665 #ifdef YY_USE_PROTOS
1666 static void yy_push_state( int new_state )
1668 static void yy_push_state( new_state )
1672 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1676 yy_start_stack_depth += YY_START_STACK_INCR;
1677 new_size = yy_start_stack_depth * sizeof( int );
1679 if ( ! yy_start_stack )
1680 yy_start_stack = (int *) yy_flex_alloc( new_size );
1683 yy_start_stack = (int *) yy_flex_realloc(
1684 (void *) yy_start_stack, new_size );
1686 if ( ! yy_start_stack )
1688 "out of memory expanding start-condition stack" );
1691 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1698 #ifndef YY_NO_POP_STATE
1699 static void yy_pop_state()
1701 if ( --yy_start_stack_ptr < 0 )
1702 YY_FATAL_ERROR( "start-condition stack underflow" );
1704 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1709 #ifndef YY_NO_TOP_STATE
1710 static int yy_top_state()
1712 return yy_start_stack[yy_start_stack_ptr - 1];
1716 #ifndef YY_EXIT_FAILURE
1717 #define YY_EXIT_FAILURE 2
1720 #ifdef YY_USE_PROTOS
1721 static void yy_fatal_error( yyconst char msg[] )
1723 static void yy_fatal_error( msg )
1727 (void) fprintf( stderr, "%s\n", msg );
1728 exit( YY_EXIT_FAILURE );
1733 /* Redefine yyless() so it works in section 3 code. */
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'; \
1749 /* Internal utility routines. */
1752 #ifdef YY_USE_PROTOS
1753 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1755 static void yy_flex_strncpy( s1, s2, n )
1762 for ( i = 0; i < n; ++i )
1767 #ifdef YY_NEED_STRLEN
1768 #ifdef YY_USE_PROTOS
1769 static int yy_flex_strlen( yyconst char *s )
1771 static int yy_flex_strlen( s )
1776 for ( n = 0; s[n]; ++n )
1784 #ifdef YY_USE_PROTOS
1785 static void *yy_flex_alloc( yy_size_t size )
1787 static void *yy_flex_alloc( size )
1791 return (void *) malloc( size );
1794 #ifdef YY_USE_PROTOS
1795 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1797 static void *yy_flex_realloc( ptr, size )
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.
1809 return (void *) realloc( (char *) ptr, size );
1812 #ifdef YY_USE_PROTOS
1813 static void yy_flex_free( void *ptr )
1815 static void yy_flex_free( ptr )
1829 #line 176 "gras/DataDesc/ddt_parse.yy.l"
1831 /* {space}+ { return(TOKEN_SPACE);} */
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;}
1844 printf("-->%s<-- [line %d, pos %d]\n",yytext,gras_ddt_parse_line_pos,gras_ddt_parse_char_pos);
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);
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);
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;
1865 void gras_ddt_parse_pointer_close(void) {
1866 yy_delete_buffer(input_buffer);
1867 fclose(file_to_parse);
1869 gras_ddt_parse_line_pos = 1;
1870 gras_ddt_parse_char_pos = 0;
1871 gras_ddt_parse_tok_num = 0;
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);
1880 gras_ddt_parse_line_pos = 1;
1881 gras_ddt_parse_char_pos = 0;
1882 gras_ddt_parse_tok_num = 0;
1885 void gras_ddt_parse_pointer_string_close(void) {
1886 yy_delete_buffer(input_buffer);
1888 gras_ddt_parse_line_pos = 1;
1889 gras_ddt_parse_char_pos = 0;
1890 gras_ddt_parse_tok_num = 0;
1893 /* Local variables:*/