ARI fixes: Add missing internationalization markups throughout

yacc files.
	* c-exp.y: Ditto.
	* cp-name-parser.y: Ditto.
	* f-exp.y: Ditto.
	* m2-exp.y: Ditto.
	* objc-exp.y: Ditto.
	* p-exp.y: Ditto.
This commit is contained in:
Pierre Muller 2011-03-18 13:51:41 +00:00
parent 4f1cdeec10
commit 001083c66c
7 changed files with 104 additions and 93 deletions

View file

@ -1,3 +1,14 @@
2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
ARI fixes: Add missing internationalization markups throughout
yacc files.
* c-exp.y: Ditto.
* cp-name-parser.y: Ditto.
* f-exp.y: Ditto.
* m2-exp.y: Ditto.
* objc-exp.y: Ditto.
* p-exp.y: Ditto.
2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr> 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
ARI fixes: Messages should have no trailing new lines. ARI fixes: Messages should have no trailing new lines.

View file

@ -698,7 +698,7 @@ exp : string_exp
case C_STRING_32: case C_STRING_32:
if (type != C_STRING if (type != C_STRING
&& type != $1.tokens[i].type) && type != $1.tokens[i].type)
error ("Undefined string concatenation."); error (_("Undefined string concatenation."));
type = $1.tokens[i].type; type = $1.tokens[i].type;
break; break;
default: default:
@ -737,7 +737,7 @@ block : BLOCKNAME
if ($1.sym) if ($1.sym)
$$ = SYMBOL_BLOCK_VALUE ($1.sym); $$ = SYMBOL_BLOCK_VALUE ($1.sym);
else else
error ("No file or function \"%s\".", error (_("No file or function \"%s\"."),
copy_name ($1.stoken)); copy_name ($1.stoken));
} }
| FILENAME | FILENAME
@ -751,7 +751,7 @@ block : block COLONCOLON name
= lookup_symbol (copy_name ($3), $1, = lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, (int *) NULL); VAR_DOMAIN, (int *) NULL);
if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
error ("No function \"%s\" in specified context.", error (_("No function \"%s\" in specified context."),
copy_name ($3)); copy_name ($3));
$$ = SYMBOL_BLOCK_VALUE (tem); } $$ = SYMBOL_BLOCK_VALUE (tem); }
; ;
@ -761,7 +761,7 @@ variable: block COLONCOLON name
sym = lookup_symbol (copy_name ($3), $1, sym = lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, (int *) NULL); VAR_DOMAIN, (int *) NULL);
if (sym == 0) if (sym == 0)
error ("No symbol \"%s\" in specified context.", error (_("No symbol \"%s\" in specified context."),
copy_name ($3)); copy_name ($3));
write_exp_elt_opcode (OP_VAR_VALUE); write_exp_elt_opcode (OP_VAR_VALUE);
@ -778,7 +778,7 @@ qualified_name: TYPENAME COLONCOLON name
if (TYPE_CODE (type) != TYPE_CODE_STRUCT if (TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_UNION && TYPE_CODE (type) != TYPE_CODE_UNION
&& TYPE_CODE (type) != TYPE_CODE_NAMESPACE) && TYPE_CODE (type) != TYPE_CODE_NAMESPACE)
error ("`%s' is not defined as an aggregate type.", error (_("`%s' is not defined as an aggregate type."),
TYPE_NAME (type)); TYPE_NAME (type));
write_exp_elt_opcode (OP_SCOPE); write_exp_elt_opcode (OP_SCOPE);
@ -794,7 +794,7 @@ qualified_name: TYPENAME COLONCOLON name
if (TYPE_CODE (type) != TYPE_CODE_STRUCT if (TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_UNION && TYPE_CODE (type) != TYPE_CODE_UNION
&& TYPE_CODE (type) != TYPE_CODE_NAMESPACE) && TYPE_CODE (type) != TYPE_CODE_NAMESPACE)
error ("`%s' is not defined as an aggregate type.", error (_("`%s' is not defined as an aggregate type."),
TYPE_NAME (type)); TYPE_NAME (type));
tmp_token.ptr = (char*) alloca ($4.length + 2); tmp_token.ptr = (char*) alloca ($4.length + 2);
@ -842,9 +842,9 @@ variable: qualified_name
if (msymbol != NULL) if (msymbol != NULL)
write_exp_msymbol (msymbol); write_exp_msymbol (msymbol);
else if (!have_full_symbols () && !have_partial_symbols ()) else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"file\" command."); error (_("No symbol table is loaded. Use the \"file\" command."));
else else
error ("No symbol \"%s\" in current context.", name); error (_("No symbol \"%s\" in current context."), name);
} }
; ;
@ -894,9 +894,9 @@ variable: name_not_typename
if (msymbol != NULL) if (msymbol != NULL)
write_exp_msymbol (msymbol); write_exp_msymbol (msymbol);
else if (!have_full_symbols () && !have_partial_symbols ()) else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"file\" command."); error (_("No symbol table is loaded. Use the \"file\" command."));
else else
error ("No symbol \"%s\" in current context.", error (_("No symbol \"%s\" in current context."),
copy_name ($1.stoken)); copy_name ($1.stoken));
} }
} }
@ -1527,7 +1527,7 @@ parse_number (char *p, int len, int parsed_float, YYSTYPE *putithere)
if (c != 'l' && c != 'u' && n != 0) if (c != 'l' && c != 'u' && n != 0)
{ {
if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n)) if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n))
error ("Numeric constant too large."); error (_("Numeric constant too large."));
} }
prevn = n; prevn = n;
} }
@ -1844,9 +1844,9 @@ parse_string_or_char (char *tokptr, char **outptr, struct typed_stoken *value,
if (*tokptr != quote) if (*tokptr != quote)
{ {
if (quote == '"') if (quote == '"')
error ("Unterminated string in expression."); error (_("Unterminated string in expression."));
else else
error ("Unmatched single quote."); error (_("Unmatched single quote."));
} }
++tokptr; ++tokptr;
@ -2218,7 +2218,7 @@ lex_one_token (void)
memcpy (err_copy, tokstart, p - tokstart); memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0; err_copy[p - tokstart] = 0;
error ("Invalid number \"%s\".", err_copy); error (_("Invalid number \"%s\"."), err_copy);
} }
lexptr = p; lexptr = p;
return toktype; return toktype;
@ -2261,7 +2261,7 @@ lex_one_token (void)
if (result == CHAR) if (result == CHAR)
{ {
if (host_len == 0) if (host_len == 0)
error ("Empty character constant."); error (_("Empty character constant."));
else if (host_len > 2 && c == '\'') else if (host_len > 2 && c == '\'')
{ {
++tokstart; ++tokstart;
@ -2269,7 +2269,7 @@ lex_one_token (void)
goto tryname; goto tryname;
} }
else if (host_len > 1) else if (host_len > 1)
error ("Invalid character constant."); error (_("Invalid character constant."));
} }
return result; return result;
} }
@ -2278,7 +2278,7 @@ lex_one_token (void)
if (!(c == '_' || c == '$' if (!(c == '_' || c == '$'
|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
/* We must have come across a bad character (e.g. ';'). */ /* We must have come across a bad character (e.g. ';'). */
error ("Invalid character '%c' in expression.", c); error (_("Invalid character '%c' in expression."), c);
/* It's a name. See how long it is. */ /* It's a name. See how long it is. */
namelen = 0; namelen = 0;
@ -2658,5 +2658,5 @@ yyerror (char *msg)
if (prev_lexptr) if (prev_lexptr)
lexptr = prev_lexptr; lexptr = prev_lexptr;
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr);
} }

View file

@ -1568,14 +1568,14 @@ yylex (void)
c = cp_parse_escape (&lexptr); c = cp_parse_escape (&lexptr);
else if (c == '\'') else if (c == '\'')
{ {
yyerror ("empty character constant"); yyerror (_("empty character constant"));
return ERROR; return ERROR;
} }
c = *lexptr++; c = *lexptr++;
if (c != '\'') if (c != '\'')
{ {
yyerror ("invalid character constant"); yyerror (_("invalid character constant"));
return ERROR; return ERROR;
} }
@ -1699,7 +1699,7 @@ yylex (void)
memcpy (err_copy, tokstart, p - tokstart); memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0; err_copy[p - tokstart] = 0;
yyerror ("invalid number"); yyerror (_("invalid number"));
return ERROR; return ERROR;
} }
lexptr = p; lexptr = p;
@ -1775,14 +1775,14 @@ yylex (void)
case '"': case '"':
/* These can't occur in C++ names. */ /* These can't occur in C++ names. */
yyerror ("unexpected string literal"); yyerror (_("unexpected string literal"));
return ERROR; return ERROR;
} }
if (!(c == '_' || c == '$' || ISALPHA (c))) if (!(c == '_' || c == '$' || ISALPHA (c)))
{ {
/* We must have come across a bad character (e.g. ';'). */ /* We must have come across a bad character (e.g. ';'). */
yyerror ("invalid character"); yyerror (_("invalid character"));
return ERROR; return ERROR;
} }

