Theophile Ranquet [Mon, 10 Dec 2012 16:01:55 +0000 (17:01 +0100)]
Merge remote-tracking branch 'origin/maint'
* origin/maint:
news: prepare for forthcoming release
doc: explain how mid-rule actions are translated
error: use better locations for unused midrule values
doc: various minor improvements and fixes
tests: ignore more useless compiler warnings
tests: be robust to C being compiled with a C++11 compiler
build: beware of Clang++ not supporting POSIXLY_CORRECT
maint: post-release administrivia
version 2.6.90
build: fix syntax-check error.
cpp: simplify the Flex version checking macro
news: improve the carets example and fix a typo
cpp: improve the Flex version checking macro
carets: improve the code
maint: update news
build: keep -Wmissing-declarations and -Wmissing-prototypes for modern GCCs
build: drop -Wcast-qual
gnulib: update
Conflicts:
NEWS
doc/Makefile.am
doc/bison.texi
gnulib
src/reader.c
tests/actions.at
tests/atlocal.in
tests/input.at
Akim Demaille [Sun, 9 Dec 2012 15:50:12 +0000 (16:50 +0100)]
news: prepare for forthcoming release
* NEWS: Fill paragraph.
Reorder.
Update examples.
Remove line for 2.6.90.
Akim Demaille [Sun, 9 Dec 2012 15:49:58 +0000 (16:49 +0100)]
doc: explain how mid-rule actions are translated
* doc/bison.texi (Actions in Mid-Rule): Mention and use named references.
Split into three subsections, among which...
(Mid-Rule Action Translation): this new section.
Akim Demaille [Sun, 9 Dec 2012 11:06:21 +0000 (12:06 +0100)]
error: use better locations for unused midrule values
On
%%
exp: {;} {$$;} { $$ = $1; }
instead of reporting (with -fcaret -Wmidrule-value)
midrule.y:2.6-8: warning: unset value: $$ [-Wmidrule-values]
exp: {;} {$$;} { $$ = $1; }
^^^
midrule.y:2.6-27: warning: unused value: $2 [-Wmidrule-values]
exp: {;} {$$;} { $$ = $1; }
^^^^^^^^^^^^^^^^^^^^^^
report
midrule.y:2.6-8: warning: unset value: $$
exp: {;} {$$;} { $$ = $1; }
^^^
midrule.y:2.10-14: warning: unused value: $2
exp: {;} {$$;} { $$ = $1; }
^^^^^
* src/reader.c (grammar_rule_check): When warning about the value of a
midrule action, use the location of the midrule action instead of the
location of the rule.
the location of the part of the rule.
* tests/actions.at (Default %printer and %destructor for mid-rule values):
Adjust expectations
* tests/input.at (Unused values with default %destructor): Ditto.
(AT_CHECK_UNUSED_VALUES): Ditto.
And use -fcaret.
Akim Demaille [Sat, 8 Dec 2012 15:18:07 +0000 (16:18 +0100)]
doc: various minor improvements and fixes
* doc/figs/example.dot, doc/figs/example.y: New.
* doc/bison.texi: Prefer "token" to TOKEN.
Use @group where appropriate.
Adjust with style changes in the output (State 0, not state 0).
Fix some @ref that were missing the third argument.
Fix some incorrect line numbers.
Use "nonterminal", not "non-terminal".
Fix overfull and underfull TeX hboxes.
Put the comments in the index.
Remove duplicate index entries.
Fuse glossary entries where appropriate.
(Understanding): Improve the continuity between sections.
Use example.dot to show the whole graph.
* doc/Makefile.am: Adjust.
Akim Demaille [Sun, 9 Dec 2012 15:23:34 +0000 (16:23 +0100)]
tests: ignore more useless compiler warnings
* tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore complains about
using c++ to compile C.
Akim Demaille [Sun, 9 Dec 2012 14:41:50 +0000 (15:41 +0100)]
tests: be robust to C being compiled with a C++11 compiler
* tests/glr-regression.at: Use YY_NULL instead of NULL.
Comment changes.
Akim Demaille [Sat, 8 Dec 2012 18:33:50 +0000 (19:33 +0100)]
build: beware of Clang++ not supporting POSIXLY_CORRECT
* m4/c-working.m4 (BISON_LANG_COMPILER_POSIXLY_CORRECT): New.
(BISON_C_COMPILER_POSIXLY_CORRECT): Use it.
For consistency with C++, also define BISON_C_WORKS.
* m4/cxx.m4 (BISON_CXX_COMPILER_POSIXLY_CORRECT): New.
* configure.ac: Use it.
* tests/atlocal.in: Get its result.
Propagate properly CXX values when used to compile C.
When POSIXLY_CORRECT, adjust BISON_C_WORKS and BISON_CXX_WORKS.
* tests/local.at (AT_COMPILE): Use BISON_C_WORKS.
Akim Demaille [Fri, 7 Dec 2012 10:49:12 +0000 (11:49 +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 [Fri, 7 Dec 2012 10:37:14 +0000 (11:37 +0100)]
version 2.6.90
* NEWS: Record release date.
Akim Demaille [Fri, 7 Dec 2012 10:34:51 +0000 (11:34 +0100)]
build: fix syntax-check error.
* cfg.mk: Exclude names-refs, it includes a "double" if (end of first
line, first of second line below).
test.y:43.12-44.59: symbol not found in production: if
if-stmt-a: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Theophile Ranquet [Fri, 7 Dec 2012 11:13:38 +0000 (12:13 +0100)]
cpp: simplify the Flex version checking macro
* src/flex-scanner,h (FLEX_VERSION): Consider YY_FLEX_SUBMINOR_VERSION
defined.
Theophile Ranquet [Fri, 7 Dec 2012 10:57:19 +0000 (11:57 +0100)]
news: improve the carets example and fix a typo
* NEWS: Here.
Theophile Ranquet [Thu, 6 Dec 2012 12:21:36 +0000 (13:21 +0100)]
cpp: improve the Flex version checking macro
* src/flex-scanner.h (FLEX_VERSION): Here.
Theophile Ranquet [Thu, 6 Dec 2012 12:17:55 +0000 (13:17 +0100)]
carets: improve the code
* src/location.c: Remove duplicate documentations.
(caret_info): Stylistic change.
(location_caret): Many reworks.
Akim Demaille [Fri, 7 Dec 2012 09:40:31 +0000 (10:40 +0100)]
maint: update news
* NEWS: There is no 2.6.6, remove its stub.
Akim Demaille [Fri, 7 Dec 2012 08:58:40 +0000 (09:58 +0100)]
build: keep -Wmissing-declarations and -Wmissing-prototypes for modern GCCs
Fixes a -Werror failure of xalloc.h used in src.
From Eric Blake.
http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00006.html
* configure.ac: Check whether GCC pragma diagnostic push/pop works.
Enable these warnings for bison if it does.
Enable these warnings for the test suite anyway.
Akim Demaille [Fri, 7 Dec 2012 08:48:41 +0000 (09:48 +0100)]
build: drop -Wcast-qual
Suggested by Jim Meyering.
http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00017.html
* configure.ac (warn_common): Remove -Wcast-qual.
Akim Demaille [Wed, 5 Dec 2012 15:16:17 +0000 (16:16 +0100)]
gnulib: update
Theophile Ranquet [Thu, 6 Dec 2012 10:43:02 +0000 (11:43 +0100)]
Merge remote-tracking branch 'origin/maint'
* origin/maint:
misc: pacify the Tiny C Compiler
cpp: make the check of Flex version portable
misc: require getline
c++: support wide strings for file names
doc: document carets
tests: enhance existing tests with carets
errors: show carets
getargs: add support for --flags/-f
Conflicts:
doc/bison.texi
m4/.gitignore
src/complain.c
src/flex-scanner.h
src/getargs.c
src/getargs.h
src/gram.c
src/main.c
tests/headers.at
Theophile Ranquet [Thu, 6 Dec 2012 09:49:12 +0000 (10:49 +0100)]
misc: pacify the Tiny C Compiler
* src/graphviz.c (conclude_red): Remove a useless return.
Theophile Ranquet [Wed, 5 Dec 2012 17:26:36 +0000 (18:26 +0100)]
cpp: make the check of Flex version portable
This was problematic with tcc 0.9.25
* src/flex-scanner.h (FLEX_VERSION_GT): Rewrite and rename as...
(FLEX_VERSION): This.
Theophile Ranquet [Wed, 5 Dec 2012 14:27:25 +0000 (15:27 +0100)]
misc: require getline
* bootstrap.conf: Here, used by src/location.c.
* src/getargs.c (long_options): Rename --flags to --feature.
Akim Demaille [Wed, 5 Dec 2012 10:21:21 +0000 (11:21 +0100)]
c++: support wide strings for file names
Reported by Mark Boyall.
http://lists.gnu.org/archive/html/help-bison/2011-08/msg00002.html
* data/location.cc (operator<<): Be templated on the type of
output stream.
* tests/headers.at (Several parsers): Adjust.
Theophile Ranquet [Tue, 4 Dec 2012 12:12:12 +0000 (13:12 +0100)]
doc: document carets
* NEWS: Announce it.
* doc/bison.texi (Bison Options): Here.
Theophile Ranquet [Mon, 3 Dec 2012 10:12:07 +0000 (11:12 +0100)]
tests: enhance existing tests with carets
* tests/actions.at: Unset value.
* tests/conflicts.at: Rule useless due to conflicts.
* tests/input.at: Missing terminator, unexpected end of file, command line
redefinition of variable.
* tests/named-refs.at: Many errors.
* tests/reduce.at: Useless nonterminals and rules.
* tests/regression.at: Large token.
Theophile Ranquet [Fri, 30 Nov 2012 13:34:56 +0000 (14:34 +0100)]
errors: show carets
* src/locations.c (caret_info): New, persistant information useful
for...
(location_caret): New, print a caret.
(cleanup_caret): Release caret_info cleanly, call it...
* src/main.c (main): Here.
* src/complain.c (error_message): Call location_caret here.
Theophile Ranquet [Fri, 30 Nov 2012 13:33:05 +0000 (14:33 +0100)]
getargs: add support for --flags/-f
Introduce -fdiagnostics-show-caret
* src/getargs.c (flag_flag): New global.
* src/getargs.h (flag): New enum.
Akim Demaille [Wed, 5 Dec 2012 10:03:08 +0000 (11:03 +0100)]
Merge remote-tracking branch 'origin/maint'
* origin/maint:
getargs: don't label --language/-l as experimental
getargs: fix the locations of command-line input
errors: indent missing action code semicolon warning
Conflicts:
NEWS
src/scan-code.l
tests/actions.at
Theophile Ranquet [Fri, 30 Nov 2012 14:27:54 +0000 (15:27 +0100)]
getargs: don't label --language/-l as experimental
* NEWS: Announce it.
* doc/bison.texi, src/getargs.c (usage): Here.
Akim Demaille [Mon, 3 Dec 2012 16:27:54 +0000 (17:27 +0100)]
tests: minor improvements
* tests/calc.at (AT_CHECK_SPACES): To speed up, accept several files
at once, and factor some calls.
Theophile Ranquet [Mon, 12 Mar 2012 09:01:09 +0000 (10:01 +0100)]
getargs: fix the locations of command-line input
* src/getargs.c (command_line_location): Here.
* tests/input.at: Adjust.
Theophile Ranquet [Thu, 15 Nov 2012 12:02:40 +0000 (12:02 +0000)]
errors: indent missing action code semicolon warning
Also, remove a duplicate #define.
* src/scan-code.l (SC_RULE_ACTION): Here.
* tests/actions.at: Adjust.
Akim Demaille [Mon, 3 Dec 2012 15:27:23 +0000 (16:27 +0100)]
Merge remote-tracking branch 'origin/maint'
* origin/maint:
parser: accept #line NUM
m4: use a safer pattern to enable/disable output
tests: beware of gnulib's need for config.h
gnulib: update
yacc.c, glr.c: check and fix the display of locations
formatting changes
glr.c: remove stray macro
Conflicts:
data/c.m4
data/glr.cc
data/lalr1.cc
data/lalr1.java
data/location.cc
data/stack.hh
data/yacc.c
src/scan-gram.l
Akim Demaille [Mon, 3 Dec 2012 14:59:57 +0000 (15:59 +0100)]
parser: accept #line NUM
* src/scan-gram.l (scanner): Accept '#line NUM'.
(handle_syncline): Adjust to the possible missing file name.
Akim Demaille [Mon, 3 Dec 2012 14:29:44 +0000 (15:29 +0100)]
m4: use a safer pattern to enable/disable output
Work on some other areas of Bison revealed that some macros expanded
to be expanded only once were actually expanded several times. This
was due to the fact that changecom was not properly restored each
time, and macro names appearing in comments were then expanded.
Introduce begin/end macros which are easier to match that
changecom()/changecom(#).
* data/bison.m4 (b4_output_begin, b4_output_end): New.
* data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
* data/location.cc, data/stack.hh, data/yacc.c:
Use them.
Akim Demaille [Mon, 3 Dec 2012 14:43:57 +0000 (15:43 +0100)]
tests: beware of gnulib's need for config.h
* tests/skeletons.at, tests/torture.at: Be sure to include config.h
where appropriate.
Akim Demaille [Fri, 30 Nov 2012 11:17:10 +0000 (12:17 +0100)]
gnulib: update
* lib/yyerror.c: Include config.h since the following stdio.h might be
from gnulib.
Akim Demaille [Fri, 30 Nov 2012 10:19:43 +0000 (11:19 +0100)]
yacc.c, glr.c: check and fix the display of locations
In some case, negative column number could be displayed.
Make YY_LOCATION_PRINT similar to bison's own implementation of
locations. Since the macro is getting fat, make it a static
function.
Reported by Jonathan Fabrizio.
* data/c.m4 (yy_location_print_define): Improve the implementation,
and generate the yy_location_print_ function.
Adjust YY_LOCATION_PRINT.
* tests/actions.at (Location Print): New tests.
Akim Demaille [Fri, 30 Nov 2012 10:19:33 +0000 (11:19 +0100)]
formatting changes
* data/c.m4: Fix comments, put macros in a more natural order.
Space changes (from M-x whitespace-cleanup).
* src/location.c: Fix spaces.
* tests/actions.at: Space changes.
Akim Demaille [Fri, 30 Nov 2012 10:15:12 +0000 (11:15 +0100)]
glr.c: remove stray macro
* data/glr.c (YYOPTIONAL_LOC): Remove, unused since commit
769a8ef9bcb5e14d0be9d0869f5dca20ab093930.
Akim Demaille [Thu, 29 Nov 2012 13:54:37 +0000 (14:54 +0100)]
Merge remote-tracking branch 'origin/maint'
* origin/maint:
doc: minor fixes
doc: improve the index
doc: introduce api.pure full, rearrange some examples
yacc.c: support "%define api.pure full"
local.at: improvements
Conflicts:
NEWS
data/yacc.c
doc/bison.texi
tests/calc.at
Akim Demaille [Thu, 29 Nov 2012 13:35:48 +0000 (14:35 +0100)]
doc: minor fixes
* doc/bison.texi: Use stderr for error messages.
Meta-variables are usually spelled in lower case.
Use @code for function names.
Akim Demaille [Thu, 29 Nov 2012 13:09:34 +0000 (14:09 +0100)]
doc: improve the index
* doc/bison.texi: Fix uses of "deffn" so that the arguments of the
directives do not show in the index.
Remove a duplicate entry for api.pure.
Theophile Ranquet [Mon, 26 Nov 2012 17:17:15 +0000 (18:17 +0100)]
doc: introduce api.pure full, rearrange some examples
* NEWS: Add entry.
* doc/bison.texi (%define Summary): Show the old Yacc behaviour.
(Parser Function): Move parse-param examples here.
(Pure Calling): Remove parse-param examples.
(Error Reporting): Don't show the old behavior, stick to 'full'.
Theophile Ranquet [Fri, 23 Nov 2012 17:30:47 +0000 (17:30 +0000)]
yacc.c: support "%define api.pure full"
This makes the interface for yyerror() pure without the need for a spurious
parse_param.
* data/yacc.c (b4_pure_if, b4_pure_flag): New definition, accept three states.
(b4_yacc_pure_if): Rename as...
(b4_yyerror_arg_loc_if): This, and use b4_pure_flag.
* tests/actions.at (%define api.pure): Modernize.
* test/calc.at (Simple LALR Calculator): Modernize.
* tests/local.at (AT_YYERROR_ARG_LOC_IF): Adjust.
Akim Demaille [Wed, 28 Nov 2012 09:51:45 +0000 (10:51 +0100)]
tests: check variants without locations
* tests/c++.at (Variants): Support non-use of locations, and
check its support.
Theophile Ranquet [Fri, 23 Nov 2012 16:23:27 +0000 (16:23 +0000)]
local.at: improvements
* tests/local.at (AT_YYERROR_FORMALS): Make llocp const.
(AT_PURE_AND_LOC_IF, AT_GLR_OR_PARAM_IF): Remove, expand...
(AT_YYERROR_ARG_LOC_IF): Here, and use m4_join for readability.
Akim Demaille [Mon, 26 Nov 2012 09:42:49 +0000 (10:42 +0100)]
tests: use -fno-strict-aliasing with variants
Reported by Théophile Ranquet.
* configure.ac (NO_STRICT_ALIAS_CXXFLAGS): New.
* tests/c++.at, tests/atlocal.in, examples/local.mk: Use it.
Akim Demaille [Mon, 26 Nov 2012 09:42:43 +0000 (10:42 +0100)]
tests: remove leftover
* tests/atlocal.in: Remove duplicate handling of --compile-c-with-cxx.
Akim Demaille [Mon, 26 Nov 2012 08:49:23 +0000 (09:49 +0100)]
doc: use %precedence instead of nonassoc when associativity is not wanted
* doc/bison.texi: here.
Formatting changes in some grammars.
Fix a %prec into %precedence.
Akim Demaille [Mon, 26 Nov 2012 08:14:51 +0000 (09:14 +0100)]
Merge remote-tracking branch 'origin/maint'
* origin/maint:
yacc.c: always initialize yylloc
scanner: issue a single error for groups of invalid characters
tests: formatting changes
doc: one of the fixes for an ambiguous grammar was ambiguous too
doc: fix the dangling else with precedence directives
doc: prefer "token" to TOKEN
doc: formatting changes
scanner: use explicit "ignore" statements
Conflicts:
src/scan-gram.l
Akim Demaille [Mon, 26 Nov 2012 08:05:28 +0000 (09:05 +0100)]
Merge remote-tracking branch 'origin/branch-2.6' into maint
* origin/branch-2.6:
yacc.c: always initialize yylloc
doc: one of the fixes for an ambiguous grammar was ambiguous too
doc: fix the dangling else with precedence directives
doc: prefer "token" to TOKEN
doc: formatting changes
Conflicts:
NEWS
doc/bison.texi
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.
Akim Demaille [Fri, 23 Nov 2012 10:21:47 +0000 (11:21 +0100)]
scanner: issue a single error for groups of invalid characters
* src/scan-gram.l: Scan groups of invalid characters together.
* tests/input.at, tests/named-refs.at: Adjust.
Akim Demaille [Fri, 23 Nov 2012 09:11:50 +0000 (10:11 +0100)]
tests: formatting changes
* tests/named-refs.at: Here.
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.
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.
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.
Akim Demaille [Thu, 22 Nov 2012 13:24:54 +0000 (14:24 +0100)]
doc: formatting changes
* doc/bison.texi: Use @group.
Akim Demaille [Wed, 14 Nov 2012 09:57:45 +0000 (10:57 +0100)]
scanner: use explicit "ignore" statements
* src/scan-gram.l: here.
Akim Demaille [Tue, 13 Nov 2012 09:59:55 +0000 (10:59 +0100)]
Merge remote-tracking branch 'origin/maint'
* origin/maint:
tests: close files in glr-regression
xml: match DOT output and xml2dot.xsl processing
xml: factor xslt space template
graph: fix a memory leak
xml: documentation
output: capitalize State
Theophile Ranquet [Mon, 12 Nov 2012 15:41:52 +0000 (15:41 +0000)]
tests: close files in glr-regression
* tests/glr-regression.at: Here.
Theophile Ranquet [Tue, 23 Oct 2012 15:43:54 +0000 (15:43 +0000)]
xml: match DOT output and xml2dot.xsl processing
Make the DOT produced by XSLT processing equivalent to the one made with the
--graph option.
* data/xslt/xml2dot.xsl: Stylistic changes, and add support for reductions.
* doc/bison.texi (Xml): Update.
* src/graphviz.c (conclude_red): Minor stylistic changes to DOT internals.
(output_red): Swap enabled and disabled reductions output, for coherence
with XSLT output.
* src/print_graph.c (print_core): Minor stylistic change to States' output.
(print_actions): Swap order of output for reductions and transitions.
* tests/local.at (AT_BISON_CHECK_XML): Ignore differences in order.
* tests/output.at: Adjust to changes in DOT internals.
Theophile Ranquet [Wed, 7 Nov 2012 09:54:06 +0000 (09:54 +0000)]
xml: factor xslt space template
* data/xslt/bison.xsl (space): New, import from...
* data/xslt/xml2text.xsl: Here.
Theophile Ranquet [Fri, 9 Nov 2012 16:40:45 +0000 (16:40 +0000)]
graph: fix a memory leak
* src/graphviz.c (output_red): Here.
Theophile Ranquet [Mon, 22 Oct 2012 17:37:57 +0000 (17:37 +0000)]
xml: documentation
The XML output combined with the XSL Transformations provided in data/ are
incredibly useful, they should be documented.
* doc/bison.texi (Xml): New node.
Theophile Ranquet [Thu, 18 Oct 2012 12:02:05 +0000 (12:02 +0000)]
output: capitalize State
* src/print.c (print_state): Here.
* tests/conflicts.at, tests/existing.at, tests/local.at, tests/reduce.at,
tests/regression.at, tests/sets.at: Adjust.
Akim Demaille [Mon, 12 Nov 2012 08:49:49 +0000 (09:49 +0100)]
tests: fix syntax-check errors
Reported by Théophile Ranquet.
* tests/c++.at: Use AT_PARSER_CHECK.
Avoid using "strcmp", which triggers an error from syntax-check.
Akim Demaille [Mon, 12 Nov 2012 08:45:30 +0000 (09:45 +0100)]
Merge remote-tracking branch 'origin/maint'
* origin/maint:
maint: address syntax-check errors.
tests: use valgrind where appropriate
tests: use valgrind where appropriate
tests: don't expect $EGREP to support -w
tests: more possible error compiler messages for "#error"
Conflicts:
cfg.mk
tests/headers.at
Akim Demaille [Mon, 12 Nov 2012 08:39:41 +0000 (09:39 +0100)]
maint: address syntax-check errors.
* cfg.mk: Ignore the "error" call in tests/c++.at, it is not to be
translated.
* doc/bison.texi: Fix incorrect @pxref use.
* po/POTFILES.in: Add missing file.
* src/print_graph.c: Remove useless include.
Akim Demaille [Mon, 12 Nov 2012 08:33:26 +0000 (09:33 +0100)]
tests: use valgrind where appropriate
Reported by Théophile Ranquet.
* cfg.mk (sc_at_parser_check): New.
* tests/c++.at: Fix use of AT_CHECK vs. AT_PARSER_CHECK.
Akim Demaille [Mon, 12 Nov 2012 08:06:55 +0000 (09:06 +0100)]
Merge remote-tracking branch 'origin/branch-2.6' into maint
* origin/branch-2.6:
tests: use valgrind where appropriate
tests: don't expect $EGREP to support -w
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.
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.
Akim Demaille [Thu, 8 Nov 2012 09:25:15 +0000 (10:25 +0100)]
tests: more possible error compiler messages for "#error"
* tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust for Clang.
Verified with GCC 4.0, 4.2 to 4.8, and Clang 2.9, 3.2: none skip.
Akim Demaille [Thu, 8 Nov 2012 08:35:59 +0000 (09:35 +0100)]
regen
Akim Demaille [Thu, 8 Nov 2012 08:24:51 +0000 (09:24 +0100)]
Merge branch 'maint'
* origin/maint:
regen
maint: post-release administrivia
version 2.6.5
regen
tests: syntax-check
tests: beware of compilers that do not support POSIXLY_CORRECT
gnulib: update
Conflicts:
src/parse-gram.c
src/parse-gram.h
tests/atlocal.in
Akim Demaille [Thu, 8 Nov 2012 08:22:58 +0000 (09:22 +0100)]
regen
Akim Demaille [Thu, 8 Nov 2012 08:20:48 +0000 (09:20 +0100)]
Merge branch 'branch-2.6' into maint
* origin/branch-2.6:
maint: post-release administrivia
version 2.6.5
regen
tests: syntax-check
tests: beware of compilers that do not support POSIXLY_CORRECT
gnulib: update
Conflicts:
NEWS
src/parse-gram.c
src/parse-gram.h
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.
Akim Demaille [Wed, 7 Nov 2012 17:09:46 +0000 (18:09 +0100)]
version 2.6.5
* NEWS: Record release date.
Akim Demaille [Wed, 7 Nov 2012 16:33:14 +0000 (17:33 +0100)]
regen
Akim Demaille [Wed, 7 Nov 2012 16:31:32 +0000 (17:31 +0100)]
tests: syntax-check
* tests/actions.at: Fix typo.
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.
Akim Demaille [Wed, 7 Nov 2012 11:46:30 +0000 (12:46 +0100)]
gnulib: update
Akim Demaille [Tue, 6 Nov 2012 17:23:47 +0000 (18:23 +0100)]
Merge remote-tracking branch 'origin/maint'
* origin/maint: (24 commits)
tests: calc: modernize the use of locations
tests: remove useless location initializations
lalr1.cc: always initialize yylval.
tests: check that C and C++ objects can be linked together.
yacc.c: also disable -Wuninitialized.
glr.cc, yacc.c: initialize yylloc properly
yacc.c, glr.c: a better YY_LOCATION_PRINT
yacc.c: simplify initialization
doc: formatting changes
c++: fix position operator signatures
tests: remove useless location initialization.
tests: fix locations in C
tests: handle %parse-param in the generated yyerror
tests: simplifications
grammars: fix display of nul character in error message
tests: sort
tests: cosmetic changes
comment changes
autoconf: update
gnulib: update
...
Conflicts:
data/lalr1.cc
gnulib
src/scan-gram.l
submodules/autoconf
tests/calc.at
Akim Demaille [Tue, 6 Nov 2012 17:00:33 +0000 (18:00 +0100)]
Merge branch 'branch-2.6' into maint
* origin/branch-2.6: (24 commits)
tests: calc: modernize the use of locations
tests: remove useless location initializations
lalr1.cc: always initialize yylval.
tests: check that C and C++ objects can be linked together.
yacc.c: also disable -Wuninitialized.
glr.cc, yacc.c: initialize yylloc properly
yacc.c, glr.c: a better YY_LOCATION_PRINT
yacc.c: simplify initialization
doc: formatting changes
c++: fix position operator signatures
tests: remove useless location initialization.
tests: fix locations in C
tests: handle %parse-param in the generated yyerror
tests: simplifications
grammars: fix display of nul character in error message
tests: sort
tests: cosmetic changes
comment changes
autoconf: update
gnulib: update
...
Conflicts:
NEWS
gnulib
tests/named-refs.at
tests/regression.at
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).
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.
Akim Demaille [Thu, 1 Nov 2012 14:38:25 +0000 (15:38 +0100)]
lalr1.cc: always initialize yylval.
* data/lalr1.cc: here.
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.
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.
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.
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.
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).
Akim Demaille [Sat, 3 Nov 2012 16:52:13 +0000 (17:52 +0100)]
doc: formatting changes
* doc/bison.texi: In a pointer type.
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.
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.
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.