]> git.saurik.com Git - bison.git/commit
Fix complaints about escape sequences.
authorJoel E. Denny <jdenny@clemson.edu>
Thu, 20 Aug 2009 00:37:28 +0000 (20:37 -0400)
committerJoel E. Denny <jdenny@clemson.edu>
Thu, 20 Aug 2009 01:11:35 +0000 (21:11 -0400)
commitb1a4261e6d2c8b5eecf2f7be8c920f0a83feee42
tree7f630b517a97c155ac733bc680b7b5c35038a092
parenta022ff418685a490925aed4adf19ebf8ed31239d
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 c2724603c9d87e816dbdf1a9bfd7d70ffc1bd137)

Conflicts:

tests/input.at
ChangeLog
src/scan-gram.l
tests/input.at