mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 01:33:03 +00:00
style: factor common bits about string scanning
* src/scan-gram.l: here.
This commit is contained in:
@@ -566,8 +566,6 @@ eqopt ({sp}=)?
|
|||||||
_("POSIX Yacc does not support string literals"));
|
_("POSIX Yacc does not support string literals"));
|
||||||
RETURN_VALUE (STRING, last_string);
|
RETURN_VALUE (STRING, last_string);
|
||||||
}
|
}
|
||||||
<<EOF>> unexpected_eof (token_start, "\"");
|
|
||||||
{eol} unexpected_newline (token_start, "\"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<SC_ESCAPED_TSTRING>
|
<SC_ESCAPED_TSTRING>
|
||||||
@@ -580,10 +578,15 @@ eqopt ({sp}=)?
|
|||||||
_("POSIX Yacc does not support string literals"));
|
_("POSIX Yacc does not support string literals"));
|
||||||
RETURN_VALUE (TSTRING, last_string);
|
RETURN_VALUE (TSTRING, last_string);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<SC_ESCAPED_STRING,SC_ESCAPED_TSTRING>
|
||||||
|
{
|
||||||
<<EOF>> unexpected_eof (token_start, "\"");
|
<<EOF>> unexpected_eof (token_start, "\"");
|
||||||
"\n" unexpected_newline (token_start, "\"");
|
"\n" unexpected_newline (token_start, "\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------.
|
/*----------------------------------------------------------.
|
||||||
| Scanning a Bison character literal, decoding its escapes. |
|
| Scanning a Bison character literal, decoding its escapes. |
|
||||||
| The initial quote is already eaten. |
|
| The initial quote is already eaten. |
|
||||||
|
|||||||
Reference in New Issue
Block a user