From 24daaebce8a29b276319001e01a278bb388cfa06 Mon Sep 17 00:00:00 2001 From: "Paul N. Hilfinger" Date: Wed, 24 Sep 2003 08:29:42 +0000 Subject: * parser-defs.h (operator_length): Declare. * parse.c (length_of_subexp): Use operator_length to get operator lengths and arities for operators. Move most code to new operator_length function. (operator_length): New function absorbing most code from length_of_subexp. (prefixify_subexp): Remove large case and use operator_length instead. (parse_exp_1): Use renamings: dump_prefix_expression => dump_raw_expression and dump_postfix_expression => dump_prefix_expression. * expression.h (dump_prefix_expression): Rename to ... (dump_raw_expression): New name. (dump_postfix_expression): Rename to ... (dump_prefix_expression): New name. * expprint.c (dump_subexp): Make global. Add comment. Move most existing code to dump_subexp_body. (dump_subexp_body): New function. (dump_prefix_expression): Rename to dump_raw_expression. Remove attempt to print the expression via print_expression: it can't work before the expression is prefixified. (dump_raw_expression): Renamed from dump_prefix_expression. (dump_postfix_expression): Rename to dump_prefix_expression, since that's what it does. Remove 'note' parameter, since this routine must be used on prefixified expression. (dump_prefix_expression): Renamed from dump_postfix_expression. --- gdb/parser-defs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/parser-defs.h') diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h index f03f5370096..54b39a8b0b6 100644 --- a/gdb/parser-defs.h +++ b/gdb/parser-defs.h @@ -159,6 +159,8 @@ extern int pop_type_int (void); extern int length_of_subexp (struct expression *, int); +extern void operator_length (struct expression *, int, int *, int *); + extern struct type *follow_types (struct type *); /* During parsing of a C expression, the pointer to the next character -- cgit v1.2.1