#include "objfiles.h" /* For have_full_symbols and have_partial_symbols. */
#include "top.h"
#include "completer.h" /* For skip_quoted(). */
+#include "block.h"
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
etc), as well as gratuitiously global symbol names, so we can have
/* Expressions, not including the comma operator. */
exp : '*' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_IND); }
+ ;
exp : '&' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_ADDR); }
+ ;
exp : '-' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_NEG); }
start_msglist();
}
msglist ']'
- { write_exp_elt_opcode (OP_MSGCALL);
+ { write_exp_elt_opcode (OP_OBJC_MSGCALL);
end_msglist();
- write_exp_elt_opcode (OP_MSGCALL);
+ write_exp_elt_opcode (OP_OBJC_MSGCALL);
}
;
start_msglist();
}
msglist ']'
- { write_exp_elt_opcode (OP_MSGCALL);
+ { write_exp_elt_opcode (OP_OBJC_MSGCALL);
end_msglist();
- write_exp_elt_opcode (OP_MSGCALL);
+ write_exp_elt_opcode (OP_OBJC_MSGCALL);
}
;
exp : '[' exp
{ start_msglist(); }
msglist ']'
- { write_exp_elt_opcode (OP_MSGCALL);
+ { write_exp_elt_opcode (OP_OBJC_MSGCALL);
end_msglist();
- write_exp_elt_opcode (OP_MSGCALL);
+ write_exp_elt_opcode (OP_OBJC_MSGCALL);
}
;
exp : SELECTOR
{
- write_exp_elt_opcode (OP_SELECTOR);
+ write_exp_elt_opcode (OP_OBJC_SELECTOR);
write_exp_string ($1);
- write_exp_elt_opcode (OP_SELECTOR); }
+ write_exp_elt_opcode (OP_OBJC_SELECTOR); }
+ ;
exp : SIZEOF '(' type ')' %prec UNARY
{ write_exp_elt_opcode (OP_LONG);
exp : NSSTRING /* ObjC NextStep NSString constant
* of the form '@' '"' string '"'.
*/
- { write_exp_elt_opcode (OP_NSSTRING);
+ { write_exp_elt_opcode (OP_OBJC_NSSTRING);
write_exp_string ($1);
- write_exp_elt_opcode (OP_NSSTRING); }
+ write_exp_elt_opcode (OP_OBJC_NSSTRING); }
;
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.",
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.",
sym =
lookup_symbol (name, (const struct block *) NULL,
- VAR_NAMESPACE, (int *) NULL,
+ VAR_DOMAIN, (int *) NULL,
(struct symtab **) NULL);
if (sym)
{
if (innermost_block == 0 ||
contained_in (block_found, innermost_block))
innermost_block = block_found;
- write_exp_elt_opcode (OP_SELF);
- write_exp_elt_opcode (OP_SELF);
+ write_exp_elt_opcode (OP_OBJC_SELF);
+ write_exp_elt_opcode (OP_OBJC_SELF);
write_exp_elt_opcode (STRUCTOP_PTR);
write_exp_string ($1.stoken);
write_exp_elt_opcode (STRUCTOP_PTR);
func_mod: '(' ')'
{ $$ = 0; }
| '(' nonempty_typelist ')'
- { free ((PTR)$2); $$ = 0; }
+ { free ($2); $$ = 0; }
;
/* We used to try to recognize more pointer to member types here, but
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 */
;
%%
/* It's a float since it contains a point or an exponent. */
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- sscanf (p, "%g", &putithere->typed_val_float.dval);
+ sscanf (p, "%g", (float *)&putithere->typed_val_float.dval);
else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- sscanf (p, "%lg", &putithere->typed_val_float.dval);
+ sscanf (p, "%lg", (double *)&putithere->typed_val_float.dval);
else
{
#ifdef PRINTF_HAS_LONG_DOUBLE
return tokentab2[i].token;
}
+ c = 0;
switch (tokchr = *tokstart)
{
case 0:
c = *lexptr++;
if (c != '\'')
{
- namelen = skip_quoted (tokstart,
- get_gdb_completer_word_break_characters())
- - tokstart;
+ namelen = skip_quoted (tokstart) - tokstart;
if (namelen > 2)
{
lexptr = tokstart + namelen;
need_this = (int *) NULL;
sym = lookup_symbol (tmp, expression_context_block,
- VAR_NAMESPACE,
+ VAR_DOMAIN,
need_this,
(struct symtab **) NULL);
/* Call lookup_symtab, not lookup_partial_symtab, in case there
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)
{