2002-11-08 Jeff Johnston <jjohnstn@redhat.com>
[deliverable/binutils-gdb.git] / gdb / objc-exp.y
index 96b418ae98bd6cbb18386fb265da58eb06000d73..c1971f77a8767203084e19cc007e25588e6437c2 100644 (file)
@@ -1,22 +1,22 @@
 /* YACC parser for C expressions, for GDB.
-   Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994
-   Free Software Foundation, Inc.
 
-This file is part of GDB.
+   Copyright 1986, 1989, 1990, 1991, 1993, 1994, 2002 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
-(at your option) any later version.
+   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
+   (at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   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., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
 
 /* Parse a C expression from text in a string, and return the result
    as a struct expression pointer.  That structure contains arithmetic
@@ -203,9 +203,6 @@ parse_number PARAMS ((char *, int, int, YYSTYPE *));
 
 %token <opcode> ASSIGN_MODIFY
 
-/* C++ */
-%token THIS
-
 %left ','
 %left ABOVE_COMMA
 %right '=' ASSIGN_MODIFY
@@ -613,14 +610,6 @@ exp     :  NSSTRING        /* ObjC NextStep NSString constant
                          write_exp_elt_opcode (OP_NSSTRING); }
        ;
 
-/* C++.  */
-exp    :       THIS
-                       { write_exp_elt_opcode (OP_THIS);
-                         write_exp_elt_opcode (OP_THIS); }
-       ;
-
-/* end of C++.  */
-
 block  :       BLOCKNAME
                        {
                          if ($1.sym != 0)
@@ -986,7 +975,7 @@ name_not_typename : NAME
    name_not_typename (=variable, =exp) or just an exp.  If
    name_not_typename was ever used in an lvalue context where only a
    name could occur, this might be useful.  */
-       | NAME_OR_INT */
+/*     | NAME_OR_INT */
        ;
 
 %%
@@ -1631,18 +1620,6 @@ yylex ()
        return ENUM;
       if (STREQN (tokstart, "long", 4))
        return LONG;
-      if (current_language->la_language == language_cplus
-         && STREQN (tokstart, "this", 4))
-       {
-         static const char this_name[] = {
-           CPLUS_MARKER, 't', 'h', 'i', 's', '\0' 
-         };
-
-         if (lookup_symbol (this_name, expression_context_block,
-                            VAR_NAMESPACE, (int *) NULL,
-                            (struct symtab **) NULL))
-           return THIS;
-       }
       break;
     case 3:
       if (STREQN (tokstart, "int", 3))
This page took 0.025237 seconds and 4 git commands to generate.