mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +00:00
doc: liby's main arms the internationalization
Reported by Nicolas Bedon. <https://lists.gnu.org/archive/html/bug-bison/2014-11/msg00005.html> * doc/bison.texi (Yacc Library): Document the call the setlocale.
This commit is contained in:
1
THANKS
1
THANKS
@@ -95,6 +95,7 @@ Mike Sullivan Mike.sullivan@Oracle.COM
|
|||||||
Neil Booth NeilB@earthling.net
|
Neil Booth NeilB@earthling.net
|
||||||
Nelson H. F. Beebe beebe@math.utah.edu
|
Nelson H. F. Beebe beebe@math.utah.edu
|
||||||
Nick Bowler nbowler@elliptictech.com
|
Nick Bowler nbowler@elliptictech.com
|
||||||
|
Nicolas Bedon nicolas.bedon@univ-rouen.fr
|
||||||
Nicolas Burrus nicolas.burrus@epita.fr
|
Nicolas Burrus nicolas.burrus@epita.fr
|
||||||
Nicolas Tisserand nicolas.tisserand@epita.fr
|
Nicolas Tisserand nicolas.tisserand@epita.fr
|
||||||
Noah Friedman friedman@gnu.org
|
Noah Friedman friedman@gnu.org
|
||||||
|
|||||||
@@ -10382,9 +10382,23 @@ declare @code{yyerror} as follows:
|
|||||||
int yyerror (char const *);
|
int yyerror (char const *);
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Bison ignores the @code{int} value returned by this @code{yyerror}.
|
@noindent
|
||||||
If you use the Yacc library's @code{main} function, your
|
The @code{int} value returned by this @code{yyerror} is ignored.
|
||||||
@code{yyparse} function should have the following type signature:
|
|
||||||
|
The implementation of Yacc library's @code{main} function is:
|
||||||
|
|
||||||
|
@example
|
||||||
|
int main (void)
|
||||||
|
@{
|
||||||
|
setlocale (LC_ALL, "");
|
||||||
|
return yyparse ();
|
||||||
|
@}
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@noindent
|
||||||
|
so if you use it, the internationalization support is enabled (e.g., error
|
||||||
|
messages are translated), and your @code{yyparse} function should have the
|
||||||
|
following type signature:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
int yyparse (void);
|
int yyparse (void);
|
||||||
|
|||||||
Reference in New Issue
Block a user