X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/408476bca98e78ea0c398f36ef58f4466edb277a..10bae98af27edbb84a06d82a20a63ad7a0cca688:/src/print-xml.c?ds=inline
diff --git a/src/print-xml.c b/src/print-xml.c
index cb6707da..2a37ebd9 100644
--- a/src/print-xml.c
+++ b/src/print-xml.c
@@ -1,6 +1,6 @@
 /* Print an xml on generated parser, for Bison,
 
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -48,7 +48,7 @@ struct escape_buf
   char *ptr;
   size_t size;
 };
-static struct escape_buf escape_bufs[2];
+static struct escape_buf escape_bufs[3];
 
 
 /*--------------------------------.
@@ -244,17 +244,18 @@ print_reductions (FILE *out, int level, state *s)
 {
   transitions *trans = s->transitions;
   reductions *reds = s->reductions;
-  rule *default_rule = NULL;
+  rule *default_reduction = NULL;
   int report = false;
   int i, j;
 
-  if (reds->num == 0) {
-    xml_puts (out, level, "");
-    return;
-  }
+  if (reds->num == 0)
+    {
+      xml_puts (out, level, "");
+      return;
+    }
 
   if (yydefact[s->number] != 0)
-    default_rule = &rules[yydefact[s->number] - 1];
+    default_reduction = &rules[yydefact[s->number] - 1];
 
   bitset_zero (no_reduce_set);
   FOR_EACH_SHIFT (trans, i)
@@ -263,7 +264,7 @@ print_reductions (FILE *out, int level, state *s)
     if (s->errs->symbols[i])
       bitset_set (no_reduce_set, s->errs->symbols[i]->number);
 
-  if (default_rule)
+  if (default_reduction)
     report = true;
 
   if (reds->lookahead_tokens)
@@ -276,7 +277,7 @@ print_reductions (FILE *out, int level, state *s)
 	    {
 	      if (! count)
 		{
-		  if (reds->rules[j] != default_rule)
+		  if (reds->rules[j] != default_reduction)
 		    report = true;
 		  count = true;
 		}
@@ -307,7 +308,7 @@ print_reductions (FILE *out, int level, state *s)
 	    {
 	      if (! count)
 		{
-		  if (reds->rules[j] != default_rule)
+		  if (reds->rules[j] != default_reduction)
 		    print_reduction (out, level + 1, symbols[i]->tag,
 				     reds->rules[j], true);
 		  else
@@ -318,7 +319,7 @@ print_reductions (FILE *out, int level, state *s)
 		{
 		  if (defaulted)
 		    print_reduction (out, level + 1, symbols[i]->tag,
-				     default_rule, true);
+				     default_reduction, true);
 		  defaulted = false;
 		  print_reduction (out, level + 1, symbols[i]->tag,
 				   reds->rules[j], false);
@@ -326,9 +327,9 @@ print_reductions (FILE *out, int level, state *s)
 	    }
       }
 
-  if (default_rule)
+  if (default_reduction)
     print_reduction (out, level + 1,
-		     "$default", default_rule, true);
+		     "$default", default_reduction, true);
 
   xml_puts (out, level, "");
 }
@@ -504,8 +505,12 @@ print_xml (void)
   FILE *out = xfopen (spec_xml_file, "w");
 
   fputs ("\n\n", out);
-  xml_printf (out, level, "",
-	      xml_escape (VERSION));
+  xml_printf (out, level,
+              "",
+              xml_escape_n (0, VERSION),
+              xml_escape_n (1, PACKAGE_BUGREPORT),
+              xml_escape_n (2, PACKAGE_URL));
 
   fputc ('\n', out);
   xml_printf (out, level + 1, "%s",