2003-09-11 Elena Zannoni <ezannoni@redhat.com>
[deliverable/binutils-gdb.git] / gdb / p-exp.y
index b4d4739d69c9b280fe31d16dc1a5c957a3a981eb..13d0f784156aab44cadea03c536004b702a8285a 100644 (file)
@@ -56,6 +56,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "bfd.h" /* Required by objfiles.h.  */
 #include "symfile.h" /* Required by objfiles.h.  */
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
+#include "block.h"
 
 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
    as well as gratuitiously global symbol names, so we can have multiple
@@ -157,8 +158,8 @@ parse_number (char *, int, int, YYSTYPE *);
 
 static struct type *current_type;
 
-static void push_current_type ();
-static void pop_current_type ();
+static void push_current_type (void);
+static void pop_current_type (void);
 static int search_field;
 %}
 
@@ -558,7 +559,7 @@ block       :       BLOCKNAME
 block  :       block COLONCOLON name
                        { struct symbol *tem
                            = lookup_symbol (copy_name ($3), $1,
-                                            VAR_NAMESPACE, (int *) NULL,
+                                            VAR_DOMAIN, (int *) NULL,
                                             (struct symtab **) NULL);
                          if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
                            error ("No function \"%s\" in specified context.",
@@ -569,7 +570,7 @@ block       :       block COLONCOLON name
 variable:      block COLONCOLON name
                        { struct symbol *sym;
                          sym = lookup_symbol (copy_name ($3), $1,
-                                              VAR_NAMESPACE, (int *) NULL,
+                                              VAR_DOMAIN, (int *) NULL,
                                               (struct symtab **) NULL);
                          if (sym == 0)
                            error ("No symbol \"%s\" in specified context.",
@@ -606,7 +607,7 @@ variable:   qualified_name
 
                          sym =
                            lookup_symbol (name, (const struct block *) NULL,
-                                          VAR_NAMESPACE, (int *) NULL,
+                                          VAR_DOMAIN, (int *) NULL,
                                           (struct symtab **) NULL);
                          if (sym)
                            {
@@ -991,7 +992,8 @@ struct type_push
 
 static struct type_push *tp_top = NULL;
 
-static void push_current_type ()
+static void
+push_current_type (void)
 {
   struct type_push *tpnew;
   tpnew = (struct type_push *) malloc (sizeof (struct type_push));
@@ -1001,7 +1003,8 @@ static void push_current_type ()
   tp_top = tpnew; 
 }
 
-static void pop_current_type ()
+static void
+pop_current_type (void)
 {
   struct type_push *tp = tp_top;
   if (tp)
@@ -1395,7 +1398,7 @@ yylex ()
          static const char this_name[] = "this";
 
          if (lookup_symbol (this_name, expression_context_block,
-                            VAR_NAMESPACE, (int *) NULL,
+                            VAR_DOMAIN, (int *) NULL,
                             (struct symtab **) NULL))
            return THIS;
        }
@@ -1436,7 +1439,7 @@ yylex ()
       sym = NULL;
     else
       sym = lookup_symbol (tmp, expression_context_block,
-                          VAR_NAMESPACE,
+                          VAR_DOMAIN,
                           &is_a_field_of_this,
                           (struct symtab **) NULL);
     /* second chance uppercased (as Free Pascal does).  */
@@ -1453,7 +1456,7 @@ yylex ()
         sym = NULL;
        else
         sym = lookup_symbol (tmp, expression_context_block,
-                        VAR_NAMESPACE,
+                        VAR_DOMAIN,
                         &is_a_field_of_this,
                         (struct symtab **) NULL);
        if (sym || is_a_field_of_this || is_a_field)
@@ -1483,7 +1486,7 @@ yylex ()
         sym = NULL;
        else
         sym = lookup_symbol (tmp, expression_context_block,
-                         VAR_NAMESPACE,
+                         VAR_DOMAIN,
                          &is_a_field_of_this,
                          (struct symtab **) NULL);
        if (sym || is_a_field_of_this || is_a_field)
@@ -1580,7 +1583,7 @@ yylex ()
                      memcpy (tmp1, namestart, p - namestart);
                      tmp1[p - namestart] = '\0';
                      cur_sym = lookup_symbol (ncopy, expression_context_block,
-                                              VAR_NAMESPACE, (int *) NULL,
+                                              VAR_DOMAIN, (int *) NULL,
                                               (struct symtab **) NULL);
                      if (cur_sym)
                        {
This page took 0.026897 seconds and 4 git commands to generate.