Commit Graph

358 Commits

Author SHA1 Message Date
Akim Demaille
aaf6103699 news: fix typo.
* NEWS: here.
Reported by Ben Pfaff.
2012-07-20 10:01:48 +02:00
Akim Demaille
a4107f24bc maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-07-19 15:38:29 +02:00
Akim Demaille
1505e8bb78 version 2.6
* NEWS: Record release date.
2012-07-19 15:24:23 +02:00
Akim Demaille
58c7e5ee2c maint: prepare for release 2.6
* NEWS: here.
2012-07-19 15:21:32 +02:00
Akim Demaille
ad6b775fc5 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-07-18 18:33:25 +02:00
Akim Demaille
5d614dfa8c version 2.5.91
* NEWS: Record release date.
2012-07-18 18:19:32 +02:00
Akim Demaille
858c700fc0 maint: prepare NEWS. 2012-07-18 18:19:12 +02:00
Akim Demaille
aca4ddc75d maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-07-05 16:29:06 +02:00
Akim Demaille
47977a7e74 version 2.5.90
* NEWS: Record release date.
2012-07-05 16:20:44 +02:00
Akim Demaille
c242519127 NEWS: minor changes.
* NEWS: style changes.
2012-07-05 12:41:09 +02:00
Akim Demaille
5f108727a1 api.prefix: also rename YYDEBUG.
The testsuite in master has shown weird errors for the "Mulitple
Parsers" tests: the caller of p5.parse() received some apparently
random value, while tracing p5.parse() showed that the function was
consistently returning 0.

It happens when mixing several parser headers, some generated without
%debug, others with.  In particular the C++ parser was generated with
%debug, i.e., with:

  #ifndef YYDEBUG
  # define YYDEBUG 1
  #endif

and compiled separatedly.  Yet, its header was included after the one
of another parser, this time without %debug, i.e., with

  #ifndef YYDEBUG
  # define YYDEBUG 0
  #endif

in its header.  As a result, the parser was compiled with YYDEBUG set,
but its header was used without.  Since the layout of the objects are
then completely different, boom.

Therefore, do not change the value of YYDEBUG.  Rather, use it as a
default value for <API.PREFIX>DEBUG.

* data/c.m4 (b4_YYDEBUG_define): New.
(b4_declare_yydebug): Rename as...
(b4_yydebug_declare): this, for consistency.
* data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Use it.
* NEWS: Document it.
2012-07-04 12:24:12 +02:00
Akim Demaille
242cc08e8d NEWS: spell check.
* NEWS: here.
2012-07-02 09:26:22 +02:00
Akim Demaille
4b3847c3c0 api.prefix.
* data/c.m4 (b4_api_prefix, b4_api_PREFIX): New.
(b4_prefix, b4_union_name, b4_token_enums, b4_declare_yylstype): Use them.
* data/glr.c, data/yacc.c, data/glr.cc, data/lalr1.cc: Use them to change
the prefix of exported preprocessor symbols.
* src/getargs.c (usage): Ditto.
* tests/headers.at (Several parsers): New.
* tests/local.at (AT_API_PREFIX): New.
AT_YYSTYPE, AT_YYLTYPE): Adjust.
* doc/bison.texi (Multiple Parsers): Move documentation of %name-prefix to...
(Table of Symbols): here.
(Multiple Parsers): Document api.prefix.
(%define Summary): Point to it.
Use @code for variable names.
(Bison Options): -p/--name-prefix are obsoleted.
* NEWS: Announce api.prefix.
2012-06-29 17:40:42 +02:00
Akim Demaille
694af10cb7 skeletons: no longer define YYLSP_NEEDED.
* data/c.m4, data/glr.cc: here.
* NEWS, TODO: Adjust.
2012-06-27 10:03:23 +02:00
Akim Demaille
258cddbc36 c++: do not export YYTOKEN_TABLE and YYERROR_VERBOSE.
* src/output.c (prepare_symbols): Do not define b4_token_table.
(prepare): Define b4_token_table_flag.
* data/bison.m4 (b4_token_table_if): New.
Arm it when error-verbose.
* data/glr.c, data/yacc.c (YYTOKEN_TABLE): Remove.
Use m4.
* data/lalr1.cc: Likewise.
(YYERROR_VERBOSE): Remove.
* NEWS, doc/bison.texi: Document this.
2012-06-27 10:03:21 +02:00
Akim Demaille
55d1006fce yacc: work around the ylwrap limitation.
* data/yacc.c (b4_shared_declarations): Include the header guards.
Do not include the header in the *.c file, duplicate it.
* NEWS (Future Changes): Extend, and announce the forthcoming change
about the use of the parser header.
2012-06-25 10:20:56 +02:00
Akim Demaille
18ad57b384 news: condemn YYPARSE_PARAM and YYLEX_PARAM.
* NEWS: here.
(Bison 1.875): Add %parse-param and %lex-param.
* doc/bison.texinfo: Spello.
2012-06-21 15:19:43 +02:00
Akim Demaille
e29f0771d7 maint: formatting changes.
* NEWS: Fix indentation of code snippets.
Untabify.
2012-06-19 17:01:35 +02:00
Akim Demaille
56ca3d8fce glr.c, yacc.c: declare yydebug in the header.
* data/c.m4 (b4_declare_yydebug): New.
* data/glr.c, data/yacc.c (b4_shared_declarations): Use it.
Remove the corresponding code from the parser body.
* NEWS: Doc this.
2012-06-15 15:33:14 +02:00
Akim Demaille
c3e9f08f93 skeletons: use header guards.
* data/glr.c, data/glr.cc, data/yacc.c: here.
* NEWS: Document it.
2012-06-15 15:33:14 +02:00
Akim Demaille
0f11eec272 yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it.
This is already what glr.c and lalr1.cc do.

