From e6e11e062686a3f8470575d1ee40c57c810c0400 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sun, 11 May 2014 09:42:02 +1000 Subject: [PATCH] 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 --- csrc/parsergen.mdc | 1 + 1 file changed, 1 insertion(+) 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) -- 2.43.0