File: bison_14.html

package info (click to toggle)
bisonc%2B%2B 6.09.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,984 kB
  • sloc: cpp: 9,375; ansic: 1,505; fortran: 1,134; makefile: 1,062; sh: 526; yacc: 84; lex: 60
file content (278 lines) | stat: -rw-r--r-- 10,228 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                      "http://www.w3.org/TR/html40/loose.dtd">
<HTML>
<!-- Created on January, 28 2005 by texi2html 1.66 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<HEAD>
<TITLE>Bison 2.21.5: Glossary</TITLE>

<META NAME="description" CONTENT="Bison 2.21.5: Glossary">
<META NAME="keywords" CONTENT="Bison 2.21.5: Glossary">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.66">

</HEAD>

<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">

<A NAME="SEC91"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_13.html#SEC90"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_15.html#SEC92"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_13.html#SEC90"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_15.html#SEC92"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_15.html#SEC92">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> B. Glossary </H1>
<!--docid::SEC91::-->
<P>

</P>
<DL COMPACT>
<DT>Backus-Naur Form (BNF)
<DD>Formal method of specifying context-free grammars.  BNF was first used
in the <CITE>ALGOL-60</CITE> report, 1963.  See section <A HREF="bison_4.html#SEC7">Languages and Context-Free Grammars</A>.
<P>

</P>
<DT>Context-free grammars
<DD>Grammars specified as rules that can be applied regardless of context.
Thus, if there is a rule which says that an integer can be used as an
expression, integers are allowed <EM>anywhere</EM> an expression is
permitted.  See section <A HREF="bison_4.html#SEC7">Languages and Context-Free Grammars</A>.
<P>

</P>
<DT>Dynamic allocation
<DD>Allocation of memory that occurs during execution, rather than at
compile time or on entry to a function.
<P>

</P>
<DT>Empty string
<DD>Analogous to the empty set in set theory, the empty string is a
character string of length zero.
<P>

</P>
<DT>Finite-state stack machine
<DD>A &quot;machine&quot; that has discrete states in which it is said to exist at
each instant in time.  As input to the machine is processed, the
machine moves from state to state as specified by the logic of the
machine.  In the case of the parser, the input is the language being
parsed, and the states correspond to various stages in the grammar
rules.  See section <A HREF="bison_8.html#SEC67">The Bison Parser Algorithm </A>.
<P>

</P>
<DT>Grouping
<DD>A language construct that is (in general) grammatically divisible;
for example, `expression' or `declaration' in C.  
See section <A HREF="bison_4.html#SEC7">Languages and Context-Free Grammars</A>.
<P>

</P>
<DT>Infix operator
<DD>An arithmetic operator that is placed between the operands on which it
performs some operation.
<P>

</P>
<DT>Input stream
<DD>A continuous flow of data between devices or programs.
<P>

</P>
<DT>Language construct
<DD>One of the typical usage schemas of the language.  For example, one of
the constructs of the C language is the <CODE>if</CODE> statement.
See section <A HREF="bison_4.html#SEC7">Languages and Context-Free Grammars</A>.
<P>

</P>
<DT>Left associativity
<DD>Operators having left associativity are analyzed from left to right:
`<SAMP>a+b+c</SAMP>' first computes `<SAMP>a+b</SAMP>' and then combines with
`<SAMP>c</SAMP>'.  See section <A HREF="bison_8.html#SEC70">Operator Precedence</A>.
<P>

</P>
<DT>Left recursion
<DD>A rule whose result symbol is also its first component symbol;
for example, `<SAMP>expseq1 : expseq1 ',' exp;</SAMP>'.  See section <A HREF="bison_6.html#SEC41">Recursive Rules</A>.
<P>

</P>
<DT>Left-to-right parsing
<DD>Parsing a sentence of a language by analyzing it token by token from
left to right.  See section <A HREF="bison_8.html#SEC67">The Bison Parser Algorithm </A>.
<P>

</P>
<DT>Lexical analyzer (scanner)
<DD>A function that reads an input stream and returns tokens one by one.
See section <A HREF="bison_7.html#SEC60">The Lexical Analyzer Function <CODE>yylex</CODE></A>.
<P>

</P>
<DT>Lexical tie-in
<DD>A flag, set by actions in the grammar rules, which alters the way
tokens are parsed.  See section <A HREF="bison_10.html#SEC83">7.2 Lexical Tie-ins</A>.
<P>

</P>
<DT>Literal string token
<DD>A token which constists of two or more fixed characters.
See section <A HREF="bison_6.html#SEC39">3.2 Symbols, Terminal and Nonterminal</A>.
<P>

