doc: use @group to improve page breaking

* doc/bison.texi: here.
This commit is contained in:
Akim Demaille
2013-02-04 17:55:27 +01:00
parent c5dbd909d0
commit efbc95a7e4

View File

@@ -1538,6 +1538,7 @@ calculator. As in C, comments are placed between @samp{/*@dots{}*/}.
@example @example
/* Reverse polish notation calculator. */ /* Reverse polish notation calculator. */
@group
%@{ %@{
#define YYSTYPE double #define YYSTYPE double
#include <stdio.h> #include <stdio.h>
@@ -1545,6 +1546,7 @@ calculator. As in C, comments are placed between @samp{/*@dots{}*/}.
int yylex (void); int yylex (void);
void yyerror (char const *); void yyerror (char const *);
%@} %@}
@end group
%token NUM %token NUM
@@ -2857,21 +2859,27 @@ can be done with two @var{Prologue} blocks, one before and one after the
@code{%union} declaration. @code{%union} declaration.
@example @example
@group
%@{ %@{
#define _GNU_SOURCE #define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
#include "ptypes.h" #include "ptypes.h"
%@} %@}
@end group
@group
%union @{ %union @{
long int n; long int n;
tree t; /* @r{@code{tree} is defined in @file{ptypes.h}.} */ tree t; /* @r{@code{tree} is defined in @file{ptypes.h}.} */
@} @}
@end group
@group
%@{ %@{
static void print_token_value (FILE *, int, YYSTYPE); static void print_token_value (FILE *, int, YYSTYPE);
#define YYPRINT(F, N, L) print_token_value (F, N, L) #define YYPRINT(F, N, L) print_token_value (F, N, L)
%@} %@}
@end group
@dots{} @dots{}
@end example @end example
@@ -2903,21 +2911,27 @@ location, or it can be one of @code{requires}, @code{provides},
Look again at the example of the previous section: Look again at the example of the previous section:
@example @example
@group
%@{ %@{
#define _GNU_SOURCE #define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
#include "ptypes.h" #include "ptypes.h"
%@} %@}
@end group
@group
%union @{ %union @{
long int n; long int n;
tree t; /* @r{@code{tree} is defined in @file{ptypes.h}.} */ tree t; /* @r{@code{tree} is defined in @file{ptypes.h}.} */
@} @}
@end group
@group
%@{ %@{
static void print_token_value (FILE *, int, YYSTYPE); static void print_token_value (FILE *, int, YYSTYPE);
#define YYPRINT(F, N, L) print_token_value (F, N, L) #define YYPRINT(F, N, L) print_token_value (F, N, L)
%@} %@}
@end group
@dots{} @dots{}
@end example @end example
@@ -2969,16 +2983,20 @@ Let's go ahead and add the new @code{YYLTYPE} definition and the
@} YYLTYPE; @} YYLTYPE;
@} @}
@group
%union @{ %union @{
long int n; long int n;
tree t; /* @r{@code{tree} is defined in @file{ptypes.h}.} */ tree t; /* @r{@code{tree} is defined in @file{ptypes.h}.} */
@} @}
@end group
@group
%code @{ %code @{
static void print_token_value (FILE *, int, YYSTYPE); static void print_token_value (FILE *, int, YYSTYPE);
#define YYPRINT(F, N, L) print_token_value (F, N, L) #define YYPRINT(F, N, L) print_token_value (F, N, L)
static void trace_token (enum yytokentype token, YYLTYPE loc); static void trace_token (enum yytokentype token, YYLTYPE loc);
@} @}
@end group
@dots{} @dots{}
@end example @end example