View file

@ -517,9 +517,9 @@ variable: name_not_typename
if (msymbol != NULL) if (msymbol != NULL)
write_exp_msymbol (msymbol); write_exp_msymbol (msymbol);
else if (!have_full_symbols () && !have_partial_symbols ()) else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"file\" command."); error (_("No symbol table is loaded. Use the \"file\" command."));
else else
error ("No symbol \"%s\" in current context.", error (_("No symbol \"%s\" in current context."),
copy_name ($1.stoken)); copy_name ($1.stoken));
} }
} }
@ -758,7 +758,7 @@ parse_number (p, len, parsed_float, putithere)
if (RANGE_CHECK && n != 0) if (RANGE_CHECK && n != 0)
{ {
if ((unsigned_p && (unsigned)prevn >= (unsigned)n)) if ((unsigned_p && (unsigned)prevn >= (unsigned)n))
range_error("Overflow on numeric constant."); range_error (_("Overflow on numeric constant."));
} }
prevn = n; prevn = n;
} }
@ -1099,7 +1099,7 @@ yylex (void)
memcpy (err_copy, tokstart, p - tokstart); memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0; err_copy[p - tokstart] = 0;
error ("Invalid number \"%s\".", err_copy); error (_("Invalid number \"%s\"."), err_copy);
} }
lexptr = p; lexptr = p;
return toktype; return toktype;
@ -1133,7 +1133,7 @@ yylex (void)
if (!(c == '_' || c == '$' || c ==':' if (!(c == '_' || c == '$' || c ==':'
|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
/* We must have come across a bad character (e.g. ';'). */ /* We must have come across a bad character (e.g. ';'). */
error ("Invalid character '%c' in expression.", c); error (_("Invalid character '%c' in expression."), c);
namelen = 0; namelen = 0;
for (c = tokstart[namelen]; for (c = tokstart[namelen];
@ -1224,5 +1224,5 @@ yyerror (msg)
if (prev_lexptr) if (prev_lexptr)
lexptr = prev_lexptr; lexptr = prev_lexptr;
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr);
} }

View file

@ -329,21 +329,21 @@ exp : set
; ;
exp : exp IN set exp : exp IN set
{ error("Sets are not implemented.");} { error (_("Sets are not implemented."));}
; ;
exp : INCL '(' exp ',' exp ')' exp : INCL '(' exp ',' exp ')'
{ error("Sets are not implemented.");} { error (_("Sets are not implemented."));}
; ;
exp : EXCL '(' exp ',' exp ')' exp : EXCL '(' exp ',' exp ')'
{ error("Sets are not implemented.");} { error (_("Sets are not implemented."));}
; ;
set : '{' arglist '}' set : '{' arglist '}'
{ error("Sets are not implemented.");} { error (_("Sets are not implemented."));}
| type '{' arglist '}' | type '{' arglist '}'
{ error("Sets are not implemented.");} { error (_("Sets are not implemented."));}
; ;
@ -562,7 +562,7 @@ fblock : block COLONCOLON BLOCKNAME
= lookup_symbol (copy_name ($3), $1, = lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, 0); VAR_DOMAIN, 0);
if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
error ("No function \"%s\" in specified context.", error (_("No function \"%s\" in specified context."),
copy_name ($3)); copy_name ($3));
$$ = tem; $$ = tem;
} }
@ -586,7 +586,7 @@ variable: block COLONCOLON NAME
sym = lookup_symbol (copy_name ($3), $1, sym = lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, 0); VAR_DOMAIN, 0);
if (sym == 0) if (sym == 0)
error ("No symbol \"%s\" in specified context.", error (_("No symbol \"%s\" in specified context."),
copy_name ($3)); copy_name ($3));
write_exp_elt_opcode (OP_VAR_VALUE); write_exp_elt_opcode (OP_VAR_VALUE);
@ -633,9 +633,9 @@ variable: NAME
if (msymbol != NULL) if (msymbol != NULL)
write_exp_msymbol (msymbol); write_exp_msymbol (msymbol);
else if (!have_full_symbols () && !have_partial_symbols ()) else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"symbol-file\" command."); error (_("No symbol table is loaded. Use the \"symbol-file\" command."));
else else
error ("No symbol \"%s\" in current context.", error (_("No symbol \"%s\" in current context."),
copy_name ($1)); copy_name ($1));
} }
} }
@ -692,9 +692,9 @@ parse_number (olen)
return FLOAT; return FLOAT;
} }
if (p[c] == '.' && base != 10) if (p[c] == '.' && base != 10)
error("Floating point numbers must be base 10."); error (_("Floating point numbers must be base 10."));
if (base == 10 && (p[c] < '0' || p[c] > '9')) if (base == 10 && (p[c] < '0' || p[c] > '9'))
error("Invalid digit \'%c\' in number.",p[c]); error (_("Invalid digit \'%c\' in number."),p[c]);
} }
while (len-- > 0) while (len-- > 0)
@ -702,7 +702,7 @@ parse_number (olen)
c = *p++; c = *p++;
n *= base; n *= base;
if( base == 8 && (c == '8' || c == '9')) if( base == 8 && (c == '8' || c == '9'))
error("Invalid digit \'%c\' in octal number.",c); error (_("Invalid digit \'%c\' in octal number."),c);
if (c >= '0' && c <= '9') if (c >= '0' && c <= '9')
i = c - '0'; i = c - '0';
else else
@ -723,7 +723,7 @@ parse_number (olen)
{ {
if((unsigned_p && (unsigned)prevn >= (unsigned)n) || if((unsigned_p && (unsigned)prevn >= (unsigned)n) ||
((!unsigned_p && number_sign==-1) && -prevn <= -n)) ((!unsigned_p && number_sign==-1) && -prevn <= -n))
range_error("Overflow on numeric constant."); range_error (_("Overflow on numeric constant."));
} }
prevn=n; prevn=n;
} }
@ -743,7 +743,7 @@ parse_number (olen)
return UINT; return UINT;
} }
else if((unsigned_p && (n<0))) { else if((unsigned_p && (n<0))) {
range_error("Overflow on numeric constant -- number too large."); range_error (_("Overflow on numeric constant -- number too large."));
/* But, this can return if range_check == range_warn. */ /* But, this can return if range_check == range_warn. */
} }
yylval.lval = n; yylval.lval = n;
@ -905,7 +905,7 @@ yylex (void)
} }
} }
if(c != quote) if(c != quote)
error("Unterminated string or character constant."); error (_("Unterminated string or character constant."));
yylval.sval.ptr = tokstart + 1; yylval.sval.ptr = tokstart + 1;
yylval.sval.length = namelen - 1; yylval.sval.length = namelen - 1;
lexptr += namelen + 1; lexptr += namelen + 1;
@ -952,7 +952,7 @@ yylex (void)
memcpy (err_copy, tokstart, p - tokstart); memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0; err_copy[p - tokstart] = 0;
error ("Invalid number \"%s\".", err_copy); error (_("Invalid number \"%s\"."), err_copy);
} }
lexptr = p; lexptr = p;
return toktype; return toktype;
@ -961,7 +961,7 @@ yylex (void)
if (!(c == '_' || c == '$' if (!(c == '_' || c == '$'
|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
/* We must have come across a bad character (e.g. ';'). */ /* We must have come across a bad character (e.g. ';'). */
error ("Invalid character '%c' in expression.", c); error (_("Invalid character '%c' in expression."), c);
/* It's a name. See how long it is. */ /* It's a name. See how long it is. */
namelen = 0; namelen = 0;
@ -1038,14 +1038,14 @@ yylex (void)
return BLOCKNAME; return BLOCKNAME;
case LOC_UNDEF: case LOC_UNDEF:
error("internal: Undefined class in m2lex()"); error (_("internal: Undefined class in m2lex()"));
case LOC_LABEL: case LOC_LABEL:
case LOC_UNRESOLVED: case LOC_UNRESOLVED:
error("internal: Unforseen case in m2lex()"); error (_("internal: Unforseen case in m2lex()"));
default: default:
error ("unhandled token in m2lex()"); error (_("unhandled token in m2lex()"));
break; break;
} }
} }
@ -1090,5 +1090,5 @@ yyerror (msg)
if (prev_lexptr) if (prev_lexptr)
lexptr = prev_lexptr; lexptr = prev_lexptr;
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr);
} }

