#include "value.h"
#include "parser-defs.h"
#include "ch-lang.h"
+#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 */
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
as well as gratuitiously global symbol names, so we can have multiple
#define yyerror chill_error
#define yylval chill_lval
#define yychar chill_char
-#define yycheck chill_yycheck
#define yydebug chill_debug
-#define yydefred chill_yydefred
-#define yydgoto chill_yydgoto
-#define yygindex chill_yygindex
-#define yylen chill_yylen
-#define yylhs chill_yylhs
-#define yyrindex chill_yyrindex
-#define yysccsid chill_yysccsid
-#define yysindex chill_yysindex
#define yypact chill_pact
#define yyr1 chill_r1
#define yyr2 chill_r2
#define yyps chill_ps
#define yypv chill_pv
#define yys chill_s
-#define yyss chill_yyss
-#define yyssp chill_yyssp
#define yy_yys chill_yys
#define yystate chill_state
-#define yytable chill_yytable
#define yytmp chill_tmp
#define yyv chill_v
-#define yyvs chill_vs
-#define yyvss chill_vss
#define yy_yyv chill_yyv
#define yyval chill_val
#define yylloc chill_lloc
access_name : LOCATION_NAME
{
write_exp_elt_opcode (OP_VAR_VALUE);
+ write_exp_elt_block (NULL);
write_exp_elt_sym ($1.sym);
write_exp_elt_opcode (OP_VAR_VALUE);
}
| GENERAL_PROCEDURE_NAME
{
write_exp_elt_opcode (OP_VAR_VALUE);
+ write_exp_elt_block (NULL);
write_exp_elt_sym ($1.sym);
write_exp_elt_opcode (OP_VAR_VALUE);
}
}
| operand_2 IN operand_3
{
- $$ = 0; /* FIXME */
+ write_exp_elt_opcode (BINOP_IN);
}
;
char *tokptr = lexptr;
char *buf;
char *copy;
- char ch;
double dval;
extern double strtod ();
return (0);
}
-/* Recognize a string literal. A string literal is a nonzero sequence
+/* Recognize a string literal. A string literal is a sequence
of characters enclosed in matching single or double quotes, except that
a single character inside single quotes is a character literal, which
we reject as a string literal. To embed the terminator character inside
tempbuf[tempbufindex++] = *tokptr;
}
if (*tokptr == '\0' /* no terminator */
- || tempbufindex == 0 /* no string */
|| (tempbufindex == 1 && *tokptr == '\'')) /* char literal */
{
return (0);
&& !isalnum (tokptr[namelength]))
{
yylval.lval = regno;
- lexptr += namelength + 1;
+ lexptr += namelength;
return (GDB_REGNAME);
}
}
{
case '\'':
case '\"':
- /* First try to match a string literal, which is any nonzero
+ /* First try to match a string literal, which is any
sequence of characters enclosed in matching single or double
quotes, except that a single character inside single quotes
is a character literal, so we have to catch that case also. */
case LOC_ARG:
case LOC_REF_ARG:
case LOC_REGPARM:
+ case LOC_REGPARM_ADDR:
case LOC_LOCAL:
case LOC_LOCAL_ARG:
+ case LOC_BASEREG:
+ case LOC_BASEREG_ARG:
if (innermost_block == NULL
|| contained_in (block_found, innermost_block))
{
yyerror (msg)
char *msg; /* unused */
{
- printf ("Parsing: %s\n", lexptr);
+ printf_unfiltered ("Parsing: %s\n", lexptr);
if (yychar < 256)
{
error ("Invalid syntax in expression near character '%c'.", yychar);