bison-patches
[Top][All Lists]
Advanced

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

[MAIN] texi-declnames.patch


From: marc-alexandre autret
Subject: [MAIN] texi-declnames.patch
Date: Sat, 1 Sep 2001 02:19:18 +0000 (GMT)

Hello, 

Here is a proposition to change the bison.texinfo il
in order to introduce the new vocabulary about 
prologue and epilogue...


--- bison.texinfo.orig  Sat Sep  1 01:02:21 2001
+++ bison.texinfo       Sat Sep  1 01:08:16 2001
@@ -188,7 +188,7 @@
 
 Reverse Polish Notation Calculator
 
-* Decls: Rpcalc Decls.  Bison and C declarations for rpcalc.
+* Decls: Rpcalc Decls.  Bison and prologue 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 C declarations int 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.
+* C Code::            Syntax and usage of the epilogue code section.
 
 Defining Language Semantics
 
@@ -736,7 +736,7 @@
 
 @example
 address@hidden
address@hidden declarations}
address@hidden
 address@hidden
 
 @var{Bison declarations}
@@ -744,14 +744,14 @@
 %%
 @var{Grammar rules}
 %%
address@hidden C code}
address@hidden
 @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.
+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.
 
@@ -762,7 +762,7 @@
 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
+The epilogue 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.
@@ -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.  Bison declarations and prologue 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 prologue (@pxref{Prologue, ,The Prologue}) contains two
 preprocessor directives.
 
 The @code{#define} directive defines the macro @code{YYSTYPE}, thus
@@ -1161,7 +1161,7 @@
 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
+end, in the ``epilogue'' section 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
@@ -1779,7 +1779,7 @@
 
 @example
 address@hidden
address@hidden declarations}
address@hidden
 address@hidden
 
 @var{Bison declarations}
@@ -1788,32 +1788,32 @@
 @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 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.
+* C Code::            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 Prologue, Bison Declarations,  , Grammar Outline
address@hidden The Prologue
address@hidden Prologue
 @cindex declarations, C
 
-The @var{C declarations} section contains macro definitions and
+The @var{prologue} 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
 @samp{#include} to get the declarations from a header file.  If you don't
-need any C declarations, you may omit the @address@hidden and @address@hidden
+need any prologue, 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)
@@ -1836,12 +1836,12 @@
 if it is the first thing in the file.
 
 @node C Code,  , Grammar Rules, Grammar Outline
address@hidden The Additional C Code Section
address@hidden additional C code section
address@hidden The epilogue
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
+The @var{epilogue} section 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
@@ -1854,7 +1854,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,7 +2175,7 @@
 @end example
 
 @noindent
-This macro definition must go in the C declarations section of the 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
@@ -3150,8 +3150,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 the 
+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,9 +4595,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 declaration of @code{hexflag} shown in the prologue 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}
+(@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
@@ -4668,13 +4668,13 @@
 To enable compilation of trace facilities, you must define the macro
 @code{YYDEBUG} 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 C declarations section of the grammar file
-(@pxref{C Declarations, ,The C Declarations Section}).  Alternatively, use the 
@samp{-t} option when
+YYDEBUG 1} in the prologue of the grammar file
+(@pxref{Prologue, ,The Prologue}).  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.
 
 The trace facility uses @code{stderr}, so you must add @address@hidden
-<stdio.h>}} to the C declarations section unless it is already there.
+<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,12 +5192,12 @@
 @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''
+the output file uninterpreted.  Such code forms the ``prologue''
 section of the input file.  @xref{Grammar Outline, ,Outline of a Bison
 Grammar}.
 


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



reply via email to

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