|
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 "go-lang.h"#include "bfd.h"#include "symfile.h"#include "objfiles.h"#include "charset.h"#include "block.h"#include "expop.h"#include "yy-remap.h"#include <limits.h>Go to the source code of this file.
Classes | |
| union | YYSTYPE |
| union | yyalloc |
| struct | token |
| struct | 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 | GDB_YY_REMAP_PREFIX go_ |
| #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 | RAW_STRING 260 |
| #define | STRING 261 |
| #define | CHAR 262 |
| #define | NAME 263 |
| #define | TYPENAME 264 |
| #define | COMPLETE 265 |
| #define | NAME_OR_INT 266 |
| #define | TRUE_KEYWORD 267 |
| #define | FALSE_KEYWORD 268 |
| #define | STRUCT_KEYWORD 269 |
| #define | INTERFACE_KEYWORD 270 |
| #define | TYPE_KEYWORD 271 |
| #define | CHAN_KEYWORD 272 |
| #define | SIZEOF_KEYWORD 273 |
| #define | LEN_KEYWORD 274 |
| #define | CAP_KEYWORD 275 |
| #define | NEW_KEYWORD 276 |
| #define | IOTA_KEYWORD 277 |
| #define | NIL_KEYWORD 278 |
| #define | CONST_KEYWORD 279 |
| #define | DOTDOTDOT 280 |
| #define | ENTRY 281 |
| #define | ERROR 282 |
| #define | BYTE_KEYWORD 283 |
| #define | DOLLAR_VARIABLE 284 |
| #define | ASSIGN_MODIFY 285 |
| #define | ABOVE_COMMA 286 |
| #define | OROR 287 |
| #define | ANDAND 288 |
| #define | ANDNOT 289 |
| #define | EQUAL 290 |
| #define | NOTEQUAL 291 |
| #define | LEQ 292 |
| #define | GEQ 293 |
| #define | LSH 294 |
| #define | RSH 295 |
| #define | UNARY 296 |
| #define | INCREMENT 297 |
| #define | DECREMENT 298 |
| #define | LEFT_ARROW 299 |
| #define | YYSTYPE_IS_TRIVIAL 1 |
| #define | 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 yyalloc) - 1) |
| #define | YYSTACK_BYTES(N) |
| #define | YYCOPY_NEEDED 1 |
| #define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
| #define | YYCOPY(Dst, Src, Count) |
| #define | YYFINAL 40 |
| #define | YYLAST 451 |
| #define | YYNTOKENS 68 |
| #define | YYNNTS 13 |
| #define | YYNRULES 69 |
| #define | YYNSTATES 122 |
| #define | YYMAXUTOK 299 |
| #define | YYTRANSLATE(YYX) |
| #define | YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) |
| #define | YYPACT_NINF (-42) |
| #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 YYSTYPE | YYSTYPE |
| typedef enum yysymbol_kind_t | yysymbol_kind_t |
| typedef signed char | yytype_int8 |
| typedef short | yytype_int16 |
| typedef short | yytype_uint8 |
| typedef int | 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 int | parse_number (struct parser_state *, const char *, int, int, YYSTYPE *) |
| void * | xmalloc (YYSIZE_T) |
| void | xfree (void *) |
| static const char * | yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED |
| static void | yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep) |
| static void | yy_symbol_print (FILE *yyo, yysymbol_kind_t yykind, 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, YYSTYPE *yyvsp, int yyrule) |
| static void | yydestruct (const char *yymsg, yysymbol_kind_t yykind, 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 struct stoken | build_packaged_name (const char *package, int package_len, const char *name, int name_len) |
| static int | package_name_p (const char *name, const struct block *block) |
| static int | classify_unsafe_function (struct stoken function_name) |
| static int | classify_packaged_name (const struct block *block) |
| static int | classify_name (struct parser_state *par_state, const struct block *block) |
Variables | |
| static struct parser_state * | pstate = NULL |
| int | yydebug |
| 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_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 obstack | tempbuf |
| static int | tempbuf_init |
| static const struct token | tokentab3 [] |
| static const struct token | tokentab2 [] |
| static const struct token | ident_tokens [] |
| static int | saw_name_at_eof |
| static int | last_was_structop |
| static int | paren_depth |
| static std::vector< token_and_value > | token_fifo |
| static int | popping |
| static auto_obstack | name_obstack |
| #define parse_type | ( | ps | ) | builtin_type (ps->gdbarch ()) |
| #define YY_ACCESSING_SYMBOL | ( | State | ) | YY_CAST (yysymbol_kind_t, yystos[State]) |
| #define YY_REDUCE_PRINT | ( | Rule | ) |
| #define YY_STACK_PRINT | ( | Bottom, | |
| Top | |||
| ) |
| #define YY_SYMBOL_PRINT | ( | Title, | |
| Kind, | |||
| Value, | |||
| Location | |||
| ) |
| #define YYBACKUP | ( | Token, | |
| Value | |||
| ) |
| #define YYCOPY | ( | Dst, | |
| Src, | |||
| Count | |||
| ) |
| #define YYDPRINTF | ( | Args | ) |
| #define yypact_value_is_default | ( | Yyn | ) | ((Yyn) == YYPACT_NINF) |
| #define YYSIZE_MAXIMUM |
| #define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| #define YYSTACK_BYTES | ( | N | ) |
| #define YYSTACK_RELOCATE | ( | Stack_alloc, | |
| Stack | |||
| ) |
| #define YYTRANSLATE | ( | YYX | ) |
| typedef int yy_state_fast_t |
| typedef yytype_int8 yy_state_t |
| typedef enum yysymbol_kind_t yysymbol_kind_t |
| typedef enum yytokentype yytoken_kind_t |
| typedef short yytype_int16 |
| typedef signed char yytype_int8 |
| typedef int yytype_uint16 |
| typedef short yytype_uint8 |
| enum yysymbol_kind_t |
| enum yytokentype |
|
static |
Definition at line 2834 of file go-exp.c.
References stoken::length, name, name_obstack, and stoken::ptr.
Referenced by classify_name(), and yylex().
|
static |
Definition at line 2922 of file go-exp.c.
References block_symbol::block, build_packaged_name(), copy_name(), expr_builder::gdbarch(), go_block_package_name(), input_radix, INT, symtoken::is_a_field_of_this, expr_builder::language(), language_lookup_primitive_type(), stoken::length, lookup_symbol(), NAME, NAME_OR_INT, parse_number(), stoken::ptr, YYSTYPE::ssym, symtoken::stoken, YYSTYPE::sval, symtoken::sym, block_symbol::symbol, YYSTYPE::tsym, YYSTYPE::type, ttype::type, field_of_this_result::type, TYPENAME, VAR_DOMAIN, xfree(), and yylval.
Referenced by yylex().
|
static |
Definition at line 2895 of file go-exp.c.
References copy_name(), symtoken::is_a_field_of_this, lookup_symbol(), NAME, YYSTYPE::ssym, YYSTYPE::sval, symtoken::sym, block_symbol::symbol, field_of_this_result::type, VAR_DOMAIN, and yylval.
Referenced by yylex().
|
static |
Definition at line 2875 of file go-exp.c.
References copy_name(), SIZEOF_KEYWORD, YYSTYPE::sval, and yylval.
Referenced by yylex().
|
static |
Definition at line 2539 of file go-exp.c.
References CHAR, parser_state::comma_terminates, COMPLETE, copy_name(), DOLLAR_VARIABLE, ENTRY, ERROR, ident_tokens, input_radix, last_was_structop, stoken::length, parser_state::lexptr, NAME, YYSTYPE::opcode, token::opcode, token::oper, paren_depth, parser_state::parse_completion, parse_number(), parse_string_or_char(), parser_state::prev_lexptr, pstate, stoken::ptr, saw_name_at_eof, YYSTYPE::sval, token::token, tokentab2, tokentab3, YYSTYPE::tsval, and yylval.
Referenced by yylex().
|
static |
Definition at line 2855 of file go-exp.c.
References symbol::aclass(), type::code(), LOC_TYPEDEF, lookup_symbol(), name, STRUCT_DOMAIN, block_symbol::symbol, and symbol::type().
Referenced by yylex().
|
static |
Definition at line 2208 of file go-exp.c.
References builtin_go_type::builtin_float32, builtin_go_type::builtin_float64, 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, YYSTYPE::type, YYSTYPE::typed_val_float, YYSTYPE::typed_val_int, and YYSTYPE::val.
Referenced by classify_name(), lex_one_token(), and yyparse().
|
static |
Definition at line 2400 of file go-exp.c.
References C_CHAR, c_parse_escape(), C_STRING, CHAR, STRING, tempbuf, tempbuf_init, and value::type.
Referenced by lex_one_token().
| void xfree | ( | void * | ) |
Referenced by classify_name(), and yyparse().
|
static |
Definition at line 1147 of file go-exp.c.
References YY_ACCESSING_SYMBOL, yy_symbol_print(), YYFPRINTF, yyr2, yyrline, yyrule, yyssp, and yyvsp.
|
static |
|
static |
Definition at line 1108 of file go-exp.c.
References yy_symbol_value_print(), YYFPRINTF, YYNTOKENS, and yysymbol_name().
Referenced by yy_reduce_print().
|
static |
Definition at line 1090 of file go-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 1209 of file go-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 3110 of file go-exp.c.
References parser_state::lexptr, parser_state::prev_lexptr, and pstate.
|
static |
Definition at line 3010 of file go-exp.c.
References build_packaged_name(), classify_name(), classify_packaged_name(), classify_unsafe_function(), copy_name(), parser_state::expression_context_block, stoken::length, lex_one_token(), NAME, package_name_p(), popping, pstate, stoken::ptr, YYSTYPE::sval, token_and_value::token, token_fifo, token_and_value::value, and yylval.
Referenced by yyparse().
| int yyparse | ( | void | ) |
Definition at line 1239 of file go-exp.c.
References parser_state::arglist_len, parser_state::block_tracker, check_typedef(), copy_name(), parser_state::end_arglist(), expr_builder::gdbarch(), have_full_symbols(), have_partial_symbols(), symbol::is_argument(), stoken_vector::len, type::length(), typed_stoken::length, lookup_bound_minimal_symbol(), lookup_pointer_type(), parser_state::mark_struct_expression(), bound_minimal_symbol::minsym, parse_number(), parse_type, parser_state::pop(), parser_state::pop_vector(), pstate, stoken::ptr, typed_stoken::ptr, parser_state::push(), parser_state::push_c_string(), parser_state::push_dollar(), parser_state::push_new(), parser_state::start_arglist(), symbol::symbol(), block_symbol::symbol, symbol_read_needs_frame(), stoken_vector::tokens, YYSTYPE::type, typed_stoken::type, YYSTYPE::typed_val_int, innermost_block_tracker::update(), YYSTYPE::val, 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, 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, yyalloc::yyvs_alloc, and yyvsp.
|
static |
|
static |
Definition at line 2506 of file go-exp.c.
Referenced by lex_one_token().
|
static |
Definition at line 2531 of file go-exp.c.
Referenced by lex_one_token().
|
static |
Definition at line 2827 of file go-exp.c.
Referenced by build_packaged_name().
|
static |
Definition at line 2534 of file go-exp.c.
Referenced by lex_one_token().
|
static |
|
static |
Definition at line 2526 of file go-exp.c.
Referenced by lex_one_token().
|
static |
Definition at line 2389 of file go-exp.c.
Referenced by parse_string_or_char().
|
static |
Definition at line 2390 of file go-exp.c.
Referenced by parse_string_or_char().
|
static |
|
static |
Definition at line 2480 of file go-exp.c.
Referenced by lex_one_token().
|
static |
Definition at line 2472 of file go-exp.c.
Referenced by lex_one_token().
|
static |
|
static |
Definition at line 843 of file go-exp.c.
Referenced by yyparse().
|
static |
| YYSTYPE yylval |
Definition at line 1227 of file go-exp.c.
Referenced by classify_name(), classify_packaged_name(), classify_unsafe_function(), lex_one_token(), yylex(), and yyparse().
|
static |
Definition at line 823 of file go-exp.c.
Referenced by yyparse().
|
static |
|
static |
Definition at line 997 of file go-exp.c.
Referenced by yyparse().
|
static |
Definition at line 1009 of file go-exp.c.
Referenced by yy_reduce_print(), and yyparse().
|
static |
Definition at line 764 of file go-exp.c.
Referenced by yy_reduce_print().
|
static |
|
static |
|
static |
Definition at line 786 of file go-exp.c.
Referenced by yysymbol_name().
|
static |