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>
+
+ 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>
ARI fixes: Messages should have no trailing new lines.
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);
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;
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);
}
c = cp_parse_escape (&lexptr);
else if (c == '\'')
{
- yyerror ("empty character constant");
+ yyerror (_("empty character constant"));
return ERROR;
}
c = *lexptr++;
if (c != '\'')
{
- yyerror ("invalid character constant");
+ yyerror (_("invalid character constant"));
return ERROR;
}
memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0;
- yyerror ("invalid number");
+ yyerror (_("invalid number"));
return ERROR;
}
lexptr = p;
case '"':
/* These can't occur in C++ names. */
- yyerror ("unexpected string literal");
+ yyerror (_("unexpected string literal"));
return ERROR;
}
if (!(c == '_' || c == '$' || ISALPHA (c)))
{
/* We must have come across a bad character (e.g. ';'). */
- yyerror ("invalid character");
+ yyerror (_("invalid character"));
return ERROR;
}
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 (RANGE_CHECK && n != 0)
{
if ((unsigned_p && (unsigned)prevn >= (unsigned)n))
- range_error("Overflow on numeric constant.");
+ range_error (_("Overflow on numeric constant."));
}
prevn = n;
}
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 (!(c == '_' || 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);
namelen = 0;
for (c = tokstart[namelen];
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);
}
;
exp : exp IN set
- { error("Sets are not implemented.");}
+ { error (_("Sets are not implemented."));}
;
exp : INCL '(' exp ',' exp ')'
- { error("Sets are not implemented.");}
+ { error (_("Sets are not implemented."));}
;
exp : EXCL '(' exp ',' exp ')'
- { error("Sets are not implemented.");}
+ { error (_("Sets are not implemented."));}
;
set : '{' arglist '}'
- { error("Sets are not implemented.");}
+ { error (_("Sets are not implemented."));}
| type '{' arglist '}'
- { error("Sets are not implemented.");}
+ { error (_("Sets are not implemented."));}
;
= lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, 0);
if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
- error ("No function \"%s\" in specified context.",
+ error (_("No function \"%s\" in specified context."),
copy_name ($3));
$$ = tem;
}
sym = lookup_symbol (copy_name ($3), $1,
VAR_DOMAIN, 0);
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 (msymbol != NULL)
write_exp_msymbol (msymbol);
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
- error ("No symbol \"%s\" in current context.",
+ error (_("No symbol \"%s\" in current context."),
copy_name ($1));
}
}
return FLOAT;
}
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'))
- error("Invalid digit \'%c\' in number.",p[c]);
+ error (_("Invalid digit \'%c\' in number."),p[c]);
}
while (len-- > 0)
c = *p++;
n *= base;
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')
i = c - '0';
else
{
if((unsigned_p && (unsigned)prevn >= (unsigned)n) ||
((!unsigned_p && number_sign==-1) && -prevn <= -n))
- range_error("Overflow on numeric constant.");
+ range_error (_("Overflow on numeric constant."));
}
prevn=n;
}
return UINT;
}
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. */
}
yylval.lval = n;
}
}
if(c != quote)
- error("Unterminated string or character constant.");
+ error (_("Unterminated string or character constant."));
yylval.sval.ptr = tokstart + 1;
yylval.sval.length = namelen - 1;
lexptr += namelen + 1;
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 (!(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 BLOCKNAME;
case LOC_UNDEF:
- error("internal: Undefined class in m2lex()");
+ error (_("internal: Undefined class in m2lex()"));
case LOC_LABEL:
case LOC_UNRESOLVED:
- error("internal: Unforseen case in m2lex()");
+ error (_("internal: Unforseen case in m2lex()"));
default:
- error ("unhandled token in m2lex()");
+ error (_("unhandled token in m2lex()"));
break;
}
}
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);
}
class = lookup_objc_class (parse_gdbarch,
copy_name ($2.stoken));
if (class == 0)
- error ("%s is not an ObjC Class",
+ error (_("%s is not an ObjC Class"),
copy_name ($2.stoken));
write_exp_elt_opcode (OP_LONG);
write_exp_elt_type (parse_type->builtin_int);
$$ = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem),
STATIC_BLOCK);
else
- error ("No file or function \"%s\".",
+ error (_("No file or function \"%s\"."),
copy_name ($1.stoken));
}
}
= 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);
struct type *type = $1;
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
&& 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));
write_exp_elt_opcode (OP_SCOPE);
struct stoken tmp_token;
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
&& 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));
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);
tmp_token.ptr = (char*) alloca ($4.length + 2);
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."),
name);
}
;
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));
}
}
| CLASSNAME
{
if ($1.type == NULL)
- error ("No symbol \"%s\" in current context.",
+ error (_("No symbol \"%s\" in current context."),
copy_name($1.stoken));
else
$$ = $1.type;
if (c != 'l' && c != 'u' && n != 0)
{
if ((unsigned_p && (unsigned LONGEST) prevn >= (unsigned LONGEST) n))
- error ("Numeric constant too large.");
+ error (_("Numeric constant too large."));
}
prevn = n;
}
if (c == '\\')
c = parse_escape (parse_gdbarch, &lexptr);
else if (c == '\'')
- error ("Empty character constant.");
+ error (_("Empty character constant."));
yylval.typed_val_int.val = c;
yylval.typed_val_int.type = parse_type->builtin_char;
{
lexptr = tokstart + namelen;
if (lexptr[-1] != '\'')
- error ("Unmatched single quote.");
+ error (_("Unmatched single quote."));
namelen -= 2;
tokstart++;
goto tryname;
}
- error ("Invalid character constant.");
+ error (_("Invalid character constant."));
}
return INT;
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;
tokptr = strchr(tokstart, '(');
if (tokptr == NULL)
{
- error ("Missing '(' in @selector(...)");
+ error (_("Missing '(' in @selector(...)"));
}
tempbufindex = 0;
tokptr++; /* Skip the '('. */
} while ((*tokptr != ')') && (*tokptr != '\0'));
if (*tokptr++ != ')')
{
- error ("Missing ')' in @selector(...)");
+ error (_("Missing ')' in @selector(...)"));
}
tempbuf[tempbufindex] = '\0';
yylval.sval.ptr = tempbuf;
} while ((*tokptr != '"') && (*tokptr != '\0'));
if (*tokptr++ != '"')
{
- error ("Unterminated string in expression.");
+ error (_("Unterminated string in expression."));
}
tempbuf[tempbufindex] = '\0'; /* See note above. */
yylval.sval.ptr = tempbuf;
if (!(tokchr == '_' || tokchr == '$' ||
(tokchr >= 'a' && tokchr <= 'z') || (tokchr >= 'A' && tokchr <= '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;
char *msg;
{
if (*lexptr == '\0')
- error("A %s near end of expression.", (msg ? msg : "error"));
+ error(_("A %s near end of expression."), (msg ? msg : "error"));
else
- error ("A %s in expression, near `%s'.", (msg ? msg : "error"),
+ error (_("A %s in expression, near `%s'."), (msg ? msg : "error"),
lexptr);
}
$$ = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem),
STATIC_BLOCK);
else
- error ("No file or function \"%s\".",
+ error (_("No file or function \"%s\"."),
copy_name ($1.stoken));
}
}
= 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);
struct type *type = $1;
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
&& 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));
write_exp_elt_opcode (OP_SCOPE);
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."),
name);
}
;
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 (c == '\\')
c = parse_escape (parse_gdbarch, &lexptr);
else if (c == '\'')
- error ("Empty character constant.");
+ error (_("Empty character constant."));
yylval.typed_val_int.val = c;
yylval.typed_val_int.type = parse_type->builtin_char;
{
lexptr = tokstart + namelen;
if (lexptr[-1] != '\'')
- error ("Unmatched single quote.");
+ error (_("Unmatched single quote."));
namelen -= 2;
tokstart++;
uptokstart = uptok(tokstart,namelen);
goto tryname;
}
- error ("Invalid character constant.");
+ error (_("Invalid character constant."));
}
return INT;
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;
} while ((*tokptr != '"') && (*tokptr != '\0'));
if (*tokptr++ != '"')
{
- error ("Unterminated string in expression.");
+ error (_("Unterminated string in expression."));
}
tempbuf[tempbufindex] = '\0'; /* See note above. */
yylval.sval.ptr = tempbuf;
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;
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);
}