From 040e28f9e6e085a279388c69f4239d1b87515fe7 Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" <pesco@khjk.org> Date: Thu, 20 Feb 2020 13:31:17 +0100 Subject: [PATCH] reinstate the empty followset assert (for now) without it, our test for issue 92 is no good (will always pass). we could probably officially put it back if we simplify "dead" symbols (that have no productions) out of the grammar beforehand. --- src/backends/lalr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backends/lalr.c b/src/backends/lalr.c index 86e358b..79a2eca 100644 --- a/src/backends/lalr.c +++ b/src/backends/lalr.c @@ -342,6 +342,7 @@ int h_lalr_compile(HAllocator* mm__, HParser* parser, const void* params) // would lead to certain parse failure, by means of h_nothing_p() // for instance. in that case, the below code correctly adds no // reduce action. + assert(!h_stringmap_empty(fs)); // XXX // for each lookahead symbol, put action into table cell if(terminals_put(table->tmap[state], fs, action) < 0) -- GitLab