[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
3.7 Bison Declarations
The Bison declarations section of a Bison grammar defines the symbols used in formulating the grammar and the data types of semantic values. See section Symbols, Terminal and Nonterminal.
All token type names (but not single-character literal tokens such as
'+'
and '*'
) must be declared. Nonterminal symbols must be
declared if you need to specify which data type to use for the semantic
value (see section More Than One Value Type).
The first rule in the grammar file also specifies the start symbol, by default. If you want some other symbol to be the start symbol, you must declare it explicitly (see section Languages and Context-Free Grammars).
3.7.1 Require a Version of Bison | Requiring a Bison version. | |
3.7.2 Token Type Names | Declaring terminal symbols. | |
3.7.3 Operator Precedence | Declaring terminals with precedence and associativity. | |
3.7.4 Nonterminal Symbols | Declaring the choice of type for a nonterminal symbol. | |
3.7.5 Performing Actions before Parsing | Code run before parsing starts. | |
3.7.6 Freeing Discarded Symbols | Declaring how symbols are freed. | |
3.7.7 Printing Semantic Values | Declaring how symbol values are displayed. | |
3.7.8 Suppressing Conflict Warnings | Suppressing warnings about parsing conflicts. | |
3.7.9 The Start-Symbol | Specifying the start symbol. | |
3.7.10 A Pure (Reentrant) Parser | Requesting a reentrant parser. | |
3.7.11 A Push Parser | Requesting a push parser. | |
3.7.12 Bison Declaration Summary | Table of all Bison declarations. | |
3.7.13 %define Summary | Defining variables to adjust Bison’s behavior. | |
3.7.14 %code Summary | Inserting code into the parser source. |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on December 1, 2013 using texi2html 5.0.