diff --git a/src/scan-gram.l b/src/scan-gram.l index 3b03923a..ad254694 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -566,8 +566,6 @@ eqopt ({sp}=)? _("POSIX Yacc does not support string literals")); RETURN_VALUE (STRING, last_string); } - <> unexpected_eof (token_start, "\""); - {eol} unexpected_newline (token_start, "\""); } @@ -580,10 +578,15 @@ eqopt ({sp}=)? _("POSIX Yacc does not support string literals")); RETURN_VALUE (TSTRING, last_string); } +} + + +{ <> unexpected_eof (token_start, "\""); "\n" unexpected_newline (token_start, "\""); } + /*----------------------------------------------------------. | Scanning a Bison character literal, decoding its escapes. | | The initial quote is already eaten. |