Commit Graph

3948 Commits

Author SHA1 Message Date
Akim Demaille
535ee0cb54 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-06 19:53:45 +02:00
Akim Demaille
ff020c3061 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-05 09:34:53 +02:00
Akim Demaille
45fdfd8108 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-05 09:34:52 +02:00
Akim Demaille
a727e7124d 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-05 09:34:16 +02:00
Akim Demaille
a1a77e1fcc 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-05 08:57:29 +02:00
Akim Demaille
10b009fa50 maint: word changes
* README-hacking (Typical errors): Improve wording.
2012-10-04 11:45:09 +02:00
Akim Demaille
ec78bdab6d 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-04 11:42:26 +02:00
Theophile Ranquet
a2b3f10183 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-03 16:03:06 +02:00
Akim Demaille
04a4684a51 tests: check that headers are self contained
Reported by Alexandre Duret-Lutz.

* tests/headers.at (Several parsers): here.
2012-10-03 16:00:30 +02:00
Akim Demaille
57f8bd8d18 doc: add missing documentation for --report
* doc/bison.texi (Bison Options): Document --report's "solved", "all",
and "none".
2012-10-03 08:47:37 +02:00
Akim Demaille
c9d5bcc938 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-01 11:18:22 +02:00
Akim Demaille
5a05f42ecf minor changes.
* NEWS: Word changes.
* doc/bison.texi: Spell check.
Fix minor issues.
* tests/headers.at: Comment and formatting changes.
2012-10-01 11:18:22 +02:00
Akim Demaille
93d133c932 gnulib: update 2012-09-28 15:04:57 +02:00
Theophile Ranquet
b506d9bfcb errors: indent "user token number redeclaration" context
This is the continuation of the work on the readability of errors
context.

* src/symtab.c (user_token_number_redeclaration): Use
complain_at_indent to output with increased indentation level.
* tests/input:at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-28 14:00:09 +02:00
Theophile Ranquet
bd52638008 warnings: introduce -Wdeprecated in the usage info
The deprecated warning, introduced some time ago, was not displayed in
the usage message. This patch addresses the issue.

* src/getargs.c (usage): Insert here.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-26 12:28:10 +02:00
Theophile Ranquet
b8e7ad5887 errors: prefix the output with "error: "
This improves readability. This is also what gcc does.

* NEWS: Document this change.
* src/complain.c (complain_at): Prefix all errors with "error: ".
(complain_at_indent, warn_at_indent): Do not prefix the context
information of errors, which are basically just indented errors.
* tests/conflicts.at, tests/glr-regression.at, tests/input.at,
tests/named-refs.at, tests/output.at, tests/push.at,
tests/regression.at, tests/skeletons.at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-26 12:11:51 +02:00
Theophile Ranquet
a974c1ec26 errors: indent "invalid value for %define" context
This is the continuation of the work on the readability of errors
    context.

For example, what used to be:
  input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
  input.y:1.9-29: accepted value: 'most'

is now:
  input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
  input.y:1.9-29:     accepted value: 'most'

* src/muscle-tab.c (muscle_percent_define_check_values): Use
complain_at_indent to output with increased indentation level.
* tests/input:at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-26 12:08:55 +02:00
Theophile Ranquet
6b1e1872d4 errors: indent "%define var" redefinition context
This is the continuation of the work on the readability of errors
context.

For example, what used to be:
  input.y:2.9-11: %define variable 'var' redefined
  input.y:1.9-11: previous definition

is now:
  input.y:2.9-11: %define variable 'var' redefined
  input.y:1.9-11:     previous definition

* src/muscle-tab.c (muscle_percent_define_insert): Use
complain_at_indent to output with increased indentation level.
* tests/input.at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-26 12:06:03 +02:00
Theophile Ranquet
cbaea0106d errors: indent "symbol redeclaration" context
This is the continuation of the work on the readability of errors
context.

For example, what used to be:
  input.y:5.10-24: %printer redeclaration for <field2>
  input.y:3.11-25: previous declaration

is now:
  input.y:5.10-24: %printer redeclaration for <field2>
  input.y:3.11-25:     previous declaration

* NEWS: Document this change.
* src/symtab.c (symbol_redeclaration, semantic_type_redeclaration,
user_token_number_redeclaration, default_tagged_destructor_set,
default_tagless_destructor_set, default_tagged_printer_set,
default_tagless_printer_set): Use complain_at_indent to
output with increased indentation level.
* tests/input.at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-26 12:03:57 +02:00
Theophile Ranquet
24d96dd3eb errors: indent "result type clash" error context
This used to be the format of the error report:

  input.y:6.5-10: result type clash on merge function 'merge': [...]
  input.y:2.4-9: previous declaration

