bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: [MAIN] texi-declnames4.patch


From: marc-alexandre autret
Subject: FYI: [MAIN] texi-declnames4.patch
Date: Thu, 20 Sep 2001 20:19:26 +0000 (GMT)

Hi,

Here is the final version
of the patch to adjust terminologies.



Index: doc/bison.texinfo
===================================================================
RCS file: /cvsroot/bison/bison/doc/bison.texinfo,v
retrieving revision 1.37
diff -u -r1.37 bison.texinfo
--- doc/bison.texinfo   2001/08/15 08:25:10     1.37
+++ doc/bison.texinfo   2001/09/20 18:18:13
@@ -188,7 +188,7 @@
 
 Reverse Polish Notation Calculator
 
-* Decls: Rpcalc Decls.  Bison and C declarations for rpcalc.
+* Decls: Rpcalc Decls.  Prologue (declarations) for rpcalc.
 * Rules: Rpcalc Rules.  Grammar Rules for rpcalc, with explanation.
 * Lexer: Rpcalc Lexer.  The lexical analyzer.
 * Main: Rpcalc Main.    The controlling function.
@@ -220,10 +220,10 @@
 
 Outline of a Bison Grammar
 
-* C Declarations::    Syntax and usage of the C declarations section.
+* Prologue::          Syntax and usage of the prologue (declarations section).
 * Bison Declarations::  Syntax and usage of the Bison declarations section.
 * Grammar Rules::     Syntax and usage of the grammar rules section.
-* C Code::            Syntax and usage of the additional C code section.
+* Epilogue::          Syntax and usage of the epilogue (additional code 
section).
 
 Defining Language Semantics
 
@@ -736,7 +736,7 @@
 
 @example
 address@hidden
address@hidden declarations}
address@hidden (declarations)}
 address@hidden
 
 @var{Bison declarations}
@@ -744,15 +744,15 @@
 %%
 @var{Grammar rules}
 %%
address@hidden C code}
address@hidden (additional code)}
 @end example
 
 @noindent
 The @samp{%%}, @address@hidden and @address@hidden are punctuation that appears
 in every Bison grammar file to separate the sections.
 
-The C declarations may define types and variables used in the actions.
-You can also use preprocessor commands to define macros used there, and use
+The prologue may define types and variables used in the actions. You can 
+also use preprocessor commands to define macros used there, and use 
 @code{#include} to include header files that do any of these things.
 
 The Bison declarations declare the names of the terminal and nonterminal
@@ -762,10 +762,10 @@
 The grammar rules define how to construct each nonterminal symbol from its
 parts.
 
-The additional C code can contain any C code you want to use.  Often the
-definition of the lexical analyzer @code{yylex} goes here, plus subroutines
-called by the actions in the grammar rules.  In a simple program, all the
-rest of the program can go here.
+The epilogue can contain any code you want to use. Often the definition of 
+the lexical analyzer @code{yylex} goes here, plus subroutines called by the 
+actions in the grammar rules.  In a simple program, all the rest of the 
+program can go here.
 
 @node Examples, Grammar File, Concepts, Top
 @chapter Examples
@@ -812,7 +812,7 @@
 @samp{.y} extension is a convention used for Bison input files.
 
 @menu
-* Decls: Rpcalc Decls.  Bison and C declarations for rpcalc.
+* Decls: Rpcalc Decls.  Prologue (declarations) for rpcalc.
 * Rules: Rpcalc Rules.  Grammar Rules for rpcalc, with explanation.
 * Lexer: Rpcalc Lexer.  The lexical analyzer.
 * Main: Rpcalc Main.    The controlling function.
@@ -840,7 +840,7 @@
 %% /* Grammar rules and actions follow */
 @end example
 
-The C declarations section (@pxref{C Declarations, ,The C Declarations 
Section}) contains two
+The declarations section (@pxref{Prologue, , The prologue}) contains two
 preprocessor directives.
 
 The @code{#define} directive defines the macro @code{YYSTYPE}, thus
@@ -1161,8 +1161,8 @@
 arrange all the source code in one or more source files.  For such a
 simple example, the easiest thing is to put everything in one file.  The
 definitions of @code{yylex}, @code{yyerror} and @code{main} go at the
-end, in the ``additional C code'' section of the file (@pxref{Grammar
-Layout, ,The Overall Layout of a Bison Grammar}).
+end, in the epilogue of the file 
+(@pxref{Grammar Layout, ,The Overall Layout of a Bison Grammar}).
 
 For a large project, you would probably have several source files, and use
 @code{make} to arrange to recompile them.
@@ -1779,7 +1779,7 @@
 
 @example
 address@hidden
address@hidden declarations}
address@hidden
 address@hidden
 
 @var{Bison declarations}
@@ -1788,24 +1788,25 @@
 @var{Grammar rules}
 %%
 
address@hidden C code}
address@hidden
 @end example
 
 Comments enclosed in @samp{/* @dots{} */} may appear in any of the sections.
 
 @menu
