+Tue Feb 2 16:10:31 1993 Fred Fish (fnf@cygnus.com)
+
+ * c-exp.y (lcurly, rcurly): New nonterminals.
+ * c-exp.y (exp): Use lcurly and rcurly for arrays and UNOP_MEMVAL
+ constructs.
+ * parse.c (free_funcalls): Moved prototype from parser-defs.h,
+ made function static.
+ * parse.c (struct funcall): Moved struct def from parser-defs.h.
+ * parse.c (funcall_chain): Moved from parser-defs.h, made static.
+ * parse.c (start_arglist):
+ * parser-defs.h (free_funcalls): Moved prototype to parse.c.
+ * parser-defs.h (struct funcall): Moved struct def to parse.c.
+ * parser-defs.h (funcall_chain): Moved to parse.c.
+ * printcmd.c (print_frame_nameless_args): Fix prototype.
+ * tm-mips.h (setup_arbitrary_frame): Fix prototype.
+ * tm-sparc.h (setup_arbitrary_frame): Fix prototype.
+ * valops.c (typecmp): Moved prototype from values.h.
+ * value.h (typecmp): Moved prototype to valops.c, made static.
+ **** start-sanitize-chill ****
+ * ch-exp.y (yylex): Change way control sequences are disabled.
+ **** end-sanitize-chill ****
+
Tue Feb 2 16:11:43 1993 John Gilmore (gnu@cygnus.com)
* tm-mips.h, tm-sparc.h: Fix thinko in SETUP_ARBITRARY_FRAME.
parse_number PARAMS ((char *, int, int, YYSTYPE *));
%}
-%type <voidval> exp exp1 type_exp start variable qualified_name
+%type <voidval> exp exp1 type_exp start variable qualified_name lcurly
+%type <lval> rcurly
%type <tval> type typebase
%type <tvec> nonempty_typelist
/* %type <bval> block */
write_exp_elt_opcode (OP_FUNCALL); }
;
+lcurly : '{'
+ { start_arglist (); }
+ ;
+
arglist :
;
{ arglist_len++; }
;
-exp : '{'
- /* This is to save the value of arglist_len
- being accumulated by an outer function call. */
- { start_arglist (); }
- arglist '}' %prec ARROW
+rcurly : '}'
+ { $$ = end_arglist () - 1; }
+ ;
+exp : lcurly arglist rcurly %prec ARROW
{ write_exp_elt_opcode (OP_ARRAY);
write_exp_elt_longcst ((LONGEST) 0);
- write_exp_elt_longcst ((LONGEST) end_arglist () - 1);
+ write_exp_elt_longcst ((LONGEST) $3);
write_exp_elt_opcode (OP_ARRAY); }
;
-exp : '{' type '}' exp %prec UNARY
+exp : lcurly type rcurly exp %prec UNARY
{ write_exp_elt_opcode (UNOP_MEMVAL);
write_exp_elt_type ($2);
write_exp_elt_opcode (UNOP_MEMVAL); }
if ((*tokptr == '^') && (*(tokptr + 1) == '('))
{
- return (0); /* Disable, see note above. */
+#if 0 /* Disable, see note above. -fnf */
/* Match and decode a control sequence. Return zero if we don't
find a valid integer literal, or if the next unconsumed character
after the integer literal is not the trailing ')'.
{
return (0);
}
+#else
+ return (0);
+#endif
}
else
{
#include "language.h"
#include "parser-defs.h"
+static void
+free_funcalls PARAMS ((void));
+
static void
prefixify_expression PARAMS ((struct expression *));
static void
prefixify_subexp PARAMS ((struct expression *, struct expression *, int, int));
+/* Data structure for saving values of arglist_len for function calls whose
+ arguments contain other function calls. */
+
+struct funcall
+ {
+ struct funcall *next;
+ int arglist_len;
+ };
+
+static struct funcall *funcall_chain;
+
/* Assign machine-independent names to certain registers
(unless overridden by the REGISTER_NAMES table) */
void
start_arglist ()
{
- register struct funcall *new = (struct funcall *) xmalloc (sizeof (struct funcall));
+ register struct funcall *new;
+ new = (struct funcall *) xmalloc (sizeof (struct funcall));
new->next = funcall_chain;
new->arglist_len = arglist_len;
arglist_len = 0;
/* Free everything in the funcall chain.
Used when there is an error inside parsing. */
-void
+static void
free_funcalls ()
{
register struct funcall *call, *next;
/* Number of arguments seen so far in innermost function call. */
int arglist_len;
-/* Data structure for saving values of arglist_len
- for function calls whose arguments contain other function calls. */
-
-struct funcall
- {
- struct funcall *next;
- int arglist_len;
- };
-
-struct funcall *funcall_chain;
-
/* A string token, either a char-string or bit-string. Char-strings are
used, for example, for the names of symbols. */
extern int
end_arglist PARAMS ((void));
-extern void
-free_funcalls PARAMS ((void));
-
extern char *
copy_name PARAMS ((struct stoken));
multiple functions with the same SP that are at different stack levels. */
#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
-extern struct frame_info *setup_arbitrary_frame ();
+/* FIXME: Depends on equivalence between FRAME and "struct frame_info *",
+ and equivalence between CORE_ADDR and FRAME_ADDR. */
+extern struct frame_info *setup_arbitrary_frame PARAMS ((int, CORE_ADDR *));
#define STAB_REG_TO_REGNUM(num) ((num) < 32 ? (num) : (num)+FP0_REGNUM-32)
"frame" or "info frame" command. */
#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
-extern struct frame_info *setup_arbitrary_frame ();
+/* FIXME: Depends on equivalence between FRAME and "struct frame_info *",
+ and equivalence between CORE_ADDR and FRAME_ADDR. */
+extern struct frame_info *setup_arbitrary_frame PARAMS ((int, CORE_ADDR *));
/* To print every pair of float registers as a double, we use this hook. */