In order to distinguish the actual error from the context provided, we
rather this new output:

  input.y:6.5-10: result type clash on merge function 'merge': [...]
  input.y:2.4-9:     previous declaration

Another patch will introduce an "error: " prefix to all non-indented
lines, giving yet better readability to the reports.

* src/complain.h (SUB_INDENT): Move to here.
* src/reader.c (record_merge_function_type): Use complain_at_indent to
output with increased indentation level.
* src/scan-code.l (SUB_INDENT): Remove from here.
* tests/glr-regression.at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-26 12:00:29 +02:00
Akim Demaille
63fec1eeba regen 2012-09-25 10:29:02 +02:00
Akim Demaille
6b4cb804b5 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.
2012-09-25 10:24:37 +02:00
Akim Demaille
53425dbfaa gnulib: update 2012-09-25 10:24:36 +02:00
Akim Demaille
403ddfb7e0 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.
2012-09-04 11:00:11 +02:00
Akim Demaille
76e5017732 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>.
2012-09-04 10:50:30 +02:00
Akim Demaille
592bdad15e 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.
2012-09-04 09:51:12 +02:00
Jim Meyering
457bf91968 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.
2012-09-03 19:45:03 +02:00
Akim Demaille
2e350a617f gnulib: update 2012-09-03 16:40:03 +02:00
Akim Demaille
d740d2b541 --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.
2012-09-03 16:40:03 +02:00
Akim Demaille
e411069eee 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.
2012-08-31 17:50:43 +02:00
Akim Demaille
ae62d0fc4f tests: fix push-pull test
* tests/torture.at: %push-pull-parser is no longer supported.
2012-08-31 17:50:43 +02:00
Akim Demaille
e3f8c4ef69 yacc.c: style changes
* data/yacc.c: (yytoken): Define with initial value.
2012-08-31 17:50:31 +02:00
Akim Demaille
933ec5449f maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-08-03 09:52:05 +02:00
Akim Demaille
e1eeecd384 version 2.6.2
* NEWS: Record release date.
v2.6.2
2012-08-03 09:43:02 +02:00
Akim Demaille
43ca804096 NEWS: update.
* NEWS: Catch up with the other changes from 2.6.1.
2012-08-02 13:51:52 +02:00
Akim Demaille
dcd5344dcd 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.
2012-08-02 13:51:52 +02:00
Akim Demaille
62a58c14bd thanks: fix a contributor name
* THANKS: On his request.
2012-08-02 08:29:18 +02:00
Akim Demaille
e39eff37e2 gnulib: update 2012-08-01 15:02:25 +02:00
Akim Demaille
06f2ac78d7 tests: synch line -> syncline, for consistency
* tests/synclines.at: Do it, as "syncline" is used consistently
everywhere else in Bison.
2012-08-01 15:02:25 +02:00
Akim Demaille
1914a78115 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.
2012-08-01 15:02:25 +02:00
Akim Demaille
d6e2a57964 tests: synclines: fix perl invocation
Reported by Summum Bonum.

* tests/synclines.at: Fix Perl invocation: its -f is not like sed's.
2012-08-01 15:02:21 +02:00
Akim Demaille
a0c45dd5d2 regen 2012-08-01 09:16:56 +02:00
Akim Demaille
c9d546b2a8 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.
2012-08-01 09:16:55 +02:00
Akim Demaille
d61e59ea0e tests: simplify
* tests/regression.at: Remove useless compilations: AT_FULL_COMPILE
includes the compilation by bison.
2012-08-01 09:16:55 +02:00
Akim Demaille
aaf63e45b6 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.
2012-07-31 10:50:06 +02:00
Akim Demaille
dbfcf7a89f 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.
2012-07-30 14:54:27 +02:00
Akim Demaille
8c707b10e7 gnulib: update 2012-07-30 14:53:58 +02:00
Akim Demaille
9c26b8fc03 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-30 11:47:29 +02:00
Akim Demaille
77b214ef48 version 2.6.1
* NEWS: Record release date.
v2.6.1
2012-07-30 11:18:23 +02:00
Akim Demaille
d35d6dd2cd gnulib: update 2012-07-30 11:17:44 +02:00