-* C Declarations::    Syntax and usage of the C declarations section.
+* Prologue::          Syntax and usage of the prologue.
 * Bison Declarations::  Syntax and usage of the Bison declarations section.
 * Grammar Rules::     Syntax and usage of the grammar rules section.
-* C Code::            Syntax and usage of the additional C code section.
+* Epilogue::          Syntax and usage of the epilogue.
 @end menu
 
address@hidden C Declarations, Bison Declarations,  , Grammar Outline
address@hidden The C Declarations Section
address@hidden C declarations section
address@hidden declarations, C
address@hidden Prologue, Bison Declarations,  , Grammar Outline
address@hidden The prologue
address@hidden declarations section
address@hidden Prologue
address@hidden declarations
 
-The @var{C declarations} section contains macro definitions and
+The @var{prologue} section contains macro definitions and
 declarations of functions and variables that are used in the actions in the
 grammar rules.  These are copied to the beginning of the parser file so
 that they precede the definition of @code{yyparse}.  You can use
@@ -1813,7 +1814,7 @@
 need any C declarations, you may omit the @address@hidden and @address@hidden
 delimiters that bracket this section.
 
address@hidden Bison Declarations, Grammar Rules, C Declarations, Grammar 
Outline
address@hidden Bison Declarations, Grammar Rules, Prologue, Grammar Outline
 @subsection The Bison Declarations Section
 @cindex Bison declarations (introduction)
 @cindex declarations, Bison (introduction)
@@ -1823,7 +1824,7 @@
 In some simple grammars you may not need any declarations.
 @xref{Declarations, ,Bison Declarations}.
 
address@hidden Grammar Rules, C Code, Bison Declarations, Grammar Outline
address@hidden Grammar Rules, Epilogue, Bison Declarations, Grammar Outline
 @subsection The Grammar Rules Section
 @cindex grammar rules section
 @cindex rules section for grammar
@@ -1835,18 +1836,18 @@
 @samp{%%} (which precedes the grammar rules) may never be omitted even
 if it is the first thing in the file.
 
address@hidden C Code,  , Grammar Rules, Grammar Outline
address@hidden The Additional C Code Section
address@hidden Epilogue,  , Grammar Rules, Grammar Outline
address@hidden The epilogue
 @cindex additional C code section
address@hidden epilogue
 @cindex C code, section for additional
 
-The @var{additional C code} section is copied verbatim to the end of the
-parser file, just as the @var{C declarations} section is copied to the
-beginning.  This is the most convenient place to put anything that you
-want to have in the parser file but which need not come before the
-definition of @code{yyparse}.  For example, the definitions of
address@hidden and @code{yyerror} often go here.  @xref{Interface, ,Parser
-C-Language Interface}.
+The @var{epilogue} is copied verbatim to the end of the parser file, just as 
+the @var{prologue} is copied to the beginning.  This is the most convenient 
+place to put anything that you want to have in the parser file but which need 
+not come before the definition of @code{yyparse}.  For example, the 
+definitions of @code{yylex} and @code{yyerror} often go here.  
address@hidden, ,Parser C-Language Interface}.
 
 If the last section is empty, you may omit the @samp{%%} that separates it
 from the grammar rules.
