Commit 3a483371 by Volker Reichelt Committed by Volker Reichelt

parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN as `)', not as `('.

	* parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
	as `)', not as `('.  Fix quotation.
	(cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
	(cp_parser_primary_expression): Likewise.
	(cp_parser_nested_name_specifier_opt): Likewise.
	(cp_parser_postfix_expression): Likewise.
	(cp_parser_postfix_open_square_expression): Likewise.
	(cp_parser_parenthesized_expression_list): Likewise.
	(cp_parser_pseudo_destructor_name): Likewise.
	(cp_parser_new_expression): Likewise.
	(cp_parser_direct_new_declarator): Likewise.
	(cp_parser_delete_expression): Likewise.
	(cp_parser_cast_expression): Likewise.
	(cp_parser_question_colon_clause): Likewise.
	(cp_parser_builtin_offsetof): Likewise.
	(cp_parser_trait_expr): Likewise.
	(cp_parser_label_for_labeled_statement): Likewise.
	(cp_parser_compound_statement): Likewise.
	(cp_parser_selection_statement): Likewise.
	(cp_parser_condition): Likewise.
	(cp_parser_iteration_statement): Likewise.
	(cp_parser_already_scoped_statement): Likewise.
	(cp_parser_simple_declaration): Likewise.
	(cp_parser_linkage_specification): Likewise.
	(cp_parser_static_assert): Likewise.
	(cp_parser_decltype): Likewise.
	(cp_parser_conversion_function_id): Likewise.
	(cp_parser_operator_function_id): Likewise.
	(cp_parser_operator): Likewise.
	(cp_parser_type_parameter): Likewise.
	(cp_parser_template_id): Likewise.
	(cp_parser_explicit_instantiation): Likewise.
	(cp_parser_explicit_specialization): Likewise.
	(cp_parser_enum_specifier): Likewise.
	(cp_parser_namespace_definition): Likewise.
	(cp_parser_namespace_alias_definition): Likewise.
	(cp_parser_using_declaration): Likewise.
	(cp_parser_using_directive): Likewise.
	(cp_parser_asm_definition): Likewise.
	(cp_parser_direct_declarator): Likewise.
	(cp_parser_ptr_operator): Likewise.
	(cp_parser_parameter_declaration_clause): Likewise.
	(cp_parser_initializer_clause): Likewise.
	(cp_parser_class_specifier): Likewise.
	(cp_parser_member_specification_opt): Likewise.
	(cp_parser_member_declaration): Likewise.
	(cp_parser_pure_specifier): Likewise.
	(cp_parser_constant_initializer): Likewise.
	(cp_parser_base_clause): Likewise.
	(cp_parser_exception_specification_opt): Likewise.
	(cp_parser_try_block): Likewise.
	(cp_parser_function_try_block): Likewise.
	(cp_parser_handler): Likewise.
	(cp_parser_throw_expression): Likewise.
	(cp_parser_asm_operand_list): Likewise.
	(cp_parser_attributes_opt): Likewise.
	(cp_parser_label_declaration): Likewise.
	(cp_parser_constructor_declarator_p): Likewise.
	(cp_parser_template_declaration_after_export): Likewise.
	(cp_parser_single_declaration): Likewise.
	(cp_parser_objc_message_expression): Likewise.
	(cp_parser_objc_message_args): Likewise.
	(cp_parser_objc_encode_expression): Likewise.
	(cp_parser_objc_defs_expression): Likewise.
	(cp_parser_objc_protocol_expression): Likewise.
	(cp_parser_objc_selector_expression): Likewise.
	(cp_parser_objc_protocol_refs_opt): Likewise.
	(cp_parser_objc_typename): Likewise.
	(cp_parser_objc_method_keyword_params): Likewise.
	(cp_parser_objc_superclass_or_category): Likewise.
	(cp_parser_objc_try_catch_finally_statement): Likewise.
	(cp_parser_objc_synchronized_statement): Likewise.
	(cp_parser_objc_throw_statement): Likewise.
	(cp_parser_omp_var_list_no_open): Likewise.
	(cp_parser_omp_clause_default): Likewise.
	(cp_parser_omp_clause_if): Likewise.
	(cp_parser_omp_clause_num_threads): Likewise.
	(cp_parser_omp_clause_reduction): Likewise.
	(cp_parser_omp_clause_schedule): Likewise.
	(cp_parser_omp_critical): Likewise.
	(cp_parser_omp_for_loop): Likewise.
	(cp_parser_omp_sections_scope): Likewise.

From-SVN: r134127
parent de21c145
2008-04-09 Volker Reichelt <v.reichelt@netcologne.de> 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
* parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
as `)', not as `('. Fix quotation.
(cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
(cp_parser_primary_expression): Likewise.
(cp_parser_nested_name_specifier_opt): Likewise.
(cp_parser_postfix_expression): Likewise.
(cp_parser_postfix_open_square_expression): Likewise.
(cp_parser_parenthesized_expression_list): Likewise.
(cp_parser_pseudo_destructor_name): Likewise.
(cp_parser_new_expression): Likewise.
(cp_parser_direct_new_declarator): Likewise.
(cp_parser_delete_expression): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_question_colon_clause): Likewise.
(cp_parser_builtin_offsetof): Likewise.
(cp_parser_trait_expr): Likewise.
(cp_parser_label_for_labeled_statement): Likewise.
(cp_parser_compound_statement): Likewise.
(cp_parser_selection_statement): Likewise.
(cp_parser_condition): Likewise.
(cp_parser_iteration_statement): Likewise.
(cp_parser_already_scoped_statement): Likewise.
(cp_parser_simple_declaration): Likewise.
(cp_parser_linkage_specification): Likewise.
(cp_parser_static_assert): Likewise.
(cp_parser_decltype): Likewise.
(cp_parser_conversion_function_id): Likewise.
(cp_parser_operator_function_id): Likewise.
(cp_parser_operator): Likewise.
(cp_parser_type_parameter): Likewise.
(cp_parser_template_id): Likewise.
(cp_parser_explicit_instantiation): Likewise.
(cp_parser_explicit_specialization): Likewise.
(cp_parser_enum_specifier): Likewise.
(cp_parser_namespace_definition): Likewise.
(cp_parser_namespace_alias_definition): Likewise.
(cp_parser_using_declaration): Likewise.
(cp_parser_using_directive): Likewise.
(cp_parser_asm_definition): Likewise.
(cp_parser_direct_declarator): Likewise.
(cp_parser_ptr_operator): Likewise.
(cp_parser_parameter_declaration_clause): Likewise.
(cp_parser_initializer_clause): Likewise.
(cp_parser_class_specifier): Likewise.
(cp_parser_member_specification_opt): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_pure_specifier): Likewise.
(cp_parser_constant_initializer): Likewise.
(cp_parser_base_clause): Likewise.
(cp_parser_exception_specification_opt): Likewise.
(cp_parser_try_block): Likewise.
(cp_parser_function_try_block): Likewise.
(cp_parser_handler): Likewise.
(cp_parser_throw_expression): Likewise.
(cp_parser_asm_operand_list): Likewise.
(cp_parser_attributes_opt): Likewise.
(cp_parser_label_declaration): Likewise.
(cp_parser_constructor_declarator_p): Likewise.
(cp_parser_template_declaration_after_export): Likewise.
(cp_parser_single_declaration): Likewise.
(cp_parser_objc_message_expression): Likewise.
(cp_parser_objc_message_args): Likewise.
(cp_parser_objc_encode_expression): Likewise.
(cp_parser_objc_defs_expression): Likewise.
(cp_parser_objc_protocol_expression): Likewise.
(cp_parser_objc_selector_expression): Likewise.
(cp_parser_objc_protocol_refs_opt): Likewise.
(cp_parser_objc_typename): Likewise.
(cp_parser_objc_method_keyword_params): Likewise.
(cp_parser_objc_superclass_or_category): Likewise.
(cp_parser_objc_try_catch_finally_statement): Likewise.
(cp_parser_objc_synchronized_statement): Likewise.
(cp_parser_objc_throw_statement): Likewise.
(cp_parser_omp_var_list_no_open): Likewise.
(cp_parser_omp_clause_default): Likewise.
(cp_parser_omp_clause_if): Likewise.
(cp_parser_omp_clause_num_threads): Likewise.
(cp_parser_omp_clause_reduction): Likewise.
(cp_parser_omp_clause_schedule): Likewise.
(cp_parser_omp_critical): Likewise.
(cp_parser_omp_for_loop): Likewise.
(cp_parser_omp_sections_scope): Likewise.
* parser.c (cp_parser_template_parameter_list): Simplify. * parser.c (cp_parser_template_parameter_list): Simplify.
2008-04-07 James E. Wilson <wilson@tuliptree.org> 2008-04-07 James E. Wilson <wilson@tuliptree.org>
......
...@@ -2545,7 +2545,7 @@ static void ...@@ -2545,7 +2545,7 @@ static void
cp_parser_consume_semicolon_at_end_of_statement (cp_parser *parser) cp_parser_consume_semicolon_at_end_of_statement (cp_parser *parser)
{ {
/* Look for the trailing `;'. */ /* Look for the trailing `;'. */
if (!cp_parser_require (parser, CPP_SEMICOLON, "`;'")) if (!cp_parser_require (parser, CPP_SEMICOLON, "%<;%>"))
{ {
/* If there is additional (erroneous) input, skip to the end of /* If there is additional (erroneous) input, skip to the end of
the statement. */ the statement. */
...@@ -3199,7 +3199,7 @@ cp_parser_primary_expression (cp_parser *parser, ...@@ -3199,7 +3199,7 @@ cp_parser_primary_expression (cp_parser *parser,
parser->greater_than_is_operator_p parser->greater_than_is_operator_p
= saved_greater_than_is_operator_p; = saved_greater_than_is_operator_p;
/* Consume the `)'. */ /* Consume the `)'. */
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
cp_parser_skip_to_end_of_statement (parser); cp_parser_skip_to_end_of_statement (parser);
return expr; return expr;
...@@ -3263,16 +3263,16 @@ cp_parser_primary_expression (cp_parser *parser, ...@@ -3263,16 +3263,16 @@ cp_parser_primary_expression (cp_parser *parser,
`va_arg'. Consume the `__builtin_va_arg' token. */ `va_arg'. Consume the `__builtin_va_arg' token. */
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Look for the opening `('. */ /* Look for the opening `('. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Now, parse the assignment-expression. */ /* Now, parse the assignment-expression. */
expression = cp_parser_assignment_expression (parser, expression = cp_parser_assignment_expression (parser,
/*cast_p=*/false); /*cast_p=*/false);
/* Look for the `,'. */ /* Look for the `,'. */
cp_parser_require (parser, CPP_COMMA, "`,'"); cp_parser_require (parser, CPP_COMMA, "%<,%>");
/* Parse the type-id. */ /* Parse the type-id. */
type = cp_parser_type_id (parser); type = cp_parser_type_id (parser);
/* Look for the closing `)'. */ /* Look for the closing `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* Using `va_arg' in a constant-expression is not /* Using `va_arg' in a constant-expression is not
allowed. */ allowed. */
if (cp_parser_non_integral_constant_expression (parser, if (cp_parser_non_integral_constant_expression (parser,
...@@ -3991,7 +3991,7 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, ...@@ -3991,7 +3991,7 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser,
type_p, type_p,
is_declaration); is_declaration);
/* Look for the `::' token. */ /* Look for the `::' token. */
cp_parser_require (parser, CPP_SCOPE, "`::'"); cp_parser_require (parser, CPP_SCOPE, "%<::%>");
/* If we found what we wanted, we keep going; otherwise, we're /* If we found what we wanted, we keep going; otherwise, we're
done. */ done. */
...@@ -4307,18 +4307,18 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, ...@@ -4307,18 +4307,18 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
= "types may not be defined in casts"; = "types may not be defined in casts";
/* Look for the opening `<'. */ /* Look for the opening `<'. */
cp_parser_require (parser, CPP_LESS, "`<'"); cp_parser_require (parser, CPP_LESS, "%<<%>");
/* Parse the type to which we are casting. */ /* Parse the type to which we are casting. */
type = cp_parser_type_id (parser); type = cp_parser_type_id (parser);
/* Look for the closing `>'. */ /* Look for the closing `>'. */
cp_parser_require (parser, CPP_GREATER, "`>'"); cp_parser_require (parser, CPP_GREATER, "%<>%>");
/* Restore the old message. */ /* Restore the old message. */
parser->type_definition_forbidden_message = saved_message; parser->type_definition_forbidden_message = saved_message;
/* And the expression which is being cast. */ /* And the expression which is being cast. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
expression = cp_parser_expression (parser, /*cast_p=*/true); expression = cp_parser_expression (parser, /*cast_p=*/true);
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* Only type conversions to integral or enumeration types /* Only type conversions to integral or enumeration types
can be used in constant-expressions. */ can be used in constant-expressions. */
...@@ -4363,7 +4363,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, ...@@ -4363,7 +4363,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
/* Consume the `typeid' token. */ /* Consume the `typeid' token. */
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Look for the `(' token. */ /* Look for the `(' token. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Types cannot be defined in a `typeid' expression. */ /* Types cannot be defined in a `typeid' expression. */
saved_message = parser->type_definition_forbidden_message; saved_message = parser->type_definition_forbidden_message;
parser->type_definition_forbidden_message parser->type_definition_forbidden_message
...@@ -4379,7 +4379,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, ...@@ -4379,7 +4379,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
/* Look for the `)' token. Otherwise, we can't be sure that /* Look for the `)' token. Otherwise, we can't be sure that
we're not looking at an expression: consider `typeid (int we're not looking at an expression: consider `typeid (int
(3))', for example. */ (3))', for example. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* If all went well, simply lookup the type-id. */ /* If all went well, simply lookup the type-id. */
if (cp_parser_parse_definitely (parser)) if (cp_parser_parse_definitely (parser))
postfix_expression = get_typeid (type); postfix_expression = get_typeid (type);
...@@ -4393,7 +4393,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, ...@@ -4393,7 +4393,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
/* Compute its typeid. */ /* Compute its typeid. */
postfix_expression = build_typeid (expression); postfix_expression = build_typeid (expression);
/* Look for the `)' token. */ /* Look for the `)' token. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
} }
/* Restore the saved message. */ /* Restore the saved message. */
parser->type_definition_forbidden_message = saved_message; parser->type_definition_forbidden_message = saved_message;
...@@ -4454,9 +4454,9 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, ...@@ -4454,9 +4454,9 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
type = cp_parser_type_id (parser); type = cp_parser_type_id (parser);
parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p; parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p;
/* Look for the `)'. */ /* Look for the `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* Look for the `{'. */ /* Look for the `{'. */
cp_parser_require (parser, CPP_OPEN_BRACE, "`{'"); cp_parser_require (parser, CPP_OPEN_BRACE, "%<{%>");
/* If things aren't going well, there's no need to /* If things aren't going well, there's no need to
keep going. */ keep going. */
if (!cp_parser_error_occurred (parser)) if (!cp_parser_error_occurred (parser))
...@@ -4469,7 +4469,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, ...@@ -4469,7 +4469,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA)) if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA))
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Look for the final `}'. */ /* Look for the final `}'. */
cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>");
} }
/* If that worked, we're definitely looking at a /* If that worked, we're definitely looking at a
compound-literal expression. */ compound-literal expression. */
...@@ -4775,7 +4775,7 @@ cp_parser_postfix_open_square_expression (cp_parser *parser, ...@@ -4775,7 +4775,7 @@ cp_parser_postfix_open_square_expression (cp_parser *parser,
index = cp_parser_expression (parser, /*cast_p=*/false); index = cp_parser_expression (parser, /*cast_p=*/false);
/* Look for the closing `]'. */ /* Look for the closing `]'. */
cp_parser_require (parser, CPP_CLOSE_SQUARE, "`]'"); cp_parser_require (parser, CPP_CLOSE_SQUARE, "%<]%>");
/* Build the ARRAY_REF. */ /* Build the ARRAY_REF. */
postfix_expression = grok_array_decl (postfix_expression, index); postfix_expression = grok_array_decl (postfix_expression, index);
...@@ -5003,7 +5003,7 @@ cp_parser_parenthesized_expression_list (cp_parser* parser, ...@@ -5003,7 +5003,7 @@ cp_parser_parenthesized_expression_list (cp_parser* parser,
if (non_constant_p) if (non_constant_p)
*non_constant_p = false; *non_constant_p = false;
if (!cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return error_mark_node; return error_mark_node;
/* Within a parenthesized expression, a `>' token is always /* Within a parenthesized expression, a `>' token is always
...@@ -5083,7 +5083,7 @@ cp_parser_parenthesized_expression_list (cp_parser* parser, ...@@ -5083,7 +5083,7 @@ cp_parser_parenthesized_expression_list (cp_parser* parser,
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
} }
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
{ {
int ending; int ending;
...@@ -5160,7 +5160,7 @@ cp_parser_pseudo_destructor_name (cp_parser* parser, ...@@ -5160,7 +5160,7 @@ cp_parser_pseudo_destructor_name (cp_parser* parser,
/*check_dependency_p=*/false, /*check_dependency_p=*/false,
/*is_declaration=*/true); /*is_declaration=*/true);
/* Look for the `::' token. */ /* Look for the `::' token. */
cp_parser_require (parser, CPP_SCOPE, "`::'"); cp_parser_require (parser, CPP_SCOPE, "%<::%>");
} }
/* If the next token is not a `~', then there might be some /* If the next token is not a `~', then there might be some
additional qualification. */ additional qualification. */
...@@ -5186,13 +5186,13 @@ cp_parser_pseudo_destructor_name (cp_parser* parser, ...@@ -5186,13 +5186,13 @@ cp_parser_pseudo_destructor_name (cp_parser* parser,
return; return;
/* Look for the `::' token. */ /* Look for the `::' token. */
cp_parser_require (parser, CPP_SCOPE, "`::'"); cp_parser_require (parser, CPP_SCOPE, "%<::%>");
} }
else else
*scope = NULL_TREE; *scope = NULL_TREE;
/* Look for the `~'. */ /* Look for the `~'. */
cp_parser_require (parser, CPP_COMPL, "`~'"); cp_parser_require (parser, CPP_COMPL, "%<~%>");
/* Look for the type-name again. We are not responsible for /* Look for the type-name again. We are not responsible for
checking that it matches the first type-name. */ checking that it matches the first type-name. */
*type = cp_parser_nonclass_name (parser); *type = cp_parser_nonclass_name (parser);
...@@ -5462,7 +5462,7 @@ cp_parser_new_expression (cp_parser* parser) ...@@ -5462,7 +5462,7 @@ cp_parser_new_expression (cp_parser* parser)
/*current_scope_valid_p=*/false) /*current_scope_valid_p=*/false)
!= NULL_TREE); != NULL_TREE);
/* Look for the `new' operator. */ /* Look for the `new' operator. */
cp_parser_require_keyword (parser, RID_NEW, "`new'"); cp_parser_require_keyword (parser, RID_NEW, "%<new%>");
/* There's no easy way to tell a new-placement from the /* There's no easy way to tell a new-placement from the
`( type-id )' construct. */ `( type-id )' construct. */
cp_parser_parse_tentatively (parser); cp_parser_parse_tentatively (parser);
...@@ -5481,7 +5481,7 @@ cp_parser_new_expression (cp_parser* parser) ...@@ -5481,7 +5481,7 @@ cp_parser_new_expression (cp_parser* parser)
/* Parse the type-id. */ /* Parse the type-id. */
type = cp_parser_type_id (parser); type = cp_parser_type_id (parser);
/* Look for the closing `)'. */ /* Look for the closing `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* There should not be a direct-new-declarator in this production, /* There should not be a direct-new-declarator in this production,
but GCC used to allowed this, so we check and emit a sensible error but GCC used to allowed this, so we check and emit a sensible error
message for this case. */ message for this case. */
...@@ -5660,7 +5660,7 @@ cp_parser_direct_new_declarator (cp_parser* parser) ...@@ -5660,7 +5660,7 @@ cp_parser_direct_new_declarator (cp_parser* parser)
tree expression; tree expression;
/* Look for the opening `['. */ /* Look for the opening `['. */
cp_parser_require (parser, CPP_OPEN_SQUARE, "`['"); cp_parser_require (parser, CPP_OPEN_SQUARE, "%<[%>");
/* The first expression is not required to be constant. */ /* The first expression is not required to be constant. */
if (!declarator) if (!declarator)
{ {
...@@ -5692,7 +5692,7 @@ cp_parser_direct_new_declarator (cp_parser* parser) ...@@ -5692,7 +5692,7 @@ cp_parser_direct_new_declarator (cp_parser* parser)
/*allow_non_constant=*/false, /*allow_non_constant=*/false,
NULL); NULL);
/* Look for the closing `]'. */ /* Look for the closing `]'. */
cp_parser_require (parser, CPP_CLOSE_SQUARE, "`]'"); cp_parser_require (parser, CPP_CLOSE_SQUARE, "%<]%>");
/* Add this bound to the declarator. */ /* Add this bound to the declarator. */
declarator = make_array_declarator (declarator, expression); declarator = make_array_declarator (declarator, expression);
...@@ -5749,14 +5749,14 @@ cp_parser_delete_expression (cp_parser* parser) ...@@ -5749,14 +5749,14 @@ cp_parser_delete_expression (cp_parser* parser)
/*current_scope_valid_p=*/false) /*current_scope_valid_p=*/false)
!= NULL_TREE); != NULL_TREE);
/* Look for the `delete' keyword. */ /* Look for the `delete' keyword. */
cp_parser_require_keyword (parser, RID_DELETE, "`delete'"); cp_parser_require_keyword (parser, RID_DELETE, "%<delete%>");
/* See if the array syntax is in use. */ /* See if the array syntax is in use. */
if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_SQUARE)) if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_SQUARE))
{ {
/* Consume the `[' token. */ /* Consume the `[' token. */
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Look for the `]' token. */ /* Look for the `]' token. */
cp_parser_require (parser, CPP_CLOSE_SQUARE, "`]'"); cp_parser_require (parser, CPP_CLOSE_SQUARE, "%<]%>");
/* Remember that this is the `[]' construct. */ /* Remember that this is the `[]' construct. */
array_p = true; array_p = true;
} }
...@@ -5845,7 +5845,7 @@ cp_parser_cast_expression (cp_parser *parser, bool address_p, bool cast_p) ...@@ -5845,7 +5845,7 @@ cp_parser_cast_expression (cp_parser *parser, bool address_p, bool cast_p)
/* Look for the type-id. */ /* Look for the type-id. */
type = cp_parser_type_id (parser); type = cp_parser_type_id (parser);
/* Look for the closing `)'. */ /* Look for the closing `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p; parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p;
} }
...@@ -6118,7 +6118,7 @@ cp_parser_question_colon_clause (cp_parser* parser, tree logical_or_expr) ...@@ -6118,7 +6118,7 @@ cp_parser_question_colon_clause (cp_parser* parser, tree logical_or_expr)
expr = cp_parser_expression (parser, /*cast_p=*/false); expr = cp_parser_expression (parser, /*cast_p=*/false);
/* The next token should be a `:'. */ /* The next token should be a `:'. */
cp_parser_require (parser, CPP_COLON, "`:'"); cp_parser_require (parser, CPP_COLON, "%<:%>");
/* Parse the assignment-expression. */ /* Parse the assignment-expression. */
assignment_expr = cp_parser_assignment_expression (parser, /*cast_p=*/false); assignment_expr = cp_parser_assignment_expression (parser, /*cast_p=*/false);
...@@ -6416,11 +6416,11 @@ cp_parser_builtin_offsetof (cp_parser *parser) ...@@ -6416,11 +6416,11 @@ cp_parser_builtin_offsetof (cp_parser *parser)
/* Consume the "__builtin_offsetof" token. */ /* Consume the "__builtin_offsetof" token. */
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Consume the opening `('. */ /* Consume the opening `('. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Parse the type-id. */ /* Parse the type-id. */
type = cp_parser_type_id (parser); type = cp_parser_type_id (parser);
/* Look for the `,'. */ /* Look for the `,'. */
cp_parser_require (parser, CPP_COMMA, "`,'"); cp_parser_require (parser, CPP_COMMA, "%<,%>");
/* Build the (type *)null that begins the traditional offsetof macro. */ /* Build the (type *)null that begins the traditional offsetof macro. */
expr = build_static_cast (build_pointer_type (type), null_pointer_node, expr = build_static_cast (build_pointer_type (type), null_pointer_node,
...@@ -6454,7 +6454,7 @@ cp_parser_builtin_offsetof (cp_parser *parser) ...@@ -6454,7 +6454,7 @@ cp_parser_builtin_offsetof (cp_parser *parser)
default: default:
/* Error. We know the following require will fail, but /* Error. We know the following require will fail, but
that gives the proper error message. */ that gives the proper error message. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
cp_parser_skip_to_closing_parenthesis (parser, true, false, true); cp_parser_skip_to_closing_parenthesis (parser, true, false, true);
expr = error_mark_node; expr = error_mark_node;
goto failure; goto failure;
...@@ -6548,7 +6548,7 @@ cp_parser_trait_expr (cp_parser* parser, enum rid keyword) ...@@ -6548,7 +6548,7 @@ cp_parser_trait_expr (cp_parser* parser, enum rid keyword)
/* Consume the token. */ /* Consume the token. */
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
type1 = cp_parser_type_id (parser); type1 = cp_parser_type_id (parser);
...@@ -6565,7 +6565,7 @@ cp_parser_trait_expr (cp_parser* parser, enum rid keyword) ...@@ -6565,7 +6565,7 @@ cp_parser_trait_expr (cp_parser* parser, enum rid keyword)
if (binary) if (binary)
{ {
cp_parser_require (parser, CPP_COMMA, "`,'"); cp_parser_require (parser, CPP_COMMA, "%<,%>");
type2 = cp_parser_type_id (parser); type2 = cp_parser_type_id (parser);
...@@ -6581,7 +6581,7 @@ cp_parser_trait_expr (cp_parser* parser, enum rid keyword) ...@@ -6581,7 +6581,7 @@ cp_parser_trait_expr (cp_parser* parser, enum rid keyword)
/*initialized=*/0, /*attrlist=*/NULL); /*initialized=*/0, /*attrlist=*/NULL);
} }
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* Complete the trait expression, which may mean either processing /* Complete the trait expression, which may mean either processing
the trait expr now or saving it for template instantiation. */ the trait expr now or saving it for template instantiation. */
...@@ -6826,7 +6826,7 @@ cp_parser_label_for_labeled_statement (cp_parser* parser) ...@@ -6826,7 +6826,7 @@ cp_parser_label_for_labeled_statement (cp_parser* parser)
} }
/* Require the `:' token. */ /* Require the `:' token. */
cp_parser_require (parser, CPP_COLON, "`:'"); cp_parser_require (parser, CPP_COLON, "%<:%>");
} }
/* Parse an expression-statement. /* Parse an expression-statement.
...@@ -6888,7 +6888,7 @@ cp_parser_compound_statement (cp_parser *parser, tree in_statement_expr, ...@@ -6888,7 +6888,7 @@ cp_parser_compound_statement (cp_parser *parser, tree in_statement_expr,
tree compound_stmt; tree compound_stmt;
/* Consume the `{'. */ /* Consume the `{'. */
if (!cp_parser_require (parser, CPP_OPEN_BRACE, "`{'")) if (!cp_parser_require (parser, CPP_OPEN_BRACE, "%<{%>"))
return error_mark_node; return error_mark_node;
/* Begin the compound-statement. */ /* Begin the compound-statement. */
compound_stmt = begin_compound_stmt (in_try ? BCS_TRY_BLOCK : 0); compound_stmt = begin_compound_stmt (in_try ? BCS_TRY_BLOCK : 0);
...@@ -6900,7 +6900,7 @@ cp_parser_compound_statement (cp_parser *parser, tree in_statement_expr, ...@@ -6900,7 +6900,7 @@ cp_parser_compound_statement (cp_parser *parser, tree in_statement_expr,
/* Finish the compound-statement. */ /* Finish the compound-statement. */
finish_compound_stmt (compound_stmt); finish_compound_stmt (compound_stmt);
/* Consume the `}'. */ /* Consume the `}'. */
cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>");
return compound_stmt; return compound_stmt;
} }
...@@ -6980,7 +6980,7 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p) ...@@ -6980,7 +6980,7 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p)
tree condition; tree condition;
/* Look for the `('. */ /* Look for the `('. */
if (!cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
{ {
cp_parser_skip_to_end_of_statement (parser); cp_parser_skip_to_end_of_statement (parser);
return error_mark_node; return error_mark_node;
...@@ -6995,7 +6995,7 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p) ...@@ -6995,7 +6995,7 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p)
/* Parse the condition. */ /* Parse the condition. */
condition = cp_parser_condition (parser); condition = cp_parser_condition (parser);
/* Look for the `)'. */ /* Look for the `)'. */
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
cp_parser_skip_to_closing_parenthesis (parser, true, false, cp_parser_skip_to_closing_parenthesis (parser, true, false,
/*consume_paren=*/true); /*consume_paren=*/true);
...@@ -7138,7 +7138,7 @@ cp_parser_condition (cp_parser* parser) ...@@ -7138,7 +7138,7 @@ cp_parser_condition (cp_parser* parser)
looks like a decl-specifier-seq and a declarator -- but then looks like a decl-specifier-seq and a declarator -- but then
there is no `=', so this is an expression. */ there is no `=', so this is an expression. */
cp_parser_require (parser, CPP_EQ, "`='"); cp_parser_require (parser, CPP_EQ, "%<=%>");
/* If we did see an `=', then we are looking at a declaration /* If we did see an `=', then we are looking at a declaration
for sure. */ for sure. */
if (cp_parser_parse_definitely (parser)) if (cp_parser_parse_definitely (parser))
...@@ -7260,13 +7260,13 @@ cp_parser_iteration_statement (cp_parser* parser) ...@@ -7260,13 +7260,13 @@ cp_parser_iteration_statement (cp_parser* parser)
/* Begin the while-statement. */ /* Begin the while-statement. */
statement = begin_while_stmt (); statement = begin_while_stmt ();
/* Look for the `('. */ /* Look for the `('. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Parse the condition. */ /* Parse the condition. */
condition = cp_parser_condition (parser); condition = cp_parser_condition (parser);
finish_while_stmt_cond (condition, statement); finish_while_stmt_cond (condition, statement);
check_empty_body (parser, "while"); check_empty_body (parser, "while");
/* Look for the `)'. */ /* Look for the `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* Parse the dependent statement. */ /* Parse the dependent statement. */
parser->in_statement = IN_ITERATION_STMT; parser->in_statement = IN_ITERATION_STMT;
cp_parser_already_scoped_statement (parser); cp_parser_already_scoped_statement (parser);
...@@ -7288,17 +7288,17 @@ cp_parser_iteration_statement (cp_parser* parser) ...@@ -7288,17 +7288,17 @@ cp_parser_iteration_statement (cp_parser* parser)
parser->in_statement = in_statement; parser->in_statement = in_statement;
finish_do_body (statement); finish_do_body (statement);
/* Look for the `while' keyword. */ /* Look for the `while' keyword. */
cp_parser_require_keyword (parser, RID_WHILE, "`while'"); cp_parser_require_keyword (parser, RID_WHILE, "%<while%>");
/* Look for the `('. */ /* Look for the `('. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Parse the expression. */ /* Parse the expression. */
expression = cp_parser_expression (parser, /*cast_p=*/false); expression = cp_parser_expression (parser, /*cast_p=*/false);
/* We're done with the do-statement. */ /* We're done with the do-statement. */
finish_do_stmt (expression, statement); finish_do_stmt (expression, statement);
/* Look for the `)'. */ /* Look for the `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* Look for the `;'. */ /* Look for the `;'. */
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
} }
break; break;
...@@ -7310,7 +7310,7 @@ cp_parser_iteration_statement (cp_parser* parser) ...@@ -7310,7 +7310,7 @@ cp_parser_iteration_statement (cp_parser* parser)
/* Begin the for-statement. */ /* Begin the for-statement. */
statement = begin_for_stmt (); statement = begin_for_stmt ();
/* Look for the `('. */ /* Look for the `('. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Parse the initialization. */ /* Parse the initialization. */
cp_parser_for_init_statement (parser); cp_parser_for_init_statement (parser);
finish_for_init_stmt (statement); finish_for_init_stmt (statement);
...@@ -7320,7 +7320,7 @@ cp_parser_iteration_statement (cp_parser* parser) ...@@ -7320,7 +7320,7 @@ cp_parser_iteration_statement (cp_parser* parser)
condition = cp_parser_condition (parser); condition = cp_parser_condition (parser);
finish_for_cond (condition, statement); finish_for_cond (condition, statement);
/* Look for the `;'. */ /* Look for the `;'. */
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
/* If there's an expression, process it. */ /* If there's an expression, process it. */
if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)) if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN))
...@@ -7328,7 +7328,7 @@ cp_parser_iteration_statement (cp_parser* parser) ...@@ -7328,7 +7328,7 @@ cp_parser_iteration_statement (cp_parser* parser)
finish_for_expr (expression, statement); finish_for_expr (expression, statement);
check_empty_body (parser, "for"); check_empty_body (parser, "for");
/* Look for the `)'. */ /* Look for the `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* Parse the body of the for-statement. */ /* Parse the body of the for-statement. */
parser->in_statement = IN_ITERATION_STMT; parser->in_statement = IN_ITERATION_STMT;
...@@ -7583,9 +7583,9 @@ cp_parser_already_scoped_statement (cp_parser* parser) ...@@ -7583,9 +7583,9 @@ cp_parser_already_scoped_statement (cp_parser* parser)
{ {
/* Avoid calling cp_parser_compound_statement, so that we /* Avoid calling cp_parser_compound_statement, so that we
don't create a new scope. Do everything else by hand. */ don't create a new scope. Do everything else by hand. */
cp_parser_require (parser, CPP_OPEN_BRACE, "`{'"); cp_parser_require (parser, CPP_OPEN_BRACE, "%<{%>");
cp_parser_statement_seq_opt (parser, NULL_TREE); cp_parser_statement_seq_opt (parser, NULL_TREE);
cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>");
} }
} }
...@@ -8023,7 +8023,7 @@ cp_parser_simple_declaration (cp_parser* parser, ...@@ -8023,7 +8023,7 @@ cp_parser_simple_declaration (cp_parser* parser,
} }
/* Consume the `;'. */ /* Consume the `;'. */
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
done: done:
pop_deferring_access_checks (); pop_deferring_access_checks ();
...@@ -8375,7 +8375,7 @@ cp_parser_linkage_specification (cp_parser* parser) ...@@ -8375,7 +8375,7 @@ cp_parser_linkage_specification (cp_parser* parser)
tree linkage; tree linkage;
/* Look for the `extern' keyword. */ /* Look for the `extern' keyword. */
cp_parser_require_keyword (parser, RID_EXTERN, "`extern'"); cp_parser_require_keyword (parser, RID_EXTERN, "%<extern%>");
/* Look for the string-literal. */ /* Look for the string-literal. */
linkage = cp_parser_string_literal (parser, false, false); linkage = cp_parser_string_literal (parser, false, false);
...@@ -8405,7 +8405,7 @@ cp_parser_linkage_specification (cp_parser* parser) ...@@ -8405,7 +8405,7 @@ cp_parser_linkage_specification (cp_parser* parser)
/* Parse the declarations. */ /* Parse the declarations. */
cp_parser_declaration_seq_opt (parser); cp_parser_declaration_seq_opt (parser);
/* Look for the closing `}'. */ /* Look for the closing `}'. */
cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>");
} }
/* Otherwise, there's just one declaration. */ /* Otherwise, there's just one declaration. */
else else
...@@ -8446,7 +8446,7 @@ cp_parser_static_assert(cp_parser *parser, bool member_p) ...@@ -8446,7 +8446,7 @@ cp_parser_static_assert(cp_parser *parser, bool member_p)
/* Look for the `static_assert' keyword. */ /* Look for the `static_assert' keyword. */
if (!cp_parser_require_keyword (parser, RID_STATIC_ASSERT, if (!cp_parser_require_keyword (parser, RID_STATIC_ASSERT,
"`static_assert'")) "%<static_assert%>"))
return; return;
/* We know we are in a static assertion; commit to any tentative /* We know we are in a static assertion; commit to any tentative
...@@ -8455,7 +8455,7 @@ cp_parser_static_assert(cp_parser *parser, bool member_p) ...@@ -8455,7 +8455,7 @@ cp_parser_static_assert(cp_parser *parser, bool member_p)
cp_parser_commit_to_tentative_parse (parser); cp_parser_commit_to_tentative_parse (parser);
/* Parse the `(' starting the static assertion condition. */ /* Parse the `(' starting the static assertion condition. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Parse the constant-expression. */ /* Parse the constant-expression. */
condition = condition =
...@@ -8464,7 +8464,7 @@ cp_parser_static_assert(cp_parser *parser, bool member_p) ...@@ -8464,7 +8464,7 @@ cp_parser_static_assert(cp_parser *parser, bool member_p)
/*non_constant_p=*/NULL); /*non_constant_p=*/NULL);
/* Parse the separating `,'. */ /* Parse the separating `,'. */
cp_parser_require (parser, CPP_COMMA, "`,'"); cp_parser_require (parser, CPP_COMMA, "%<,%>");
/* Parse the string-literal message. */ /* Parse the string-literal message. */
message = cp_parser_string_literal (parser, message = cp_parser_string_literal (parser,
...@@ -8472,14 +8472,14 @@ cp_parser_static_assert(cp_parser *parser, bool member_p) ...@@ -8472,14 +8472,14 @@ cp_parser_static_assert(cp_parser *parser, bool member_p)
/*wide_ok=*/true); /*wide_ok=*/true);
/* A `)' completes the static assertion. */ /* A `)' completes the static assertion. */
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
cp_parser_skip_to_closing_parenthesis (parser, cp_parser_skip_to_closing_parenthesis (parser,
/*recovering=*/true, /*recovering=*/true,
/*or_comma=*/false, /*or_comma=*/false,
/*consume_paren=*/true); /*consume_paren=*/true);
/* A semicolon terminates the declaration. */ /* A semicolon terminates the declaration. */
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
/* Complete the static assertion, which may mean either processing /* Complete the static assertion, which may mean either processing
the static assert now or saving it for template instantiation. */ the static assert now or saving it for template instantiation. */
...@@ -8501,7 +8501,7 @@ cp_parser_decltype (cp_parser *parser) ...@@ -8501,7 +8501,7 @@ cp_parser_decltype (cp_parser *parser)
bool saved_non_integral_constant_expression_p; bool saved_non_integral_constant_expression_p;
/* Look for the `decltype' token. */ /* Look for the `decltype' token. */
if (!cp_parser_require_keyword (parser, RID_DECLTYPE, "`decltype'")) if (!cp_parser_require_keyword (parser, RID_DECLTYPE, "%<decltype%>"))
return error_mark_node; return error_mark_node;
/* Types cannot be defined in a `decltype' expression. Save away the /* Types cannot be defined in a `decltype' expression. Save away the
...@@ -8524,7 +8524,7 @@ cp_parser_decltype (cp_parser *parser) ...@@ -8524,7 +8524,7 @@ cp_parser_decltype (cp_parser *parser)
++skip_evaluation; ++skip_evaluation;
/* Parse the opening `('. */ /* Parse the opening `('. */
if (!cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return error_mark_node; return error_mark_node;
/* First, try parsing an id-expression. */ /* First, try parsing an id-expression. */
...@@ -8641,7 +8641,7 @@ cp_parser_decltype (cp_parser *parser) ...@@ -8641,7 +8641,7 @@ cp_parser_decltype (cp_parser *parser)
} }
/* Parse to the closing `)'. */ /* Parse to the closing `)'. */
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
{ {
cp_parser_skip_to_closing_parenthesis (parser, true, false, cp_parser_skip_to_closing_parenthesis (parser, true, false,
/*consume_paren=*/true); /*consume_paren=*/true);
...@@ -8670,7 +8670,7 @@ cp_parser_conversion_function_id (cp_parser* parser) ...@@ -8670,7 +8670,7 @@ cp_parser_conversion_function_id (cp_parser* parser)
tree pushed_scope = NULL_TREE; tree pushed_scope = NULL_TREE;
/* Look for the `operator' token. */ /* Look for the `operator' token. */
if (!cp_parser_require_keyword (parser, RID_OPERATOR, "`operator'")) if (!cp_parser_require_keyword (parser, RID_OPERATOR, "%<operator%>"))
return error_mark_node; return error_mark_node;
/* When we parse the conversion-type-id, the current scope will be /* When we parse the conversion-type-id, the current scope will be
reset. However, we need that information in able to look up the reset. However, we need that information in able to look up the
...@@ -9005,7 +9005,7 @@ static tree ...@@ -9005,7 +9005,7 @@ static tree
cp_parser_operator_function_id (cp_parser* parser) cp_parser_operator_function_id (cp_parser* parser)
{ {
/* Look for the `operator' keyword. */ /* Look for the `operator' keyword. */
if (!cp_parser_require_keyword (parser, RID_OPERATOR, "`operator'")) if (!cp_parser_require_keyword (parser, RID_OPERATOR, "%<operator%>"))
return error_mark_node; return error_mark_node;
/* And then the name of the operator itself. */ /* And then the name of the operator itself. */
return cp_parser_operator (parser); return cp_parser_operator (parser);
...@@ -9061,7 +9061,7 @@ cp_parser_operator (cp_parser* parser) ...@@ -9061,7 +9061,7 @@ cp_parser_operator (cp_parser* parser)
/* Consume the `[' token. */ /* Consume the `[' token. */
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Look for the `]' token. */ /* Look for the `]' token. */
cp_parser_require (parser, CPP_CLOSE_SQUARE, "`]'"); cp_parser_require (parser, CPP_CLOSE_SQUARE, "%<]%>");
id = ansi_opname (op == NEW_EXPR id = ansi_opname (op == NEW_EXPR
? VEC_NEW_EXPR : VEC_DELETE_EXPR); ? VEC_NEW_EXPR : VEC_DELETE_EXPR);
} }
...@@ -9220,14 +9220,14 @@ cp_parser_operator (cp_parser* parser) ...@@ -9220,14 +9220,14 @@ cp_parser_operator (cp_parser* parser)
/* Consume the `('. */ /* Consume the `('. */
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Look for the matching `)'. */ /* Look for the matching `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
return ansi_opname (CALL_EXPR); return ansi_opname (CALL_EXPR);
case CPP_OPEN_SQUARE: case CPP_OPEN_SQUARE:
/* Consume the `['. */ /* Consume the `['. */
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Look for the matching `]'. */ /* Look for the matching `]'. */
cp_parser_require (parser, CPP_CLOSE_SQUARE, "`]'"); cp_parser_require (parser, CPP_CLOSE_SQUARE, "%<]%>");
return ansi_opname (ARRAY_REF); return ansi_opname (ARRAY_REF);
default: default:
...@@ -9510,7 +9510,7 @@ cp_parser_type_parameter (cp_parser* parser, bool *is_parameter_pack) ...@@ -9510,7 +9510,7 @@ cp_parser_type_parameter (cp_parser* parser, bool *is_parameter_pack)
/* Look for a keyword to tell us what kind of parameter this is. */ /* Look for a keyword to tell us what kind of parameter this is. */
token = cp_parser_require (parser, CPP_KEYWORD, token = cp_parser_require (parser, CPP_KEYWORD,
"`class', `typename', or `template'"); "%<class%>, %<typename%>, or %<template%>");
if (!token) if (!token)
return error_mark_node; return error_mark_node;
...@@ -9581,13 +9581,13 @@ cp_parser_type_parameter (cp_parser* parser, bool *is_parameter_pack) ...@@ -9581,13 +9581,13 @@ cp_parser_type_parameter (cp_parser* parser, bool *is_parameter_pack)
tree default_argument; tree default_argument;
/* Look for the `<'. */ /* Look for the `<'. */
cp_parser_require (parser, CPP_LESS, "`<'"); cp_parser_require (parser, CPP_LESS, "%<<%>");
/* Parse the template-parameter-list. */ /* Parse the template-parameter-list. */
parameter_list = cp_parser_template_parameter_list (parser); parameter_list = cp_parser_template_parameter_list (parser);
/* Look for the `>'. */ /* Look for the `>'. */
cp_parser_require (parser, CPP_GREATER, "`>'"); cp_parser_require (parser, CPP_GREATER, "%<>%>");
/* Look for the `class' keyword. */ /* Look for the `class' keyword. */
cp_parser_require_keyword (parser, RID_CLASS, "`class'"); cp_parser_require_keyword (parser, RID_CLASS, "%<class%>");
/* If the next token is an ellipsis, we have a template /* If the next token is an ellipsis, we have a template
argument pack. */ argument pack. */
if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS)) if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS))
...@@ -9814,7 +9814,7 @@ cp_parser_template_id (cp_parser *parser, ...@@ -9814,7 +9814,7 @@ cp_parser_template_id (cp_parser *parser,
else else
{ {
/* Look for the `<' that starts the template-argument-list. */ /* Look for the `<' that starts the template-argument-list. */
if (!cp_parser_require (parser, CPP_LESS, "`<'")) if (!cp_parser_require (parser, CPP_LESS, "%<<%>"))
{ {
pop_deferring_access_checks (); pop_deferring_access_checks ();
return error_mark_node; return error_mark_node;
...@@ -10422,7 +10422,7 @@ cp_parser_explicit_instantiation (cp_parser* parser) ...@@ -10422,7 +10422,7 @@ cp_parser_explicit_instantiation (cp_parser* parser)
} }
/* Look for the `template' keyword. */ /* Look for the `template' keyword. */
cp_parser_require_keyword (parser, RID_TEMPLATE, "`template'"); cp_parser_require_keyword (parser, RID_TEMPLATE, "%<template%>");
/* Let the front end know that we are processing an explicit /* Let the front end know that we are processing an explicit
instantiation. */ instantiation. */
begin_explicit_instantiation (); begin_explicit_instantiation ();
...@@ -10504,11 +10504,11 @@ cp_parser_explicit_specialization (cp_parser* parser) ...@@ -10504,11 +10504,11 @@ cp_parser_explicit_specialization (cp_parser* parser)
{ {
bool need_lang_pop; bool need_lang_pop;
/* Look for the `template' keyword. */ /* Look for the `template' keyword. */
cp_parser_require_keyword (parser, RID_TEMPLATE, "`template'"); cp_parser_require_keyword (parser, RID_TEMPLATE, "%<template%>");
/* Look for the `<'. */ /* Look for the `<'. */
cp_parser_require (parser, CPP_LESS, "`<'"); cp_parser_require (parser, CPP_LESS, "%<<%>");
/* Look for the `>'. */ /* Look for the `>'. */
cp_parser_require (parser, CPP_GREATER, "`>'"); cp_parser_require (parser, CPP_GREATER, "%<>%>");
/* We have processed another parameter list. */ /* We have processed another parameter list. */
++parser->num_template_parameter_lists; ++parser->num_template_parameter_lists;
/* [temp] /* [temp]
...@@ -11470,7 +11470,7 @@ cp_parser_enum_specifier (cp_parser* parser) ...@@ -11470,7 +11470,7 @@ cp_parser_enum_specifier (cp_parser* parser)
cp_parser_enumerator_list (parser, type); cp_parser_enumerator_list (parser, type);
/* Consume the final '}'. */ /* Consume the final '}'. */
cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>");
/* Look for trailing attributes to apply to this enumeration, and /* Look for trailing attributes to apply to this enumeration, and
apply them if appropriate. */ apply them if appropriate. */
...@@ -11648,7 +11648,7 @@ cp_parser_namespace_definition (cp_parser* parser) ...@@ -11648,7 +11648,7 @@ cp_parser_namespace_definition (cp_parser* parser)
is_inline = false; is_inline = false;
/* Look for the `namespace' keyword. */ /* Look for the `namespace' keyword. */
cp_parser_require_keyword (parser, RID_NAMESPACE, "`namespace'"); cp_parser_require_keyword (parser, RID_NAMESPACE, "%<namespace%>");
/* Get the name of the namespace. We do not attempt to distinguish /* Get the name of the namespace. We do not attempt to distinguish
between an original-namespace-definition and an between an original-namespace-definition and an
...@@ -11663,7 +11663,7 @@ cp_parser_namespace_definition (cp_parser* parser) ...@@ -11663,7 +11663,7 @@ cp_parser_namespace_definition (cp_parser* parser)
attribs = cp_parser_attributes_opt (parser); attribs = cp_parser_attributes_opt (parser);
/* Look for the `{' to start the namespace. */ /* Look for the `{' to start the namespace. */
cp_parser_require (parser, CPP_OPEN_BRACE, "`{'"); cp_parser_require (parser, CPP_OPEN_BRACE, "%<{%>");
/* Start the namespace. */ /* Start the namespace. */
push_namespace (identifier); push_namespace (identifier);
...@@ -11695,7 +11695,7 @@ cp_parser_namespace_definition (cp_parser* parser) ...@@ -11695,7 +11695,7 @@ cp_parser_namespace_definition (cp_parser* parser)
/* Finish the namespace. */ /* Finish the namespace. */
pop_namespace (); pop_namespace ();
/* Look for the final `}'. */ /* Look for the final `}'. */
cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>");
} }
/* Parse a namespace-body. /* Parse a namespace-body.
...@@ -11721,7 +11721,7 @@ cp_parser_namespace_alias_definition (cp_parser* parser) ...@@ -11721,7 +11721,7 @@ cp_parser_namespace_alias_definition (cp_parser* parser)
tree namespace_specifier; tree namespace_specifier;
/* Look for the `namespace' keyword. */ /* Look for the `namespace' keyword. */
cp_parser_require_keyword (parser, RID_NAMESPACE, "`namespace'"); cp_parser_require_keyword (parser, RID_NAMESPACE, "%<namespace%>");
/* Look for the identifier. */ /* Look for the identifier. */
identifier = cp_parser_identifier (parser); identifier = cp_parser_identifier (parser);
if (identifier == error_mark_node) if (identifier == error_mark_node)
...@@ -11737,12 +11737,12 @@ cp_parser_namespace_alias_definition (cp_parser* parser) ...@@ -11737,12 +11737,12 @@ cp_parser_namespace_alias_definition (cp_parser* parser)
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
return; return;
} }
cp_parser_require (parser, CPP_EQ, "`='"); cp_parser_require (parser, CPP_EQ, "%<=%>");
/* Look for the qualified-namespace-specifier. */ /* Look for the qualified-namespace-specifier. */
namespace_specifier namespace_specifier
= cp_parser_qualified_namespace_specifier (parser); = cp_parser_qualified_namespace_specifier (parser);
/* Look for the `;' token. */ /* Look for the `;' token. */
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
/* Register the alias in the symbol table. */ /* Register the alias in the symbol table. */
do_namespace_alias (identifier, namespace_specifier); do_namespace_alias (identifier, namespace_specifier);
...@@ -11801,7 +11801,7 @@ cp_parser_using_declaration (cp_parser* parser, ...@@ -11801,7 +11801,7 @@ cp_parser_using_declaration (cp_parser* parser,
else else
{ {
/* Look for the `using' keyword. */ /* Look for the `using' keyword. */
cp_parser_require_keyword (parser, RID_USING, "`using'"); cp_parser_require_keyword (parser, RID_USING, "%<using%>");
/* Peek at the next token. */ /* Peek at the next token. */
token = cp_lexer_peek_token (parser->lexer); token = cp_lexer_peek_token (parser->lexer);
...@@ -11898,7 +11898,7 @@ cp_parser_using_declaration (cp_parser* parser, ...@@ -11898,7 +11898,7 @@ cp_parser_using_declaration (cp_parser* parser,
} }
/* Look for the final `;'. */ /* Look for the final `;'. */
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
return true; return true;
} }
...@@ -11916,9 +11916,9 @@ cp_parser_using_directive (cp_parser* parser) ...@@ -11916,9 +11916,9 @@ cp_parser_using_directive (cp_parser* parser)
tree attribs; tree attribs;
/* Look for the `using' keyword. */ /* Look for the `using' keyword. */
cp_parser_require_keyword (parser, RID_USING, "`using'"); cp_parser_require_keyword (parser, RID_USING, "%<using%>");
/* And the `namespace' keyword. */ /* And the `namespace' keyword. */
cp_parser_require_keyword (parser, RID_NAMESPACE, "`namespace'"); cp_parser_require_keyword (parser, RID_NAMESPACE, "%<namespace%>");
/* Look for the optional `::' operator. */ /* Look for the optional `::' operator. */
cp_parser_global_scope_opt (parser, /*current_scope_valid_p=*/false); cp_parser_global_scope_opt (parser, /*current_scope_valid_p=*/false);
/* And the optional nested-name-specifier. */ /* And the optional nested-name-specifier. */
...@@ -11934,7 +11934,7 @@ cp_parser_using_directive (cp_parser* parser) ...@@ -11934,7 +11934,7 @@ cp_parser_using_directive (cp_parser* parser)
/* Update the symbol table. */ /* Update the symbol table. */
parse_using_directive (namespace_decl, attribs); parse_using_directive (namespace_decl, attribs);
/* Look for the final `;'. */ /* Look for the final `;'. */
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
} }
/* Parse an asm-definition. /* Parse an asm-definition.
...@@ -11967,7 +11967,7 @@ cp_parser_asm_definition (cp_parser* parser) ...@@ -11967,7 +11967,7 @@ cp_parser_asm_definition (cp_parser* parser)
bool invalid_outputs_p = false; bool invalid_outputs_p = false;
/* Look for the `asm' keyword. */ /* Look for the `asm' keyword. */
cp_parser_require_keyword (parser, RID_ASM, "`asm'"); cp_parser_require_keyword (parser, RID_ASM, "%<asm%>");
/* See if the next token is `volatile'. */ /* See if the next token is `volatile'. */
if (cp_parser_allow_gnu_extensions_p (parser) if (cp_parser_allow_gnu_extensions_p (parser)
&& cp_lexer_next_token_is_keyword (parser->lexer, RID_VOLATILE)) && cp_lexer_next_token_is_keyword (parser->lexer, RID_VOLATILE))
...@@ -11978,7 +11978,7 @@ cp_parser_asm_definition (cp_parser* parser) ...@@ -11978,7 +11978,7 @@ cp_parser_asm_definition (cp_parser* parser)
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
} }
/* Look for the opening `('. */ /* Look for the opening `('. */
if (!cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return; return;
/* Look for the string. */ /* Look for the string. */
string = cp_parser_string_literal (parser, false, false); string = cp_parser_string_literal (parser, false, false);
...@@ -12061,10 +12061,10 @@ cp_parser_asm_definition (cp_parser* parser) ...@@ -12061,10 +12061,10 @@ cp_parser_asm_definition (cp_parser* parser)
} }
} }
/* Look for the closing `)'. */ /* Look for the closing `)'. */
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
cp_parser_skip_to_closing_parenthesis (parser, true, false, cp_parser_skip_to_closing_parenthesis (parser, true, false,
/*consume_paren=*/true); /*consume_paren=*/true);
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
if (!invalid_inputs_p && !invalid_outputs_p) if (!invalid_inputs_p && !invalid_outputs_p)
{ {
...@@ -12679,7 +12679,7 @@ cp_parser_direct_declarator (cp_parser* parser, ...@@ -12679,7 +12679,7 @@ cp_parser_direct_declarator (cp_parser* parser,
*ctor_dtor_or_conv_p = *ctor_dtor_or_conv_p < 0; *ctor_dtor_or_conv_p = *ctor_dtor_or_conv_p < 0;
first = false; first = false;
/* Consume the `)'. */ /* Consume the `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* Parse the cv-qualifier-seq. */ /* Parse the cv-qualifier-seq. */
cv_quals = cp_parser_cv_qualifier_seq_opt (parser); cv_quals = cp_parser_cv_qualifier_seq_opt (parser);
...@@ -12723,7 +12723,7 @@ cp_parser_direct_declarator (cp_parser* parser, ...@@ -12723,7 +12723,7 @@ cp_parser_direct_declarator (cp_parser* parser,
parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p; parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p;
first = false; first = false;
/* Expect a `)'. */ /* Expect a `)'. */
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
declarator = cp_error_declarator; declarator = cp_error_declarator;
if (declarator == cp_error_declarator) if (declarator == cp_error_declarator)
break; break;
...@@ -12774,7 +12774,7 @@ cp_parser_direct_declarator (cp_parser* parser, ...@@ -12774,7 +12774,7 @@ cp_parser_direct_declarator (cp_parser* parser,
else else
bounds = NULL_TREE; bounds = NULL_TREE;
/* Look for the closing `]'. */ /* Look for the closing `]'. */
if (!cp_parser_require (parser, CPP_CLOSE_SQUARE, "`]'")) if (!cp_parser_require (parser, CPP_CLOSE_SQUARE, "%<]%>"))
{ {
declarator = cp_error_declarator; declarator = cp_error_declarator;
break; break;
...@@ -13069,7 +13069,7 @@ cp_parser_ptr_operator (cp_parser* parser, ...@@ -13069,7 +13069,7 @@ cp_parser_ptr_operator (cp_parser* parser,
/* If we found it, and the next token is a `*', then we are /* If we found it, and the next token is a `*', then we are
indeed looking at a pointer-to-member operator. */ indeed looking at a pointer-to-member operator. */
if (!cp_parser_error_occurred (parser) if (!cp_parser_error_occurred (parser)
&& cp_parser_require (parser, CPP_MULT, "`*'")) && cp_parser_require (parser, CPP_MULT, "%<*%>"))
{ {
/* Indicate that the `*' operator was used. */ /* Indicate that the `*' operator was used. */
code = INDIRECT_REF; code = INDIRECT_REF;
...@@ -13391,7 +13391,7 @@ cp_parser_parameter_declaration_clause (cp_parser* parser) ...@@ -13391,7 +13391,7 @@ cp_parser_parameter_declaration_clause (cp_parser* parser)
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Expect an ellipsis. */ /* Expect an ellipsis. */
ellipsis_p ellipsis_p
= (cp_parser_require (parser, CPP_ELLIPSIS, "`...'") != NULL); = (cp_parser_require (parser, CPP_ELLIPSIS, "%<...%>") != NULL);
} }
/* It might also be `...' if the optional trailing `,' was /* It might also be `...' if the optional trailing `,' was
omitted. */ omitted. */
...@@ -13995,7 +13995,7 @@ cp_parser_initializer_clause (cp_parser* parser, bool* non_constant_p) ...@@ -13995,7 +13995,7 @@ cp_parser_initializer_clause (cp_parser* parser, bool* non_constant_p)
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
} }
/* Now, there should be a trailing `}'. */ /* Now, there should be a trailing `}'. */
cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>");
} }
return initializer; return initializer;
...@@ -14295,7 +14295,7 @@ cp_parser_class_specifier (cp_parser* parser) ...@@ -14295,7 +14295,7 @@ cp_parser_class_specifier (cp_parser* parser)
} }
/* Look for the `{'. */ /* Look for the `{'. */
if (!cp_parser_require (parser, CPP_OPEN_BRACE, "`{'")) if (!cp_parser_require (parser, CPP_OPEN_BRACE, "%<{%>"))
{ {
pop_deferring_access_checks (); pop_deferring_access_checks ();
return error_mark_node; return error_mark_node;
...@@ -14342,7 +14342,7 @@ cp_parser_class_specifier (cp_parser* parser) ...@@ -14342,7 +14342,7 @@ cp_parser_class_specifier (cp_parser* parser)
cp_parser_member_specification_opt (parser); cp_parser_member_specification_opt (parser);
/* Look for the trailing `}'. */ /* Look for the trailing `}'. */
cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>");
/* We get better error messages by noticing a common problem: a /* We get better error messages by noticing a common problem: a
missing trailing `;'. */ missing trailing `;'. */
token = cp_lexer_peek_token (parser->lexer); token = cp_lexer_peek_token (parser->lexer);
...@@ -14881,7 +14881,7 @@ cp_parser_member_specification_opt (cp_parser* parser) ...@@ -14881,7 +14881,7 @@ cp_parser_member_specification_opt (cp_parser* parser)
/* Remember which access-specifier is active. */ /* Remember which access-specifier is active. */
current_access_specifier = token->u.value; current_access_specifier = token->u.value;
/* Look for the `:'. */ /* Look for the `:'. */
cp_parser_require (parser, CPP_COLON, "`:'"); cp_parser_require (parser, CPP_COLON, "%<:%>");
break; break;
default: default:
...@@ -15300,7 +15300,7 @@ cp_parser_member_declaration (cp_parser* parser) ...@@ -15300,7 +15300,7 @@ cp_parser_member_declaration (cp_parser* parser)
} }
} }
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
} }
/* Parse a pure-specifier. /* Parse a pure-specifier.
...@@ -15317,7 +15317,7 @@ cp_parser_pure_specifier (cp_parser* parser) ...@@ -15317,7 +15317,7 @@ cp_parser_pure_specifier (cp_parser* parser)
cp_token *token; cp_token *token;
/* Look for the `=' token. */ /* Look for the `=' token. */
if (!cp_parser_require (parser, CPP_EQ, "`='")) if (!cp_parser_require (parser, CPP_EQ, "%<=%>"))
return error_mark_node; return error_mark_node;
/* Look for the `0' token. */ /* Look for the `0' token. */
token = cp_lexer_consume_token (parser->lexer); token = cp_lexer_consume_token (parser->lexer);
...@@ -15325,7 +15325,7 @@ cp_parser_pure_specifier (cp_parser* parser) ...@@ -15325,7 +15325,7 @@ cp_parser_pure_specifier (cp_parser* parser)
if (token->type != CPP_NUMBER || !(token->flags & PURE_ZERO)) if (token->type != CPP_NUMBER || !(token->flags & PURE_ZERO))
{ {
cp_parser_error (parser, cp_parser_error (parser,
"invalid pure specifier (only `= 0' is allowed)"); "invalid pure specifier (only %<= 0%> is allowed)");
cp_parser_skip_to_end_of_statement (parser); cp_parser_skip_to_end_of_statement (parser);
return error_mark_node; return error_mark_node;
} }
...@@ -15349,7 +15349,7 @@ static tree ...@@ -15349,7 +15349,7 @@ static tree
cp_parser_constant_initializer (cp_parser* parser) cp_parser_constant_initializer (cp_parser* parser)
{ {
/* Look for the `=' token. */ /* Look for the `=' token. */
if (!cp_parser_require (parser, CPP_EQ, "`='")) if (!cp_parser_require (parser, CPP_EQ, "%<=%>"))
return error_mark_node; return error_mark_node;
/* It is invalid to write: /* It is invalid to write:
...@@ -15366,7 +15366,7 @@ cp_parser_constant_initializer (cp_parser* parser) ...@@ -15366,7 +15366,7 @@ cp_parser_constant_initializer (cp_parser* parser)
/* Skip the initializer. */ /* Skip the initializer. */
cp_parser_skip_to_closing_brace (parser); cp_parser_skip_to_closing_brace (parser);
/* Look for the trailing `}'. */ /* Look for the trailing `}'. */
cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>");
return error_mark_node; return error_mark_node;
} }
...@@ -15400,7 +15400,7 @@ cp_parser_base_clause (cp_parser* parser) ...@@ -15400,7 +15400,7 @@ cp_parser_base_clause (cp_parser* parser)
tree bases = NULL_TREE; tree bases = NULL_TREE;
/* Look for the `:' that begins the list. */ /* Look for the `:' that begins the list. */
cp_parser_require (parser, CPP_COLON, "`:'"); cp_parser_require (parser, CPP_COLON, "%<:%>");
/* Scan the base-specifier-list. */ /* Scan the base-specifier-list. */
while (true) while (true)
...@@ -15606,7 +15606,7 @@ cp_parser_exception_specification_opt (cp_parser* parser) ...@@ -15606,7 +15606,7 @@ cp_parser_exception_specification_opt (cp_parser* parser)
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Look for the `('. */ /* Look for the `('. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Peek at the next token. */ /* Peek at the next token. */
token = cp_lexer_peek_token (parser->lexer); token = cp_lexer_peek_token (parser->lexer);
...@@ -15628,7 +15628,7 @@ cp_parser_exception_specification_opt (cp_parser* parser) ...@@ -15628,7 +15628,7 @@ cp_parser_exception_specification_opt (cp_parser* parser)
type_id_list = empty_except_spec; type_id_list = empty_except_spec;
/* Look for the `)'. */ /* Look for the `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
return type_id_list; return type_id_list;
} }
...@@ -15687,7 +15687,7 @@ cp_parser_try_block (cp_parser* parser) ...@@ -15687,7 +15687,7 @@ cp_parser_try_block (cp_parser* parser)
{ {
tree try_block; tree try_block;
cp_parser_require_keyword (parser, RID_TRY, "`try'"); cp_parser_require_keyword (parser, RID_TRY, "%<try%>");
try_block = begin_try_block (); try_block = begin_try_block ();
cp_parser_compound_statement (parser, NULL, true); cp_parser_compound_statement (parser, NULL, true);
finish_try_block (try_block); finish_try_block (try_block);
...@@ -15710,7 +15710,7 @@ cp_parser_function_try_block (cp_parser* parser) ...@@ -15710,7 +15710,7 @@ cp_parser_function_try_block (cp_parser* parser)
bool ctor_initializer_p; bool ctor_initializer_p;
/* Look for the `try' keyword. */ /* Look for the `try' keyword. */
if (!cp_parser_require_keyword (parser, RID_TRY, "`try'")) if (!cp_parser_require_keyword (parser, RID_TRY, "%<try%>"))
return false; return false;
/* Let the rest of the front end know where we are. */ /* Let the rest of the front end know where we are. */
try_block = begin_function_try_block (&compound_stmt); try_block = begin_function_try_block (&compound_stmt);
...@@ -15760,12 +15760,12 @@ cp_parser_handler (cp_parser* parser) ...@@ -15760,12 +15760,12 @@ cp_parser_handler (cp_parser* parser)
tree handler; tree handler;
tree declaration; tree declaration;
cp_parser_require_keyword (parser, RID_CATCH, "`catch'"); cp_parser_require_keyword (parser, RID_CATCH, "%<catch%>");
handler = begin_handler (); handler = begin_handler ();
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
declaration = cp_parser_exception_declaration (parser); declaration = cp_parser_exception_declaration (parser);
finish_handler_parms (declaration, handler); finish_handler_parms (declaration, handler);
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
cp_parser_compound_statement (parser, NULL, false); cp_parser_compound_statement (parser, NULL, false);
finish_handler (handler); finish_handler (handler);
} }
...@@ -15835,7 +15835,7 @@ cp_parser_throw_expression (cp_parser* parser) ...@@ -15835,7 +15835,7 @@ cp_parser_throw_expression (cp_parser* parser)
tree expression; tree expression;
cp_token* token; cp_token* token;
cp_parser_require_keyword (parser, RID_THROW, "`throw'"); cp_parser_require_keyword (parser, RID_THROW, "%<throw%>");
token = cp_lexer_peek_token (parser->lexer); token = cp_lexer_peek_token (parser->lexer);
/* Figure out whether or not there is an assignment-expression /* Figure out whether or not there is an assignment-expression
following the "throw" keyword. */ following the "throw" keyword. */
...@@ -15880,13 +15880,13 @@ cp_parser_asm_specification_opt (cp_parser* parser) ...@@ -15880,13 +15880,13 @@ cp_parser_asm_specification_opt (cp_parser* parser)
/* Consume the `asm' token. */ /* Consume the `asm' token. */
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Look for the `('. */ /* Look for the `('. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Look for the string-literal. */ /* Look for the string-literal. */
asm_specification = cp_parser_string_literal (parser, false, false); asm_specification = cp_parser_string_literal (parser, false, false);
/* Look for the `)'. */ /* Look for the `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`('"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
return asm_specification; return asm_specification;
} }
...@@ -15930,7 +15930,7 @@ cp_parser_asm_operand_list (cp_parser* parser) ...@@ -15930,7 +15930,7 @@ cp_parser_asm_operand_list (cp_parser* parser)
name = build_string (IDENTIFIER_LENGTH (name), name = build_string (IDENTIFIER_LENGTH (name),
IDENTIFIER_POINTER (name)); IDENTIFIER_POINTER (name));
/* Look for the closing `]'. */ /* Look for the closing `]'. */
cp_parser_require (parser, CPP_CLOSE_SQUARE, "`]'"); cp_parser_require (parser, CPP_CLOSE_SQUARE, "%<]%>");
} }
else else
name = NULL_TREE; name = NULL_TREE;
...@@ -15938,11 +15938,11 @@ cp_parser_asm_operand_list (cp_parser* parser) ...@@ -15938,11 +15938,11 @@ cp_parser_asm_operand_list (cp_parser* parser)
string_literal = cp_parser_string_literal (parser, false, false); string_literal = cp_parser_string_literal (parser, false, false);
/* Look for the `('. */ /* Look for the `('. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Parse the expression. */ /* Parse the expression. */
expression = cp_parser_expression (parser, /*cast_p=*/false); expression = cp_parser_expression (parser, /*cast_p=*/false);
/* Look for the `)'. */ /* Look for the `)'. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
if (name == error_mark_node if (name == error_mark_node
|| string_literal == error_mark_node || string_literal == error_mark_node
...@@ -16026,8 +16026,8 @@ cp_parser_attributes_opt (cp_parser* parser) ...@@ -16026,8 +16026,8 @@ cp_parser_attributes_opt (cp_parser* parser)
/* Consume the `__attribute__' keyword. */ /* Consume the `__attribute__' keyword. */
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
/* Look for the two `(' tokens. */ /* Look for the two `(' tokens. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
/* Peek at the next token. */ /* Peek at the next token. */
token = cp_lexer_peek_token (parser->lexer); token = cp_lexer_peek_token (parser->lexer);
...@@ -16040,8 +16040,8 @@ cp_parser_attributes_opt (cp_parser* parser) ...@@ -16040,8 +16040,8 @@ cp_parser_attributes_opt (cp_parser* parser)
attribute_list = NULL; attribute_list = NULL;
/* Look for the two `)' tokens. */ /* Look for the two `)' tokens. */
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* Add these new attributes to the list. */ /* Add these new attributes to the list. */
attributes = chainon (attributes, attribute_list); attributes = chainon (attributes, attribute_list);
...@@ -16171,7 +16171,7 @@ static void ...@@ -16171,7 +16171,7 @@ static void
cp_parser_label_declaration (cp_parser* parser) cp_parser_label_declaration (cp_parser* parser)
{ {
/* Look for the `__label__' keyword. */ /* Look for the `__label__' keyword. */
cp_parser_require_keyword (parser, RID_LABEL, "`__label__'"); cp_parser_require_keyword (parser, RID_LABEL, "%<__label__%>");
while (true) while (true)
{ {
...@@ -16188,11 +16188,11 @@ cp_parser_label_declaration (cp_parser* parser) ...@@ -16188,11 +16188,11 @@ cp_parser_label_declaration (cp_parser* parser)
if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON)) if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON))
break; break;
/* Look for the `,' separating the label declarations. */ /* Look for the `,' separating the label declarations. */
cp_parser_require (parser, CPP_COMMA, "`,'"); cp_parser_require (parser, CPP_COMMA, "%<,%>");
} }
/* Look for the final `;'. */ /* Look for the final `;'. */
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
} }
/* Support Functions */ /* Support Functions */
...@@ -16726,7 +16726,7 @@ cp_parser_constructor_declarator_p (cp_parser *parser, bool friend_p) ...@@ -16726,7 +16726,7 @@ cp_parser_constructor_declarator_p (cp_parser *parser, bool friend_p)
takes one parameter (of type `int') and returns a value of type takes one parameter (of type `int') and returns a value of type
`S::S'. */ `S::S'. */
if (constructor_p if (constructor_p
&& cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) && cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
{ {
if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)
&& cp_lexer_next_token_is_not (parser->lexer, CPP_ELLIPSIS) && cp_lexer_next_token_is_not (parser->lexer, CPP_ELLIPSIS)
...@@ -16933,11 +16933,11 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p) ...@@ -16933,11 +16933,11 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
bool need_lang_pop; bool need_lang_pop;
/* Look for the `template' keyword. */ /* Look for the `template' keyword. */
if (!cp_parser_require_keyword (parser, RID_TEMPLATE, "`template'")) if (!cp_parser_require_keyword (parser, RID_TEMPLATE, "%<template%>"))
return; return;
/* And the `<'. */ /* And the `<'. */
if (!cp_parser_require (parser, CPP_LESS, "`<'")) if (!cp_parser_require (parser, CPP_LESS, "%<<%>"))
return; return;
if (at_class_scope_p () && current_function_decl) if (at_class_scope_p () && current_function_decl)
{ {
...@@ -17175,7 +17175,7 @@ cp_parser_single_declaration (cp_parser* parser, ...@@ -17175,7 +17175,7 @@ cp_parser_single_declaration (cp_parser* parser,
/* Look for a trailing `;' after the declaration. */ /* Look for a trailing `;' after the declaration. */
if (!function_definition_p if (!function_definition_p
&& (decl == error_mark_node && (decl == error_mark_node
|| !cp_parser_require (parser, CPP_SEMICOLON, "`;'"))) || !cp_parser_require (parser, CPP_SEMICOLON, "%<;%>")))
cp_parser_skip_to_end_of_block_or_statement (parser); cp_parser_skip_to_end_of_block_or_statement (parser);
return decl; return decl;
...@@ -18338,7 +18338,7 @@ cp_parser_objc_message_expression (cp_parser* parser) ...@@ -18338,7 +18338,7 @@ cp_parser_objc_message_expression (cp_parser* parser)
cp_lexer_consume_token (parser->lexer); /* Eat '['. */ cp_lexer_consume_token (parser->lexer); /* Eat '['. */
receiver = cp_parser_objc_message_receiver (parser); receiver = cp_parser_objc_message_receiver (parser);
messageargs = cp_parser_objc_message_args (parser); messageargs = cp_parser_objc_message_args (parser);
cp_parser_require (parser, CPP_CLOSE_SQUARE, "`]'"); cp_parser_require (parser, CPP_CLOSE_SQUARE, "%<]%>");
return objc_build_message_expr (build_tree_list (receiver, messageargs)); return objc_build_message_expr (build_tree_list (receiver, messageargs));
} }
...@@ -18410,7 +18410,7 @@ cp_parser_objc_message_args (cp_parser* parser) ...@@ -18410,7 +18410,7 @@ cp_parser_objc_message_args (cp_parser* parser)
return build_tree_list (selector, NULL_TREE); return build_tree_list (selector, NULL_TREE);
maybe_unary_selector_p = false; maybe_unary_selector_p = false;
cp_parser_require (parser, CPP_COLON, "`:'"); cp_parser_require (parser, CPP_COLON, "%<:%>");
arg = cp_parser_assignment_expression (parser, false); arg = cp_parser_assignment_expression (parser, false);
sel_args sel_args
...@@ -18451,9 +18451,9 @@ cp_parser_objc_encode_expression (cp_parser* parser) ...@@ -18451,9 +18451,9 @@ cp_parser_objc_encode_expression (cp_parser* parser)
tree type; tree type;
cp_lexer_consume_token (parser->lexer); /* Eat '@encode'. */ cp_lexer_consume_token (parser->lexer); /* Eat '@encode'. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
type = complete_type (cp_parser_type_id (parser)); type = complete_type (cp_parser_type_id (parser));
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
if (!type) if (!type)
{ {
...@@ -18472,9 +18472,9 @@ cp_parser_objc_defs_expression (cp_parser *parser) ...@@ -18472,9 +18472,9 @@ cp_parser_objc_defs_expression (cp_parser *parser)
tree name; tree name;
cp_lexer_consume_token (parser->lexer); /* Eat '@defs'. */ cp_lexer_consume_token (parser->lexer); /* Eat '@defs'. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
name = cp_parser_identifier (parser); name = cp_parser_identifier (parser);
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
return objc_get_class_ivars (name); return objc_get_class_ivars (name);
} }
...@@ -18492,9 +18492,9 @@ cp_parser_objc_protocol_expression (cp_parser* parser) ...@@ -18492,9 +18492,9 @@ cp_parser_objc_protocol_expression (cp_parser* parser)
tree proto; tree proto;
cp_lexer_consume_token (parser->lexer); /* Eat '@protocol'. */ cp_lexer_consume_token (parser->lexer); /* Eat '@protocol'. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
proto = cp_parser_identifier (parser); proto = cp_parser_identifier (parser);
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
return objc_build_protocol_expr (proto); return objc_build_protocol_expr (proto);
} }
...@@ -18522,7 +18522,7 @@ cp_parser_objc_selector_expression (cp_parser* parser) ...@@ -18522,7 +18522,7 @@ cp_parser_objc_selector_expression (cp_parser* parser)
cp_token *token; cp_token *token;
cp_lexer_consume_token (parser->lexer); /* Eat '@selector'. */ cp_lexer_consume_token (parser->lexer); /* Eat '@selector'. */
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
token = cp_lexer_peek_token (parser->lexer); token = cp_lexer_peek_token (parser->lexer);
while (cp_parser_objc_selector_p (token->type) || token->type == CPP_COLON while (cp_parser_objc_selector_p (token->type) || token->type == CPP_COLON
...@@ -18569,7 +18569,7 @@ cp_parser_objc_selector_expression (cp_parser* parser) ...@@ -18569,7 +18569,7 @@ cp_parser_objc_selector_expression (cp_parser* parser)
} }
finish_selector: finish_selector:
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
return objc_build_selector_expr (sel_seq); return objc_build_selector_expr (sel_seq);
} }
...@@ -18655,7 +18655,7 @@ cp_parser_objc_protocol_refs_opt (cp_parser* parser) ...@@ -18655,7 +18655,7 @@ cp_parser_objc_protocol_refs_opt (cp_parser* parser)
{ {
cp_lexer_consume_token (parser->lexer); /* Eat '<'. */ cp_lexer_consume_token (parser->lexer); /* Eat '<'. */
protorefs = cp_parser_objc_identifier_list (parser); protorefs = cp_parser_objc_identifier_list (parser);
cp_parser_require (parser, CPP_GREATER, "`>'"); cp_parser_require (parser, CPP_GREATER, "%<>%>");
} }
return protorefs; return protorefs;
...@@ -18744,7 +18744,7 @@ cp_parser_objc_typename (cp_parser* parser) ...@@ -18744,7 +18744,7 @@ cp_parser_objc_typename (cp_parser* parser)
if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)) if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN))
cp_type = cp_parser_type_id (parser); cp_type = cp_parser_type_id (parser);
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
typename = build_tree_list (proto_quals, cp_type); typename = build_tree_list (proto_quals, cp_type);
} }
...@@ -18816,7 +18816,7 @@ cp_parser_objc_method_keyword_params (cp_parser* parser) ...@@ -18816,7 +18816,7 @@ cp_parser_objc_method_keyword_params (cp_parser* parser)
return selector; return selector;
maybe_unary_selector_p = false; maybe_unary_selector_p = false;
cp_parser_require (parser, CPP_COLON, "`:'"); cp_parser_require (parser, CPP_COLON, "%<:%>");
typename = cp_parser_objc_typename (parser); typename = cp_parser_objc_typename (parser);
identifier = cp_parser_identifier (parser); identifier = cp_parser_identifier (parser);
...@@ -19146,7 +19146,7 @@ cp_parser_objc_superclass_or_category (cp_parser *parser, tree *super, ...@@ -19146,7 +19146,7 @@ cp_parser_objc_superclass_or_category (cp_parser *parser, tree *super,
{ {
cp_lexer_consume_token (parser->lexer); /* Eat '('. */ cp_lexer_consume_token (parser->lexer); /* Eat '('. */
*categ = cp_parser_identifier (parser); *categ = cp_parser_identifier (parser);
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
} }
} }
...@@ -19266,7 +19266,7 @@ cp_parser_objc_try_catch_finally_statement (cp_parser *parser) { ...@@ -19266,7 +19266,7 @@ cp_parser_objc_try_catch_finally_statement (cp_parser *parser) {
location_t location; location_t location;
tree stmt; tree stmt;
cp_parser_require_keyword (parser, RID_AT_TRY, "`@try'"); cp_parser_require_keyword (parser, RID_AT_TRY, "%<@try%>");
location = cp_lexer_peek_token (parser->lexer)->location; location = cp_lexer_peek_token (parser->lexer)->location;
/* NB: The @try block needs to be wrapped in its own STATEMENT_LIST /* NB: The @try block needs to be wrapped in its own STATEMENT_LIST
node, lest it get absorbed into the surrounding block. */ node, lest it get absorbed into the surrounding block. */
...@@ -19280,13 +19280,13 @@ cp_parser_objc_try_catch_finally_statement (cp_parser *parser) { ...@@ -19280,13 +19280,13 @@ cp_parser_objc_try_catch_finally_statement (cp_parser *parser) {
tree parm; tree parm;
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
parmdecl = cp_parser_parameter_declaration (parser, false, NULL); parmdecl = cp_parser_parameter_declaration (parser, false, NULL);
parm = grokdeclarator (parmdecl->declarator, parm = grokdeclarator (parmdecl->declarator,
&parmdecl->decl_specifiers, &parmdecl->decl_specifiers,
PARM, /*initialized=*/0, PARM, /*initialized=*/0,
/*attrlist=*/NULL); /*attrlist=*/NULL);
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
objc_begin_catch_clause (parm); objc_begin_catch_clause (parm);
cp_parser_compound_statement (parser, NULL, false); cp_parser_compound_statement (parser, NULL, false);
objc_finish_catch_clause (); objc_finish_catch_clause ();
...@@ -19318,12 +19318,12 @@ cp_parser_objc_synchronized_statement (cp_parser *parser) { ...@@ -19318,12 +19318,12 @@ cp_parser_objc_synchronized_statement (cp_parser *parser) {
location_t location; location_t location;
tree lock, stmt; tree lock, stmt;
cp_parser_require_keyword (parser, RID_AT_SYNCHRONIZED, "`@synchronized'"); cp_parser_require_keyword (parser, RID_AT_SYNCHRONIZED, "%<@synchronized%>");
location = cp_lexer_peek_token (parser->lexer)->location; location = cp_lexer_peek_token (parser->lexer)->location;
cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>");
lock = cp_parser_expression (parser, false); lock = cp_parser_expression (parser, false);
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
/* NB: The @synchronized block needs to be wrapped in its own STATEMENT_LIST /* NB: The @synchronized block needs to be wrapped in its own STATEMENT_LIST
node, lest it get absorbed into the surrounding block. */ node, lest it get absorbed into the surrounding block. */
...@@ -19344,7 +19344,7 @@ static tree ...@@ -19344,7 +19344,7 @@ static tree
cp_parser_objc_throw_statement (cp_parser *parser) { cp_parser_objc_throw_statement (cp_parser *parser) {
tree expr = NULL_TREE; tree expr = NULL_TREE;
cp_parser_require_keyword (parser, RID_AT_THROW, "`@throw'"); cp_parser_require_keyword (parser, RID_AT_THROW, "%<@throw%>");
if (cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON)) if (cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON))
expr = cp_parser_assignment_expression (parser, false); expr = cp_parser_assignment_expression (parser, false);
...@@ -19509,7 +19509,7 @@ cp_parser_omp_var_list_no_open (cp_parser *parser, enum omp_clause_code kind, ...@@ -19509,7 +19509,7 @@ cp_parser_omp_var_list_no_open (cp_parser *parser, enum omp_clause_code kind,
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
} }
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
{ {
int ending; int ending;
...@@ -19533,7 +19533,7 @@ cp_parser_omp_var_list_no_open (cp_parser *parser, enum omp_clause_code kind, ...@@ -19533,7 +19533,7 @@ cp_parser_omp_var_list_no_open (cp_parser *parser, enum omp_clause_code kind,
static tree static tree
cp_parser_omp_var_list (cp_parser *parser, enum omp_clause_code kind, tree list) cp_parser_omp_var_list (cp_parser *parser, enum omp_clause_code kind, tree list)
{ {
if (cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) if (cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return cp_parser_omp_var_list_no_open (parser, kind, list); return cp_parser_omp_var_list_no_open (parser, kind, list);
return list; return list;
} }
...@@ -19547,7 +19547,7 @@ cp_parser_omp_clause_default (cp_parser *parser, tree list) ...@@ -19547,7 +19547,7 @@ cp_parser_omp_clause_default (cp_parser *parser, tree list)
enum omp_clause_default_kind kind = OMP_CLAUSE_DEFAULT_UNSPECIFIED; enum omp_clause_default_kind kind = OMP_CLAUSE_DEFAULT_UNSPECIFIED;
tree c; tree c;
if (!cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return list; return list;
if (cp_lexer_next_token_is (parser->lexer, CPP_NAME)) if (cp_lexer_next_token_is (parser->lexer, CPP_NAME))
{ {
...@@ -19580,7 +19580,7 @@ cp_parser_omp_clause_default (cp_parser *parser, tree list) ...@@ -19580,7 +19580,7 @@ cp_parser_omp_clause_default (cp_parser *parser, tree list)
cp_parser_error (parser, "expected %<none%> or %<shared%>"); cp_parser_error (parser, "expected %<none%> or %<shared%>");
} }
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true, cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true,
/*or_comma=*/false, /*or_comma=*/false,
/*consume_paren=*/true); /*consume_paren=*/true);
...@@ -19604,13 +19604,13 @@ cp_parser_omp_clause_if (cp_parser *parser, tree list) ...@@ -19604,13 +19604,13 @@ cp_parser_omp_clause_if (cp_parser *parser, tree list)
{ {
tree t, c; tree t, c;
if (!cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return list; return list;
t = cp_parser_condition (parser); t = cp_parser_condition (parser);
if (t == error_mark_node if (t == error_mark_node
|| !cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) || !cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true, cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true,
/*or_comma=*/false, /*or_comma=*/false,
/*consume_paren=*/true); /*consume_paren=*/true);
...@@ -19647,13 +19647,13 @@ cp_parser_omp_clause_num_threads (cp_parser *parser, tree list) ...@@ -19647,13 +19647,13 @@ cp_parser_omp_clause_num_threads (cp_parser *parser, tree list)
{ {
tree t, c; tree t, c;
if (!cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return list; return list;
t = cp_parser_expression (parser, false); t = cp_parser_expression (parser, false);
if (t == error_mark_node if (t == error_mark_node
|| !cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) || !cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true, cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true,
/*or_comma=*/false, /*or_comma=*/false,
/*consume_paren=*/true); /*consume_paren=*/true);
...@@ -19694,7 +19694,7 @@ cp_parser_omp_clause_reduction (cp_parser *parser, tree list) ...@@ -19694,7 +19694,7 @@ cp_parser_omp_clause_reduction (cp_parser *parser, tree list)
enum tree_code code; enum tree_code code;
tree nlist, c; tree nlist, c;
if (!cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return list; return list;
switch (cp_lexer_peek_token (parser->lexer)->type) switch (cp_lexer_peek_token (parser->lexer)->type)
...@@ -19724,7 +19724,8 @@ cp_parser_omp_clause_reduction (cp_parser *parser, tree list) ...@@ -19724,7 +19724,8 @@ cp_parser_omp_clause_reduction (cp_parser *parser, tree list)
code = TRUTH_ORIF_EXPR; code = TRUTH_ORIF_EXPR;
break; break;
default: default:
cp_parser_error (parser, "`+', `*', `-', `&', `^', `|', `&&', or `||'"); cp_parser_error (parser, "%<+%>, %<*%>, %<-%>, %<&%>, %<^%>, %<|%>, "
"%<&&%>, or %<||%>");
resync_fail: resync_fail:
cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true, cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true,
/*or_comma=*/false, /*or_comma=*/false,
...@@ -19733,7 +19734,7 @@ cp_parser_omp_clause_reduction (cp_parser *parser, tree list) ...@@ -19733,7 +19734,7 @@ cp_parser_omp_clause_reduction (cp_parser *parser, tree list)
} }
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
if (!cp_parser_require (parser, CPP_COLON, "`:'")) if (!cp_parser_require (parser, CPP_COLON, "%<:%>"))
goto resync_fail; goto resync_fail;
nlist = cp_parser_omp_var_list_no_open (parser, OMP_CLAUSE_REDUCTION, list); nlist = cp_parser_omp_var_list_no_open (parser, OMP_CLAUSE_REDUCTION, list);
...@@ -19809,10 +19810,10 @@ cp_parser_omp_clause_schedule (cp_parser *parser, tree list) ...@@ -19809,10 +19810,10 @@ cp_parser_omp_clause_schedule (cp_parser *parser, tree list)
else else
OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (c) = t; OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (c) = t;
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
goto resync_fail; goto resync_fail;
} }
else if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`,' or `)'")) else if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<,%> or %<)%>"))
goto resync_fail; goto resync_fail;
check_no_duplicate_clause (list, OMP_CLAUSE_SCHEDULE, "schedule"); check_no_duplicate_clause (list, OMP_CLAUSE_SCHEDULE, "schedule");
...@@ -20090,7 +20091,7 @@ cp_parser_omp_critical (cp_parser *parser, cp_token *pragma_tok) ...@@ -20090,7 +20091,7 @@ cp_parser_omp_critical (cp_parser *parser, cp_token *pragma_tok)
name = cp_parser_identifier (parser); name = cp_parser_identifier (parser);
if (name == error_mark_node if (name == error_mark_node
|| !cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) || !cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true, cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true,
/*or_comma=*/false, /*or_comma=*/false,
/*consume_paren=*/true); /*consume_paren=*/true);
...@@ -20133,7 +20134,7 @@ cp_parser_omp_for_loop (cp_parser *parser) ...@@ -20133,7 +20134,7 @@ cp_parser_omp_for_loop (cp_parser *parser)
return NULL; return NULL;
} }
loc = cp_lexer_consume_token (parser->lexer)->location; loc = cp_lexer_consume_token (parser->lexer)->location;
if (!cp_parser_require (parser, CPP_OPEN_PAREN, "`('")) if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return NULL; return NULL;
init = decl = NULL; init = decl = NULL;
...@@ -20161,7 +20162,7 @@ cp_parser_omp_for_loop (cp_parser *parser) ...@@ -20161,7 +20162,7 @@ cp_parser_omp_for_loop (cp_parser *parser)
attributes = cp_parser_attributes_opt (parser); attributes = cp_parser_attributes_opt (parser);
asm_specification = cp_parser_asm_specification_opt (parser); asm_specification = cp_parser_asm_specification_opt (parser);
cp_parser_require (parser, CPP_EQ, "`='"); cp_parser_require (parser, CPP_EQ, "%<=%>");
if (cp_parser_parse_definitely (parser)) if (cp_parser_parse_definitely (parser))
{ {
tree pushed_scope; tree pushed_scope;
...@@ -20191,19 +20192,19 @@ cp_parser_omp_for_loop (cp_parser *parser) ...@@ -20191,19 +20192,19 @@ cp_parser_omp_for_loop (cp_parser *parser)
if (decl == NULL) if (decl == NULL)
init = cp_parser_expression (parser, false); init = cp_parser_expression (parser, false);
} }
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
pre_body = pop_stmt_list (pre_body); pre_body = pop_stmt_list (pre_body);
cond = NULL; cond = NULL;
if (cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON)) if (cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON))
cond = cp_parser_condition (parser); cond = cp_parser_condition (parser);
cp_parser_require (parser, CPP_SEMICOLON, "`;'"); cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
incr = NULL; incr = NULL;
if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN)) if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN))
incr = cp_parser_expression (parser, false); incr = cp_parser_expression (parser, false);
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'")) if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"))
cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true, cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true,
/*or_comma=*/false, /*or_comma=*/false,
/*consume_paren=*/true); /*consume_paren=*/true);
...@@ -20294,7 +20295,7 @@ cp_parser_omp_sections_scope (cp_parser *parser) ...@@ -20294,7 +20295,7 @@ cp_parser_omp_sections_scope (cp_parser *parser)
bool error_suppress = false; bool error_suppress = false;
cp_token *tok; cp_token *tok;
if (!cp_parser_require (parser, CPP_OPEN_BRACE, "`{'")) if (!cp_parser_require (parser, CPP_OPEN_BRACE, "%<{%>"))
return NULL_TREE; return NULL_TREE;
stmt = push_stmt_list (); stmt = push_stmt_list ();
...@@ -20349,7 +20350,7 @@ cp_parser_omp_sections_scope (cp_parser *parser) ...@@ -20349,7 +20350,7 @@ cp_parser_omp_sections_scope (cp_parser *parser)
substmt = build1 (OMP_SECTION, void_type_node, substmt); substmt = build1 (OMP_SECTION, void_type_node, substmt);
add_stmt (substmt); add_stmt (substmt);
} }
cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>");
substmt = pop_stmt_list (stmt); substmt = pop_stmt_list (stmt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment