bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/4] style: use clearer types


From: Akim Demaille
Subject: [PATCH 2/4] style: use clearer types
Date: Thu, 13 Jun 2019 07:06:08 +0200

* src/conflicts.c (conflicts): Array of Booleans.
---
 src/conflicts.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/conflicts.c b/src/conflicts.c
index 734b8c15..fd7431e2 100644
--- a/src/conflicts.c
+++ b/src/conflicts.c
@@ -38,7 +38,10 @@
 /* -1 stands for not specified. */
 int expected_sr_conflicts = -1;
 int expected_rr_conflicts = -1;
-static char *conflicts;
+
+/* CONFLICTS[STATE-NUM] -- Whether that state has unresolved conflicts.  */
+static bool *conflicts;
+
 static struct obstack solved_conflicts_obstack;
 static struct obstack solved_conflicts_xml_obstack;
 
@@ -376,7 +379,7 @@ set_conflicts (state *s, symbol **errors)
     for (int i = 0; i < reds->num; ++i)
       {
         if (!bitset_disjoint_p (reds->lookahead_tokens[i], lookahead_set))
-          conflicts[s->number] = 1;
+          conflicts[s->number] = true;
         bitset_or (lookahead_set, lookahead_set, reds->lookahead_tokens[i]);
       }
 }
-- 
2.21.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]