X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/166366b28f579dfb991f8f6fca323847bcc1eb65..5422d56a718805a2470558808355e04182a12d65:/src/ielr.c?ds=sidebyside diff --git a/src/ielr.c b/src/ielr.c index 2c89a5b1..2bf9412b 100644 --- a/src/ielr.c +++ b/src/ielr.c @@ -1,6 +1,6 @@ /* IELR main implementation. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2011 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -29,13 +29,13 @@ #include "derives.h" #include "getargs.h" #include "lalr.h" -#include "muscle_tab.h" +#include "muscle-tab.h" #include "nullable.h" #include "relation.h" #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) { @@ -1095,11 +1095,11 @@ ielr (void) /* Examine user options. */ { char *type = muscle_percent_define_get ("lr.type"); - if (0 == strcmp (type, "LALR")) + if (0 == strcmp (type, "lalr")) lr_type = LR_TYPE__LALR; - else if (0 == strcmp (type, "IELR")) + else if (0 == strcmp (type, "ielr")) lr_type = LR_TYPE__IELR; - else if (0 == strcmp (type, "canonical LR")) + else if (0 == strcmp (type, "canonical-lr")) lr_type = LR_TYPE__CANONICAL_LR; else aver (false);