GDB (xrefs)
Classes | Macros | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-7.10/gdb/parser-defs.h File Reference
#include "doublest.h"
#include "vec.h"
#include "expression.h"

Go to the source code of this file.

Classes

struct  parser_state
 
struct  stoken
 
struct  typed_stoken
 
struct  stoken_vector
 
struct  ttype
 
struct  symtoken
 
struct  objc_class_str
 
union  type_stack_elt
 
struct  type_stack
 
struct  op_print
 
struct  exp_descriptor
 

Macros

#define parse_gdbarch(ps)   ((ps)->expout->gdbarch)
 
#define parse_language(ps)   ((ps)->expout->language_defn)
 

Typedefs

typedef struct typetype_ptr
 

Enumerations

enum  type_pieces {
  tp_end = -1, tp_pointer, tp_reference, tp_array,
  tp_function, tp_function_with_arguments, tp_const, tp_volatile,
  tp_space_identifier, tp_type_stack
}
 
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_BUILTIN_FUNCTION
}
 

Functions

 DEF_VEC_P (type_ptr)
 
void initialize_expout (struct parser_state *ps, size_t initial_size, const struct language_defn *lang, struct gdbarch *gdbarch)
 
void reallocate_expout (struct parser_state *ps)
 
int prefixify_expression (struct expression *expr)
 
void write_exp_elt_opcode (struct parser_state *, enum exp_opcode)
 
void write_exp_elt_sym (struct parser_state *, struct symbol *)
 
void write_exp_elt_longcst (struct parser_state *, LONGEST)
 
void write_exp_elt_dblcst (struct parser_state *, DOUBLEST)
 
void write_exp_elt_decfloatcst (struct parser_state *, gdb_byte *)
 
void write_exp_elt_type (struct parser_state *, struct type *)
 
void write_exp_elt_intern (struct parser_state *, struct internalvar *)
 
void write_exp_string (struct parser_state *, struct stoken)
 
void write_exp_string_vector (struct parser_state *, int type, struct stoken_vector *vec)
 
void write_exp_bitstring (struct parser_state *, struct stoken)
 
void write_exp_elt_block (struct parser_state *, const struct block *)
 
void write_exp_elt_objfile (struct parser_state *, struct objfile *objfile)
 
void write_exp_msymbol (struct parser_state *, struct bound_minimal_symbol)
 
void write_dollar_variable (struct parser_state *, struct stoken str)
 
void mark_struct_expression (struct parser_state *)
 
const char * find_template_name_end (const char *)
 
void start_arglist (void)
 
int end_arglist (void)
 
char * copy_name (struct stoken)
 
void insert_type (enum type_pieces)
 
void push_type (enum type_pieces)
 
void push_type_int (int)
 
void insert_type_address_space (struct parser_state *, char *)
 
enum type_pieces pop_type (void)
 
int pop_type_int (void)
 
struct type_stackget_type_stack (void)
 
struct type_stackappend_type_stack (struct type_stack *to, struct type_stack *from)
 
void push_type_stack (struct type_stack *stack)
 
void type_stack_cleanup (void *arg)
 
void push_typelist (VEC(type_ptr)*typelist)
 
int length_of_subexp (struct expression *, int)
 
int dump_subexp (struct expression *, struct ui_file *, int)
 
int dump_subexp_body_standard (struct expression *, struct ui_file *, int)
 
void operator_length (const struct expression *, int, int *, int *)
 
void operator_length_standard (const struct expression *, int, int *, int *)
 
int operator_check_standard (struct expression *exp, int pos, int(*objfile_func)(struct objfile *objfile, void *data), void *data)
 
char * op_name_standard (enum exp_opcode)
 
struct typefollow_types (struct type *)
 
void null_post_parser (struct expression **, int)
 
int parse_float (const char *p, int len, DOUBLEST *d, const char **suffix)
 
int parse_c_float (struct gdbarch *gdbarch, const char *p, int len, DOUBLEST *d, struct type **t)
 
void print_subexp (struct expression *, int *, struct ui_file *, enum precedence)
 
void print_subexp_standard (struct expression *, int *, struct ui_file *, enum precedence)
 
