GDB (xrefs)
|
#include "defs.h"
#include <ctype.h>
#include "expression.h"
#include "value.h"
#include "parser-defs.h"
#include "language.h"
#include "c-lang.h"
#include "d-lang.h"
#include "charset.h"
#include "block.h"
#include "type-stack.h"
#include "expop.h"
#include "yy-remap.h"
#include <limits.h>
Go to the source code of this file.
Classes | |
union | d_exp_YYSTYPE |
union | d_exp_yyalloc |
struct | d_token |
struct | d_token_and_value |
Macros | |
#define | YYBISON 30802 |
#define | YYBISON_VERSION "3.8.2" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 0 |
#define | YYPUSH 0 |
#define | YYPULL 1 |
#define | parse_type(ps) builtin_type (ps->gdbarch ()) |
#define | parse_d_type(ps) builtin_d_type (ps->gdbarch ()) |
#define | GDB_YY_REMAP_PREFIX d_ |
#define | YY_CAST(Type, Val) ((Type) (Val)) |
#define | YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) |
#define | YY_NULLPTRPTR ((void*)0) |
#define | YYTOKENTYPE |
#define | YYEMPTY -2 |
#define | YYEOF 0 |
#define | YYerror 256 |
#define | YYUNDEF 257 |
#define | IDENTIFIER 258 |
#define | UNKNOWN_NAME 259 |
#define | TYPENAME 260 |
#define | COMPLETE 261 |
#define | NAME_OR_INT 262 |
#define | INTEGER_LITERAL 263 |
#define | FLOAT_LITERAL 264 |
#define | CHARACTER_LITERAL 265 |
#define | STRING_LITERAL 266 |
#define | ENTRY 267 |
#define | ERROR 268 |
#define | TRUE_KEYWORD 269 |
#define | FALSE_KEYWORD 270 |
#define | NULL_KEYWORD 271 |
#define | SUPER_KEYWORD 272 |
#define | CAST_KEYWORD 273 |
#define | SIZEOF_KEYWORD 274 |
#define | TYPEOF_KEYWORD 275 |
#define | TYPEID_KEYWORD 276 |
#define | INIT_KEYWORD 277 |
#define | IMMUTABLE_KEYWORD 278 |
#define | CONST_KEYWORD 279 |
#define | SHARED_KEYWORD 280 |
#define | STRUCT_KEYWORD 281 |
#define | UNION_KEYWORD 282 |
#define | CLASS_KEYWORD 283 |
#define | INTERFACE_KEYWORD 284 |
#define | ENUM_KEYWORD 285 |
#define | TEMPLATE_KEYWORD 286 |
#define | DELEGATE_KEYWORD 287 |
#define | FUNCTION_KEYWORD 288 |
#define | DOLLAR_VARIABLE 289 |
#define | ASSIGN_MODIFY 290 |
#define | OROR 291 |
#define | ANDAND 292 |
#define | EQUAL 293 |
#define | NOTEQUAL 294 |
#define | LEQ 295 |
#define | GEQ 296 |
#define | LSH 297 |
#define | RSH 298 |
#define | HATHAT 299 |
#define | IDENTITY 300 |
#define | NOTIDENTITY 301 |
#define | INCREMENT 302 |
#define | DECREMENT 303 |
#define | DOTDOT 304 |
#define | d_exp_YYSTYPE_IS_TRIVIAL 1 |
#define | d_exp_YYSTYPE_IS_DECLARED 1 |
#define | YYPTRDIFF_T long |
#define | YYPTRDIFF_MAXIMUM LONG_MAX |
#define | YYSIZE_T unsigned |
#define | YYSIZE_MAXIMUM |
#define | YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) |
#define | YY_(Msgid) Msgid |
#define | YY_ATTRIBUTE_PURE |
#define | YY_ATTRIBUTE_UNUSED |
#define | YY_USE(E) ((void) (E)) |
#define | YY_INITIAL_VALUE(Value) Value |
#define | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
#define | YY_IGNORE_MAYBE_UNINITIALIZED_END |
#define | YY_IGNORE_USELESS_CAST_BEGIN |
#define | YY_IGNORE_USELESS_CAST_END |
#define | YY_ASSERT(E) ((void) (0 && (E))) |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define | YYMALLOC xmalloc |
#define | YYFREE xfree |
#define | YYSTACK_GAP_MAXIMUM (YYSIZEOF (union d_exp_yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY_NEEDED 1 |
#define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
#define | YYCOPY(Dst, Src, Count) |
#define | YYFINAL 70 |
#define | YYLAST 200 |
#define | YYNTOKENS 71 |
#define | YYNNTS 35 |
#define | YYNRULES 104 |
#define | YYNSTATES 169 |
#define | YYMAXUTOK 304 |
#define | YYTRANSLATE(YYX) |
#define | YY_ACCESSING_SYMBOL(State) YY_CAST (d_exp_yysymbol_kind_t, yystos[State]) |
#define | YYPACT_NINF (-91) |
#define | yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) |
#define | YYTABLE_NINF (-1) |
#define | yytable_value_is_error(Yyn) 0 |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYNOMEM goto yyexhaustedlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYERRCODE YYUNDEF |
#define | YYDPRINTF(Args) |
#define | YY_SYMBOL_PRINT(Title, Kind, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
Typedefs | |
typedef enum yytokentype | yytoken_kind_t |
typedef union d_exp_YYSTYPE | d_exp_YYSTYPE |
typedef enum d_exp_yysymbol_kind_t | d_exp_yysymbol_kind_t |
typedef signed char | yytype_int8 |
typedef short | yytype_int16 |
typedef unsigned char | yytype_uint8 |
typedef unsigned short | yytype_uint16 |
typedef yytype_uint8 | yy_state_t |
typedef int | yy_state_fast_t |
Functions | |
int | yyparse (void) |
static int | yylex (void) |
static void | yyerror (const char *) |
static int | type_aggregate_p (struct type *) |
static int | parse_number (struct parser_state *, const char *, int, int, d_exp_YYSTYPE *) |
void * | xmalloc (YYSIZE_T) |
void | xfree (void *) |
static const char * | yysymbol_name (d_exp_yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED |
static void | yy_symbol_value_print (FILE *yyo, d_exp_yysymbol_kind_t yykind, d_exp_YYSTYPE const *const yyvaluep) |
static void | yy_symbol_print (FILE *yyo, d_exp_yysymbol_kind_t yykind, d_exp_YYSTYPE const *const yyvaluep) |
static void | yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) |
static void | yy_reduce_print (yy_state_t *yyssp, d_exp_YYSTYPE *yyvsp, int yyrule) |
static void | yydestruct (const char *yymsg, d_exp_yysymbol_kind_t yykind, d_exp_YYSTYPE *yyvaluep) |
static int | parse_string_or_char (const char *tokptr, const char **outptr, struct typed_stoken *value, int *host_chars) |
static int | lex_one_token (struct parser_state *par_state) |
static int | classify_name (struct parser_state *par_state, const struct block *block) |
static int | classify_inner_name (struct parser_state *par_state, const struct block *block, struct type *context) |
int | d_parse (struct parser_state *par_state) |
Variables | |
static struct parser_state * | pstate = NULL |
static struct type_stack * | type_stack |
int | yydebug |
d_exp_YYSTYPE | yylval |
static const yytype_int8 | yytranslate [] |
static const yytype_int16 | yyrline [] |
static const char *const | yytname [] |
static const yytype_int16 | yypact [] |
static const yytype_int8 | yydefact [] |
static const yytype_int8 | yypgoto [] |
static const yytype_uint8 | yydefgoto [] |
static const yytype_uint8 | yytable [] |
static const yytype_int16 | yycheck [] |
static const yytype_int8 | yystos [] |
static const yytype_int8 | yyr1 [] |
static const yytype_int8 | yyr2 [] |
int | yychar |
int | yynerrs |
static struct obstack | tempbuf |
static int | tempbuf_init |
static const struct d_token | tokentab3 [] |
static const struct d_token | tokentab2 [] |
static const struct d_token | ident_tokens [] |
static int | saw_name_at_eof |
static int | last_was_structop |
static int | paren_depth |
static std::vector< d_token_and_value > | token_fifo |
static int | popping |
static auto_obstack | name_obstack |
#define CHARACTER_LITERAL 265 |
Definition at line 216 of file d-exp.c.
Referenced by lex_one_token(), and parse_string_or_char().
#define COMPLETE 261 |
Definition at line 212 of file d-exp.c.
Referenced by lex_one_token().
#define DOLLAR_VARIABLE 289 |
Definition at line 240 of file d-exp.c.
Referenced by lex_one_token().
#define ENTRY 267 |
Definition at line 218 of file d-exp.c.
Referenced by lex_one_token().
#define ERROR 268 |
Definition at line 219 of file d-exp.c.
Referenced by classify_inner_name(), lex_one_token(), and parse_number().
#define FLOAT_LITERAL 264 |
Definition at line 215 of file d-exp.c.
Referenced by parse_number().
#define IDENTIFIER 258 |
Definition at line 209 of file d-exp.c.
Referenced by classify_inner_name(), classify_name(), lex_one_token(), and yylex().
#define INTEGER_LITERAL 263 |
Definition at line 214 of file d-exp.c.
Referenced by lex_one_token(), and parse_number().
#define NAME_OR_INT 262 |
Definition at line 213 of file d-exp.c.
Referenced by lex_one_token().
#define parse_d_type | ( | ps | ) | builtin_d_type (ps->gdbarch ()) |
Definition at line 87 of file d-exp.c.
Referenced by parse_number(), and yyparse().
#define parse_type | ( | ps | ) | builtin_type (ps->gdbarch ()) |
#define STRING_LITERAL 266 |
Definition at line 217 of file d-exp.c.
Referenced by parse_string_or_char().
#define TYPENAME 260 |
Definition at line 211 of file d-exp.c.
Referenced by classify_inner_name(), classify_name(), lex_one_token(), and yylex().
#define UNKNOWN_NAME 259 |
Definition at line 210 of file d-exp.c.
Referenced by classify_name(), and yylex().
#define YY_ACCESSING_SYMBOL | ( | State | ) | YY_CAST (d_exp_yysymbol_kind_t, yystos[State]) |
Accessing symbol of state STATE.
Definition at line 821 of file d-exp.c.
Referenced by yy_reduce_print(), and yyparse().
#define YY_ASSERT | ( | E | ) | ((void) (0 && (E))) |
#define YY_CAST | ( | Type, | |
Val ) ((Type) (Val)) |
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Definition at line 592 of file d-exp.c.
Referenced by yy_symbol_value_print(), yydestruct(), and yyparse().
#define YY_IGNORE_MAYBE_UNINITIALIZED_END |
Definition at line 593 of file d-exp.c.
Referenced by yy_symbol_value_print(), yydestruct(), and yyparse().
#define YY_IGNORE_USELESS_CAST_BEGIN |
#define YY_REDUCE_PRINT | ( | Rule | ) |
#define YY_STACK_PRINT | ( | Bottom, | |
Top ) |
#define YY_SYMBOL_PRINT | ( | Title, | |
Kind, | |||
Value, | |||
Location ) |
Definition at line 1099 of file d-exp.c.
Referenced by yydestruct(), and yyparse().
#define YY_USE | ( | E | ) | ((void) (E)) |
Definition at line 569 of file d-exp.c.
Referenced by yy_symbol_value_print(), and yydestruct().
#define YYBACKUP | ( | Token, | |
Value ) |
#define YYCOPY | ( | Dst, | |
Src, | |||
Count ) |
#define YYDPRINTF | ( | Args | ) |
#define YYNOMEM goto yyexhaustedlab |
#define YYNTOKENS 71 |
Definition at line 746 of file d-exp.c.
Referenced by yy_symbol_print(), and yyparse().
#define yypact_value_is_default | ( | Yyn | ) | ((Yyn) == YYPACT_NINF) |
#define YYSIZE_MAXIMUM |
#define YYSIZEOF | ( | X | ) | YY_CAST (YYPTRDIFF_T, sizeof (X)) |
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define YYSTACK_BYTES | ( | N | ) |
#define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union d_exp_yyalloc) - 1) |
#define YYSTACK_RELOCATE | ( | Stack_alloc, | |
Stack ) |
Definition at line 707 of file d-exp.c.
Referenced by yyparse().
#define yytable_value_is_error | ( | Yyn | ) | 0 |
#define YYTRANSLATE | ( | YYX | ) |
typedef enum d_exp_yysymbol_kind_t d_exp_yysymbol_kind_t |
typedef int yy_state_fast_t |
typedef yytype_uint8 yy_state_t |
typedef enum yytokentype yytoken_kind_t |
typedef short yytype_int16 |
typedef signed char yytype_int8 |
typedef unsigned short yytype_uint16 |
typedef unsigned char yytype_uint8 |
enum yytokentype |
|
static |
Definition at line 3066 of file d-exp.c.
References symbol::aclass(), check_typedef(), classify_name(), copy_name(), d_lookup_nested_symbol(), ERROR, IDENTIFIER, LOC_TYPEDEF, d_exp_YYSTYPE::ssym, symtoken::stoken, symtoken::sym, block_symbol::symbol, d_exp_YYSTYPE::tsym, type, ttype::type, symbol::type(), type_aggregate_p(), TYPENAME, and yylval.
Referenced by yylex().
|
static |
Definition at line 3029 of file d-exp.c.
References symbol::aclass(), copy_name(), IDENTIFIER, LOC_TYPEDEF, lookup_symbol(), MODULE_DOMAIN, STRUCT_DOMAIN, d_exp_YYSTYPE::sval, block_symbol::symbol, d_exp_YYSTYPE::tsym, ttype::type, symbol::type(), TYPENAME, UNKNOWN_NAME, VAR_DOMAIN, and yylval.
Referenced by classify_inner_name(), and yylex().
int d_parse | ( | struct parser_state * | par_state | ) |
Definition at line 3298 of file d-exp.c.
References parser_state::debug, last_was_structop, name_obstack, paren_depth, parser_state::pop(), popping, pstate, saw_name_at_eof, expr_builder::set_operation(), token_fifo, yydebug, and yyparse().
Referenced by d_language::parser().
|
static |
Definition at line 2719 of file d-exp.c.
References CHARACTER_LITERAL, parser_state::comma_terminates, COMPLETE, copy_name(), DOLLAR_VARIABLE, ENTRY, ERROR, expr_builder::gdbarch(), ident_tokens, IDENTIFIER, input_radix, INTEGER_LITERAL, expr_builder::language(), language_lookup_primitive_type(), last_was_structop, stoken::length, parser_state::lexptr, NAME_OR_INT, d_exp_YYSTYPE::opcode, paren_depth, parser_state::parse_completion, parse_number(), parse_string_or_char(), parser_state::prev_lexptr, pstate, stoken::ptr, saw_name_at_eof, d_exp_YYSTYPE::sval, token, tokentab2, tokentab3, d_exp_YYSTYPE::tsval, d_exp_YYSTYPE::tsym, ttype::type, TYPENAME, and yylval.
Referenced by yylex().
|
static |
Definition at line 2345 of file d-exp.c.
References ERROR, FLOAT_LITERAL, input_radix, INTEGER_LITERAL, n2, parse_d_type, parse_float(), d_exp_YYSTYPE::type, d_exp_YYSTYPE::typed_val_float, d_exp_YYSTYPE::typed_val_int, and d_exp_YYSTYPE::val.
Referenced by lex_one_token(), and yyparse().
|
static |
Definition at line 2564 of file d-exp.c.
References C_CHAR, c_parse_escape(), C_STRING, CHARACTER_LITERAL, STRING_LITERAL, tempbuf, tempbuf_init, and value::type().
Referenced by lex_one_token().
|
static |
Definition at line 2329 of file d-exp.c.
References type::code(), and type::is_declared_class().
Referenced by classify_inner_name(), and yyparse().
void xfree | ( | void * | ) |
Referenced by yyparse().
|
static |
Definition at line 1173 of file d-exp.c.
References YY_ACCESSING_SYMBOL, yy_symbol_print(), YYFPRINTF, yyr2, yyrline, yyrule, yyssp, and yyvsp.
|
static |
|
static |
Definition at line 1134 of file d-exp.c.
References yy_symbol_value_print(), YYFPRINTF, YYNTOKENS, and yysymbol_name().
Referenced by yy_reduce_print().
|
static |
Definition at line 1116 of file d-exp.c.
References YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, and YY_USE.
Referenced by yy_symbol_print().
|
static |
Definition at line 1235 of file d-exp.c.
References YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_SYMBOL_PRINT, and YY_USE.
Referenced by yyparse().
|
static |
Definition at line 3328 of file d-exp.c.
References parser_state::lexptr, parser_state::prev_lexptr, and pstate.
|
static |
Definition at line 3101 of file d-exp.c.
References classify_inner_name(), classify_name(), parser_state::expression_context_block, IDENTIFIER, stoken::length, lex_one_token(), name_obstack, popping, pstate, stoken::ptr, d_exp_YYSTYPE::sval, d_token_and_value::token, token_fifo, d_exp_YYSTYPE::tsym, ttype::type, TYPENAME, UNKNOWN_NAME, d_token_and_value::value, and yylval.
Referenced by yyparse().
int yyparse | ( | void | ) |
Definition at line 1265 of file d-exp.c.
References symbol::aclass(), parser_state::arglist_len, parser_state::block_tracker, check_typedef(), type::code(), copy_name(), parser_state::end_arglist(), parser_state::expression_context_block, type_stack::follow_types(), have_full_symbols(), have_partial_symbols(), stoken_vector::len, type::length(), typed_stoken::length, LOC_TYPEDEF, lookup_bound_minimal_symbol(), lookup_pointer_type(), lookup_symbol(), parser_state::mark_struct_expression(), bound_minimal_symbol::minsym, name, parse_d_type, parse_number(), parser_state::pop(), parser_state::pop_vector(), pstate, typed_stoken::ptr, type_stack::push(), parser_state::push(), parser_state::push_c_string(), parser_state::push_dollar(), parser_state::push_new(), parser_state::push_symbol(), parser_state::start_arglist(), block_symbol::symbol, symbol_read_needs_frame(), stoken_vector::tokens, tp_array, tp_pointer, d_exp_YYSTYPE::type, type, typed_stoken::type, field_of_this_result::type, type_aggregate_p(), TYPE_SAFE_NAME, d_exp_YYSTYPE::typed_val_int, innermost_block_tracker::update(), d_exp_YYSTYPE::val, VAR_DOMAIN, parser_state::wrap(), parser_state::wrap2(), xfree(), xmalloc(), YY_, YY_ACCESSING_SYMBOL, YY_ASSERT, YY_CAST, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_IGNORE_USELESS_CAST_BEGIN, YY_IGNORE_USELESS_CAST_END, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, YYerror, YYERROR, yyerror, YYFINAL, YYINITDEPTH, YYLAST, yylen, yylex(), yylhs, yylloc, yylval, YYMAXDEPTH, yynerrs, YYNOMEM, YYNSTATES, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, YYPTRDIFF_T, yyr1, yyr2, YYSIZE_T, YYSIZEOF, yyss, d_exp_yyalloc::yyss_alloc, yyssp, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystacksize, yystate, YYSYMBOL_YYEMPTY, YYSYMBOL_YYEOF, YYSYMBOL_YYerror, yytable, yytable_value_is_error, YYTRANSLATE, YYUNDEF, yyval, yyvs, d_exp_yyalloc::yyvs_alloc, and yyvsp.
Referenced by d_parse().
|
static |
|
static |
Definition at line 2674 of file d-exp.c.
Referenced by lex_one_token().
|
static |
Definition at line 2711 of file d-exp.c.
Referenced by d_parse(), and lex_one_token().
|
static |
|
static |
Definition at line 2714 of file d-exp.c.
Referenced by d_parse(), and lex_one_token().
|
static |
|
static |
Definition at line 2707 of file d-exp.c.
Referenced by d_parse(), and lex_one_token().
|
static |
Definition at line 2553 of file d-exp.c.
Referenced by parse_string_or_char().
|
static |
Definition at line 2554 of file d-exp.c.
Referenced by parse_string_or_char().
|
static |
|
static |
Definition at line 2649 of file d-exp.c.
Referenced by lex_one_token().
|
static |
Definition at line 2642 of file d-exp.c.
Referenced by lex_one_token().
|
static |
Definition at line 966 of file d-exp.c.
Referenced by yyparse().
|
static |
Definition at line 899 of file d-exp.c.
Referenced by yyparse().
|
static |
d_exp_YYSTYPE yylval |
Definition at line 1253 of file d-exp.c.
Referenced by classify_inner_name(), classify_name(), lex_one_token(), yylex(), and yyparse().
|
static |
Definition at line 875 of file d-exp.c.
Referenced by yyparse().
|
static |
|
static |
Definition at line 1015 of file d-exp.c.
Referenced by yyparse().
|
static |
Definition at line 1031 of file d-exp.c.
Referenced by yy_reduce_print(), and yyparse().
|
static |
Definition at line 804 of file d-exp.c.
Referenced by yy_reduce_print().
|
static |
|
static |
Definition at line 941 of file d-exp.c.
Referenced by yyparse().
|
static |
Definition at line 830 of file d-exp.c.
Referenced by yysymbol_name().
|
static |