]> git.saurik.com Git - bison.git/log
bison.git
12 years agoyacc.c: always initialize yylloc
Theophile Ranquet [Mon, 19 Nov 2012 10:43:56 +0000 (10:43 +0000)] 
yacc.c: always initialize yylloc

The initial location might be used if the parser starts by an empty
reduction, so really ensure proper initialization of the initial
location.  The previous approach fails for PostgreSQL, which uses
Reported by Peter Eisentraut.
http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00023.html
With help from Théophile Ranquet.

* data/yacc.c (b4_declare_scanner_communication_variables): Be sure
to initialize yylloc, even when its structure is unknown.
(yyparse): Simplify the call to b4_dollar_pushdef.
* tests/actions.at (Initial location): Check of similar pattern
as in the case of PostgreSQL.

12 years agodoc: one of the fixes for an ambiguous grammar was ambiguous too
Akim Demaille [Thu, 22 Nov 2012 14:49:18 +0000 (15:49 +0100)] 
doc: one of the fixes for an ambiguous grammar was ambiguous too

Reported by Аскар Сафин.
http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00024.html

* doc/bison.texi (Reduce/Reduce): Fix the resulting ambiguity using
precedence/associativity directives.

12 years agodoc: fix the dangling else with precedence directives
Akim Demaille [Thu, 22 Nov 2012 14:16:07 +0000 (15:16 +0100)] 
doc: fix the dangling else with precedence directives

* doc/bison.texi (Non Operators): New node.
(Shift/Reduce): Point to it.
Don't promote "%expect n" too much.

12 years agodoc: prefer "token" to TOKEN
Akim Demaille [Thu, 22 Nov 2012 14:12:24 +0000 (15:12 +0100)] 
doc: prefer "token" to TOKEN

This is more readable in short examples.

* doc/bison.texi (Shift/Reduce): here.
Make "win" and "lose" action more alike.

12 years agodoc: formatting changes
Akim Demaille [Thu, 22 Nov 2012 13:24:54 +0000 (14:24 +0100)] 
doc: formatting changes

* doc/bison.texi: Use @group.

12 years agotests: use valgrind where appropriate
Akim Demaille [Sat, 10 Nov 2012 08:26:40 +0000 (09:26 +0100)] 
tests: use valgrind where appropriate

Reported by Théophile Ranquet.

* tests/glr-regression.at: Rewrite some test cases so that AT_PARSER_CHECK,
which runs valgrind, is exposed with the parser, not with "echo".
* tests/local.at, tests/regression.at, tests/headers.at:
Use AT_PARSER_CHECK for generated parsers.

12 years agotests: don't expect $EGREP to support -w
Akim Demaille [Thu, 8 Nov 2012 18:34:29 +0000 (19:34 +0100)] 
tests: don't expect $EGREP to support -w

Does not work on Solaris 10.  Reported by Dennis Clarke.
http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00009.html
* tests/headers.at (Several parsers): Use Perl instead.
While at it, run it only once, on all the generated headers.
Adjust to YY_NULL be defined in position.hh.

12 years agomaint: post-release administrivia
Akim Demaille [Wed, 7 Nov 2012 17:35:36 +0000 (18:35 +0100)] 
maint: post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

12 years agoversion 2.6.5 v2.6.5
Akim Demaille [Wed, 7 Nov 2012 17:09:46 +0000 (18:09 +0100)] 
version 2.6.5

* NEWS: Record release date.

12 years agoregen
Akim Demaille [Wed, 7 Nov 2012 16:33:14 +0000 (17:33 +0100)] 
regen

12 years agotests: syntax-check
Akim Demaille [Wed, 7 Nov 2012 16:31:32 +0000 (17:31 +0100)] 
tests: syntax-check

* tests/actions.at: Fix typo.

12 years agotests: beware of compilers that do not support POSIXLY_CORRECT
Akim Demaille [Wed, 7 Nov 2012 16:23:06 +0000 (17:23 +0100)] 
tests: beware of compilers that do not support POSIXLY_CORRECT

Running "maintainer-release-check" on OS X with Clang 2.9 fails,
because "clang-mp-2.9 -o test -g test.c" launches "/usr/bin/dsymutil
test -o test.dSYM" which fails with "error: unable to open executable
'-o'".

