Paul Eggert [Fri, 3 Jan 2014 19:02:58 +0000 (11:02 -0800)]
doc: specify documentation encoding
* doc/bison.texi: Add '@documentencoding UTF-8'; needed since the
manual contains UTF-8 characters. This will cause the .info files
to contain UTF-8 quotes and the like, which should be OK nowadays.
Add @documentlanguage while we're at it.
Akim Demaille [Mon, 9 Dec 2013 15:29:05 +0000 (16:29 +0100)]
package: install the examples
Currently, we do not install the various examples extracted from the
documentation. Let's do it, as they are useful starting points.
* configure.ac: When --enable-gcc-warnings is set, enable ENABLE_GCC_WARNINGS.
* examples/extexi: No longer issue synclines by default.
* examples/local.mk: Except if ENABLE_GCC_WARNINGS.
* examples/calc++/local.mk, examples/mfcalc/local.mk,
* examples/rpcalc/local.mk: Install the example files.
Akim Demaille [Mon, 9 Dec 2013 15:14:15 +0000 (16:14 +0100)]
package: install README and the like in docdir
* Makefile.am: here.
Akim Demaille [Mon, 9 Dec 2013 14:26:52 +0000 (15:26 +0100)]
diagnostics: fix the order of multiple declarations reports
On
%token FOO "foo"
%printer {} "foo"
%printer {} FOO
we report
/tmp/foo.yy:2.10-11: error: %printer redeclaration for FOO
%printer {} "foo"
^^
/tmp/foo.yy:3.10-11: previous declaration
%printer {} FOO
^^
* src/symtab.c (locations_sort): New.
Use it.
* tests/input.at (Invalid Aliases): Stress the order of diagnostics.
Akim Demaille [Mon, 9 Dec 2013 14:40:07 +0000 (15:40 +0100)]
symbol: provide an easy means to compare them in source order
* src/symtab.c (symbols_sort): New.
(user_token_number_redeclaration): Taken from here.
Akim Demaille [Thu, 5 Dec 2013 14:16:28 +0000 (15:16 +0100)]
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
Akim Demaille [Thu, 5 Dec 2013 13:58:22 +0000 (14:58 +0100)]
version 3.0.2
* NEWS: Record release date.
Akim Demaille [Thu, 5 Dec 2013 13:39:30 +0000 (14:39 +0100)]
gnulib: update
* gnulib: here.
Akim Demaille [Wed, 4 Dec 2013 09:51:47 +0000 (10:51 +0100)]
output: do not generate source files when late errors are caught
Reported by Alexandre Duret-Lutz as "second problem" in:
http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html
* bootstrap.conf: We need the "unlink" module.
* src/files.h, src/files.c (unlink_generated_sources): New.
* src/output.c: Use it.
* tests/output.at: Check the case of late errors.
Akim Demaille [Wed, 4 Dec 2013 09:26:46 +0000 (10:26 +0100)]
output: record what generated files are source or report files
* src/files.h, src/files.c (output_file_name_check): Take an additional
argument to record whether a file is a source or report file.
* src/files.c (generated_file): New.
(file_names, file_names_count): Replace with...
(generated_files, generated_files_size): these.
* src/scan-skel.l: Adjust.
Akim Demaille [Wed, 4 Dec 2013 08:30:08 +0000 (09:30 +0100)]
output: do not generate source files when early errors are caught
Reported by Alexandre Duret-Lutz as "second problem" in:
http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html
One problem is that some errors are caught early, before the
generation of output files, while others can only be detected
afterwards (since, for instance, skeletons can raise errors
themselves).
This will be addressed in two steps: early errors do not generate
source files at all, while later errors will remove the files that
have already been generated.
* src/scan-skel.l (yyout): Open to /dev/null when there are errors.
* tests/output.at (AT_CHECK_FILES): Factored out of...
(AT_CHECK_OUTPUT): this.
Fuse the "SHELLIO" argument in the "FLAGS" one.
Use $5 to denote the expected exit status.
Add a test case for early errors.
Akim Demaille [Tue, 26 Nov 2013 15:23:52 +0000 (16:23 +0100)]
xml: also use "%empty" with html output
* data/xslt/xml2xhtml.xsl: No longer issue an Epsilon, display as in
dot and text formats.
Akim Demaille [Tue, 26 Nov 2013 15:20:55 +0000 (16:20 +0100)]
style: formatting changes
* src/print-xml.c: here.
Akim Demaille [Tue, 26 Nov 2013 15:20:52 +0000 (16:20 +0100)]
xml: also display %empty for empty right-hand sides
* data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl: Display %empty where needed.
Akim Demaille [Tue, 26 Nov 2013 14:24:53 +0000 (15:24 +0100)]
reports: display %empty in the generated pointed-rules
* src/print.c (print_core): Use %empty for empty rules.
* src/print_graph.c (print_core): Ditto.
* tests/conflicts.at, tests/output.at, tests/reduce.at: Adjust
expectations.
Akim Demaille [Tue, 26 Nov 2013 14:31:33 +0000 (15:31 +0100)]
news: YYERROR vs variants
Akim Demaille [Mon, 18 Nov 2013 09:29:23 +0000 (10:29 +0100)]
style: scope reduction in lalr.cc
* src/lalr.c: Shorten variable scopes.
(lookahead_tokens_print): Use the same variable name in two loops
iterating over the same structure.
Akim Demaille [Fri, 15 Nov 2013 09:10:41 +0000 (10:10 +0100)]
lalr1.cc: formatting changes
* data/lalr1.cc: Fix indentation.
Akim Demaille [Fri, 15 Nov 2013 09:08:31 +0000 (10:08 +0100)]
lalr1.cc: fix the support of YYERROR with variants
When variant are enabled, the yylhs variable (the left-hand side of
the rule being reduced, i.e. $$ and @$) is explicitly destroyed when
YYERROR is called. This is because before running the user code, $$
is initialized, so that the user can properly use it.
However, when quitting yyparse, yylhs is also reclaimed by the C++
compiler: the variable goes out of scope.
Instead of trying to be too smart, let the compiler do its job: reduce
the scope of yylhs to exactly the reduction. This way, whatever the
type of scope exit (regular, exception, return, goto...) this variable
will be properly reclaimed.
Reported by Paolo Simone Gasparello.
<http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00003.html>
* data/lalr1.cc (yyparse): Reduce the scope of yylhs.
* tests/c++.at: We now pass this test.
Akim Demaille [Fri, 15 Nov 2013 08:43:01 +0000 (09:43 +0100)]
tests: check $$'s destruction with variant, YYERROR, and no error recovery
When variant are enabled, the yylhs variable (the left-hand side of
the rule being reduced, i.e. $$ and @$) is explicitly destroyed when
YYERROR is called. This is because before running the user code, $$
is initialized, so that the user can properly use it.
However, when quitting yyparse, yylhs is also reclaimed by the C++
compiler: the variable goes out of scope.
This was not detected by the test suite because (i) the Object tracker
was too weak, and (ii) the problem does not show when there is error
recovery.
Reported by Paolo Simone Gasparello.
<http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00003.html>
* tests/c++.at (Exception safety): Improve the objects logger to make
sure that we never destroy twice an object.
Also track copy-constructors.
Use a set instead of a list.
Display the logs before running the function body, this is more
useful in case of failure.
Generalize to track with and without error recovery.
Akim Demaille [Thu, 14 Nov 2013 15:58:42 +0000 (16:58 +0100)]
tests: simplify useless obfuscation
* tests/c++.at: $$ is not special for M4, there is no need to "escape"
it.
Akim Demaille [Thu, 14 Nov 2013 15:14:39 +0000 (16:14 +0100)]
skeletons: use better names when computing a "goto"
* data/glr.c (yyLRgotoState): Name the symbol argument yysym, instead
of yylhs.
* data/lalr1.cc (yy_lr_goto_state_): Likewise.
* data/lalr1.java (yy_lr_goto_state_): New, modeled after the previous
two routines.
Use it.
Akim Demaille [Tue, 12 Nov 2013 17:37:14 +0000 (18:37 +0100)]
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
Akim Demaille [Tue, 12 Nov 2013 14:55:33 +0000 (15:55 +0100)]
version 3.0.1
* NEWS: Record release date.
Akim Demaille [Tue, 12 Nov 2013 14:46:27 +0000 (15:46 +0100)]
aver: it is no longer "protected against NDEBUG"
Apply the same rules for aver as for assert: no side effects,
especially not important ones.
* src/AnnotationList.c, src/muscle-tab.c: Adjust aver uses to resist
to -DNDEBUG.
Akim Demaille [Fri, 8 Nov 2013 09:52:15 +0000 (10:52 +0100)]
parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with Flex
Flex also defines YY_NULL (to 0). Avoid gratuitous conflicts.
* data/c.m4 (b4_null_define): Rename YY_NULL as YY_NULLPTR.
* data/glr.c, data/lalr1.cc, data/location.cc, data/variant.hh,
* data/yacc.c, src/parse-gram.c, tests/actions.at, tests/c++.at,
* tests/cxx-type.at, tests/glr-regression.at, tests/headers.at,
* tests/push.at, tests/regression.at:
Adjust.
Akim Demaille [Tue, 5 Nov 2013 13:32:20 +0000 (14:32 +0100)]
build: use Automake 1.14's non-recursive Makefile features
* configure.ac: Require Automake 1.14.
* examples/calc++/local.mk, examples/local.mk, examples/mfcalc/local.mk,
* examples/rpcalc/local.mk, tests/local.mk: Use %D% and %C%.
Akim Demaille [Tue, 5 Nov 2013 13:15:15 +0000 (14:15 +0100)]
build: restore maintainer-push-check
* tests/local.mk: here.
Akim Demaille [Wed, 23 Oct 2013 08:57:51 +0000 (10:57 +0200)]
c++: use __attribute__((__pure__)) to avoid warnings
Building C++ parsers with -Wsuggest-attribute=const and
-Wsuggest-attribute=noreturn triggers warning in generated code.
* data/lalr1.cc: Call b4_attribute_define.
(debug_stream, debug_level): Flag as pure.
* tests/headers.at (Several parsers): There are now more YY macros
that "leak".
Akim Demaille [Wed, 23 Oct 2013 08:57:09 +0000 (10:57 +0200)]
skeletons: update the handling of compiler attributes
* data/c.m4 (b4_attribute_define): Instead of defining __attribute__,
define YY_ATTRIBUTE conditionally.
(YY_ATTRIBUTE_PURE, YY_ATTRIBUTE_UNUSED, _Noreturn): New.
Use them.
* data/glr.c: Use them.
Akim Demaille [Wed, 23 Oct 2013 08:25:47 +0000 (10:25 +0200)]
gnulib: update
Akim Demaille [Wed, 23 Oct 2013 13:03:45 +0000 (15:03 +0200)]
style: use /* ... */ comments
* src/complain.c: Here.
Akim Demaille [Wed, 23 Oct 2013 13:04:15 +0000 (15:04 +0200)]
tests: skip C++ tests that are too demanding for some compilers
Some tests now fail when compiled with G++ 4.3 or 4.4 on MacPorts.
* tests/local.at (AT_SKIP_IF_EXCEPTION_SUPPORT_IS_POOR): New.
* tests/c++.at (Exception safety): Use it.
Akim Demaille [Tue, 22 Oct 2013 15:32:49 +0000 (17:32 +0200)]
install: do not install yacc.1 when --disable-yacc
* configure.ac (ENABLE_YACC): New conditional.
(YACC_SCRIPT, YACC_LIBRARY): Remove.
* lib/local.mk, src/local.mk: Use the former instead of the latter.
* doc/local.mk: Use ENABLE_YACC to avoid installing yacc.1.
Akim Demaille [Tue, 22 Oct 2013 14:43:17 +0000 (16:43 +0200)]
style: avoid tabs
* src/scan-code.l: here.
Akim Demaille [Tue, 22 Oct 2013 14:30:12 +0000 (16:30 +0200)]
c++: fix generated doxygen comments
* configure.ac: Enable -Wdocumentation if supported.
* data/lalr1.cc: Fix comments.
Akim Demaille [Tue, 22 Oct 2013 14:29:22 +0000 (16:29 +0200)]
fix: uniqstr are already pointers
* src/uniqstr.c (uniqstr_assert): Remove incorrect double indirection,
and now useless cast.
Paul Eggert [Mon, 21 Oct 2013 22:21:32 +0000 (15:21 -0700)]
bison: pacify Sun C 5.12
* src/scan-code.l (show_sub_message):
Redo initializations to work around a bogus Sun C 5.12 warning.
(parse_ref): Remove unreachable code that Sun C 5.12 complains about.
* src/uniqstr.h (uniqstr_vsprintf): Use
_GL_ATTRIBUTE_FORMAT_PRINTF (...) instead of __attribute__
((__format__ (__printf__, ...))). Otherwise, Sun C 5.12
complains about an unknown attribute.
Paul Eggert [Mon, 21 Oct 2013 22:17:16 +0000 (15:17 -0700)]
maint: git now ignores rpcalc
* examples/rpcalc/.gitignore: Ignore rpcalc.
Paul Eggert [Mon, 21 Oct 2013 22:16:43 +0000 (15:16 -0700)]
build: examples/calc++/calc++ requires flex
* configure.ac (FLEX_CXX_WORKS): New AM_CONDITIONAL.
* examples/calc++/local.mk (examples/calc++/calc++):
Build if FLEX_CXX_WORKS, not BISON_CXX_WORKS.
Paul Eggert [Mon, 21 Oct 2013 22:13:52 +0000 (15:13 -0700)]
maint: mention help2man, texinfo, apt-get
* README-hacking: Add help2man, texinfo.
Describe how to add packages if you're using Debian.
Paul Eggert [Mon, 21 Oct 2013 22:12:13 +0000 (15:12 -0700)]
maint: git now ignores .log and .trs files
* .gitignore: Add *.log, *.trs.
Akim Demaille [Fri, 18 Oct 2013 14:22:23 +0000 (16:22 +0200)]
tests: fix incorrect object construction
Reported by Ken Moffat.
http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00009.html
* tests/c++.at (Exception safety): Here.
Akim Demaille [Wed, 16 Oct 2013 13:19:44 +0000 (15:19 +0200)]
glr: allow spaces between "%?" and "{" in predicates
Reported by Rici Lake.
http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00004.html
http://stackoverflow.com/questions/
19330171/
* src/scan-gram.l: Do not try to be too smart when diagnosing invalid
directives.
* tests/glr-regression.at (Predicates): New test.
Akim Demaille [Wed, 16 Oct 2013 08:55:28 +0000 (10:55 +0200)]
diagnostics: "-Werror -Wno-error=foo" must not emit errors
Currently "-Werror -Wno-error=foo" still turns "foo" warnings into errors.
Reported by Alexandre Duret-Lutz.
See http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html.
* src/complain.c (errority, errority_flag): New.
(complain_init): Initialize the latter.
(warning_argmatch): Extract the loop iterating on the flag's bits.
Set and unset errority_flag here.
(warnings_argmatch): -Wno-error is not the same as -Wno-error=everything:
we must remember if category foo was explicitly turned in an error/warning
via -W(no-)error=foo.
(warning_severity): Use errority_flag.
* tests/input.at (Symbols): Just check --yacc, not -Wyacc, that's the
job of tests on -W.
(-Werror is not affected by -Wnone and -Wall): Rename as...
(-Werror combinations): this.
Tests more combinations of -W, -W(no-)error, and -W(no-)error=foo.
* tests/local.at (AT_BISON_CHECK_WARNINGS): Don't expect -Werror
to turn runs that issue warnings into runs with errors, as the
warnings might be enforced as warnings by -Wno-error=foo, in which
case -Werror does not change anything.
* doc/bison.texi (Bison Options): Try to be clearer about how
-W(no-)error and -W(no-)error=foo interact.
Akim Demaille [Tue, 8 Oct 2013 11:01:24 +0000 (13:01 +0200)]
comment changes
* src/complain.h, src/complain.c: More documentation, more comments.
Andreas Schwab [Fri, 27 Sep 2013 22:00:34 +0000 (00:00 +0200)]
location: fix EOF check
* location.c (location_caret): Use int, not char, for values from
getc.
Akim Demaille [Thu, 19 Sep 2013 14:45:09 +0000 (16:45 +0200)]
style: variant: remove empty line
* data/variant.hh (b4_symbol_constructor_define_): Remove
stray eol.
Akim Demaille [Thu, 19 Sep 2013 13:27:19 +0000 (15:27 +0200)]
glr: more assertions
* data/glr.c (yyaddDeferredAction, yyglrShiftDefer, yypdumpstack):
More assertions.
Akim Demaille [Thu, 19 Sep 2013 13:01:24 +0000 (15:01 +0200)]
glr: shorten scopes
* data/glr.c (yyglrReduce): Define yyflag with its value.
Akim Demaille [Thu, 19 Sep 2013 13:00:32 +0000 (15:00 +0200)]
glr: formatting changes
* data/glr.c: here.
Akim Demaille [Thu, 19 Sep 2013 12:58:57 +0000 (14:58 +0200)]
glr: better use of tracing macros
* data/glr.c (yydestroyGLRState): Use YY_SYMBOL_PRINT instead of
yy_symbol_print.
Akim Demaille [Thu, 19 Sep 2013 13:20:22 +0000 (15:20 +0200)]
examples: improve the output of the "variant" example
* examples/variant.yy: Improve the printing of lists.
Akim Demaille [Thu, 19 Sep 2013 13:03:01 +0000 (15:03 +0200)]
variant: remove useless assertion
* data/variant.hh (move): Remove precondition assertion which is
ensured by the first call of the body (this precondition is also one
of "build").
Akim Demaille [Thu, 19 Sep 2013 13:51:32 +0000 (15:51 +0200)]
tests: remove stray debugging traces
* tests/atlocal.in: Remove traces.
Be ready to remove conftest.dSYM generated on OS X.
Akim Demaille [Wed, 4 Sep 2013 15:23:37 +0000 (17:23 +0200)]
tests: do not use grep -q
Reported by Daniel Galloway.
http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00020.html
* tests/java.at: Ignore grep's output instead.
Paul Eggert [Sun, 25 Aug 2013 01:22:22 +0000 (18:22 -0700)]
build: don't require flex for ordinary builds
* configure.ac (LEX): Don't fail if this is lex, as flex is not
required for ordinary builds. Instead, issue a warning and
substitute a no-op LEX. Reported by Michael Felt in
<http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00009.html>.
Paul Eggert [Sun, 25 Aug 2013 01:00:25 +0000 (18:00 -0700)]
maint: update .gitignore
* .gitignore: Add *.eps, *.o, *.pdf, *.png, *.stamp, *~,
.deps, .dirstamp. Needed to suppress unwanted chatter from
'git status' after a bootstrap build.
Paul Eggert [Sat, 24 Aug 2013 14:52:27 +0000 (07:52 -0700)]
build: port to pre-5.8.7 perl
* examples/local.mk (extract): Omit -f from perl options.
This doesn't work with perl versions before 5.8.7
that are configured without USE_SITECUSTOMIZE.
Reported by Michael Felt in
<http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00006.html>.
Akim Demaille [Thu, 1 Aug 2013 14:11:27 +0000 (16:11 +0200)]
tests: minor change to make it easier to test other skeletons
* tests/c++.at (Variants): Pass the skeleton as argument.
Valentin Tolmer [Thu, 1 Aug 2013 12:53:54 +0000 (14:53 +0200)]
uniqstr: fix assertion
* src/uniqstr.c (uniqstr_assert): Really make sure str is a uniqstr,
not just whether some uniqstr with the same content was registered.
Akim Demaille [Thu, 1 Aug 2013 09:41:49 +0000 (11:41 +0200)]
build: ship the ASCII art figures
We don't ship the *.txt files that are used to build the info
file.
Reported by Colin Daley.
* doc/figs/example.txt: New.
* doc/local.mk (bison.info): Depend on the txt files.
And ship them.
Akim Demaille [Thu, 1 Aug 2013 09:19:05 +0000 (11:19 +0200)]
doc: prefer the ".gv" extension to ".dot"
See http://marc.info/?l=graphviz-devel&m=
129418103126092 for the
motivation (basically, some word processor now uses *.dot).
* doc/figs/example-reduce.dot: Rename as...
* doc/figs/example-reduce.gv: this.
* doc/figs/example-shift.dot: Rename as...
* doc/figs/example-shift.gv: this.
* doc/figs/example.dot: Rename as...
* doc/figs/example.gv: this.
* doc/local.mk: Adjust.
Akim Demaille [Thu, 25 Jul 2013 16:13:53 +0000 (18:13 +0200)]
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
Akim Demaille [Thu, 25 Jul 2013 15:55:58 +0000 (17:55 +0200)]
version 3.0
* NEWS: Record release date.
Akim Demaille [Thu, 25 Jul 2013 15:52:15 +0000 (17:52 +0200)]
regen
Akim Demaille [Thu, 25 Jul 2013 15:50:11 +0000 (17:50 +0200)]
news: prepare 3.0
* NEWS (3.0): Reorder.
Akim Demaille [Thu, 25 Jul 2013 15:45:19 +0000 (17:45 +0200)]
tests: fix invalid assignment when using variants in C++11
* tests/c++.at (Exception safety): In variant mode $$ is an instance
of Object. Assigning YY_NULL in C++98 is incorrect, but behaves ok,
as it assigns YY_NULL=0 using Object::operator= (char v). It is wrong
in C++11 as there is operator for "$$ = nullptr".
Akim Demaille [Thu, 25 Jul 2013 14:04:26 +0000 (16:04 +0200)]
yacc: beware of "uninitialized uses" warnings
Again some issues with the fact that yylval is reported by GCC as
possibly not initialized in some cases. Here, the case at hand is the
%destructor.
I am still not convinced that it is worth going all the trouble of
using pragmas to disable temporarily some warnings, instead of just
initializing the looking symbol once for all, but that's what Paul
voted for, see
<http://lists.gnu.org/archive/html/bison-patches/2012-10/msg00050.html>.
* data/c.m4 (b4_attribute_define): Define
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END,
YY_INITIAL_VALUE here, as we will need them in the generation of the
destructor function, which is defined in yacc.c before yyparse, which
was in charge of defining these macros.
* data/yacc.c (b4_declare_scanner_communication_variables): Simplify:
trying to factor the definitions of the case pure and impure is
too complex.
Actually, it is not even clear that this macro should really exist,
as even the calls are complex.
Be careful not to issue a lone ";", as this is a statement, and C90
forbids declarations after statements ; so write
"YY_INITIAL_VALUE(Decl;)", not "YY_INITIAL_VALUE(Decl);".
Akim Demaille [Thu, 25 Jul 2013 11:33:28 +0000 (13:33 +0200)]
gnulib: update
Akim Demaille [Wed, 3 Jul 2013 15:16:04 +0000 (17:16 +0200)]
tests: skip C++ tests if we can't compile a simple program
There are possible conflicts between gnulib replacement functions (in
<stdio.h>) and their C++ wrappers (in <stream>). Trying to address
these in configure seems too hard, and I don't know how to fix the issue
in gnulib. Cowardly avoid the problem by skipping C++ tests when this
happens.
Reported by Stefano Lattarini.
http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00001.html
* tests/atlocal.in (BISON_CXX_WORKS): Also set it to "skip" if we can't
compile a simple program using <stream>.
* tests/local.at: Comment changes.
Akim Demaille [Fri, 28 Jun 2013 06:33:33 +0000 (08:33 +0200)]
tests: fix 'find' portability issues
Reported by Stefano Lattarini.
http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00000.html
* tests/output.at (AT_CHECK_OUTPUT): Use Perl instead.
Akim Demaille [Mon, 24 Jun 2013 08:29:36 +0000 (10:29 +0200)]
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
Akim Demaille [Mon, 24 Jun 2013 08:21:33 +0000 (10:21 +0200)]
version 2.7.91
* NEWS: Record release date.
Akim Demaille [Mon, 24 Jun 2013 08:20:46 +0000 (10:20 +0200)]
NEWS: prepare for 2.7.91
* NEWS (2.7.91): Java push parsers.
Akim Demaille [Mon, 24 Jun 2013 07:32:22 +0000 (09:32 +0200)]
java: rename YYMORE as YYPUSH_MORE for consistency with C
http://lists.gnu.org/archive/html/bison-patches/2013-06/msg00008.html
* data/lalr1.java, doc/bison.texi, tests/javapush.at:
s/YYMORE/YYPUSH_MORE.
Akim Demaille [Fri, 21 Jun 2013 09:39:02 +0000 (11:39 +0200)]
tests: fix Java push failure when running with BISON_USE_PUSH_FOR_PULL
* tests/javapush.at (Trivial Push Parser with api.push-pull verification):
When push for pull is enabled, there is one such function generated.
Akim Demaille [Fri, 21 Jun 2013 09:28:01 +0000 (11:28 +0200)]
style: minor changes in the Java tests
* tests/java.at (AT_CHECK_JAVA_GREP): Ignore the exit status.
* tests/javapush.at (AT_CHECK_JAVA_GREP): Be more alike the previous
one.
Formating changes.
Remove stray debugging "jj" file.
Akim Demaille [Fri, 21 Jun 2013 09:17:05 +0000 (11:17 +0200)]
java: push: do not reset the error counter
* data/lalr1.java (parse): here, when in push-pull is in "both" mode.
This breaks the test suite, for instance
make check TESTSUITEFLAGS='-d 388 BISON_USE_PUSH_FOR_PULL=1'.
More generally make maintainer-push-check.
Akim Demaille [Thu, 13 Jun 2013 14:08:33 +0000 (16:08 +0200)]
build: add Valgrind suppression file for GNU/Linux
* build-aux/linux-gnu.valgrind: New.
* build-aux/local.mk: Ship it.
* configure.ac: Use it.
Dennis Heimbigner [Thu, 13 Jun 2013 08:08:19 +0000 (10:08 +0200)]
java: add push-parser support
* data/lalr1.java: Capture the declarations as m4 macros to avoid
duplication. When push parsing, the declarations occur at the class
instance level rather than within the parse() function.
Change the way that the parser state is initialized. For
push-parsing, the parse state declarations are moved to
"push_parse_initialize()", which is called on the first invocation of
"push_parse()". The %initial-action code is also inserted after the
invocation of "push_parse_initialize()".
The body of the parse loop is modified to return values at appropriate
points when doing push parsing. In order to make push parsing work,
it is necessary to divide YYNEWSTATE into two states: YYNEWSTATE and
YYGETTOKEN. On the first call to push_parse(), the state is
YYNEWSTATE. On all later entries, the state is set to YYGETTOKEN. The
YYNEWSTATE switch arm falls through into YYGETTOKEN. YYGETTOKEN
indicates that a new token is potentially needed. Normally, with a
pull parser, this new token would be obtained by calling "yylex()". In
the push parser, the value YYMORE is returned to the caller. On the
next call to push_parse(), the parser will return to the YYGETTOKEN
state and continue operation.
* tests/javapush.at: New test file for java push parsing.
* tests/testsuite.at: Use it.
* tests/local.mk: Adjust.
* doc/bison.texi (Java Push Parser Interface): New.
Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
Akim Demaille [Tue, 11 Jun 2013 13:26:48 +0000 (15:26 +0200)]
build: ship all the files, even if the C++ compiler is broken
* examples/calc++/local.mk: Be sure to ship calc++.test even if
the current C++ compiler is not sufficient to run the tests.
Dennis Heimbigner [Wed, 5 Jun 2013 08:03:16 +0000 (10:03 +0200)]
style: comment changes in Java skeleton
* data/lalr1.java: Here.
Akim Demaille [Mon, 3 Jun 2013 14:40:53 +0000 (16:40 +0200)]
tests: fix a G++ warning
* tests/c++.at: Use YY_NULL instead of 0 for the null pointer.
And formatting changes.
Akim Demaille [Mon, 3 Jun 2013 14:40:30 +0000 (16:40 +0200)]
build: fix a warning from clang
* src/muscle-tab.c: Declare local functions static.
Akim Demaille [Thu, 30 May 2013 13:28:44 +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.
Akim Demaille [Thu, 30 May 2013 13:02:52 +0000 (15:02 +0200)]
version 2.7.90
* NEWS: Record release date.
Akim Demaille [Thu, 30 May 2013 12:08:41 +0000 (14:08 +0200)]
style: syntax-check fixes
* data/yacc.c, src/Sbitset.c, src/Sbitset.h, src/muscle-tab.h,
* src/output.c, src/parse-gram.y, src/reader.c, src/symtab.c,
* src/uniqstr.c, src/uniqstr.h: Fix space before parens.
* cfg.mk (_space_before_paren_exempt): Add needed exceptions.
Akim Demaille [Wed, 29 May 2013 15:07:32 +0000 (17:07 +0200)]
xml: use %empty in the text output
* data/xslt/xml2text.xsl: here.
Akim Demaille [Wed, 29 May 2013 14:27:59 +0000 (16:27 +0200)]
build: locally disable new GCC warnings that fail on Flex generated code
* configure.ac: here.
Akim Demaille [Wed, 29 May 2013 14:26:53 +0000 (16:26 +0200)]
fix a memory leak
* src/print-xml.c (num_escape_bufs): New.
(print_xml): Be sure to release all the escape_bufs.
Akim Demaille [Wed, 29 May 2013 07:27:59 +0000 (09:27 +0200)]
regen
Akim Demaille [Wed, 29 May 2013 07:17:48 +0000 (09:17 +0200)]
build: be sure to include config.h first in the generated parser
Using %code for config.h is wrong, as some headers will already have
been included by Bison. In some cases, e.g., glibc's string.h, this
results in some declaration not being made for lack of definition of
_GNU_SOURCE, which is performed by config.h.
* src/parse-gram.y: here.
Akim Demaille [Wed, 29 May 2013 07:05:12 +0000 (09:05 +0200)]
Merge remote-tracking branch 'origin/maint'
* origin/maint:
maint: post-release administrivia
version 2.7.1
regen
Petr Machata [Fri, 17 May 2013 15:23:14 +0000 (17:23 +0200)]
drop unused options --raw, -n, -e, --include and -I
* --raw appears to be ignored. It was marked as obsolete in the
commit
ec3bc39, and documented as no longer supported as of 1.29
(2001-09-07). Support for %raw appears to have been dropped in
e9955c83 on 2002-06-11, but --raw was kept around. Maybe it's time
to drop it as well?
* Commit
e9955c83 dropped support for %no-parser as well, and
converted it to option. --no-parser was later dropped in
728c4be2
on 2007-08-12, but -n was kept around, probably as an omission. All
three are documented as removed since 2.3b (2008-05-27).
* -e existed for a single day in 2001. It was introduced in
eeeb962b
on 2001-11-27. The handling was removed in
c7925b99 on 2001-11-28,
but "e" was kept in the list of short options. Probably an
omission.
* --include appears to be dead code. The option sets a variable, but
that variable is not used anywhere. It was added in
f6bd5427 on
2001-11-26 as a %-directive, with comments that it's not yet
implemented. It was converted to a command-line option later, but
doesn't seem to ever have been actually implemented.
Signed-off-by: Petr Machata <pmachata@redhat.com>
Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
Akim Demaille [Tue, 28 May 2013 14:38:26 +0000 (16:38 +0200)]
gnulib: update
Akim Demaille [Mon, 22 Apr 2013 11:55:00 +0000 (13:55 +0200)]
diagnostics: always point to the first directive
Some directives cannot be used several times (e.g., a given symbol may
only have a single printer). In case of repeated definitions, an
error is issued for the second definition, yet it is not discarded,
and becomes the definition used for the rest of the file.
This is not consistent with the idea that multiple definitions are not
allowed: discard any repeated directive.
* src/symtab.c (symbol_type_set, symbol_code_props_set)
(semantic_type_code_props_set, symbol_class_set, symbol_translation):
Discard repeated directives.
* tests/input.at (Default %printer and %destructor redeclared)
(Per-type %printer and %destructor redeclared): Update expectations.
Akim Demaille [Mon, 22 Apr 2013 11:47:50 +0000 (13:47 +0200)]
tests: factor test for printer/desctructor redefined
* tests/input.at (Default %printer and %destructor redeclared):
Introduce AT_TEST to factor.
Akim Demaille [Mon, 22 Apr 2013 09:26:28 +0000 (11:26 +0200)]
diagnostics: use appropriate location for useless precedence/associativity
* src/symtab.c (symbol_precedence_set): Use prec_location, not
location (which is the first occurrence of the symbol, possibly just
%token).
Also, as redefinitions are not allowed, keep the first values, not
the subsequent ones.
* tests/conflicts.at, tests/existing.at, tests/regression.at: Adjust.
Akim Demaille [Mon, 22 Apr 2013 09:13:09 +0000 (11:13 +0200)]
tests: factor duplicate expected warnings
* tests/existing.at: Instead of "t ? abc : aBc", write "a(t?b:B)c".