]> ocean-lang.org Git - ocean/blobdiff - csrc/parsergen.mdc
parsergen: fix handling of Newline in parse.
[ocean] / csrc / parsergen.mdc
index d6feb8a3d0ac51c7bb0e0713765bd68288f4d55f..f87d83f7acab966c57d2291191482edf7b25a1f5 100644 (file)
@@ -2712,8 +2712,8 @@ since the last state which could have been at the start of a line.
                                        parser_trace_action(trace, "Discard");
                                        continue;
                                }
-                               if (states[tos->state].reduce_size > 0 &&
-                                   states[tos->state].reduce_size < tos->since_newline)
+                               if (states[tos->state].reduce_size >= 0 &&
+                                   states[tos->state].reduce_size <= tos->since_newline)
                                        goto force_reduce;
                        }
                        if (shift(&p, &next, tk, states)) {