</P>
<DT>Look-ahead token
<DD>A token already read but not yet shifted.  See section <A HREF="bison_8.html#SEC68">Look-Ahead Tokens</A>.
<P>

</P>
<DT>LALR(1)
<DD>The class of context-free grammars that Bison (like most other parser
generators) can handle; a subset of LR(1).  See section <A HREF="bison_8.html#SEC78">Mysterious Reduce/Reduce Conflicts</A>.
<P>

</P>
<DT>LR(1)
<DD>The class of context-free grammars in which at most one token of
look-ahead is needed to disambiguate the parsing of any piece of input.
<P>

</P>
<DT>Nonterminal symbol
<DD>A grammar symbol standing for a grammatical construct that can
be expressed through rules in terms of smaller constructs; in other
words, a construct that is not a token.  See section <A HREF="bison_6.html#SEC39">3.2 Symbols, Terminal and Nonterminal</A>.
<P>

</P>
<DT>Parse error
<DD>An error encountered during parsing of an input stream due to invalid
syntax.  See section <A HREF="bison_9.html#SEC80">6. Error Recovery</A>.
<P>

</P>
<DT>Parser
<DD>A function that recognizes valid sentences of a language by analyzing
the syntax structure of a set of tokens passed to it from a lexical
analyzer.
<P>

</P>
<DT>Postfix operator
<DD>An arithmetic operator that is placed after the operands upon which it
performs some operation.
<P>

</P>
<DT>Reduction
<DD>Replacing a string of nonterminals and/or terminals with a single
nonterminal, according to a grammar rule.  See section <A HREF="bison_8.html#SEC67">The Bison Parser Algorithm </A>.
<P>

</P>
<DT>Reentrant
<DD>A reentrant subprogram is a subprogram which can be in invoked any
number of times in parallel, without interference between the various
invocations.  See section <A HREF="bison_6.html#SEC55">A Pure (Reentrant) Parser</A>.
<P>

</P>
<DT>Reverse polish notation
<DD>A language in which all operators are postfix operators.
<P>

</P>
<DT>Right recursion
<DD>A rule whose result symbol is also its last component symbol;
for example, `<SAMP>expseq1: exp ',' expseq1;</SAMP>'.  See section <A HREF="bison_6.html#SEC41">Recursive Rules</A>.
<P>

</P>
<DT>Semantics
<DD>In computer languages, the semantics are specified by the actions
taken for each instance of the language, i.e., the meaning of
each statement.  See section <A HREF="bison_6.html#SEC42">Defining Language Semantics</A>.
<P>

</P>
<DT>Shift
<DD>A parser is said to shift when it makes the choice of analyzing
further input from the stream rather than reducing immediately some
already-recognized rule.  See section <A HREF="bison_8.html#SEC67">The Bison Parser Algorithm </A>.
<P>

</P>
<DT>Single-character literal
<DD>A single character that is recognized and interpreted as is.
See section <A HREF="bison_4.html#SEC8">From Formal Rules to Bison Input</A>.
<P>

</P>
<DT>Start symbol
<DD>The nonterminal symbol that stands for a complete valid utterance in
the language being parsed.  The start symbol is usually listed as the
first nonterminal symbol in a language specification.  
See section <A HREF="bison_6.html#SEC54">The Start-Symbol</A>.
<P>

</P>
<DT>Symbol table
<DD>A data structure where symbol names and associated data are stored
during parsing to allow for recognition and use of existing
information in repeated uses of a symbol.  See section <A HREF="bison_5.html#SEC28">2.4 Multi-Function Calculator: <CODE>mfcalc</CODE></A>.
<P>

</P>
<DT>Token
<DD>A basic, grammatically indivisible unit of a language.  The symbol
that describes a token in the grammar is a terminal symbol.
The input of the Bison parser is a stream of tokens which comes from
the lexical analyzer.  See section <A HREF="bison_6.html#SEC39">3.2 Symbols, Terminal and Nonterminal</A>.
<P>

</P>
<DT>Terminal symbol
<DD>A grammar symbol that has no rules in the grammar and therefore
is grammatically indivisible.  The piece of text it represents
is a token.  See section <A HREF="bison_4.html#SEC7">Languages and Context-Free Grammars</A>.
</DL>
<P>

<A NAME="Index"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_13.html#SEC90"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_15.html#SEC92"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_15.html#SEC92">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Frank B. Brokken</I> on <I>January, 28 2005</I>
using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
</FONT>

</BODY>
</HTML>