From: NeilBrown Date: Sat, 22 Jun 2019 22:56:15 +0000 (+1000) Subject: parsergen: don't assume TK_newline in look-ahead for lineline X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=f24b54a97b9955aa5761b22aa64d5418e23e80f2 parsergen: don't assume TK_newline in look-ahead for lineline A linelike production might not have TK_newline in the look-ahead, so don't assume it. If it isn't there, make the look-ahead set empty. Signed-off-by: NeilBrown --- diff --git a/csrc/parsergen.mdc b/csrc/parsergen.mdc index 2546d76..679fab6 100644 --- a/csrc/parsergen.mdc +++ b/csrc/parsergen.mdc @@ -1348,7 +1348,8 @@ into the go to set, so the item is ineffective. } sn = save_set(g, LA); LA = set_find(g, sn); - symset_add(&LAnl, TK_newline, 0); + if (symset_find(&LA, TK_newline)) + symset_add(&LAnl, TK_newline, 0); snnl = save_set(g, LAnl); LAnl = set_find(g, snnl); }