GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Typedefs | Functions | Variables
/tmp/gdb-13.1/gdb/ada-lex.l File Reference
#include "diagnostics.h"
#include <ctype.h>

Go to the source code of this file.

Macros

#define NUMERAL_WIDTH   256
 
#define LONGEST_SIGN   ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1))
 
#define YY_DECL   static int yylex ( void )
 
#define YY_NO_INPUT
 
#define COMPLETE_CHAR   '\001'
 
#define YY_INPUT(BUF, RESULT, MAX_SIZE)
 

Typedefs

typedef void(* dummy_function) ()
 

Functions

static void canonicalizeNumeral (char *s1, const char *)
 
static struct stoken processString (const char *, int)
 
static int processInt (struct parser_state *, const char *, const char *, const char *)
 
static int processReal (struct parser_state *, const char *)
 
static struct stoken processId (const char *, int)
 
static int processAttribute (const char *)
 
static int find_dot_all (const char *)
 
static void rewind_to_char (int)
 
int yylex (void)
 
static void lexer_init (FILE *inp)
 
static int subseqMatch (const char *subseq, const char *str)
 

Variables

static char numbuf [NUMERAL_WIDTH]
 
static bool returned_complete = false
 
static int paren_depth
 
struct {
   const char *   name
 
   int   code
 
attributes []
 
dummy_function ada_flex_use []
 

Macro Definition Documentation

◆ COMPLETE_CHAR

#define COMPLETE_CHAR   '\001'

Definition at line 89 of file ada-lex.l.

◆ LONGEST_SIGN

#define LONGEST_SIGN   ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1))

Definition at line 60 of file ada-lex.l.

◆ NUMERAL_WIDTH

#define NUMERAL_WIDTH   256

Definition at line 59 of file ada-lex.l.

◆ YY_DECL

#define YY_DECL   static int yylex ( void )

Definition at line 75 of file ada-lex.l.

◆ YY_INPUT

#define YY_INPUT (   BUF,
  RESULT,
  MAX_SIZE 
)
Value:
if ( *pstate->lexptr == '\000' ) \
{ \
{ \
*(BUF) = COMPLETE_CHAR; \
(RESULT) = 1; \
} \
else \
(RESULT) = YY_NULL; \
} \
else \
{ \
*(BUF) = *pstate->lexptr == COMPLETE_CHAR ? ' ' : *pstate->lexptr; \
(RESULT) = 1; \
pstate->lexptr += 1; \
}
static struct parser_state * pstate
Definition: ada-exp.c:104
#define YY_NULL
Definition: ada-lex.c:106
static bool returned_complete
Definition: ada-lex.l:86
#define COMPLETE_CHAR
Definition: ada-lex.l:89
bool parse_completion
Definition: parser-defs.h:297
const char * lexptr
Definition: parser-defs.h:286

Definition at line 92 of file ada-lex.l.

◆ YY_NO_INPUT

#define YY_NO_INPUT

Definition at line 79 of file ada-lex.l.

Typedef Documentation

◆ dummy_function

typedef void(* dummy_function) ()

Definition at line 779 of file ada-lex.l.

Function Documentation

◆ canonicalizeNumeral()

static void canonicalizeNumeral ( char *  s1,
const char *  s2 
)
static

Definition at line 358 of file ada-lex.l.

References s1, and s2.

◆ find_dot_all()

static int find_dot_all ( const char *  str)
static

Definition at line 651 of file ada-lex.l.

◆ lexer_init()

static void lexer_init ( FILE *  inp)
static

Definition at line 346 of file ada-lex.l.

References BEGIN, INITIAL, paren_depth, returned_complete, and yyrestart.

Referenced by ada_parse().

◆ processAttribute()

static int processAttribute ( const char *  str)
static

◆ processId()

static struct stoken processId ( const char *  name0,
int  len 
)
static

Definition at line 548 of file ada-lex.l.

References COMPLETE_CHAR, stoken::length, name, stoken::ptr, and temp_parse_space.

