]> granicus.if.org Git - flex/commitdiff
improve rule handling at EOF
authorWill Estes <wlestes@users.sourceforge.net>
Fri, 3 Feb 2012 21:38:34 +0000 (21:38 +0000)
committerWill Estes <wlestes@users.sourceforge.net>
Fri, 3 Feb 2012 21:38:34 +0000 (21:38 +0000)
parse.y

diff --git a/parse.y b/parse.y
index 871ff7e6b6dbf3fe3a9f627b6c4a66fbef3fc21e..04e84d99fe902425fa51ed280e771e21659d603e 100644 (file)
--- 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 );