bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: preparing for 2.3b


From: Joel E. Denny
Subject: Re: preparing for 2.3b
Date: Wed, 5 Mar 2008 21:20:10 -0500 (EST)

On Wed, 5 Mar 2008, Joel E. Denny wrote:

> It seems like we're stuck with this one exception.  Maybe we should add 
> the statement:
> 
>   The same is true for optional arguments with one exception: unlike 
>   --defines, -d cannot take an argument since POSIX Yacc requires that -d 
>   can be bundled with other short options.
> 
> This would at least help future developers know the scheme we're trying to 
> follow.  It might help users remember how the options go as well. 
> Overkill?

This patch, not yet committed, adds the above and fixes a few other 
things.  Does this work for you?

Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1778
diff -p -u -r1.1778 ChangeLog
--- ChangeLog   28 Feb 2008 16:28:07 -0000      1.1778
+++ ChangeLog   6 Mar 2008 02:13:15 -0000
@@ -1,3 +1,15 @@
+2008-03-05  Joel E. Denny  <address@hidden>
+
+       * NEWS (2.3a+): Mention that -g now takes an argument.
+       * build-aux/cross-options.pl: -d does not take an argument even though
+       --defines does.  Hard-code this exception since it should remain the
+       only exception.
+       * doc/bison.texinfo (Bison Options): In -W entry, reword a little for
+       consistency and fix some typos.
+       Update the -g and -x entries now that they take arguments.
+       * src/getargs.c (usage): Explain the relationship between arguments of
+       long and short options more completely including the -d exception.
+
 2008-02-28  Akim Demaille  <address@hidden>
 
        * doc/bison.texinfo: Fix a few typos.
Index: NEWS
===================================================================
RCS file: /sources/bison/bison/NEWS,v
retrieving revision 1.187
diff -p -u -r1.187 NEWS
--- NEWS        23 Feb 2008 04:26:14 -0000      1.187
+++ NEWS        6 Mar 2008 02:13:16 -0000
@@ -32,7 +32,8 @@ Changes in version 2.3a+ (????-??-??):
   feedback will help to stabilize it.
 
 * The -g and --graph options now output graphs in Graphviz DOT format,
-  not VCG format.
+  not VCG format.  Like --graph, -g now also takes an optional FILE argument
+  and thus cannot be bundled with other short options.
 
 * Java
 
Index: build-aux/cross-options.pl
===================================================================
RCS file: /sources/bison/bison/build-aux/cross-options.pl,v
retrieving revision 1.3
diff -p -u -r1.3 cross-options.pl
--- build-aux/cross-options.pl  28 Feb 2008 16:01:16 -0000      1.3
+++ build-aux/cross-options.pl  6 Mar 2008 02:13:16 -0000
@@ -22,7 +22,8 @@ while (<>)
            $arg = '@var{' . lc ($arg) . '}';
            $arg = '[' . $arg . ']'
                if $opt eq '[';
-           $option{"$long=$arg"} = $short ? "$short $arg" : '';
+           $option{"$long=$arg"} = $short;
+           $option{"$long=$arg"} .= " $arg" if $short && $long ne '--defines';
        }
        else
        {
Index: doc/bison.texinfo
===================================================================
RCS file: /sources/bison/bison/doc/bison.texinfo,v
retrieving revision 1.254
diff -p -u -r1.254 bison.texinfo
--- doc/bison.texinfo   28 Feb 2008 16:28:07 -0000      1.254
+++ doc/bison.texinfo   6 Mar 2008 02:13:20 -0000
@@ -7782,16 +7782,16 @@ Output warnings falling in @var{category
 of:
 @table @code
 @item midrule-values
-Warn about about mid-rule values that are set but not used within any of
-the actions of the parent rule.  For example, Bison warns about unused
address@hidden in:
+Warn about mid-rule values that are set but not used within any of the actions
+of the parent rule.
+For example, warn about unused @code{$2} in:
 
 @example
 exp: '1' @{ $$ = 1; @} '+' exp @{ $$ = $1 + $4; @};
 @end example
 
-It also warns about mid-rule values that are used but not set.  For
-example, Bison warns about unset @code{$$} in the mid-rule action in:
+Also warn about mid-rule values that are used but not set.
+For example, warn about unset @code{$$} in the mid-rule action in:
 
 @example
  exp: '1' @{ $1 = 1; @} '+' exp @{ $$ = $2 + $4; @};
@@ -7799,18 +7799,18 @@ example, Bison warns about unset @code{$
 
 These warnings are not enabled by default since they sometimes prove to
 be false alarms in existing grammars employing the Yacc constructs
address@hidden or @address@hidden (where @var{n} is some positive integer).
address@hidden or @address@hidden (where @var{n} is some positive integer).
 
 
 @item yacc
 Incompatibilities with @acronym{POSIX} Yacc.
 
 @item all
-all the warnings
+All the warnings.
 @item none
-turn off all the warnings
+Turn off all the warnings.
 @item error
-treat warnings as errors
+Treat warnings as errors.
 @end table
 
 A category can be turned off by prefixing its name with @samp{no-}.  For
@@ -7925,22 +7925,19 @@ Specify the @var{file} for the parser fi
 The other output files' names are constructed from @var{file} as
 described under the @samp{-v} and @samp{-d} options.
 
address@hidden -g
address@hidden address@hidden
address@hidden address@hidden
 Output a graphical representation of the @acronym{LALR}(1) grammar
 automaton computed by Bison, in @uref{http://www.graphviz.org/, Graphviz}
 @uref{http://www.graphviz.org/doc/info/lang.html, @acronym{DOT}} format.
-If the grammar file is @file{foo.y}, the output file will
-be @file{foo.dot}.
-
address@hidden address@hidden
-The behavior of @var{--graph} is the same as @samp{-g}.  The only
-difference is that it has an optional argument which is the name of
-the output graph file.
address@hidden@var{file}} is optional.
+If omitted and the grammar file is @file{foo.y}, the output file will be
address@hidden
 
address@hidden -x
address@hidden address@hidden
 @itemx address@hidden
 Output an XML report of the @acronym{LALR}(1) automaton computed by Bison.
address@hidden@var{file}} is optional.
address@hidden@var{file}} is optional.
 If omitted and the grammar file is @file{foo.y}, the output file will be
 @file{foo.xml}.
 (The current XML schema is experimental and may evolve.
Index: src/getargs.c
===================================================================
RCS file: /sources/bison/bison/src/getargs.c,v
retrieving revision 1.105
diff -p -u -r1.105 getargs.c
--- src/getargs.c       28 Feb 2008 16:01:16 -0000      1.105
+++ src/getargs.c       6 Mar 2008 02:13:23 -0000
@@ -252,7 +252,10 @@ Generate LALR(1) and GLR parsers.\n\
 "), stdout);
 
       fputs (_("\
-Mandatory arguments to long options are mandatory for short options too.\n\
+Mandatory arguments to long options are mandatory for short options too.  
The\n\
+same is true for optional arguments with one exception: unlike --defines, -d\n\
+cannot take an argument since POSIX Yacc requires that -d can be bundled 
with\n\
+other short options.\n\
 "), stdout);
 
       fputs (_("\




reply via email to

[Prev in Thread] Current Thread [Next in Thread]