◆ processInt()

static int processInt ( struct parser_state par_state,
const char *  base0,
const char *  num0,
const char *  exp0 
)
static

◆ processReal()

static int processReal ( struct parser_state par_state,
const char *  num0 
)
static

Definition at line 520 of file ada-lex.l.

References FLOAT, parse_float(), type_long_double(), and yylval.

◆ processString()

static struct stoken processString ( const char *  text,
int  len 
)
static

Definition at line 605 of file ada-lex.l.

References stoken::length, stoken::ptr, and temp_parse_space.

◆ rewind_to_char()

static void rewind_to_char ( int  ch)
static

Definition at line 770 of file ada-lex.l.

References parser_state::lexptr, pstate, yyleng, and yyrestart.

◆ subseqMatch()

static int subseqMatch ( const char *  subseq,
const char *  str 
)
static

Definition at line 675 of file ada-lex.l.

References subseqMatch().

Referenced by processAttribute(), and subseqMatch().

◆ yylex()

int yylex ( void  )

Definition at line 120 of file ada-lex.l.

Referenced by yyparse().

Variable Documentation

◆ ada_flex_use

dummy_function ada_flex_use[]
Initial value:
=
{
}
static void yyunput(int c, char *buf_ptr)
void(* dummy_function)()
Definition: ada-lex.l:779

Definition at line 780 of file ada-lex.l.

◆ 

struct { ... } attributes[]
Initial value:
= {
{ "address", TICK_ADDRESS },
{ "unchecked_access", TICK_ACCESS },
{ "unrestricted_access", TICK_ACCESS },
{ "access", TICK_ACCESS },
{ "first", TICK_FIRST },
{ "last", TICK_LAST },
{ "length", TICK_LENGTH },
{ "max", TICK_MAX },
{ "min", TICK_MIN },
{ "modulus", TICK_MODULUS },
{ "pos", TICK_POS },
{ "range", TICK_RANGE },
{ "size", TICK_SIZE },
{ "tag", TICK_TAG },
{ "val", TICK_VAL },
}
#define TICK_VAL
Definition: ada-exp.c:604
#define TICK_ADDRESS
Definition: ada-exp.c:593
#define TICK_POS
Definition: ada-exp.c:600
#define TICK_TAG
Definition: ada-exp.c:603
#define TICK_SIZE
Definition: ada-exp.c:602
#define TICK_RANGE
Definition: ada-exp.c:601
#define TICK_LENGTH
Definition: ada-exp.c:596
#define TICK_MODULUS
Definition: ada-exp.c:599
#define TICK_MIN
Definition: ada-exp.c:598
#define TICK_MAX
Definition: ada-exp.c:597
#define TICK_LAST
Definition: ada-exp.c:595
#define TICK_FIRST
Definition: ada-exp.c:594
#define TICK_ACCESS
Definition: ada-exp.c:592

Referenced by check_xml_btrace_version(), ada_tick_completer::complete(), library_list_start_library(), library_list_start_list(), library_list_start_section(), library_list_start_segment(), memory_map_start_memory(), memory_map_start_property(), osdata_start_column(), osdata_start_osdata(), parse_xml_btrace_block(), parse_xml_btrace_conf_bts(), parse_xml_btrace_conf_pt(), parse_xml_btrace_pt_config_cpu(), processAttribute(), gdb_xml_parser::start_element(), start_thread(), svr4_library_list_start_list(), syscall_start_syscall(), tdesc_start_enum(), tdesc_start_enum_value(), tdesc_start_feature(), tdesc_start_field(), tdesc_start_flags(), tdesc_start_reg(), tdesc_start_struct(), tdesc_start_target(), tdesc_start_union(), tdesc_start_vector(), traceframe_info_start_memory(), traceframe_info_start_tvar(), varobj_get_attributes(), xinclude_start_include(), and xml_find_attribute().

◆ code

int code

Definition at line 688 of file ada-lex.l.

