* data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of

arguments is really empty, not only equal to `[]'.
* src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
member.
(symbol_destructor_set): New.
* src/output.c (symbol_destructors_output): New.
* src/reader.h (brace_code_t, current_braced_code): New.
* src/scan-gram.l (BRACED_CODE): Use it to branch on...
(handle_dollar): Rename as...
(handle_action_dollar): this.
(handle_destructor_dollar): New.
* src/parse-gram.y (PERCENT_DESTRUCTOR): New.
(grammar_declaration): Use it.
* data/bison.simple (yystos): Is always defined.
(yydestructor): New.
* tests/actions.at (Destructors): New.
* tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
This commit is contained in:
Akim Demaille
2002-06-17 08:43:12 +00:00
parent dafdc66ff0
commit 9280d3ef89
15 changed files with 1222 additions and 848 deletions

View File

@@ -432,7 +432,8 @@ m4_define([m4_bmatch],
# of LIST (which can be lists themselves, for multiple arguments MACROs).
m4_define([m4_fst], [$1])
m4_define([m4_map],
[m4_if([$2], [[]], [],
[m4_if([$2], [], [],
[$2], [[]], [],
[$1(m4_fst($2))[]dnl
m4_map([$1], m4_cdr($2))])])