* 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.
@node Memory Exhausted
@section Memory Exhausted
@node Memory Exhausted
@section Memory Exhausted
My parser returns with error with a @samp{memory exhausted}
message. What can I do?
My parser returns with error with a @samp{memory exhausted}
message. What can I do?
This question is already addressed elsewhere, @xref{Recursion,
,Recursive Rules}.
This question is already addressed elsewhere, @xref{Recursion,
,Recursive Rules}.
The following phenomenon has several symptoms, resulting in the
following typical questions:
The following phenomenon has several symptoms, resulting in the
following typical questions:
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}?
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}?
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 @samp{%define api.pure}.
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 @samp{%define api.pure}.
These problems typically come not from Bison itself, but from
Lex-generated scanners. Because these scanners use large buffers for
These problems typically come not from Bison itself, but from
Lex-generated scanners. Because these scanners use large buffers for
@noindent
If the file @file{input} contains
@noindent
If the file @file{input} contains
input:1: Hello,
input:2: World!
input:1: Hello,
input:2: World!
@noindent
then instead of getting the first line twice, you get:
@noindent
then instead of getting the first line twice, you get:
@node Strings are Destroyed
@section Strings are Destroyed
@node Strings are Destroyed
@section Strings are Destroyed
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"}.
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"}.
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:
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:
#include <stdio.h>
char *yylval = NULL;
#include <stdio.h>
char *yylval = NULL;
/* 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;
/* 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;
If you compile and run this code, you get:
If you compile and run this code, you get:
@node Implementing Gotos/Loops
@section Implementing Gotos/Loops
@node Implementing Gotos/Loops
@section Implementing Gotos/Loops
My simple calculator supports variables, assignments, and functions,
but how can I implement gotos, or loops?
My simple calculator supports variables, assignments, and functions,
but how can I implement gotos, or loops?
Although very pedagogical, the examples included in the document blur
the distinction to make between the parser---whose job is to recover
Although very pedagogical, the examples included in the document blur
the distinction to make between the parser---whose job is to recover
@node Multiple start-symbols
@section Multiple start-symbols
@node Multiple start-symbols
@section Multiple start-symbols
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.
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.
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
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
@node Secure? Conform?
@section Secure? Conform?
@node Secure? Conform?
@section Secure? Conform?
Is Bison secure? Does it conform to POSIX?
Is Bison secure? Does it conform to POSIX?
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
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
@node I can't build Bison
@section I can't build Bison
@node I can't build Bison
@section I can't build Bison
I can't build Bison because @command{make} complains that
@code{msgfmt} is not found.
What should I do?
I can't build Bison because @command{make} complains that
@code{msgfmt} is not found.
What should I do?
Like most GNU packages with internationalization support, that feature
is turned on by default. If you have problems building in the @file{po}
Like most GNU packages with internationalization support, that feature
is turned on by default. If you have problems building in the @file{po}
@node Where can I find help?
@section Where can I find help?
@node Where can I find help?
@section Where can I find help?
I'm having trouble using Bison. Where can I find help?
I'm having trouble using Bison. Where can I find help?
First, read this fine manual. Beyond that, you can send mail to
@email{help-bison@@gnu.org}. This mailing list is intended to be
First, read this fine manual. Beyond that, you can send mail to
@email{help-bison@@gnu.org}. This mailing list is intended to be
@node Bug Reports
@section Bug Reports
@node Bug Reports
@section Bug Reports
I found a bug. What should I include in the bug report?
I found a bug. What should I include in the bug report?
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
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
@node More Languages
@section More Languages
@node More Languages
@section More Languages
Will Bison ever have C++ and Java support? How about @var{insert your
favorite language here}?
Will Bison ever have C++ and Java support? How about @var{insert your
favorite language here}?
C++ and Java support is there now, and is documented. We'd love to add other
languages; contributions are welcome.
C++ and Java support is there now, and is documented. We'd love to add other
languages; contributions are welcome.
@node Beta Testing
@section Beta Testing
@node Beta Testing
@section Beta Testing
What is involved in being a beta tester?
What is involved in being a beta tester?
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
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
@node Mailing Lists
@section Mailing Lists
@node Mailing Lists
@section Mailing Lists
How do I join the help-bison and bug-bison mailing lists?
How do I join the help-bison and bug-bison mailing lists?
See @url{http://lists.gnu.org/}.
See @url{http://lists.gnu.org/}.