On 13 Jul 2006, at 10:56, Akim Demaille wrote:
Index: ChangeLog
from Akim Demaille <[EMAIL PROTECTED]>
* src/scan-code.h, src/scan-code.l (translate_action)
(translate_rule_action, translate_symbol_action, translate_code):
Return char *, not const char *.
* src/parse-gram.y (declaration): Rename as...
(prologue_declaration): this.
(string_content): Remove this nonterminal, use STRING.
(braceless, content, content.opt): New nonterminal.
Use them.
(%define): Now accept content.opt, i.e., accept also BRACED_CODE
as value.
* src/scan-gram.l (getargs.h): Don't include it.
Sounds hopeful, if BRACED_CODE is the ordinary code one wants to
place. :-)
I think though the syntax should, for user readability, include
%define KEY {VALUE}
where KEY is a standard C-label, or whatever Bison is normally is
using. The STRING version should then be there in cases, this non-
quoted version does not suffice. So one should be able to write:
%define header_code {
...
}
and so on, without quotes, or if Bison accepts it in other similar
places,
%define header-code {
...
}
with a "-" instead of the silly "_".
Hans Aberg