summaryrefslogtreecommitdiff
path: root/src/gen.c
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2017-01-22 18:28:08 +0100
committerWill Estes <westes575@gmail.com>2017-01-23 12:06:53 -0500
commitfb175a49c3419885d0d0343209486324d629501a (patch)
tree866748b641a61dfa45a5aff22d500f5b9f5138e8 /src/gen.c
parentf01ab4fe024f3b5fc8921f72d23488cff44764d4 (diff)
scanner: Avoid creating unused label
Diffstat (limited to 'src/gen.c')
-rw-r--r--src/gen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gen.c b/src/gen.c
index e0dc776..590e5d8 100644
--- a/src/gen.c
+++ b/src/gen.c
@@ -509,8 +509,12 @@ void gen_find_action (void)
indent_puts ("yy_current_state = *--YY_G(yy_state_ptr);");
indent_puts ("YY_G(yy_lp) = yy_accept[yy_current_state];");
+ if (!variable_trailing_context_rules)
+ outn ("m4_ifdef( [[M4_YY_USES_REJECT]],\n[[");
if(reject_really_used)
outn ("find_rule: /* we branch to this label when backing up */");
+ if (!variable_trailing_context_rules)
+ outn ("]])\n");
indent_puts
("for ( ; ; ) /* until we find what rule we matched */");