bug-bison
[Top][All Lists]
Advanced

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

Re: --no-parser options


From: Joel E. Denny
Subject: Re: --no-parser options
Date: Sat, 11 Aug 2007 22:12:52 -0400 (EDT)

On Sun, 5 Aug 2007, Joel E. Denny wrote:

> > > Unfortunately, it looks like almost no implementation currently exists. 
> > > Bison parses --no-parser (but not %no-parser despite being documented) 
> > > and 
> > > forgets it.  I just had a look in TODO.  It looks like Akim was also 
> > > wondering whether we needed to keep --no-parser.
> 
> Unless I hear objections, I believe I will soon remove what little 
> implementation and documentation of --no-parser and %no-parser there is.

I committed this.

Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1718
diff -p -u -r1.1718 ChangeLog
--- ChangeLog   11 Aug 2007 23:08:04 -0000      1.1718
+++ ChangeLog   12 Aug 2007 02:07:10 -0000
@@ -1,5 +1,22 @@
 2007-08-11  Joel E. Denny  <address@hidden>
 
+       Get rid of broken %no-parser, -n, and --no-parser implementation and
+       documentation.
+       * TODO: Don't mention them.
+       * doc/bison.1: Likewise.
+       * doc/bison.texinfo (Decl Summary): Likewise.
+       (Bison Options): Likewise.
+       (Option Cross Key): Likewise.
+       * src/getargs.c (no_parser_flag): Remove global variable.
+       (usage): Don't print description of -n and --no-parser.
+       (long_options): Remove --no-parser entry here.
+       (getargs): Remove -n case in the switch here.
+       * src/getargs.h (no_parser_flag): Remove extern.
+       * tests/regression.at (Web2c Actions): Remove comment that mentions
+       --no-parser.
+
+2007-08-11  Joel E. Denny  <address@hidden>
+
        * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
        name user variables starting with `yy'.  Just pass NULL instead of a
        dummy local &yylval to yypush_parse.
Index: TODO
===================================================================
RCS file: /sources/bison/bison/TODO,v
retrieving revision 1.100
diff -p -u -r1.100 TODO
--- TODO        29 Jan 2007 10:54:42 -0000      1.100
+++ TODO        12 Aug 2007 02:07:10 -0000
@@ -168,10 +168,9 @@ Paul notes:
 Show reductions.
 
 * Broken options ?
-** %no-parser
 ** %token-table
 ** Skeleton strategy
-Must we keep %no-parser?  %token-table?
+Must we keep %token-table?
 
 * src/print_graph.c
 Find the best graph parameters.
Index: doc/bison.1
===================================================================
RCS file: /sources/bison/bison/doc/bison.1,v
retrieving revision 1.14
diff -p -u -r1.14 bison.1
--- doc/bison.1 13 Oct 2006 04:09:14 -0000      1.14
+++ doc/bison.1 12 Aug 2007 02:07:10 -0000
@@ -24,10 +24,6 @@ bison \- GNU Project parser generator (y
 ] [
 .B \-\-no-lines
 ] [
-.B \-n
-] [
-.B \-\-no-parser
-] [
 .BI \-o " outfile"
 ] [
 .BI \-\-output-file= outfile
@@ -211,21 +207,6 @@ and debuggers will associate errors with
 grammar file.  This option causes them to associate errors with the
 parser file, treating it an independent source file in its own right.
 .TP
-.B \-n
-.br
-.ns
-.TP
-.B \-\-no-parser
-Do not generate the parser code into the output; generate only
-declarations.  The generated
-.IB name .tab.c
-file will have only
-constant declarations.  In addition, a
-.IB name .act
-file is
-generated containing a switch statement body containing all the
-translated actions.
-.TP
 .BI \-o " outfile"
 .br
 .ns
Index: doc/bison.texinfo
===================================================================
RCS file: /sources/bison/bison/doc/bison.texinfo,v
retrieving revision 1.232
diff -p -u -r1.232 bison.texinfo
--- doc/bison.texinfo   26 May 2007 20:08:18 -0000      1.232
+++ doc/bison.texinfo   12 Aug 2007 02:07:13 -0000
@@ -4812,16 +4812,6 @@ Precedence}).
 @end deffn
 @end ifset
 
address@hidden {Directive} %no-parser
-Do not include any C code in the parser file; generate tables only.  The
-parser file contains just @code{#define} directives and static variable
-declarations.
-
-This option also tells Bison to write the C code for the grammar actions
-into a file named @address@hidden, in the form of a
-brace-surrounded body fit for a @code{switch} statement.
address@hidden deffn
-
 @deffn {Directive} %no-lines
 Don't generate any @code{#line} preprocessor commands in the parser
 file.  Ordinarily Bison writes these commands in the parser file so that
@@ -7468,10 +7458,6 @@ and debuggers will associate errors with
 grammar file.  This option causes them to associate errors with the
 parser file, treating it as an independent source file in its own right.
 
address@hidden -n
address@hidden --no-parser
-Pretend that @code{%no-parser} was specified.  @xref{Decl Summary}.
-
 @item -S @var{file}
 @itemx address@hidden
 Specify the skeleton to use, similar to @code{%skeleton}
@@ -7572,7 +7558,6 @@ the corresponding short option.
 @item @option{--help}                       @tab @option{-h}
 @item @address@hidden   @tab @option{-p @var{name-prefix}}
 @item @option{--no-lines}                   @tab @option{-l}
address@hidden @option{--no-parser}                  @tab @option{-n}
 @item @address@hidden       @tab @option{-o @var{outfile}}
 @item @option{--print-localedir}            @tab
 @item @option{--token-table}                @tab @option{-k}
Index: src/getargs.c
===================================================================
RCS file: /sources/bison/bison/src/getargs.c,v
retrieving revision 1.92
diff -p -u -r1.92 getargs.c
--- src/getargs.c       12 Feb 2007 06:11:39 -0000      1.92
+++ src/getargs.c       12 Aug 2007 02:07:13 -0000
@@ -52,7 +52,6 @@ bool defines_flag;
 bool graph_flag;
 bool locations_flag;
 bool no_lines_flag;
-bool no_parser_flag;
 bool token_table_flag;
 bool yacc_flag;        /* for -y */
 
@@ -276,7 +275,6 @@ Parser:\n\
       --locations            enable locations computation\n\
   -p, --name-prefix=PREFIX   prepend PREFIX to the external symbols\n\
   -l, --no-lines             don't generate `#line' directives\n\