View file

@ -332,7 +332,7 @@ exp : '[' TYPENAME
class = lookup_objc_class (parse_gdbarch, class = lookup_objc_class (parse_gdbarch,
copy_name ($2.stoken)); copy_name ($2.stoken));
if (class == 0) if (class == 0)
error ("%s is not an ObjC Class", error (_("%s is not an ObjC Class"),
copy_name ($2.stoken)); copy_name ($2.stoken));
write_exp_elt_opcode (OP_LONG); write_exp_elt_opcode (OP_LONG);
write_exp_elt_type (parse_type->builtin_int); write_exp_elt_type (parse_type->builtin_int);
@ -625,7 +625,7 @@ block : BLOCKNAME
$$ = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem), $$ = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem),
STATIC_BLOCK); STATIC_BLOCK);
else else
error ("No file or function \"%s\".", error (_("No file or function \"%s\"."),
copy_name ($1.stoken)); copy_name ($1.stoken));
} }
} }
@ -636,7 +636,7 @@ block : block COLONCOLON name
= lookup_symbol (copy_name ($3), $1, = lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, (int *) NULL); VAR_DOMAIN, (int *) NULL);
if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
error ("No function \"%s\" in specified context.", error (_("No function \"%s\" in specified context."),
copy_name ($3)); copy_name ($3));
$$ = SYMBOL_BLOCK_VALUE (tem); } $$ = SYMBOL_BLOCK_VALUE (tem); }
; ;
@ -646,7 +646,7 @@ variable: block COLONCOLON name
sym = lookup_symbol (copy_name ($3), $1, sym = lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, (int *) NULL); VAR_DOMAIN, (int *) NULL);
if (sym == 0) if (sym == 0)
error ("No symbol \"%s\" in specified context.", error (_("No symbol \"%s\" in specified context."),
copy_name ($3)); copy_name ($3));
write_exp_elt_opcode (OP_VAR_VALUE); write_exp_elt_opcode (OP_VAR_VALUE);
@ -661,7 +661,7 @@ qualified_name: typebase COLONCOLON name
struct type *type = $1; struct type *type = $1;
if (TYPE_CODE (type) != TYPE_CODE_STRUCT if (TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_UNION) && TYPE_CODE (type) != TYPE_CODE_UNION)
error ("`%s' is not defined as an aggregate type.", error (_("`%s' is not defined as an aggregate type."),
TYPE_NAME (type)); TYPE_NAME (type));
write_exp_elt_opcode (OP_SCOPE); write_exp_elt_opcode (OP_SCOPE);
@ -675,11 +675,11 @@ qualified_name: typebase COLONCOLON name
struct stoken tmp_token; struct stoken tmp_token;
if (TYPE_CODE (type) != TYPE_CODE_STRUCT if (TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_UNION) && TYPE_CODE (type) != TYPE_CODE_UNION)
error ("`%s' is not defined as an aggregate type.", error (_("`%s' is not defined as an aggregate type."),
TYPE_NAME (type)); TYPE_NAME (type));
if (strcmp (type_name_no_tag (type), $4.ptr) != 0) if (strcmp (type_name_no_tag (type), $4.ptr) != 0)
error ("invalid destructor `%s::~%s'", error (_("invalid destructor `%s::~%s'"),
type_name_no_tag (type), $4.ptr); type_name_no_tag (type), $4.ptr);
tmp_token.ptr = (char*) alloca ($4.length + 2); tmp_token.ptr = (char*) alloca ($4.length + 2);
@ -718,10 +718,10 @@ variable: qualified_name
write_exp_msymbol (msymbol); write_exp_msymbol (msymbol);
else if (!have_full_symbols () else if (!have_full_symbols ()
&& !have_partial_symbols ()) && !have_partial_symbols ())
error ("No symbol table is loaded. " error (_("No symbol table is loaded. "
"Use the \"file\" command."); "Use the \"file\" command."));
else else
error ("No symbol \"%s\" in current context.", error (_("No symbol \"%s\" in current context."),
name); name);
} }
; ;
@ -772,10 +772,10 @@ variable: name_not_typename
write_exp_msymbol (msymbol); write_exp_msymbol (msymbol);
else if (!have_full_symbols () && else if (!have_full_symbols () &&
!have_partial_symbols ()) !have_partial_symbols ())
error ("No symbol table is loaded. " error (_("No symbol table is loaded. "
"Use the \"file\" command."); "Use the \"file\" command."));
else else
error ("No symbol \"%s\" in current context.", error (_("No symbol \"%s\" in current context."),
copy_name ($1.stoken)); copy_name ($1.stoken));
} }
} }
@ -858,7 +858,7 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier. */
| CLASSNAME | CLASSNAME
{ {
if ($1.type == NULL) if ($1.type == NULL)
error ("No symbol \"%s\" in current context.", error (_("No symbol \"%s\" in current context."),
copy_name($1.stoken)); copy_name($1.stoken));
else else
$$ = $1.type; $$ = $1.type;
@ -1102,7 +1102,7 @@ parse_number (p, len, parsed_float, putithere)
if (c != 'l' && c != 'u' && n != 0) if (c != 'l' && c != 'u' && n != 0)
{ {
if ((unsigned_p && (unsigned LONGEST) prevn >= (unsigned LONGEST) n)) if ((unsigned_p && (unsigned LONGEST) prevn >= (unsigned LONGEST) n))
error ("Numeric constant too large."); error (_("Numeric constant too large."));
} }
prevn = n; prevn = n;
} }
@ -1267,7 +1267,7 @@ yylex (void)
if (c == '\\') if (c == '\\')
c = parse_escape (parse_gdbarch, &lexptr); c = parse_escape (parse_gdbarch, &lexptr);
else if (c == '\'') else if (c == '\'')
error ("Empty character constant."); error (_("Empty character constant."));
yylval.typed_val_int.val = c; yylval.typed_val_int.val = c;
yylval.typed_val_int.type = parse_type->builtin_char; yylval.typed_val_int.type = parse_type->builtin_char;
@ -1280,12 +1280,12 @@ yylex (void)
{ {
lexptr = tokstart + namelen; lexptr = tokstart + namelen;
if (lexptr[-1] != '\'') if (lexptr[-1] != '\'')
error ("Unmatched single quote."); error (_("Unmatched single quote."));
namelen -= 2; namelen -= 2;
tokstart++; tokstart++;
goto tryname; goto tryname;
} }
error ("Invalid character constant."); error (_("Invalid character constant."));
} }
return INT; return INT;
@ -1396,7 +1396,7 @@ yylex (void)
memcpy (err_copy, tokstart, p - tokstart); memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0; err_copy[p - tokstart] = 0;
error ("Invalid number \"%s\".", err_copy); error (_("Invalid number \"%s\"."), err_copy);
} }
lexptr = p; lexptr = p;
return toktype; return toktype;
@ -1434,7 +1434,7 @@ yylex (void)
tokptr = strchr(tokstart, '('); tokptr = strchr(tokstart, '(');
if (tokptr == NULL) if (tokptr == NULL)
{ {
error ("Missing '(' in @selector(...)"); error (_("Missing '(' in @selector(...)"));
} }
tempbufindex = 0; tempbufindex = 0;
tokptr++; /* Skip the '('. */ tokptr++; /* Skip the '('. */
@ -1449,7 +1449,7 @@ yylex (void)
} while ((*tokptr != ')') && (*tokptr != '\0')); } while ((*tokptr != ')') && (*tokptr != '\0'));
if (*tokptr++ != ')') if (*tokptr++ != ')')
{ {
error ("Missing ')' in @selector(...)"); error (_("Missing ')' in @selector(...)"));
} }
tempbuf[tempbufindex] = '\0'; tempbuf[tempbufindex] = '\0';
yylval.sval.ptr = tempbuf; yylval.sval.ptr = tempbuf;
@ -1510,7 +1510,7 @@ yylex (void)
} while ((*tokptr != '"') && (*tokptr != '\0')); } while ((*tokptr != '"') && (*tokptr != '\0'));
if (*tokptr++ != '"') if (*tokptr++ != '"')
{ {
error ("Unterminated string in expression."); error (_("Unterminated string in expression."));
} }
tempbuf[tempbufindex] = '\0'; /* See note above. */ tempbuf[tempbufindex] = '\0'; /* See note above. */
yylval.sval.ptr = tempbuf; yylval.sval.ptr = tempbuf;
@ -1522,7 +1522,7 @@ yylex (void)
if (!(tokchr == '_' || tokchr == '$' || if (!(tokchr == '_' || tokchr == '$' ||
(tokchr >= 'a' && tokchr <= 'z') || (tokchr >= 'A' && tokchr <= 'Z'))) (tokchr >= 'a' && tokchr <= 'z') || (tokchr >= 'A' && tokchr <= 'Z')))
/* We must have come across a bad character (e.g. ';'). */ /* We must have come across a bad character (e.g. ';'). */
error ("Invalid character '%c' in expression.", c); error (_("Invalid character '%c' in expression."), c);
/* It's a name. See how long it is. */ /* It's a name. See how long it is. */
namelen = 0; namelen = 0;
@ -1780,8 +1780,8 @@ yyerror (msg)
char *msg; char *msg;
{ {
if (*lexptr == '\0') if (*lexptr == '\0')
error("A %s near end of expression.", (msg ? msg : "error")); error(_("A %s near end of expression."), (msg ? msg : "error"));
else else
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), error (_("A %s in expression, near `%s'."), (msg ? msg : "error"),
lexptr); lexptr);
} }

