summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y7
1 files changed, 7 insertions, 0 deletions
diff --git a/parser.y b/parser.y
index 343981f0..01e7295e 100644
--- a/parser.y
+++ b/parser.y
@@ -137,6 +137,13 @@ spec : clauses { parser->syntax_tree = $1; }
| /* empty */ { parser->syntax_tree = nil; }
| SECRET_ESCAPE_R regexpr { parser->syntax_tree = $2; end_of_regex(scnr); }
| SECRET_ESCAPE_E n_expr { parser->syntax_tree = $2; YYACCEPT; }
+ | SECRET_ESCAPE_E { if (yychar == YYEOF) {
+ parser->syntax_tree = nao;
+ YYACCEPT;
+ } else {
+ yybadtok(yychar, nil);
+ parser->syntax_tree = nil;
+ } }
| error '\n' { parser->syntax_tree = nil;
if (parser->errors >= 8)
YYABORT;