Support %define "KEY" {VALUE}.

* 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.
This commit is contained in:
Akim Demaille
2006-07-13 08:12:00 +00:00
parent db7e5eb5ef
commit 2ce4ed68c9
7 changed files with 488 additions and 461 deletions

View File

@@ -160,7 +160,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
/* Line 1539 of yacc.c. */
#line 90 "parse-gram.y"
#line 97 "../../src/parse-gram.y"
{
symbol *symbol;
symbol_list *list;
@@ -171,7 +171,7 @@ typedef union YYSTYPE
unsigned char character;
}
/* Line 1539 of yacc.c. */
#line 175 "parse-gram.h"
#line 175 "../../src/parse-gram.h"
YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */