Commit Graph

3914 Commits

Author SHA1 Message Date
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
Akim Demaille
466a2de317 maint: fix some syntax-check issues
* cfg.mk: Nuke the following warnings which are confused by our
text reports (that state that the error token is number 256).
  prohibit_magic_number_exit
  ../../doc/bison.texi:8170:error (256)
  ../../tests/conflicts.at:570:error (256)
  ../../tests/conflicts.at:673:error (256)
  ../../tests/conflicts.at:811:error (256)
  ../../tests/conflicts.at:1154:error (256)
  ../../tests/regression.at:281:error (256)
  ../../tests/regression.at:582:error (256)
  maint.mk: use EXIT_* values rather than magic number
2012-07-27 17:00:28 +02:00
Akim Demaille
4acc22e5cf tests: do not depend on __cplusplus to decide for C++ or C output
Since we do support compiling C code with a C++ compiler.

* tests/actions.at (Qualified $$ in actions): Use AT_SKEL_CC_IF.
2012-07-27 16:36:07 +02:00
Akim Demaille
7b18c11231 regen 2012-07-27 14:52:55 +02:00
Akim Demaille
e6cab382c5 synclines: remove spurious empty line
* data/bison.m4 (b4_syncline): Do not start with an empty line.
2012-07-27 14:52:23 +02:00
Akim Demaille
cd735a8c6c also support $<foo>$ in the %initial-action
scan-code.l is already passing argument to b4_dollar_dollar for the
initial acton, but its definition (of b4_dollar_dollar) does not use
this argument.

Generalize this definition, and use it for the %initial-action too.

* data/c.m4 (b4_dollar_dollar_, b4_dollar_pushdef, b4_dollar_popdef):
Instead of expecting a pointer, require a value, and use ".".
Since they are now generic enough, move to...
* data/c-like.m4: this new file.
* data/c.m4, data/java.m4: Load it.
* data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Use
b4_dollar_pushdef for the %initial-action.
* tests/actions.at: Check that.
* data/Makefile.am: Adjust.
* NEWS, doc/bison.texi: Document.
2012-07-27 14:47:20 +02:00
Akim Demaille
d6a44ffd00 skeletons: b4_dollar_pushdef and popdef to simpify complex definitions
M4 is really making it uselessly hard to define macros that define
macros.
* data/c.m4 (b4_dollar_pushdef, b4_dollar_popdef): New.
Use it.
2012-07-27 13:47:24 +02:00
Akim Demaille
93e3dbab95 regen 2012-07-27 12:54:31 +02:00
Akim Demaille
1c292035e1 printer/destructor: translate only once
Currently "%printer {...} a b c d e f" translates the {...} six times.
Not only is this bad for time and space, it also issues six times the
same warnings.

* src/symlist.h, src/symlist.c (symbol_list_destructor_set)
(symbol_list_printer_set): Take the action as code_props instead of
const char *.
* src/parse-gram.y: Translate these actions here.
* src/scan-code.h: Comment change.
* tests/input.at: Check that warnings are issued only once.
2012-07-27 12:54:31 +02:00
Akim Demaille
263137264f factor the handling of m4 escaping
The conversion from @ to @@ and so forth is coded is too many
different places.  Factor, a bit.

* src/scan-code.l: Instead of duplicating the logic of obstack_escape,
use it.
It sure is less efficient, but the cost is negligible.
This allows to factor rules that are alike.
And to factor some start-condition clauses.
* tests/input.at (Stray $ or @): New.
* NEWS: Document it.
2012-07-27 12:54:31 +02:00
Akim Demaille
e20e6a50d5 news: schedule the removal of the ";" hack
scan-code.l is significantly more complex because of this.

* NEWS: Doc it.
2012-07-27 12:54:31 +02:00
Akim Demaille
4d24ffb75e style changes in the scanners
* src/scan-code.l, src/scan-skel.l: Use a more traditional indentation
style for start-conditions.
Prefer "continue" to a comment, for empty actions.
Strip useless {}.
Remove useless start-condition clauses.
2012-07-27 12:13:40 +02:00
Akim Demaille
a74a3158d4 regen 2012-07-26 18:30:43 +02:00
Akim Demaille
4982f078bf support $<tag>$ in printers and destructors
* src/scan-code.l (SC_SYMBOL_ACTION): Accept $<tag>$, not just $$.
* data/c.m4 (b4_dollar_dollar_): New.
(b4_symbol_actions): Let b4_dollar_dollar use b4_dollar_dollar_.
* NEWS, doc/bison.texi: Document it.
* tests/actions.at: Check this for C and C++.
2012-07-26 18:30:43 +02:00
Akim Demaille
65a99eca25 scan-code: factor the handling of the type in $<TYPE>$
* src/scan-code.l (fetch_type_name): New.
(handle_action_dollar): Use it.
(gt_ptr): Remove, useless.
2012-07-26 17:03:54 +02:00
Akim Demaille
9a86ee6058 muscles: fix another occurrence of unescaped type name
* src/output.c (quoted_output): Split into...
(quoted_output, string_output): these.
Use the former when outputting a type_name.
* tests/input.at: Check this case.
* src/symtab.h: Comment changes.
2012-07-26 17:03:54 +02:00
Akim Demaille
0e164d43d1 glr.cc: fix the handling of yydebug
* data/glr.cc (yydebug_): Remove, unused.
(set_debug_level, debug_level): Work on yydebug instead.
* doc/bison.texi, NEWS: Document this.
2012-07-26 17:03:52 +02:00
Akim Demaille
d511fbd576 gnulib: update 2012-07-26 16:51:26 +02:00
Akim Demaille
9c46ba16e3 formatting changes
* src/symtab.h: here.
2012-07-26 16:51:26 +02:00
Akim Demaille
55e075f229 tests: fix an assertion
* tests/local.at (AT_YYLEX_DEFINE): Be sure to check the array
against its length, not its size in bytes.
2012-07-26 16:51:26 +02:00
Akim Demaille
0bb672d87c tests: adjust to GCC 4.8, which displays caret errors
With GCC 4.8, the tests on synclines are skipped.  Transform

  input.y:1:2: error: #error "1"
   #error "1"
    ^

