1 This is bison.info, produced by makeinfo version 4.0b from
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: Table of Symbols, Next: Glossary, Prev: Invocation, Up: Top
38 A token name reserved for error recovery. This token may be used
39 in grammar rules so as to allow the Bison parser to recognize an
40 error in the grammar without halting the process. In effect, a
41 sentence containing an error may be recognized as valid. On a
42 parse error, the token `error' becomes the current look-ahead
43 token. Actions corresponding to `error' are then executed, and
44 the look-ahead token is reset to the token that originally caused
45 the violation. *Note Error Recovery::.
48 Macro to pretend that an unrecoverable syntax error has occurred,
49 by making `yyparse' return 1 immediately. The error reporting
50 function `yyerror' is not called. *Note The Parser Function
51 `yyparse': Parser Function.
54 Macro to pretend that a complete utterance of the language has been
55 read, by making `yyparse' return 0 immediately. *Note The Parser
56 Function `yyparse': Parser Function.
59 Macro to discard a value from the parser stack and fake a
60 look-ahead token. *Note Special Features for Use in Actions:
64 Macro to pretend that a syntax error has just been detected: call
65 `yyerror' and then perform normal error recovery if possible
66 (*note Error Recovery::), or (if recovery is impossible) make
67 `yyparse' return 1. *Note Error Recovery::.
70 Macro that you define with `#define' in the Bison declarations
71 section to request verbose, specific error message strings when
75 Macro for specifying the initial size of the parser stack. *Note
79 Macro for specifying an extra argument (or list of extra
80 arguments) for `yyparse' to pass to `yylex'. *Note Calling
81 Conventions for Pure Parsers: Pure Calling.
84 Macro for the data type of `yylloc'; a structure with four
85 members. *Note Data Types of Locations: Location Type.
88 Default value for YYLTYPE.
91 Macro for specifying the maximum size of the parser stack. *Note
95 Macro for specifying the name of a parameter that `yyparse' should
96 accept. *Note Calling Conventions for Pure Parsers: Pure Calling.
99 Macro whose value indicates whether the parser is recovering from a
100 syntax error. *Note Special Features for Use in Actions: Action
104 Macro used to control the use of `alloca'. If defined to `0', the
105 parser will not use `alloca' but `malloc' when trying to grow its
106 internal stacks. Do _not_ define `YYSTACK_USE_ALLOCA' to anything
110 Macro for the data type of semantic values; `int' by default.
111 *Note Data Types of Semantic Values: Value Type.
114 External integer variable that contains the integer value of the
115 current look-ahead token. (In a pure parser, it is a local
116 variable within `yyparse'.) Error-recovery rule actions may
117 examine this variable. *Note Special Features for Use in Actions:
121 Macro used in error-recovery rule actions. It clears the previous
122 look-ahead token. *Note Error Recovery::.
125 External integer variable set to zero by default. If `yydebug' is
126 given a nonzero value, the parser will output information on input
127 symbols and parser action. *Note Debugging Your Parser: Debugging.
130 Macro to cause parser to recover immediately to its normal mode
131 after a parse error. *Note Error Recovery::.
134 User-supplied function to be called by `yyparse' on error. The
135 function receives one argument, a pointer to a character string
136 containing an error message. *Note The Error Reporting Function
137 `yyerror': Error Reporting.
140 User-supplied lexical analyzer function, called with no arguments
141 to get the next token. *Note The Lexical Analyzer Function
145 External variable in which `yylex' should place the semantic value
146 associated with a token. (In a pure parser, it is a local
147 variable within `yyparse', and its address is passed to `yylex'.)
148 *Note Semantic Values of Tokens: Token Values.
151 External variable in which `yylex' should place the line and column
152 numbers associated with a token. (In a pure parser, it is a local
153 variable within `yyparse', and its address is passed to `yylex'.)
154 You can ignore this variable if you don't use the `@' feature in
155 the grammar actions. *Note Textual Positions of Tokens: Token
159 Global variable which Bison increments each time there is a parse
160 error. (In a pure parser, it is a local variable within
161 `yyparse'.) *Note The Error Reporting Function `yyerror': Error
165 The parser function produced by Bison; call this function to start
166 parsing. *Note The Parser Function `yyparse': Parser Function.
169 Equip the parser for debugging. *Note Decl Summary::.
172 Bison declaration to create a header file meant for the scanner.
173 *Note Decl Summary::.
176 Bison declaration to assign left associativity to token(s). *Note
177 Operator Precedence: Precedence Decl.
180 Bison declaration to avoid generating `#line' directives in the
181 parser file. *Note Decl Summary::.
184 Bison declaration to assign non-associativity to token(s). *Note
185 Operator Precedence: Precedence Decl.
188 Bison declaration to assign a precedence to a specific rule.
189 *Note Context-Dependent Precedence: Contextual Precedence.
192 Bison declaration to request a pure (reentrant) parser. *Note A
193 Pure (Reentrant) Parser: Pure Decl.
196 Bison declaration to assign right associativity to token(s).
197 *Note Operator Precedence: Precedence Decl.
200 Bison declaration to specify the start symbol. *Note The
201 Start-Symbol: Start Decl.
204 Bison declaration to declare token(s) without specifying
205 precedence. *Note Token Type Names: Token Decl.
208 Bison declaration to include a token name table in the parser file.
209 *Note Decl Summary::.
212 Bison declaration to declare nonterminals. *Note Nonterminal
216 Bison declaration to specify several possible data types for
217 semantic values. *Note The Collection of Value Types: Union Decl.
219 These are the punctuation and delimiters used in Bison input:
222 Delimiter used to separate the grammar rule section from the Bison
223 declarations section or the epilogue. *Note The Overall Layout of
224 a Bison Grammar: Grammar Layout.
227 All code listed between `%{' and `%}' is copied directly to the
228 output file uninterpreted. Such code forms the prologue of the
229 input file. *Note Outline of a Bison Grammar: Grammar Outline.
232 Comment delimiters, as in C.
235 Separates a rule's result from its components. *Note Syntax of
236 Grammar Rules: Rules.
239 Terminates a rule. *Note Syntax of Grammar Rules: Rules.
242 Separates alternate rules for the same result nonterminal. *Note
243 Syntax of Grammar Rules: Rules.
246 File: bison.info, Node: Glossary, Next: Copying This Manual, Prev: Table of Symbols, Up: Top
251 Backus-Naur Form (BNF)
252 Formal method of specifying context-free grammars. BNF was first
253 used in the `ALGOL-60' report, 1963. *Note Languages and
254 Context-Free Grammars: Language and Grammar.
256 Context-free grammars
257 Grammars specified as rules that can be applied regardless of
258 context. Thus, if there is a rule which says that an integer can
259 be used as an expression, integers are allowed _anywhere_ an
260 expression is permitted. *Note Languages and Context-Free
261 Grammars: Language and Grammar.
264 Allocation of memory that occurs during execution, rather than at
265 compile time or on entry to a function.
268 Analogous to the empty set in set theory, the empty string is a
269 character string of length zero.
271 Finite-state stack machine
272 A "machine" that has discrete states in which it is said to exist
273 at each instant in time. As input to the machine is processed, the
274 machine moves from state to state as specified by the logic of the
275 machine. In the case of the parser, the input is the language
276 being parsed, and the states correspond to various stages in the
277 grammar rules. *Note The Bison Parser Algorithm: Algorithm.
280 A language construct that is (in general) grammatically divisible;
281 for example, `expression' or `declaration' in C. *Note Languages
282 and Context-Free Grammars: Language and Grammar.
285 An arithmetic operator that is placed between the operands on
286 which it performs some operation.
289 A continuous flow of data between devices or programs.
292 One of the typical usage schemas of the language. For example,
293 one of the constructs of the C language is the `if' statement.
294 *Note Languages and Context-Free Grammars: Language and Grammar.
297 Operators having left associativity are analyzed from left to
298 right: `a+b+c' first computes `a+b' and then combines with `c'.
299 *Note Operator Precedence: Precedence.
302 A rule whose result symbol is also its first component symbol; for
303 example, `expseq1 : expseq1 ',' exp;'. *Note Recursive Rules:
306 Left-to-right parsing
307 Parsing a sentence of a language by analyzing it token by token
308 from left to right. *Note The Bison Parser Algorithm: Algorithm.
310 Lexical analyzer (scanner)
311 A function that reads an input stream and returns tokens one by
312 one. *Note The Lexical Analyzer Function `yylex': Lexical.
315 A flag, set by actions in the grammar rules, which alters the way
316 tokens are parsed. *Note Lexical Tie-ins::.
319 A token which consists of two or more fixed characters. *Note
323 A token already read but not yet shifted. *Note Look-Ahead
327 The class of context-free grammars that Bison (like most other
328 parser generators) can handle; a subset of LR(1). *Note
329 Mysterious Reduce/Reduce Conflicts: Mystery Conflicts.
332 The class of context-free grammars in which at most one token of
333 look-ahead is needed to disambiguate the parsing of any piece of
337 A grammar symbol standing for a grammatical construct that can be
338 expressed through rules in terms of smaller constructs; in other
339 words, a construct that is not a token. *Note Symbols::.
342 An error encountered during parsing of an input stream due to
343 invalid syntax. *Note Error Recovery::.
346 A function that recognizes valid sentences of a language by
347 analyzing the syntax structure of a set of tokens passed to it
348 from a lexical analyzer.
351 An arithmetic operator that is placed after the operands upon
352 which it performs some operation.
355 Replacing a string of nonterminals and/or terminals with a single
356 nonterminal, according to a grammar rule. *Note The Bison Parser
357 Algorithm: Algorithm.
360 A reentrant subprogram is a subprogram which can be in invoked any
361 number of times in parallel, without interference between the
362 various invocations. *Note A Pure (Reentrant) Parser: Pure Decl.
364 Reverse polish notation
365 A language in which all operators are postfix operators.
368 A rule whose result symbol is also its last component symbol; for
369 example, `expseq1: exp ',' expseq1;'. *Note Recursive Rules:
373 In computer languages, the semantics are specified by the actions
374 taken for each instance of the language, i.e., the meaning of each
375 statement. *Note Defining Language Semantics: Semantics.
378 A parser is said to shift when it makes the choice of analyzing
379 further input from the stream rather than reducing immediately some
380 already-recognized rule. *Note The Bison Parser Algorithm:
383 Single-character literal
384 A single character that is recognized and interpreted as is.
385 *Note From Formal Rules to Bison Input: Grammar in Bison.
388 The nonterminal symbol that stands for a complete valid utterance
389 in the language being parsed. The start symbol is usually listed
390 as the first nonterminal symbol in a language specification.
391 *Note The Start-Symbol: Start Decl.
394 A data structure where symbol names and associated data are stored
395 during parsing to allow for recognition and use of existing
396 information in repeated uses of a symbol. *Note Multi-function
400 A basic, grammatically indivisible unit of a language. The symbol
401 that describes a token in the grammar is a terminal symbol. The
402 input of the Bison parser is a stream of tokens which comes from
403 the lexical analyzer. *Note Symbols::.
406 A grammar symbol that has no rules in the grammar and therefore is
407 grammatically indivisible. The piece of text it represents is a
408 token. *Note Languages and Context-Free Grammars: Language and
412 File: bison.info, Node: Copying This Manual, Next: Index, Prev: Glossary, Up: Top
419 * GNU Free Documentation License:: License for copying this manual.
422 File: bison.info, Node: GNU Free Documentation License, Up: Copying This Manual
424 GNU Free Documentation License
425 ==============================
427 Version 1.1, March 2000
428 Copyright (C) 2000 Free Software Foundation, Inc.
429 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
431 Everyone is permitted to copy and distribute verbatim copies
432 of this license document, but changing it is not allowed.
436 The purpose of this License is to make a manual, textbook, or other
437 written document "free" in the sense of freedom: to assure everyone
438 the effective freedom to copy and redistribute it, with or without
439 modifying it, either commercially or noncommercially. Secondarily,
440 this License preserves for the author and publisher a way to get
441 credit for their work, while not being considered responsible for
442 modifications made by others.
444 This License is a kind of "copyleft", which means that derivative
445 works of the document must themselves be free in the same sense.
446 It complements the GNU General Public License, which is a copyleft
447 license designed for free software.
449 We have designed this License in order to use it for manuals for
450 free software, because free software needs free documentation: a
451 free program should come with manuals providing the same freedoms
452 that the software does. But this License is not limited to
453 software manuals; it can be used for any textual work, regardless
454 of subject matter or whether it is published as a printed book.
455 We recommend this License principally for works whose purpose is
456 instruction or reference.
458 1. APPLICABILITY AND DEFINITIONS
460 This License applies to any manual or other work that contains a
461 notice placed by the copyright holder saying it can be distributed
462 under the terms of this License. The "Document", below, refers to
463 any such manual or work. Any member of the public is a licensee,
464 and is addressed as "you".
466 A "Modified Version" of the Document means any work containing the
467 Document or a portion of it, either copied verbatim, or with
468 modifications and/or translated into another language.
470 A "Secondary Section" is a named appendix or a front-matter
471 section of the Document that deals exclusively with the
472 relationship of the publishers or authors of the Document to the
473 Document's overall subject (or to related matters) and contains
474 nothing that could fall directly within that overall subject.
475 (For example, if the Document is in part a textbook of
476 mathematics, a Secondary Section may not explain any mathematics.)
477 The relationship could be a matter of historical connection with
478 the subject or with related matters, or of legal, commercial,
479 philosophical, ethical or political position regarding them.
481 The "Invariant Sections" are certain Secondary Sections whose
482 titles are designated, as being those of Invariant Sections, in
483 the notice that says that the Document is released under this
486 The "Cover Texts" are certain short passages of text that are
487 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
488 that says that the Document is released under this License.
490 A "Transparent" copy of the Document means a machine-readable copy,
491 represented in a format whose specification is available to the
492 general public, whose contents can be viewed and edited directly
493 and straightforwardly with generic text editors or (for images
494 composed of pixels) generic paint programs or (for drawings) some
495 widely available drawing editor, and that is suitable for input to
496 text formatters or for automatic translation to a variety of
497 formats suitable for input to text formatters. A copy made in an
498 otherwise Transparent file format whose markup has been designed
499 to thwart or discourage subsequent modification by readers is not
500 Transparent. A copy that is not "Transparent" is called "Opaque".
502 Examples of suitable formats for Transparent copies include plain
503 ASCII without markup, Texinfo input format, LaTeX input format,
504 SGML or XML using a publicly available DTD, and
505 standard-conforming simple HTML designed for human modification.
506 Opaque formats include PostScript, PDF, proprietary formats that
507 can be read and edited only by proprietary word processors, SGML
508 or XML for which the DTD and/or processing tools are not generally
509 available, and the machine-generated HTML produced by some word
510 processors for output purposes only.
512 The "Title Page" means, for a printed book, the title page itself,
513 plus such following pages as are needed to hold, legibly, the
514 material this License requires to appear in the title page. For
515 works in formats which do not have any title page as such, "Title
516 Page" means the text near the most prominent appearance of the
517 work's title, preceding the beginning of the body of the text.
521 You may copy and distribute the Document in any medium, either
522 commercially or noncommercially, provided that this License, the
523 copyright notices, and the license notice saying this License
524 applies to the Document are reproduced in all copies, and that you
525 add no other conditions whatsoever to those of this License. You
526 may not use technical measures to obstruct or control the reading
527 or further copying of the copies you make or distribute. However,
528 you may accept compensation in exchange for copies. If you
529 distribute a large enough number of copies you must also follow
530 the conditions in section 3.
532 You may also lend copies, under the same conditions stated above,
533 and you may publicly display copies.
535 3. COPYING IN QUANTITY
537 If you publish printed copies of the Document numbering more than
538 100, and the Document's license notice requires Cover Texts, you
539 must enclose the copies in covers that carry, clearly and legibly,
540 all these Cover Texts: Front-Cover Texts on the front cover, and
541 Back-Cover Texts on the back cover. Both covers must also clearly
542 and legibly identify you as the publisher of these copies. The
543 front cover must present the full title with all words of the
544 title equally prominent and visible. You may add other material
545 on the covers in addition. Copying with changes limited to the
546 covers, as long as they preserve the title of the Document and
547 satisfy these conditions, can be treated as verbatim copying in
550 If the required texts for either cover are too voluminous to fit
551 legibly, you should put the first ones listed (as many as fit
552 reasonably) on the actual cover, and continue the rest onto
555 If you publish or distribute Opaque copies of the Document
556 numbering more than 100, you must either include a
557 machine-readable Transparent copy along with each Opaque copy, or
558 state in or with each Opaque copy a publicly-accessible
559 computer-network location containing a complete Transparent copy
560 of the Document, free of added material, which the general
561 network-using public has access to download anonymously at no
562 charge using public-standard network protocols. If you use the
563 latter option, you must take reasonably prudent steps, when you
564 begin distribution of Opaque copies in quantity, to ensure that
565 this Transparent copy will remain thus accessible at the stated
566 location until at least one year after the last time you
567 distribute an Opaque copy (directly or through your agents or
568 retailers) of that edition to the public.
570 It is requested, but not required, that you contact the authors of
571 the Document well before redistributing any large number of
572 copies, to give them a chance to provide you with an updated
573 version of the Document.
577 You may copy and distribute a Modified Version of the Document
578 under the conditions of sections 2 and 3 above, provided that you
579 release the Modified Version under precisely this License, with
580 the Modified Version filling the role of the Document, thus
581 licensing distribution and modification of the Modified Version to
582 whoever possesses a copy of it. In addition, you must do these
583 things in the Modified Version:
585 A. Use in the Title Page (and on the covers, if any) a title
586 distinct from that of the Document, and from those of
587 previous versions (which should, if there were any, be listed
588 in the History section of the Document). You may use the
589 same title as a previous version if the original publisher of
590 that version gives permission.
592 B. List on the Title Page, as authors, one or more persons or
593 entities responsible for authorship of the modifications in
594 the Modified Version, together with at least five of the
595 principal authors of the Document (all of its principal
596 authors, if it has less than five).
598 C. State on the Title page the name of the publisher of the
599 Modified Version, as the publisher.
601 D. Preserve all the copyright notices of the Document.
603 E. Add an appropriate copyright notice for your modifications
604 adjacent to the other copyright notices.
606 F. Include, immediately after the copyright notices, a license
607 notice giving the public permission to use the Modified
608 Version under the terms of this License, in the form shown in
611 G. Preserve in that license notice the full lists of Invariant
612 Sections and required Cover Texts given in the Document's
615 H. Include an unaltered copy of this License.
617 I. Preserve the section entitled "History", and its title, and
618 add to it an item stating at least the title, year, new
619 authors, and publisher of the Modified Version as given on
620 the Title Page. If there is no section entitled "History" in
621 the Document, create one stating the title, year, authors,
622 and publisher of the Document as given on its Title Page,
623 then add an item describing the Modified Version as stated in
624 the previous sentence.
626 J. Preserve the network location, if any, given in the Document
627 for public access to a Transparent copy of the Document, and
628 likewise the network locations given in the Document for
629 previous versions it was based on. These may be placed in
630 the "History" section. You may omit a network location for a
631 work that was published at least four years before the
632 Document itself, or if the original publisher of the version
633 it refers to gives permission.
635 K. In any section entitled "Acknowledgments" or "Dedications",
636 preserve the section's title, and preserve in the section all
637 the substance and tone of each of the contributor
638 acknowledgments and/or dedications given therein.
640 L. Preserve all the Invariant Sections of the Document,
641 unaltered in their text and in their titles. Section numbers
642 or the equivalent are not considered part of the section
645 M. Delete any section entitled "Endorsements". Such a section
646 may not be included in the Modified Version.
648 N. Do not retitle any existing section as "Endorsements" or to
649 conflict in title with any Invariant Section.
651 If the Modified Version includes new front-matter sections or
652 appendices that qualify as Secondary Sections and contain no
653 material copied from the Document, you may at your option
654 designate some or all of these sections as invariant. To do this,
655 add their titles to the list of Invariant Sections in the Modified
656 Version's license notice. These titles must be distinct from any
657 other section titles.
659 You may add a section entitled "Endorsements", provided it contains
660 nothing but endorsements of your Modified Version by various
661 parties--for example, statements of peer review or that the text
662 has been approved by an organization as the authoritative
663 definition of a standard.
665 You may add a passage of up to five words as a Front-Cover Text,
666 and a passage of up to 25 words as a Back-Cover Text, to the end
667 of the list of Cover Texts in the Modified Version. Only one
668 passage of Front-Cover Text and one of Back-Cover Text may be
669 added by (or through arrangements made by) any one entity. If the
670 Document already includes a cover text for the same cover,
671 previously added by you or by arrangement made by the same entity
672 you are acting on behalf of, you may not add another; but you may
673 replace the old one, on explicit permission from the previous
674 publisher that added the old one.
676 The author(s) and publisher(s) of the Document do not by this
677 License give permission to use their names for publicity for or to
678 assert or imply endorsement of any Modified Version.
680 5. COMBINING DOCUMENTS
682 You may combine the Document with other documents released under
683 this License, under the terms defined in section 4 above for
684 modified versions, provided that you include in the combination
685 all of the Invariant Sections of all of the original documents,
686 unmodified, and list them all as Invariant Sections of your
687 combined work in its license notice.
689 The combined work need only contain one copy of this License, and
690 multiple identical Invariant Sections may be replaced with a single
691 copy. If there are multiple Invariant Sections with the same name
692 but different contents, make the title of each such section unique
693 by adding at the end of it, in parentheses, the name of the
694 original author or publisher of that section if known, or else a
695 unique number. Make the same adjustment to the section titles in
696 the list of Invariant Sections in the license notice of the
699 In the combination, you must combine any sections entitled
700 "History" in the various original documents, forming one section
701 entitled "History"; likewise combine any sections entitled
702 "Acknowledgments", and any sections entitled "Dedications". You
703 must delete all sections entitled "Endorsements."
705 6. COLLECTIONS OF DOCUMENTS
707 You may make a collection consisting of the Document and other
708 documents released under this License, and replace the individual
709 copies of this License in the various documents with a single copy
710 that is included in the collection, provided that you follow the
711 rules of this License for verbatim copying of each of the
712 documents in all other respects.
714 You may extract a single document from such a collection, and
715 distribute it individually under this License, provided you insert
716 a copy of this License into the extracted document, and follow
717 this License in all other respects regarding verbatim copying of
720 7. AGGREGATION WITH INDEPENDENT WORKS
722 A compilation of the Document or its derivatives with other
723 separate and independent documents or works, in or on a volume of
724 a storage or distribution medium, does not as a whole count as a
725 Modified Version of the Document, provided no compilation
726 copyright is claimed for the compilation. Such a compilation is
727 called an "aggregate", and this License does not apply to the
728 other self-contained works thus compiled with the Document, on
729 account of their being thus compiled, if they are not themselves
730 derivative works of the Document.
732 If the Cover Text requirement of section 3 is applicable to these
733 copies of the Document, then if the Document is less than one
734 quarter of the entire aggregate, the Document's Cover Texts may be
735 placed on covers that surround only the Document within the
736 aggregate. Otherwise they must appear on covers around the whole
741 Translation is considered a kind of modification, so you may
742 distribute translations of the Document under the terms of section
743 4. Replacing Invariant Sections with translations requires special
744 permission from their copyright holders, but you may include
745 translations of some or all Invariant Sections in addition to the
746 original versions of these Invariant Sections. You may include a
747 translation of this License provided that you also include the
748 original English version of this License. In case of a
749 disagreement between the translation and the original English
750 version of this License, the original English version will prevail.
754 You may not copy, modify, sublicense, or distribute the Document
755 except as expressly provided for under this License. Any other
756 attempt to copy, modify, sublicense or distribute the Document is
757 void, and will automatically terminate your rights under this
758 License. However, parties who have received copies, or rights,
759 from you under this License will not have their licenses
760 terminated so long as such parties remain in full compliance.
762 10. FUTURE REVISIONS OF THIS LICENSE
764 The Free Software Foundation may publish new, revised versions of
765 the GNU Free Documentation License from time to time. Such new
766 versions will be similar in spirit to the present version, but may
767 differ in detail to address new problems or concerns. See
768 `http://www.gnu.org/copyleft/'.
770 Each version of the License is given a distinguishing version
771 number. If the Document specifies that a particular numbered
772 version of this License "or any later version" applies to it, you
773 have the option of following the terms and conditions either of
774 that specified version or of any later version that has been
775 published (not as a draft) by the Free Software Foundation. If
776 the Document does not specify a version number of this License,
777 you may choose any version ever published (not as a draft) by the
778 Free Software Foundation.
780 ADDENDUM: How to use this License for your documents
781 ----------------------------------------------------
783 To use this License in a document you have written, include a copy of
784 the License in the document and put the following copyright and license
785 notices just after the title page:
787 Copyright (C) YEAR YOUR NAME.
788 Permission is granted to copy, distribute and/or modify this document
789 under the terms of the GNU Free Documentation License, Version 1.1
790 or any later version published by the Free Software Foundation;
791 with the Invariant Sections being LIST THEIR TITLES, with the
792 Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
793 A copy of the license is included in the section entitled ``GNU
794 Free Documentation License''.
796 If you have no Invariant Sections, write "with no Invariant Sections"
797 instead of saying which ones are invariant. If you have no Front-Cover
798 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
799 LIST"; likewise for Back-Cover Texts.
801 If your document contains nontrivial examples of program code, we
802 recommend releasing these examples in parallel under your choice of
803 free software license, such as the GNU General Public License, to
804 permit their use in free software.
807 File: bison.info, Node: Index, Prev: Copying This Manual, Up: Top
816 * %expect: Expect Decl.
817 * %left: Using Precedence.
818 * %nonassoc: Using Precedence.
819 * %prec: Contextual Precedence.
820 * %pure_parser: Pure Decl.
821 * %right: Using Precedence.
822 * %start: Start Decl.
823 * %token: Token Decl.
825 * %union: Union Decl.
826 * @$ <1>: Actions and Locations.
827 * @$: Action Features.
828 * @N <1>: Actions and Locations.
829 * @N: Action Features.
831 * action data types: Action Types.
832 * action features summary: Action Features.
833 * actions in mid-rule: Mid-Rule Actions.
834 * actions, location: Actions and Locations.
835 * actions, semantic: Semantic Actions.
836 * additional C code section: Epilogue.
837 * algorithm of parser: Algorithm.
838 * associativity: Why Precedence.
839 * Backus-Naur form: Language and Grammar.
840 * Bison declaration summary: Decl Summary.
841 * Bison declarations: Declarations.
842 * Bison declarations (introduction): Bison Declarations.
843 * Bison grammar: Grammar in Bison.
844 * Bison invocation: Invocation.
845 * Bison parser: Bison Parser.
846 * Bison parser algorithm: Algorithm.
847 * Bison symbols, table of: Table of Symbols.
848 * Bison utility: Bison Parser.
849 * BISON_HAIRY: Environment Variables.
850 * BISON_SIMPLE: Environment Variables.
851 * BNF: Language and Grammar.
852 * C code, section for additional: Epilogue.
853 * C-language interface: Interface.
855 * calculator, infix notation: Infix Calc.
856 * calculator, multi-function: Multi-function Calc.
857 * calculator, simple: RPN Calc.
858 * character token: Symbols.
859 * compiling the parser: Rpcalc Compile.
860 * conflicts: Shift/Reduce.
861 * conflicts, reduce/reduce: Reduce/Reduce.
862 * conflicts, suppressing warnings of: Expect Decl.
863 * context-dependent precedence: Contextual Precedence.
864 * context-free grammar: Language and Grammar.
865 * controlling function: Rpcalc Main.
866 * dangling else: Shift/Reduce.
867 * data type of locations: Location Type.
868 * data types in actions: Action Types.
869 * data types of semantic values: Value Type.
870 * debugging: Debugging.
871 * declaration summary: Decl Summary.
872 * declarations: Prologue.
873 * declarations section: Prologue.
874 * declarations, Bison: Declarations.
875 * declarations, Bison (introduction): Bison Declarations.
876 * declaring literal string tokens: Token Decl.
877 * declaring operator precedence: Precedence Decl.
878 * declaring the start symbol: Start Decl.
879 * declaring token type names: Token Decl.
880 * declaring value types: Union Decl.
881 * declaring value types, nonterminals: Type Decl.
882 * default action: Actions.
883 * default data type: Value Type.
884 * default location type: Location Type.
885 * default stack limit: Stack Overflow.
886 * default start symbol: Start Decl.
887 * defining language semantics: Semantics.
888 * else, dangling: Shift/Reduce.
889 * environment variables: Environment Variables.
890 * epilogue: Epilogue.
891 * error: Error Recovery.
892 * error recovery: Error Recovery.
893 * error recovery, simple: Simple Error Recovery.
894 * error reporting function: Error Reporting.
895 * error reporting routine: Rpcalc Error.
896 * examples, simple: Examples.
897 * exercises: Exercises.
898 * FDL, GNU Free Documentation License: GNU Free Documentation License.
899 * file format: Grammar Layout.
900 * finite-state machine: Parser States.
901 * formal grammar: Grammar in Bison.
902 * format of grammar file: Grammar Layout.
903 * glossary: Glossary.
904 * grammar file: Grammar Layout.
905 * grammar rule syntax: Rules.
906 * grammar rules section: Grammar Rules.
907 * grammar, Bison: Grammar in Bison.
908 * grammar, context-free: Language and Grammar.
909 * grouping, syntactic: Language and Grammar.
910 * infix notation calculator: Infix Calc.
911 * interface: Interface.
912 * introduction: Introduction.
913 * invoking Bison: Invocation.
914 * invoking Bison under VMS: VMS Invocation.
915 * LALR(1): Mystery Conflicts.
916 * language semantics, defining: Semantics.
917 * layout of Bison grammar: Grammar Layout.
918 * left recursion: Recursion.
919 * lexical analyzer: Lexical.
920 * lexical analyzer, purpose: Bison Parser.
921 * lexical analyzer, writing: Rpcalc Lexer.
922 * lexical tie-in: Lexical Tie-ins.
923 * literal string token: Symbols.
924 * literal token: Symbols.
925 * location <1>: Locations.
926 * location: Locations Overview.
927 * location actions: Actions and Locations.
928 * look-ahead token: Look-Ahead.
929 * LR(1): Mystery Conflicts.
930 * main function in simple example: Rpcalc Main.
931 * mfcalc: Multi-function Calc.
932 * mid-rule actions: Mid-Rule Actions.
933 * multi-function calculator: Multi-function Calc.
934 * multicharacter literal: Symbols.
935 * mutual recursion: Recursion.
936 * nonterminal symbol: Symbols.
937 * operator precedence: Precedence.
938 * operator precedence, declaring: Precedence Decl.
939 * options for invoking Bison: Invocation.
940 * overflow of parser stack: Stack Overflow.
941 * parse error: Error Reporting.
942 * parser: Bison Parser.
943 * parser stack: Algorithm.
944 * parser stack overflow: Stack Overflow.
945 * parser state: Parser States.
946 * polish notation calculator: RPN Calc.
947 * position, textual <1>: Locations Overview.
948 * position, textual: Locations.
949 * precedence declarations: Precedence Decl.
950 * precedence of operators: Precedence.
951 * precedence, context-dependent: Contextual Precedence.
952 * precedence, unary operator: Contextual Precedence.
953 * preventing warnings about conflicts: Expect Decl.
954 * Prologue: Prologue.
955 * pure parser: Pure Decl.
956 * recovery from errors: Error Recovery.
957 * recursive rule: Recursion.
958 * reduce/reduce conflict: Reduce/Reduce.
959 * reduction: Algorithm.
960 * reentrant parser: Pure Decl.
961 * reverse polish notation: RPN Calc.
962 * right recursion: Recursion.
964 * rule syntax: Rules.
965 * rules section for grammar: Grammar Rules.
966 * running Bison (introduction): Rpcalc Gen.
967 * semantic actions: Semantic Actions.
968 * semantic value: Semantic Values.
969 * semantic value type: Value Type.
970 * shift/reduce conflicts: Shift/Reduce.
971 * shifting: Algorithm.
972 * simple examples: Examples.
973 * single-character literal: Symbols.
974 * stack overflow: Stack Overflow.
975 * stack, parser: Algorithm.
976 * stages in using Bison: Stages.
977 * start symbol: Language and Grammar.
978 * start symbol, declaring: Start Decl.
979 * state (of parser): Parser States.
980 * string token: Symbols.
981 * summary, action features: Action Features.
982 * summary, Bison declaration: Decl Summary.
983 * suppressing conflict warnings: Expect Decl.
985 * symbol table example: Mfcalc Symtab.
986 * symbols (abstract): Language and Grammar.
987 * symbols in Bison, table of: Table of Symbols.
988 * syntactic grouping: Language and Grammar.
989 * syntax error: Error Reporting.
990 * syntax of grammar rules: Rules.
991 * terminal symbol: Symbols.
992 * textual position <1>: Locations.
993 * textual position: Locations Overview.
994 * token: Language and Grammar.
995 * token type: Symbols.
996 * token type names, declaring: Token Decl.
997 * tracing the parser: Debugging.
998 * unary operator precedence: Contextual Precedence.
999 * using Bison: Stages.
1000 * value type, semantic: Value Type.
1001 * value types, declaring: Union Decl.
1002 * value types, nonterminals, declaring: Type Decl.
1003 * value, semantic: Semantic Values.
1004 * VMS: VMS Invocation.
1005 * warnings, preventing: Expect Decl.
1006 * writing a lexical analyzer: Rpcalc Lexer.
1007 * YYABORT: Parser Function.
1008 * YYACCEPT: Parser Function.
1009 * YYBACKUP: Action Features.
1010 * yychar: Look-Ahead.
1011 * yyclearin: Error Recovery.
1012 * YYDEBUG: Debugging.
1013 * yydebug: Debugging.
1014 * YYEMPTY: Action Features.
1015 * yyerrok: Error Recovery.
1016 * YYERROR: Action Features.
1017 * yyerror: Error Reporting.
1018 * YYERROR_VERBOSE: Error Reporting.
1019 * YYINITDEPTH: Stack Overflow.
1021 * YYLEX_PARAM: Pure Calling.
1022 * yylloc: Token Positions.
1023 * YYLLOC_DEFAULT: Location Default Action.
1024 * YYLTYPE: Token Positions.
1025 * yylval: Token Values.
1026 * YYMAXDEPTH: Stack Overflow.
1027 * yynerrs: Error Reporting.
1028 * yyparse: Parser Function.
1029 * YYPARSE_PARAM: Pure Calling.
1030 * YYPRINT: Debugging.
1031 * YYRECOVERING: Error Recovery.