]> git.saurik.com Git - bison.git/blobdiff - src/symlist.c
* src/reader.c (grammar_midrule_action): If $$ is set in a
[bison.git] / src / symlist.c
index ed42ce1e7747994b05ed569cf41c5289cff3aba0..a277f36e4437c132718b21690dd244ebc672cc3e 100644 (file)
@@ -56,11 +56,12 @@ symbol_list_new (symbol *sym, location loc)
 `------------------*/
 
 void
-symbol_list_print (symbol_list *l, FILE *f)
+symbol_list_print (const symbol_list *l, FILE *f)
 {
   for (/* Nothing. */; l && l->sym; l = l->next)
     {
       symbol_print (l->sym, f);
+      fprintf (stderr, l->used ? " used" : " unused");
       if (l && l->sym)
        fprintf (f, ", ");
     }
@@ -96,7 +97,7 @@ symbol_list_free (symbol_list *list)
 `--------------------*/
 
 unsigned int
-symbol_list_length (symbol_list *l)
+symbol_list_length (const symbol_list *l)
 {
   int res = 0;
   for (/* Nothing. */; l; l = l->next)