GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Typedefs | Functions | Variables
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.

Referenced by processAttribute(), and processId().

◆ 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:101
#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
const char * lexptr

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 763 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 633 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 530 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 502 of file ada-lex.l.

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

◆ processString()

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

Definition at line 587 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 754 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 657 of file ada-lex.l.

References subseqMatch().

Referenced by processAttribute(), 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:763

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

◆ [struct]

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 },
{ "enum_rep", TICK_ENUM_REP },
{ "enum_val", TICK_ENUM_VAL },
}
#define TICK_VAL
Definition ada-exp.c:605
#define TICK_ADDRESS
Definition ada-exp.c:594
#define TICK_ENUM_REP
Definition ada-exp.c:606
#define TICK_POS
Definition ada-exp.c:601
#define TICK_TAG
Definition ada-exp.c:604
#define TICK_SIZE
Definition ada-exp.c:603
#define TICK_RANGE
Definition ada-exp.c:602
#define TICK_ENUM_VAL
Definition ada-exp.c:607
#define TICK_LENGTH
Definition ada-exp.c:597
#define TICK_MODULUS
Definition ada-exp.c:600
#define TICK_MIN
Definition ada-exp.c:599
#define TICK_MAX
Definition ada-exp.c:598
#define TICK_LAST
Definition ada-exp.c:596
#define TICK_FIRST
Definition ada-exp.c:595
#define TICK_ACCESS
Definition ada-exp.c:593

Referenced by ada_tick_completer::complete(), processAttribute(), processAttribute(), read_cutu_die_from_dwo(), and varobj_get_attributes().

◆ code

int code

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

Referenced by ada_is_redundant_range_encoding(), add_symtab_completions(), value::allocate_contents(), alpha_return_value(), amd64_classify(), amd64_windows_return_value(), arch_composite_type(), arm_push_dummy_call(), arm_return_in_memory(), c_print_type_1(), value::call_xmethod(), 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(), default_collect_symbol_completion_matches_break_on(), desc_data_target_type(), expr::fortran_undetermined::evaluate(), expr::rust_structop::evaluate_funcall(), expr_complete_tag::expr_complete_tag(), fake_method::fake_method(), fbsd_report_signal_info(), fbsd_signal_cause(), value::fetch_lazy_memory(), find_gnu_ifunc_target_type(), gdbpy_initialize_breakpoints(), get_value_at(), windows_nat::windows_process_info::handle_exception(), hppa64_convert_code_addr_to_fptr(), i386_reg_struct_return_p(), i386_return_value(), is_fixed_point_type(), 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(), type_allocator::new_type(), pending_framepy_create_unwind_info(), f_language::print_type(), pascal_language::print_type(), read_args(), read_tag_ptr_to_member_type(), read_type(), record_btrace_frame_this_id(), value::result_type_of_xmethod(), s390_function_arg_integer(), s390_register_return_value(), S_exception_raise_request(), set_type_code(), should_validate_memtags(), source_section_scripts(), sparc32_struct_return_from_sym(), struct_return_convention(), pascal_language::type_print_base(), typecmp(), typy_repr(), unpack_long(), valpy_referenced_value(), value_ind(), value_x_binop(), value_x_unop(), nbsd_nat_target::wait(), wrap_binop_intrinsic(), wrap_ternop_intrinsic(), wrap_unop_intrinsic(), xtensa_window_interrupt_insn(), and z80_get_insn_info().

◆ name

const char* name

Definition at line 670 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().