diff --git a/src/muscle-tab.c b/src/muscle-tab.c index 0a7978d8..351fb964 100644 --- a/src/muscle-tab.c +++ b/src/muscle-tab.c @@ -444,8 +444,13 @@ muscle_percent_variable_update (char const *variable, location variable_loc, } conversion_type; const conversion_type conversion[] = { + { "abstract", "api.parser.abstract", muscle_keyword }, + { "annotations", "api.parser.annotations", muscle_code }, { "api.push_pull", "api.push-pull", muscle_keyword }, { "api.tokens.prefix", "api.token.prefix", muscle_code }, + { "extends", "api.parser.extends", muscle_keyword }, + { "final", "api.parser.final", muscle_keyword }, + { "implements", "api.parser.implements", muscle_keyword }, { "lex_symbol", "api.token.constructor", -1 }, { "location_type", "api.location.type", muscle_code }, { "lr.default-reductions", "lr.default-reduction", muscle_keyword }, @@ -453,16 +458,11 @@ muscle_percent_variable_update (char const *variable, location variable_loc, { "lr.keep_unreachable_states", "lr.keep-unreachable-state", muscle_keyword }, { "namespace", "api.namespace", muscle_code }, { "parser_class_name", "api.parser.class", muscle_code }, + { "public", "api.parser.public", muscle_keyword }, + { "strictfp", "api.parser.strictfp", muscle_keyword }, { "stype", "api.value.type", -1 }, { "variant=", "api.value.type=variant", -1 }, { "variant=true", "api.value.type=variant", -1 }, - { "abstract", "api.parser.abstract", muscle_keyword }, - { "annotations", "api.parser.annotations", muscle_code }, - { "extends", "api.parser.extends", muscle_keyword }, - { "final", "api.parser.final", muscle_keyword }, - { "implements", "api.parser.implements", muscle_keyword }, - { "public", "api.parser.public", muscle_keyword }, - { "strictfp", "api.parser.strictfp", muscle_keyword }, { NULL, NULL, -1, } }; diff --git a/src/scan-gram.l b/src/scan-gram.l index 82fd559e..571962e9 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -76,18 +76,17 @@ static size_t no_cr_read (FILE *, char *, size_t); #define DEPRECATED(Msg) \ do { \ - size_t i; \ deprecated_directive (loc, yytext, Msg); \ scanner_cursor.column -= mbsnwidth (Msg, strlen (Msg), 0); \ - for (i = strlen (Msg); i != 0; --i) \ + for (size_t i = strlen (Msg); i != 0; --i) \ unput (Msg[i - 1]); \ } while (0) /* A string representing the most recently saved token. */ -static char *last_string; +static char *last_string = NULL; /* Bracketed identifier. */ -static uniqstr bracketed_id_str = 0; +static uniqstr bracketed_id_str = NULL; static location bracketed_id_loc; static boundary bracketed_id_start; static int bracketed_id_context_state = 0;