* m4/c-working.m4 (BISON_CHECK_WITH_POSIXLY_CORRECT)
(BISON_C_COMPILER_POSIXLY_CORRECT): New.
* configure.ac: Use the latter.
* tests/atlocal.in (POSIXLY_CORRECT_IS_EXPORTED): New.
* tests/local.at (AT_BISON_CHECK_WARNINGS_): Use it instead of computing its
value each time.
(AT_QUELL_VALGRIND): Skip tests that cannot work because of compilers
that do not support POSIXLY_CORRECT.

12 years agognulib: update
Akim Demaille [Wed, 7 Nov 2012 11:46:30 +0000 (12:46 +0100)] 
gnulib: update

12 years agotests: calc: modernize the use of locations
Akim Demaille [Tue, 6 Nov 2012 15:25:37 +0000 (16:25 +0100)] 
tests: calc: modernize the use of locations

* tests/calc.at: Don't initialize the location, let the parser
do it.
Use a $printer.
Change some testing input to be easier to distinguish (instead of always
"0 0" for instance).

12 years agotests: remove useless location initializations
Akim Demaille [Tue, 6 Nov 2012 14:42:50 +0000 (15:42 +0100)] 
tests: remove useless location initializations

* tests/actions.at, tests/calc.at: here.

12 years agolalr1.cc: always initialize yylval.
Akim Demaille [Thu, 1 Nov 2012 14:38:25 +0000 (15:38 +0100)] 
lalr1.cc: always initialize yylval.

* data/lalr1.cc: here.

12 years agotests: check that C and C++ objects can be linked together.
Akim Demaille [Tue, 6 Nov 2012 14:35:37 +0000 (15:35 +0100)] 
tests: check that C and C++ objects can be linked together.

* tests/local.at (AT_SKIP_IF_CANNOT_LINK_C_AND_CXX): New.
* tests/headers.at (Several parsers): Use it.

12 years agoyacc.c: also disable -Wuninitialized.
Akim Demaille [Tue, 6 Nov 2012 14:34:56 +0000 (15:34 +0100)] 
yacc.c: also disable -Wuninitialized.

* data/yacc.c (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN): For some versions
of GCC, -Wmaybe-uninitialized alone does not suffice.

12 years agoglr.cc, yacc.c: initialize yylloc properly
Akim Demaille [Tue, 6 Nov 2012 14:34:51 +0000 (15:34 +0100)] 
glr.cc, yacc.c: initialize yylloc properly

There are several issues to address here.  One is that yylloc should
be initialized when possible.  Another is that the push parser needs
to update yypushed_loc when the user modified it.  And if the parser
starts by a reduction of an empty, it uses the first location on the
stack, which, therefore, must also be initialized to this initial
location.

This is getting complex, especially since because initializing a
global (impure interface) is different from initializing a local
variable.  To simplify, the local yylloc is not initialized during its
definition.

* data/c.m4 (b4_yyloc_default_define): Replace by...
(b4_yyloc_default): this.
Adjust dependencies.
* data/glr.cc: Initialize yylloc.
* data/yacc.c (b4_declare_scanner_communication_variables):
Initialize yylloc during its definition.
Don't define yyloc_default.
(yypush_parse): The location formal is not const, as we might
initialize it.
(yyparse): Define yyloc_default.
Use it before running the user initial action.
Possibly update the first location on the stack, and the pushed
location after the user initial action.
* tests/actions.at (Initial locations): Check that the initial
location is correct.

12 years agoyacc.c, glr.c: a better YY_LOCATION_PRINT
Akim Demaille [Mon, 5 Nov 2012 15:58:24 +0000 (16:58 +0100)] 
yacc.c, glr.c: a better YY_LOCATION_PRINT

* data/c.m4 (b4_yy_location_print_define): New.
Now issues "short" locations, e.g., "1.1" instead of "1.1-1.1".
Was initially a function, but then we face "static but unused"
warnings.
Simpler as a macro.
* tests/local.at, data/glr.c, data/yacc.c: Use it instead of duplicating.
* tests/actions.at: Adjust expectations.

12 years agoyacc.c: simplify initialization
Akim Demaille [Mon, 5 Nov 2012 14:19:45 +0000 (15:19 +0100)] 
yacc.c: simplify initialization

* data/yacc.c: Fuse the initializations of yyssp, yyss and the like.
Remove an obsolete comment: we do initialize these initial stack
members (in some cases).

12 years agodoc: formatting changes
Akim Demaille [Sat, 3 Nov 2012 16:52:13 +0000 (17:52 +0100)] 
doc: formatting changes

* doc/bison.texi: In a pointer type.