@@ -1854,7 +1855,7 @@
 The Bison parser itself contains many static variables whose names start
 with @samp{yy} and many macros whose names start with @samp{YY}.  It is a
 good idea to avoid using any such names (except those documented in this
-manual) in the additional C code section of the grammar file.
+manual) in the epilogue of the grammar file.
 
 @node Symbols, Rules, Grammar Outline, Grammar File
 @section Symbols, Terminal and Nonterminal
@@ -2175,8 +2176,8 @@
 @end example
 
 @noindent
-This macro definition must go in the C declarations section of the grammar
-file (@pxref{Grammar Outline, ,Outline of a Bison Grammar}).
+This macro definition must go in the prologue of the grammar file 
+(@pxref{Grammar Outline, ,Outline of a Bison Grammar}).
 
 @node Multiple Types, Actions, Value Type, Semantics
 @subsection More Than One Value Type
@@ -3150,8 +3151,8 @@
 
 Keep in mind that the parser uses many C identifiers starting with
 @samp{yy} and @samp{YY} for internal purposes.  If you use such an
-identifier (aside from those in this manual) in an action or in additional
-C code in the grammar file, you are likely to run into trouble.
+identifier (aside from those in this manual) in an action or in epilogue
+in the grammar file, you are likely to run into trouble.
 
 @menu
 * Parser Function::   How to call @code{yyparse} and what it returns.
@@ -4595,10 +4596,9 @@
 it is nonzero, all integers are parsed in hexadecimal, and tokens starting
 with letters are parsed as integers if possible.
 
-The declaration of @code{hexflag} shown in the C declarations section of
-the parser file is needed to make it accessible to the actions
-(@pxref{C Declarations, ,The C Declarations Section}).  You must also write 
the code in @code{yylex}
-to obey the flag.
+The declaration of @code{hexflag} shown in the prologue of the parser file 
+is needed to make it accessible to the actions (@pxref{Prologue, ,The 
Prologue}).  
+You must also write the code in @code{yylex} to obey the flag.
 
 @node Tie-in Recovery,  , Lexical Tie-ins, Context Dependency
 @section Lexical Tie-ins and Error Recovery
@@ -4666,15 +4666,14 @@
 runs, the @code{yydebug} parser-trace feature can help you figure out why.
 
 To enable compilation of trace facilities, you must define the macro
address@hidden when you compile the parser.  You could use
address@hidden as a compiler option or you could put @samp{#define
-YYDEBUG 1} in the C declarations section of the grammar file
-(@pxref{C Declarations, ,The C Declarations Section}).  Alternatively, use the 
@samp{-t} option when
-you run Bison (@pxref{Invocation, ,Invoking Bison}).  We always define 
@code{YYDEBUG} so that
-debugging is always possible.
address@hidden when you compile the parser.  You could use @samp{-DYYDEBUG=1} 
+as a compiler option or you could put @samp{#define YYDEBUG 1} in the prologue 
+of the grammar file (@pxref{Prologue, , The Prologue}). Alternatively, use the 
address@hidden option when you run Bison (@pxref{Invocation, ,Invoking Bison}). 
 
+We always define @code{YYDEBUG} so that debugging is always possible.
 
-The trace facility uses @code{stderr}, so you must add @address@hidden
-<stdio.h>}} to the C declarations section unless it is already there.
+The trace facility uses @code{stderr}, so you must add 
address@hidden@code{#include <stdio.h>}} to the prologue unless it is already 
there.
 
 Once you have compiled the program with trace facilities, the way to
 request a trace is to store a nonzero value in the variable @code{yydebug}.
@@ -5192,13 +5191,13 @@
 @table @samp
 @item %%
 Delimiter used to separate the grammar rule section from the
-Bison declarations section or the additional C code section.
+Bison declarations section or the epilogue.
 @xref{Grammar Layout, ,The Overall Layout of a Bison Grammar}.
 
 @item address@hidden address@hidden
 All code listed between @address@hidden and @address@hidden is copied directly 
to
-the output file uninterpreted.  Such code forms the ``C declarations''
-section of the input file.  @xref{Grammar Outline, ,Outline of a Bison
+the output file uninterpreted.  Such code forms the prologue of the input 
+file.  @xref{Grammar Outline, ,Outline of a Bison
 Grammar}.
 
 @item /address@hidden/


-- 
Autret Marc (address@hidden)
Eleve Ingenieur en Informatique.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]