Commit Graph

3895 Commits

Author SHA1 Message Date
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
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
c30717cafa maint: fix spaces.
* build-aux/Makefile.am: here.
2012-07-18 17:56:30 +02:00
Akim Demaille
0e98a81e00 tests: adjust to case where the C compiler is actually a C++ compiler
* tests/atlocal.in (CC_IS_CXX): New.
* tests/headers.at (Several parsers): Use it.
2012-07-18 09:17:31 +02:00
Akim Demaille
d5c20d1a36 tests: fix dependencies
* tests/Makefile.am: we need atconfig and atlocal to be up to date
when calling testsuite.
2012-07-18 09:17:31 +02:00
Akim Demaille
e6ae99fe75 doc: fix Texinfo command
* doc/bison.texi: In parens, use @pxref.
2012-07-18 09:17:31 +02:00
Akim Demaille
bcbbf65486 maint: Valgrind on OS X.
* configure.ac (VALGRIND_PREBISON): New.
* tests/Makefile.am (maintainer-check-valgrind): Use it.
* etc/darwin11.4.0.supp: New.
* configure.ac, etc/Makefile.am: Use it.
* configure.ac: Disable Valgrind on Mac OS X.
* README-hacking: Explain why.
2012-07-18 09:17:15 +02:00
Akim Demaille
1aa9fa823b tests: be sure that backups are safe.
* tests/local.at (at_save_special_files): here.
2012-07-17 14:47:35 +02:00
Akim Demaille
321b8117a6 maint: dead comment.
* etc/README: here.
2012-07-17 14:47:35 +02:00
Akim Demaille
e4828e2384 tests: refactor for legibility.
* tests/local.at (AT_BISON_CHECK_WARNINGS, AT_BISON_CHECK_WARNINGS_):
New.
2012-07-17 14:47:34 +02:00
Akim Demaille
a122efad8a tests: refactor the bison invocations.
* tests/local.at (m4_null_if, AT_BISON_CHECK_): New.
2012-07-17 14:47:34 +02:00
Akim Demaille
15ffba51b0 maint: fix syntax-check ignore patterns.
* cfg.mk: here.
2012-07-17 12:14:55 +02:00
Akim Demaille
ea6a2d96db gnulib: update 2012-07-17 09:49:57 +02:00
Akim Demaille
ae63f0e8e2 gnulib: update.
* gnulib: Update so that gitlog-to-changelog support --srcdir.
* Makefile.am: Use it.
2012-07-16 20:40:18 +02:00
Akim Demaille
41c11ce484 gnulib: update
* bootstrap, build-aux/.gitignore, gnulib, m4/.gitignore: update.
2012-07-10 16:07:32 +02:00
Akim Demaille
a59a6ddef4 maint: update release instructions
* README-hacking: here.
2012-07-06 10:21:39 +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