]> git.saurik.com Git - bison.git/blobdiff - src/symlist.c
In the grammar scanner, STRING_FINISH unclosed constructs and return
[bison.git] / src / symlist.c
index eeb54e5a8617c054c519ab00fb3c081df53eec86..e00814ed398c19d56e04408f6bab7df4da8531fb 100644 (file)
@@ -38,7 +38,9 @@ symbol_list_new (symbol *sym, location loc)
   res->sym = sym;
   res->location = loc;
 
-  res->mid_rule = NULL;
+  res->midrule = NULL;
+  res->midrule_parent_rule = NULL;
+  res->midrule_parent_rhs_index = 0;
 
   res->action = NULL;
   res->used = false;
@@ -98,11 +100,11 @@ symbol_list_free (symbol_list *list)
 | Return its length.  |
 `--------------------*/
 
-unsigned int
-symbol_list_length (const symbol_list *l)
+int
+symbol_list_length (symbol_list const *l)
 {
   int res = 0;
-  for (/* Nothing. */; l; l = l->next)
+  for (/* Nothing. */; l && l->sym; l = l->next)
     ++res;
   return res;
 }