summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <demaille@gostai.com>2012-02-23 17:50:29 +0100
committerAkim Demaille <demaille@gostai.com>2012-02-23 17:57:31 +0100
commitab8932bfd9f66643eef907d8aad70e7af2bf5841 (patch)
treeb72c036f7f8e2786a0412f5b9993ee182d1bbbba
parent6c6f6f4b23940161c0595dc7c6bb2757fac2aaa1 (diff)
downloadbison-branch-2.5.tar.gz
doc: fix environment issues.branch-2.5
* doc/bison.texinfo: Do not use @verbatim, in particular when we use @group inside. Use @quotation instead of @display for frequently asked questions, it looks much nicer. (cherry picked from commit 71b52b1342c65a5497f6b3780481ff2deb932a56) Conflicts: doc/bison.texinfo
-rw-r--r--doc/bison.texinfo70
1 files changed, 35 insertions, 35 deletions
diff --git a/doc/bison.texinfo b/doc/bison.texinfo
index 8d2cbe2f..5d87ff50 100644
--- a/doc/bison.texinfo
+++ b/doc/bison.texinfo
@@ -10067,10 +10067,10 @@ are addressed.
@node Memory Exhausted
@section Memory Exhausted
-@display
+@quotation
My parser returns with error with a @samp{memory exhausted}
message. What can I do?
-@end display
+@end quotation
This question is already addressed elsewhere, @xref{Recursion,
,Recursive Rules}.
@@ -10081,20 +10081,20 @@ This question is already addressed elsewhere, @xref{Recursion,
The following phenomenon has several symptoms, resulting in the
following typical questions:
-@display
+@quotation
I invoke @code{yyparse} several times, and on correct input it works
properly; but when a parse error is found, all the other calls fail
too. How can I reset the error flag of @code{yyparse}?
-@end display
+@end quotation
@noindent
or
-@display
+@quotation
My parser includes support for an @samp{#include}-like feature, in
which case I run @code{yyparse} from @code{yyparse}. This fails
-although I did specify @code{%define api.pure}.
-@end display
+although I did specify @samp{%define api.pure}.
+@end quotation
These problems typically come not from Bison itself, but from
Lex-generated scanners. Because these scanners use large buffers for
@@ -10149,10 +10149,10 @@ main (void)
@noindent
If the file @file{input} contains
-@verbatim
+@example
input:1: Hello,
input:2: World!
-@end verbatim
+@end example
@noindent
then instead of getting the first line twice, you get:
@@ -10183,22 +10183,22 @@ start condition, through a call to @samp{BEGIN (0)}.
@node Strings are Destroyed
@section Strings are Destroyed
-@display
+@quotation
My parser seems to destroy old strings, or maybe it loses track of
them. Instead of reporting @samp{"foo", "bar"}, it reports
@samp{"bar", "bar"}, or even @samp{"foo\nbar", "bar"}.
-@end display
+@end quotation
This error is probably the single most frequent ``bug report'' sent to
Bison lists, but is only concerned with a misunderstanding of the role
of the scanner. Consider the following Lex code:
-@verbatim
+@example
@group
-%{
+%@{
#include <stdio.h>
char *yylval = NULL;
-%}
+%@}
@end group
@group
%%
@@ -10209,15 +10209,15 @@ char *yylval = NULL;
@group
int
main ()
-{
+@{
/* Similar to using $1, $2 in a Bison action. */
char *fst = (yylex (), yylval);
char *snd = (yylex (), yylval);
printf ("\"%s\", \"%s\"\n", fst, snd);
return 0;
-}
+@}
@end group
-@end verbatim
+@end example
If you compile and run this code, you get:
@@ -10248,10 +10248,10 @@ $ @kbd{printf 'one\ntwo\n' | ./split-lines}
@node Implementing Gotos/Loops
@section Implementing Gotos/Loops
-@display
+@quotation
My simple calculator supports variables, assignments, and functions,
but how can I implement gotos, or loops?
-@end display
+@end quotation
Although very pedagogical, the examples included in the document blur
the distinction to make between the parser---whose job is to recover
@@ -10278,11 +10278,11 @@ invited to consult the dedicated literature.
@node Multiple start-symbols
@section Multiple start-symbols
-@display
+@quotation
I have several closely related grammars, and I would like to share their
implementations. In fact, I could use a single grammar but with
multiple entry points.
-@end display
+@end quotation
Bison does not support multiple start-symbols, but there is a very
simple means to simulate them. If @code{foo} and @code{bar} are the two
@@ -10327,9 +10327,9 @@ available in the scanner (e.g., a global variable or using
@node Secure? Conform?
@section Secure? Conform?
-@display
+@quotation
Is Bison secure? Does it conform to POSIX?
-@end display
+@end quotation
If you're looking for a guarantee or certification, we don't provide it.
However, Bison is intended to be a reliable program that conforms to the
@@ -10339,11 +10339,11 @@ please send us a bug report.
@node I can't build Bison
@section I can't build Bison
-@display
+@quotation
I can't build Bison because @command{make} complains that
@code{msgfmt} is not found.
What should I do?
-@end display
+@end quotation
Like most GNU packages with internationalization support, that feature
is turned on by default. If you have problems building in the @file{po}
@@ -10357,9 +10357,9 @@ Bison. See the file @file{ABOUT-NLS} for more information.
@node Where can I find help?
@section Where can I find help?
-@display
+@quotation
I'm having trouble using Bison. Where can I find help?
-@end display
+@end quotation
First, read this fine manual. Beyond that, you can send mail to
@email{help-bison@@gnu.org}. This mailing list is intended to be
@@ -10374,9 +10374,9 @@ hearts.
@node Bug Reports
@section Bug Reports
-@display
+@quotation
I found a bug. What should I include in the bug report?
-@end display
+@end quotation
Before you send a bug report, make sure you are using the latest
version. Check @url{ftp://ftp.gnu.org/pub/gnu/bison/} or one of its
@@ -10405,10 +10405,10 @@ Send bug reports to @email{bug-bison@@gnu.org}.
@node More Languages
@section More Languages
-@display
+@quotation
Will Bison ever have C++ and Java support? How about @var{insert your
favorite language here}?
-@end display
+@end quotation
C++ and Java support is there now, and is documented. We'd love to add other
languages; contributions are welcome.
@@ -10416,9 +10416,9 @@ languages; contributions are welcome.
@node Beta Testing
@section Beta Testing
-@display
+@quotation
What is involved in being a beta tester?
-@end display
+@end quotation
It's not terribly involved. Basically, you would download a test
release, compile it, and use it to build and run a parser or two. After
@@ -10436,9 +10436,9 @@ systems are especially welcome.
@node Mailing Lists
@section Mailing Lists
-@display
+@quotation
How do I join the help-bison and bug-bison mailing lists?
-@end display
+@end quotation
See @url{http://lists.gnu.org/}.