Lines Matching full:bison
3 @setfilename bison.info
5 @settitle Bison @value{VERSION}
16 @c This feature is experimental and may change in future Bison versions.
33 This manual is for @acronym{GNU} Bison (version @value{VERSION},
57 * bison: (bison). @acronym{GNU} parser generator (Yacc replacement).
61 @title Bison
63 @subtitle @value{UPDATED}, Bison Version @value{VERSION}
84 @top Bison
92 how you can copy and share Bison
95 * Concepts:: Basic concepts for understanding Bison.
96 * Examples:: Three simple explained examples of using Bison.
99 * Grammar File:: Writing Bison declarations and rules.
101 * Algorithm:: How the Bison parser works at run-time.
104 messy for Bison to handle straightforwardly.
105 * Debugging:: Understanding or debugging Bison parsers.
106 * Invocation:: How to run Bison (to produce the parser source file).
109 * Table of Symbols:: All the keywords of the Bison language are explained.
117 The Concepts of Bison
121 * Grammar in Bison:: How we represent grammars for Bison's sake.
128 * Bison Parser:: What are Bison's input and output,
130 * Stages:: Stages in writing and running Bison grammars.
131 * Grammar Layout:: Overall structure of a Bison grammar file.
159 * Gen: Rpcalc Gen. Running Bison on the grammar file.
170 * Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
176 * Decl: Mfcalc Decl. Bison declarations for multi-function calculator.
180 Bison Grammar Files
188 * Declarations:: All kinds of Bison declarations are described here.
189 * Multiple Parsers:: Putting more than one Bison parser in one program.
191 Outline of a Bison Grammar
194 * Bison Declarations:: Syntax and usage of the Bison declarations section.
214 Bison Declarations
216 * Require Decl:: Requiring a Bison version.
226 * Decl Summary:: Table of all Bison declarations.
249 The Bison Parser Algorithm
264 * Using Precedence:: How to specify precedence in Bison grammars.
280 Invoking Bison
282 * Bison Options:: All the options described in detail,
294 * C++ Bison Interface:: Asking for C++ parser generation
315 * Secure? Conform?:: Is Bison @acronym{POSIX} safe?
316 * I can't build Bison:: Troubleshooting
321 * Mailing Lists:: Meeting other Bison users
334 @dfn{Bison} is a general-purpose parser generator that converts an
337 Bison, you can use it to develop a wide range of language parsers, from those
340 Bison is upward compatible with Yacc: all properly-written Yacc grammars
341 ought to work with Bison with no change. Anyone familiar with Yacc
342 should be able to use Bison with little trouble. You need to be fluent in
343 C or C++ programming in order to use Bison or to understand this manual.
346 Bison and show three explained examples, each building on the last. If you
347 don't know Bison or Yacc, start by reading these chapters. Reference
348 chapters follow which describe specific aspects of Bison in detail.
350 Bison was written primarily by Robert Corbett; Richard Stallman made it
354 This edition corresponds to version @value{VERSION} of Bison.
357 @unnumbered Conditions for Using Bison
359 The distribution terms for Bison-generated parsers permit using the
360 parsers in nonfree programs. Before Bison version 2.2, these extra
361 permissions applied only when Bison was generating @acronym{LALR}(1)
362 parsers in C@. And before Bison version 1.24, Bison-generated
368 software. The reason Bison was different was not due to a special
370 License to all of the Bison source code.
372 The output of the Bison utility---the Bison parser file---contains a
373 verbatim copy of a sizable piece of Bison, which is the code for the
378 the effect was to restrict the use of Bison output to free software.
382 concluded that limiting Bison's use to free software was doing little to
384 practical conditions for using Bison match the practical conditions for
387 This exception applies when Bison is generating code for a parser.
388 You can tell whether the exception applies to a Bison output file by
396 @chapter The Concepts of Bison
399 details of Bison will not make sense. If you do not already know how to
400 use Bison or Yacc, we suggest you start by reading this chapter carefully.
405 * Grammar in BisonBison's sake.
412 * Bison Parser:: What are Bison's input and output,
414 * Stages:: Stages in writing and running Bison grammars.
415 * Grammar Layout:: Overall structure of a Bison grammar file.
423 In order for Bison to parse a language, it must be described by a
438 @acronym{BNF} is a context-free grammar. The input to Bison is
444 can handle almost all context-free grammars, Bison is optimized for what
469 With the proper declarations, Bison is also able to parse these more
471 parsing (for Generalized @acronym{LR}). Bison's @acronym{GLR} parsers
555 The Bison parser reads a sequence of tokens as its input, and groups the
562 @node Grammar in Bison
563 @section From Formal Rules to Bison Input
564 @cindex Bison grammar
565 @cindex grammar, Bison
569 for Bison, you must write a file expressing the grammar in Bison syntax:
570 a @dfn{Bison grammar} file. @xref{Grammar File, ,Bison Grammar Files}.
572 A nonterminal symbol in the formal grammar is represented in Bison input
576 The Bison representation for a terminal symbol is also called a @dfn{token
593 The grammar rules also have an expression in Bison syntax. For example,
594 here is the Bison rule for a C @code{return} statement. The semicolon in
596 the statement; the naked semicolon, and the colon, are Bison punctuation
621 3989 as constants in the program! Therefore, each token in a Bison grammar
656 also produce some output based on the input. In a Bison grammar, a grammar
690 In some grammars, Bison's standard
702 @code{%glr-parser} among the Bison declarations in your file
704 (@acronym{GLR}) parser. These parsers handle Bison grammars that
722 reduction makes two parsers identical, causing them to merge, Bison
724 merge, reverting to the single-parser case, Bison resolves all the
833 and the current Bison parser even takes exponential time and space
842 Here is a Bison grammar corresponding to the example above. It
883 When used as a normal @acronym{LALR}(1) grammar, Bison correctly complains
893 The parser can be turned into a @acronym{GLR} parser, while also telling Bison
895 adding these two declarations to the Bison input file (before the first
912 analyze the conflicts reported by Bison to make sure that @acronym{GLR}
997 Bison detects this as a reduce/reduce conflict between the rules
1012 declarations specify that Bison is to give precedence
1032 However, at the time the Bison parser encounters @code{x}, it does not
1087 Bison requires that all of the
1099 This raises caveats for several Bison features you might use in a semantic
1124 future versions of Bison.
1131 Another Bison feature requiring special consideration is @code{YYERROR}
1180 Bison provides a mechanism for handling these locations.
1200 @node Bison Parser
1201 @section Bison Output: the Parser File
1202 @cindex Bison parser
1203 @cindex Bison utility
1207 When you run Bison, you give it a Bison grammar file as input. The output
1209 This file is called a @dfn{Bison parser}. Keep in mind that the Bison
1210 utility and the Bison parser are two distinct programs: the Bison utility
1211 is a program whose output is the Bison parser that becomes part of your
1214 The job of the Bison
1220 you must supply in some fashion (such as by writing it in C). The Bison
1224 parsing characters of text, but Bison does not depend on this.
1227 The Bison parser file is C code which defines a function named
1237 write, all symbols defined in the Bison parser file itself
1243 or @samp{YY} in the Bison grammar file except for the ones defined in
1248 In some cases the Bison parser file includes system headers, and in
1259 @section Stages in Using Bison
1260 @cindex stages in using Bison
1261 @cindex using Bison
1263 The actual language-design process using Bison, from grammar specification
1268 Formally specify the grammar in a form recognized by Bison
1269 (@pxref{Grammar File, ,Bison Grammar Files}). For each grammatical rule
1281 Write a controlling function that calls the Bison-produced parser.
1292 Run Bison on the grammar to produce the parser.
1295 Compile the code output by Bison, as well as any other source files.
1302 @section The Overall Layout of a Bison Grammar
1306 @cindex layout of Bison grammar
1308 The input file for the Bison utility is a @dfn{Bison grammar file}. The
1309 general form of a Bison grammar file is as follows:
1316 @var{Bison declarations}
1326 in every Bison grammar file to separate the sections.
1335 The Bison declarations declare the names of the terminal and nonterminal
1351 Now we show and explain three sample programs written using Bison: a
1357 These examples are simple, but Bison grammars for real programming
1386 @samp{.y} extension is a convention used for Bison input files.
1394 * Gen: Rpcalc Gen. Running Bison on the grammar file.
1401 Here are the C and Bison declarations for the reverse polish notation
1425 Bison parser will use whatever type @code{YYSTYPE} is defined as; if you
1439 The second section, Bison declarations, provides information to Bison
1440 about the token types (@pxref{Bison Declarations, ,The Bison
1486 You must specify these actions in C, but Bison provides the means for
1594 action, Bison by default copies the value of @code{$1} into @code{$$}.
1597 The formatting shown here is the recommended convention, but Bison does
1624 or sequences of characters into tokens. The Bison parser gets its
1636 represents a token type. The same text used in Bison rules to stand for
1641 token type is an identifier, that identifier is defined by Bison as a C
1646 global variable @code{yylval}, which is where the Bison parser will look
1652 (Bison recognizes any nonpositive value as indicating end-of-input.)
1737 After @code{yyerror} returns, the Bison parser may recover from the error
1745 @subsection Running Bison to Make the Parser
1746 @cindex running Bison (introduction)
1748 Before running Bison to produce a parser, we need to decide how to
1753 (@pxref{Grammar Layout, ,The Overall Layout of a Bison Grammar}).
1762 bison @var{file}.y
1767 @sc{calc}ulator''). Bison produces a file named @file{@var{file}.tab.c},
1769 Bison contains the source code for @code{yyparse}. The additional
1787 # @r{Compile the Bison parser.}
1826 parentheses nested to arbitrary depth. Here is the Bison code for
1840 /* Bison declarations. */
1874 In the second section (Bison declarations), @code{%left} declares token
1891 Bison that the rule @samp{| '-' exp} has the same precedence as
1919 The Bison language itself includes the reserved word @code{error}, which
1937 @code{yyerrok}, a macro defined automatically by Bison; its meaning is
1948 Bison programs.
1963 * Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
1971 The C and Bison declarations for the location tracking calculator are
1984 /* Bison declarations. */
2069 Until now, we relied on Bison's defaults to enable location
2161 Now that the basics of Bison have been discussed, it is time to move on to
2202 * Decl: Mfcalc Decl. Bison declarations for multi-function calculator.
2210 Here are the C and Bison declarations for the multi-function calculator.
2241 The above grammar introduces only two new features of the Bison language.
2256 The Bison construct @code{%type} is used for declaring nonterminal
2309 grammar rules (except for the actions) or the Bison declarations, but it
2572 @chapter Bison Grammar Files
2574 Bison takes as input a context-free grammar specification and produces a
2577 The Bison grammar input file conventionally has a name ending in @samp{.y}.
2578 @xref{Invocation, ,Invoking Bison}.
2587 * Declarations:: All kinds of Bison declarations are described here.
2588 * Multiple Parsers:: Putting more than one Bison parser in one program.
2592 @section Outline of a Bison Grammar
2594 A Bison grammar file has four main sections, shown here with the
2602 @var{Bison declarations}
2617 * Bison Declarations:: Syntax and usage of the Bison declarations section.
2641 @var{Bison declarations}. This allows you to have C and Bison
2667 @node Bison Declarations
2668 @subsection The Bison Declarations Section
2669 @cindex Bison declarations (introduction)
2670 @cindex declarations, Bison (introduction)
2672 The @var{Bison declarations} section contains declarations that define
2675 @xref{Declarations, ,Bison Declarations}.
2682 The @dfn{grammar rules} section contains one or more Bison grammar
2708 The Bison parser itself contains many macros and identifiers whose names
2720 @dfn{Symbols} in Bison grammars represent the grammatical classifications
2726 represented in the Bison parser by a numeric code, and the @code{yylex}
2744 such name must be defined with a Bison declaration such as
2766 used in Bison as well, but you must not use the null character as a
2770 special meaning in Bison character literals, nor is backslash-newline
2793 type @code{"<="} to represent the string @samp{<=} as a token. Bison
2798 Bison as well, except that you must not use a null character within a
2800 meaning in Bison string literals, nor is backslash-newline allowed. A
2824 option when you run Bison, so that it will write these macro definitions
2826 in the other source files that need it. @xref{Invocation, ,Invoking Bison}.
2838 The @code{yylex} function and Bison must use a consistent character set
2839 and encoding for character tokens. For example, if you run Bison in an
2843 generated by Bison will assume @acronym{ASCII} numeric values for
2845 contain C source files that were generated by Bison in an
2862 A Bison grammar rule has the following general form:
2903 any sequence of C tokens, so long as its braces are balanced. Bison
2911 and not by a digraph. Bison does not look for trigraphs, so if braced
2962 appears also on its right hand side. Nearly all Bison grammars need to
2994 Right recursion uses up space on the Bison stack in proportion to the
2997 @xref{Algorithm, ,The Bison Parser Algorithm}, for further explanation
3062 Bison's default is to use type @code{int} for all semantic values. To
3073 (@pxref{Grammar Outline, ,Outline of a Bison Grammar}).
3084 To use more than one data type for semantic values in one parser, Bison
3090 @code{%union} Bison declaration (@pxref{Union Decl, ,The Collection of
3096 @code{%token} Bison declaration (@pxref{Token Decl, ,Token Type Names})
3097 and for groupings with the @code{%type} Bison declaration (@pxref{Type
3122 being constructed is @code{$$}. Bison translates both of these
3160 If you don't specify an action for a rule, Bison supplies a default:
3315 However, Bison currently provides no means to declare a destructor for a
3344 this is what Bison actually does to implement mid-rule actions.
3397 But this does not help, because Bison does not realize that the two actions
3398 are identical. (Bison never tries to understand the C code in an action.)
3415 which would in any case tell Bison which rule to use, can still do so.
3438 Now Bison can execute the action in the rule for @code{subroutine} without
3471 When @code{YYLTYPE} is not defined, Bison uses a default structure type with
3637 @section Bison Declarations
3638 @cindex declarations, Bison
3639 @cindex Bison declarations
3641 The @dfn{Bison declarations} section of a Bison grammar defines the symbols
3656 * Require Decl:: Requiring a Bison version.
3666 * Decl Summary:: Table of all Bison declarations.
3670 @subsection Require a Version of Bison
3672 @cindex requiring a version of Bison
3675 You may require the minimum version of Bison to process the grammar. If
3676 the requirement is not met, @command{bison} exits with an error (exit
3696 Bison will convert this into a @code{#define} directive in
3715 It is generally best, however, to let Bison choose the numeric codes for
3716 all token types. Bison will automatically select codes that don't conflict
3998 Bison normally warns if there are any conflicts in the grammar
4013 Bison reports an error if the number of shift/reduce conflicts differs
4017 serious, and should be eliminated entirely. Bison will always report
4033 to get a verbose list of where the conflicts occur. Bison will also
4037 Check each of the conflicts to make sure that Bison's default
4043 number which Bison printed. With @acronym{GLR} parsers, add an
4047 Now Bison will warn you if you introduce an unexpected conflict, but
4057 Bison assumes by default that the start symbol for the grammar is the first
4078 Normally, Bison generates a parser which is not reentrant. This is
4084 Alternatively, you can generate a pure, reentrant parser. The Bison
4106 @subsection Bison Declaration Summary
4107 @cindex Bison declaration summary
4109 @cindex summary, Bison declaration
4164 In order to change the behavior of @command{bison}, use the following
4210 Specify a prefix to use for all Bison output file names. The names are
4248 This option also tells Bison to write the C code for the grammar actions
4255 file. Ordinarily Bison writes these commands in the parser file so that
4272 Require version @var{version} or higher of Bison. @xref{Require Decl, ,
4273 Require a Version of Bison}.
4279 token whose internal Bison token code number is @var{i}. The first
4286 the token in Bison. For single-character literals and literal
4288 escape sequences. For example, the Bison single-character literal
4290 @code{"'+'"}; and the Bison two-character literal string @code{"\\/"}
4294 When you specify @code{%token-table}, Bison also generates macro
4319 including its naming conventions. @xref{Bison Options}, for more.
4326 Most programs that use Bison parse only one language and therefore contain
4327 only one Bison parser. But what if you want to parse more than one
4332 (@pxref{Invocation, ,Invoking Bison}). This renames the interface
4333 functions and variables of the Bison parser to start with @var{prefix}
4342 @strong{All the other variables and macros associated with Bison are not
4358 The Bison parser is actually a C function named @code{yyparse}. Here we
4458 the input stream and returns them to the parser. Bison does not create
4462 In simple programs, @code{yylex} is often defined at the end of the Bison
4465 To do this, use the @samp{-d} option when you run Bison, so that it will
4468 that need it. @xref{Invocation, ,Invoking Bison}.
4538 to Bison.
4575 yylval = value; /* Put value onto Bison stack. */
4603 yylval.intval = value; /* Put value onto Bison stack. */
4632 When you use the Bison declaration @code{%pure-parser} to request a
4645 *lvalp = value; /* Put value onto Bison stack. */
4705 The Bison parser detects a @dfn{syntax error} or @dfn{parse error}
4711 The Bison parser expects to report the error by calling an error
4718 If you invoke the directive @code{%error-verbose} in the Bison
4719 declarations section (@pxref{Bison Declarations, ,The Bison Declarations
4720 Section}), then Bison provides a more verbose and specific error message
4725 nested. It isn't likely you will encounter this, since the Bison
4800 The prototypes are only indications of how the code produced by Bison
4801 uses @code{yyerror}. Bison-generated code always ignores the returned
4822 Here is a table of Bison constructs, variables and macros that
4979 @cindex bison-po
4981 A Bison-generated parser can print diagnostics, including error and
4982 tracing messages. By default, they appear in English. However, Bison
4991 The maintainer of a package that uses a Bison-generated parser enables
4998 @cindex bison-i18n.m4
5001 @file{bison-i18n.m4} file installed by Bison under
5002 @samp{share/aclocal/bison-i18n.m4} in Bison's installation directory.
5006 cp /usr/local/share/aclocal/bison-i18n.m4 m4/bison-i18n.m4
5015 defined in the file @file{bison-i18n.m4} that you copied earlier. It
5019 Bison-generated parser.
5023 containing Bison's runtime message catalog, through a call to
5024 @samp{bindtextdomain} with domain name @samp{bison-runtime}.
5028 bindtextdomain ("bison-runtime", BISON_LOCALEDIR);
5058 @chapter The Bison Parser Algorithm
5059 @cindex Bison parser algorithm
5066 As Bison reads tokens, it pushes them onto a stack along with their
5129 The Bison parser does @emph{not} always reduce immediately as soon as the
5214 called a @dfn{shift/reduce conflict}. Bison is designed to resolve
5242 else-clause to the innermost if-statement; this is what Bison accomplishes
5248 To avoid warnings from Bison about predictable, legitimate shift/reduce
5255 rules. Here is a complete Bison input file that actually manifests the
5287 Bison declarations for operator precedence allow you to specify when to
5292 * Using Precedence:: How to specify precedence in Bison grammars.
5324 To decide which one Bison should do, we must consider the results. If
5350 Bison allows you to specify these choices with the operator precedence
5407 (@pxref{Invocation, ,Invoking Bison}) says how each conflict was
5426 The Bison precedence declarations, @code{%left}, @code{%right} and
5473 minus, Bison silently assumes that minus has its usual precedence.
5484 Then you will see any shift/reduce conflict until you tell Bison how
5564 Bison resolves a reduce/reduce conflict by choosing to use the rule that
5679 However, Bison, like most parser generators, cannot actually handle all
5683 a @code{return_spec}, are similar enough that Bison assumes they are the
5686 a @code{type}. Bison is unable to determine at that stage of processing
5696 produce parsers that are very large. In practice, Bison is more useful
5758 Bison produces @emph{deterministic} parsers that choose uniquely
5761 As a result, normal Bison handles a proper subset of the family of
5769 there are languages where Bison's particular choice of how to
5773 Bison generates a parser that uses a different algorithm, called
5774 Generalized @acronym{LR} (or @acronym{GLR}). A Bison @acronym{GLR}
5776 algorithm for parsing as an ordinary Bison parser, but behaves
5785 a Bison @acronym{GLR} parsing stack is what is in effect a tree of states.
5810 Bison resolves and evaluates both and then calls the merge function on
5818 context-free grammar in cubic worst-case time. However, Bison currently
5828 Bison parser.
5845 The Bison parser stack can run out of memory if too many tokens are shifted and
5849 Because Bison parsers have growing stacks, hitting the upper limit
5886 @acronym{LALR}(1) parsers in C produced by Bison cannot grow when compiled
5888 suggested to grow @code{YYINITDEPTH}. The Bison maintainers hope to fix
5913 handling. The Bison parser generates an @code{error} token whenever a
5937 But Bison can force the situation to fit the rule, by discarding part of
5945 this example, Bison reads and discards input until the next newline so
6015 The Bison paradigm is to parse tokens first, then group them into larger
6017 its context. Although this violates the Bison paradigm, certain techniques
6018 (known as @dfn{kludges}) may enable you to write Bison parsers for such
6042 name, then this is actually a declaration of @code{x}. How can a Bison
6078 As a result, part of the Bison parser for C needs to be duplicated, with
6115 which is set by Bison actions, whose purpose is to alter the way tokens are
6226 understand the algorithm (@pxref{Algorithm, ,The Bison Parser
6240 As documented elsewhere (@pxref{Algorithm, ,The Bison Parser Algorithm})
6241 Bison parsers are @dfn{shift/reduce automata}. In some cases (much more
6243 tune or simply fix a parser. Bison provides two different
6249 Bison}. Its name is made by removing @samp{.tab.c} or @samp{.c} from
6272 @command{bison} reports:
6331 The next section reproduces the exact grammar that Bison used:
6371 Bison then proceeds onto the automaton itself, describing each state
6401 at the beginning of any rule deriving an @code{exp}. By default Bison
6403 you want to see more detail you can invoke @command{bison} with
6543 Because in @acronym{LALR}(1) parsing a single decision can be made, Bison
6559 @option{--report=look-ahead}, Bison specifies these look-ahead tokens:
6640 If a Bison grammar compiles properly but doesn't do what you want when it
6655 Use the @samp{-t} option when you run Bison (@pxref{Invocation,
6656 ,Invoking Bison}). This is @acronym{POSIX} compliant too.
6660 Add the @code{%debug} directive (@pxref{Decl Summary, ,Bison
6661 Declaration Summary}). This is a Bison extension, which will prove
6662 useful when Bison will output parsers for languages that don't use a
6701 produced by the Bison @samp{-v} option (@pxref{Invocation, ,Invoking
6702 Bison}). This file shows the meaning of each state in terms of
6745 @c ================================================= Invoking Bison
6748 @chapter Invoking Bison
6749 @cindex invoking Bison
6750 @cindex Bison invocation
6751 @cindex options for invoking Bison
6753 The usual way to invoke Bison is as follows:
6756 bison @var{infile}
6762 @samp{bison foo.y} file name yields
6763 @file{foo.tab.c}, and the @samp{bison hack/foo.y} file name yields
6775 bison -d @var{infile.yxx}
6781 bison -d -o @var{output.c++} @var{infile.y}
6786 For compatibility with @acronym{POSIX}, the standard Bison
6788 invokes Bison with the @option{-y} option.
6791 * Bison Options:: All the options described in detail,
6797 @node Bison Options
6798 @section Bison Options
6800 Bison supports both traditional single-letter options and mnemonic long
6807 Here is a list of options that can be used with Bison, alphabetized by
6811 @c Please, keep this ordered as in `bison --help'.
6817 Print a summary of the command-line options to Bison and exit.
6821 Print the version number of Bison and exit.
6834 for Yacc, and the Bison distribution contains such a script for
6839 bison -y "$@@"
6843 traditional Yacc grammars. If your grammar uses a Bison extension
6844 like @samp{%glr-parser}, Bison might not be Yacc-compatible even if
6856 you are developing Bison.
6875 Ordinarily Bison puts them in the parser file so that the C compiler
6905 for all Bison output file names. @xref{Decl Summary}.
6941 automaton computed by Bison. If the grammar file is @file{foo.y}, the
6983 @option{-ly} option. Note that Bison's implementation of the Yacc
6994 Bison ignores the @code{int} value returned by this @code{yyerror}.
7002 @c ================================================= C++ Bison
7016 * C++ Bison Interface:: Asking for C++ parser generation
7023 @node C++ Bison Interface
7024 @subsection C++ Bison Interface
7031 to Bison, or include the directive @samp{%skeleton "lalr1.cc"} in the
7032 grammar preamble. When run, @command{bison} will create several
7054 @option{-d}/@option{--defines} to @command{bison}, or use the
7231 ready to compile, in the directory @dfn{../bison/examples/calc++}. It
7232 focuses on the use of Bison, therefore the design of the various C++
7731 Several questions about Bison come up occasionally. Here some of them
7740 * Secure? Conform?:: Is Bison @acronym{POSIX} safe?
7741 * I can't build Bison:: Troubleshooting
7746 * Mailing Lists:: Meeting other Bison users
7781 These problems typically come not from Bison itself, but from
7861 Bison lists, but is only concerned with a misunderstanding of the role
7876 /* Similar to using $1, $2 in a Bison action. */
7949 Bison does not support multiple start-symbols, but there is a very
7993 Is Bison secure? Does it conform to POSIX?
7997 However, Bison is intended to be a reliable program that conforms to the
8001 @node I can't build Bison
8002 @section I can't build Bison
8005 I can't build Bison because @command{make} complains that
8013 support is lacking. You can re-configure Bison with
8016 Bison. See the file @file{ABOUT-NLS} for more information.
8023 I'm having trouble using Bison. Where can I find help?
8027 @email{help-bison@@gnu.org}. This mailing list is intended to be
8029 and installing Bison. Please keep in mind that (most of) the people on
8030 the list have aspects of their lives which are not related to Bison (!),
8044 version. Check @url{ftp://ftp.gnu.org/pub/gnu/bison/} or one of its
8051 complete (i.e., I should be able to run it through Bison without having
8065 Send bug reports to @email{bug-bison@@gnu.org}.
8071 Will Bison ever have C++ support? How about Java or @var{insert your
8102 How do I join the help-bison and bug-bison mailing lists?
8110 @appendix Bison Symbols
8111 @cindex Bison symbols, table of
8112 @cindex symbols in Bison, table of
8136 Bison declarations section or the epilogue.
8137 @xref{Grammar Layout, ,The Overall Layout of a Bison Grammar}.
8144 file. @xref{Grammar Outline, ,Outline of a Bison
8185 Bison declaration to create a header file meant for the scanner.
8195 Bison declaration to assign a precedence to a rule that is used at parse
8207 grammar rules so as to allow the Bison parser to recognize an error in
8217 Bison declaration to request verbose, specific error message strings
8222 Bison declaration to set the prefix of the output files. @xref{Decl
8227 Bison declaration to produce a @acronym{GLR} parser. @xref{GLR
8236 Bison declaration to assign left associativity to token(s).
8241 Bison declaration to specifying an additional parameter that
8247 Bison declaration to assign a merging function to a rule. If there is a
8254 Bison declaration to rename the external symbols. @xref{Decl Summary}.
8266 Bison declaration to avoid generating @code{#line} directives in the
8271 Bison declaration to assign nonassociativity to token(s).
8276 Bison declaration to set the name of the parser file. @xref{Decl
8281 Bison declaration to specifying an additional parameter that
8287 Bison declaration to assign a precedence to a specific rule.
8292 Bison declaration to request a pure (reentrant) parser.
8297 Require version @var{version} or higher of Bison. @xref{Require Decl, ,
8298 Require a Version of Bison}.
8302 Bison declaration to assign right associativity to token(s).
8307 Bison declaration to specify the start symbol. @xref{Start Decl, ,The
8312 Bison declaration to declare token(s) without specifying precedence.
8317 Bison declaration to include a token name table in the parser file.
8322 Bison declaration to declare nonterminals. @xref{Type Decl,
8333 Bison declaration to specify several possible data types for semantic
8455 Global variable which Bison increments each time it reports a syntax error.
8461 The parser function produced by Bison; call this function to start
8483 reserved for future Bison extensions. If not defined,
8490 @code{alloca} is called. You can inspect the code that Bison
8532 rules. @xref{Algorithm, ,The Bison Parser Algorithm}.
8536 that are not @acronym{LALR}(1). It resolves situations that Bison's
8572 left to right. @xref{Algorithm, ,The Bison Parser Algorithm}.
8590 The class of context-free grammars that Bison (like most other parser
8614 nonterminal, according to a grammar rule. @xref{Algorithm, ,The Bison
8638 already-recognized rule. @xref{Algorithm, ,The Bison Parser Algorithm}.
8642 @xref{Grammar in Bison, ,From Formal Rules to Bison Input}.
8662 The input of the Bison parser is a stream of tokens which comes from