mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
use a more consistent quoting style.
See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
Use quotearg as often as possible instead of leaving the choice of
the quotes to the translators. Use shorter messages. Factor similar
messages to a single format, to make localization easier.
* src/files.c, src/getargs.c, src/muscle-tab.c, src/reader.c
* src/scan-code.l, src/scan-gram.l, src/symtab.c:
Use quote() or quotearg_colon() on printf arguments instead of
quotes in the format string.
* data/bison.m4: Keep sync with the changes in muscle-tab.c.
* tests/skeletons.at, tests/input.at, tests/regression.at: Adjust
expected messages.
(cherry picked from commit 4a9cd8f24a)
Conflicts:
src/muscle-tab.c
This commit is contained in:
@@ -750,8 +750,8 @@ start: ;
|
||||
|
||||
AT_BISON_CHECK([-o input.c input.y], 1, [],
|
||||
[[input.y:1.10-2.0: missing '"' at end of line
|
||||
input.y:4.10-5.0: missing ''' at end of line
|
||||
input.y:14.11-15.0: missing ''' at end of line
|
||||
input.y:4.10-5.0: missing "'" at end of line
|
||||
input.y:14.11-15.0: missing "'" at end of line
|
||||
input.y:16.11-17.0: missing '"' at end of line
|
||||
input.y:19.13-20.0: missing '}' at end of file
|
||||
input.y:20.1: syntax error, unexpected end of file
|
||||
@@ -1200,9 +1200,9 @@ AT_CHECK([[perl -e "print 'start: \'';" >> empty.y || exit 77]])
|
||||
AT_BISON_CHECK([empty.y], [1], [],
|
||||
[[empty.y:2.8-9: warning: empty character literal
|
||||
empty.y:3.8-4.0: warning: empty character literal
|
||||
empty.y:3.8-4.0: missing ''' at end of line
|
||||
empty.y:3.8-4.0: missing "'" at end of line
|
||||
empty.y:4.8: warning: empty character literal
|
||||
empty.y:4.8: missing ''' at end of file
|
||||
empty.y:4.8: missing "'" at end of file
|
||||
]])
|
||||
|
||||
AT_DATA([two.y],
|
||||
@@ -1215,9 +1215,9 @@ AT_CHECK([[perl -e "print 'start: \'ab';" >> two.y || exit 77]])
|
||||
AT_BISON_CHECK([two.y], [1], [],
|
||||
[[two.y:2.8-11: warning: extra characters in character literal
|
||||
two.y:3.8-4.0: warning: extra characters in character literal
|
||||
two.y:3.8-4.0: missing ''' at end of line
|
||||
two.y:3.8-4.0: missing "'" at end of line
|
||||
two.y:4.8-10: warning: extra characters in character literal
|
||||
two.y:4.8-10: missing ''' at end of file
|
||||
two.y:4.8-10: missing "'" at end of file
|
||||
]])
|
||||
|
||||
AT_DATA([three.y],
|
||||
@@ -1230,9 +1230,9 @@ AT_CHECK([[perl -e "print 'start: \'abc';" >> three.y || exit 77]])
|
||||
AT_BISON_CHECK([three.y], [1], [],
|
||||
[[three.y:2.8-12: warning: extra characters in character literal
|
||||
three.y:3.8-4.0: warning: extra characters in character literal
|
||||
three.y:3.8-4.0: missing ''' at end of line
|
||||
three.y:3.8-4.0: missing "'" at end of line
|
||||
three.y:4.8-11: warning: extra characters in character literal
|
||||
three.y:4.8-11: missing ''' at end of file
|
||||
three.y:4.8-11: missing "'" at end of file
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -197,7 +197,7 @@ exp: '(' exp ')' | NUM ;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-v -o input.c input.y], 0, [],
|
||||
[[input.y:6.8-14: warning: symbol '"<="' used more than once as a literal string
|
||||
[[input.y:6.8-14: warning: symbol "<=" used more than once as a literal string
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
@@ -475,7 +475,7 @@ main (void)
|
||||
# the user specification is eliminated.
|
||||
AT_BISON_CHECK([-o input.c input.y], [[0]], [[]],
|
||||
[[input.y:22.8-14: warning: symbol SPECIAL redeclared
|
||||
input.y:22.8-63: warning: symbol '"\\'?\"\a\b\f\n\r\t\v\001\201\001\201??!"' used more than once as a literal string
|
||||
input.y:22.8-63: warning: symbol "\\'?\"\a\b\f\n\r\t\v\001\201\001\201??!" used more than once as a literal string
|
||||
]])
|
||||
AT_COMPILE([input])
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ start: ;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input3.y]], [[1]], [[]],
|
||||
[[input3.y: fatal error: undefined %define variable 'bogus' passed to b4_percent_define_get_loc
|
||||
[[input3.y: fatal error: b4_percent_define_get_loc: undefined %define variable 'bogus'
|
||||
]])
|
||||
|
||||
AT_DATA([[skel4.c]],
|
||||
@@ -242,7 +242,7 @@ start: ;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input4.y]], [[1]], [[]],
|
||||
[[input4.y: fatal error: undefined %define variable 'bogus' passed to b4_percent_define_get_syncline
|
||||
[[input4.y: fatal error: b4_percent_define_get_syncline: undefined %define variable 'bogus'
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user