X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/04ce6e7880ede315f411edf7ba21cbbfd5268b90..b5a692a29ea9df03babe3234aeef77d278525a89:/src/include/surf/surf_parse.h diff --git a/src/include/surf/surf_parse.h b/src/include/surf/surf_parse.h index c656cc5c60..ec325e00e3 100644 --- a/src/include/surf/surf_parse.h +++ b/src/include/surf/surf_parse.h @@ -8,52 +8,49 @@ #ifndef _SURF_SURF_PARSE_H #define _SURF_SURF_PARSE_H +#include #include "xbt/misc.h" #include "surf/trace_mgr.h" - -typedef enum { - TOKEN_EMPTY = 0, - TOKEN_LP = 512, - TOKEN_RP, - TOKEN_BEGIN_SECTION, - TOKEN_END_SECTION, - TOKEN_CLOSURE, - TOKEN_WORD, - TOKEN_NEWLINE, - TOKEN_ERROR -} e_surf_token_t; - -#define MAX_STR_CONST 1024 - -extern char *surf_parse_text; -extern int line_pos; -extern int char_pos; -extern int tok_num; - -e_surf_token_t surf_parse(void); -void find_section(const char* file, const char* section_name); -void close_section(const char* section_name); -void surf_parse_float(xbt_maxmin_float_t *value); -void surf_parse_trace(tmgr_trace_t *trace); - - -/* Should not be called if you use the previous "section" functions */ -void surf_parse_open(const char *file); -void surf_parse_close(void); +#include "surfxml.h" + +typedef void (*void_f_void_t)(void); +typedef int (*int_f_void_t)(void); + +extern void_f_void_t STag_platform_description_fun; +extern void_f_void_t ETag_platform_description_fun; +extern void_f_void_t STag_cpu_fun; +extern void_f_void_t ETag_cpu_fun; +extern void_f_void_t STag_network_link_fun; +extern void_f_void_t ETag_network_link_fun; +extern void_f_void_t STag_route_fun; +extern void_f_void_t ETag_route_fun; +extern void_f_void_t STag_route_element_fun; +extern void_f_void_t ETag_route_element_fun; +extern void_f_void_t STag_process_fun; +extern void_f_void_t ETag_process_fun; +extern void_f_void_t STag_argument_fun; +extern void_f_void_t ETag_argument_fun; + + +void surf_parse_open(const char *file); +void surf_parse_close(void); +extern int_f_void_t surf_parse; +void surf_parse_reset_parser(void); +void surf_parse_get_double(double *value,const char *string); +void surf_parse_get_trace(tmgr_trace_t *trace, const char *string); /* Prototypes of the functions offered by flex */ int surf_parse_lex(void); -int surf_parse_get_lineno (void); -FILE *surf_parse_get_in (void); -FILE *surf_parse_get_out (void); -int surf_parse_get_leng (void); -char *surf_parse_get_text (void); -void surf_parse_set_lineno (int line_number ); -void surf_parse_set_in (FILE * in_str ); -void surf_parse_set_out (FILE * out_str ); -int surf_parse_get_debug (void); -void surf_parse_set_debug (int bdebug ); -int surf_parse_lex_destroy (void); - +int surf_parse_get_lineno(void); +FILE *surf_parse_get_in(void); +FILE *surf_parse_get_out(void); +int surf_parse_get_leng(void); +char *surf_parse_get_text(void); +void surf_parse_set_lineno(int line_number); +void surf_parse_set_in(FILE * in_str); +void surf_parse_set_out(FILE * out_str); +int surf_parse_get_debug(void); +void surf_parse_set_debug(int bdebug); +int surf_parse_lex_destroy(void); #endif