From: NeilBrown Date: Sat, 10 May 2014 23:42:02 +0000 (+1000) Subject: parsergen: initialise parser.next properly. X-Git-Tag: workingparser~46 X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=e6e11e062686a3f8470575d1ee40c57c810c0400 parsergen: initialise parser.next properly. Most fields in the 'next' frame should be initialised to zero, but some need to be properly initialised. Otherwise we might not handle early newlines correctly. Signed-off-by: NeilBrown --- diff --git a/csrc/parsergen.mdc b/csrc/parsergen.mdc index aae8a3f..37dcf7e 100644 --- a/csrc/parsergen.mdc +++ b/csrc/parsergen.mdc @@ -2494,6 +2494,7 @@ at the start of a production. int accepted = 0; void *ret; + p.next.newline_permitted = states[0].starts_line; while (!accepted) { struct token *err_tk; if (!tk)