summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlestes <wlestes>2012-02-03 21:38:34 +0000
committerwlestes <wlestes>2012-02-03 21:38:34 +0000
commit69fba46514e7bdf5182a8cf3a68d5a0e4397f75d (patch)
tree6f41e6a29b1baf77b83c9fe6bc59199bf2552345
parent569f777c483d23b068dec9b50a88db53fc91cefd (diff)
downloadflex-69fba46514e7bdf5182a8cf3a68d5a0e4397f75d.tar.gz
improve rule handling at EOF
-rw-r--r--parse.y4
1 files changed, 4 insertions, 0 deletions
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 );