replacing...
(xml_escape_n): ... the static local variable buf here.
(print_xml): Free memory for escape_bufs.
* src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
+2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * src/print-xml.c (escape_bufs): New static global variable
+ replacing...
+ (xml_escape_n): ... the static local variable buf here.
+ (print_xml): Free memory for escape_bufs.
+ * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
+
2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
Replace `%push-parser' and `%push-pull-parser' with
2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
Replace `%push-parser' and `%push-pull-parser' with
#include "tables.h"
static bitset no_reduce_set;
#include "tables.h"
static bitset no_reduce_set;
+struct escape_buf
+{
+ char *ptr;
+ size_t size;
+};
+static struct escape_buf escape_bufs[2];
/*----------------------------.
/*----------------------------.
-struct escape_buf
-{
- char *ptr;
- size_t size;
-};
-
static char const *
xml_escape_string (struct escape_buf *buf, char const *str)
{
static char const *
xml_escape_string (struct escape_buf *buf, char const *str)
{
char const *
xml_escape_n (int n, char const *str)
{
char const *
xml_escape_n (int n, char const *str)
{
- static struct escape_buf buf[2];
- return xml_escape_string (buf + n, str);
+ return xml_escape_string (escape_bufs + n, str);
xml_puts (out, 0, "</bison-xml-report>");
xml_puts (out, 0, "</bison-xml-report>");
+ free (escape_bufs[0].ptr);
+ free (escape_bufs[1].ptr);
+
b = true;
xml_printf (out, level + 3,
"<terminal>%s</terminal>",
b = true;
xml_printf (out, level + 3,
"<terminal>%s</terminal>",
+ xml_escape (symbols[i]->tag));
}
if (b)
xml_puts (out, level + 2, "</terminals>");
}
if (b)
xml_puts (out, level + 2, "</terminals>");