/[bison]/bison/doc/bison.texinfo
ViewVC logotype

Diff of /bison/doc/bison.texinfo

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.57 by akim, Mon Apr 22 08:22:10 2002 UTC revision 1.58 by eggert, Mon Apr 22 22:10:22 2002 UTC
# Line 766  general form of a Bison grammar file is Line 766  general form of a Bison grammar file is
766    
767  @example  @example
768  %@{  %@{
769  @var{Prologue (declarations)}  @var{Prologue}
770  %@}  %@}
771    
772  @var{Bison declarations}  @var{Bison declarations}
# Line 774  general form of a Bison grammar file is Line 774  general form of a Bison grammar file is
774  %%  %%
775  @var{Grammar rules}  @var{Grammar rules}
776  %%  %%
777  @var{Epilogue (additional code)}  @var{Epilogue}
778  @end example  @end example
779    
780  @noindent  @noindent
# Line 2043  Comments enclosed in @samp{/* @dots{} */ Line 2043  Comments enclosed in @samp{/* @dots{} */
2043  @cindex Prologue  @cindex Prologue
2044  @cindex declarations  @cindex declarations
2045    
2046  The @var{prologue} section contains macro definitions and  The @var{Prologue} section contains macro definitions and
2047  declarations of functions and variables that are used in the actions in the  declarations of functions and variables that are used in the actions in the
2048  grammar rules.  These are copied to the beginning of the parser file so  grammar rules.  These are copied to the beginning of the parser file so
2049  that they precede the definition of @code{yyparse}.  You can use  that they precede the definition of @code{yyparse}.  You can use
# Line 2079  if it is the first thing in the file. Line 2079  if it is the first thing in the file.
2079  @cindex epilogue  @cindex epilogue
2080  @cindex C code, section for additional  @cindex C code, section for additional
2081    
2082  The @var{epilogue} is copied verbatim to the end of the parser file, just as  The @var{Epilogue} is copied verbatim to the end of the parser file, just as
2083  the @var{prologue} is copied to the beginning.  This is the most convenient  the @var{Prologue} is copied to the beginning.  This is the most convenient
2084  place to put anything that you want to have in the parser file but which need  place to put anything that you want to have in the parser file but which need
2085  not come before the definition of @code{yyparse}.  For example, the  not come before the definition of @code{yyparse}.  For example, the
2086  definitions of @code{yylex} and @code{yyerror} often go here.  definitions of @code{yylex} and @code{yyerror} often go here.

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26