+%@{
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include "ptypes.h"
+%@}
+
+%union @{
+ long int n;
+ tree t; /* @r{@code{tree} is defined in @file{ptypes.h}.} */
+@}
+
+%@{
+ static void print_token_value (FILE *, int, YYSTYPE);
+ #define YYPRINT(F, N, L) print_token_value (F, N, L)
+%@}
+
+@dots{}
+@end smallexample
+
+@noindent
+Notice that there are two @var{Prologue} sections here, but there's a subtle
+distinction between their functionality.
+For example, if you decide to override Bison's default definition for
+@code{YYLTYPE}, in which @var{Prologue} section should you write your new
+definition?
+You should write it in the first since Bison will insert that code into the
+parser code file @emph{before} the default @code{YYLTYPE} definition.
+In which @var{Prologue} section should you prototype an internal function,
+@code{trace_token}, that accepts @code{YYLTYPE} and @code{yytokentype} as
+arguments?
+You should prototype it in the second since Bison will insert that code
+@emph{after} the @code{YYLTYPE} and @code{yytokentype} definitions.
+
+This distinction in functionality between the two @var{Prologue} sections is
+established by the appearance of the @code{%union} between them.
+This behavior raises a few questions.
+First, why should the position of a @code{%union} affect definitions related to
+@code{YYLTYPE} and @code{yytokentype}?
+Second, what if there is no @code{%union}?
+In that case, the second kind of @var{Prologue} section is not available.
+This behavior is not intuitive.
+
+To avoid this subtle @code{%union} dependency, rewrite the example using
+@code{%code-top} and @code{%code}.
+Let's go ahead and add the new @code{YYLTYPE} definition and the
+@code{trace_token} prototype at the same time:
+
+@smallexample
+%code-top @{
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ /* The following code really belongs in a %requires; see below. */
+ #include "ptypes.h"
+ #define YYLTYPE YYLTYPE
+ typedef struct YYLTYPE
+ @{
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+ char *filename;
+ @} YYLTYPE;
+@}
+
+%union @{
+ long int n;
+ tree t; /* @r{@code{tree} is defined in @file{ptypes.h}.} */
+@}
+
+%code @{
+ static void print_token_value (FILE *, int, YYSTYPE);
+ #define YYPRINT(F, N, L) print_token_value (F, N, L)
+ static void trace_token (enum yytokentype token, YYLTYPE loc);
+@}
+
+@dots{}
+@end smallexample
+
+@noindent
+In this way, @code{%code-top} and @code{%code} achieve the same functionality
+as the two kinds of @var{Prologue} sections, but it's always explicit which
+kind you intend.
+Moreover, both kinds are always available even in the absence of @code{%union}.
+
+The @code{%code-top} block above logically contains two parts.
+The first two lines need to appear in the parser code file.
+The fourth line is required by @code{YYSTYPE} and thus also needs to appear in
+the parser code file.
+However, if you've instructed Bison to generate a parser header file
+(@pxref{Table of Symbols, ,%defines}), you probably want the fourth line to
+appear before the @code{YYSTYPE} definition in that header file as well.
+Also, the @code{YYLTYPE} definition should appear in the parser header file to
+override the default @code{YYLTYPE} definition there.
+
+In other words, in the @code{%code-top} block above, all but the first two
+lines are dependency code for externally exposed definitions (@code{YYSTYPE}
+and @code{YYLTYPE}) required by Bison.
+Thus, they belong in one or more @code{%requires}:
+
+@smallexample
+%code-top @{
+ #define _GNU_SOURCE
+ #include <stdio.h>
+@}
+