Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
02ea0ae942588a23d1536eead3d1b012f7f6f84c
[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 typedef enum {
10   TOKEN_EMPTY = 0,
11   TOKEN_LP = 512,
12   TOKEN_RP,
13   TOKEN_BEGIN_SECTION,
14   TOKEN_END_SECTION,
15   TOKEN_CLOSURE,
16   TOKEN_WORD,
17   TOKEN_NEWLINE,
18   TOKEN_ERROR
19 } e_surf_token_t;
20
21 #define MAX_STR_CONST 1024
22
23 extern char *surf_parse_text;
24 extern int line_pos;
25 extern int char_pos;
26 extern int tok_num;
27
28 e_surf_token_t surf_parse(void);
29 void find_section(const char* file, const char* section_name);
30 void close_section(const char* section_name);
31
32 /* Should not be called if you use the previous "section" functions */
33 void  surf_parse_open(const char *file);
34 void  surf_parse_close(void);
35
36 #endif