]> git.saurik.com Git - bison.git/blobdiff - src/scan-gram.l
Add src/system.h; this isn't really needed, but it keeps "make update"
[bison.git] / src / scan-gram.l
index b94423580d8f320c8dfd5faa54710b668ab56e8a..8f18c355f40a4301a8958dca5d985a6fbf7215ee 100644 (file)
@@ -469,10 +469,9 @@ splice      (\\[ \f\t\v]*\n)*
 
 <SC_CHARACTER>
 {
 
 <SC_CHARACTER>
 {
-  "'"                 YY_OBS_GROW; BEGIN c_context;
-  \\{splice}[^\[\]]    YY_OBS_GROW;
-  {splice}            YY_OBS_GROW;
-  <<EOF>>             unexpected_end_of_file (yylloc, "'");
+  "'"              YY_OBS_GROW; BEGIN c_context;
+  \\{splice}[\'\\]  YY_OBS_GROW;
+  <<EOF>>          unexpected_end_of_file (yylloc, "'");
 }
 
 
 }
 
 
@@ -483,10 +482,9 @@ splice      (\\[ \f\t\v]*\n)*
 
 <SC_STRING>
 {
 
 <SC_STRING>
 {
-  "\""                YY_OBS_GROW; BEGIN c_context;
-  \\{splice}[^\[\]]    YY_OBS_GROW;
-  {splice}            YY_OBS_GROW;
-  <<EOF>>             unexpected_end_of_file (yylloc, "\"");
+  "\""             YY_OBS_GROW; BEGIN c_context;
+  \\{splice}[\"\\]  YY_OBS_GROW;
+  <<EOF>>          unexpected_end_of_file (yylloc, "\"");
 }
 
 
 }
 
 
@@ -578,8 +576,10 @@ splice      (\\[ \f\t\v]*\n)*
 
 <SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>
 {
 
 <SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>
 {
-  \[   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;
 }
 
   .|\n  YY_OBS_GROW;
 }