12 years agoc++: fix position operator signatures
Akim Demaille [Sat, 3 Nov 2012 15:22:15 +0000 (16:22 +0100)] 
c++: fix position operator signatures

* data/location.cc (operator+=, operator-=): Remove const from return
type.

12 years agotests: remove useless location initialization.
Akim Demaille [Sat, 3 Nov 2012 16:29:07 +0000 (17:29 +0100)] 
tests: remove useless location initialization.

* tests/glr-regression.at: here.
glr.c does initialize yylloc.

12 years agotests: fix locations in C
Akim Demaille [Sat, 3 Nov 2012 16:15:43 +0000 (17:15 +0100)] 
tests: fix locations in C

* tests/local.at (AT_YYERROR_DEFINE): Don't display the end of the location
if it is not after its beginning.
* tests/actions.at, tests/cxx-type.at: Adjust the expected output.

12 years agotests: handle %parse-param in the generated yyerror
Akim Demaille [Sat, 3 Nov 2012 09:05:03 +0000 (10:05 +0100)] 
tests: handle %parse-param in the generated yyerror

* tests/local.at (AT_PARSE_PARAMS): New.
(AT_YYERROR_FORMALS, AT_YYERROR_DEFINE): Use it to add the parse-param
to yyerror.
* tests/calc.at, tests/regression.at: Use AT_YYERROR_DEFINE and
AT_YYERROR_DECLARE, now that they handle properly the parse-params.
Be sure to let AT_BISON_OPTION_PUSHDEFS now what parse-params are used.

12 years agotests: simplifications
Akim Demaille [Fri, 2 Nov 2012 17:20:56 +0000 (18:20 +0100)] 
tests: simplifications

* tests/actions.at (Exotic Dollars): Formatting changes.
Use AT_FULL_COMPILE.
(AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove useless initialization of @$.

12 years agogrammars: fix display of nul character in error message
Akim Demaille [Thu, 1 Nov 2012 12:47:12 +0000 (13:47 +0100)] 
grammars: fix display of nul character in error message

Reported by Marc Mendiola.
http://lists.gnu.org/archive/html/help-bison/2012-10/msg00017.html

* gnulib: Update to get quote_mem.
* src/scan-gram.l: Use it.
* tests/input.at (Invalid inputs): Additional checks.
* tests/named-refs.at: Likewise.

12 years agotests: sort
Akim Demaille [Thu, 1 Nov 2012 12:54:36 +0000 (13:54 +0100)] 
tests: sort

* tests/regression.at (Invalid inputs, Invalid inputs with {}): Move to...
* tests/input.at: here, for consistency.

12 years agotests: cosmetic changes
Akim Demaille [Thu, 1 Nov 2012 15:11:13 +0000 (16:11 +0100)] 
tests: cosmetic changes

* tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): Improve the
displayed title.

12 years agocomment changes
Akim Demaille [Thu, 1 Nov 2012 14:38:32 +0000 (15:38 +0100)] 
comment changes

* data/lalr1.cc: here.

12 years agoautoconf: update
Akim Demaille [Thu, 1 Nov 2012 14:36:44 +0000 (15:36 +0100)] 
autoconf: update

There are comment changes only in the files we use.

12 years agognulib: update
Akim Demaille [Thu, 1 Nov 2012 14:34:03 +0000 (15:34 +0100)] 
gnulib: update

12 years agoregen
Akim Demaille [Fri, 26 Oct 2012 12:23:18 +0000 (14:23 +0200)] 
regen

12 years agoyacc.c: initialize yylval and yylloc.
Akim Demaille [Fri, 26 Oct 2012 09:25:41 +0000 (11:25 +0200)] 
yacc.c: initialize yylval and yylloc.

When generating a pure push parser, the initialization of yylval and
yylloc may not be visible to the compiler.  With warnings enabled, GCC
4.3.6, 4.4.7, 4.5.4, and 4.6.3 report uninitialized uses of
yylval/yylloc.  Using local pragmas to disable these warnings is not
supported before 4.6, and 4.6 does not support it properly.  So
initialize yylval and yylloc at their definition.  Reported by Peter
Simons.  See
http://lists.gnu.org/archive/html/bison-patches/2012-10/msg00133.html

* data/c.m4 (b4_yyloc_default_define): New.
* data/yacc.c: Use it when locations are requested.
(YYLVAL_INITIALIZE): Replace by...
(YY_INITIAL_VALUE): this.
(yyparse): Initialize yylloc and yylval.
Therefore, remove the initialization of yylloc's field.
* data/glr.c: Likewise.

