]> git.saurik.com Git - bison.git/blobdiff - src/ielr.c
doc: fix environment issues.
[bison.git] / src / ielr.c
index dfe981a53c31e6ebacd94c1bec9dd71f3ab30c87..cde2baaf292813ed82c5fc6b7a310666ddfcb423 100644 (file)
@@ -1,6 +1,6 @@
 /* IELR main implementation.
 
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -35,7 +35,7 @@
 #include "state.h"
 #include "symtab.h"
 
-/** Records the value of the \%define variable "lr.type".  */
+/** Records the value of the \%define variable lr.type.  */
 typedef enum { LR_TYPE__LALR, LR_TYPE__IELR, LR_TYPE__CANONICAL_LR } LrType;
 
 /**
@@ -504,15 +504,15 @@ ielr_compute_annotation_lists (bitsetv follow_kernel_items,
       (*annotation_listsp)[i] = NULL;
       annotation_counts[i] = 0;
     }
-  for (i = 0; i < nstates; ++i)
-    AnnotationList__compute_from_inadequacies (states[i], follow_kernel_items,
-                                               always_follows, predecessors,
-                                               item_lookahead_sets,
-                                               *inadequacy_listsp,
-                                               *annotation_listsp,
-                                               annotation_counts,
-                                               &max_contributions,
-                                               annotations_obstackp);
+  {
+    InadequacyListNodeCount inadequacy_list_node_count = 0;
+    for (i = 0; i < nstates; ++i)
+      AnnotationList__compute_from_inadequacies (
+        states[i], follow_kernel_items, always_follows, predecessors,
+        item_lookahead_sets, *inadequacy_listsp, *annotation_listsp,
+        annotation_counts, &max_contributions, annotations_obstackp,
+        &inadequacy_list_node_count);
+  }
   *max_annotationsp = 0;
   for (i = 0; i < nstates; ++i)
     {