-  -n, --no-parser            generate the tables only\n\
   -k, --token-table          include a table of token names\n\
 \n\
 "), stdout);
@@ -434,7 +432,6 @@ static struct option const long_options[
   { "debug",         no_argument,               0,   't' },
   { "locations",      no_argument,              0, LOCATIONS_OPTION },
   { "no-lines",       no_argument,               0,   'l' },
-  { "no-parser",      no_argument,               0,   'n' },
   { "raw",            no_argument,               0,     0 },
   { "skeleton",       required_argument,         0,   'S' },
   { "language",       required_argument,         0,   'L' },
@@ -505,10 +502,6 @@ getargs (int argc, char *argv[])
        no_lines_flag = true;
        break;
 
-      case 'n':
-       no_parser_flag = true;
-       break;
-
       case 'o':
        spec_outfile = AS_FILE_NAME (optarg);
        break;
Index: src/getargs.h
===================================================================
RCS file: /sources/bison/bison/src/getargs.h,v
retrieving revision 1.39
diff -p -u -r1.39 getargs.h
--- src/getargs.h       29 Jan 2007 10:54:42 -0000      1.39
+++ src/getargs.h       12 Aug 2007 02:07:13 -0000
@@ -40,7 +40,6 @@ extern bool defines_flag;             /* for -d */
 extern bool graph_flag;                        /* for -g */
 extern bool locations_flag;
 extern bool no_lines_flag;             /* for -l */
-extern bool no_parser_flag;            /* for -n */
 extern bool token_table_flag;          /* for -k */
 extern bool yacc_flag;                 /* for -y */
 
Index: tests/regression.at
===================================================================
RCS file: /sources/bison/bison/tests/regression.at,v
retrieving revision 1.112
diff -p -u -r1.112 regression.at
--- tests/regression.at 21 Oct 2006 04:52:43 -0000      1.112
+++ tests/regression.at 12 Aug 2007 02:07:14 -0000
@@ -709,8 +709,7 @@ else: "else" statement;
 
 AT_CHECK([bison -v -o input.c input.y])
 
-# Check only the tables.  We don't use --no-parser, because it is
-# still to be implemented in the experimental branch of Bison.
+# Check only the tables.
 [sed -n 's/  *$//;/^static const.*\[\] =/,/^}/p' input.c >tables.c]
 
 AT_CHECK([[cat tables.c]], 0,




reply via email to

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