into

  input.y:1: #error "1"

* tests/synclines.at (AT_SYNCLINES_COMPILE): Do it, using Perl instead of
sed.
2012-07-26 16:51:26 +02:00
Akim Demaille
8617d87e24 be sure to properly escape type names
* src/scan-code.l: Use obstack_quote when passing type_name to m4.
* tests/input.at (Code injection): New.
* NEWS: Document it.
Thanks to Paul Eggert for the wording.
2012-07-26 14:20:47 +02:00
Akim Demaille
0601c3bf0f obstack_quote: escape and quote for M4
* src/system.h (obstack_quote): New.
* src/muscle-tab.c: Use it instead of obstack_escape where applicable.
* src/scan-code.l: Since obstack_quote supports NULL, leave type_name
as NULL instead of defaulting to "".
2012-07-26 14:20:18 +02:00
Akim Demaille
eea7239a23 muscles: shuffle responsabilities
* src/muscle-tab.c (muscle_boundary_grow): Be in charge of quotation,
instead of leaving this to the caller.
2012-07-26 12:30:03 +02:00
Akim Demaille
e58782294d muscles: make private functions static
* src/muscle-tab.h, src/muscle-tab.c (muscle_boundary_grow)
(muscle_location_grow): Now static.
2012-07-26 12:30:03 +02:00
Akim Demaille
c1cc91bdcd muscles: rename private functions/macros
* src/muscle-tab.c (MUSCLE_COMMON_DECODE, muscle_string_decode)
(muscle_location_decode): Not related to muscles, rename as...
(COMMON_DECODE, string_decode, location_decode): these.
2012-07-26 12:30:03 +02:00
Akim Demaille
13b712d7d4 obstack_escape: escape M4 characters
* src/muscle-tab.h (MUSCLE_OBSTACK_SGROW): This is not related to
muscles, so move to, and rename as...
* src/system.h (obstack_escape): this.
Adjust dependencies.
2012-07-26 12:30:02 +02:00
Akim Demaille
dba9149595 remove dead macro
* src/system.h (DEFAULT_TMPDIR): Remove, unused.
2012-07-26 12:28:40 +02:00
Akim Demaille
9b8585410a maint: style changes
* src/scan-code.l: Remove useless braces.
Formatting changes.
Prefer NULL to 0.
* src/muscle-tab.c, src/system.h: Formatting changes.
2012-07-26 12:28:17 +02:00
Akim Demaille
f9b8635172 doc: avoid problems with case insensitive file systems
makeinfo --html generates index.html, and the node "Index" will result
in Index.html.  On case insensitive file systems, such as on Mac OS X
by default, this results in a single, invalid, file (Texinfo 4.13).
See http://lists.gnu.org/archive/html/bug-texinfo/2012-07/msg00032.html

* doc/bison.texi (Index): Rename as...
(Index of Terms): this.
2012-07-24 13:30:49 +02:00
Stefano Lattarini
733d4546ce configure: fix botched quoting
* configure.ac: In the AC_SUBST call on 'VALGRIND_PREBISON'.  Without
this change, when running ./configure, I see:

    ...
    checking for valgrind... valgrind
    ./configure: line 35221: -q: command not found
    checking for Java compiler... gcj -C -fsource=1.3 -ftarget=1.4
    ...

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2012-07-24 12:22:17 +02:00
Akim Demaille
aaf6103699 news: fix typo.
* NEWS: here.
Reported by Ben Pfaff.
2012-07-20 10:01:48 +02:00
Akim Demaille
d0d3313d10 maint: update gnu-web-doc-update.
* gnulib: here.
2012-07-19 16:24:33 +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.
v2.6
2012-07-19 15:24:23 +02:00