1e93f7393Sniklas /* Definitions for expressions stored in reversed prefix form, for GDB. 2b725ae77Skettenis 3b725ae77Skettenis Copyright 1986, 1989, 1992, 1994, 2000, 2003 Free Software 4b725ae77Skettenis Foundation, Inc. 5e93f7393Sniklas 6e93f7393Sniklas This file is part of GDB. 7e93f7393Sniklas 8e93f7393Sniklas This program is free software; you can redistribute it and/or modify 9e93f7393Sniklas it under the terms of the GNU General Public License as published by 10e93f7393Sniklas the Free Software Foundation; either version 2 of the License, or 11e93f7393Sniklas (at your option) any later version. 12e93f7393Sniklas 13e93f7393Sniklas This program is distributed in the hope that it will be useful, 14e93f7393Sniklas but WITHOUT ANY WARRANTY; without even the implied warranty of 15e93f7393Sniklas MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16e93f7393Sniklas GNU General Public License for more details. 17e93f7393Sniklas 18e93f7393Sniklas You should have received a copy of the GNU General Public License 19e93f7393Sniklas along with this program; if not, write to the Free Software 20b725ae77Skettenis Foundation, Inc., 59 Temple Place - Suite 330, 21b725ae77Skettenis Boston, MA 02111-1307, USA. */ 22e93f7393Sniklas 23e93f7393Sniklas #if !defined (EXPRESSION_H) 24e93f7393Sniklas #define EXPRESSION_H 1 25e93f7393Sniklas 26b725ae77Skettenis 27b725ae77Skettenis #include "symtab.h" /* Needed for "struct block" type. */ 28b725ae77Skettenis #include "doublest.h" /* Needed for DOUBLEST. */ 29b725ae77Skettenis 30e93f7393Sniklas 31e93f7393Sniklas /* Definitions for saved C expressions. */ 32e93f7393Sniklas 33e93f7393Sniklas /* An expression is represented as a vector of union exp_element's. 34e93f7393Sniklas Each exp_element is an opcode, except that some opcodes cause 35e93f7393Sniklas the following exp_element to be treated as a long or double constant 36e93f7393Sniklas or as a variable. The opcodes are obeyed, using a stack for temporaries. 37e93f7393Sniklas The value is left on the temporary stack at the end. */ 38e93f7393Sniklas 39e93f7393Sniklas /* When it is necessary to include a string, 40e93f7393Sniklas it can occupy as many exp_elements as it needs. 41e93f7393Sniklas We find the length of the string using strlen, 42e93f7393Sniklas divide to find out how many exp_elements are used up, 43e93f7393Sniklas and skip that many. Strings, like numbers, are indicated 44e93f7393Sniklas by the preceding opcode. */ 45e93f7393Sniklas 46e93f7393Sniklas enum exp_opcode 47e93f7393Sniklas { 48e93f7393Sniklas /* Used when it's necessary to pass an opcode which will be ignored, 49e93f7393Sniklas or to catch uninitialized values. */ 50e93f7393Sniklas OP_NULL, 51e93f7393Sniklas 52e93f7393Sniklas /* BINOP_... operate on two values computed by following subexpressions, 53e93f7393Sniklas replacing them by one result value. They take no immediate arguments. */ 54e93f7393Sniklas 55e93f7393Sniklas BINOP_ADD, /* + */ 56e93f7393Sniklas BINOP_SUB, /* - */ 57e93f7393Sniklas BINOP_MUL, /* * */ 58e93f7393Sniklas BINOP_DIV, /* / */ 59e93f7393Sniklas BINOP_REM, /* % */ 60e93f7393Sniklas BINOP_MOD, /* mod (Knuth 1.2.4) */ 61e93f7393Sniklas BINOP_LSH, /* << */ 62e93f7393Sniklas BINOP_RSH, /* >> */ 63e93f7393Sniklas BINOP_LOGICAL_AND, /* && */ 64e93f7393Sniklas BINOP_LOGICAL_OR, /* || */ 65e93f7393Sniklas BINOP_BITWISE_AND, /* & */ 66e93f7393Sniklas BINOP_BITWISE_IOR, /* | */ 67e93f7393Sniklas BINOP_BITWISE_XOR, /* ^ */ 68e93f7393Sniklas BINOP_EQUAL, /* == */ 69e93f7393Sniklas BINOP_NOTEQUAL, /* != */ 70e93f7393Sniklas BINOP_LESS, /* < */ 71e93f7393Sniklas BINOP_GTR, /* > */ 72e93f7393Sniklas BINOP_LEQ, /* <= */ 73e93f7393Sniklas BINOP_GEQ, /* >= */ 74e93f7393Sniklas BINOP_REPEAT, /* @ */ 75e93f7393Sniklas BINOP_ASSIGN, /* = */ 76e93f7393Sniklas BINOP_COMMA, /* , */ 77e93f7393Sniklas BINOP_SUBSCRIPT, /* x[y] */ 78e93f7393Sniklas BINOP_EXP, /* Exponentiation */ 79e93f7393Sniklas 80e93f7393Sniklas /* C++. */ 81e93f7393Sniklas 82e93f7393Sniklas BINOP_MIN, /* <? */ 83e93f7393Sniklas BINOP_MAX, /* >? */ 84e93f7393Sniklas 85e93f7393Sniklas /* STRUCTOP_MEMBER is used for pointer-to-member constructs. 86e93f7393Sniklas X . * Y translates into X STRUCTOP_MEMBER Y. */ 87e93f7393Sniklas STRUCTOP_MEMBER, 88e93f7393Sniklas 89e93f7393Sniklas /* STRUCTOP_MPTR is used for pointer-to-member constructs 90e93f7393Sniklas when X is a pointer instead of an aggregate. */ 91e93f7393Sniklas STRUCTOP_MPTR, 92e93f7393Sniklas 93e93f7393Sniklas /* end of C++. */ 94e93f7393Sniklas 95e93f7393Sniklas /* For Modula-2 integer division DIV */ 96e93f7393Sniklas BINOP_INTDIV, 97e93f7393Sniklas 98e93f7393Sniklas BINOP_ASSIGN_MODIFY, /* +=, -=, *=, and so on. 99e93f7393Sniklas The following exp_element is another opcode, 100e93f7393Sniklas a BINOP_, saying how to modify. 101e93f7393Sniklas Then comes another BINOP_ASSIGN_MODIFY, 102e93f7393Sniklas making three exp_elements in total. */ 103e93f7393Sniklas 104e93f7393Sniklas /* Modula-2 standard (binary) procedures */ 105e93f7393Sniklas BINOP_VAL, 106e93f7393Sniklas BINOP_INCL, 107e93f7393Sniklas BINOP_EXCL, 108e93f7393Sniklas 109e93f7393Sniklas /* Concatenate two operands, such as character strings or bitstrings. 110e93f7393Sniklas If the first operand is a integer expression, then it means concatenate 111e93f7393Sniklas the second operand with itself that many times. */ 112e93f7393Sniklas BINOP_CONCAT, 113e93f7393Sniklas 114b725ae77Skettenis /* For (the deleted) Chill and Pascal. */ 115e93f7393Sniklas BINOP_IN, /* Returns 1 iff ARG1 IN ARG2. */ 116e93f7393Sniklas 117b725ae77Skettenis /* This is the "colon operator" used various places in (the 118b725ae77Skettenis deleted) Chill. */ 119e93f7393Sniklas BINOP_RANGE, 120e93f7393Sniklas 121e93f7393Sniklas /* This must be the highest BINOP_ value, for expprint.c. */ 122e93f7393Sniklas BINOP_END, 123e93f7393Sniklas 124e93f7393Sniklas /* Operates on three values computed by following subexpressions. */ 125e93f7393Sniklas TERNOP_COND, /* ?: */ 126e93f7393Sniklas 127b725ae77Skettenis /* A sub-string/sub-array. (the deleted) Chill syntax: 128b725ae77Skettenis OP1(OP2:OP3). Return elements OP2 through OP3 of OP1. */ 129e93f7393Sniklas TERNOP_SLICE, 130e93f7393Sniklas 131b725ae77Skettenis /* A sub-string/sub-array. (The deleted) Chill syntax: OP1(OP2 UP 132b725ae77Skettenis OP3). Return OP3 elements of OP1, starting with element 133b725ae77Skettenis OP2. */ 134e93f7393Sniklas TERNOP_SLICE_COUNT, 135e93f7393Sniklas 136e93f7393Sniklas /* Multidimensional subscript operator, such as Modula-2 x[a,b,...]. 137e93f7393Sniklas The dimensionality is encoded in the operator, like the number of 138e93f7393Sniklas function arguments in OP_FUNCALL, I.E. <OP><dimension><OP>. 139e93f7393Sniklas The value of the first following subexpression is subscripted 140e93f7393Sniklas by each of the next following subexpressions, one per dimension. */ 141e93f7393Sniklas MULTI_SUBSCRIPT, 142e93f7393Sniklas 143e93f7393Sniklas /* The OP_... series take immediate following arguments. 144e93f7393Sniklas After the arguments come another OP_... (the same one) 145e93f7393Sniklas so that the grouping can be recognized from the end. */ 146e93f7393Sniklas 147e93f7393Sniklas /* OP_LONG is followed by a type pointer in the next exp_element 148e93f7393Sniklas and the long constant value in the following exp_element. 149e93f7393Sniklas Then comes another OP_LONG. 150e93f7393Sniklas Thus, the operation occupies four exp_elements. */ 151e93f7393Sniklas OP_LONG, 152e93f7393Sniklas 153e93f7393Sniklas /* OP_DOUBLE is similar but takes a DOUBLEST constant instead of a long. */ 154e93f7393Sniklas OP_DOUBLE, 155e93f7393Sniklas 156e93f7393Sniklas /* OP_VAR_VALUE takes one struct block * in the following element, 157e93f7393Sniklas and one struct symbol * in the following exp_element, followed by 158e93f7393Sniklas another OP_VAR_VALUE, making four exp_elements. If the block is 159e93f7393Sniklas non-NULL, evaluate the symbol relative to the innermost frame 160e93f7393Sniklas executing in that block; if the block is NULL use the selected frame. */ 161e93f7393Sniklas OP_VAR_VALUE, 162e93f7393Sniklas 163e93f7393Sniklas /* OP_LAST is followed by an integer in the next exp_element. 164e93f7393Sniklas The integer is zero for the last value printed, 165e93f7393Sniklas or it is the absolute number of a history element. 166e93f7393Sniklas With another OP_LAST at the end, this makes three exp_elements. */ 167e93f7393Sniklas OP_LAST, 168e93f7393Sniklas 169e93f7393Sniklas /* OP_REGISTER is followed by an integer in the next exp_element. 170e93f7393Sniklas This is the number of a register to fetch (as an int). 171e93f7393Sniklas With another OP_REGISTER at the end, this makes three exp_elements. */ 172e93f7393Sniklas OP_REGISTER, 173e93f7393Sniklas 174e93f7393Sniklas /* OP_INTERNALVAR is followed by an internalvar ptr in the next exp_element. 175e93f7393Sniklas With another OP_INTERNALVAR at the end, this makes three exp_elements. */ 176e93f7393Sniklas OP_INTERNALVAR, 177e93f7393Sniklas 178e93f7393Sniklas /* OP_FUNCALL is followed by an integer in the next exp_element. 179e93f7393Sniklas The integer is the number of args to the function call. 180e93f7393Sniklas That many plus one values from following subexpressions 181e93f7393Sniklas are used, the first one being the function. 182e93f7393Sniklas The integer is followed by a repeat of OP_FUNCALL, 183e93f7393Sniklas making three exp_elements. */ 184e93f7393Sniklas OP_FUNCALL, 185e93f7393Sniklas 186b725ae77Skettenis /* OP_OBJC_MSGCALL is followed by a string in the next exp_element and then an 187b725ae77Skettenis integer. The string is the selector string. The integer is the number 188b725ae77Skettenis of arguments to the message call. That many plus one values are used, 189b725ae77Skettenis the first one being the object pointer. This is an Objective C message */ 190b725ae77Skettenis OP_OBJC_MSGCALL, 191b725ae77Skettenis 192e93f7393Sniklas /* This is EXACTLY like OP_FUNCALL but is semantically different. 193e93f7393Sniklas In F77, array subscript expressions, substring expressions 194e93f7393Sniklas and function calls are all exactly the same syntactically. They may 195e93f7393Sniklas only be dismabiguated at runtime. Thus this operator, which 196e93f7393Sniklas indicates that we have found something of the form <name> ( <stuff> ) */ 197e93f7393Sniklas OP_F77_UNDETERMINED_ARGLIST, 198e93f7393Sniklas 199e93f7393Sniklas /* The following OP is a special one, it introduces a F77 complex 200e93f7393Sniklas literal. It is followed by exactly two args that are doubles. */ 201e93f7393Sniklas OP_COMPLEX, 202e93f7393Sniklas 203e93f7393Sniklas /* OP_STRING represents a string constant. 204e93f7393Sniklas Its format is the same as that of a STRUCTOP, but the string 205e93f7393Sniklas data is just made into a string constant when the operation 206e93f7393Sniklas is executed. */ 207e93f7393Sniklas OP_STRING, 208e93f7393Sniklas 209e93f7393Sniklas /* OP_BITSTRING represents a packed bitstring constant. 210e93f7393Sniklas Its format is the same as that of a STRUCTOP, but the bitstring 211e93f7393Sniklas data is just made into a bitstring constant when the operation 212e93f7393Sniklas is executed. */ 213e93f7393Sniklas OP_BITSTRING, 214e93f7393Sniklas 215e93f7393Sniklas /* OP_ARRAY creates an array constant out of the following subexpressions. 216e93f7393Sniklas It is followed by two exp_elements, the first containing an integer 217e93f7393Sniklas that is the lower bound of the array and the second containing another 218e93f7393Sniklas integer that is the upper bound of the array. The second integer is 219e93f7393Sniklas followed by a repeat of OP_ARRAY, making four exp_elements total. 220e93f7393Sniklas The bounds are used to compute the number of following subexpressions 221e93f7393Sniklas to consume, as well as setting the bounds in the created array constant. 222e93f7393Sniklas The type of the elements is taken from the type of the first subexp, 223e93f7393Sniklas and they must all match. */ 224e93f7393Sniklas OP_ARRAY, 225e93f7393Sniklas 226e93f7393Sniklas /* UNOP_CAST is followed by a type pointer in the next exp_element. 227e93f7393Sniklas With another UNOP_CAST at the end, this makes three exp_elements. 228e93f7393Sniklas It casts the value of the following subexpression. */ 229e93f7393Sniklas UNOP_CAST, 230e93f7393Sniklas 231e93f7393Sniklas /* UNOP_MEMVAL is followed by a type pointer in the next exp_element 232e93f7393Sniklas With another UNOP_MEMVAL at the end, this makes three exp_elements. 233e93f7393Sniklas It casts the contents of the word addressed by the value of the 234e93f7393Sniklas following subexpression. */ 235e93f7393Sniklas UNOP_MEMVAL, 236e93f7393Sniklas 237e93f7393Sniklas /* UNOP_... operate on one value from a following subexpression 238e93f7393Sniklas and replace it with a result. They take no immediate arguments. */ 239e93f7393Sniklas 240e93f7393Sniklas UNOP_NEG, /* Unary - */ 241e93f7393Sniklas UNOP_LOGICAL_NOT, /* Unary ! */ 242e93f7393Sniklas UNOP_COMPLEMENT, /* Unary ~ */ 243e93f7393Sniklas UNOP_IND, /* Unary * */ 244e93f7393Sniklas UNOP_ADDR, /* Unary & */ 245e93f7393Sniklas UNOP_PREINCREMENT, /* ++ before an expression */ 246e93f7393Sniklas UNOP_POSTINCREMENT, /* ++ after an expression */ 247e93f7393Sniklas UNOP_PREDECREMENT, /* -- before an expression */ 248e93f7393Sniklas UNOP_POSTDECREMENT, /* -- after an expression */ 249e93f7393Sniklas UNOP_SIZEOF, /* Unary sizeof (followed by expression) */ 250e93f7393Sniklas 251e93f7393Sniklas UNOP_PLUS, /* Unary plus */ 252e93f7393Sniklas 253e93f7393Sniklas UNOP_CAP, /* Modula-2 standard (unary) procedures */ 254e93f7393Sniklas UNOP_CHR, 255e93f7393Sniklas UNOP_ORD, 256e93f7393Sniklas UNOP_ABS, 257e93f7393Sniklas UNOP_FLOAT, 258e93f7393Sniklas UNOP_HIGH, 259e93f7393Sniklas UNOP_MAX, 260e93f7393Sniklas UNOP_MIN, 261e93f7393Sniklas UNOP_ODD, 262e93f7393Sniklas UNOP_TRUNC, 263e93f7393Sniklas 264b725ae77Skettenis /* (The deleted) Chill builtin functions. */ 265e93f7393Sniklas UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH, UNOP_CARD, UNOP_CHMAX, UNOP_CHMIN, 266e93f7393Sniklas 267e93f7393Sniklas OP_BOOL, /* Modula-2 builtin BOOLEAN type */ 268e93f7393Sniklas OP_M2_STRING, /* Modula-2 string constants */ 269e93f7393Sniklas 270e93f7393Sniklas /* STRUCTOP_... operate on a value from a following subexpression 271e93f7393Sniklas by extracting a structure component specified by a string 272e93f7393Sniklas that appears in the following exp_elements (as many as needed). 273e93f7393Sniklas STRUCTOP_STRUCT is used for "." and STRUCTOP_PTR for "->". 274e93f7393Sniklas They differ only in the error message given in case the value is 275e93f7393Sniklas not suitable or the structure component specified is not found. 276e93f7393Sniklas 277e93f7393Sniklas The length of the string follows the opcode, followed by 278e93f7393Sniklas BYTES_TO_EXP_ELEM(length) elements containing the data of the 279e93f7393Sniklas string, followed by the length again and the opcode again. */ 280e93f7393Sniklas 281e93f7393Sniklas STRUCTOP_STRUCT, 282e93f7393Sniklas STRUCTOP_PTR, 283e93f7393Sniklas 284b725ae77Skettenis /* C++: OP_THIS is just a placeholder for the class instance variable. 285e93f7393Sniklas It just comes in a tight (OP_THIS, OP_THIS) pair. */ 286e93f7393Sniklas OP_THIS, 287e93f7393Sniklas 288b725ae77Skettenis /* Objective-C: OP_OBJC_SELF is just a placeholder for the class instance 289b725ae77Skettenis variable. It just comes in a tight (OP_OBJC_SELF, OP_OBJC_SELF) pair. */ 290b725ae77Skettenis OP_OBJC_SELF, 291b725ae77Skettenis 292b725ae77Skettenis /* Objective C: "@selector" pseudo-operator */ 293b725ae77Skettenis OP_OBJC_SELECTOR, 294b725ae77Skettenis 295e93f7393Sniklas /* OP_SCOPE surrounds a type name and a field name. The type 296e93f7393Sniklas name is encoded as one element, but the field name stays as 297e93f7393Sniklas a string, which, of course, is variable length. */ 298e93f7393Sniklas OP_SCOPE, 299e93f7393Sniklas 300b725ae77Skettenis /* Used to represent named structure field values in brace 301b725ae77Skettenis initializers (or tuples as they are called in (the deleted) 302b725ae77Skettenis Chill). 303b725ae77Skettenis 304b725ae77Skettenis The gcc C syntax is NAME:VALUE or .NAME=VALUE, the (the 305b725ae77Skettenis deleted) Chill syntax is .NAME:VALUE. Multiple labels (as in 306b725ae77Skettenis the (the deleted) Chill syntax .NAME1,.NAME2:VALUE) is 307b725ae77Skettenis represented as if it were .NAME1:(.NAME2:VALUE) (though that is 308b725ae77Skettenis not valid (the deleted) Chill syntax). 309e93f7393Sniklas 310e93f7393Sniklas The NAME is represented as for STRUCTOP_STRUCT; VALUE follows. */ 311e93f7393Sniklas OP_LABELED, 312e93f7393Sniklas 313e93f7393Sniklas /* OP_TYPE is for parsing types, and used with the "ptype" command 314e93f7393Sniklas so we can look up types that are qualified by scope, either with 315e93f7393Sniklas the GDB "::" operator, or the Modula-2 '.' operator. */ 316e93f7393Sniklas OP_TYPE, 317e93f7393Sniklas 318e93f7393Sniklas /* An un-looked-up identifier. */ 319e93f7393Sniklas OP_NAME, 320e93f7393Sniklas 321e93f7393Sniklas /* An unparsed expression. Used for Scheme (for now at least) */ 322b725ae77Skettenis OP_EXPRSTRING, 323b725ae77Skettenis 324b725ae77Skettenis /* An Objective C Foundation Class NSString constant */ 325b725ae77Skettenis OP_OBJC_NSSTRING, 326b725ae77Skettenis 327b725ae77Skettenis /* First extension operator. Individual language modules define 328b725ae77Skettenis extra operators they need as constants with values 329b725ae77Skettenis OP_LANGUAGE_SPECIFIC0 + k, for k >= 0, using a separate 330b725ae77Skettenis enumerated type definition: 331b725ae77Skettenis enum foo_extension_operator { 332b725ae77Skettenis BINOP_MOGRIFY = OP_EXTENDED0, 333b725ae77Skettenis BINOP_FROB, 334b725ae77Skettenis ... 335b725ae77Skettenis }; */ 336b725ae77Skettenis OP_EXTENDED0, 337b725ae77Skettenis 338b725ae77Skettenis /* Last possible extension operator. Defined to provide an 339b725ae77Skettenis explicit and finite number of extended operators. */ 340b725ae77Skettenis OP_EXTENDED_LAST = 0xff 341b725ae77Skettenis /* NOTE: Eventually, we expect to convert to an object-oriented 342b725ae77Skettenis formulation for expression operators that does away with the 343b725ae77Skettenis need for these extension operators, and indeed for this 344b725ae77Skettenis entire enumeration type. Therefore, consider the OP_EXTENDED 345b725ae77Skettenis definitions to be a temporary measure. */ 346e93f7393Sniklas }; 347e93f7393Sniklas 348e93f7393Sniklas union exp_element 349e93f7393Sniklas { 350e93f7393Sniklas enum exp_opcode opcode; 351e93f7393Sniklas struct symbol *symbol; 352e93f7393Sniklas LONGEST longconst; 353e93f7393Sniklas DOUBLEST doubleconst; 354e93f7393Sniklas /* Really sizeof (union exp_element) characters (or less for the last 355e93f7393Sniklas element of a string). */ 356e93f7393Sniklas char string; 357e93f7393Sniklas struct type *type; 358e93f7393Sniklas struct internalvar *internalvar; 359e93f7393Sniklas struct block *block; 360e93f7393Sniklas }; 361e93f7393Sniklas 362e93f7393Sniklas struct expression 363e93f7393Sniklas { 364e93f7393Sniklas const struct language_defn *language_defn; /* language it was entered in */ 365e93f7393Sniklas int nelts; 366e93f7393Sniklas union exp_element elts[1]; 367e93f7393Sniklas }; 368e93f7393Sniklas 369e93f7393Sniklas /* Macros for converting between number of expression elements and bytes 370e93f7393Sniklas to store that many expression elements. */ 371e93f7393Sniklas 372e93f7393Sniklas #define EXP_ELEM_TO_BYTES(elements) \ 373e93f7393Sniklas ((elements) * sizeof (union exp_element)) 374e93f7393Sniklas #define BYTES_TO_EXP_ELEM(bytes) \ 375e93f7393Sniklas (((bytes) + sizeof (union exp_element) - 1) / sizeof (union exp_element)) 376e93f7393Sniklas 377e93f7393Sniklas /* From parse.c */ 378e93f7393Sniklas 379b725ae77Skettenis extern struct expression *parse_expression (char *); 380e93f7393Sniklas 381*63addd46Skettenis extern struct expression *parse_expression_in_context (char *, int); 382*63addd46Skettenis 383b725ae77Skettenis extern struct expression *parse_exp_1 (char **, struct block *, int); 384e93f7393Sniklas 385e93f7393Sniklas /* The innermost context required by the stack and register variables 386e93f7393Sniklas we've encountered so far. To use this, set it to NULL, then call 387e93f7393Sniklas parse_<whatever>, then look at it. */ 388e93f7393Sniklas extern struct block *innermost_block; 389e93f7393Sniklas 390e93f7393Sniklas /* From eval.c */ 391e93f7393Sniklas 392e93f7393Sniklas /* Values of NOSIDE argument to eval_subexp. */ 393e93f7393Sniklas 394e93f7393Sniklas enum noside 395e93f7393Sniklas { 396e93f7393Sniklas EVAL_NORMAL, 397e93f7393Sniklas EVAL_SKIP, /* Only effect is to increment pos. */ 398e93f7393Sniklas EVAL_AVOID_SIDE_EFFECTS /* Don't modify any variables or 399e93f7393Sniklas call any functions. The value 400e93f7393Sniklas returned will have the correct 401e93f7393Sniklas type, and will have an 402e93f7393Sniklas approximately correct lvalue 403e93f7393Sniklas type (inaccuracy: anything that is 404e93f7393Sniklas listed as being in a register in 405e93f7393Sniklas the function in which it was 406e93f7393Sniklas declared will be lval_register). */ 407e93f7393Sniklas }; 408e93f7393Sniklas 409e93f7393Sniklas extern struct value *evaluate_subexp_standard 410b725ae77Skettenis (struct type *, struct expression *, int *, enum noside); 411e93f7393Sniklas 412e93f7393Sniklas /* From expprint.c */ 413e93f7393Sniklas 414b725ae77Skettenis extern void print_expression (struct expression *, struct ui_file *); 415e93f7393Sniklas 416b725ae77Skettenis extern char *op_string (enum exp_opcode); 417e93f7393Sniklas 418b725ae77Skettenis extern void dump_raw_expression (struct expression *, struct ui_file *, char *); 419b725ae77Skettenis extern void dump_prefix_expression (struct expression *, struct ui_file *); 420e93f7393Sniklas 421e93f7393Sniklas #endif /* !defined (EXPRESSION_H) */ 422