From a8b0f01a492fcd046196fec0ac3e9b5b50d1de4b Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 5 Mar 2021 21:26:55 +1100 Subject: [PATCH] parsergen: remove special case of newline conflicts newlines are no longer interesting in avoiding conflicts, so remove the special case handling. Signed-off-by: NeilBrown --- csrc/parsergen.mdc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/csrc/parsergen.mdc b/csrc/parsergen.mdc index 0f4bf1f..c80bc9d 100644 --- a/csrc/parsergen.mdc +++ b/csrc/parsergen.mdc @@ -1775,11 +1775,6 @@ terminals to items where that terminal could be shifted and another which maps terminals to items that could be reduced when the terminal is in look-ahead. We report when we get conflicts between the two. -As a special case, if we find a SHIFT/REDUCE conflict, on the NEWLINE -terminal, we ignore it. NEWLINES are handled specially with its own -rules for when to shift and when to reduce. Conflicts are expected, -but handled internally. - static int conflicts_slr(struct grammar *g, enum grammar_type type) { int i; @@ -1831,7 +1826,7 @@ but handled internally. int k; for (k = 0; k < la.cnt; k++) { int pos = symset_find(&shifts, la.syms[k]); - if (pos >= 0 && la.syms[k] != TK_newline) { + if (pos >= 0) { printf(" State %d has SHIFT/REDUCE conflict on ", i); cnt++; prtxt(g->symtab[la.syms[k]]->name); -- 2.43.0