Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into vmtrace
[simgrid.git] / src / xbt / graphxml.c
index 9a418c4..9581d79 100644 (file)
@@ -72,7 +72,6 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -103,6 +102,8 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
+#endif /* ! C99 */
+
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -159,7 +160,15 @@ typedef unsigned int flex_uint32_t;
 
 /* Size of default input buffer. */
 #ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
 #define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
 #endif
 
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -1049,7 +1058,7 @@ char *xbt_graph_parse_text;
  * This program was generated with the FleXML XML processor generator.
  * FleXML is Copyright (C) 1999-2005 Kristoffer Rose.  All rights reserved.
  * FleXML is Copyright (C) 2003-2011 Martin Quinson.  All rights reserved.
- * (Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp).
+ * (Id: flexml.pl,v 1.69 2012/12/20 00:13:40 mquinson Exp).
  * 
  * There are two, intertwined parts to this program, part A and part B.
  *
@@ -1094,7 +1103,7 @@ char *xbt_graph_parse_text;
 const char rcs_graphxml_flexml_skeleton[] =
  "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
 const char rcs_graphxml_flexml[] =
- "$" "Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp $";
+ "$" "Id: flexml.pl,v 1.69 2012/12/20 00:13:40 mquinson Exp $";
 
 /* ANSI headers. */
 #include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
@@ -1135,12 +1144,12 @@ short int graphxml_node_name_isset;
 AT_graphxml_edge_source AX_graphxml_edge_source;
 #define A_graphxml_edge_source (graphxml_bufferstack + AX_graphxml_edge_source)
 short int graphxml_edge_source_isset;
-AT_graphxml_node_position_y AX_graphxml_node_position_y;
-#define A_graphxml_node_position_y (graphxml_bufferstack + AX_graphxml_node_position_y)
-short int graphxml_node_position_y_isset;
-AT_graphxml_node_position_x AX_graphxml_node_position_x;
-#define A_graphxml_node_position_x (graphxml_bufferstack + AX_graphxml_node_position_x)
-short int graphxml_node_position_x_isset;
+AT_graphxml_node_position___y AX_graphxml_node_position___y;
+#define A_graphxml_node_position___y (graphxml_bufferstack + AX_graphxml_node_position___y)
+short int graphxml_node_position___y_isset;
+AT_graphxml_node_position___x AX_graphxml_node_position___x;
+#define A_graphxml_node_position___x (graphxml_bufferstack + AX_graphxml_node_position___x)
+short int graphxml_node_position___x_isset;
 AT_graphxml_edge_data AX_graphxml_edge_data;
 #define A_graphxml_edge_data (graphxml_bufferstack + AX_graphxml_edge_data)
 short int graphxml_edge_data_isset;
@@ -1248,13 +1257,24 @@ static int ck_ilimit()
 #ifdef FLEXML_NEED_BUFFERLIT
 static void graphxml_bufferliteral(char c, int* pp, const char* text)
 {
-  const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c);
-  assert(s <= e); BUFFERSET(*pp);
-  while (++s<e) {
-    if (isspace(*s) && c) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
-    else BUFFERPUTC(*s);
-  }
-  BUFFERDONE;
+   BUFFERSET(*pp);
+   if (c) {
+      const char *s = strchr(text, c), *e = strrchr(text, c);
+      assert(s && e && s <= e);
+      ++s;
+      while (s < e) {
+        if (isspace(*s)) {
+           BUFFERPUTC(' ');
+           do ++s; while (s < e && isspace(*s));
+        } else
+          BUFFERPUTC(*s++);
+      }
+   } else {
+      const char *s = text;
+      while (*s)
+       BUFFERPUTC(*s++);
+   }
+   BUFFERDONE;
 }
 #endif
 
@@ -1419,7 +1439,12 @@ static int input (void );
     
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
 #define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
@@ -1438,7 +1463,7 @@ static int input (void );
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                int c = '*'; \
-               unsigned n; \
+               size_t n; \
                for ( n = 0; n < max_size && \
                             (c = getc( xbt_graph_parse_in )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
@@ -1858,10 +1883,10 @@ YY_RULE_SETUP
   graphxml_node_name_isset = 0;
   AX_graphxml_node_data = 0;
   graphxml_node_data_isset = 0;
-  AX_graphxml_node_position_x = 1;
-  graphxml_node_position_x_isset = 0;
-  AX_graphxml_node_position_y = 6;
-  graphxml_node_position_y_isset = 0;
+  AX_graphxml_node_position___x = 1;
+  graphxml_node_position___x_isset = 0;
+  AX_graphxml_node_position___y = 6;
+  graphxml_node_position___y_isset = 0;
   ENTER(AL_graphxml_node); pushbuffer(0);
   }
        YY_BREAK
@@ -1899,22 +1924,22 @@ if (graphxml_node_data_isset != 0) {FAIL("Multiple definition of attribute data
 case 39:
 /* rule 39 can match eol */
 YY_RULE_SETUP
-if (graphxml_node_position_x_isset != 0) {FAIL("Multiple definition of attribute position_x in <graphxml_node>");} graphxml_node_position_x_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_x);
+if (graphxml_node_position___x_isset != 0) {FAIL("Multiple definition of attribute position_x in <graphxml_node>");} graphxml_node_position___x_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position___x);
        YY_BREAK
 case 40:
 /* rule 40 can match eol */
 YY_RULE_SETUP
-if (graphxml_node_position_x_isset != 0) {FAIL("Multiple definition of attribute position_x in <graphxml_node>");}  graphxml_node_position_x_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_x);
+if (graphxml_node_position___x_isset != 0) {FAIL("Multiple definition of attribute position_x in <graphxml_node>");}  graphxml_node_position___x_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position___x);
        YY_BREAK
 case 41:
 /* rule 41 can match eol */
 YY_RULE_SETUP
-if (graphxml_node_position_y_isset != 0) {FAIL("Multiple definition of attribute position_y in <graphxml_node>");} graphxml_node_position_y_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_y);
+if (graphxml_node_position___y_isset != 0) {FAIL("Multiple definition of attribute position_y in <graphxml_node>");} graphxml_node_position___y_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position___y);
        YY_BREAK
 case 42:
 /* rule 42 can match eol */
 YY_RULE_SETUP
-if (graphxml_node_position_y_isset != 0) {FAIL("Multiple definition of attribute position_y in <graphxml_node>");}  graphxml_node_position_y_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_y);
+if (graphxml_node_position___y_isset != 0) {FAIL("Multiple definition of attribute position_y in <graphxml_node>");}  graphxml_node_position___y_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position___y);
        YY_BREAK
 case 43:
 YY_RULE_SETUP
@@ -2970,8 +2995,8 @@ YY_BUFFER_STATE xbt_graph_parse__scan_string (yyconst char * yystr )
 
 /** Setup the input buffer state to scan the given bytes. The next call to xbt_graph_parse_lex() will
  * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  * 
  * @return the newly allocated buffer state object.
  */