Thanks for the bug report about the Bison man page <https://lists.gnu.org/r/bug-bison/2026-01/msg00000.html>. I assumes this supersedes the report last month <https://lists.gnu.org/r/bug-bison/2025-12/msg00000.html>.

I installed the attached patch which I hope addresses the problems reported, except for the following issue:

On 2026-01-17 22:42, Helge Kreutzmann wrote:

Issue:    NAME in italics?

"B<-D>, B<--define=NAME>[=I<\\,VALUE\\/>]"

"B<-F>, B<--force-define=NAME>[=I<\\,VALUE\\/>]"

These strings are generated by help2man, so I'll cc this email to [email protected]. The bug is that help2man reads this output of 'bison --help':

  -D, --define=NAME[=VALUE]        similar to '%define NAME VALUE'
  -F, --force-define=NAME[=VALUE]  override '%define NAME VALUE'

and outputs these lines:

.TP
\fB\-D\fR, \fB\-\-define=NAME\fR[=\fI\,VALUE\/\fR]
similar to '%define NAME VALUE'
.TP
\fB\-F\fR, \fB\-\-force\-define=NAME\fR[=\fI\,VALUE\/\fR]
override '%define NAME VALUE'

I suppose help2man should output something like this instead:

.TP
\fB\-D\fR, \fB\-\-define\fR=\fI\,NAME\/\fR[\fB=\fR\fI\,VALUE\/\fR]
similar to '%define NAME VALUE'
.TP
\fB\-F\fR, \fB\-\-force\-define\fR=\fI\,NAME\/\fR[\fB=\fR\fI\,VALUE\/\fR]
override '%define NAME VALUE'

or if that's too much work, at least this:

.TP
\fB\-D\fR, \fB\-\-define\fR=\fI\,NAME[=VALUE\/\fR]
similar to '%define NAME VALUE'
.TP
\fB\-F\fR, \fB\-\-force\-define\fR=\fI\,NAME[=VALUE\/\fR]
override '%define NAME VALUE'
From c6d1f65185dfd11e711df985674c03ec00a1dab2 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Sun, 18 Jan 2026 09:23:21 -0800
Subject: [PATCH] doc: improve man page (mostly fonts)

Problems reported by Helge Kreutzmann in:
https://lists.gnu.org/r/bug-bison/2026-01/msg00000.html
* doc/bison.x: Refontify, mostly.
* src/getargs.c (usage): Clarify usage message.
---
 doc/bison.x   | 57 ++++++++++++++++++++++++++-------------------------
 src/getargs.c |  6 +++---
 2 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/doc/bison.x b/doc/bison.x
index edaebe83..cb4f7a8d 100644
--- a/doc/bison.x
+++ b/doc/bison.x
@@ -2,48 +2,49 @@
 bison \- GNU Project parser generator (yacc replacement)
 
 [description]
-.I Bison
-is a parser generator in the style of
-.IR yacc (1).
-It should be upwardly compatible with input files designed
-for
-.IR yacc .
+The
+.B bison
+parser generator inputs grammars in the style of
+.BR yacc (1)
+and outputs parsers for those grammers.
 .PP
 Input files should follow the
-.I yacc
+.B yacc
 convention of ending in
-.BR .y .
+.IR .y .
 Unlike
-.IR yacc ,
+.BR yacc ,
 the generated files do not have fixed names, but instead use the prefix
 of the input file.
-Moreover, if you need to put
-.I C++
-code in the input file, you can end his name by a C++-like extension
-(.ypp or .y++), then bison will follow your extension to name the
-output file (.cpp or .c++).
+Moreover, if you need to put C++
+code in the input file, you can end its name by a C++-like extension
+.RI ( .ypp
+or
+.IR .y++ ),
+and then
+.B bison
+will follow your extension to name the
+output file
+.RI ( .cpp
+or
+.IR .c++ ).
 For instance, a grammar description file named
-.B parse.yxx
+.I parse.yxx
 would produce the generated parser in a file named
-.BR parse.tab.cxx ,
+.IR parse.tab.cxx ,
 instead of
-.IR yacc 's
-.B y.tab.c
-or old
-.I Bison
-version's
-.BR parse.tab.c .
+.BR yacc 's
+.IR y.tab.c .
 .PP
 This description of the options that can be given to
-.I bison
+.B bison
 is adapted from the node
 .B Invocation
-in the
-.B bison.texi
-manual, which should be taken as authoritative.
+in the Bison manual, which should be taken as authoritative.
 .PP
-.I Bison
-supports both traditional single-letter options and mnemonic long
+The
+.B bison
+command supports both traditional single-letter options and mnemonic long
 option names.  Long option names are indicated with
 .B \-\-
 instead of
diff --git a/src/getargs.c b/src/getargs.c
index 79a8b706..9e53d3f9 100644
--- a/src/getargs.c
+++ b/src/getargs.c
@@ -422,12 +422,12 @@ Diagnostics:\n\
 Tuning the Parser:\n\
   -L, --language=LANGUAGE          specify the output programming language\n\
   -S, --skeleton=FILE              specify the skeleton to use\n\
-  -t, --debug                      instrument the parser for tracing\n\
+  -t, --debug                      instrument the parser for tracing;\n\
                                    same as '-Dparse.trace'\n\
       --locations                  enable location support\n\
   -D, --define=NAME[=VALUE]        similar to '%define NAME VALUE'\n\
   -F, --force-define=NAME[=VALUE]  override '%define NAME VALUE'\n\
-  -p, --name-prefix=PREFIX         prepend PREFIX to the external symbols\n\
+  -p, --name-prefix=PREFIX         prepend PREFIX to the external symbols;\n\
                                    deprecated by '-Dapi.prefix={PREFIX}'\n\
   -l, --no-lines                   don't generate '#line' directives\n\
   -k, --token-table                include a table of token names\n\
@@ -443,7 +443,7 @@ Output Files:\n\
       --report-file=FILE        write report to FILE\n\
   -v, --verbose                 same as '--report=state'\n\
   -b, --file-prefix=PREFIX      specify a PREFIX for output files\n\
-  -o, --output=FILE             leave output to FILE\n\
+  -o, --output=FILE             output to FILE\n\
   -g, --graph[=FILE]            also output a graph of the automaton\n\
       --html[=FILE]             also output an HTML report of the automaton\n\
   -x, --xml[=FILE]              also output an XML report of the automaton\n\
-- 
2.51.0

Reply via email to