Commit Graph

4013 Commits

Author SHA1 Message Date
Akim Demaille
ead713a176 doc: minor style change
* doc/figs/example-reduce.txt: here.
2012-10-26 16:32:51 +02:00
Akim Demaille
e20daefe98 maint: use gendocs's new -I option
* gnulib: Update gendocs.
* cfg.mk (gendocs_options_): New.
2012-10-26 16:32:51 +02:00
Akim Demaille
df04a68ab5 Merge branch 'branch-2.6' into maint
* origin/branch-2.6:
  maint: post-release administrivia
  version 2.6.4
  regen
  2.6.4: botched 2.6.3
2012-10-23 14:03:11 +02:00
Akim Demaille
6f1360bd89 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-10-23 13:58:51 +02:00
Akim Demaille
0ac1584946 version 2.6.4
* NEWS: Record release date.
v2.6.4
2012-10-23 13:46:28 +02:00
Akim Demaille
40a1cd37f3 regen 2012-10-22 18:33:47 +02:00
Akim Demaille
468455e12b 2.6.4: botched 2.6.3
* NEWS: here.
2012-10-22 18:32:19 +02:00
Akim Demaille
b7226022b0 Merge branch '2.6.3' into maint
* 2.6.3: (22 commits)
  maint: post-release administrivia
  version 2.6.3
  gnulib: update
  tests: check %no-lines
  NEWS: warnings with clang
  warnings: avoid warnings from clang
  tests: no longer disable -O compiler options
  yacc.c: initialize yylval in pure-parser mode
  skeletons: style changes
  tests: minor improvements
  tests: use $PERL instead of perl
  build: look for Perl in configure.
  tests: fix sed portability issues
  tests: diff -u is not portable
  maint: word changes
  lalr1.cc: fix test suite portability
  maint: fix an erroneous include
  tests: check that headers are self contained
  doc: add missing documentation for --report
  headers: move CPP guards into YY_*_INCLUDED to avoid collisions
  ...

Conflicts:
	NEWS
	doc/bison.texi
	tests/headers.at
2012-10-22 16:04:12 +02:00
Akim Demaille
a4eb820f17 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-10-22 15:28:10 +02:00
Akim Demaille
6eb8f74f8f version 2.6.3
* NEWS: Record release date.
v2.6.3
2012-10-22 15:16:12 +02:00
Akim Demaille
cc5a986ce4 gnulib: update 2012-10-22 12:17:37 +02:00
Akim Demaille
ae2199381e tests: check %no-lines
* tests/synclines.at: here.
2012-10-22 12:17:37 +02:00
Akim Demaille
7b70847e58 NEWS: warnings with clang
* NEWS: here.
2012-10-22 12:17:35 +02:00
Akim Demaille
19d9b60787 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.
2012-10-22 12:17:17 +02:00
Akim Demaille
8f8439cee1 tests: no longer disable -O compiler options
Tests are running without -O since
f377f69fec 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.
2012-10-22 12:17:14 +02:00
Paul Eggert
fa5303b8ff 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.
2012-10-22 12:16:33 +02:00
Akim Demaille
39845e8e40 skeletons: style changes
* data/yacc.c, data/glr.c: Prefer Title case for (CPP) macro arguments.
2012-10-22 12:16:33 +02:00
Akim Demaille
5b34bb3110 tests: minor improvements
* tests/c++.at: Space changes.
Use AT_YYERROR_DEFINE.
* tests/local.at (AT_YYERROR_DEFINE): Issue errors on unknown languages.
2012-10-22 12:16:33 +02:00
Akim Demaille
c955769a75 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.
2012-10-22 12:16:33 +02:00
Akim Demaille
82443642d2 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.
2012-10-22 12:16:33 +02:00
Akim Demaille
e272d9dc80 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.
2012-10-22 12:16:33 +02:00
Akim Demaille
9a50c55af7 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.
2012-10-22 12:16:33 +02:00
Akim Demaille
e28ce5def0 maint: word changes
* README-hacking (Typical errors): Improve wording.
2012-10-22 12:16:32 +02:00
Akim Demaille
7aa15a0026 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.
2012-10-22 12:16:32 +02:00
Theophile Ranquet
90b1335aed 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>
2012-10-22 12:16:28 +02:00
Akim Demaille
ddbd0c40dc tests: check that headers are self contained
Reported by Alexandre Duret-Lutz.

* tests/headers.at (Several parsers): here.
2012-10-22 12:16:08 +02:00
Akim Demaille
c473e022d9 doc: add missing documentation for --report
* doc/bison.texi (Bison Options): Document --report's "solved", "all",
and "none".
2012-10-22 12:16:08 +02:00
Akim Demaille
6192d2c6de 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.
2012-10-22 12:16:04 +02:00
Akim Demaille
3746fc33c4 minor changes.
* NEWS: Word changes.
* doc/bison.texi: Spell check.
Fix minor issues.
* tests/headers.at: Comment and formatting changes.
2012-10-22 12:14:57 +02:00
Akim Demaille
36cdaaac53 gnulib: update 2012-10-22 12:14:04 +02:00
Akim Demaille
73c2a97540 gnulib: update 2012-10-19 12:56:48 +02:00
Akim Demaille
a8ad048142 xml: slight improvement of the DOT output
This was completely forgotten...  Nothing about XML is actually
documented...