12 years agoregen
Akim Demaille [Thu, 25 Oct 2012 12:49:11 +0000 (14:49 +0200)] 
regen

12 years agoyacc.c: don't use _Pragma GCC diagnostic with 4.6
Akim Demaille [Thu, 25 Oct 2012 12:45:36 +0000 (14:45 +0200)] 
yacc.c: don't use _Pragma GCC diagnostic with 4.6

Reported by Peter Simons.
http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00033.html

* data/yacc.c (b4_declare_scanner_communication_variables): 4.7
seems fine though.

12 years agoregen
Akim Demaille [Fri, 26 Oct 2012 12:27:32 +0000 (14:27 +0200)] 
regen

12 years agoyacc.c: do not define location support when not using locations
Akim Demaille [Fri, 26 Oct 2012 08:31:55 +0000 (10:31 +0200)] 
yacc.c: do not define location support when not using locations

* data/yacc.c (YYLLOC_DEFAULT, YYRHSLOC): Don't define when not
using locations.

12 years agomaint: be compilable with GCC 4.0
Akim Demaille [Fri, 26 Oct 2012 12:16:29 +0000 (14:16 +0200)] 
maint: be compilable with GCC 4.0

The "shadows a global declaration" warning in GCC 4.0 was a bit
annoying.  It does not like that a type name be used in a prototype of
a function (not the implementation, just the declaration):

  In file included from src/LR0.c:38:
  src/reader.h:56: warning: declaration of 'named_ref' shadows a
                            global declaration
  src/named-ref.h:35: warning: shadowed declaration is here

It does not like either when a global variable name is used in a
prototype.  Flex 2.5.37 generates this prototype:

  void gram_set_debug (int debug_flag  );

* src/getargs.h, src/getargs.c (debug_flag): Rename as...
(debug): this.
Adjust dependencies.
* src/reader.h: Don't use "named_ref" as a formal argument name.

12 years agotests: address a warning from GCC 4.4
Akim Demaille [Thu, 25 Oct 2012 12:42:24 +0000 (14:42 +0200)] 
tests: address a warning from GCC 4.4

236. torture.at:465: testing Exploding the Stack Size with Alloca ...
../../../tests/torture.at:474: bison -o input.c input.y
../../../tests/torture.at:474: $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
stderr:
cc1: warnings being treated as errors
input.y: In function 'main':
input.y:60: error: 'status' may be used uninitialized in this function

* tests/torture.at (AT_DATA_STACK_TORTURE): Initial status to avoid
the previous error.

12 years agotests: don't use options that Clang does not support
Akim Demaille [Thu, 25 Oct 2012 12:26:09 +0000 (14:26 +0200)] 
tests: don't use options that Clang does not support

* configure.ac (WARN_CFLAGS, WARN_CXXFLAGS): Do not include options
that Clang does not support.

12 years agotests: restore the tests on -Werror
Akim Demaille [Thu, 25 Oct 2012 10:28:35 +0000 (12:28 +0200)] 
tests: restore the tests on -Werror

When run as /bin/sh, Bash sets the shell variable POSIXLY_CORRECT to
y.  The test suite checks for the envvar POSIXLY_CORRECT to turn of
some tests not supported in POSIX mode.  Restore these tests.

Reported by the Hydra build farm, from Rob Vermaas.

* tests/local.at (AT_BISON_CHECK_WARNINGS_): Check the envvar
POSIXLY_CORRECT, not the shell variable.

12 years agoregen
Akim Demaille [Thu, 25 Oct 2012 07:42:03 +0000 (09:42 +0200)] 
regen

12 years agoparse-gram: update the Bison interface
Akim Demaille [Thu, 25 Oct 2012 07:34:00 +0000 (09:34 +0200)] 
parse-gram: update the Bison interface

* src/parse-gram.y (%pure-parser, %name-prefix): Replace with...
(%define api.pure, %define api.prefix)
* src/location.h, src/scan-gram.h: Adjust to api.prefix.

12 years agofix comment
Akim Demaille [Thu, 25 Oct 2012 07:40:20 +0000 (09:40 +0200)] 
fix comment

* data/c.m4 (b4_YYDEBUG_define): here.

12 years agomaint: post-release administrivia
Akim Demaille [Tue, 23 Oct 2012 11:58:51 +0000 (13:58 +0200)] 
maint: post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

