summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2015-01-12 11:34:42 +0100
committerAkim Demaille <akim@lrde.epita.fr>2015-01-12 11:37:24 +0100
commit9a91e7f24626da71bb4b5f0bd76159f34ba2b6f6 (patch)
treec7d494dcebcedf20b3557806322d5e612756fab7
parent671850a1c3e1aaac93a89fabc6d810be6a4a77fe (diff)
downloadbison-9a91e7f24626da71bb4b5f0bd76159f34ba2b6f6.tar.gz
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.
-rw-r--r--THANKS1
-rw-r--r--doc/bison.texi20
2 files changed, 18 insertions, 3 deletions
diff --git a/THANKS b/THANKS
index 4fc99849..b9849103 100644
--- a/THANKS
+++ b/THANKS
@@ -95,6 +95,7 @@ Mike Sullivan Mike.sullivan@Oracle.COM
Neil Booth NeilB@earthling.net
Nelson H. F. Beebe beebe@math.utah.edu
Nick Bowler nbowler@elliptictech.com
+Nicolas Bedon nicolas.bedon@univ-rouen.fr
Nicolas Burrus nicolas.burrus@epita.fr
Nicolas Tisserand nicolas.tisserand@epita.fr
Noah Friedman friedman@gnu.org
diff --git a/doc/bison.texi b/doc/bison.texi
index d4022159..1a2b169b 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -10382,9 +10382,23 @@ declare @code{yyerror} as follows:
int yyerror (char const *);
@end example
-Bison ignores the @code{int} value returned by this @code{yyerror}.
-If you use the Yacc library's @code{main} function, your
-@code{yyparse} function should have the following type signature:
+@noindent
+The @code{int} value returned by this @code{yyerror} is ignored.
+
+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
int yyparse (void);