From 6137983598c57aa8557001079b10fa3be8b77ef6 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Wed, 14 Jun 1995 19:59:35 +0000 Subject: * parser-defs.h (enum precedence): Added PREC_BUILTIN_FUNCTION. * expression.h (enum exp_opcode): Added UNOP_LOWER, UNOP_UPPER, UNUP_LENGTH. * expprint.c (dump_expression): Handle the new exp_opcodes. (print_subexp): Handle PREC_BUILTIN_FUNCTION. (print_simple_m2_func): Removed. (print_subexp): Remove support for Modula2 builtin functions. * m2-lang.c (m2_op_print_tab): Add support for builtin functions. * ch-exp.y: Parse LOWER, UPPER, and LENGTH builtins. (write_lower_upper_value): Convenience function for LOWER and UPPER. (upper_lower_argument, length_argument): Removed non-terminals. * ch-lang.c (chill_op_print_tab): Entries for UPPER, LOWER, LENGTH. (type_lower_upper): New function. Calculate LOWER/UPPER of type. (value_chill_length): New function. Calcalate LENGTH of ARRAY/STRING. (evaluate_subexp_chill): Handle UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH. This fixes PR 5015 (and 5826 which is a duplicate). --- gdb/parser-defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/parser-defs.h') diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h index f294402..3845c1a 100644 --- a/gdb/parser-defs.h +++ b/gdb/parser-defs.h @@ -169,7 +169,7 @@ enum precedence { PREC_NULL, PREC_COMMA, PREC_ABOVE_COMMA, PREC_ASSIGN, PREC_LOGICAL_OR, PREC_LOGICAL_AND, PREC_BITWISE_IOR, PREC_BITWISE_AND, PREC_BITWISE_XOR, PREC_EQUAL, PREC_ORDER, PREC_SHIFT, PREC_ADD, PREC_MUL, PREC_REPEAT, - PREC_HYPER, PREC_PREFIX, PREC_SUFFIX }; + PREC_HYPER, PREC_PREFIX, PREC_SUFFIX, PREC_BUILTIN_FUNCTION }; /* Table mapping opcodes into strings for printing operators and precedences of the operators. */ -- cgit v1.1