* 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.
This commit is contained in:
Joel E. Denny
2007-09-29 22:36:38 +00:00
parent d782395d52
commit 34cdeddfa5
3 changed files with 19 additions and 9 deletions

View File

@@ -418,7 +418,7 @@ reduce_xml (FILE *out, int level)
b = true;
xml_printf (out, level + 3,
"<terminal>%s</terminal>",
symbols[i]->tag);
xml_escape (symbols[i]->tag));
}
if (b)
xml_puts (out, level + 2, "</terminals>");