Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New dax loader infrastructure (empty box so far)
[simgrid.git] / src / simdag / sd_daxloader.c
1 /* Copyright (c) 2009 Da SimGrid Team.  All rights reserved.                */
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 #include "private.h"
7 #include "simdag/simdag.h"
8 #include "xbt/misc.h"
9 #include "xbt/log.h"
10
11 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_daxparse, sd,"Parsing DAX files");
12
13 #undef CLEANUP
14 #include "dax_dtd.h"
15 #include "dax_dtd.c"
16
17 static YY_BUFFER_STATE input_buffer;
18
19 static xbt_dynar_t result;
20
21 static void SD_task_free(void*t){
22   SD_task_destroy(t);
23 }
24
25 xbt_dynar_t SD_daxload(const char*filename) {
26   FILE* in_file = fopen(filename,"r");
27   xbt_assert1(in_file, "Unable to open \"%s\"\n", filename);
28   input_buffer =
29     dax__create_buffer(in_file, 10);
30   dax__switch_to_buffer(input_buffer);
31   dax_lineno = 1;
32
33   result = xbt_dynar_new(sizeof(SD_task_t),SD_task_free);
34   xbt_assert1(dax_lex(),"Parse error in %s",filename);
35   dax__delete_buffer(input_buffer);
36   fclose(in_file);
37   return result;
38 }
39
40 void STag_dax__adag(void) {
41
42 }
43 void STag_dax__job(void) {
44
45 }
46 void STag_dax__child(void) {
47
48 }
49 void STag_dax__parent(void) {
50
51 }
52 void ETag_dax__adag(void) {
53
54 }
55 void ETag_dax__job(void) {
56
57 }
58 void ETag_dax__child(void) {
59
60 }
61 void ETag_dax__parent(void) {
62
63 }