]> git.saurik.com Git - bison.git/blob - doc/bison.info-5
Regen.
[bison.git] / doc / bison.info-5
1 Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
2 à partir bison.texinfo.
3
4 START-INFO-DIR-ENTRY
5 * bison: (bison). GNU Project parser generator (yacc replacement).
6 END-INFO-DIR-ENTRY
7
8 This file documents the Bison parser generator.
9
10 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998, 1999,
11 2000, 2001 Free Software Foundation, Inc.
12
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.
16
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.
23
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.
30
31 \1f
32 File: bison.info, Node: Table of Symbols, Next: Glossary, Prev: Invocation, Up: Top
33
34 Bison Symbols
35 *************
36
37 `error'
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::.
46
47 `YYABORT'
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.
52
53 `YYACCEPT'
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.
57
58 `YYBACKUP'
59 Macro to discard a value from the parser stack and fake a
60 look-ahead token. *Note Special Features for Use in Actions:
61 Action Features.
62
63 `YYERROR'
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::.
68
69 `YYERROR_VERBOSE'
70 Macro that you define with `#define' in the Bison declarations
71 section to request verbose, specific error message strings when
72 `yyerror' is called.
73
74 `YYINITDEPTH'
75 Macro for specifying the initial size of the parser stack. *Note
76 Stack Overflow::.
77
78 `YYLEX_PARAM'
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.
82
83 `YYLTYPE'
84 Macro for the data type of `yylloc'; a structure with four
85 members. *Note Data Types of Locations: Location Type.
86
87 `yyltype'
88 Default value for YYLTYPE.
89
90 `YYMAXDEPTH'
91 Macro for specifying the maximum size of the parser stack. *Note
92 Stack Overflow::.
93
94 `YYPARSE_PARAM'
95 Macro for specifying the name of a parameter that `yyparse' should
96 accept. *Note Calling Conventions for Pure Parsers: Pure Calling.
97
98 `YYRECOVERING'
99 Macro whose value indicates whether the parser is recovering from a
100 syntax error. *Note Special Features for Use in Actions: Action
101 Features.
102
103 `YYSTACK_USE_ALLOCA'
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
107 else.
108
109 `YYSTYPE'
110 Macro for the data type of semantic values; `int' by default.
111 *Note Data Types of Semantic Values: Value Type.
112
113 `yychar'
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:
118 Action Features.
119
120 `yyclearin'
121 Macro used in error-recovery rule actions. It clears the previous
122 look-ahead token. *Note Error Recovery::.
123
124 `yydebug'
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.
128
129 `yyerrok'
130 Macro to cause parser to recover immediately to its normal mode
131 after a parse error. *Note Error Recovery::.
132
133 `yyerror'
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.
138
139 `yylex'
140 User-supplied lexical analyzer function, called with no arguments
141 to get the next token. *Note The Lexical Analyzer Function
142 `yylex': Lexical.
143
144 `yylval'
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.
149
150 `yylloc'
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
156 Positions.
157
158 `yynerrs'
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
162 Reporting.
163
164 `yyparse'
165 The parser function produced by Bison; call this function to start
166 parsing. *Note The Parser Function `yyparse': Parser Function.
167
168 `%debug'
169 Equip the parser for debugging. *Note Decl Summary::.
170
171 `%defines'
172 Bison declaration to create a header file meant for the scanner.
173 *Note Decl Summary::.
174
175 `%left'
176 Bison declaration to assign left associativity to token(s). *Note
177 Operator Precedence: Precedence Decl.
178
179 `%no_lines'
180 Bison declaration to avoid generating `#line' directives in the
181 parser file. *Note Decl Summary::.
182
183 `%nonassoc'
184 Bison declaration to assign non-associativity to token(s). *Note
185 Operator Precedence: Precedence Decl.
186
187 `%prec'
188 Bison declaration to assign a precedence to a specific rule.
189 *Note Context-Dependent Precedence: Contextual Precedence.
190
191 `%pure_parser'
192 Bison declaration to request a pure (reentrant) parser. *Note A
193 Pure (Reentrant) Parser: Pure Decl.
194
195 `%right'
196 Bison declaration to assign right associativity to token(s).
197 *Note Operator Precedence: Precedence Decl.
198
199 `%start'
200 Bison declaration to specify the start symbol. *Note The
201 Start-Symbol: Start Decl.
202
203 `%token'
204 Bison declaration to declare token(s) without specifying
205 precedence. *Note Token Type Names: Token Decl.
206
207 `%token_table'
208 Bison declaration to include a token name table in the parser file.
209 *Note Decl Summary::.
210
211 `%type'
212 Bison declaration to declare nonterminals. *Note Nonterminal
213 Symbols: Type Decl.
214
215 `%union'
216 Bison declaration to specify several possible data types for
217 semantic values. *Note The Collection of Value Types: Union Decl.
218
219 These are the punctuation and delimiters used in Bison input:
220
221 `%%'
222 Delimiter used to separate the grammar rule section from the Bison
223 declarations section or the additional C code section. *Note The
224 Overall Layout of a Bison Grammar: Grammar Layout.
225
226 `%{ %}'
227 All code listed between `%{' and `%}' is copied directly to the
228 output file uninterpreted. Such code forms the "C declarations"
229 section of the input file. *Note Outline of a Bison Grammar:
230 Grammar Outline.
231
232 `/*...*/'
233 Comment delimiters, as in C.
234
235 `:'
236 Separates a rule's result from its components. *Note Syntax of
237 Grammar Rules: Rules.
238
239 `;'
240 Terminates a rule. *Note Syntax of Grammar Rules: Rules.
241
242 `|'
243 Separates alternate rules for the same result nonterminal. *Note
244 Syntax of Grammar Rules: Rules.
245
246 \1f
247 File: bison.info, Node: Glossary, Next: Copying This Manual, Prev: Table of Symbols, Up: Top
248
249 Glossary
250 ********
251
252 Backus-Naur Form (BNF)
253 Formal method of specifying context-free grammars. BNF was first
254 used in the `ALGOL-60' report, 1963. *Note Languages and
255 Context-Free Grammars: Language and Grammar.
256
257 Context-free grammars
258 Grammars specified as rules that can be applied regardless of
259 context. Thus, if there is a rule which says that an integer can
260 be used as an expression, integers are allowed _anywhere_ an
261 expression is permitted. *Note Languages and Context-Free
262 Grammars: Language and Grammar.
263
264 Dynamic allocation
265 Allocation of memory that occurs during execution, rather than at
266 compile time or on entry to a function.
267
268 Empty string
269 Analogous to the empty set in set theory, the empty string is a
270 character string of length zero.
271
272 Finite-state stack machine
273 A "machine" that has discrete states in which it is said to exist
274 at each instant in time. As input to the machine is processed, the
275 machine moves from state to state as specified by the logic of the
276 machine. In the case of the parser, the input is the language
277 being parsed, and the states correspond to various stages in the
278 grammar rules. *Note The Bison Parser Algorithm: Algorithm.
279
280 Grouping
281 A language construct that is (in general) grammatically divisible;
282 for example, `expression' or `declaration' in C. *Note Languages
283 and Context-Free Grammars: Language and Grammar.
284
285 Infix operator
286 An arithmetic operator that is placed between the operands on
287 which it performs some operation.
288
289 Input stream
290 A continuous flow of data between devices or programs.
291
292 Language construct
293 One of the typical usage schemas of the language. For example,
294 one of the constructs of the C language is the `if' statement.
295 *Note Languages and Context-Free Grammars: Language and Grammar.
296
297 Left associativity
298 Operators having left associativity are analyzed from left to
299 right: `a+b+c' first computes `a+b' and then combines with `c'.
300 *Note Operator Precedence: Precedence.
301
302 Left recursion
303 A rule whose result symbol is also its first component symbol; for
304 example, `expseq1 : expseq1 ',' exp;'. *Note Recursive Rules:
305 Recursion.
306
307 Left-to-right parsing
308 Parsing a sentence of a language by analyzing it token by token
309 from left to right. *Note The Bison Parser Algorithm: Algorithm.
310
311 Lexical analyzer (scanner)
312 A function that reads an input stream and returns tokens one by
313 one. *Note The Lexical Analyzer Function `yylex': Lexical.
314
315 Lexical tie-in
316 A flag, set by actions in the grammar rules, which alters the way
317 tokens are parsed. *Note Lexical Tie-ins::.
318
319 Literal string token
320 A token which consists of two or more fixed characters. *Note
321 Symbols::.
322
323 Look-ahead token
324 A token already read but not yet shifted. *Note Look-Ahead
325 Tokens: Look-Ahead.
326
327 LALR(1)
328 The class of context-free grammars that Bison (like most other
329 parser generators) can handle; a subset of LR(1). *Note
330 Mysterious Reduce/Reduce Conflicts: Mystery Conflicts.
331
332 LR(1)
333 The class of context-free grammars in which at most one token of
334 look-ahead is needed to disambiguate the parsing of any piece of
335 input.
336
337 Nonterminal symbol
338 A grammar symbol standing for a grammatical construct that can be
339 expressed through rules in terms of smaller constructs; in other
340 words, a construct that is not a token. *Note Symbols::.
341
342 Parse error
343 An error encountered during parsing of an input stream due to
344 invalid syntax. *Note Error Recovery::.
345
346 Parser
347 A function that recognizes valid sentences of a language by
348 analyzing the syntax structure of a set of tokens passed to it
349 from a lexical analyzer.
350
351 Postfix operator
352 An arithmetic operator that is placed after the operands upon
353 which it performs some operation.
354
355 Reduction
356 Replacing a string of nonterminals and/or terminals with a single
357 nonterminal, according to a grammar rule. *Note The Bison Parser
358 Algorithm: Algorithm.
359
360 Reentrant
361 A reentrant subprogram is a subprogram which can be in invoked any
362 number of times in parallel, without interference between the
363 various invocations. *Note A Pure (Reentrant) Parser: Pure Decl.
364
365 Reverse polish notation
366 A language in which all operators are postfix operators.
367
368 Right recursion
369 A rule whose result symbol is also its last component symbol; for
370 example, `expseq1: exp ',' expseq1;'. *Note Recursive Rules:
371 Recursion.
372
373 Semantics
374 In computer languages, the semantics are specified by the actions
375 taken for each instance of the language, i.e., the meaning of each
376 statement. *Note Defining Language Semantics: Semantics.
377
378 Shift
379 A parser is said to shift when it makes the choice of analyzing
380 further input from the stream rather than reducing immediately some
381 already-recognized rule. *Note The Bison Parser Algorithm:
382 Algorithm.
383
384 Single-character literal
385 A single character that is recognized and interpreted as is.
386 *Note From Formal Rules to Bison Input: Grammar in Bison.
387
388 Start symbol
389 The nonterminal symbol that stands for a complete valid utterance
390 in the language being parsed. The start symbol is usually listed
391 as the first nonterminal symbol in a language specification.
392 *Note The Start-Symbol: Start Decl.
393
394 Symbol table
395 A data structure where symbol names and associated data are stored
396 during parsing to allow for recognition and use of existing
397 information in repeated uses of a symbol. *Note Multi-function
398 Calc::.
399
400 Token
401 A basic, grammatically indivisible unit of a language. The symbol
402 that describes a token in the grammar is a terminal symbol. The
403 input of the Bison parser is a stream of tokens which comes from
404 the lexical analyzer. *Note Symbols::.
405
406 Terminal symbol
407 A grammar symbol that has no rules in the grammar and therefore is
408 grammatically indivisible. The piece of text it represents is a
409 token. *Note Languages and Context-Free Grammars: Language and
410 Grammar.
411
412 \1f
413 File: bison.info, Node: Copying This Manual, Next: Index, Prev: Glossary, Up: Top
414
415 Copying This Manual
416 *******************
417
418 * Menu:
419
420 * GNU Free Documentation License:: License for copying this manual.
421
422 \1f
423 File: bison.info, Node: GNU Free Documentation License, Up: Copying This Manual
424
425 GNU Free Documentation License
426 ==============================
427
428 Version 1.1, March 2000
429 Copyright (C) 2000 Free Software Foundation, Inc.
430 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
431
432 Everyone is permitted to copy and distribute verbatim copies
433 of this license document, but changing it is not allowed.
434
435 0. PREAMBLE
436
437 The purpose of this License is to make a manual, textbook, or other
438 written document "free" in the sense of freedom: to assure everyone
439 the effective freedom to copy and redistribute it, with or without
440 modifying it, either commercially or noncommercially. Secondarily,
441 this License preserves for the author and publisher a way to get
442 credit for their work, while not being considered responsible for
443 modifications made by others.
444
445 This License is a kind of "copyleft", which means that derivative
446 works of the document must themselves be free in the same sense.
447 It complements the GNU General Public License, which is a copyleft
448 license designed for free software.
449
450 We have designed this License in order to use it for manuals for
451 free software, because free software needs free documentation: a
452 free program should come with manuals providing the same freedoms
453 that the software does. But this License is not limited to
454 software manuals; it can be used for any textual work, regardless
455 of subject matter or whether it is published as a printed book.
456 We recommend this License principally for works whose purpose is
457 instruction or reference.
458
459 1. APPLICABILITY AND DEFINITIONS
460
461 This License applies to any manual or other work that contains a
462 notice placed by the copyright holder saying it can be distributed
463 under the terms of this License. The "Document", below, refers to
464 any such manual or work. Any member of the public is a licensee,
465 and is addressed as "you".
466
467 A "Modified Version" of the Document means any work containing the
468 Document or a portion of it, either copied verbatim, or with
469 modifications and/or translated into another language.
470
471 A "Secondary Section" is a named appendix or a front-matter
472 section of the Document that deals exclusively with the
473 relationship of the publishers or authors of the Document to the
474 Document's overall subject (or to related matters) and contains
475 nothing that could fall directly within that overall subject.
476 (For example, if the Document is in part a textbook of
477 mathematics, a Secondary Section may not explain any mathematics.)
478 The relationship could be a matter of historical connection with
479 the subject or with related matters, or of legal, commercial,
480 philosophical, ethical or political position regarding them.
481
482 The "Invariant Sections" are certain Secondary Sections whose
483 titles are designated, as being those of Invariant Sections, in
484 the notice that says that the Document is released under this
485 License.
486
487 The "Cover Texts" are certain short passages of text that are
488 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
489 that says that the Document is released under this License.
490
491 A "Transparent" copy of the Document means a machine-readable copy,
492 represented in a format whose specification is available to the
493 general public, whose contents can be viewed and edited directly
494 and straightforwardly with generic text editors or (for images
495 composed of pixels) generic paint programs or (for drawings) some
496 widely available drawing editor, and that is suitable for input to
497 text formatters or for automatic translation to a variety of
498 formats suitable for input to text formatters. A copy made in an
499 otherwise Transparent file format whose markup has been designed
500 to thwart or discourage subsequent modification by readers is not
501 Transparent. A copy that is not "Transparent" is called "Opaque".
502
503 Examples of suitable formats for Transparent copies include plain
504 ASCII without markup, Texinfo input format, LaTeX input format,
505 SGML or XML using a publicly available DTD, and
506 standard-conforming simple HTML designed for human modification.
507 Opaque formats include PostScript, PDF, proprietary formats that
508 can be read and edited only by proprietary word processors, SGML
509 or XML for which the DTD and/or processing tools are not generally
510 available, and the machine-generated HTML produced by some word
511 processors for output purposes only.
512
513 The "Title Page" means, for a printed book, the title page itself,
514 plus such following pages as are needed to hold, legibly, the
515 material this License requires to appear in the title page. For
516 works in formats which do not have any title page as such, "Title
517 Page" means the text near the most prominent appearance of the
518 work's title, preceding the beginning of the body of the text.
519
520 2. VERBATIM COPYING
521
522 You may copy and distribute the Document in any medium, either
523 commercially or noncommercially, provided that this License, the
524 copyright notices, and the license notice saying this License
525 applies to the Document are reproduced in all copies, and that you
526 add no other conditions whatsoever to those of this License. You
527 may not use technical measures to obstruct or control the reading
528 or further copying of the copies you make or distribute. However,
529 you may accept compensation in exchange for copies. If you
530 distribute a large enough number of copies you must also follow
531 the conditions in section 3.
532
533 You may also lend copies, under the same conditions stated above,
534 and you may publicly display copies.
535
536 3. COPYING IN QUANTITY
537
538 If you publish printed copies of the Document numbering more than
539 100, and the Document's license notice requires Cover Texts, you
540 must enclose the copies in covers that carry, clearly and legibly,
541 all these Cover Texts: Front-Cover Texts on the front cover, and
542 Back-Cover Texts on the back cover. Both covers must also clearly
543 and legibly identify you as the publisher of these copies. The
544 front cover must present the full title with all words of the
545 title equally prominent and visible. You may add other material
546 on the covers in addition. Copying with changes limited to the
547 covers, as long as they preserve the title of the Document and
548 satisfy these conditions, can be treated as verbatim copying in
549 other respects.
550
551 If the required texts for either cover are too voluminous to fit
552 legibly, you should put the first ones listed (as many as fit
553 reasonably) on the actual cover, and continue the rest onto
554 adjacent pages.
555
556 If you publish or distribute Opaque copies of the Document
557 numbering more than 100, you must either include a
558 machine-readable Transparent copy along with each Opaque copy, or
559 state in or with each Opaque copy a publicly-accessible
560 computer-network location containing a complete Transparent copy
561 of the Document, free of added material, which the general
562 network-using public has access to download anonymously at no
563 charge using public-standard network protocols. If you use the
564 latter option, you must take reasonably prudent steps, when you
565 begin distribution of Opaque copies in quantity, to ensure that
566 this Transparent copy will remain thus accessible at the stated
567 location until at least one year after the last time you
568 distribute an Opaque copy (directly or through your agents or
569 retailers) of that edition to the public.
570
571 It is requested, but not required, that you contact the authors of
572 the Document well before redistributing any large number of
573 copies, to give them a chance to provide you with an updated
574 version of the Document.
575
576 4. MODIFICATIONS
577
578 You may copy and distribute a Modified Version of the Document
579 under the conditions of sections 2 and 3 above, provided that you
580 release the Modified Version under precisely this License, with
581 the Modified Version filling the role of the Document, thus
582 licensing distribution and modification of the Modified Version to
583 whoever possesses a copy of it. In addition, you must do these
584 things in the Modified Version:
585
586 A. Use in the Title Page (and on the covers, if any) a title
587 distinct from that of the Document, and from those of
588 previous versions (which should, if there were any, be listed
589 in the History section of the Document). You may use the
590 same title as a previous version if the original publisher of
591 that version gives permission.
592
593 B. List on the Title Page, as authors, one or more persons or
594 entities responsible for authorship of the modifications in
595 the Modified Version, together with at least five of the
596 principal authors of the Document (all of its principal
597 authors, if it has less than five).
598
599 C. State on the Title page the name of the publisher of the
600 Modified Version, as the publisher.
601
602 D. Preserve all the copyright notices of the Document.
603
604 E. Add an appropriate copyright notice for your modifications
605 adjacent to the other copyright notices.
606
607 F. Include, immediately after the copyright notices, a license
608 notice giving the public permission to use the Modified
609 Version under the terms of this License, in the form shown in
610 the Addendum below.
611
612 G. Preserve in that license notice the full lists of Invariant
613 Sections and required Cover Texts given in the Document's
614 license notice.
615
616 H. Include an unaltered copy of this License.
617
618 I. Preserve the section entitled "History", and its title, and
619 add to it an item stating at least the title, year, new
620 authors, and publisher of the Modified Version as given on
621 the Title Page. If there is no section entitled "History" in
622 the Document, create one stating the title, year, authors,
623 and publisher of the Document as given on its Title Page,
624 then add an item describing the Modified Version as stated in
625 the previous sentence.
626
627 J. Preserve the network location, if any, given in the Document
628 for public access to a Transparent copy of the Document, and
629 likewise the network locations given in the Document for
630 previous versions it was based on. These may be placed in
631 the "History" section. You may omit a network location for a
632 work that was published at least four years before the
633 Document itself, or if the original publisher of the version
634 it refers to gives permission.
635
636 K. In any section entitled "Acknowledgments" or "Dedications",
637 preserve the section's title, and preserve in the section all
638 the substance and tone of each of the contributor
639 acknowledgments and/or dedications given therein.
640
641 L. Preserve all the Invariant Sections of the Document,
642 unaltered in their text and in their titles. Section numbers
643 or the equivalent are not considered part of the section
644 titles.
645
646 M. Delete any section entitled "Endorsements". Such a section
647 may not be included in the Modified Version.
648
649 N. Do not retitle any existing section as "Endorsements" or to
650 conflict in title with any Invariant Section.
651
652 If the Modified Version includes new front-matter sections or
653 appendices that qualify as Secondary Sections and contain no
654 material copied from the Document, you may at your option
655 designate some or all of these sections as invariant. To do this,
656 add their titles to the list of Invariant Sections in the Modified
657 Version's license notice. These titles must be distinct from any
658 other section titles.
659
660 You may add a section entitled "Endorsements", provided it contains
661 nothing but endorsements of your Modified Version by various
662 parties--for example, statements of peer review or that the text
663 has been approved by an organization as the authoritative
664 definition of a standard.
665
666 You may add a passage of up to five words as a Front-Cover Text,
667 and a passage of up to 25 words as a Back-Cover Text, to the end
668 of the list of Cover Texts in the Modified Version. Only one
669 passage of Front-Cover Text and one of Back-Cover Text may be
670 added by (or through arrangements made by) any one entity. If the
671 Document already includes a cover text for the same cover,
672 previously added by you or by arrangement made by the same entity
673 you are acting on behalf of, you may not add another; but you may
674 replace the old one, on explicit permission from the previous
675 publisher that added the old one.
676
677 The author(s) and publisher(s) of the Document do not by this
678 License give permission to use their names for publicity for or to
679 assert or imply endorsement of any Modified Version.
680
681 5. COMBINING DOCUMENTS
682
683 You may combine the Document with other documents released under
684 this License, under the terms defined in section 4 above for
685 modified versions, provided that you include in the combination
686 all of the Invariant Sections of all of the original documents,
687 unmodified, and list them all as Invariant Sections of your
688 combined work in its license notice.
689
690 The combined work need only contain one copy of this License, and
691 multiple identical Invariant Sections may be replaced with a single
692 copy. If there are multiple Invariant Sections with the same name
693 but different contents, make the title of each such section unique
694 by adding at the end of it, in parentheses, the name of the
695 original author or publisher of that section if known, or else a
696 unique number. Make the same adjustment to the section titles in
697 the list of Invariant Sections in the license notice of the
698 combined work.
699
700 In the combination, you must combine any sections entitled
701 "History" in the various original documents, forming one section
702 entitled "History"; likewise combine any sections entitled
703 "Acknowledgments", and any sections entitled "Dedications". You
704 must delete all sections entitled "Endorsements."
705
706 6. COLLECTIONS OF DOCUMENTS
707
708 You may make a collection consisting of the Document and other
709 documents released under this License, and replace the individual
710 copies of this License in the various documents with a single copy
711 that is included in the collection, provided that you follow the
712 rules of this License for verbatim copying of each of the
713 documents in all other respects.
714
715 You may extract a single document from such a collection, and
716 distribute it individually under this License, provided you insert
717 a copy of this License into the extracted document, and follow
718 this License in all other respects regarding verbatim copying of
719 that document.
720
721 7. AGGREGATION WITH INDEPENDENT WORKS
722
723 A compilation of the Document or its derivatives with other
724 separate and independent documents or works, in or on a volume of
725 a storage or distribution medium, does not as a whole count as a
726 Modified Version of the Document, provided no compilation
727 copyright is claimed for the compilation. Such a compilation is
728 called an "aggregate", and this License does not apply to the
729 other self-contained works thus compiled with the Document, on
730 account of their being thus compiled, if they are not themselves
731 derivative works of the Document.
732
733 If the Cover Text requirement of section 3 is applicable to these
734 copies of the Document, then if the Document is less than one
735 quarter of the entire aggregate, the Document's Cover Texts may be
736 placed on covers that surround only the Document within the
737 aggregate. Otherwise they must appear on covers around the whole
738 aggregate.
739
740 8. TRANSLATION
741
742 Translation is considered a kind of modification, so you may
743 distribute translations of the Document under the terms of section
744 4. Replacing Invariant Sections with translations requires special
745 permission from their copyright holders, but you may include
746 translations of some or all Invariant Sections in addition to the
747 original versions of these Invariant Sections. You may include a
748 translation of this License provided that you also include the
749 original English version of this License. In case of a
750 disagreement between the translation and the original English
751 version of this License, the original English version will prevail.
752
753 9. TERMINATION
754
755 You may not copy, modify, sublicense, or distribute the Document
756 except as expressly provided for under this License. Any other
757 attempt to copy, modify, sublicense or distribute the Document is
758 void, and will automatically terminate your rights under this
759 License. However, parties who have received copies, or rights,
760 from you under this License will not have their licenses
761 terminated so long as such parties remain in full compliance.
762
763 10. FUTURE REVISIONS OF THIS LICENSE
764
765 The Free Software Foundation may publish new, revised versions of
766 the GNU Free Documentation License from time to time. Such new
767 versions will be similar in spirit to the present version, but may
768 differ in detail to address new problems or concerns. See
769 `http://www.gnu.org/copyleft/'.
770
771 Each version of the License is given a distinguishing version
772 number. If the Document specifies that a particular numbered
773 version of this License "or any later version" applies to it, you
774 have the option of following the terms and conditions either of
775 that specified version or of any later version that has been
776 published (not as a draft) by the Free Software Foundation. If
777 the Document does not specify a version number of this License,
778 you may choose any version ever published (not as a draft) by the
779 Free Software Foundation.
780
781 ADDENDUM: How to use this License for your documents
782 ----------------------------------------------------
783
784 To use this License in a document you have written, include a copy of
785 the License in the document and put the following copyright and license
786 notices just after the title page:
787
788 Copyright (C) YEAR YOUR NAME.
789 Permission is granted to copy, distribute and/or modify this document
790 under the terms of the GNU Free Documentation License, Version 1.1
791 or any later version published by the Free Software Foundation;
792 with the Invariant Sections being LIST THEIR TITLES, with the
793 Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
794 A copy of the license is included in the section entitled ``GNU
795 Free Documentation License''.
796
797 If you have no Invariant Sections, write "with no Invariant Sections"
798 instead of saying which ones are invariant. If you have no Front-Cover
799 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
800 LIST"; likewise for Back-Cover Texts.
801
802 If your document contains nontrivial examples of program code, we
803 recommend releasing these examples in parallel under your choice of
804 free software license, such as the GNU General Public License, to
805 permit their use in free software.
806
807 \1f
808 File: bison.info, Node: Index, Prev: Copying This Manual, Up: Top
809
810 Index
811 *****
812
813 * Menu:
814
815 * $$: Actions.
816 * $N: Actions.
817 * %expect: Expect Decl.
818 * %left: Using Precedence.
819 * %nonassoc: Using Precedence.
820 * %prec: Contextual Precedence.
821 * %pure_parser: Pure Decl.
822 * %right: Using Precedence.
823 * %start: Start Decl.
824 * %token: Token Decl.
825 * %type: Type Decl.
826 * %union: Union Decl.
827 * @$ <1>: Action Features.
828 * @$: Actions and Locations.
829 * @N <1>: Action Features.
830 * @N: Actions and Locations.
831 * action: Actions.
832 * action data types: Action Types.
833 * action features summary: Action Features.
834 * actions in mid-rule: Mid-Rule Actions.
835 * actions, location: Actions and Locations.
836 * actions, semantic: Semantic Actions.
837 * additional C code section: C Code.
838 * algorithm of parser: Algorithm.
839 * associativity: Why Precedence.
840 * Backus-Naur form: Language and Grammar.
841 * Bison declaration summary: Decl Summary.
842 * Bison declarations: Declarations.
843 * Bison declarations (introduction): Bison Declarations.
844 * Bison grammar: Grammar in Bison.
845 * Bison invocation: Invocation.
846 * Bison parser: Bison Parser.
847 * Bison parser algorithm: Algorithm.
848 * Bison symbols, table of: Table of Symbols.
849 * Bison utility: Bison Parser.
850 * BISON_HAIRY: Environment Variables.
851 * BISON_SIMPLE: Environment Variables.
852 * BNF: Language and Grammar.
853 * C code, section for additional: C Code.
854 * C declarations section: C Declarations.
855 * C-language interface: Interface.
856 * calc: Infix Calc.
857 * calculator, infix notation: Infix Calc.
858 * calculator, multi-function: Multi-function Calc.
859 * calculator, simple: RPN Calc.
860 * character token: Symbols.
861 * compiling the parser: Rpcalc Compile.
862 * conflicts: Shift/Reduce.
863 * conflicts, reduce/reduce: Reduce/Reduce.
864 * conflicts, suppressing warnings of: Expect Decl.
865 * context-dependent precedence: Contextual Precedence.
866 * context-free grammar: Language and Grammar.
867 * controlling function: Rpcalc Main.
868 * dangling else: Shift/Reduce.
869 * data type of locations: Location Type.
870 * data types in actions: Action Types.
871 * data types of semantic values: Value Type.
872 * debugging: Debugging.
873 * declaration summary: Decl Summary.
874 * declarations, Bison: Declarations.
875 * declarations, Bison (introduction): Bison Declarations.
876 * declarations, C: C Declarations.
877 * declaring literal string tokens: Token Decl.
878 * declaring operator precedence: Precedence Decl.
879 * declaring the start symbol: Start Decl.
880 * declaring token type names: Token Decl.
881 * declaring value types: Union Decl.
882 * declaring value types, nonterminals: Type Decl.
883 * default action: Actions.
884 * default data type: Value Type.
885 * default location type: Location Type.
886 * default stack limit: Stack Overflow.
887 * default start symbol: Start Decl.
888 * defining language semantics: Semantics.
889 * else, dangling: Shift/Reduce.
890 * environment variables: Environment Variables.
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.
948 * position, textual: Locations Overview.
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 * pure parser: Pure Decl.
955 * recovery from errors: Error Recovery.
956 * recursive rule: Recursion.
957 * reduce/reduce conflict: Reduce/Reduce.
958 * reduction: Algorithm.
959 * reentrant parser: Pure Decl.
960 * reverse polish notation: RPN Calc.
961 * right recursion: Recursion.
962 * rpcalc: RPN Calc.
963 * rule syntax: Rules.
964 * rules section for grammar: Grammar Rules.
965 * running Bison (introduction): Rpcalc Gen.
966 * semantic actions: Semantic Actions.
967 * semantic value: Semantic Values.
968 * semantic value type: Value Type.
969 * shift/reduce conflicts: Shift/Reduce.
970 * shifting: Algorithm.
971 * simple examples: Examples.
972 * single-character literal: Symbols.
973 * stack overflow: Stack Overflow.
974 * stack, parser: Algorithm.
975 * stages in using Bison: Stages.
976 * start symbol: Language and Grammar.
977 * start symbol, declaring: Start Decl.
978 * state (of parser): Parser States.
979 * string token: Symbols.
980 * summary, action features: Action Features.
981 * summary, Bison declaration: Decl Summary.
982 * suppressing conflict warnings: Expect Decl.
983 * symbol: Symbols.
984 * symbol table example: Mfcalc Symtab.
985 * symbols (abstract): Language and Grammar.
986 * symbols in Bison, table of: Table of Symbols.
987 * syntactic grouping: Language and Grammar.
988 * syntax error: Error Reporting.
989 * syntax of grammar rules: Rules.
990 * terminal symbol: Symbols.
991 * textual position <1>: Locations.
992 * textual position: Locations Overview.
993 * token: Language and Grammar.
994 * token type: Symbols.
995 * token type names, declaring: Token Decl.
996 * tracing the parser: Debugging.
997 * unary operator precedence: Contextual Precedence.
998 * using Bison: Stages.
999 * value type, semantic: Value Type.
1000 * value types, declaring: Union Decl.
1001 * value types, nonterminals, declaring: Type Decl.
1002 * value, semantic: Semantic Values.
1003 * VMS: VMS Invocation.
1004 * warnings, preventing: Expect Decl.
1005 * writing a lexical analyzer: Rpcalc Lexer.
1006 * YYABORT: Parser Function.
1007 * YYACCEPT: Parser Function.
1008 * YYBACKUP: Action Features.
1009 * yychar: Look-Ahead.
1010 * yyclearin: Error Recovery.
1011 * yydebug: Debugging.
1012 * YYDEBUG: Debugging.
1013 * YYEMPTY: Action Features.
1014 * yyerrok: Error Recovery.
1015 * YYERROR: Action Features.
1016 * yyerror: Error Reporting.
1017 * YYERROR_VERBOSE: Error Reporting.
1018 * YYINITDEPTH: Stack Overflow.
1019 * yylex: Lexical.
1020 * YYLEX_PARAM: Pure Calling.
1021 * yylloc: Token Positions.
1022 * YYLLOC_DEFAULT: Location Default Action.
1023 * YYLTYPE: Token Positions.
1024 * yylval: Token Values.
1025 * YYMAXDEPTH: Stack Overflow.
1026 * yynerrs: Error Reporting.
1027 * yyparse: Parser Function.
1028 * YYPARSE_PARAM: Pure Calling.
1029 * YYPRINT: Debugging.
1030 * YYRECOVERING: Error Recovery.
1031 * |: Rules.
1032
1033