Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add some convenient functions
[simgrid.git] / src / include / surf / surf_parse.h
1 /* Authors: Arnaud Legrand                                                  */
2
3 /* This program is free software; you can redistribute it and/or modify it
4    under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef _SURF_SURF_PARSE_H
7 #define _SURF_SURF_PARSE_H
8
9 #include "xbt/misc.h"
10 #include "surf/trace_mgr.h"
11
12 typedef enum {
13   TOKEN_EMPTY = 0,
14   TOKEN_LP = 512,
15   TOKEN_RP,
16   TOKEN_BEGIN_SECTION,
17   TOKEN_END_SECTION,
18   TOKEN_CLOSURE,
19   TOKEN_WORD,
20   TOKEN_NEWLINE,
21   TOKEN_ERROR
22 } e_surf_token_t;
23
24 #define MAX_STR_CONST 1024
25
26 extern char *surf_parse_text;
27 extern int line_pos;
28 extern int char_pos;
29 extern int tok_num;
30
31 e_surf_token_t surf_parse(void);
32 void find_section(const char* file, const char* section_name);
33 void close_section(const char* section_name);
34 void surf_parse_float(xbt_maxmin_float_t *value);
35 void surf_parse_trace(tmgr_trace_t *trace);
36
37
38 /* Should not be called if you use the previous "section" functions */
39 void  surf_parse_open(const char *file);
40 void  surf_parse_close(void);
41
42 #endif