GDB (xrefs)
|
#include "defs.h"
#include <ctype.h>
#include "expression.h"
#include "value.h"
#include "parser-defs.h"
#include "language.h"
#include "p-lang.h"
#include "block.h"
#include "expop.h"
#include "yy-remap.h"
#include <limits.h>
Go to the source code of this file.
Classes | |
union | p_exp_YYSTYPE |
union | p_exp_yyalloc |
struct | type_push |
struct | p_token |
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 | GDB_YY_REMAP_PREFIX pascal_ |
#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 | INT 258 |
#define | FLOAT 259 |
#define | STRING 260 |
#define | FIELDNAME 261 |
#define | COMPLETE 262 |
#define | NAME 263 |
#define | TYPENAME 264 |
#define | NAME_OR_INT 265 |
#define | STRUCT 266 |
#define | CLASS 267 |
#define | SIZEOF 268 |
#define | COLONCOLON 269 |
#define | ERROR 270 |
#define | DOLLAR_VARIABLE 271 |
#define | THIS 272 |
#define | TRUEKEYWORD 273 |
#define | FALSEKEYWORD 274 |
#define | ABOVE_COMMA 275 |
#define | ASSIGN 276 |
#define | NOT 277 |
#define | OR 278 |
#define | XOR 279 |
#define | ANDAND 280 |
#define | NOTEQUAL 281 |
#define | LEQ 282 |
#define | GEQ 283 |
#define | LSH 284 |
#define | RSH 285 |
#define | DIV 286 |
#define | MOD 287 |
#define | UNARY 288 |
#define | INCREMENT 289 |
#define | DECREMENT 290 |
#define | ARROW 291 |
#define | BLOCKNAME 292 |
#define | p_exp_YYSTYPE_IS_TRIVIAL 1 |
#define | p_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 p_exp_yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY_NEEDED 1 |
#define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
#define | YYCOPY(Dst, Src, Count) |
#define | YYFINAL 3 |
#define | YYLAST 377 |
#define | YYNTOKENS 53 |
#define | YYNNTS 20 |
#define | YYNRULES 77 |
#define | YYNSTATES 126 |
#define | YYMAXUTOK 292 |
#define | YYTRANSLATE(YYX) |
#define | YY_ACCESSING_SYMBOL(State) YY_CAST (p_exp_yysymbol_kind_t, yystos[State]) |
#define | YYPACT_NINF (-44) |
#define | yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) |
#define | YYTABLE_NINF (-61) |
#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 p_exp_YYSTYPE | p_exp_YYSTYPE |
typedef enum p_exp_yysymbol_kind_t | p_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_int8 | yy_state_t |
typedef int | yy_state_fast_t |
Functions | |
int | yyparse (void) |
static int | yylex (void) |
static void | yyerror (const char *) |
static char * | uptok (const char *, int) |
static int | parse_number (struct parser_state *, const char *, int, int, p_exp_YYSTYPE *) |
static void | push_current_type (void) |
static void | pop_current_type (void) |
void * | xmalloc (YYSIZE_T) |
void | xfree (void *) |
static const char * | yysymbol_name (p_exp_yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED |
static void | yy_symbol_value_print (FILE *yyo, p_exp_yysymbol_kind_t yykind, p_exp_YYSTYPE const *const yyvaluep) |
static void | yy_symbol_print (FILE *yyo, p_exp_yysymbol_kind_t yykind, p_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, p_exp_YYSTYPE *yyvsp, int yyrule) |
static void | yydestruct (const char *yymsg, p_exp_yysymbol_kind_t yykind, p_exp_YYSTYPE *yyvaluep) |
Variables | |
static struct parser_state * | pstate = NULL |
static int | paren_depth |
int | yydebug |
p_exp_YYSTYPE | yylval |
static struct type * | current_type |
static int | leftdiv_is_integer |
static int | search_field |
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_int8 | yydefgoto [] |
static const yytype_int8 | yytable [] |
static const yytype_int8 | yycheck [] |
static const yytype_int8 | yystos [] |
static const yytype_int8 | yyr1 [] |
static const yytype_int8 | yyr2 [] |
int | yychar |
int | yynerrs |
static struct type_push * | tp_top = NULL |
static const struct p_token | tokentab3 [] |
static const struct p_token | tokentab2 [] |
#define ERROR 270 |
Definition at line 204 of file p-exp.c.
Referenced by parse_number(), and yylex().
#define FLOAT 259 |
Definition at line 193 of file p-exp.c.
Referenced by parse_number().
#define INT 258 |
Definition at line 192 of file p-exp.c.
Referenced by parse_number(), and yylex().
#define parse_type | ( | ps | ) | builtin_type (ps->gdbarch ()) |
Definition at line 83 of file p-exp.c.
Referenced by parse_number(), yylex(), and yyparse().
#define YY_ACCESSING_SYMBOL | ( | State | ) | YY_CAST (p_exp_yysymbol_kind_t, yystos[State]) |
Accessing symbol of state STATE.
Definition at line 764 of file p-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 539 of file p-exp.c.
Referenced by yy_symbol_value_print(), yydestruct(), and yyparse().
#define YY_IGNORE_MAYBE_UNINITIALIZED_END |
Definition at line 540 of file p-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 1043 of file p-exp.c.
Referenced by yydestruct(), and yyparse().
#define YY_USE | ( | E | ) | ((void) (E)) |
Definition at line 516 of file p-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 53 |
Definition at line 693 of file p-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 p_exp_yyalloc) - 1) |
#define YYSTACK_RELOCATE | ( | Stack_alloc, | |
Stack ) |
Definition at line 654 of file p-exp.c.
Referenced by yyparse().
#define yytable_value_is_error | ( | Yyn | ) | 0 |
#define YYTRANSLATE | ( | YYX | ) |
typedef enum p_exp_yysymbol_kind_t p_exp_yysymbol_kind_t |
typedef int yy_state_fast_t |
typedef yytype_int8 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 2362 of file p-exp.c.
References ERROR, fits_in_type(), FLOAT, expr_builder::gdbarch(), gdbarch_int_bit(), gdbarch_long_bit(), gdbarch_long_long_bit(), input_radix, INT, parse_float(), parse_type, p_exp_YYSTYPE::type, p_exp_YYSTYPE::typed_val_float, p_exp_YYSTYPE::typed_val_int, and p_exp_YYSTYPE::val.
|
static |
Definition at line 2550 of file p-exp.c.
References current_type, type_push::next, type_push::stored, tp_top, and xfree().
Referenced by yyparse().
|
static |
Definition at line 2539 of file p-exp.c.
References current_type, type_push::next, type_push::stored, tp_top, and xmalloc().
Referenced by yyparse().
|
static |
void xfree | ( | void * | ) |
Referenced by pop_current_type(), and yylex().
void * xmalloc | ( | YYSIZE_T | ) |
Referenced by push_current_type(), and uptok().
|
static |
Definition at line 1117 of file p-exp.c.
References YY_ACCESSING_SYMBOL, yy_symbol_print(), YYFPRINTF, yyr2, yyrline, yyrule, yyssp, and yyvsp.
|
static |
|
static |
Definition at line 1078 of file p-exp.c.
References yy_symbol_value_print(), YYFPRINTF, YYNTOKENS, and yysymbol_name().
Referenced by yy_reduce_print().
|
static |
Definition at line 1060 of file p-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 1179 of file p-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 3225 of file p-exp.c.
References parser_state::lexptr, parser_state::prev_lexptr, and pstate.
|
static |
Definition at line 2611 of file p-exp.c.
References symbol::aclass(), block_symbol::block, BLOCKNAME, CLASS, parser_state::comma_terminates, COMPLETE, copy_name(), current_type, DOLLAR_VARIABLE, ERROR, parser_state::expression_context_block, FALSEKEYWORD, FIELDNAME, expr_builder::gdbarch(), input_radix, INT, symtoken::is_a_field_of_this, expr_builder::language(), language_lookup_primitive_type(), stoken::length, parser_state::lexptr, LOC_BLOCK, LOC_TYPEDEF, lookup_struct_elt_type(), lookup_symbol(), lookup_symtab(), p_exp_YYSTYPE::lval, NAME, NAME_OR_INT, p_exp_YYSTYPE::opcode, paren_depth, parser_state::parse_completion, parse_escape(), parse_number(), parse_type, parser_state::prev_lexptr, pstate, stoken::ptr, search_field, SIZEOF, skip_quoted(), p_exp_YYSTYPE::ssym, STRING, STRUCT, p_exp_YYSTYPE::sval, symtoken::sym, block_symbol::symbol, tempbuf, tempbufindex, tempbufsize, THIS, token, tokentab2, tokentab3, TRUEKEYWORD, p_exp_YYSTYPE::tsym, p_exp_YYSTYPE::type, ttype::type, symbol::type(), field_of_this_result::type, p_exp_YYSTYPE::typed_val_int, TYPENAME, uptok(), p_exp_YYSTYPE::val, VAR_DOMAIN, xfree(), xrealloc(), and yylval.
Referenced by yyparse().
int yyparse | ( | void | ) |
Definition at line 1209 of file p-exp.c.
References symbol::aclass(), parser_state::arglist_len, parser_state::block_tracker, compunit_symtab::blockvector(), check_typedef(), type::code(), symtab::compunit(), copy_name(), current_type, parser_state::end_arglist(), parser_state::expression_context_block, type::field(), expr_builder::gdbarch(), have_full_symbols(), have_partial_symbols(), is_integral_type(), expr_builder::language(), leftdiv_is_integer, LOC_BLOCK, lookup_bound_minimal_symbol(), lookup_only_internalvar(), lookup_pointer_type(), lookup_struct(), lookup_struct_elt_type(), lookup_symbol(), lookup_symtab(), parser_state::mark_struct_expression(), bound_minimal_symbol::minsym, name, type::name(), parse_number(), parse_type, pascal_is_string_type(), parser_state::pop(), pop_current_type(), parser_state::pop_vector(), pstate, stoken::ptr, parser_state::push(), push_current_type(), parser_state::push_dollar(), parser_state::push_new(), parser_state::push_symbol(), search_field, parser_state::start_arglist(), blockvector::static_block(), block_symbol::symbol, symbol_read_needs_frame(), type::target_type(), field::type(), type, p_exp_YYSTYPE::type, symbol::type(), value::type(), TYPE_POINTER_TYPE, p_exp_YYSTYPE::typed_val_int, innermost_block_tracker::update(), p_exp_YYSTYPE::val, symbol::value_block(), value_of_internalvar(), value_of_this_silent(), VAR_DOMAIN, parser_state::wrap(), parser_state::wrap2(), 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, p_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, p_exp_yyalloc::yyvs_alloc, and yyvsp.
|
static |
|
static |
Definition at line 361 of file p-exp.c.
Referenced by pop_current_type(), push_current_type(), yylex(), and yyparse().
|
static |
|
static |
|
static |
|
static |
Definition at line 2568 of file p-exp.c.
Referenced by yylex().
|
static |
Definition at line 2536 of file p-exp.c.
Referenced by pop_current_type(), and push_current_type().
|
static |
|
static |
Definition at line 827 of file p-exp.c.
Referenced by yyparse().
|
static |
p_exp_YYSTYPE yylval |
|
static |
Definition at line 807 of file p-exp.c.
Referenced by yyparse().
|
static |
|
static |
Definition at line 965 of file p-exp.c.
Referenced by yyparse().
|
static |
Definition at line 978 of file p-exp.c.
Referenced by yy_reduce_print(), and yyparse().
|
static |
Definition at line 750 of file p-exp.c.
Referenced by yy_reduce_print().
|
static |
|
static |
|
static |
Definition at line 773 of file p-exp.c.
Referenced by yysymbol_name().
|
static |