]> ocean-lang.org Git - ocean/commitdiff
parsergen: initialise parser.next properly.
authorNeilBrown <neilb@suse.de>
Sat, 10 May 2014 23:42:02 +0000 (09:42 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 15 Jun 2014 05:40:03 +0000 (15:40 +1000)
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 <neilb@suse.de>
csrc/parsergen.mdc

index aae8a3fa4bdad73ef7b06613292debd7347f513b..37dcf7eb12a1348e6a07378f2cbf67cf7fa78ffc 100644 (file)
@@ -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)