1 Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
2 à partir bison.texinfo.
5 * bison: (bison). GNU Project parser generator (yacc replacement).
8 This file documents the Bison parser generator.
10 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998, 1999,
11 2000, 2001 Free Software Foundation, Inc.
13 Permission is granted to make and distribute verbatim copies of this
14 manual provided the copyright notice and this permission notice are
15 preserved on all copies.
17 Permission is granted to copy and distribute modified versions of
18 this manual under the conditions for verbatim copying, provided also
19 that the sections entitled "GNU General Public License" and "Conditions
20 for Using Bison" are included exactly as in the original, and provided
21 that the entire resulting derived work is distributed under the terms
22 of a permission notice identical to this one.
24 Permission is granted to copy and distribute translations of this
25 manual into another language, under the above conditions for modified
26 versions, except that the sections entitled "GNU General Public
27 License", "Conditions for Using Bison" and this permission notice may be
28 included in translations approved by the Free Software Foundation
29 instead of in the original English.
32 File: bison.info, Node: VMS Invocation, Prev: Option Cross Key, Up: Invocation
34 Invoking Bison under VMS
35 ========================
37 The command line syntax for Bison on VMS is a variant of the usual
38 Bison command syntax--adapted to fit VMS conventions.
40 To find the VMS equivalent for any Bison option, start with the long
41 option, and substitute a `/' for the leading `--', and substitute a `_'
42 for each `-' in the name of the long option. For example, the
43 following invocation under VMS:
45 bison /debug/name_prefix=bar foo.y
47 is equivalent to the following command under POSIX.
49 bison --debug --name-prefix=bar foo.y
51 The VMS file system does not permit filenames such as `foo.tab.c'.
52 In the above example, the output file would instead be named
56 File: bison.info, Node: Table of Symbols, Next: Glossary, Prev: Invocation, Up: Top
62 A token name reserved for error recovery. This token may be used
63 in grammar rules so as to allow the Bison parser to recognize an
64 error in the grammar without halting the process. In effect, a
65 sentence containing an error may be recognized as valid. On a
66 parse error, the token `error' becomes the current look-ahead
67 token. Actions corresponding to `error' are then executed, and
68 the look-ahead token is reset to the token that originally caused
69 the violation. *Note Error Recovery::.
72 Macro to pretend that an unrecoverable syntax error has occurred,
73 by making `yyparse' return 1 immediately. The error reporting
74 function `yyerror' is not called. *Note The Parser Function
75 `yyparse': Parser Function.
78 Macro to pretend that a complete utterance of the language has been
79 read, by making `yyparse' return 0 immediately. *Note The Parser
80 Function `yyparse': Parser Function.
83 Macro to discard a value from the parser stack and fake a
84 look-ahead token. *Note Special Features for Use in Actions:
88 Macro to pretend that a syntax error has just been detected: call
89 `yyerror' and then perform normal error recovery if possible
90 (*note Error Recovery::), or (if recovery is impossible) make
91 `yyparse' return 1. *Note Error Recovery::.
94 Macro that you define with `#define' in the Bison declarations
95 section to request verbose, specific error message strings when
99 Macro for specifying the initial size of the parser stack. *Note
103 Macro for specifying an extra argument (or list of extra
104 arguments) for `yyparse' to pass to `yylex'. *Note Calling
105 Conventions for Pure Parsers: Pure Calling.
108 Macro for the data type of `yylloc'; a structure with four
109 members. *Note Data Types of Locations: Location Type.
112 Default value for YYLTYPE.
115 Macro for specifying the maximum size of the parser stack. *Note
119 Macro for specifying the name of a parameter that `yyparse' should
120 accept. *Note Calling Conventions for Pure Parsers: Pure Calling.
123 Macro whose value indicates whether the parser is recovering from a
124 syntax error. *Note Special Features for Use in Actions: Action
128 Macro used to control the use of `alloca'. If defined to `0', the
129 parser will not use `alloca' but `malloc' when trying to grow its
130 internal stacks. Do _not_ define `YYSTACK_USE_ALLOCA' to anything
134 Macro for the data type of semantic values; `int' by default.
135 *Note Data Types of Semantic Values: Value Type.
138 External integer variable that contains the integer value of the
139 current look-ahead token. (In a pure parser, it is a local
140 variable within `yyparse'.) Error-recovery rule actions may
141 examine this variable. *Note Special Features for Use in Actions:
145 Macro used in error-recovery rule actions. It clears the previous
146 look-ahead token. *Note Error Recovery::.
149 External integer variable set to zero by default. If `yydebug' is
150 given a nonzero value, the parser will output information on input
151 symbols and parser action. *Note Debugging Your Parser: Debugging.
154 Macro to cause parser to recover immediately to its normal mode
155 after a parse error. *Note Error Recovery::.
158 User-supplied function to be called by `yyparse' on error. The
159 function receives one argument, a pointer to a character string
160 containing an error message. *Note The Error Reporting Function
161 `yyerror': Error Reporting.
164 User-supplied lexical analyzer function, called with no arguments
165 to get the next token. *Note The Lexical Analyzer Function
169 External variable in which `yylex' should place the semantic value
170 associated with a token. (In a pure parser, it is a local
171 variable within `yyparse', and its address is passed to `yylex'.)
172 *Note Semantic Values of Tokens: Token Values.
175 External variable in which `yylex' should place the line and column
176 numbers associated with a token. (In a pure parser, it is a local
177 variable within `yyparse', and its address is passed to `yylex'.)
178 You can ignore this variable if you don't use the `@' feature in
179 the grammar actions. *Note Textual Positions of Tokens: Token
183 Global variable which Bison increments each time there is a parse
184 error. (In a pure parser, it is a local variable within
185 `yyparse'.) *Note The Error Reporting Function `yyerror': Error
189 The parser function produced by Bison; call this function to start
190 parsing. *Note The Parser Function `yyparse': Parser Function.
193 Equip the parser for debugging. *Note Decl Summary::.
196 Bison declaration to create a header file meant for the scanner.
197 *Note Decl Summary::.
199 `%file-prefix="PREFIX"'
200 Bison declaration to set tge prefix of the output files. *Note
204 Bison declaration to assign left associativity to token(s). *Note
205 Operator Precedence: Precedence Decl.
207 `%name-prefix="PREFIX"'
208 Bison declaration to rename the external symbols. *Note Decl
212 Bison declaration to avoid generating `#line' directives in the
213 parser file. *Note Decl Summary::.
216 Bison declaration to assign non-associativity to token(s). *Note
217 Operator Precedence: Precedence Decl.
220 Bison declaration to set the name of the parser file. *Note Decl
224 Bison declaration to assign a precedence to a specific rule.
225 *Note Context-Dependent Precedence: Contextual Precedence.
228 Bison declaration to request a pure (reentrant) parser. *Note A
229 Pure (Reentrant) Parser: Pure Decl.
232 Bison declaration to assign right associativity to token(s).
233 *Note Operator Precedence: Precedence Decl.
236 Bison declaration to specify the start symbol. *Note The
237 Start-Symbol: Start Decl.
240 Bison declaration to declare token(s) without specifying
241 precedence. *Note Token Type Names: Token Decl.
244 Bison declaration to include a token name table in the parser file.
245 *Note Decl Summary::.
248 Bison declaration to declare nonterminals. *Note Nonterminal
252 Bison declaration to specify several possible data types for
253 semantic values. *Note The Collection of Value Types: Union Decl.
255 These are the punctuation and delimiters used in Bison input:
258 Delimiter used to separate the grammar rule section from the Bison
259 declarations section or the additional C code section. *Note The
260 Overall Layout of a Bison Grammar: Grammar Layout.
263 All code listed between `%{' and `%}' is copied directly to the
264 output file uninterpreted. Such code forms the "C declarations"
265 section of the input file. *Note Outline of a Bison Grammar:
269 Comment delimiters, as in C.
272 Separates a rule's result from its components. *Note Syntax of
273 Grammar Rules: Rules.
276 Terminates a rule. *Note Syntax of Grammar Rules: Rules.
279 Separates alternate rules for the same result nonterminal. *Note
280 Syntax of Grammar Rules: Rules.
283 File: bison.info, Node: Glossary, Next: Copying This Manual, Prev: Table of Symbols, Up: Top
288 Backus-Naur Form (BNF)
289 Formal method of specifying context-free grammars. BNF was first
290 used in the `ALGOL-60' report, 1963. *Note Languages and
291 Context-Free Grammars: Language and Grammar.
293 Context-free grammars
294 Grammars specified as rules that can be applied regardless of
295 context. Thus, if there is a rule which says that an integer can
296 be used as an expression, integers are allowed _anywhere_ an
297 expression is permitted. *Note Languages and Context-Free
298 Grammars: Language and Grammar.
301 Allocation of memory that occurs during execution, rather than at
302 compile time or on entry to a function.
305 Analogous to the empty set in set theory, the empty string is a
306 character string of length zero.
308 Finite-state stack machine
309 A "machine" that has discrete states in which it is said to exist
310 at each instant in time. As input to the machine is processed, the
311 machine moves from state to state as specified by the logic of the
312 machine. In the case of the parser, the input is the language
313 being parsed, and the states correspond to various stages in the
314 grammar rules. *Note The Bison Parser Algorithm: Algorithm.
317 A language construct that is (in general) grammatically divisible;
318 for example, `expression' or `declaration' in C. *Note Languages
319 and Context-Free Grammars: Language and Grammar.
322 An arithmetic operator that is placed between the operands on
323 which it performs some operation.
326 A continuous flow of data between devices or programs.
329 One of the typical usage schemas of the language. For example,
330 one of the constructs of the C language is the `if' statement.
331 *Note Languages and Context-Free Grammars: Language and Grammar.
334 Operators having left associativity are analyzed from left to
335 right: `a+b+c' first computes `a+b' and then combines with `c'.
336 *Note Operator Precedence: Precedence.
339 A rule whose result symbol is also its first component symbol; for
340 example, `expseq1 : expseq1 ',' exp;'. *Note Recursive Rules:
343 Left-to-right parsing
344 Parsing a sentence of a language by analyzing it token by token
345 from left to right. *Note The Bison Parser Algorithm: Algorithm.
347 Lexical analyzer (scanner)
348 A function that reads an input stream and returns tokens one by
349 one. *Note The Lexical Analyzer Function `yylex': Lexical.
352 A flag, set by actions in the grammar rules, which alters the way
353 tokens are parsed. *Note Lexical Tie-ins::.
356 A token which consists of two or more fixed characters. *Note
360 A token already read but not yet shifted. *Note Look-Ahead
364 The class of context-free grammars that Bison (like most other
365 parser generators) can handle; a subset of LR(1). *Note
366 Mysterious Reduce/Reduce Conflicts: Mystery Conflicts.
369 The class of context-free grammars in which at most one token of
370 look-ahead is needed to disambiguate the parsing of any piece of
374 A grammar symbol standing for a grammatical construct that can be
375 expressed through rules in terms of smaller constructs; in other
376 words, a construct that is not a token. *Note Symbols::.
379 An error encountered during parsing of an input stream due to
380 invalid syntax. *Note Error Recovery::.
383 A function that recognizes valid sentences of a language by
384 analyzing the syntax structure of a set of tokens passed to it
385 from a lexical analyzer.
388 An arithmetic operator that is placed after the operands upon
389 which it performs some operation.
392 Replacing a string of nonterminals and/or terminals with a single
393 nonterminal, according to a grammar rule. *Note The Bison Parser
394 Algorithm: Algorithm.
397 A reentrant subprogram is a subprogram which can be in invoked any
398 number of times in parallel, without interference between the
399 various invocations. *Note A Pure (Reentrant) Parser: Pure Decl.
401 Reverse polish notation
402 A language in which all operators are postfix operators.
405 A rule whose result symbol is also its last component symbol; for
406 example, `expseq1: exp ',' expseq1;'. *Note Recursive Rules:
410 In computer languages, the semantics are specified by the actions
411 taken for each instance of the language, i.e., the meaning of each
412 statement. *Note Defining Language Semantics: Semantics.
415 A parser is said to shift when it makes the choice of analyzing
416 further input from the stream rather than reducing immediately some
417 already-recognized rule. *Note The Bison Parser Algorithm:
420 Single-character literal
421 A single character that is recognized and interpreted as is.
422 *Note From Formal Rules to Bison Input: Grammar in Bison.
425 The nonterminal symbol that stands for a complete valid utterance
426 in the language being parsed. The start symbol is usually listed
427 as the first nonterminal symbol in a language specification.
428 *Note The Start-Symbol: Start Decl.
431 A data structure where symbol names and associated data are stored
432 during parsing to allow for recognition and use of existing
433 information in repeated uses of a symbol. *Note Multi-function
437 A basic, grammatically indivisible unit of a language. The symbol
438 that describes a token in the grammar is a terminal symbol. The
439 input of the Bison parser is a stream of tokens which comes from
440 the lexical analyzer. *Note Symbols::.
443 A grammar symbol that has no rules in the grammar and therefore is
444 grammatically indivisible. The piece of text it represents is a
445 token. *Note Languages and Context-Free Grammars: Language and
449 File: bison.info, Node: Copying This Manual, Next: Index, Prev: Glossary, Up: Top
456 * GNU Free Documentation License:: License for copying this manual.
459 File: bison.info, Node: GNU Free Documentation License, Up: Copying This Manual
461 GNU Free Documentation License
462 ==============================
464 Version 1.1, March 2000
465 Copyright (C) 2000 Free Software Foundation, Inc.
466 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
468 Everyone is permitted to copy and distribute verbatim copies
469 of this license document, but changing it is not allowed.
473 The purpose of this License is to make a manual, textbook, or other
474 written document "free" in the sense of freedom: to assure everyone
475 the effective freedom to copy and redistribute it, with or without
476 modifying it, either commercially or noncommercially. Secondarily,
477 this License preserves for the author and publisher a way to get
478 credit for their work, while not being considered responsible for
479 modifications made by others.
481 This License is a kind of "copyleft", which means that derivative
482 works of the document must themselves be free in the same sense.
483 It complements the GNU General Public License, which is a copyleft
484 license designed for free software.
486 We have designed this License in order to use it for manuals for
487 free software, because free software needs free documentation: a
488 free program should come with manuals providing the same freedoms
489 that the software does. But this License is not limited to
490 software manuals; it can be used for any textual work, regardless
491 of subject matter or whether it is published as a printed book.
492 We recommend this License principally for works whose purpose is
493 instruction or reference.
495 1. APPLICABILITY AND DEFINITIONS
497 This License applies to any manual or other work that contains a
498 notice placed by the copyright holder saying it can be distributed
499 under the terms of this License. The "Document", below, refers to
500 any such manual or work. Any member of the public is a licensee,
501 and is addressed as "you".
503 A "Modified Version" of the Document means any work containing the
504 Document or a portion of it, either copied verbatim, or with
505 modifications and/or translated into another language.
507 A "Secondary Section" is a named appendix or a front-matter
508 section of the Document that deals exclusively with the
509 relationship of the publishers or authors of the Document to the
510 Document's overall subject (or to related matters) and contains
511 nothing that could fall directly within that overall subject.
512 (For example, if the Document is in part a textbook of
513 mathematics, a Secondary Section may not explain any mathematics.)
514 The relationship could be a matter of historical connection with
515 the subject or with related matters, or of legal, commercial,
516 philosophical, ethical or political position regarding them.
518 The "Invariant Sections" are certain Secondary Sections whose
519 titles are designated, as being those of Invariant Sections, in
520 the notice that says that the Document is released under this
523 The "Cover Texts" are certain short passages of text that are
524 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
525 that says that the Document is released under this License.
527 A "Transparent" copy of the Document means a machine-readable copy,
528 represented in a format whose specification is available to the
529 general public, whose contents can be viewed and edited directly
530 and straightforwardly with generic text editors or (for images
531 composed of pixels) generic paint programs or (for drawings) some
532 widely available drawing editor, and that is suitable for input to
533 text formatters or for automatic translation to a variety of
534 formats suitable for input to text formatters. A copy made in an
535 otherwise Transparent file format whose markup has been designed
536 to thwart or discourage subsequent modification by readers is not
537 Transparent. A copy that is not "Transparent" is called "Opaque".
539 Examples of suitable formats for Transparent copies include plain
540 ASCII without markup, Texinfo input format, LaTeX input format,
541 SGML or XML using a publicly available DTD, and
542 standard-conforming simple HTML designed for human modification.
543 Opaque formats include PostScript, PDF, proprietary formats that
544 can be read and edited only by proprietary word processors, SGML
545 or XML for which the DTD and/or processing tools are not generally
546 available, and the machine-generated HTML produced by some word
547 processors for output purposes only.
549 The "Title Page" means, for a printed book, the title page itself,
550 plus such following pages as are needed to hold, legibly, the
551 material this License requires to appear in the title page. For
552 works in formats which do not have any title page as such, "Title
553 Page" means the text near the most prominent appearance of the
554 work's title, preceding the beginning of the body of the text.
558 You may copy and distribute the Document in any medium, either
559 commercially or noncommercially, provided that this License, the
560 copyright notices, and the license notice saying this License
561 applies to the Document are reproduced in all copies, and that you
562 add no other conditions whatsoever to those of this License. You
563 may not use technical measures to obstruct or control the reading
564 or further copying of the copies you make or distribute. However,
565 you may accept compensation in exchange for copies. If you
566 distribute a large enough number of copies you must also follow
567 the conditions in section 3.
569 You may also lend copies, under the same conditions stated above,
570 and you may publicly display copies.
572 3. COPYING IN QUANTITY
574 If you publish printed copies of the Document numbering more than
575 100, and the Document's license notice requires Cover Texts, you
576 must enclose the copies in covers that carry, clearly and legibly,
577 all these Cover Texts: Front-Cover Texts on the front cover, and
578 Back-Cover Texts on the back cover. Both covers must also clearly
579 and legibly identify you as the publisher of these copies. The
580 front cover must present the full title with all words of the
581 title equally prominent and visible. You may add other material
582 on the covers in addition. Copying with changes limited to the
583 covers, as long as they preserve the title of the Document and
584 satisfy these conditions, can be treated as verbatim copying in
587 If the required texts for either cover are too voluminous to fit
588 legibly, you should put the first ones listed (as many as fit
589 reasonably) on the actual cover, and continue the rest onto
592 If you publish or distribute Opaque copies of the Document
593 numbering more than 100, you must either include a
594 machine-readable Transparent copy along with each Opaque copy, or
595 state in or with each Opaque copy a publicly-accessible
596 computer-network location containing a complete Transparent copy
597 of the Document, free of added material, which the general
598 network-using public has access to download anonymously at no
599 charge using public-standard network protocols. If you use the
600 latter option, you must take reasonably prudent steps, when you
601 begin distribution of Opaque copies in quantity, to ensure that
602 this Transparent copy will remain thus accessible at the stated
603 location until at least one year after the last time you
604 distribute an Opaque copy (directly or through your agents or
605 retailers) of that edition to the public.
607 It is requested, but not required, that you contact the authors of
608 the Document well before redistributing any large number of
609 copies, to give them a chance to provide you with an updated
610 version of the Document.
614 You may copy and distribute a Modified Version of the Document
615 under the conditions of sections 2 and 3 above, provided that you
616 release the Modified Version under precisely this License, with
617 the Modified Version filling the role of the Document, thus
618 licensing distribution and modification of the Modified Version to
619 whoever possesses a copy of it. In addition, you must do these
620 things in the Modified Version:
622 A. Use in the Title Page (and on the covers, if any) a title
623 distinct from that of the Document, and from those of
624 previous versions (which should, if there were any, be listed
625 in the History section of the Document). You may use the
626 same title as a previous version if the original publisher of
627 that version gives permission.
629 B. List on the Title Page, as authors, one or more persons or
630 entities responsible for authorship of the modifications in
631 the Modified Version, together with at least five of the
632 principal authors of the Document (all of its principal
633 authors, if it has less than five).
635 C. State on the Title page the name of the publisher of the
636 Modified Version, as the publisher.
638 D. Preserve all the copyright notices of the Document.
640 E. Add an appropriate copyright notice for your modifications
641 adjacent to the other copyright notices.
643 F. Include, immediately after the copyright notices, a license
644 notice giving the public permission to use the Modified
645 Version under the terms of this License, in the form shown in
648 G. Preserve in that license notice the full lists of Invariant
649 Sections and required Cover Texts given in the Document's
652 H. Include an unaltered copy of this License.
654 I. Preserve the section entitled "History", and its title, and
655 add to it an item stating at least the title, year, new
656 authors, and publisher of the Modified Version as given on
657 the Title Page. If there is no section entitled "History" in
658 the Document, create one stating the title, year, authors,
659 and publisher of the Document as given on its Title Page,
660 then add an item describing the Modified Version as stated in
661 the previous sentence.
663 J. Preserve the network location, if any, given in the Document
664 for public access to a Transparent copy of the Document, and
665 likewise the network locations given in the Document for
666 previous versions it was based on. These may be placed in
667 the "History" section. You may omit a network location for a
668 work that was published at least four years before the
669 Document itself, or if the original publisher of the version
670 it refers to gives permission.
672 K. In any section entitled "Acknowledgments" or "Dedications",
673 preserve the section's title, and preserve in the section all
674 the substance and tone of each of the contributor
675 acknowledgments and/or dedications given therein.
677 L. Preserve all the Invariant Sections of the Document,
678 unaltered in their text and in their titles. Section numbers
679 or the equivalent are not considered part of the section
682 M. Delete any section entitled "Endorsements". Such a section
683 may not be included in the Modified Version.
685 N. Do not retitle any existing section as "Endorsements" or to
686 conflict in title with any Invariant Section.
688 If the Modified Version includes new front-matter sections or
689 appendices that qualify as Secondary Sections and contain no
690 material copied from the Document, you may at your option
691 designate some or all of these sections as invariant. To do this,
692 add their titles to the list of Invariant Sections in the Modified
693 Version's license notice. These titles must be distinct from any
694 other section titles.
696 You may add a section entitled "Endorsements", provided it contains
697 nothing but endorsements of your Modified Version by various
698 parties--for example, statements of peer review or that the text
699 has been approved by an organization as the authoritative
700 definition of a standard.
702 You may add a passage of up to five words as a Front-Cover Text,
703 and a passage of up to 25 words as a Back-Cover Text, to the end
704 of the list of Cover Texts in the Modified Version. Only one
705 passage of Front-Cover Text and one of Back-Cover Text may be
706 added by (or through arrangements made by) any one entity. If the
707 Document already includes a cover text for the same cover,
708 previously added by you or by arrangement made by the same entity
709 you are acting on behalf of, you may not add another; but you may
710 replace the old one, on explicit permission from the previous
711 publisher that added the old one.
713 The author(s) and publisher(s) of the Document do not by this
714 License give permission to use their names for publicity for or to
715 assert or imply endorsement of any Modified Version.
717 5. COMBINING DOCUMENTS
719 You may combine the Document with other documents released under
720 this License, under the terms defined in section 4 above for
721 modified versions, provided that you include in the combination
722 all of the Invariant Sections of all of the original documents,
723 unmodified, and list them all as Invariant Sections of your
724 combined work in its license notice.
726 The combined work need only contain one copy of this License, and
727 multiple identical Invariant Sections may be replaced with a single
728 copy. If there are multiple Invariant Sections with the same name
729 but different contents, make the title of each such section unique
730 by adding at the end of it, in parentheses, the name of the
731 original author or publisher of that section if known, or else a
732 unique number. Make the same adjustment to the section titles in
733 the list of Invariant Sections in the license notice of the
736 In the combination, you must combine any sections entitled
737 "History" in the various original documents, forming one section
738 entitled "History"; likewise combine any sections entitled
739 "Acknowledgments", and any sections entitled "Dedications". You
740 must delete all sections entitled "Endorsements."
742 6. COLLECTIONS OF DOCUMENTS
744 You may make a collection consisting of the Document and other
745 documents released under this License, and replace the individual
746 copies of this License in the various documents with a single copy
747 that is included in the collection, provided that you follow the
748 rules of this License for verbatim copying of each of the
749 documents in all other respects.
751 You may extract a single document from such a collection, and
752 distribute it individually under this License, provided you insert
753 a copy of this License into the extracted document, and follow
754 this License in all other respects regarding verbatim copying of
757 7. AGGREGATION WITH INDEPENDENT WORKS
759 A compilation of the Document or its derivatives with other
760 separate and independent documents or works, in or on a volume of
761 a storage or distribution medium, does not as a whole count as a
762 Modified Version of the Document, provided no compilation
763 copyright is claimed for the compilation. Such a compilation is
764 called an "aggregate", and this License does not apply to the
765 other self-contained works thus compiled with the Document, on
766 account of their being thus compiled, if they are not themselves
767 derivative works of the Document.
769 If the Cover Text requirement of section 3 is applicable to these
770 copies of the Document, then if the Document is less than one
771 quarter of the entire aggregate, the Document's Cover Texts may be
772 placed on covers that surround only the Document within the
773 aggregate. Otherwise they must appear on covers around the whole
778 Translation is considered a kind of modification, so you may
779 distribute translations of the Document under the terms of section
780 4. Replacing Invariant Sections with translations requires special
781 permission from their copyright holders, but you may include
782 translations of some or all Invariant Sections in addition to the
783 original versions of these Invariant Sections. You may include a
784 translation of this License provided that you also include the
785 original English version of this License. In case of a
786 disagreement between the translation and the original English
787 version of this License, the original English version will prevail.
791 You may not copy, modify, sublicense, or distribute the Document
792 except as expressly provided for under this License. Any other
793 attempt to copy, modify, sublicense or distribute the Document is
794 void, and will automatically terminate your rights under this
795 License. However, parties who have received copies, or rights,
796 from you under this License will not have their licenses
797 terminated so long as such parties remain in full compliance.
799 10. FUTURE REVISIONS OF THIS LICENSE
801 The Free Software Foundation may publish new, revised versions of
802 the GNU Free Documentation License from time to time. Such new
803 versions will be similar in spirit to the present version, but may
804 differ in detail to address new problems or concerns. See
805 `http://www.gnu.org/copyleft/'.
807 Each version of the License is given a distinguishing version
808 number. If the Document specifies that a particular numbered
809 version of this License "or any later version" applies to it, you
810 have the option of following the terms and conditions either of
811 that specified version or of any later version that has been
812 published (not as a draft) by the Free Software Foundation. If
813 the Document does not specify a version number of this License,
814 you may choose any version ever published (not as a draft) by the
815 Free Software Foundation.
817 ADDENDUM: How to use this License for your documents
818 ----------------------------------------------------
820 To use this License in a document you have written, include a copy of
821 the License in the document and put the following copyright and license
822 notices just after the title page:
824 Copyright (C) YEAR YOUR NAME.
825 Permission is granted to copy, distribute and/or modify this document
826 under the terms of the GNU Free Documentation License, Version 1.1
827 or any later version published by the Free Software Foundation;
828 with the Invariant Sections being LIST THEIR TITLES, with the
829 Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
830 A copy of the license is included in the section entitled ``GNU
831 Free Documentation License''.
833 If you have no Invariant Sections, write "with no Invariant Sections"
834 instead of saying which ones are invariant. If you have no Front-Cover
835 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
836 LIST"; likewise for Back-Cover Texts.
838 If your document contains nontrivial examples of program code, we
839 recommend releasing these examples in parallel under your choice of
840 free software license, such as the GNU General Public License, to
841 permit their use in free software.
844 File: bison.info, Node: Index, Prev: Copying This Manual, Up: Top
853 * %expect: Expect Decl.
854 * %left: Using Precedence.
855 * %nonassoc: Using Precedence.
856 * %prec: Contextual Precedence.
857 * %pure_parser: Pure Decl.
858 * %right: Using Precedence.
859 * %start: Start Decl.
860 * %token: Token Decl.
862 * %union: Union Decl.
863 * @$ <1>: Action Features.
864 * @$: Actions and Locations.
865 * @N <1>: Action Features.
866 * @N: Actions and Locations.
868 * action data types: Action Types.
869 * action features summary: Action Features.
870 * actions in mid-rule: Mid-Rule Actions.
871 * actions, location: Actions and Locations.
872 * actions, semantic: Semantic Actions.
873 * additional C code section: C Code.
874 * algorithm of parser: Algorithm.
875 * associativity: Why Precedence.
876 * Backus-Naur form: Language and Grammar.
877 * Bison declaration summary: Decl Summary.
878 * Bison declarations: Declarations.
879 * Bison declarations (introduction): Bison Declarations.
880 * Bison grammar: Grammar in Bison.
881 * Bison invocation: Invocation.
882 * Bison parser: Bison Parser.
883 * Bison parser algorithm: Algorithm.
884 * Bison symbols, table of: Table of Symbols.
885 * Bison utility: Bison Parser.
886 * BISON_HAIRY: Environment Variables.
887 * BISON_SIMPLE: Environment Variables.
888 * BNF: Language and Grammar.
889 * C code, section for additional: C Code.
890 * C declarations section: C Declarations.
891 * C-language interface: Interface.
893 * calculator, infix notation: Infix Calc.
894 * calculator, location tracking: Location Tracking Calc.
895 * calculator, multi-function: Multi-function Calc.
896 * calculator, simple: RPN Calc.
897 * character token: Symbols.
898 * compiling the parser: Rpcalc Compile.
899 * conflicts: Shift/Reduce.
900 * conflicts, reduce/reduce: Reduce/Reduce.
901 * conflicts, suppressing warnings of: Expect Decl.
902 * context-dependent precedence: Contextual Precedence.
903 * context-free grammar: Language and Grammar.
904 * controlling function: Rpcalc Main.
905 * dangling else: Shift/Reduce.
906 * data type of locations: Location Type.
907 * data types in actions: Action Types.
908 * data types of semantic values: Value Type.
909 * debugging: Debugging.
910 * declaration summary: Decl Summary.
911 * declarations, Bison: Declarations.
912 * declarations, Bison (introduction): Bison Declarations.
913 * declarations, C: C Declarations.
914 * declaring literal string tokens: Token Decl.
915 * declaring operator precedence: Precedence Decl.
916 * declaring the start symbol: Start Decl.
917 * declaring token type names: Token Decl.
918 * declaring value types: Union Decl.
919 * declaring value types, nonterminals: Type Decl.
920 * default action: Actions.
921 * default data type: Value Type.
922 * default location type: Location Type.
923 * default stack limit: Stack Overflow.
924 * default start symbol: Start Decl.
925 * defining language semantics: Semantics.
926 * else, dangling: Shift/Reduce.
927 * environment variables: Environment Variables.
928 * error: Error Recovery.
929 * error recovery: Error Recovery.
930 * error recovery, simple: Simple Error Recovery.
931 * error reporting function: Error Reporting.
932 * error reporting routine: Rpcalc Error.
933 * examples, simple: Examples.
934 * exercises: Exercises.
935 * FDL, GNU Free Documentation License: GNU Free Documentation License.
936 * file format: Grammar Layout.
937 * finite-state machine: Parser States.
938 * formal grammar: Grammar in Bison.
939 * format of grammar file: Grammar Layout.
940 * glossary: Glossary.
941 * grammar file: Grammar Layout.
942 * grammar rule syntax: Rules.
943 * grammar rules section: Grammar Rules.
944 * grammar, Bison: Grammar in Bison.
945 * grammar, context-free: Language and Grammar.
946 * grouping, syntactic: Language and Grammar.
947 * infix notation calculator: Infix Calc.
948 * interface: Interface.
949 * introduction: Introduction.
950 * invoking Bison: Invocation.
951 * invoking Bison under VMS: VMS Invocation.
952 * LALR(1): Mystery Conflicts.
953 * language semantics, defining: Semantics.
954 * layout of Bison grammar: Grammar Layout.
955 * left recursion: Recursion.
956 * lexical analyzer: Lexical.
957 * lexical analyzer, purpose: Bison Parser.
958 * lexical analyzer, writing: Rpcalc Lexer.
959 * lexical tie-in: Lexical Tie-ins.
960 * literal string token: Symbols.
961 * literal token: Symbols.
962 * location <1>: Locations.
963 * location: Locations Overview.
964 * location actions: Actions and Locations.
965 * location tracking calculator: Location Tracking Calc.
966 * look-ahead token: Look-Ahead.
967 * LR(1): Mystery Conflicts.
968 * ltcalc: Location Tracking Calc.
969 * main function in simple example: Rpcalc Main.
970 * mfcalc: Multi-function Calc.
971 * mid-rule actions: Mid-Rule Actions.
972 * multi-function calculator: Multi-function Calc.
973 * multicharacter literal: Symbols.
974 * mutual recursion: Recursion.
975 * nonterminal symbol: Symbols.
976 * operator precedence: Precedence.
977 * operator precedence, declaring: Precedence Decl.
978 * options for invoking Bison: Invocation.
979 * overflow of parser stack: Stack Overflow.
980 * parse error: Error Reporting.
981 * parser: Bison Parser.
982 * parser stack: Algorithm.
983 * parser stack overflow: Stack Overflow.
984 * parser state: Parser States.
985 * polish notation calculator: RPN Calc.
986 * position, textual <1>: Locations.
987 * position, textual: Locations Overview.
988 * precedence declarations: Precedence Decl.
989 * precedence of operators: Precedence.
990 * precedence, context-dependent: Contextual Precedence.
991 * precedence, unary operator: Contextual Precedence.
992 * preventing warnings about conflicts: Expect Decl.
993 * pure parser: Pure Decl.
994 * recovery from errors: Error Recovery.
995 * recursive rule: Recursion.
996 * reduce/reduce conflict: Reduce/Reduce.
997 * reduction: Algorithm.
998 * reentrant parser: Pure Decl.
999 * reverse polish notation: RPN Calc.
1000 * right recursion: Recursion.
1002 * rule syntax: Rules.
1003 * rules section for grammar: Grammar Rules.
1004 * running Bison (introduction): Rpcalc Gen.
1005 * semantic actions: Semantic Actions.
1006 * semantic value: Semantic Values.
1007 * semantic value type: Value Type.
1008 * shift/reduce conflicts: Shift/Reduce.
1009 * shifting: Algorithm.
1010 * simple examples: Examples.
1011 * single-character literal: Symbols.
1012 * stack overflow: Stack Overflow.
1013 * stack, parser: Algorithm.
1014 * stages in using Bison: Stages.
1015 * start symbol: Language and Grammar.
1016 * start symbol, declaring: Start Decl.
1017 * state (of parser): Parser States.
1018 * string token: Symbols.
1019 * summary, action features: Action Features.
1020 * summary, Bison declaration: Decl Summary.
1021 * suppressing conflict warnings: Expect Decl.
1023 * symbol table example: Mfcalc Symtab.
1024 * symbols (abstract): Language and Grammar.
1025 * symbols in Bison, table of: Table of Symbols.
1026 * syntactic grouping: Language and Grammar.
1027 * syntax error: Error Reporting.
1028 * syntax of grammar rules: Rules.
1029 * terminal symbol: Symbols.
1030 * textual position <1>: Locations.
1031 * textual position: Locations Overview.
1032 * token: Language and Grammar.
1033 * token type: Symbols.
1034 * token type names, declaring: Token Decl.
1035 * tracing the parser: Debugging.
1036 * unary operator precedence: Contextual Precedence.
1037 * using Bison: Stages.
1038 * value type, semantic: Value Type.
1039 * value types, declaring: Union Decl.
1040 * value types, nonterminals, declaring: Type Decl.
1041 * value, semantic: Semantic Values.
1042 * VMS: VMS Invocation.
1043 * warnings, preventing: Expect Decl.
1044 * writing a lexical analyzer: Rpcalc Lexer.
1045 * YYABORT: Parser Function.
1046 * YYACCEPT: Parser Function.
1047 * YYBACKUP: Action Features.
1048 * yychar: Look-Ahead.
1049 * yyclearin: Error Recovery.
1050 * yydebug: Debugging.
1051 * YYDEBUG: Debugging.
1052 * YYEMPTY: Action Features.
1053 * yyerrok: Error Recovery.
1054 * YYERROR: Action Features.
1055 * yyerror: Error Reporting.
1056 * YYERROR_VERBOSE: Error Reporting.
1057 * YYINITDEPTH: Stack Overflow.
1059 * YYLEX_PARAM: Pure Calling.
1060 * yylloc: Token Positions.
1061 * YYLLOC_DEFAULT: Location Default Action.
1062 * YYLTYPE: Token Positions.
1063 * yylval: Token Values.
1064 * YYMAXDEPTH: Stack Overflow.
1065 * yynerrs: Error Reporting.
1066 * yyparse: Parser Function.
1067 * YYPARSE_PARAM: Pure Calling.
1068 * YYPRINT: Debugging.
1069 * YYRECOVERING: Error Recovery.