* data/xslt/xml2dot.xsl: Use boxes, and Courier font.
2012-10-19 12:56:48 +02:00
Akim Demaille
a029e56f5c maint: check for dot before using it
* configure.ac: here.
* doc/Makefile.am: Use $(DOT).
Ship the generated files, to spare the user the need for Graphviz.
2012-10-19 12:56:48 +02:00
Theophile Ranquet
fc4fdd623e graphs: documentation
Note that 'make web-manual' fails.

* NEWS: Document these changes.
* doc/Makefile.am: Adjust to generate example files.
* doc/bison.texi: Add a Graphviz section after "Understanding::", the section
describing the .output file, because these are similar.
* doc/figs/example-reduce.dot, doc/figs/example-reduce.txt,
doc/figs/example-shift.dot, doc/figs/example-shift.txt: New, minimal
examples to illustrate the documentation.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-18 17:03:30 +02:00
Theophile Ranquet
dd47b5220c graphs: add tests, introducing -k graph
* tests/output.at (AT_TEST): New.
Use it to add 6 --graph tests.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-18 16:49:39 +02:00
Theophile Ranquet
ce6cf10f73 graphs: change the output format of the rules
Use something similar to the report file.

* src/print_graph.c (print_lhs): New, obstack equivalent of rule_lhs_print.
(print_core): Use here.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-18 16:27:11 +02:00
Theophile Ranquet
8048226f50 graphs: style changes
* src/graphviz.c (start_graph): Use courier font.
(conclude_red): Use commas to separate attributes. Show the acceptation
as a special reduction, with a blue color and an "Acc" label. Show the
lookahead tokens between square brackets.
(output_red): No longer label default reductions.
* src/print_graph.c (print_core): Refactor spacing, and print an
additional space between a rule's rhs and its lookahead tokens. Also,
capitalize "State".
(print_actions): Style, move a declaration.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-18 16:23:27 +02:00
Theophile Ranquet
85935600ad graphs: address an issue with R/R conflicts
All disabled reductions should now be shown as such.

* src/graphviz.c (output_red): Here.
(conclude_red): New.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-18 16:17:10 +02:00
Akim Demaille
715978d726 java: fixes
* data/java.m4: Remove stray M4 characters.
2012-10-16 11:04:03 +02:00
Akim Demaille
7287be84f1 java: use api.location.type and api.position.type
* data/java.m4: here.
* NEWS, doc/bison.texi, tests/java.at: Adjust.
2012-10-12 13:00:59 +02:00
Akim Demaille
e94ca80bbb tests: check %no-lines
* tests/synclines.at: here.
2012-10-12 12:25:53 +02:00
Akim Demaille
d74d8cb6c5 tests: minor simplification
* tests/headers.at (Several parsers): Use *.y even for C++.
2012-10-12 10:09:40 +02:00
Akim Demaille
43eb7674aa graphs: stylistic changes.
* src/graphviz.c (output_red): Comment and formatting changes.
2012-10-11 16:58:03 +02:00
Theophile Ranquet
d79683fa95 graphs: minor style changes
* src/graphviz.c (output_red): Fix C90 issues.
Reduce variable scopes.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-11 16:50:37 +02:00
Theophile Ranquet
83bae26d3f graphs: show reductions
* src/graphviz.c (output_red): New, show reductions on the graph.
(no_reduce_bitset_init): New, initialize a bitset.
(print_token): New, print a lookahead token.
(escape): New, print "foo" as \"foo\" because Dot doesn't like quotes within
a label.

* src/graphviz.h : Adjust.
* src/print_graph.c (print_actions): Call output_red here.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-11 15:59:55 +02:00
Theophile Ranquet
9fc99ca350 graphs: style: prefix state number with "state"
* src/print_graph.c (print_core): Here.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-11 15:59:35 +02:00
Theophile Ranquet
a13121f759 graphs: style: use left justification for states
The label text of nodes is centered "by default" (by the use of '\n' as
a line feed). This gives bad readability to the grammar rules shown in
state nodes, a left justification is much nicer. This is done by using '\l'
as the line feed.

In order to allow \l in the DOT file, changes to the quoting system seem
necessary.

* src/print_graph.c (print_core): Escape tokens here, instead of...
* src/graphviz.c (output_node): Here...
(escape): Using this, new.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-11 15:46:43 +02:00
Theophile Ranquet
2be37f19fe graphs: style: prefix rules and change shapes
* src/graphviz.c (start_graph): Use box rather than ellipsis.
* src/print_graph.c (print_core): Prefix rules with their number.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-11 09:31:32 +02:00
Theophile Ranquet
47a31596c6 obstack: import obstack_finish0 from master
* src/system.h (obstack_finish0): New.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-11 09:30:18 +02:00
Akim Demaille
db8ab2be33 c++: api.location.type
This feature was introduced in 95a2de5695
(which is part of 2.5), but not documented.  Give it a proper name, and
make it public.

* data/c++.m4, data/lalr1.cc, data/glr.cc, data/java.m4: Use
api.location.type instead of location_type.
* src/muscle-tab.c (muscle_percent_variable_update): Map the latter to
the former.
* tests/local.at: Adjust.
* tests/calc.at: Use api.location.type.
Leave tests/java.at with location_type, at least for the time being,
to cover both names.
* doc/bison.texi: Document api.location.type.
(User Defined Location Type): New.
* NEWS: Update.
2012-10-09 15:59:18 +02:00