View file

@ -644,7 +644,7 @@ block : BLOCKNAME
$$ = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem), $$ = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem),
STATIC_BLOCK); STATIC_BLOCK);
else else
error ("No file or function \"%s\".", error (_("No file or function \"%s\"."),
copy_name ($1.stoken)); copy_name ($1.stoken));
} }
} }
@ -655,7 +655,7 @@ block : block COLONCOLON name
= lookup_symbol (copy_name ($3), $1, = lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, (int *) NULL); VAR_DOMAIN, (int *) NULL);
if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
error ("No function \"%s\" in specified context.", error (_("No function \"%s\" in specified context."),
copy_name ($3)); copy_name ($3));
$$ = SYMBOL_BLOCK_VALUE (tem); } $$ = SYMBOL_BLOCK_VALUE (tem); }
; ;
@ -665,7 +665,7 @@ variable: block COLONCOLON name
sym = lookup_symbol (copy_name ($3), $1, sym = lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, (int *) NULL); VAR_DOMAIN, (int *) NULL);
if (sym == 0) if (sym == 0)
error ("No symbol \"%s\" in specified context.", error (_("No symbol \"%s\" in specified context."),
copy_name ($3)); copy_name ($3));
write_exp_elt_opcode (OP_VAR_VALUE); write_exp_elt_opcode (OP_VAR_VALUE);
@ -680,7 +680,7 @@ qualified_name: typebase COLONCOLON name
struct type *type = $1; struct type *type = $1;
if (TYPE_CODE (type) != TYPE_CODE_STRUCT if (TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_UNION) && TYPE_CODE (type) != TYPE_CODE_UNION)
error ("`%s' is not defined as an aggregate type.", error (_("`%s' is not defined as an aggregate type."),
TYPE_NAME (type)); TYPE_NAME (type));
write_exp_elt_opcode (OP_SCOPE); write_exp_elt_opcode (OP_SCOPE);
@ -714,10 +714,10 @@ variable: qualified_name
write_exp_msymbol (msymbol); write_exp_msymbol (msymbol);
else if (!have_full_symbols () else if (!have_full_symbols ()
&& !have_partial_symbols ()) && !have_partial_symbols ())
error ("No symbol table is loaded. " error (_("No symbol table is loaded. "
"Use the \"file\" command."); "Use the \"file\" command."));
else else
error ("No symbol \"%s\" in current context.", error (_("No symbol \"%s\" in current context."),
name); name);
} }
; ;
@ -783,10 +783,10 @@ variable: name_not_typename
write_exp_msymbol (msymbol); write_exp_msymbol (msymbol);
else if (!have_full_symbols () else if (!have_full_symbols ()
&& !have_partial_symbols ()) && !have_partial_symbols ())
error ("No symbol table is loaded. " error (_("No symbol table is loaded. "
"Use the \"file\" command."); "Use the \"file\" command."));
else else
error ("No symbol \"%s\" in current context.", error (_("No symbol \"%s\" in current context."),
copy_name ($1.stoken)); copy_name ($1.stoken));
} }
} }
@ -961,7 +961,7 @@ parse_number (char *p, int len, int parsed_float, YYSTYPE *putithere)
if (c != 'l' && c != 'u' && n != 0) if (c != 'l' && c != 'u' && n != 0)
{ {
if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n)) if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n))
error ("Numeric constant too large."); error (_("Numeric constant too large."));
} }
prevn = n; prevn = n;
} }
@ -1188,7 +1188,7 @@ yylex (void)
if (c == '\\') if (c == '\\')
c = parse_escape (parse_gdbarch, &lexptr); c = parse_escape (parse_gdbarch, &lexptr);
else if (c == '\'') else if (c == '\'')
error ("Empty character constant."); error (_("Empty character constant."));
yylval.typed_val_int.val = c; yylval.typed_val_int.val = c;
yylval.typed_val_int.type = parse_type->builtin_char; yylval.typed_val_int.type = parse_type->builtin_char;
@ -1201,13 +1201,13 @@ yylex (void)
{ {
lexptr = tokstart + namelen; lexptr = tokstart + namelen;
if (lexptr[-1] != '\'') if (lexptr[-1] != '\'')
error ("Unmatched single quote."); error (_("Unmatched single quote."));
namelen -= 2; namelen -= 2;
tokstart++; tokstart++;
uptokstart = uptok(tokstart,namelen); uptokstart = uptok(tokstart,namelen);
goto tryname; goto tryname;
} }
error ("Invalid character constant."); error (_("Invalid character constant."));
} }
return INT; return INT;
@ -1299,7 +1299,7 @@ yylex (void)
memcpy (err_copy, tokstart, p - tokstart); memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0; err_copy[p - tokstart] = 0;
error ("Invalid number \"%s\".", err_copy); error (_("Invalid number \"%s\"."), err_copy);
} }
lexptr = p; lexptr = p;
return toktype; return toktype;
@ -1372,7 +1372,7 @@ yylex (void)
} while ((*tokptr != '"') && (*tokptr != '\0')); } while ((*tokptr != '"') && (*tokptr != '\0'));
if (*tokptr++ != '"') if (*tokptr++ != '"')
{ {
error ("Unterminated string in expression."); error (_("Unterminated string in expression."));
} }
tempbuf[tempbufindex] = '\0'; /* See note above. */ tempbuf[tempbufindex] = '\0'; /* See note above. */
yylval.sval.ptr = tempbuf; yylval.sval.ptr = tempbuf;
@ -1384,7 +1384,7 @@ yylex (void)
if (!(c == '_' || c == '$' if (!(c == '_' || c == '$'
|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
/* We must have come across a bad character (e.g. ';'). */ /* We must have come across a bad character (e.g. ';'). */
error ("Invalid character '%c' in expression.", c); error (_("Invalid character '%c' in expression."), c);
/* It's a name. See how long it is. */ /* It's a name. See how long it is. */
namelen = 0; namelen = 0;
@ -1739,5 +1739,5 @@ yyerror (msg)
if (prev_lexptr) if (prev_lexptr)
lexptr = prev_lexptr; lexptr = prev_lexptr;
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr);
} }