X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/345532d70bdcd1e4cb4939fea038674d34fbc064..ccdb39e0a6f95cb4a3f19c08885a7c421cdebedb:/src/scan-gram.l?ds=sidebyside diff --git a/src/scan-gram.l b/src/scan-gram.l index b9442358..8f18c355 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -469,10 +469,9 @@ splice (\\[ \f\t\v]*\n)* { - "'" YY_OBS_GROW; BEGIN c_context; - \\{splice}[^\[\]] YY_OBS_GROW; - {splice} YY_OBS_GROW; - <> unexpected_end_of_file (yylloc, "'"); + "'" YY_OBS_GROW; BEGIN c_context; + \\{splice}[\'\\] YY_OBS_GROW; + <> unexpected_end_of_file (yylloc, "'"); } @@ -483,10 +482,9 @@ splice (\\[ \f\t\v]*\n)* { - "\"" YY_OBS_GROW; BEGIN c_context; - \\{splice}[^\[\]] YY_OBS_GROW; - {splice} YY_OBS_GROW; - <> unexpected_end_of_file (yylloc, "\""); + "\"" YY_OBS_GROW; BEGIN c_context; + \\{splice}[\"\\] YY_OBS_GROW; + <> unexpected_end_of_file (yylloc, "\""); } @@ -578,8 +576,10 @@ splice (\\[ \f\t\v]*\n)* { - \[ obstack_sgrow (&string_obstack, "@<:@"); - \] obstack_sgrow (&string_obstack, "@:>@"); + \$ obstack_sgrow (&string_obstack, "$]["); + \@ obstack_sgrow (&string_obstack, "@@"); + \[ obstack_sgrow (&string_obstack, "@{"); + \] obstack_sgrow (&string_obstack, "@}"); .|\n YY_OBS_GROW; }