From f0665bd4c3455633f6a489f88464132490aacf37 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sun, 15 Jun 2014 18:44:14 +1000 Subject: [PATCH] parsergen: work-around for indent parsing problem. These was a problem with my reasoning about parsing indents. Resolving it properly will take a bit of work, but this little 'fix' handles an easy case for now. Signed-off-by: NeilBrown --- csrc/parsergen.mdc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csrc/parsergen.mdc b/csrc/parsergen.mdc index 47cbfc2..b94bd3b 100644 --- a/csrc/parsergen.mdc +++ b/csrc/parsergen.mdc @@ -2600,7 +2600,7 @@ since the last state which could have been at the start of a line. if (p.next.sym == TK_out) { if (p.stack[p.tos-1].indents > p.stack[p.tos-1].starts_indented || (p.stack[p.tos-1].indents == 1 && - states[p.next.state].reduce_size > 1)) { + states[p.next.state].reduce_size != 1)) { p.stack[p.tos-1].indents -= 1; if (p.stack[p.tos-1].indents == p.stack[p.tos-1].starts_indented) { // no internal indent any more, reassess 'newline_permitted' -- 2.43.0