GDB (xrefs)
|
#include "defs.h"
#include "gdb_string.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"
Go to the source code of this file.
Classes | |
union | YYSTYPE |
union | yyalloc |
struct | token |
struct | token_and_value |
Defines | |
#define | YYBISON 1 |
#define | YYBISON_VERSION "2.5" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 0 |
#define | YYPUSH 0 |
#define | YYPULL 1 |
#define | YYLSP_NEEDED 0 |
#define | parse_type builtin_type (parse_gdbarch) |
#define | yymaxdepth go_maxdepth |
#define | yyparse go_parse_internal |
#define | yylex go_lex |
#define | yyerror go_error |
#define | yylval go_lval |
#define | yychar go_char |
#define | yydebug go_debug |
#define | yypact go_pact |
#define | yyr1 go_r1 |
#define | yyr2 go_r2 |
#define | yydef go_def |
#define | yychk go_chk |
#define | yypgo go_pgo |
#define | yyact go_act |
#define | yyexca go_exca |
#define | yyerrflag go_errflag |
#define | yynerrs go_nerrs |
#define | yyps go_ps |
#define | yypv go_pv |
#define | yys go_s |
#define | yy_yys go_yys |
#define | yystate go_state |
#define | yytmp go_tmp |
#define | yyv go_v |
#define | yy_yyv go_yyv |
#define | yyval go_val |
#define | yylloc go_lloc |
#define | yyreds go_reds /* With YYDEBUG defined */ |
#define | yytoks go_toks /* With YYDEBUG defined */ |
#define | yyname go_name /* With YYDEBUG defined */ |
#define | yyrule go_rule /* With YYDEBUG defined */ |
#define | yylhs go_yylhs |
#define | yylen go_yylen |
#define | yydefred go_yydefred |
#define | yydgoto go_yydgoto |
#define | yysindex go_yysindex |
#define | yyrindex go_yyrindex |
#define | yygindex go_yygindex |
#define | yytable go_yytable |
#define | yycheck go_yycheck |
#define | YYDEBUG 1 /* Default to yydebug support */ |
#define | YYFPRINTF parser_fprintf |
#define | YYERROR_VERBOSE 0 |
#define | YYTOKEN_TABLE 0 |
#define | YYTOKENTYPE |
#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 | NOTEQUAL 290 |
#define | EQUAL 291 |
#define | GEQ 292 |
#define | LEQ 293 |
#define | RSH 294 |
#define | LSH 295 |
#define | DECREMENT 296 |
#define | INCREMENT 297 |
#define | UNARY 298 |
#define | LEFT_ARROW 299 |
#define | YYSTYPE_IS_TRIVIAL 1 |
#define | yystype YYSTYPE /* obsolescent; will be withdrawn */ |
#define | YYSTYPE_IS_DECLARED 1 |
#define | YYSIZE_T unsigned int |
#define | YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
#define | YY_(msgid) msgid |
#define | YYUSE(e) ((void) (e)) |
#define | YYID(n) (n) |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define | YYMALLOC xmalloc |
#define | YYFREE xfree |
#define | YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY_NEEDED 1 |
#define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
#define | YYCOPY(To, From, Count) |
#define | YYFINAL 40 |
#define | YYLAST 443 |
#define | YYNTOKENS 68 |
#define | YYNNTS 13 |
#define | YYNRULES 69 |
#define | YYNSTATES 122 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 299 |
#define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF -56 |
#define | YYTABLE_NINF -1 |
#define | yypact_value_is_default(yystate) ((yystate) == (-56)) |
#define | yytable_value_is_error(yytable_value) YYID (0) |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYEMPTY (-2) |
#define | YYEOF 0 |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYFAIL goto yyerrlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYTERROR 1 |
#define | YYERRCODE 256 |
#define | YYRHSLOC(Rhs, K) ((Rhs)[K]) |
#define | YYLLOC_DEFAULT(Current, Rhs, N) |
#define | YY_LOCATION_PRINT(File, Loc) ((void) 0) |
#define | YYLEX yylex () |
#define | YYDPRINTF(Args) |
#define | YY_SYMBOL_PRINT(Title, Type, 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 union YYSTYPE | YYSTYPE |
typedef unsigned char | yytype_uint8 |
typedef short int | yytype_int8 |
typedef unsigned short int | yytype_uint16 |
typedef short int | yytype_int16 |
Enumerations | |
enum | yytokentype { INT = 258, NULL_PTR = 259, CHARLIT = 260, FLOAT = 261, TRUEKEYWORD = 262, FALSEKEYWORD = 263, COLONCOLON = 264, STRING = 265, NAME = 266, DOT_ID = 267, DOT_ALL = 268, SPECIAL_VARIABLE = 269, ASSIGN = 270, ELSE = 271, THEN = 272, XOR = 273, OR = 274, _AND_ = 275, DOTDOT = 276, IN = 277, GEQ = 278, LEQ = 279, NOTEQUAL = 280, UNARY = 281, REM = 282, MOD = 283, NOT = 284, ABS = 285, STARSTAR = 286, VAR = 287, ARROW = 288, TICK_LENGTH = 289, TICK_LAST = 290, TICK_FIRST = 291, TICK_ADDRESS = 292, TICK_ACCESS = 293, TICK_MODULUS = 294, TICK_MIN = 295, TICK_MAX = 296, TICK_VAL = 297, TICK_TAG = 298, TICK_SIZE = 299, TICK_RANGE = 300, TICK_POS = 301, NEW = 302, OTHERS = 303, INT = 258, FLOAT = 259, DECFLOAT = 260, STRING = 261, NSSTRING = 262, SELECTOR = 263, CHAR = 264, NAME = 265, UNKNOWN_CPP_NAME = 266, COMPLETE = 267, TYPENAME = 268, CLASSNAME = 269, OBJC_LBRAC = 270, NAME_OR_INT = 271, OPERATOR = 272, STRUCT = 273, CLASS = 274, UNION = 275, ENUM = 276, SIZEOF = 277, UNSIGNED = 278, COLONCOLON = 279, TEMPLATE = 280, ERROR = 281, NEW = 282, DELETE = 283, REINTERPRET_CAST = 284, DYNAMIC_CAST = 285, STATIC_CAST = 286, CONST_CAST = 287, ENTRY = 288, TYPEOF = 289, DECLTYPE = 290, TYPEID = 291, SIGNED_KEYWORD = 292, LONG = 293, SHORT = 294, INT_KEYWORD = 295, CONST_KEYWORD = 296, VOLATILE_KEYWORD = 297, DOUBLE_KEYWORD = 298, VARIABLE = 299, ASSIGN_MODIFY = 300, TRUEKEYWORD = 301, FALSEKEYWORD = 302, ABOVE_COMMA = 303, OROR = 304, ANDAND = 305, NOTEQUAL = 306, EQUAL = 307, GEQ = 308, LEQ = 309, RSH = 310, LSH = 311, DECREMENT = 312, INCREMENT = 313, UNARY = 314, DOT_STAR = 315, ARROW_STAR = 316, ARROW = 317, BLOCKNAME = 318, FILENAME = 319, DOTDOTDOT = 320, INT = 258, FLOAT = 259, NAME = 260, STRUCT = 261, CLASS = 262, UNION = 263, ENUM = 264, SIZEOF = 265, UNSIGNED = 266, COLONCOLON = 267, TEMPLATE = 268, ERROR = 269, NEW = 270, DELETE = 271, OPERATOR = 272, STATIC_CAST = 273, REINTERPRET_CAST = 274, DYNAMIC_CAST = 275, SIGNED_KEYWORD = 276, LONG = 277, SHORT = 278, INT_KEYWORD = 279, CONST_KEYWORD = 280, VOLATILE_KEYWORD = 281, DOUBLE_KEYWORD = 282, BOOL = 283, ELLIPSIS = 284, RESTRICT = 285, VOID = 286, FLOAT_KEYWORD = 287, CHAR = 288, WCHAR_T = 289, ASSIGN_MODIFY = 290, TRUEKEYWORD = 291, FALSEKEYWORD = 292, DEMANGLER_SPECIAL = 293, CONSTRUCTION_VTABLE = 294, CONSTRUCTION_IN = 295, OROR = 296, ANDAND = 297, NOTEQUAL = 298, EQUAL = 299, GEQ = 300, LEQ = 301, RSH = 302, LSH = 303, DECREMENT = 304, INCREMENT = 305, UNARY = 306, ARROW = 307, INT = 258, FLOAT = 259, STRING_LITERAL = 260, BOOLEAN_LITERAL = 261, NAME = 262, TYPENAME = 263, NAME_OR_INT = 264, SIZEOF = 265, ERROR = 266, INT_KEYWORD = 267, INT_S2_KEYWORD = 268, LOGICAL_S1_KEYWORD = 269, LOGICAL_S2_KEYWORD = 270, LOGICAL_S8_KEYWORD = 271, LOGICAL_KEYWORD = 272, REAL_KEYWORD = 273, REAL_S8_KEYWORD = 274, REAL_S16_KEYWORD = 275, COMPLEX_S8_KEYWORD = 276, COMPLEX_S16_KEYWORD = 277, COMPLEX_S32_KEYWORD = 278, BOOL_AND = 279, BOOL_OR = 280, BOOL_NOT = 281, CHARACTER = 282, VARIABLE = 283, ASSIGN_MODIFY = 284, ABOVE_COMMA = 285, NOTEQUAL = 286, EQUAL = 287, GEQ = 288, LEQ = 289, GREATERTHAN = 290, LESSTHAN = 291, RSH = 292, LSH = 293, STARSTAR = 294, UNARY = 295, INT = 258, FLOAT = 259, RAW_STRING = 260, STRING = 261, CHAR = 262, NAME = 263, TYPENAME = 264, COMPLETE = 265, NAME_OR_INT = 266, TRUE_KEYWORD = 267, FALSE_KEYWORD = 268, STRUCT_KEYWORD = 269, INTERFACE_KEYWORD = 270, TYPE_KEYWORD = 271, CHAN_KEYWORD = 272, SIZEOF_KEYWORD = 273, LEN_KEYWORD = 274, CAP_KEYWORD = 275, NEW_KEYWORD = 276, IOTA_KEYWORD = 277, NIL_KEYWORD = 278, CONST_KEYWORD = 279, DOTDOTDOT = 280, ENTRY = 281, ERROR = 282, BYTE_KEYWORD = 283, DOLLAR_VARIABLE = 284, ASSIGN_MODIFY = 285, ABOVE_COMMA = 286, OROR = 287, ANDAND = 288, ANDNOT = 289, NOTEQUAL = 290, EQUAL = 291, GEQ = 292, LEQ = 293, RSH = 294, LSH = 295, DECREMENT = 296, INCREMENT = 297, UNARY = 298, LEFT_ARROW = 299, INTEGER_LITERAL = 258, FLOATING_POINT_LITERAL = 259, IDENTIFIER = 260, STRING_LITERAL = 261, BOOLEAN_LITERAL = 262, TYPENAME = 263, NAME_OR_INT = 264, ERROR = 265, LONG = 266, SHORT = 267, BYTE = 268, INT = 269, CHAR = 270, BOOLEAN = 271, DOUBLE = 272, FLOAT = 273, VARIABLE = 274, ASSIGN_MODIFY = 275, SUPER = 276, NEW = 277, OROR = 278, ANDAND = 279, NOTEQUAL = 280, EQUAL = 281, GEQ = 282, LEQ = 283, RSH = 284, LSH = 285, DECREMENT = 286, INCREMENT = 287, INT = 258, HEX = 259, ERROR = 260, UINT = 261, M2_TRUE = 262, M2_FALSE = 263, CHAR = 264, FLOAT = 265, STRING = 266, NAME = 267, BLOCKNAME = 268, IDENT = 269, VARNAME = 270, TYPENAME = 271, SIZE = 272, CAP = 273, ORD = 274, HIGH = 275, ABS = 276, MIN_FUNC = 277, MAX_FUNC = 278, FLOAT_FUNC = 279, VAL = 280, CHR = 281, ODD = 282, TRUNC = 283, TSIZE = 284, INC = 285, DEC = 286, INCL = 287, EXCL = 288, COLONCOLON = 289, INTERNAL_VAR = 290, ABOVE_COMMA = 291, ASSIGN = 292, IN = 293, NOTEQUAL = 294, GEQ = 295, LEQ = 296, OROR = 297, LOGICAL_AND = 298, MOD = 299, DIV = 300, UNARY = 301, DOT = 302, NOT = 303, QID = 304, INT = 258, FLOAT = 259, STRING = 260, FIELDNAME = 261, COMPLETE = 262, NAME = 263, TYPENAME = 264, NAME_OR_INT = 265, STRUCT = 266, CLASS = 267, SIZEOF = 268, COLONCOLON = 269, ERROR = 270, VARIABLE = 271, THIS = 272, TRUEKEYWORD = 273, FALSEKEYWORD = 274, ABOVE_COMMA = 275, ASSIGN = 276, NOT = 277, OR = 278, XOR = 279, ANDAND = 280, NOTEQUAL = 281, GEQ = 282, LEQ = 283, MOD = 284, DIV = 285, RSH = 286, LSH = 287, DECREMENT = 288, INCREMENT = 289, UNARY = 290, ARROW = 291, BLOCKNAME = 292 } |
Functions | |
int | yyparse (void) |
static int | yylex (void) |
void | yyerror (char *) |
static int | parse_number (const char *, int, int, YYSTYPE *) |
static int | parse_go_float (struct gdbarch *gdbarch, const char *p, int len, DOUBLEST *d, struct type **t) |
static void | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep) |
static void | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep) |
static void | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
static void | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
static void | yydestruct (char *yymsg, int yytype, YYSTYPE *yyvaluep) const |
static int | parse_string_or_char (const char *tokptr, const char **outptr, struct typed_stoken *value, int *host_chars) |
static int | lex_one_token (void) |
DEF_VEC_O (token_and_value) | |
static | VEC (token_and_value) |
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 (const struct block *block) |
int | go_parse (void) |
Variables | |
static const yytype_uint8 | yytranslate [] |
static const yytype_uint8 | yyprhs [] |
static const yytype_int8 | yyrhs [] |
static const yytype_uint16 | yyrline [] |
static const char *const | yytname [] |
static const yytype_uint8 | yyr1 [] |
static const yytype_uint8 | yyr2 [] |
static const yytype_uint8 | yydefact [] |
static const yytype_int8 | yydefgoto [] |
static const yytype_int16 | yypact [] |
static const yytype_int8 | yypgoto [] |
static const yytype_uint8 | yytable [] |
static const yytype_int8 | yycheck [] |
static const yytype_uint8 | yystos [] |
int | yydebug |
int | yychar |
YYSTYPE | yylval |
int | yynerrs |
static struct obstack | tempbuf |
static int | tempbuf_init |
static struct token | tokentab3 [] |
static struct token | tokentab2 [] |
static struct token | ident_tokens [] |
static int | saw_name_at_eof |
static int | last_was_structop |
#define ABOVE_COMMA 286 |
#define ASSIGN_MODIFY 285 |
#define BYTE_KEYWORD 283 |
#define CAP_KEYWORD 275 |
#define CHAN_KEYWORD 272 |
#define CONST_KEYWORD 279 |
#define DOLLAR_VARIABLE 284 |
Definition at line 250 of file go-exp.c.
Referenced by lex_one_token().
#define FALSE_KEYWORD 268 |
#define INTERFACE_KEYWORD 270 |
#define IOTA_KEYWORD 277 |
#define LEFT_ARROW 299 |
#define LEN_KEYWORD 274 |
#define NAME_OR_INT 266 |
#define NEW_KEYWORD 276 |
#define NIL_KEYWORD 278 |
#define parse_type builtin_type (parse_gdbarch) |
Definition at line 87 of file go-exp.c.
Referenced by parse_number().
#define RAW_STRING 260 |
#define SIZEOF_KEYWORD 273 |
Definition at line 239 of file go-exp.c.
Referenced by classify_unsafe_function().
#define STRUCT_KEYWORD 269 |
#define TRUE_KEYWORD 267 |
#define TYPE_KEYWORD 271 |
#define YY_LOCATION_PRINT | ( | File, | |
Loc | |||
) | ((void) 0) |
#define YY_REDUCE_PRINT | ( | Rule | ) |
#define YY_STACK_PRINT | ( | Bottom, | |
Top | |||
) |
#define YY_SYMBOL_PRINT | ( | Title, | |
Type, | |||
Value, | |||
Location | |||
) |
do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0))
Definition at line 989 of file go-exp.c.
Referenced by yydestruct().
#define YYBACKUP | ( | Token, | |
Value | |||
) |
#define YYBISON_VERSION "2.5" |
#define YYCOPY | ( | To, | |
From, | |||
Count | |||
) |
#define YYCOPY_NEEDED 1 |
#define YYDPRINTF | ( | Args | ) |
#define YYERROR_VERBOSE 0 |
#define YYFPRINTF parser_fprintf |
Definition at line 141 of file go-exp.c.
Referenced by yy_reduce_print(), yy_stack_print(), and yy_symbol_print().
#define YYINITDEPTH 200 |
#define YYLLOC_DEFAULT | ( | Current, | |
Rhs, | |||
N | |||
) |
do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0))
#define YYLSP_NEEDED 0 |
#define yymaxdepth go_maxdepth |
#define YYMAXDEPTH 10000 |
#define YYNTOKENS 68 |
Definition at line 540 of file go-exp.c.
Referenced by yy_symbol_print(), and yy_symbol_value_print().
#define YYPACT_NINF -56 |
#define yypact_value_is_default | ( | yystate | ) | ((yystate) == (-56)) |
#define YYPOPSTACK | ( | N | ) | (yyvsp -= (N), yyssp -= (N)) |
#define YYRECOVERING | ( | ) | (!!yyerrstatus) |
Definition at line 126 of file go-exp.c.
Referenced by yy_reduce_print().
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
#define YYSKELETON_NAME "yacc.c" |
#define YYSTACK_ALLOC YYMALLOC |
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define YYSTACK_BYTES | ( | N | ) |
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM)
#define YYSTACK_FREE YYFREE |
#define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define YYSTACK_RELOCATE | ( | Stack_alloc, | |
Stack | |||
) |
do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0))
#define YYSTYPE_IS_DECLARED 1 |
#define YYSTYPE_IS_TRIVIAL 1 |
#define YYTABLE_NINF -1 |
#define yytable_value_is_error | ( | yytable_value | ) | YYID (0) |
#define YYTOKEN_TABLE 0 |
#define YYTOKENTYPE |
#define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define YYUNDEFTOK 2 |
#define YYUSE | ( | e | ) | ((void) (e)) |
Definition at line 382 of file go-exp.c.
Referenced by yy_symbol_value_print(), and yydestruct().
typedef short int yytype_int16 |
typedef short int yytype_int8 |
typedef unsigned short int yytype_uint16 |
typedef unsigned char yytype_uint8 |
enum yytokentype |
static int classify_name | ( | const struct block * | block | ) | [static] |
Definition at line 3291 of file go-exp.c.
References copy_name(), go_block_package_name(), input_radix, INT, symtoken::is_a_field_of_this, language_lookup_primitive_type_by_name(), stoken::length, lookup_symbol(), NAME, NAME_OR_INT, parse_gdbarch, parse_language, parse_number(), stoken::ptr, YYSTYPE::ssym, symtoken::stoken, YYSTYPE::sval, symtoken::sym, YYSTYPE::tsym, ttype::type, type, field_of_this_result::type, TYPENAME, VAR_DOMAIN, and xfree().
Referenced by classify_inner_name(), and yylex().
static int classify_packaged_name | ( | const struct block * | block | ) | [static] |
Definition at line 3263 of file go-exp.c.
References copy_name(), symtoken::is_a_field_of_this, lookup_symbol(), NAME, YYSTYPE::ssym, YYSTYPE::sval, symtoken::sym, field_of_this_result::type, and VAR_DOMAIN.
Referenced by yylex().
static int classify_unsafe_function | ( | struct stoken | function_name | ) | [static] |
Definition at line 3243 of file go-exp.c.
References _, copy_name(), error(), SIZEOF_KEYWORD, and YYSTYPE::sval.
Referenced by yylex().
Definition at line 3452 of file go-exp.c.
References do_cleanups(), make_cleanup(), make_cleanup_obstack_free(), make_cleanup_restore_integer(), null_cleanup(), parser_debug, VEC_free, and yyparse.
static int lex_one_token | ( | void | ) | [static] |
Definition at line 2904 of file go-exp.c.
References _, CHAR, comma_terminates, COMPLETE, copy_name(), DOLLAR_VARIABLE, ENTRY, ERROR, error(), ident_tokens, input_radix, last_was_structop, len, stoken::length, lexptr, memcpy(), NAME, YYSTYPE::opcode, token::opcode, p, paren_depth, parse_completion, parse_number(), parse_string_or_char(), prev_lexptr, stoken::ptr, YYSTYPE::sval, token::token, tokentab2, tokentab3, and YYSTYPE::tsval.
Referenced by yylex().
static int package_name_p | ( | const char * | name, |
const struct block * | block | ||
) | [static] |
Definition at line 3223 of file go-exp.c.
References LOC_TYPEDEF, lookup_symbol(), STRUCT_DOMAIN, SYMBOL_CLASS, SYMBOL_TYPE, TYPE_CODE, and TYPE_CODE_MODULE.
Referenced by yylex().
static int parse_go_float | ( | struct gdbarch * | gdbarch, |
const char * | p, | ||
int | len, | ||
DOUBLEST * | d, | ||
struct type ** | t | ||
) | [static] |
Definition at line 2539 of file go-exp.c.
References builtin_type::builtin_double, builtin_type::builtin_float, builtin_go_type::builtin_float32, builtin_go_type::builtin_float64, builtin_go_type(), builtin_type(), and parse_c_float().
Referenced by parse_number().
Definition at line 2564 of file go-exp.c.
References _, YYSTYPE::dval, ERROR, error(), FLOAT, gdbarch_int_bit(), gdbarch_long_bit(), gdbarch_long_long_bit(), HOST_CHAR_BIT, input_radix, INT, LONGEST, parse_gdbarch, parse_go_float(), parse_type, YYSTYPE::type, YYSTYPE::typed_val_float, YYSTYPE::typed_val_int, ULONGEST, and YYSTYPE::val.
Referenced by classify_name(), and lex_one_token().
static int parse_string_or_char | ( | const char * | tokptr, |
const char ** | outptr, | ||
struct typed_stoken * | value, | ||
int * | host_chars | ||
) | [static] |
Definition at line 2768 of file go-exp.c.
References _, C_CHAR, c_parse_escape(), C_STRING, CHAR, error(), typed_stoken::length, typed_stoken::ptr, STRING, tempbuf, and typed_stoken::type.
Referenced by lex_one_token().
static VEC | ( | token_and_value | ) | [static] |
static void yy_reduce_print | ( | YYSTYPE * | yyvsp, |
int | yyrule | ||
) | [static] |
Definition at line 1101 of file go-exp.c.
References yy_symbol_print(), YYFPRINTF, and yyrule.
static void yy_stack_print | ( | yytype_int16 * | yybottom, |
yytype_int16 * | yytop | ||
) | [static] |
static void yy_symbol_print | ( | FILE * | yyoutput, |
int | yytype, | ||
YYSTYPE const * const | yyvaluep | ||
) | [static] |
Definition at line 1044 of file go-exp.c.
References yy_symbol_value_print(), YYFPRINTF, and YYNTOKENS.
Referenced by yy_reduce_print().
static void yy_symbol_value_print | ( | FILE * | yyoutput, |
int | yytype, | ||
YYSTYPE const * const | yyvaluep | ||
) | [static] |
static void yydestruct | ( | char * | yymsg, |
int | yytype, | ||
YYSTYPE * | yyvaluep | ||
) | const [static] |
Definition at line 1405 of file go-exp.c.
References YY_SYMBOL_PRINT, and YYUSE.
void yyerror | ( | char * | msg | ) |
Definition at line 3376 of file go-exp.c.
References classify_name(), classify_packaged_name(), classify_unsafe_function(), copy_name(), expression_context_block, stoken::length, lex_one_token(), NAME, package_name_p(), stoken::ptr, YYSTYPE::sval, token_and_value::token, token_and_value::value, VEC_empty, VEC_index, VEC_ordered_remove, VEC_safe_push, and yylval.
struct token ident_tokens[] [static] |
{ {"true", TRUE_KEYWORD, OP_NULL}, {"false", FALSE_KEYWORD, OP_NULL}, {"nil", NIL_KEYWORD, OP_NULL}, {"const", CONST_KEYWORD, OP_NULL}, {"struct", STRUCT_KEYWORD, OP_NULL}, {"type", TYPE_KEYWORD, OP_NULL}, {"interface", INTERFACE_KEYWORD, OP_NULL}, {"chan", CHAN_KEYWORD, OP_NULL}, {"byte", BYTE_KEYWORD, OP_NULL}, {"len", LEN_KEYWORD, OP_NULL}, {"cap", CAP_KEYWORD, OP_NULL}, {"new", NEW_KEYWORD, OP_NULL}, {"iota", IOTA_KEYWORD, OP_NULL}, }
Definition at line 2874 of file go-exp.c.
Referenced by lex_one_token().
int last_was_structop [static] |
Definition at line 2899 of file go-exp.c.
Referenced by lex_one_token().
int saw_name_at_eof [static] |
struct obstack tempbuf [static] |
Definition at line 2757 of file go-exp.c.
Referenced by parse_string_or_char().
int tempbuf_init [static] |
{ {"+=", ASSIGN_MODIFY, BINOP_ADD}, {"-=", ASSIGN_MODIFY, BINOP_SUB}, {"*=", ASSIGN_MODIFY, BINOP_MUL}, {"/=", ASSIGN_MODIFY, BINOP_DIV}, {"%=", ASSIGN_MODIFY, BINOP_REM}, {"|=", ASSIGN_MODIFY, BINOP_BITWISE_IOR}, {"&=", ASSIGN_MODIFY, BINOP_BITWISE_AND}, {"^=", ASSIGN_MODIFY, BINOP_BITWISE_XOR}, {"++", INCREMENT, BINOP_END}, {"--", DECREMENT, BINOP_END}, {"<-", LEFT_ARROW, BINOP_END}, {"&&", ANDAND, BINOP_END}, {"||", OROR, BINOP_END}, {"<<", LSH, BINOP_END}, {">>", RSH, BINOP_END}, {"==", EQUAL, BINOP_END}, {"!=", NOTEQUAL, BINOP_END}, {"<=", LEQ, BINOP_END}, {">=", GEQ, BINOP_END}, }
Definition at line 2848 of file go-exp.c.
Referenced by lex_one_token().
{ {">>=", ASSIGN_MODIFY, BINOP_RSH}, {"<<=", ASSIGN_MODIFY, BINOP_LSH}, {"...", DOTDOTDOT, OP_NULL}, }
Definition at line 2840 of file go-exp.c.
Referenced by lex_one_token().
const yytype_int8 yycheck[] [static] |
const yytype_uint8 yydefact[] [static] |
{ 0, 51, 54, 59, 52, 69, 67, 53, 62, 63, 0, 68, 56, 0, 0, 0, 0, 0, 0, 0, 21, 0, 3, 2, 5, 0, 61, 55, 4, 65, 0, 12, 0, 8, 10, 9, 7, 66, 0, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 13, 0, 0, 19, 0, 0, 0, 0, 64, 0, 0, 28, 6, 50, 49, 0, 47, 46, 45, 44, 43, 38, 37, 41, 42, 40, 39, 36, 35, 29, 33, 34, 30, 31, 32, 17, 15, 0, 22, 66, 25, 0, 60, 0, 58, 57, 0, 16, 18, 23, 0, 26, 27, 48, 0, 20, 24 }
const yytype_int8 yydefgoto[] [static] |
const yytype_int16 yypact[] [static] |
{ 49, -56, -56, -56, -56, -56, -56, -56, -56, -56, -44, -56, -56, 49, 49, 49, 49, 49, 49, 49, -56, 23, -56, 34, 187, 45, -23, -56, 6, 46, 49, -48, 6, -48, -48, -48, -48, 6, 38, -48, -56, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, -56, -56, 5, 49, -56, 45, 8, 65, 49, -56, 123, -55, -56, 187, 187, 187, 88, 239, 263, 286, 308, 328, 346, 346, 360, 360, 360, 360, 372, 372, 383, -34, -34, -48, -48, -48, -56, 69, 33, 49, -56, -56, 49, -56, 155, -56, -56, 49, -56, -56, 187, 39, -48, -56, 214, 49, -56, 187 }
const yytype_int8 yypgoto[] [static] |
const yytype_uint8 yyprhs[] [static] |
{ 0, 0, 3, 5, 7, 9, 11, 15, 18, 21, 24, 27, 30, 33, 36, 39, 43, 48, 52, 57, 58, 64, 66, 67, 69, 73, 75, 80, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, 145, 149, 153, 157, 161, 165, 171, 175, 179, 181, 183, 185, 187, 189, 191, 196, 201, 203, 207, 209, 211, 213, 216, 218, 221, 223, 225 }
const yytype_uint8 yyr1[] [static] |
{ 0, 68, 69, 69, 70, 71, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 72, 74, 75, 75, 75, 76, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 77, 77, 72, 72, 72, 78, 78, 79, 79, 79, 80 }
const yytype_uint8 yyr2[] [static] |
const yytype_int8 yyrhs[] [static] |
{ 69, 0, -1, 71, -1, 70, -1, 79, -1, 72, -1, 71, 31, 72, -1, 52, 72, -1, 39, 72, -1, 51, 72, -1, 50, 72, -1, 62, 72, -1, 38, 72, -1, 72, 56, -1, 72, 55, -1, 72, 58, 80, -1, 72, 58, 80, 10, -1, 72, 58, 10, -1, 72, 59, 71, 63, -1, -1, 72, 60, 73, 75, 64, -1, 65, -1, -1, 72, -1, 75, 31, 72, -1, 66, -1, 74, 79, 76, 72, -1, 79, 60, 72, 64, -1, 60, 71, 64, -1, 72, 49, 72, -1, 72, 52, 72, -1, 72, 53, 72, -1, 72, 54, 72, -1, 72, 50, 72, -1, 72, 51, 72, -1, 72, 48, 72, -1, 72, 47, 72, -1, 72, 42, 72, -1, 72, 41, 72, -1, 72, 46, 72, -1, 72, 45, 72, -1, 72, 43, 72, -1, 72, 44, 72, -1, 72, 39, 72, -1, 72, 38, 72, -1, 72, 37, 72, -1, 72, 36, 72, -1, 72, 35, 72, -1, 72, 34, 72, 67, 72, -1, 72, 33, 72, -1, 72, 30, 72, -1, 3, -1, 7, -1, 11, -1, 4, -1, 78, -1, 29, -1, 18, 60, 79, 64, -1, 18, 60, 72, 64, -1, 6, -1, 77, 50, 6, -1, 77, -1, 12, -1, 13, -1, 80, 26, -1, 80, -1, 52, 79, -1, 9, -1, 28, -1, 8, -1 }
const yytype_uint16 yyrline[] [static] |
{ 0, 237, 237, 238, 241, 248, 249, 254, 258, 262, 266, 270, 274, 278, 282, 288, 294, 301, 311, 318, 315, 325, 329, 332, 336, 340, 344, 350, 356, 362, 366, 370, 374, 378, 382, 386, 390, 394, 398, 402, 406, 410, 414, 418, 422, 426, 430, 434, 438, 442, 446, 452, 459, 468, 481, 488, 491, 497, 509, 516, 533, 551, 562, 568, 574, 590, 645, 647, 654, 667 }
const yytype_uint8 yystos[] [static] |
{ 0, 3, 4, 6, 7, 8, 9, 11, 12, 13, 18, 28, 29, 38, 39, 50, 51, 52, 60, 62, 65, 69, 70, 71, 72, 74, 77, 78, 79, 80, 60, 72, 79, 72, 72, 72, 72, 79, 71, 72, 0, 31, 30, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 52, 79, 50, 60, 26, 72, 79, 64, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 10, 80, 71, 73, 79, 66, 76, 6, 72, 64, 64, 67, 10, 63, 72, 75, 72, 64, 72, 31, 64, 72 }
const yytype_uint8 yytable[] [static] |
{ "$end", "error", "$undefined", "INT", "FLOAT", "RAW_STRING", "STRING", "CHAR", "NAME", "TYPENAME", "COMPLETE", "NAME_OR_INT", "TRUE_KEYWORD", "FALSE_KEYWORD", "STRUCT_KEYWORD", "INTERFACE_KEYWORD", "TYPE_KEYWORD", "CHAN_KEYWORD", "SIZEOF_KEYWORD", "LEN_KEYWORD", "CAP_KEYWORD", "NEW_KEYWORD", "IOTA_KEYWORD", "NIL_KEYWORD", "CONST_KEYWORD", "DOTDOTDOT", "ENTRY", "ERROR", "BYTE_KEYWORD", "DOLLAR_VARIABLE", "ASSIGN_MODIFY", "','", "ABOVE_COMMA", "'='", "'?'", "OROR", "ANDAND", "'|'", "'^'", "'&'", "ANDNOT", "NOTEQUAL", "EQUAL", "'<'", "'>'", "GEQ", "LEQ", "RSH", "LSH", "'@'", "'+'", "'-'", "'*'", "'/'", "'%'", "DECREMENT", "INCREMENT", "UNARY", "'.'", "'['", "'('", "LEFT_ARROW", "'!'", "']'", "')'", "'{'", "'}'", "':'", "$accept", "start", "type_exp", "exp1", "exp", "$@1", "lcurly", "arglist", "rcurly", "string_exp", "variable", "type", "name_not_typename", 0 }
const yytype_uint8 yytranslate[] [static] |