void parser_fprintf (FILE *, const char *,...) ATTRIBUTE_PRINTF(2
 
void int exp_uses_objfile (struct expression *exp, struct objfile *objfile)
 
void mark_completion_tag (enum type_code, const char *ptr, int length)
 
void increase_expout_size (struct parser_state *ps, size_t lenelt)
 

Variables

int parser_debug
 
const struct blockexpression_context_block
 
CORE_ADDR expression_context_pc
 
const struct blockinnermost_block
 
int arglist_len
 
const char * lexptr
 
const char * prev_lexptr
 
int paren_depth
 
int comma_terminates
 
const struct exp_descriptor exp_descriptor_standard
 

Macro Definition Documentation

#define parse_gdbarch (   ps)    ((ps)->expout->gdbarch)
#define parse_language (   ps)    ((ps)->expout->language_defn)

Typedef Documentation

typedef struct type* type_ptr

Definition at line 120 of file parser-defs.h.

Enumeration Type Documentation

enum precedence
Enumerator
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_BUILTIN_FUNCTION 

Definition at line 303 of file parser-defs.h.

Enumerator
tp_end 
tp_pointer 
tp_reference 
tp_array 
tp_function 
tp_function_with_arguments 
tp_const 
tp_volatile 
tp_space_identifier 
tp_type_stack 

Definition at line 125 of file parser-defs.h.

Function Documentation

struct type_stack* append_type_stack ( struct type_stack to,
struct type_stack from 
)

Definition at line 1579 of file parse.c.

References type_stack::depth, type_stack::elements, to, and type_stack_reserve().

Referenced by yyparse().

char* copy_name ( struct stoken  )
DEF_VEC_P ( type_ptr  )
int dump_subexp ( struct expression ,
struct ui_file ,
int   
)
int dump_subexp_body_standard ( struct expression ,
struct ui_file ,
int   
)
int end_arglist ( void  )

Definition at line 156 of file parse.c.

References arglist_len, funcall::arglist_len, funcall_chain, funcall::next, and xfree().

Referenced by yyparse().

void int exp_uses_objfile ( struct expression exp,
struct objfile objfile 
)
const char* find_template_name_end ( const char *  )

Definition at line 712 of file parse.c.

Referenced by lex_one_token().

struct type* follow_types ( struct type )
struct type_stack* get_type_stack ( void  )

Definition at line 1605 of file parse.c.

References type_stack::depth, type_stack::elements, type_stack::size, and type_stack.

Referenced by yyparse().

void increase_expout_size ( struct parser_state ps,
size_t  lenelt 
)
void initialize_expout ( struct parser_state ps,
size_t  initial_size,
const struct language_defn lang,
struct gdbarch gdbarch 
)
void insert_type ( enum  type_pieces)
void insert_type_address_space ( struct parser_state ,
char *   
)
int length_of_subexp ( struct expression ,
int   
)

Definition at line 829 of file parse.c.

References length_of_subexp(), and operator_length().

Referenced by copy_exp(), length_of_subexp(), prefixify_subexp(), and yyparse().

void mark_completion_tag ( enum  type_code,
const char *  ptr,
int  length 
)
void mark_struct_expression ( struct parser_state )
void null_post_parser ( struct expression **  ,
int   
)

Definition at line 1358 of file parse.c.

char* op_name_standard ( enum  exp_opcode)

Definition at line 662 of file expprint.c.

References xsnprintf().

Referenced by ada_op_name().

int operator_check_standard ( struct expression exp,
int  pos,
int(*)(struct objfile *objfile, void *data)  objfile_func,
void *  data 
)
void operator_length ( const struct expression ,
int  ,
int ,
int  
)
void operator_length_standard ( const struct expression ,
int  ,
int ,
int  
)
int parse_c_float ( struct gdbarch gdbarch,
const char *  p,
int  len,
DOUBLEST d,
struct type **  t 
)
int parse_float ( const char *  p,
int  len,
DOUBLEST d,
const char **  suffix 
)

Definition at line 1370 of file parse.c.

References DOUBLEST_SCAN_FORMAT, len, xfree(), and xmalloc().

Referenced by parse_c_float(), and parse_number().

void parser_fprintf ( FILE *  ,
const char *  ,
  ... 
)
enum type_pieces pop_type ( void  )

Definition at line 1541 of file parse.c.

References type_stack::depth, type_stack::elements, type_stack_elt::piece, and tp_end.

Referenced by follow_types(), and yyparse().

int pop_type_int ( void  )

Definition at line 1549 of file parse.c.

References type_stack::depth, type_stack::elements, and type_stack_elt::int_val.

Referenced by follow_types(), and yyparse().

int prefixify_expression ( struct expression expr)
void print_subexp ( struct expression ,
int ,
struct ui_file ,
enum  precedence 
)
void print_subexp_standard ( struct expression ,
int ,
struct ui_file ,
enum  precedence 
)
void push_type ( enum  type_pieces)
void push_type_int ( int  )

Definition at line 1505 of file parse.c.

References check_type_stack_depth(), type_stack::depth, type_stack::elements, and type_stack_elt::int_val.

Referenced by yyparse().

void push_type_stack ( struct type_stack stack)
void push_typelist ( VEC(type_ptr)*  typelist)
void reallocate_expout ( struct parser_state ps)
void start_arglist ( void  )

Definition at line 141 of file parse.c.

References arglist_len, funcall::arglist_len, funcall_chain, funcall::next, and xmalloc().

Referenced by yyparse().

void type_stack_cleanup ( void *  arg)

Definition at line 1620 of file parse.c.

References type_stack::elements, and xfree().

Referenced by yyparse().

void write_dollar_variable ( struct parser_state ,
struct stoken  str 
)
void write_exp_bitstring ( struct parser_state ,
struct stoken   
)
void write_exp_elt_block ( struct parser_state ,
const struct block  
)
void write_exp_elt_dblcst ( struct parser_state ,
DOUBLEST   
)

Definition at line 286 of file parse.c.

References exp_element::doubleconst, and write_exp_elt().

Referenced by yyparse().

void write_exp_elt_decfloatcst ( struct parser_state ,
gdb_byte  
)
void write_exp_elt_intern ( struct parser_state ,
struct internalvar  
)

Definition at line 318 of file parse.c.

References exp_element::internalvar, and write_exp_elt().

Referenced by write_dollar_variable().

void write_exp_elt_longcst ( struct parser_state ,
LONGEST   
)
void write_exp_elt_objfile ( struct parser_state ,
struct objfile objfile 
)

Definition at line 266 of file parse.c.

References exp_element::objfile, and write_exp_elt().

Referenced by write_exp_msymbol().

void write_exp_elt_opcode ( struct parser_state ,
enum  exp_opcode 
)
void write_exp_elt_sym ( struct parser_state ,
struct symbol  
)
void write_exp_elt_type ( struct parser_state ,
struct type  
)
void write_exp_msymbol ( struct parser_state ,
struct bound_minimal_symbol   
)
void write_exp_string ( struct parser_state ,
struct stoken   
)
void write_exp_string_vector ( struct parser_state ,
int  type,
struct stoken_vector vec 
)

Variable Documentation

int arglist_len

Definition at line 70 of file parse.c.

Referenced by end_arglist(), start_arglist(), and yyparse().

int comma_terminates

Definition at line 75 of file parse.c.

Referenced by lex_one_token(), parse_exp_in_context_1(), and yylex().

const struct exp_descriptor exp_descriptor_standard

Definition at line 56 of file parse.c.

const struct block* expression_context_block
CORE_ADDR expression_context_pc

Definition at line 68 of file parse.c.

Referenced by c_parse(), and parse_exp_in_context_1().

const struct block* innermost_block

Definition at line 69 of file parse.c.

const char* lexptr

Definition at line 72 of file parse.c.

Referenced by parse_exp_in_context_1().

int paren_depth

Definition at line 74 of file parse.c.

Referenced by lex_one_token(), parse_exp_in_context_1(), and yylex().

int parser_debug

Definition at line 102 of file parse.c.

Referenced by _initialize_parse(), c_parse(), d_parse(), and go_parse().

const char* prev_lexptr

Definition at line 73 of file parse.c.

Referenced by parse_exp_in_context_1().