From 69fba46514e7bdf5182a8cf3a68d5a0e4397f75d Mon Sep 17 00:00:00 2001 From: wlestes Date: Fri, 3 Feb 2012 21:38:34 +0000 Subject: improve rule handling at EOF --- parse.y | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parse.y b/parse.y index 871ff7e..04e84d9 100644 --- a/parse.y +++ b/parse.y @@ -968,6 +968,10 @@ void build_eof_action() else { sceof[scon_stk[i]] = true; + + if (previous_continued_action /* && previous action was regular */) + add_action("YY_RULE_SETUP\n"); + snprintf( action_text, sizeof(action_text), "case YY_STATE_EOF(%s):\n", scname[scon_stk[i]] ); add_action( action_text ); -- cgit v1.2.1