-#line 3 "src/gras/DataDesc/ddt_parse.yy.c"
+#line 3 "src/xbt/datadesc/ddt_parse.yy.c"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
-#define yy_create_buffer gras_ddt_parse__create_buffer
-#define yy_delete_buffer gras_ddt_parse__delete_buffer
-#define yy_flex_debug gras_ddt_parse__flex_debug
-#define yy_init_buffer gras_ddt_parse__init_buffer
-#define yy_flush_buffer gras_ddt_parse__flush_buffer
-#define yy_load_buffer_state gras_ddt_parse__load_buffer_state
-#define yy_switch_to_buffer gras_ddt_parse__switch_to_buffer
-#define yyin gras_ddt_parse_in
-#define yyleng gras_ddt_parse_leng
-#define yylex gras_ddt_parse_lex
-#define yylineno gras_ddt_parse_lineno
-#define yyout gras_ddt_parse_out
-#define yyrestart gras_ddt_parse_restart
-#define yytext gras_ddt_parse_text
-#define yywrap gras_ddt_parse_wrap
-#define yyalloc gras_ddt_parse_alloc
-#define yyrealloc gras_ddt_parse_realloc
-#define yyfree gras_ddt_parse_free
+#define yy_create_buffer xbt_ddt_parse__create_buffer
+#define yy_delete_buffer xbt_ddt_parse__delete_buffer
+#define yy_flex_debug xbt_ddt_parse__flex_debug
+#define yy_init_buffer xbt_ddt_parse__init_buffer
+#define yy_flush_buffer xbt_ddt_parse__flush_buffer
+#define yy_load_buffer_state xbt_ddt_parse__load_buffer_state
+#define yy_switch_to_buffer xbt_ddt_parse__switch_to_buffer
+#define yyin xbt_ddt_parse_in
+#define yyleng xbt_ddt_parse_leng
+#define yylex xbt_ddt_parse_lex
+#define yylineno xbt_ddt_parse_lineno
+#define yyout xbt_ddt_parse_out
+#define yyrestart xbt_ddt_parse_restart
+#define yytext xbt_ddt_parse_text
+#define yywrap xbt_ddt_parse_wrap
+#define yyalloc xbt_ddt_parse_alloc
+#define yyrealloc xbt_ddt_parse_realloc
+#define yyfree xbt_ddt_parse_free
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE gras_ddt_parse_restart(gras_ddt_parse_in )
+#define YY_NEW_FILE xbt_ddt_parse_restart(xbt_ddt_parse_in )
#define YY_END_OF_BUFFER_CHAR 0
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-extern int gras_ddt_parse_leng;
+extern int xbt_ddt_parse_leng;
-extern FILE *gras_ddt_parse_in, *gras_ddt_parse_out;
+extern FILE *xbt_ddt_parse_in, *xbt_ddt_parse_out;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up gras_ddt_parse_text. */ \
+ /* Undo effects of setting up xbt_ddt_parse_text. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up gras_ddt_parse_text again */ \
+ YY_DO_BEFORE_ACTION; /* set up xbt_ddt_parse_text again */ \
} \
while ( 0 )
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via gras_ddt_parse_restart()), so that the user can continue scanning by
- * just pointing gras_ddt_parse_in at a new input file.
+ * (via xbt_ddt_parse_restart()), so that the user can continue scanning by
+ * just pointing xbt_ddt_parse_in at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-/* yy_hold_char holds the character lost when gras_ddt_parse_text is formed. */
+/* yy_hold_char holds the character lost when xbt_ddt_parse_text is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int gras_ddt_parse_leng;
+int xbt_ddt_parse_leng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow gras_ddt_parse_wrap()'s to do buffer switches
- * instead of setting up a fresh gras_ddt_parse_in. A bit of a hack ...
+/* Flag which is used to allow xbt_ddt_parse_wrap()'s to do buffer switches
+ * instead of setting up a fresh xbt_ddt_parse_in. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void gras_ddt_parse_restart (FILE *input_file );
-void gras_ddt_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE gras_ddt_parse__create_buffer (FILE *file,int size );
-void gras_ddt_parse__delete_buffer (YY_BUFFER_STATE b );
-void gras_ddt_parse__flush_buffer (YY_BUFFER_STATE b );
-void gras_ddt_parse_push_buffer_state (YY_BUFFER_STATE new_buffer );
-void gras_ddt_parse_pop_buffer_state (void );
+void xbt_ddt_parse_restart (FILE *input_file );
+void xbt_ddt_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE xbt_ddt_parse__create_buffer (FILE *file,int size );
+void xbt_ddt_parse__delete_buffer (YY_BUFFER_STATE b );
+void xbt_ddt_parse__flush_buffer (YY_BUFFER_STATE b );
+void xbt_ddt_parse_push_buffer_state (YY_BUFFER_STATE new_buffer );
+void xbt_ddt_parse_pop_buffer_state (void );
-static void gras_ddt_parse_ensure_buffer_stack (void );
-static void gras_ddt_parse__load_buffer_state (void );
-static void gras_ddt_parse__init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void xbt_ddt_parse_ensure_buffer_stack (void );
+static void xbt_ddt_parse__load_buffer_state (void );
+static void xbt_ddt_parse__init_buffer (YY_BUFFER_STATE b,FILE *file );
-#define YY_FLUSH_BUFFER gras_ddt_parse__flush_buffer(YY_CURRENT_BUFFER )
+#define YY_FLUSH_BUFFER xbt_ddt_parse__flush_buffer(YY_CURRENT_BUFFER )
-YY_BUFFER_STATE gras_ddt_parse__scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE gras_ddt_parse__scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE gras_ddt_parse__scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE xbt_ddt_parse__scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE xbt_ddt_parse__scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE xbt_ddt_parse__scan_bytes (yyconst char *bytes,int len );
-void *gras_ddt_parse_alloc (yy_size_t );
-void *gras_ddt_parse_realloc (void *,yy_size_t );
-void gras_ddt_parse_free (void * );
+void *xbt_ddt_parse_alloc (yy_size_t );
+void *xbt_ddt_parse_realloc (void *,yy_size_t );
+void xbt_ddt_parse_free (void * );
-#define yy_new_buffer gras_ddt_parse__create_buffer
+#define yy_new_buffer xbt_ddt_parse__create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- gras_ddt_parse_ensure_buffer_stack (); \
+ xbt_ddt_parse_ensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- gras_ddt_parse__create_buffer(gras_ddt_parse_in,YY_BUF_SIZE ); \
+ xbt_ddt_parse__create_buffer(xbt_ddt_parse_in,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- gras_ddt_parse_ensure_buffer_stack (); \
+ xbt_ddt_parse_ensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- gras_ddt_parse__create_buffer(gras_ddt_parse_in,YY_BUF_SIZE ); \
+ xbt_ddt_parse__create_buffer(xbt_ddt_parse_in,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
/* Begin user sect3 */
-#define gras_ddt_parse_wrap(n) 1
+#define xbt_ddt_parse_wrap(n) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
-FILE *gras_ddt_parse_in = (FILE *) 0, *gras_ddt_parse_out = (FILE *) 0;
+FILE *xbt_ddt_parse_in = (FILE *) 0, *xbt_ddt_parse_out = (FILE *) 0;
typedef int yy_state_type;
-extern int gras_ddt_parse_lineno;
+extern int xbt_ddt_parse_lineno;
-int gras_ddt_parse_lineno = 1;
+int xbt_ddt_parse_lineno = 1;
-extern char *gras_ddt_parse_text;
-#define yytext_ptr gras_ddt_parse_text
+extern char *xbt_ddt_parse_text;
+#define yytext_ptr xbt_ddt_parse_text
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static void yy_fatal_error (yyconst char msg[] );
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up gras_ddt_parse_text.
+ * corresponding action - sets up xbt_ddt_parse_text.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- gras_ddt_parse_leng = (size_t) (yy_cp - yy_bp); \
+ xbt_ddt_parse_leng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int gras_ddt_parse__flex_debug;
-int gras_ddt_parse__flex_debug = 0;
+extern int xbt_ddt_parse__flex_debug;
+int xbt_ddt_parse__flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *gras_ddt_parse_text;
-/* DataDesc/ddt_parse -- automatic parsing of data structures */
+char *xbt_ddt_parse_text;
+/* datadesc/ddt_parse -- automatic parsing of data structures */
/* Copyright (c) 2004 Arnaud Legrand, Martin Quinson. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "gras/DataDesc/datadesc_private.h"
-#include "gras/DataDesc/ddt_parse.yy.h"
+#include "xbt/datadesc/datadesc_private.h"
+#include "xbt/datadesc/ddt_parse.yy.h"
#include <string.h>
- YY_BUFFER_STATE gras_ddt_input_buffer;
- FILE *gras_ddt_file_to_parse;
+ YY_BUFFER_STATE xbt_ddt_input_buffer;
+ FILE *xbt_ddt_file_to_parse;
- int gras_ddt_parse_line_pos = 1;
- int gras_ddt_parse_col_pos = 0;
- int gras_ddt_parse_char_pos = 0;
- int gras_ddt_parse_tok_num = 0;
+ int xbt_ddt_parse_line_pos = 1;
+ int xbt_ddt_parse_col_pos = 0;
+ int xbt_ddt_parse_char_pos = 0;
+ int xbt_ddt_parse_tok_num = 0;
const char *definition;
- XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_ddt_lexer,gras_ddt_parse,"The crude internals of the lexer used for type parsing");
-#define SHOW_WHERE XBT_DEBUG("%d:%d (char #%d): seen '%s'", gras_ddt_parse_line_pos,gras_ddt_parse_col_pos,gras_ddt_parse_char_pos,gras_ddt_parse_text)
+ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_ddt_lexer,xbt_ddt_parse,"The crude internals of the lexer used for type parsing");
+#define SHOW_WHERE XBT_DEBUG("%d:%d (char #%d): seen '%s'", xbt_ddt_parse_line_pos,xbt_ddt_parse_col_pos,xbt_ddt_parse_char_pos,xbt_ddt_parse_text)
#define INITIAL 0
#define annotate 1
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int gras_ddt_parse_lex_destroy (void );
+int xbt_ddt_parse_lex_destroy (void );
-int gras_ddt_parse_get_debug (void );
+int xbt_ddt_parse_get_debug (void );
-void gras_ddt_parse_set_debug (int debug_flag );
+void xbt_ddt_parse_set_debug (int debug_flag );
-YY_EXTRA_TYPE gras_ddt_parse_get_extra (void );
+YY_EXTRA_TYPE xbt_ddt_parse_get_extra (void );
-void gras_ddt_parse_set_extra (YY_EXTRA_TYPE user_defined );
+void xbt_ddt_parse_set_extra (YY_EXTRA_TYPE user_defined );
-FILE *gras_ddt_parse_get_in (void );
+FILE *xbt_ddt_parse_get_in (void );
-void gras_ddt_parse_set_in (FILE * in_str );
+void xbt_ddt_parse_set_in (FILE * in_str );
-FILE *gras_ddt_parse_get_out (void );
+FILE *xbt_ddt_parse_get_out (void );
-void gras_ddt_parse_set_out (FILE * out_str );
+void xbt_ddt_parse_set_out (FILE * out_str );
-int gras_ddt_parse_get_leng (void );
+int xbt_ddt_parse_get_leng (void );
-char *gras_ddt_parse_get_text (void );
+char *xbt_ddt_parse_get_text (void );
-int gras_ddt_parse_get_lineno (void );
+int xbt_ddt_parse_get_lineno (void );
-void gras_ddt_parse_set_lineno (int line_number );
+void xbt_ddt_parse_set_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int gras_ddt_parse_wrap (void );
+extern "C" int xbt_ddt_parse_wrap (void );
#else
-extern int gras_ddt_parse_wrap (void );
+extern int xbt_ddt_parse_wrap (void );
#endif
#endif
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( gras_ddt_parse_text, gras_ddt_parse_leng, 1, gras_ddt_parse_out )) {} } while (0)
+#define ECHO do { if (fwrite( xbt_ddt_parse_text, xbt_ddt_parse_leng, 1, xbt_ddt_parse_out )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
int c = '*'; \
size_t n; \
for ( n = 0; n < max_size && \
- (c = getc( gras_ddt_parse_in )) != EOF && c != '\n'; ++n ) \
+ (c = getc( xbt_ddt_parse_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( gras_ddt_parse_in ) ) \
+ if ( c == EOF && ferror( xbt_ddt_parse_in ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, gras_ddt_parse_in))==0 && ferror(gras_ddt_parse_in)) \
+ while ( (result = fread(buf, 1, max_size, xbt_ddt_parse_in))==0 && ferror(xbt_ddt_parse_in)) \
{ \
if( errno != EINTR) \
{ \
break; \
} \
errno=0; \
- clearerr(gras_ddt_parse_in); \
+ clearerr(xbt_ddt_parse_in); \
} \
}\
\
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int gras_ddt_parse_lex (void);
+extern int xbt_ddt_parse_lex (void);
-#define YY_DECL int gras_ddt_parse_lex (void)
+#define YY_DECL int xbt_ddt_parse_lex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after gras_ddt_parse_text and gras_ddt_parse_leng
+/* Code executed at the beginning of each rule, after xbt_ddt_parse_text and xbt_ddt_parse_leng
* have been set up.
*/
#ifndef YY_USER_ACTION
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! gras_ddt_parse_in )
- gras_ddt_parse_in = stdin;
+ if ( ! xbt_ddt_parse_in )
+ xbt_ddt_parse_in = stdin;
- if ( ! gras_ddt_parse_out )
- gras_ddt_parse_out = stdout;
+ if ( ! xbt_ddt_parse_out )
+ xbt_ddt_parse_out = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- gras_ddt_parse_ensure_buffer_stack ();
+ xbt_ddt_parse_ensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- gras_ddt_parse__create_buffer(gras_ddt_parse_in,YY_BUF_SIZE );
+ xbt_ddt_parse__create_buffer(xbt_ddt_parse_in,YY_BUF_SIZE );
}
- gras_ddt_parse__load_buffer_state( );
+ xbt_ddt_parse__load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
- /* Support of gras_ddt_parse_text. */
+ /* Support of xbt_ddt_parse_text. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
{ /****************** ANNOTATION ************************/
XBT_DEBUG("Begin annotation");
annotate_caller = INITIAL;
- gras_ddt_parse_char_pos+= strlen(gras_ddt_parse_text);
- gras_ddt_parse_col_pos+= strlen(gras_ddt_parse_text);
+ xbt_ddt_parse_char_pos+= strlen(xbt_ddt_parse_text);
+ xbt_ddt_parse_col_pos+= strlen(xbt_ddt_parse_text);
BEGIN(annotate);
}
YY_BREAK
{ /* trim annotation */
XBT_DEBUG("Begin annotation");
annotate_caller = foo;
- gras_ddt_parse_char_pos+= strlen(gras_ddt_parse_text);
- gras_ddt_parse_col_pos+= strlen(gras_ddt_parse_text);
+ xbt_ddt_parse_char_pos+= strlen(xbt_ddt_parse_text);
+ xbt_ddt_parse_col_pos+= strlen(xbt_ddt_parse_text);
BEGIN(annotate);
}
YY_BREAK
YY_RULE_SETUP
{
XBT_DEBUG("End annotation");
- gras_ddt_parse_char_pos+= strlen(gras_ddt_parse_text);
- gras_ddt_parse_col_pos+= strlen(gras_ddt_parse_text);
+ xbt_ddt_parse_char_pos+= strlen(xbt_ddt_parse_text);
+ xbt_ddt_parse_col_pos+= strlen(xbt_ddt_parse_text);
BEGIN(annotate_caller);
}
YY_BREAK
case 7:
YY_RULE_SETUP
{ /* eat the rest */
- gras_ddt_parse_char_pos+= strlen(gras_ddt_parse_text);
- gras_ddt_parse_col_pos+= strlen(gras_ddt_parse_text);
- return GRAS_DDT_PARSE_TOKEN_ANNOTATE;
+ xbt_ddt_parse_char_pos+= strlen(xbt_ddt_parse_text);
+ xbt_ddt_parse_col_pos+= strlen(xbt_ddt_parse_text);
+ return XBT_DDT_PARSE_TOKEN_ANNOTATE;
}
YY_BREAK
case 8:
/* rule 12 can match eol */
YY_RULE_SETUP
{
- ++gras_ddt_parse_line_pos;
- gras_ddt_parse_col_pos=0;
- gras_ddt_parse_char_pos++;
+ ++xbt_ddt_parse_line_pos;
+ xbt_ddt_parse_col_pos=0;
+ xbt_ddt_parse_char_pos++;
}
YY_BREAK
case 13:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos+= strlen(gras_ddt_parse_text);
- gras_ddt_parse_col_pos+= strlen(gras_ddt_parse_text);
+ xbt_ddt_parse_char_pos+= strlen(xbt_ddt_parse_text);
+ xbt_ddt_parse_col_pos+= strlen(xbt_ddt_parse_text);
BEGIN(comment_caller);
}
YY_BREAK
case 14:
YY_RULE_SETUP
{ /****************** STATEMENTS ************************/
- gras_ddt_parse_char_pos += strlen(gras_ddt_parse_text);
- gras_ddt_parse_col_pos += strlen(gras_ddt_parse_text);
+ xbt_ddt_parse_char_pos += strlen(xbt_ddt_parse_text);
+ xbt_ddt_parse_col_pos += strlen(xbt_ddt_parse_text);
SHOW_WHERE;
- return(GRAS_DDT_PARSE_TOKEN_WORD);
+ return(XBT_DDT_PARSE_TOKEN_WORD);
}
YY_BREAK
case 15:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos++;
SHOW_WHERE;
- return(GRAS_DDT_PARSE_TOKEN_LA);
+ return(XBT_DDT_PARSE_TOKEN_LA);
}
YY_BREAK
case 16:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos++;
SHOW_WHERE;
- return(GRAS_DDT_PARSE_TOKEN_RA);
+ return(XBT_DDT_PARSE_TOKEN_RA);
}
YY_BREAK
case 17:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos++;
SHOW_WHERE;
- return(GRAS_DDT_PARSE_TOKEN_LB);
+ return(XBT_DDT_PARSE_TOKEN_LB);
}
YY_BREAK
case 18:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos++;
SHOW_WHERE;
- return(GRAS_DDT_PARSE_TOKEN_RB);
+ return(XBT_DDT_PARSE_TOKEN_RB);
}
YY_BREAK
case 19:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos++;
SHOW_WHERE;
- return(GRAS_DDT_PARSE_TOKEN_LP);
+ return(XBT_DDT_PARSE_TOKEN_LP);
}
YY_BREAK
case 20:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos++;
SHOW_WHERE;
- return(GRAS_DDT_PARSE_TOKEN_RP);
+ return(XBT_DDT_PARSE_TOKEN_RP);
}
YY_BREAK
case 21:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos++;
SHOW_WHERE;
- return(GRAS_DDT_PARSE_TOKEN_STAR);
+ return(XBT_DDT_PARSE_TOKEN_STAR);
}
YY_BREAK
case 22:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos++;
SHOW_WHERE;
- return(GRAS_DDT_PARSE_TOKEN_SEMI_COLON);
+ return(XBT_DDT_PARSE_TOKEN_SEMI_COLON);
}
YY_BREAK
case 23:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos++;
SHOW_WHERE;
- return(GRAS_DDT_PARSE_TOKEN_COLON);
+ return(XBT_DDT_PARSE_TOKEN_COLON);
}
YY_BREAK
case 24:
/* rule 24 can match eol */
YY_RULE_SETUP
{
- gras_ddt_parse_line_pos++;
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos=0;
+ xbt_ddt_parse_line_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos=0;
SHOW_WHERE;
}
YY_BREAK
case 25:
YY_RULE_SETUP
{
- gras_ddt_parse_char_pos++;
- gras_ddt_parse_col_pos++;
+ xbt_ddt_parse_char_pos++;
+ xbt_ddt_parse_col_pos++;
SHOW_WHERE;
}
YY_BREAK
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed gras_ddt_parse_in at a new source and called
- * gras_ddt_parse_lex(). If so, then we have to assure
+ * just pointed xbt_ddt_parse_in at a new source and called
+ * xbt_ddt_parse_lex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = gras_ddt_parse_in;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = xbt_ddt_parse_in;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( gras_ddt_parse_wrap( ) )
+ if ( xbt_ddt_parse_wrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * gras_ddt_parse_text, we can now set up
+ * xbt_ddt_parse_text, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of gras_ddt_parse_lex */
+} /* end of xbt_ddt_parse_lex */
/* yy_get_next_buffer - try to read in a new buffer
*
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- gras_ddt_parse_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ xbt_ddt_parse_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- gras_ddt_parse_restart(gras_ddt_parse_in );
+ xbt_ddt_parse_restart(xbt_ddt_parse_in );
}
else
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) gras_ddt_parse_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) xbt_ddt_parse_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
yy_cp = (yy_c_buf_p);
- /* undo effects of setting up gras_ddt_parse_text */
+ /* undo effects of setting up xbt_ddt_parse_text */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
*/
/* Reset buffer status. */
- gras_ddt_parse_restart(gras_ddt_parse_in );
+ xbt_ddt_parse_restart(xbt_ddt_parse_in );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( gras_ddt_parse_wrap( ) )
+ if ( xbt_ddt_parse_wrap( ) )
return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve gras_ddt_parse_text */
+ *(yy_c_buf_p) = '\0'; /* preserve xbt_ddt_parse_text */
(yy_hold_char) = *++(yy_c_buf_p);
return c;
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void gras_ddt_parse_restart (FILE * input_file )
+ void xbt_ddt_parse_restart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
- gras_ddt_parse_ensure_buffer_stack ();
+ xbt_ddt_parse_ensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- gras_ddt_parse__create_buffer(gras_ddt_parse_in,YY_BUF_SIZE );
+ xbt_ddt_parse__create_buffer(xbt_ddt_parse_in,YY_BUF_SIZE );
}
- gras_ddt_parse__init_buffer(YY_CURRENT_BUFFER,input_file );
- gras_ddt_parse__load_buffer_state( );
+ xbt_ddt_parse__init_buffer(YY_CURRENT_BUFFER,input_file );
+ xbt_ddt_parse__load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void gras_ddt_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void xbt_ddt_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
- * gras_ddt_parse_pop_buffer_state();
- * gras_ddt_parse_push_buffer_state(new_buffer);
+ * xbt_ddt_parse_pop_buffer_state();
+ * xbt_ddt_parse_push_buffer_state(new_buffer);
*/
- gras_ddt_parse_ensure_buffer_stack ();
+ xbt_ddt_parse_ensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- gras_ddt_parse__load_buffer_state( );
+ xbt_ddt_parse__load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (gras_ddt_parse_wrap()) processing, but the only time this flag
- * is looked at is after gras_ddt_parse_wrap() is called, so it's safe
+ * EOF (xbt_ddt_parse_wrap()) processing, but the only time this flag
+ * is looked at is after xbt_ddt_parse_wrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void gras_ddt_parse__load_buffer_state (void)
+static void xbt_ddt_parse__load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- gras_ddt_parse_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ xbt_ddt_parse_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE gras_ddt_parse__create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE xbt_ddt_parse__create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) gras_ddt_parse_alloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) xbt_ddt_parse_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse__create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xbt_ddt_parse__create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) gras_ddt_parse_alloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) xbt_ddt_parse_alloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse__create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xbt_ddt_parse__create_buffer()" );
b->yy_is_our_buffer = 1;
- gras_ddt_parse__init_buffer(b,file );
+ xbt_ddt_parse__init_buffer(b,file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with gras_ddt_parse__create_buffer()
+ * @param b a buffer created with xbt_ddt_parse__create_buffer()
*
*/
- void gras_ddt_parse__delete_buffer (YY_BUFFER_STATE b )
+ void xbt_ddt_parse__delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- gras_ddt_parse_free((void *) b->yy_ch_buf );
+ xbt_ddt_parse_free((void *) b->yy_ch_buf );
- gras_ddt_parse_free((void *) b );
+ xbt_ddt_parse_free((void *) b );
}
#ifndef __cplusplus
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a gras_ddt_parse_restart() or at EOF.
+ * such as during a xbt_ddt_parse_restart() or at EOF.
*/
- static void gras_ddt_parse__init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void xbt_ddt_parse__init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
- gras_ddt_parse__flush_buffer(b );
+ xbt_ddt_parse__flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then gras_ddt_parse__init_buffer was _probably_
- * called from gras_ddt_parse_restart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then xbt_ddt_parse__init_buffer was _probably_
+ * called from xbt_ddt_parse_restart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
- void gras_ddt_parse__flush_buffer (YY_BUFFER_STATE b )
+ void xbt_ddt_parse__flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- gras_ddt_parse__load_buffer_state( );
+ xbt_ddt_parse__load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
* @param new_buffer The new state.
*
*/
-void gras_ddt_parse_push_buffer_state (YY_BUFFER_STATE new_buffer )
+void xbt_ddt_parse_push_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- gras_ddt_parse_ensure_buffer_stack();
+ xbt_ddt_parse_ensure_buffer_stack();
- /* This block is copied from gras_ddt_parse__switch_to_buffer. */
+ /* This block is copied from xbt_ddt_parse__switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from gras_ddt_parse__switch_to_buffer. */
- gras_ddt_parse__load_buffer_state( );
+ /* copied from xbt_ddt_parse__switch_to_buffer. */
+ xbt_ddt_parse__load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
* The next element becomes the new top.
*
*/
-void gras_ddt_parse_pop_buffer_state (void)
+void xbt_ddt_parse_pop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- gras_ddt_parse__delete_buffer(YY_CURRENT_BUFFER );
+ xbt_ddt_parse__delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- gras_ddt_parse__load_buffer_state( );
+ xbt_ddt_parse__load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void gras_ddt_parse_ensure_buffer_stack (void)
+static void xbt_ddt_parse_ensure_buffer_stack (void)
{
int num_to_alloc;
* immediate realloc on the next call.
*/
num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)gras_ddt_parse_alloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)xbt_ddt_parse_alloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse_ensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xbt_ddt_parse_ensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)gras_ddt_parse_realloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)xbt_ddt_parse_realloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse_ensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xbt_ddt_parse_ensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE gras_ddt_parse__scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE xbt_ddt_parse__scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) gras_ddt_parse_alloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) xbt_ddt_parse_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse__scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xbt_ddt_parse__scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- gras_ddt_parse__switch_to_buffer(b );
+ xbt_ddt_parse__switch_to_buffer(b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to gras_ddt_parse_lex() will
+/** Setup the input buffer state to scan a string. The next call to xbt_ddt_parse_lex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * gras_ddt_parse__scan_bytes() instead.
+ * xbt_ddt_parse__scan_bytes() instead.
*/
-YY_BUFFER_STATE gras_ddt_parse__scan_string (yyconst char * yystr )
+YY_BUFFER_STATE xbt_ddt_parse__scan_string (yyconst char * yystr )
{
- return gras_ddt_parse__scan_bytes(yystr,strlen(yystr) );
+ return xbt_ddt_parse__scan_bytes(yystr,strlen(yystr) );
}
-/** Setup the input buffer state to scan the given bytes. The next call to gras_ddt_parse_lex() will
+/** Setup the input buffer state to scan the given bytes. The next call to xbt_ddt_parse_lex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE gras_ddt_parse__scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE xbt_ddt_parse__scan_bytes (yyconst char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
- buf = (char *) gras_ddt_parse_alloc(n );
+ buf = (char *) xbt_ddt_parse_alloc(n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse__scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xbt_ddt_parse__scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = gras_ddt_parse__scan_buffer(buf,n );
+ b = xbt_ddt_parse__scan_buffer(buf,n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in gras_ddt_parse__scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in xbt_ddt_parse__scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up gras_ddt_parse_text. */ \
+ /* Undo effects of setting up xbt_ddt_parse_text. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- gras_ddt_parse_text[gras_ddt_parse_leng] = (yy_hold_char); \
- (yy_c_buf_p) = gras_ddt_parse_text + yyless_macro_arg; \
+ xbt_ddt_parse_text[xbt_ddt_parse_leng] = (yy_hold_char); \
+ (yy_c_buf_p) = xbt_ddt_parse_text + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- gras_ddt_parse_leng = yyless_macro_arg; \
+ xbt_ddt_parse_leng = yyless_macro_arg; \
} \
while ( 0 )
/** Get the current line number.
*
*/
-int gras_ddt_parse_get_lineno (void)
+int xbt_ddt_parse_get_lineno (void)
{
- return gras_ddt_parse_lineno;
+ return xbt_ddt_parse_lineno;
}
/** Get the input stream.
*
*/
-FILE *gras_ddt_parse_get_in (void)
+FILE *xbt_ddt_parse_get_in (void)
{
- return gras_ddt_parse_in;
+ return xbt_ddt_parse_in;
}
/** Get the output stream.
*
*/
-FILE *gras_ddt_parse_get_out (void)
+FILE *xbt_ddt_parse_get_out (void)
{
- return gras_ddt_parse_out;
+ return xbt_ddt_parse_out;
}
/** Get the length of the current token.
*
*/
-int gras_ddt_parse_get_leng (void)
+int xbt_ddt_parse_get_leng (void)
{
- return gras_ddt_parse_leng;
+ return xbt_ddt_parse_leng;
}
/** Get the current token.
*
*/
-char *gras_ddt_parse_get_text (void)
+char *xbt_ddt_parse_get_text (void)
{
- return gras_ddt_parse_text;
+ return xbt_ddt_parse_text;
}
/** Set the current line number.
* @param line_number
*
*/
-void gras_ddt_parse_set_lineno (int line_number )
+void xbt_ddt_parse_set_lineno (int line_number )
{
- gras_ddt_parse_lineno = line_number;
+ xbt_ddt_parse_lineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
- * @see gras_ddt_parse__switch_to_buffer
+ * @see xbt_ddt_parse__switch_to_buffer
*/
-void gras_ddt_parse_set_in (FILE * in_str )
+void xbt_ddt_parse_set_in (FILE * in_str )
{
- gras_ddt_parse_in = in_str ;
+ xbt_ddt_parse_in = in_str ;
}
-void gras_ddt_parse_set_out (FILE * out_str )
+void xbt_ddt_parse_set_out (FILE * out_str )
{
- gras_ddt_parse_out = out_str ;
+ xbt_ddt_parse_out = out_str ;
}
-int gras_ddt_parse_get_debug (void)
+int xbt_ddt_parse_get_debug (void)
{
- return gras_ddt_parse__flex_debug;
+ return xbt_ddt_parse__flex_debug;
}
-void gras_ddt_parse_set_debug (int bdebug )
+void xbt_ddt_parse_set_debug (int bdebug )
{
- gras_ddt_parse__flex_debug = bdebug ;
+ xbt_ddt_parse__flex_debug = bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from gras_ddt_parse_lex_destroy(), so don't allocate here.
+ * This function is called from xbt_ddt_parse_lex_destroy(), so don't allocate here.
*/
(yy_buffer_stack) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
- gras_ddt_parse_in = stdin;
- gras_ddt_parse_out = stdout;
+ xbt_ddt_parse_in = stdin;
+ xbt_ddt_parse_out = stdout;
#else
- gras_ddt_parse_in = (FILE *) 0;
- gras_ddt_parse_out = (FILE *) 0;
+ xbt_ddt_parse_in = (FILE *) 0;
+ xbt_ddt_parse_out = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
- * gras_ddt_parse_lex_init()
+ * xbt_ddt_parse_lex_init()
*/
return 0;
}
-/* gras_ddt_parse_lex_destroy is for both reentrant and non-reentrant scanners. */
-int gras_ddt_parse_lex_destroy (void)
+/* xbt_ddt_parse_lex_destroy is for both reentrant and non-reentrant scanners. */
+int xbt_ddt_parse_lex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- gras_ddt_parse__delete_buffer(YY_CURRENT_BUFFER );
+ xbt_ddt_parse__delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- gras_ddt_parse_pop_buffer_state();
+ xbt_ddt_parse_pop_buffer_state();
}
/* Destroy the stack itself. */
- gras_ddt_parse_free((yy_buffer_stack) );
+ xbt_ddt_parse_free((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * gras_ddt_parse_lex() is called, initialization will occur. */
+ * xbt_ddt_parse_lex() is called, initialization will occur. */
yy_init_globals( );
return 0;
}
#endif
-void *gras_ddt_parse_alloc (yy_size_t size )
+void *xbt_ddt_parse_alloc (yy_size_t size )
{
return (void *) malloc( size );
}
-void *gras_ddt_parse_realloc (void * ptr, yy_size_t size )
+void *xbt_ddt_parse_realloc (void * ptr, yy_size_t size )
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
return (void *) realloc( (char *) ptr, size );
}
-void gras_ddt_parse_free (void * ptr )
+void xbt_ddt_parse_free (void * ptr )
{
- free( (char *) ptr ); /* see gras_ddt_parse_realloc() for (char *) cast */
+ free( (char *) ptr ); /* see xbt_ddt_parse_realloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
/* {space}+ { return(TOKEN_SPACE);} */
-void gras_ddt_parse_dump(void) {
- switch(gras_ddt_parse_tok_num) {
- case GRAS_DDT_PARSE_TOKEN_LA : {printf("TOKEN_LA ");break;}
- case GRAS_DDT_PARSE_TOKEN_RA : {printf("TOKEN_RA ");break;}
- case GRAS_DDT_PARSE_TOKEN_WORD : {printf("TOKEN_WORD ");break;}
- /* case GRAS_DDT_PARSE_TOKEN_SPACE : {printf("TOKEN_SPACE ");break;}*/
- /* case GRAS_DDT_PARSE_TOKEN_COMMENT : {printf("TOKEN_COMMENT ");break;}*/
- case GRAS_DDT_PARSE_TOKEN_NEWLINE : {printf("TOKEN_NEWLINE\n");return;}
- case GRAS_DDT_PARSE_TOKEN_EMPTY : {printf("TOKEN_EMPTY\n");return;}
- default : {printf("Unknown token %d\n", gras_ddt_parse_tok_num);return;}
+void xbt_ddt_parse_dump(void) {
+ switch(xbt_ddt_parse_tok_num) {
+ case XBT_DDT_PARSE_TOKEN_LA : {printf("TOKEN_LA ");break;}
+ case XBT_DDT_PARSE_TOKEN_RA : {printf("TOKEN_RA ");break;}
+ case XBT_DDT_PARSE_TOKEN_WORD : {printf("TOKEN_WORD ");break;}
+ /* case XBT_DDT_PARSE_TOKEN_SPACE : {printf("TOKEN_SPACE ");break;}*/
+ /* case XBT_DDT_PARSE_TOKEN_COMMENT : {printf("TOKEN_COMMENT ");break;}*/
+ case XBT_DDT_PARSE_TOKEN_NEWLINE : {printf("TOKEN_NEWLINE\n");return;}
+ case XBT_DDT_PARSE_TOKEN_EMPTY : {printf("TOKEN_EMPTY\n");return;}
+ default : {printf("Unknown token %d\n", xbt_ddt_parse_tok_num);return;}
}
- printf("-->%s<-- [line %d, pos %d]\n",gras_ddt_parse_text,gras_ddt_parse_line_pos,gras_ddt_parse_char_pos);
+ printf("-->%s<-- [line %d, pos %d]\n",xbt_ddt_parse_text,xbt_ddt_parse_line_pos,xbt_ddt_parse_char_pos);
return;
}
-int gras_ddt_parse_lex_n_dump(void) {
- gras_ddt_parse_tok_num = gras_ddt_parse_lex();
- /* gras_ddt_parse_char_pos += strlen(gras_ddt_parse_text);*/
- return(gras_ddt_parse_tok_num);
+int xbt_ddt_parse_lex_n_dump(void) {
+ xbt_ddt_parse_tok_num = xbt_ddt_parse_lex();
+ /* xbt_ddt_parse_char_pos += strlen(xbt_ddt_parse_text);*/
+ return(xbt_ddt_parse_tok_num);
}
-void gras_ddt_parse_pointer_init(const char *file) {
- gras_ddt_file_to_parse = fopen(file,"r");
- gras_ddt_input_buffer = gras_ddt_parse__create_buffer(gras_ddt_file_to_parse,10 );
- gras_ddt_parse__switch_to_buffer(gras_ddt_input_buffer);
+void xbt_ddt_parse_pointer_init(const char *file) {
+ xbt_ddt_file_to_parse = fopen(file,"r");
+ xbt_ddt_input_buffer = xbt_ddt_parse__create_buffer(xbt_ddt_file_to_parse,10 );
+ xbt_ddt_parse__switch_to_buffer(xbt_ddt_input_buffer);
- gras_ddt_parse_line_pos = 1;
- gras_ddt_parse_char_pos = 0;
- gras_ddt_parse_col_pos = 0;
- gras_ddt_parse_tok_num = 0;
+ xbt_ddt_parse_line_pos = 1;
+ xbt_ddt_parse_char_pos = 0;
+ xbt_ddt_parse_col_pos = 0;
+ xbt_ddt_parse_tok_num = 0;
}
-void gras_ddt_parse_pointer_close(void) {
- gras_ddt_parse__delete_buffer(gras_ddt_input_buffer);
- fclose(gras_ddt_file_to_parse);
+void xbt_ddt_parse_pointer_close(void) {
+ xbt_ddt_parse__delete_buffer(xbt_ddt_input_buffer);
+ fclose(xbt_ddt_file_to_parse);
- gras_ddt_parse_line_pos = 1;
- gras_ddt_parse_char_pos = 0;
- gras_ddt_parse_tok_num = 0;
+ xbt_ddt_parse_line_pos = 1;
+ xbt_ddt_parse_char_pos = 0;
+ xbt_ddt_parse_tok_num = 0;
}
-void gras_ddt_parse_pointer_string_init(const char *string_to_parse) {
- gras_ddt_input_buffer = gras_ddt_parse__scan_string (string_to_parse);
+void xbt_ddt_parse_pointer_string_init(const char *string_to_parse) {
+ xbt_ddt_input_buffer = xbt_ddt_parse__scan_string (string_to_parse);
definition = string_to_parse;
- gras_ddt_parse__switch_to_buffer(gras_ddt_input_buffer);
+ xbt_ddt_parse__switch_to_buffer(xbt_ddt_input_buffer);
- gras_ddt_parse_line_pos = 1;
- gras_ddt_parse_char_pos = 0;
- gras_ddt_parse_tok_num = 0;
+ xbt_ddt_parse_line_pos = 1;
+ xbt_ddt_parse_char_pos = 0;
+ xbt_ddt_parse_tok_num = 0;
}
-void gras_ddt_parse_pointer_string_close(void) {
- gras_ddt_parse__delete_buffer(gras_ddt_input_buffer);
+void xbt_ddt_parse_pointer_string_close(void) {
+ xbt_ddt_parse__delete_buffer(xbt_ddt_input_buffer);
- gras_ddt_parse_line_pos = 1;
- gras_ddt_parse_char_pos = 0;
- gras_ddt_parse_tok_num = 0;
+ xbt_ddt_parse_line_pos = 1;
+ xbt_ddt_parse_char_pos = 0;
+ xbt_ddt_parse_tok_num = 0;
if (0)
yyunput('\0',NULL); /* fake a use of this function to calm gcc down */