12 years agoversion 2.6.4 v2.6.4
Akim Demaille [Tue, 23 Oct 2012 11:46:28 +0000 (13:46 +0200)] 
version 2.6.4

* NEWS: Record release date.

12 years agoregen
Akim Demaille [Mon, 22 Oct 2012 16:14:54 +0000 (18:14 +0200)] 
regen

12 years ago2.6.4: botched 2.6.3
Akim Demaille [Mon, 22 Oct 2012 16:13:15 +0000 (18:13 +0200)] 
2.6.4: botched 2.6.3

* NEWS: here.

12 years agomaint: post-release administrivia
Akim Demaille [Mon, 22 Oct 2012 13:28:10 +0000 (15:28 +0200)] 
maint: post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

12 years agoversion 2.6.3 v2.6.3
Akim Demaille [Mon, 22 Oct 2012 13:16:12 +0000 (15:16 +0200)] 
version 2.6.3

* NEWS: Record release date.

12 years agognulib: update
Akim Demaille [Fri, 19 Oct 2012 09:36:18 +0000 (11:36 +0200)] 
gnulib: update

12 years agotests: check %no-lines
Akim Demaille [Fri, 12 Oct 2012 08:10:18 +0000 (10:10 +0200)] 
tests: check %no-lines

* tests/synclines.at: here.

12 years agoNEWS: warnings with clang
Akim Demaille [Mon, 8 Oct 2012 11:46:50 +0000 (13:46 +0200)] 
NEWS: warnings with clang

* NEWS: here.

12 years agowarnings: avoid warnings from clang
Akim Demaille [Mon, 8 Oct 2012 07:17:20 +0000 (09:17 +0200)] 
warnings: avoid warnings from clang

Fix the following warning

  parse-gram.c:2078:14: error: equality comparison with extraneous parentheses
                        [-Werror,-Wparentheses-equality]
    if (((yyn) == (-91)))
         ~~~~~~^~~~~~~~
  parse-gram.c:2078:14: note: remove extraneous parentheses around the
                        comparison to silence this warning
    if (((yyn) == (-91)))
        ~      ^       ~
  parse-gram.c:2078:14: note: use '=' to turn this equality comparison into
                        an assignment
    if (((yyn) == (-91)))
               ^~
               =
  1 error generated.

and the following one:

  input.cc:740:1: error: function declared 'noreturn' should not return
                         [-Werror,-Winvalid-noreturn]
  static void yyMemoryExhausted (yyGLRStack* yystackp)
    __attribute__ ((__noreturn__));
  static void
  yyMemoryExhausted (yyGLRStack* yystackp)
  {
    YYLONGJMP (yystackp->yyexception_buffer, 2);
  }
  ^
  1 warning and 1 error generated.

This is Apple clang version 3.1 (tags/Apple/clang-318.0.61).

* data/c.m4 (b4_table_value_equals): Use (!!(A == B)) instead of (A == B)
to avoid this warning.
Any reasonable compiler should generate the same code.
* src/uniqstr.h (UNIQSTR_EQ): Likewise.
* data/glr.c (LONGJMP): abort after longjmp to pacify clang.

12 years agotests: no longer disable -O compiler options
Akim Demaille [Mon, 8 Oct 2012 07:02:09 +0000 (09:02 +0200)] 
tests: no longer disable -O compiler options

Tests are running without -O since
f377f69fec28013c79db4efe12bbb9d48987fb2c because some warnings (about
yylval not being initialized) show only when GCC is given -O2.  The
previous patch fixes the warnings. Run the test suite with compiler
options unmodified.

* tests/atlocal.in (O0CFLAGS, O0CXXFLAGS): Remove, use CFLAGS and
CXXFLAGS.

12 years agoyacc.c: initialize yylval in pure-parser mode
Paul Eggert [Fri, 5 Oct 2012 17:55:11 +0000 (10:55 -0700)] 
yacc.c: initialize yylval in pure-parser mode

See http://lists.gnu.org/archive/html/bison-patches/2012-08/msg00024.html
(spreading over September and October).

* data/yacc.c (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN)
(YY_IGNORE_MAYBE_UNINITIALIZED_END, YYLVAL_INITIALIZE):
New macros.  Use them to suppress an unwanted GCC diagnostic.

12 years agoskeletons: style changes
Akim Demaille [Mon, 8 Oct 2012 07:12:10 +0000 (09:12 +0200)] 
skeletons: style changes

