/* YACC parser for C expressions, for GDB.
Copyright (C) 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2003, 2004, 2006, 2007, 2008, 2009, 2010
+ 1998, 1999, 2000, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GDB.
case C_STRING_32:
if (type != C_STRING
&& type != $1.tokens[i].type)
- error ("Undefined string concatenation.");
+ error (_("Undefined string concatenation."));
type = $1.tokens[i].type;
break;
default:
if ($1.sym)
$$ = SYMBOL_BLOCK_VALUE ($1.sym);
else
- error ("No file or function \"%s\".",
+ error (_("No file or function \"%s\"."),
copy_name ($1.stoken));
}
| FILENAME
= lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, (int *) NULL);
if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
- error ("No function \"%s\" in specified context.",
+ error (_("No function \"%s\" in specified context."),
copy_name ($3));
$$ = SYMBOL_BLOCK_VALUE (tem); }
;
sym = lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, (int *) NULL);
if (sym == 0)
- error ("No symbol \"%s\" in specified context.",
+ error (_("No symbol \"%s\" in specified context."),
copy_name ($3));
write_exp_elt_opcode (OP_VAR_VALUE);
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_UNION
&& 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));
write_exp_elt_opcode (OP_SCOPE);
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_UNION
&& 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));
tmp_token.ptr = (char*) alloca ($4.length + 2);
tmp_token.ptr[tmp_token.length] = 0;
/* Check for valid destructor name. */
- destructor_name_p (tmp_token.ptr, type);
+ destructor_name_p (tmp_token.ptr, $1.type);
write_exp_elt_opcode (OP_SCOPE);
write_exp_elt_type (type);
write_exp_string (tmp_token);
if (msymbol != NULL)
write_exp_msymbol (msymbol);
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
- error ("No symbol \"%s\" in current context.", name);
+ error (_("No symbol \"%s\" in current context."), name);
}
;
if (msymbol != NULL)
write_exp_msymbol (msymbol);
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
- error ("No symbol \"%s\" in current context.",
+ error (_("No symbol \"%s\" in current context."),
copy_name ($1.stoken));
}
}
if (c != 'l' && c != 'u' && n != 0)
{
if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n))
- error ("Numeric constant too large.");
+ error (_("Numeric constant too large."));
}
prevn = n;
}
if (*tokptr != quote)
{
if (quote == '"')
- error ("Unterminated string in expression.");
+ error (_("Unterminated string in expression."));
else
- error ("Unmatched single quote.");
+ error (_("Unmatched single quote."));
}
++tokptr;
memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0;
- error ("Invalid number \"%s\".", err_copy);
+ error (_("Invalid number \"%s\"."), err_copy);
}
lexptr = p;
return toktype;
if (result == CHAR)
{
if (host_len == 0)
- error ("Empty character constant.");
+ error (_("Empty character constant."));
else if (host_len > 2 && c == '\'')
{
++tokstart;
goto tryname;
}
else if (host_len > 1)
- error ("Invalid character constant.");
+ error (_("Invalid character constant."));
}
return result;
}
if (!(c == '_' || c == '$'
|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
/* 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. */
namelen = 0;
return NAME;
copy = copy_name (yylval.tsym.stoken);
- new_type = cp_lookup_nested_type (type, copy, block);
+ new_type = cp_lookup_nested_type (yylval.tsym.type, copy, block);
if (new_type == NULL)
/* We know the caller won't expect us to update yylval. */
if (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);
}