mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 13:53:03 +00:00
Fix complaints about escape sequences.
Discussed starting at
<http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
For a \0 and similar escape sequences meaning the null
character, report an invalid escape sequence instead of an
invalid null character because the latter does not actually
appear in the user's input.
In all escape sequence complaints, don't escape the initial
backslash, and don't quote when the sequence appears at the end
of the complaint line unless there's whitespace that quotearg
won't escape.
Consistently say "invalid" not "unrecognized".
* tests/input.at (Bad escapes in literals): New.
(cherry picked from commit c2724603c9)
Conflicts:
tests/input.at
This commit is contained in:
17
ChangeLog
17
ChangeLog
@@ -1,3 +1,20 @@
|
||||
2009-08-19 Joel E. Denny <jdenny@clemson.edu>
|
||||
|
||||
Fix complaints about escape sequences.
|
||||
Discussed starting at
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
|
||||
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
|
||||
For a \0 and similar escape sequences meaning the null
|
||||
character, report an invalid escape sequence instead of an
|
||||
invalid null character because the latter does not actually
|
||||
appear in the user's input.
|
||||
In all escape sequence complaints, don't escape the initial
|
||||
backslash, and don't quote when the sequence appears at the end
|
||||
of the complaint line unless there's whitespace that quotearg
|
||||
won't escape.
|
||||
Consistently say "invalid" not "unrecognized".
|
||||
* tests/input.at (Bad escapes in literals): New.
|
||||
|
||||
2009-08-19 Akim Demaille <demaille@gostai.com>
|
||||
|
||||
doc: %initial-action to initialize yylloc.
|
||||
|
||||
Reference in New Issue
Block a user