summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l8
1 files changed, 5 insertions, 3 deletions
diff --git a/parser.l b/parser.l
index 0370bd2d..7c5a4d84 100644
--- a/parser.l
+++ b/parser.l
@@ -778,9 +778,11 @@ void end_of_regex(void)
internal_error("end_of_regex called in wrong scanner state");
yy_pop_state();
- if (yy_top_state() == INITIAL
- || yy_top_state() == QSILIT)
- yy_pop_state();
+
+ if (YYSTATE != INITIAL) {
+ if (yy_top_state() == INITIAL || yy_top_state() == QSILIT)
+ yy_pop_state();
+ }
}
void end_of_char(void)