* data/yacc.c, data/glr.c: Prefer Title case for (CPP) macro arguments.

12 years agotests: minor improvements
Akim Demaille [Thu, 20 Sep 2012 09:42:06 +0000 (11:42 +0200)] 
tests: minor improvements

* tests/c++.at: Space changes.
Use AT_YYERROR_DEFINE.
* tests/local.at (AT_YYERROR_DEFINE): Issue errors on unknown languages.

12 years agotests: use $PERL instead of perl
Akim Demaille [Fri, 5 Oct 2012 07:24:59 +0000 (09:24 +0200)] 
tests: use $PERL instead of perl

* tests/atlocal.in (PERL): New.
Sort.
* tests/calc.at, tests/input.at, tests/local.at, tests/regression.at,
* tests/skeletons.at, tests/synclines.at, tests/torture.at: here.

12 years agobuild: look for Perl in configure.
Akim Demaille [Sun, 8 Apr 2012 06:58:43 +0000 (08:58 +0200)] 
build: look for Perl in configure.

Bison uses "/usr/bin/perl" or "perl" in several places, and it does
not appear to be a problem.  But, at least to make it simpler to
change PERL on the make command line, check for perl in configure.

* configure.ac (PERL): New.
* doc/Doxyfile.in, doc/Makefile.am, tests/bison.in: Use it.

12 years agotests: fix sed portability issues
Akim Demaille [Fri, 5 Oct 2012 07:20:30 +0000 (09:20 +0200)] 
tests: fix sed portability issues

Reported by Didier Godefroy,
<http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00005.html>.

* tests/calc.at (AT_CHECK_SPACES): Use Perl.

12 years agotests: diff -u is not portable
Akim Demaille [Fri, 5 Oct 2012 06:54:15 +0000 (08:54 +0200)] 
tests: diff -u is not portable

Reported by Didier Godefroy
<http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00006.html>.

* tests/existing.at (AT_LALR1_DIFF_CHECK): Skip if diff -u does not
work.

12 years agomaint: word changes
Akim Demaille [Thu, 4 Oct 2012 09:45:09 +0000 (11:45 +0200)] 
maint: word changes

* README-hacking (Typical errors): Improve wording.

12 years agolalr1.cc: fix test suite portability
Akim Demaille [Thu, 4 Oct 2012 07:07:42 +0000 (09:07 +0200)] 
lalr1.cc: fix test suite portability

Reported by Rob Vermaas' Hydra build farm on x86_64-darwin 10.2.0 with
G++ 4.6.3.

* tests/headers.at (Several parsers): Include AT_DATA_SOURCE_PROLOGUE
in the files to compile.
* data/location.cc: Do not include twice string and iostream (once
by position.hh, and then by location.hh).
* README-hacking (Typical errors): Some hints for other maintainers.

12 years agomaint: fix an erroneous include
Theophile Ranquet [Wed, 3 Oct 2012 15:26:56 +0000 (15:26 +0000)] 
maint: fix an erroneous include

This fixes test 130 (Several parsers).

* data/location.cc: Include <iostream> rather than <iosfwd> since
we really need << on strings for instance.
* NEWS: Document this.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
12 years agotests: check that headers are self contained
Akim Demaille [Wed, 3 Oct 2012 07:17:58 +0000 (09:17 +0200)] 
tests: check that headers are self contained

Reported by Alexandre Duret-Lutz.

* tests/headers.at (Several parsers): here.

12 years agodoc: add missing documentation for --report
Akim Demaille [Wed, 3 Oct 2012 06:43:10 +0000 (08:43 +0200)] 
doc: add missing documentation for --report

* doc/bison.texi (Bison Options): Document --report's "solved", "all",
and "none".

12 years agoheaders: move CPP guards into YY_*_INCLUDED to avoid collisions
Akim Demaille [Thu, 27 Sep 2012 07:43:49 +0000 (09:43 +0200)] 
headers: move CPP guards into YY_*_INCLUDED to avoid collisions

See <http://lists.gnu.org/archive/html/bug-bison/2012-09/msg00016.html>.

* data/c.m4 (b4_cpp_guard): Prepend YY_ and append _INCLUDED.
* tests/headers.at: Adjust.
* NEWS, doc/bison.texi: Document.

12 years agominor changes.
Akim Demaille [Thu, 27 Sep 2012 07:42:57 +0000 (09:42 +0200)] 
minor changes.

* NEWS: Word changes.
* doc/bison.texi: Spell check.
Fix minor issues.
* tests/headers.at: Comment and formatting changes.

