daily update
[deliverable/binutils-gdb.git] / gdb / objc-exp.y
index 09541e7855245935f79f84b0d7c2def388715c45..888bd201e4f4867df7ba21c5c8cfe36e26c56f89 100644 (file)
@@ -1,11 +1,11 @@
 /* YACC parser for C expressions, for GDB.
 
    Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 2002, 2006, 2007, 2008,
-   2009 Free Software Foundation, Inc.
+   2009, 2010 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -14,9 +14,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Parse a C expression from text in a string, and return the result
    as a struct expression pointer.  That structure contains arithmetic
@@ -335,7 +333,8 @@ exp :       '[' TYPENAME
                        {
                          CORE_ADDR class;
 
-                         class = lookup_objc_class (copy_name ($2.stoken));
+                         class = lookup_objc_class (parse_gdbarch,
+                                                    copy_name ($2.stoken));
                          if (class == 0)
                            error ("%s is not an ObjC Class", 
                                   copy_name ($2.stoken));
@@ -900,11 +899,15 @@ typebase  /* Implements (approximately): (type-qualifier)* type-specifier.  */
                        { $$ = lookup_enum (copy_name ($2),
                                            expression_context_block); }
        |       UNSIGNED typename
-                       { $$ = lookup_unsigned_typename (TYPE_NAME($2.type)); }
+                       { $$ = lookup_unsigned_typename (parse_language,
+                                                        parse_gdbarch,
+                                                        TYPE_NAME($2.type)); }
        |       UNSIGNED
                        { $$ = parse_type->builtin_unsigned_int; }
        |       SIGNED_KEYWORD typename
-                       { $$ = lookup_signed_typename (TYPE_NAME($2.type)); }
+                       { $$ = lookup_signed_typename (parse_language,
+                                                      parse_gdbarch,
+                                                      TYPE_NAME($2.type)); }
        |       SIGNED_KEYWORD
                        { $$ = parse_type->builtin_int; }
        |       TEMPLATE name '<' type '>'
@@ -1273,7 +1276,7 @@ yylex ()
       lexptr++;
       c = *lexptr++;
       if (c == '\\')
-       c = parse_escape (&lexptr);
+       c = parse_escape (parse_gdbarch, &lexptr);
       else if (c == '\'')
        error ("Empty character constant.");
 
@@ -1503,7 +1506,7 @@ yylex ()
            break;
          case '\\':
            tokptr++;
-           c = parse_escape (&tokptr);
+           c = parse_escape (parse_gdbarch, &tokptr);
            if (c == -1)
              {
                continue;
@@ -1746,7 +1749,7 @@ yylex ()
     /* See if it's an ObjC classname.  */
     if (!sym)
       {
-       CORE_ADDR Class = lookup_objc_class(tmp);
+       CORE_ADDR Class = lookup_objc_class (parse_gdbarch, tmp);
        if (Class)
          {
            yylval.class.class = Class;
This page took 0.024773 seconds and 4 git commands to generate.