X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/076d269ffe3817780c1740e29f55cc08557015ca..a2a1aee909cfa9076f9dbe34778140af74dfebd3:/src/xbt/graphxml.l diff --git a/src/xbt/graphxml.l b/src/xbt/graphxml.l index 423adbc7c9..b5a6b215ab 100644 --- a/src/xbt/graphxml.l +++ b/src/xbt/graphxml.l @@ -1,9 +1,10 @@ -/* Validating XML processor for graphxml.dtd. - * Generated 2006/03/21 12:59:33. +/* Validating XML processor for xbt/graphxml.dtd. + * Generated 2006/07/18 21:02:16. * * This program was generated with the FleXML XML processor generator. - * FleXML is Copyright © 1999-2005 Kristoffer Rose. All rights reserved. - * (Id: flexml.pl,v 1.46 2006/03/21 08:24:12 legranda Exp). + * FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved. + * FleXML is Copyright (C) 2003-2006 Martin Quinson. All rights reserved. + * (Id: flexml.pl,v 1.53 2006/07/18 12:12:06 mquinson Exp). * * There are two, intertwined parts to this program, part A and part B. * @@ -11,8 +12,8 @@ * ------ * * Some parts, here collectively called "Part A", are found in the - * FleXML package. They are Copyright © 1999-2005 Kristoffer Rose. - * All rights reserved. + * FleXML package. They are Copyright (C) 1999-2005 Kristoffer Rose + * and Copyright (C) 2003-2006 Martin Quinson. All rights reserved. * * You can redistribute, use, perform, display and/or modify "Part A" * provided the following two conditions hold: @@ -48,9 +49,9 @@ /* Version strings. */ const char rcs_graphxml_flexml_skeleton[] = - "$" "Id: skel,v 1.27 2006/03/21 08:24:12 legranda Exp $"; + "$" "Id: skel,v 1.31 2006/07/18 18:21:13 mquinson Exp $"; const char rcs_graphxml_flexml[] = - "$" "Id: flexml.pl,v 1.46 2006/03/21 08:24:12 legranda Exp $"; + "$" "Id: flexml.pl,v 1.53 2006/07/18 12:12:06 mquinson Exp $"; /* ANSI headers. */ #include @@ -66,13 +67,18 @@ const char rcs_graphxml_flexml[] = /* XML processor api. */ /* FleXML-provided data. */ -const char* pcdata; -AT_graphxml_edge_target A_graphxml_edge_target; +const char* graphxml_pcdata; AT_graphxml_node_name A_graphxml_node_name; +AT_graphxml_edge_source A_graphxml_edge_source; +AT_graphxml_node_position_y A_graphxml_node_position_y; +AT_graphxml_node_position_x A_graphxml_node_position_x; +AT_graphxml_edge_data A_graphxml_edge_data; +AT_graphxml_edge_target A_graphxml_edge_target; +AT_graphxml_graph_isDirected A_graphxml_graph_isDirected; AT_graphxml_node_label A_graphxml_node_label; +AT_graphxml_node_data A_graphxml_node_data; AT_graphxml_edge_label A_graphxml_edge_label; -AT_graphxml_edge_source A_graphxml_edge_source; -AT_graphxml_edge_isDirected A_graphxml_edge_isDirected; +AT_graphxml_edge_length A_graphxml_edge_length; AT_graphxml_edge_name A_graphxml_edge_name; /* XML state. */ @@ -102,10 +108,10 @@ static void cleanup(void); #define CLEANUP cleanup() /* Text buffer stack handling. */ -char bufferstack[FLEXML_BUFFERSTACKSIZE]; +static char bufferstack[FLEXML_BUFFERSTACKSIZE]; static char* limit = bufferstack + FLEXML_BUFFERSTACKSIZE; typedef struct BufferLast_s { - struct BufferLast_s *old; char* saved; char new1[1]; + struct BufferLast_s *old; const char* saved; char new1[1]; } BufferLast; #ifdef FLEXML_HasMixed static BufferLast* last = (BufferLast*)0; @@ -129,7 +135,7 @@ static void bufferliteral(char c, const char** pp, char* text) } #ifdef FLEXML_HasMixed -static void pushbuffer(char* p) +static void pushbuffer(const char* p) { BufferLast* l = (BufferLast*)next; assert(next < limit); @@ -139,7 +145,7 @@ static void pushbuffer(char* p) last = l; } -static char* popbuffer(void) +static const char* popbuffer(void) { BufferLast* l = last; assert(last != (BufferLast*)0); @@ -287,16 +293,25 @@ const char* *graphxml_statenames=NULL; /* */ + /* isDirected (true|false) "true" + * > */ + "{ + "isDirected"{Eq}"'true'" | + "isDirected"{Eq}"\"true\"" A_graphxml_graph_isDirected = A_graphxml_graph_isDirected_true; + "isDirected"{Eq}"'false'" | + "isDirected"{Eq}"\"false\"" A_graphxml_graph_isDirected = A_graphxml_graph_isDirected_false; + ">" { - LEAVE; STag_graphxml_graph();pcdata = NULL; ENTER(S_graphxml_graph); + LEAVE; STag_graphxml_graph();graphxml_pcdata = NULL; ENTER(S_graphxml_graph); } "/>" { - LEAVE; STag_graphxml_graph(); pcdata = NULL; ETag_graphxml_graph(); + LEAVE; STag_graphxml_graph(); graphxml_pcdata = NULL; ETag_graphxml_graph(); switch (YY_START) { case ROOT_graphxml_graph: SET(EPILOG); break; } @@ -321,11 +336,17 @@ const char* *graphxml_statenames=NULL; /* label CDATA "" * name CDATA #REQUIRED + * data CDATA "" + * position_x CDATA "-1.0" + * position_y CDATA "-1.0" * > */ "" { if (!A_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element."); - LEAVE; STag_graphxml_node();pcdata = NULL; ENTER(E_graphxml_node); + LEAVE; STag_graphxml_node();graphxml_pcdata = NULL; ENTER(E_graphxml_node); } "/>" { if (!A_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element."); - LEAVE; STag_graphxml_node(); pcdata = NULL; ETag_graphxml_node(); + LEAVE; STag_graphxml_node(); graphxml_pcdata = NULL; ETag_graphxml_node(); switch (YY_START) { case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break; case ROOT_graphxml_node: SET(EPILOG); break; @@ -368,10 +398,11 @@ const char* *graphxml_statenames=NULL; } /* label CDATA "" - * name CDATA #IMPLIED - * source CDATA #REQUIRED - * target CDATA #REQUIRED - * isDirected (true|false) "true" + * name CDATA #IMPLIED + * source CDATA #REQUIRED + * target CDATA #REQUIRED + * length CDATA "-1.0" + * data CDATA "" * > */ "" { if (!A_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element."); if (!A_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element."); - LEAVE; STag_graphxml_edge();pcdata = NULL; ENTER(E_graphxml_edge); + LEAVE; STag_graphxml_edge();graphxml_pcdata = NULL; ENTER(E_graphxml_edge); } "/>" { if (!A_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element."); if (!A_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element."); - LEAVE; STag_graphxml_edge(); pcdata = NULL; ETag_graphxml_edge(); + LEAVE; STag_graphxml_edge(); graphxml_pcdata = NULL; ETag_graphxml_edge(); switch (YY_START) { case S_graphxml_graph_1: case S_graphxml_graph_3: case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph: SET(S_graphxml_graph_5); break; case ROOT_graphxml_edge: SET(EPILOG); break;