/* YACC parser for Ada expressions, for GDB.
- Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 1997, 2000
+ Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 1997, 2000, 2003
Free Software Foundation, Inc.
This file is part of GDB.
#include "symfile.h" /* Required by objfiles.h. */
#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
#include "frame.h"
+#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
#define yylloc ada_lloc
#define yyreds ada_reds /* With YYDEBUG defined */
#define yytoks ada_toks /* With YYDEBUG defined */
+#define yyname ada_name /* With YYDEBUG defined */
+#define yyrule ada_rule /* With YYDEBUG defined */
#ifndef YYDEBUG
#define YYDEBUG 1 /* Default to yydebug support */
;
save_qualifier : { $$ = type_qualifier; }
+ ;
simple_exp :
simple_exp '(' exp DOTDOT exp ')'
(convert_char_literal (type_qualifier, $1.val));
write_exp_elt_opcode (OP_LONG);
}
-
+ ;
exp : FLOAT
{ write_exp_elt_opcode (OP_DOUBLE);
write_exp_elt_longcst ((LONGEST)(0));
write_exp_elt_opcode (OP_LONG);
}
+ ;
exp : STRING
{ /* Ada strings are converted into array constants
struct block* orig_left_context;
struct symbol* renaming;
{
- const char* qualification = SYMBOL_NAME (renaming);
+ const char* qualification = DEPRECATED_SYMBOL_NAME (renaming);
const char* simple_tail;
const char* expr = TYPE_FIELD_NAME (SYMBOL_TYPE (renaming), 0);
const char* suffix;
parser-defs.h, implemented in parse.c */
strncpy (name, expr, suffix-expr);
name[suffix-expr] = '\000';
- sym = lookup_symbol (name, orig_left_context, VAR_NAMESPACE, 0, NULL);
+ sym = lookup_symbol (name, orig_left_context, VAR_DOMAIN, 0, NULL);
/* if (sym == NULL)
error ("Could not find renamed variable: %s", ada_demangle (name));
*/
suffix = end;
index_sym =
- lookup_symbol (index_name, NULL, VAR_NAMESPACE, 0, NULL);
+ lookup_symbol (index_name, NULL, VAR_DOMAIN, 0, NULL);
if (index_sym == NULL)
error ("Could not find %s", index_name);
write_var_from_sym (NULL, block_found, sym);
BadEncoding:
error ("Internal error in encoding of renaming declaration: %s",
- SYMBOL_NAME (renaming));
+ DEPRECATED_SYMBOL_NAME (renaming));
}
/* Convert the character literal whose ASCII value would be VAL to the