diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | parser.l | 8 |
2 files changed, 10 insertions, 3 deletions
@@ -1,5 +1,10 @@ 2013-12-06 Kaz Kylheku <kaz@kylheku.com> + * parser.l (end_of_regex): Fix start condition stack underflow + during regex_parse. + +2013-12-06 Kaz Kylheku <kaz@kylheku.com> + * parser.l (regex_parse): Match the simplified grammar now expected in the parser, with no slashes around the regex. Change prefix for diagnostic message. @@ -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) |