#if !defined (PARSER_DEFS_H)
#define PARSER_DEFS_H 1
-#include "vec.h"
+#include "common/vec.h"
#include "expression.h"
struct block;
/* Resize the allocated expression to the correct size, and return
it as an expression_up -- passing ownership to the caller. */
- expression_up release ();
+ ATTRIBUTE_UNUSED_RESULT expression_up release ();
/* The size of the expression above. */
then look up the macro definitions active at that point. */
extern CORE_ADDR expression_context_pc;
-/* While parsing expressions we need to track the innermost lexical block
- that we encounter. In some situations we need to track the innermost
- block just for symbols, and in other situations we want to track the
- innermost block for symbols and registers. These flags are used by the
- innermost block tracker to control which blocks we consider for the
- innermost block. These flags can be combined together as needed. */
-
-enum innermost_block_tracker_type
-{
- /* Track the innermost block for symbols within an expression. */
- INNERMOST_BLOCK_FOR_SYMBOLS = (1 << 0),
-
- /* Track the innermost block for registers within an expression. */
- INNERMOST_BLOCK_FOR_REGISTERS = (1 << 1)
-};
-DEF_ENUM_FLAGS_TYPE (enum innermost_block_tracker_type,
- innermost_block_tracker_types);
-
/* When parsing expressions we track the innermost block that was
referenced. */
};
/* The innermost context required by the stack and register variables
- we've encountered so far. This should be cleared before parsing an
- expression, and queried once the parse is complete. */
+ we've encountered so far. This is cleared by the expression
+ parsing functions before parsing an expression, and can queried
+ once the parse is complete. */
extern innermost_block_tracker innermost_block;
/* Number of arguments seen so far in innermost function call. */
int theclass;
};
-typedef struct type *type_ptr;
-DEF_VEC_P (type_ptr);
-
/* For parsing of complicated types.
An array should be preceded in the list by the size of the array. */
enum type_pieces
tp_const,
tp_volatile,
tp_space_identifier,
- tp_type_stack
+ tp_type_stack,
+ tp_kind
};
/* The stack can contain either an enum type_pieces or an int. */
union type_stack_elt
enum type_pieces piece;
int int_val;
struct type_stack *stack_val;
- VEC (type_ptr) *typelist_val;
+ std::vector<struct type *> *typelist_val;
};
/* The type stack is an instance of this structure. */
extern void push_type_stack (struct type_stack *stack);
-extern void type_stack_cleanup (void *arg);
-
-extern void push_typelist (VEC (type_ptr) *typelist);
+extern void push_typelist (std::vector<struct type *> *typelist);
extern int dump_subexp (struct expression *, struct ui_file *, int);