12 years agognulib: update
Akim Demaille [Fri, 28 Sep 2012 13:04:57 +0000 (15:04 +0200)] 
gnulib: update

12 years agoregen
Akim Demaille [Fri, 21 Sep 2012 11:35:28 +0000 (13:35 +0200)] 
regen

12 years agoyacc: fix handling of CPP guards when no header is generated
Akim Demaille [Fri, 21 Sep 2012 09:10:37 +0000 (11:10 +0200)] 
yacc: fix handling of CPP guards when no header is generated

When no header was to be generated, Bison would issue:

  /* In a future release of Bison, this section will be replaced
     by #include "".  */
  #ifndef YY_
  # define YY_

It now properly generates nothing.

* data/c.m4 (b4_cpp_guard_open, b4_cpp_guard_close): Issue nothing when
the file name is empty.
* data/yacc.c: Do not generate the above comment when there is no header
to generate.
* NEWS: Update.

12 years agognulib: update
Akim Demaille [Thu, 20 Sep 2012 15:04:55 +0000 (17:04 +0200)] 
gnulib: update

12 years agomaint: remove useless file
Akim Demaille [Tue, 4 Sep 2012 08:58:23 +0000 (10:58 +0200)] 
maint: remove useless file

* externals/bootstrap.cfg: Remove.
This file was used by a specific build system.
It was added to the master repository by accident.

12 years agoupdate files to ignore
Akim Demaille [Tue, 4 Sep 2012 08:48:26 +0000 (10:48 +0200)] 
update files to ignore

* doc/.gitignore: Don't ignore split info files as we don't split our
info file.
See <http://lists.gnu.org/archive/html/bug-bison/2012-08/msg00006.html>.

12 years agoremove useless include
Akim Demaille [Tue, 4 Sep 2012 07:49:17 +0000 (09:49 +0200)] 
remove useless include

* src/system.h: Don't include sys/types.h.
Reported by Eric Blake,
<http://lists.gnu.org/archive/html/bug-bison/2012-09/msg00002.html>.
(FUNCTION_PRINT): Remove, unused.

12 years agouse locale-indep. c_is* functions for parsing, not isspace, isprint etc
Jim Meyering [Sun, 5 Aug 2012 11:28:01 +0000 (13:28 +0200)] 
use locale-indep. c_is* functions for parsing, not isspace, isprint etc

* src/parse-gram.y: Include "c-ctype.h".
(add_param): Parse with c_isspace, not isspace.
* src/parse-gram.c: Likewise.
* src/scan-gram.l: Include c-ctype.h, not ctype.h.
(SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER): Use c_isspace and c_isprint,
not ctype.h's locale-dependent functions.

12 years agognulib: update
Akim Demaille [Mon, 3 Sep 2012 08:56:54 +0000 (10:56 +0200)] 
gnulib: update

12 years ago--help: include a place to report translation issues
Akim Demaille [Fri, 31 Aug 2012 16:18:13 +0000 (18:18 +0200)] 
--help: include a place to report translation issues

http://lists.gnu.org/archive/html/bug-bison/2012-08/msg00007.html
shows that it is useful to help users report translation issues.
While at it, include other informative bits that the coreutils shows.

* src/getargs.c (usage): Report more URLs where the user can
refer to.
Mostly copied/pasted from coreutils' emit_ancillary_info function.

12 years agotests: style changes
Akim Demaille [Wed, 22 Aug 2012 12:26:26 +0000 (14:26 +0200)] 
tests: style changes

* tests/torture.at (AT_DATA_STACK_TORTURE): M4 style changes to
improve readability.
Fix an assertion which, because of a <= instead of ==, did not check
new_status as visibly meant.
(get_args): New.

12 years agotests: fix push-pull test
Akim Demaille [Wed, 22 Aug 2012 11:48:55 +0000 (13:48 +0200)] 
tests: fix push-pull test

* tests/torture.at: %push-pull-parser is no longer supported.

12 years agoyacc.c: style changes
Akim Demaille [Fri, 31 Aug 2012 15:50:31 +0000 (17:50 +0200)] 
yacc.c: style changes

* data/yacc.c: (yytoken): Define with initial value.

12 years agomaint: post-release administrivia
Akim Demaille [Fri, 3 Aug 2012 07:52:05 +0000 (09:52 +0200)] 
maint: post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

