]> 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 00:43:40 +0000 (20:43 -0400)
commitc2724603c9d87e816dbdf1a9bfd7d70ffc1bd137
tree72c3af97bfa7325b52f8da3b786289dadd430888
parent17aed602c6780058fe591e871c97f19d6a14d57a
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".
Consistently prefer "empty character literal" over "extra
characters in character literal" warning for invalid escape
sequences; that is, consistently discard those sequences.
* tests/input.at (Bad escapes in literals): New.
ChangeLog
src/scan-gram.l
tests/input.at