/* Bison Grammar Parser -*- C -*-
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
#include "symtab.h"
}
+%code top
+{
+ /* On column 0 to please syntax-check. */
+#include <config.h>
+}
+
%code
{
- #include <config.h>
#include "system.h"
#include "c-ctype.h"
union_name:
%empty {}
-| ID { muscle_code_grow ("union_name", $1, @1); }
+| ID { muscle_percent_define_insert ("api.value.union.name",
+ @1, muscle_keyword, $1,
+ MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE); }
;
grammar_declaration:
named_ref.opt:
%empty { $$ = 0; }
-| BRACKETED_ID { $$ = named_ref_new($1, @1); }
+| BRACKETED_ID { $$ = named_ref_new ($1, @1); }
;
/*---------------------.
%empty { $$.kind = muscle_keyword; $$.chars = ""; }
| ID { $$.kind = muscle_keyword; $$.chars = $1; }
| STRING { $$.kind = muscle_string; $$.chars = $1; }
-| "{...}" { $$.kind = muscle_code;
- $$.chars = translate_code_braceless ($1, @1); }
+| "{...}" { $$.kind = muscle_code; $$.chars = strip_braces ($1); }
;
static
char *strip_braces (char *code)
{
- code[strlen(code) - 1] = 0;
+ code[strlen (code) - 1] = 0;
return code + 1;
}