* data/yacc.c: here.
2012-06-15 13:31:34 +02:00
Akim Demaille
91aadcc7a9 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-06-07 11:15:04 +02:00
Akim Demaille
dfaac27242 version 2.5.1
* NEWS: Record release date.
2012-06-05 10:03:25 +02:00
Akim Demaille
ed7658fe17 NEWS: prepare for 2.5.1.
* NEWS: Be compliant with do-release-commit-and-tag.
2012-06-05 10:02:17 +02:00
Akim Demaille
3cd7c0bfce Bison 2.5.1_rc2.
* NEWS: Update.
2012-05-23 14:30:22 +02:00
Akim Demaille
22172d4731 c++: compute the header guards.
This is a frequent request.  Recently pointed out by Wei Song,
<http://lists.gnu.org/archive/html/help-bison/2012-05/msg00002.html>.

* data/c.m4 (b4_tocpp, b4_cpp_guard, b4_cpp_guard_open)
(b4_cpp_guard_close): New.
* data/lalr1.cc, data/location.cc, data/stack.hh: Use them.
* TODO (Header Guards): Move to...
* NEWS: here.
Formatting changes.
2012-05-21 18:15:41 +02:00
Akim Demaille
e4ab12542b news: convert to double quotes.
* NEWS: Convert from `quoted' to "quoted".
Reported by Stefano Lattarini.
http://lists.gnu.org/archive/html/bison-patches/2012-05/msg00039.html
2012-05-21 16:07:34 +02:00
Akim Demaille
86b08b49b3 build: do not prototype flex-generated functions.
Some versions of Flex, possibly modified by the distribution package
maintainers, have incompatible signatures.  Since newer versions of
Flex prototype their functions, avoid the conflicts in that case.
Reported by Stefano Lattarini.
<http://lists.gnu.org/archive/html/bug-bison/2012-05/msg00012.html>.

* src/flex-scanner.h (FLEX_VERSION_GT): New.
Use it to issue prototypes for flex-generated functions only for
versions up to 2.5.31, in accordance with the comment.
See commit dc9701e848.
Use it to define yylex_destroy when needed.
2012-05-21 14:48:52 +02:00
Akim Demaille
1ef57c947d Bison 2.5.1_rc1.
* NEWS: Update.
* src/parse-gram.c, src/parse-gram.h: Regen.
2012-05-14 14:29:36 +02:00
Akim Demaille
8ef26c2aa7 install-pdf: fix.
* gnulib: Fix install-pdf in po/ and runtime-po/.
Reported by Hans Aberg.
Fixed by Joel E. Denny.
http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html
2012-04-16 19:12:07 +02:00
Akim Demaille
7e508a2b2d NEWS: Update.
* NEWS: Spell check.
(%printer): is now documented.
2012-04-16 17:53:15 +02:00
Akim Demaille
d834eca014 glr: eliminate last bits of unwanted locations.
* data/glr.c (YYLTYPE): Do not define when locations are
not demanded.
Adjust all dependencies.
2012-04-10 13:11:51 +02:00
Akim Demaille
debe2c03c4 NEWS: 2.6 will drop K&R.
* NEWS: here.
(glr.c): Fix a spello.
2012-04-10 13:11:39 +02:00
Akim Demaille
466b4cf201 maint: update NEWS.
* NEWS: Fix entry about __attribute__.
Reorder by "decreasing" order of importance.
2012-04-04 10:11:50 +02:00
Akim Demaille
936c88d178 doc: c++: complete the location documentation.
* data/location.cc (position::initialize, location::initialize):
Also accept line and column, with default values.
* doc/bison.texinfo (C++ position, C++ location): New nodes.
Describe more thoroughly these classes.
Fix several Texinfo misuses.
2012-03-31 12:30:10 +02:00
Akim Demaille
ef51bfa744 c++: use nullptr for C++11.
C++11 introduces "nullptr" which plays the role of C's NULL, in
replacement of "0".  Fix the C++ skeletons to avoid warnings about
uses of "0" in place of "nullptr", and improve C skeletons to also use
this "nullptr" when compiled with a C++11 compiler.

* configure.ac: More C++ warnings.
* NEWS (2.5.1): Document this.
* data/c++.m4, data/c.m4 (b4_null_define): New.
(b4_null): Use YY_NULL instead of 0.
* data/glr.c, data/lalr1.cc, data/location.cc, data/yacc.c:
Call b4_null_define/b4_null where appropriate.
Use YY_NULL instead of NULL.
* data/location.cc (initialize): Accept a default argument,
YY_NULL.
* tests/actions.at, tests/calc.at: Adjust.

* data/glr.c, lib/libiberty.h, src/system.h (__attribute__):
Do not disable it when __STRICT_ANSI__ is defined, as, for
instance, it disables the __attribute__((unused)) which
protects us from some compiler warnings.
This was already done elsewhere in Bison, in 2001, see
4a0d893695.
* tests/regression.at: Adjust output.
2012-03-31 11:12:28 +02:00
Akim Demaille
041308d0c0 NEWS: update.
* NEWS: Java fixes, more about the doc changes, liby issues.
2012-03-27 15:21:29 +02:00
Akim Demaille
94556574b5 yacc: fix YYBACKUP.
Reported by David Kastrup:
https://lists.gnu.org/archive/html/bug-bison/2011-10/msg00002.html.

	* data/yacc.c (YYBACKUP): Accept rhs size.
	Restore the proper state value.
	* TODO (YYBACKUP): Make it...
	* tests/actions.at: a new test case.
	* NEWS, THANKS: Update.
(cherry picked from commit d115aad911)

Conflicts:

	TODO
	data/yacc.c
2012-01-26 21:36:35 +01:00
Akim Demaille
c932d6135c maint: run "make update-copyright". 2012-01-13 11:48:14 +01:00
Joel E. Denny
7451638148 tests: fix empty unions.
Empty unions are not accepted by the ISO C99 grammar or by at
least some versions of Sun Studio.  Reported by Wolfgang S. Kechel
at
<http://lists.gnu.org/archive/html/bug-bison/2011-08/msg00003.html>.
* NEWS (2.5.1): Document fix.
* THANKS (Wolfgang S. Kechel): Add.
* tests/existing.at (GNU Cim Grammar)
(GNU pic (Groff 1.18.1) Grammar.): Remove empty %union.
2011-08-21 14:45:03 -04:00
Joel E. Denny
908c8647de doc: discuss named references after locations.
Reported by Hans Aberg at
<http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
* NEWS (2.5.1): Document.
* doc/bison.texinfo (Named References): Because it discusses
locations in addition to semantic values, move this subsection out
of the section `Defining Language Semantics', where locations have
not yet been introduced, to be a new section after the following
section, `Tracking Locations'.
2011-05-29 20:52:00 -04:00
Joel E. Denny
90dcd4156c Prepare for the possibility of a 2.5.1 release.
* NEWS (2.5.1): New heading.
2011-05-29 20:49:16 -04:00
Joel E. Denny
b2bc8a1ba0 Version 2.5.
* NEWS (2.5): Set date.
2011-05-14 18:14:52 -04:00
Joel E. Denny
9d6af15318 Fix precedence for end token.
Since Bison 2.3b, which restored the ability of precedence
directives to assign user token numbers, doing so for user token
number 0 has produced an assertion failure.
* NEWS (2.5): Document fix.
* src/symtab.c (symbol_user_token_number_set): In the case of the
end token, don't decrement ntokens if it was never incremented.
* tests/regression.at (Token number in precedence declaration):
Extend.
2011-05-01 22:20:15 -04:00
Joel E. Denny
441735026b Prepare for 2.5 release.
* NEWS (2.5_rc1): Rename back to...
(2.5): ... this, and unset date.
2011-05-01 18:41:34 -04:00
Joel E. Denny
1e811aacd7 Version 2.5_rc1.
* NEWS (2.5): Rename to...
(2.5_rc1): ... this, and set date.
2011-05-01 17:35:53 -04:00
Joel E. Denny
723206df6f * NEWS (2.5): Fix minor typos. 2011-05-01 17:35:47 -04:00
Joel E. Denny
ac3297d501 doc: clean up quotation style in NEWS.
* NEWS (2.5): For multi-character tokens in example grammar rules,
use "token" not 'token'.  In English, use a consistent quotation
style; we might as well follow the precedent seen in info pages:
`quote' not "quote".
2011-05-01 10:27:08 -04:00
Joel E. Denny
6f8bdce25d Add -Wconflicts-sr and -Wconflicts-rr.
Thus, conflict reports are now affected by -Werror and -Wnone
(unless %expect or %expect-rr is specified).  Reported by George
Neuner at
<http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
* NEWS (2.5): Document.
* doc/bison.texinfo (Bison Options): Document.
* src/complain.c, src/complain.h (set_warning_issued): Export
function.
* src/conflicts.c (conflicts_print): Suppress conflict report
based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
conflicts as errors if -Werror.
* src/getargs.c (warnings_flag): Initialize with
warnings_conflicts_sr and warnings_conflicts_rr as well.
(warnings_args, warnings_types): Add entries for
warnings_conflicts_sr and warnings_conflicts_rr.
(usage): Update.
* src/getargs.h (enum warnings): Add entries for
warnings_conflicts_sr and warnings_conflicts_rr.
* tests/conflicts.at (-W versus %expect and %expect-rr): New test
group.
* tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
conflict report can produce a "warnings being treated as errors"
message.  Also, check that stderr is now fully scrubbed by -Wnone
when the exit status is 0.
2011-04-03 23:52:28 -04:00
Joel E. Denny
8ffd7912e3 Add -Wother so -Wnone suppresses all warnings.
Reported by George Neuner at
<http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
* NEWS (2.5): Document.
* THANKS (George Neuner): Add.
* doc/bison.texinfo (Bison Options): Document.
* src/complain.c, src/complain.h
(warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
(midrule_value_at): New warning function, similar to yacc_at in
that it's controlled by its own warning category.
* src/getargs.c (warnings_flag): Initialize to warnings_other.
(warnings_args, warnings_types): Add entry for warnings_other.
(usage): Update.
* src/getargs.h (enum warnings): Add entry for warnings_other.
* src/gram.c (grammar_rules_useless_report): If -Wno-other, then
don't print useless rules.
* src/reader.c (symbol_should_be_used): Rather than adjusting the
return value based on whether midrule value warnings are enabled,
accept a new parameter for telling the caller whether true is
being returned for a potential midrule warning.
(grammar_rule_check): Use midrule_value_at for midrule value
warnings, and continue to use warn_at for all other warnings.  Let
them check whether the warnings are enabled.
* tests/local.at (AT_BISON_CHECK): Update documentation.
(AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
disable all warnings exercised in the test suite.
2011-04-03 19:45:39 -04:00