Referenced by ada_array_bound(), ada_array_length(), ada_coerce_ref(), ada_is_redundant_range_encoding(), ada_promote_array_of_integrals(), ada_ternop_slice(), ada_value_print_ptr(), ada_value_subscript(), add_symtab_completions(), alpha_return_value(), amd64_classify(), amd64_windows_return_value(), arch_composite_type(), arch_type(), arm_push_dummy_call(), arm_return_in_memory(), c_print_type_1(), call_xmethod(), cast_into_complex(), check_parameter_typelist(), language_defn::collect_symbol_completion_matches(), ada_language::collect_symbol_completion_matches(), f_language::collect_symbol_completion_matches(), collect_symbol_completion_matches_type(), compile_to_object(), constrained_packed_array_type(), cp_type_print_method_args(), darwin_encode_reply(), decode_constrained_packed_array(), default_collect_symbol_completion_matches_break_on(), desc_data_target_type(), expr::repeat_operation::do_generate_ax(), emit_exiting_event(), eval_op_f_cmplx(), eval_op_f_mod(), eval_op_f_modulo(), eval_op_member(), eval_op_objc_msgcall(), eval_op_rust_complement(), expr::ada_funcall_operation::evaluate(), expr::fortran_undetermined::evaluate(), expr::rust_structop::evaluate_funcall(), evaluate_subexp_do_call(), expr_complete_tag::expr_complete_tag(), fake_method::fake_method(), fbsd_report_signal_info(), fbsd_signal_cause(), find_gnu_ifunc_target_type(), find_overload_match(), fortran_array_size(), fortran_ceil_operation(), fortran_floor_operation(), fortran_preserve_arg_pointer(), gdbpy_convenience_variable(), gdbpy_initialize_breakpoints(), gdbscm_value_referenced_value(), get_number_trailer(), get_ulongest(), get_value_at(), gnuv2_virtual_fn_field(), windows_nat::windows_process_info::handle_exception(), hppa64_convert_code_addr_to_fptr(), i386_reg_struct_return_p(), i386_return_value(), init_type(), is_fixed_point_type(), linespec_parse_variable(), lm32_return_value(), lookup_function_type_with_arguments(), lookup_opencl_vector_type(), loongarch_push_dummy_call(), loongarch_return_value(), m32c_decode_sd23(), m32c_decode_srcdest4(), m32c_reg_arg_type(), m32c_return_by_passed_buf(), m68k_reg_struct_return_p(), m68k_return_value(), m68k_svr4_return_value(), mips_eabi_return_value(), print_command_1(), f_language::print_type(), pascal_language::print_type(), printf_c_string(), rank_one_type_parm_ptr(), read_args(), read_tag_ptr_to_member_type(), read_type(), record_btrace_frame_this_id(), result_type_of_xmethod(), s390_function_arg_integer(), s390_register_return_value(), S_exception_raise_request(), set_internalvar(), set_type_code(), should_validate_memtags(), source_section_scripts(), sparc32_struct_return_from_sym(), struct_return_convention(), pascal_language::type_print_base(), typecmp(), unpack_long(), valpy_referenced_value(), value_as_address(), value_cast_pointers(), value_check_printable(), value_find_oload_method_list(), value_ind(), value_struct_elt(), value_struct_elt_bitpos(), value_x_binop(), value_x_unop(), nbsd_nat_target::wait(), wrap_binop_intrinsic(), wrap_ternop_intrinsic(), wrap_unop_intrinsic(), x_command(), xtensa_window_interrupt_insn(), and z80_get_insn_info().

◆ name

const char* name

Definition at line 688 of file ada-lex.l.

Referenced by processId().

◆ numbuf

char numbuf[NUMERAL_WIDTH]
static

Definition at line 63 of file ada-lex.l.

◆ paren_depth

int paren_depth
static

Definition at line 112 of file ada-lex.l.

Referenced by lexer_init().

◆ returned_complete

bool returned_complete = false
static

Definition at line 86 of file ada-lex.l.

Referenced by lexer_init().