/[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.61 by akim, Sat May 25 16:12:40 2002 UTC revision 1.62 by akim, Wed Jun 19 07:46:11 2002 UTC
# Line 2055  that they precede the definition of @cod Line 2055  that they precede the definition of @cod
2055  need any C declarations, you may omit the @samp{%@{} and @samp{%@}}  need any C declarations, you may omit the @samp{%@{} and @samp{%@}}
2056  delimiters that bracket this section.  delimiters that bracket this section.
2057    
2058    You may have more than one @var{Prologue} section, intermixed with the
2059    @var{Bison declarations}.  This allows you to have C and Bison
2060    declarations that refer to each other.  For example, the @code{%union}
2061    declaration may use types defined in a header file, and you may wish to
2062    prototype functions that take arguments of type @code{YYSTYPE}.  This
2063    can be done with two @var{Prologue} blocks, one before and one after the
2064    @code{%union} declaration.
2065    
2066    @smallexample
2067    %@{
2068    #include <stdio.h>
2069    #include "ptypes.h"
2070    %@}
2071    
2072    %union @{
2073      long n;
2074      tree t;  /* @r{@code{tree} is defined in @file{ptypes.h}.} */
2075    @}
2076    
2077    %@{
2078    static void yyprint(FILE *, int, YYSTYPE);
2079    #define YYPRINT(F, N, L) yyprint(F, N, L)
2080    %@}
2081    
2082    @dots{}
2083    @end smallexample
2084    
2085  @node Bison Declarations  @node Bison Declarations
2086  @subsection The Bison Declarations Section  @subsection The Bison Declarations Section
2087  @cindex Bison declarations (introduction)  @cindex Bison declarations (introduction)

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.62

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