static void yyprint (FILE *file, int type, const yystype *value);
symbol_class current_class = unknown_sym;
-char *current_type = 0;
+struniq_t current_type = 0;
symbol_t *current_lhs;
location_t current_lhs_location;
assoc_t current_assoc;
%token BRACED_CODE "{...}"
-%type <string> TYPE STRING string_content
- BRACED_CODE PROLOGUE EPILOGUE epilogue.opt action
+%type <string> STRING string_content
+ BRACED_CODE action
+ PROLOGUE EPILOGUE
+%type <struniq> TYPE
%type <integer> INT
%type <symbol> ID symbol string_as_id
%type <assoc> precedence_declarator
declarations "%%" grammar epilogue.opt
{
yycontrol->errcode = 0;
- epilogue_set ($4, @4);
}
;
epilogue.opt:
/* Nothing. */
- {
- $$ = xstrdup ("");
- }
| "%%" EPILOGUE
{
- $$ = $2;
+ epilogue_augment ($2, @2);
+ scanner_last_string_free ();
}
;
case EPILOGUE:
fprintf (file, " = {{ %s }}", value->string);
break;
+
+ default:
+ fprintf (file, "unknown token type");
+ break;
}
}