12 years agoversion 2.6.2 v2.6.2
Akim Demaille [Fri, 3 Aug 2012 07:43:02 +0000 (09:43 +0200)] 
version 2.6.2

* NEWS: Record release date.

12 years agoNEWS: update.
Akim Demaille [Thu, 2 Aug 2012 11:51:17 +0000 (13:51 +0200)] 
NEWS: update.

* NEWS: Catch up with the other changes from 2.6.1.

12 years agoyacc: remove trailing end of line at end of file
Akim Demaille [Thu, 2 Aug 2012 10:01:54 +0000 (12:01 +0200)] 
yacc: remove trailing end of line at end of file

There are still spurious spaces at the end of some lines.  But this is
addressed in the master branch, and I am reluctant to try to backport
this.

* data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: here.
* tests/calc.at (AT_CHECK_SPACES): New.
Use it.
Be sure not to introduce trailing empty lines in the *.y files.
* NEWS: Doc it.
* cfg.mk (syntax-check): Remove the exception.

12 years agothanks: fix a contributor name
Akim Demaille [Thu, 2 Aug 2012 06:29:18 +0000 (08:29 +0200)] 
thanks: fix a contributor name

* THANKS: On his request.

12 years agognulib: update
Akim Demaille [Wed, 1 Aug 2012 07:59:49 +0000 (09:59 +0200)] 
gnulib: update

12 years agotests: synch line -> syncline, for consistency
Akim Demaille [Wed, 1 Aug 2012 06:27:28 +0000 (08:27 +0200)] 
tests: synch line -> syncline, for consistency

* tests/synclines.at: Do it, as "syncline" is used consistently
everywhere else in Bison.

12 years agotests: synclines: style changes
Akim Demaille [Wed, 1 Aug 2012 07:30:27 +0000 (09:30 +0200)] 
tests: synclines: style changes

* tests/synclines.at (AT_TEST_SYNCLINE): Rename as...
(AT_TEST): this.
Use pushdef/popdef.
Formatting changes.
Use '+' instead of '*' where appropriate.

12 years agotests: synclines: fix perl invocation
Akim Demaille [Wed, 1 Aug 2012 07:30:23 +0000 (09:30 +0200)] 
tests: synclines: fix perl invocation

Reported by Summum Bonum.

* tests/synclines.at: Fix Perl invocation: its -f is not like sed's.

12 years agoregen
Akim Demaille [Tue, 31 Jul 2012 12:18:43 +0000 (14:18 +0200)] 
regen

12 years agoc++: trailing end-of-lines in %parse-param
Akim Demaille [Tue, 31 Jul 2012 12:18:39 +0000 (14:18 +0200)] 
c++: trailing end-of-lines in %parse-param

* src/parse-gram.y (add_param): No only skip ' ' and '\t', skip all
leading and trailing spaces.
* tests/regression.at (Lex and parse params): Check it.
* NEWS: Document it.

12 years agotests: simplify
Akim Demaille [Tue, 31 Jul 2012 12:29:39 +0000 (14:29 +0200)] 
tests: simplify

* tests/regression.at: Remove useless compilations: AT_FULL_COMPILE
includes the compilation by bison.

12 years agouse obstack_printf
Akim Demaille [Mon, 30 Jul 2012 16:05:10 +0000 (18:05 +0200)] 
use obstack_printf

This is not just nicer, it is also much safer, since we were
using sprintf...

* bootstrap.conf: Require it.
* src/system.h (obstack_fgrow1, obstack_fgrow2, obstack_fgrow3)
(obstack_fgrow4): Remove.
Adjust dependencies.

12 years agoscanner: restore a missing start condition
Akim Demaille [Mon, 30 Jul 2012 12:54:27 +0000 (14:54 +0200)] 
scanner: restore a missing start condition

$ flex src/scan-skel.l
src/scan-skel.l:145: multiple <<EOF>> rules for start condition SC_AT_DIRECTIVE_ARGS
src/scan-skel.l:145: multiple <<EOF>> rules for start condition SC_AT_DIRECTIVE_SKIP_WS
This is warning, and it seems there are no means to make it an error.

* src/scan-skel.l: Restore the start-condition INITIAL for an <<EOF>>
clause.

12 years agognulib: update
Akim Demaille [Mon, 30 Jul 2012 12:53:58 +0000 (14:53 +0200)] 
gnulib: update

12 years agomaint: post-release administrivia
Akim Demaille [Mon, 30 Jul 2012 09:47:29 +0000 (11:47 +0200)] 
maint: post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.