Logo AND Algorithmique Numérique Distribuée

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