*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / c-exp.y
index 2e6c3712f50c434dae1764b5534db4542e736a5d..94d0737073864d268a0acbcee176bbf21b9a9a6b 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
@@ -698,7 +698,7 @@ exp :       string_exp
                                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:
@@ -737,7 +737,7 @@ block       :       BLOCKNAME
                          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
@@ -751,7 +751,7 @@ block       :       block COLONCOLON name
                            = 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); }
        ;
@@ -761,7 +761,7 @@ variable:   block COLONCOLON name
                          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);
@@ -778,7 +778,7 @@ qualified_name:     TYPENAME COLONCOLON name
                          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);
@@ -794,7 +794,7 @@ qualified_name:     TYPENAME COLONCOLON name
                          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);
@@ -804,7 +804,7 @@ qualified_name:     TYPENAME COLONCOLON name
                          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);
@@ -842,9 +842,9 @@ variable:   qualified_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.", name);
+                           error (_("No symbol \"%s\" in current context."), name);
                        }
        ;
 
@@ -894,9 +894,9 @@ variable:   name_not_typename
                              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));
                            }
                        }
@@ -1527,7 +1527,7 @@ parse_number (char *p, int len, int parsed_float, YYSTYPE *putithere)
       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;
     }
@@ -1844,9 +1844,9 @@ parse_string_or_char (char *tokptr, char **outptr, struct typed_stoken *value,
   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;
 
@@ -2218,7 +2218,7 @@ lex_one_token (void)
 
            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;
@@ -2261,7 +2261,7 @@ lex_one_token (void)
        if (result == CHAR)
          {
            if (host_len == 0)
-             error ("Empty character constant.");
+             error (_("Empty character constant."));
            else if (host_len > 2 && c == '\'')
              {
                ++tokstart;
@@ -2269,7 +2269,7 @@ lex_one_token (void)
                goto tryname;
              }
            else if (host_len > 1)
-             error ("Invalid character constant.");
+             error (_("Invalid character constant."));
          }
        return result;
       }
@@ -2278,7 +2278,7 @@ lex_one_token (void)
   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;
@@ -2486,7 +2486,7 @@ classify_inner_name (struct block *block, int first_name)
     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.  */
@@ -2658,5 +2658,5 @@ yyerror (char *msg)
   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);
 }
This page took 0.02734 seconds and 4 git commands to generate.