GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
go-exp.c File Reference
#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 "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  go_exp_YYSTYPE
 
union  go_exp_yyalloc
 
struct  go_token
 
struct  go_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 go_exp_YYSTYPE_IS_TRIVIAL   1
 
#define go_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 go_exp_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 (go_exp_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 go_exp_YYSTYPE go_exp_YYSTYPE
 
typedef enum go_exp_yysymbol_kind_t go_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
 

Enumerations

enum  yytokentype {
  YYEMPTY = -2 , YYEOF = 0 , YYerror = 256 , YYUNDEF = 257 ,
  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 ,
  EQUAL = 290 , NOTEQUAL = 291 , LEQ = 292 , GEQ = 293 ,
  LSH = 294 , RSH = 295 , UNARY = 296 , INCREMENT = 297 ,
  DECREMENT = 298 , LEFT_ARROW = 299
}
 
enum  go_exp_yysymbol_kind_t {
  YYSYMBOL_YYEMPTY = -2 , YYSYMBOL_YYEOF = 0 , YYSYMBOL_YYerror = 1 , YYSYMBOL_YYUNDEF = 2 ,
  YYSYMBOL_INT = 3 , YYSYMBOL_FLOAT = 4 , YYSYMBOL_RAW_STRING = 5 , YYSYMBOL_STRING = 6 ,
  YYSYMBOL_CHAR = 7 , YYSYMBOL_NAME = 8 , YYSYMBOL_TYPENAME = 9 , YYSYMBOL_COMPLETE = 10 ,
  YYSYMBOL_NAME_OR_INT = 11 , YYSYMBOL_TRUE_KEYWORD = 12 , YYSYMBOL_FALSE_KEYWORD = 13 , YYSYMBOL_STRUCT_KEYWORD = 14 ,
  YYSYMBOL_INTERFACE_KEYWORD = 15 , YYSYMBOL_TYPE_KEYWORD = 16 , YYSYMBOL_CHAN_KEYWORD = 17 , YYSYMBOL_SIZEOF_KEYWORD = 18 ,
  YYSYMBOL_LEN_KEYWORD = 19 , YYSYMBOL_CAP_KEYWORD = 20 , YYSYMBOL_NEW_KEYWORD = 21 , YYSYMBOL_IOTA_KEYWORD = 22 ,
  YYSYMBOL_NIL_KEYWORD = 23 , YYSYMBOL_CONST_KEYWORD = 24 , YYSYMBOL_DOTDOTDOT = 25 , YYSYMBOL_ENTRY = 26 ,
  YYSYMBOL_ERROR = 27 , YYSYMBOL_BYTE_KEYWORD = 28 , YYSYMBOL_DOLLAR_VARIABLE = 29 , YYSYMBOL_ASSIGN_MODIFY = 30 ,
  YYSYMBOL_31_ = 31 , YYSYMBOL_ABOVE_COMMA = 32 , YYSYMBOL_33_ = 33 , YYSYMBOL_34_ = 34 ,
  YYSYMBOL_OROR = 35 , YYSYMBOL_ANDAND = 36 , YYSYMBOL_37_ = 37 , YYSYMBOL_38_ = 38 ,
  YYSYMBOL_39_ = 39 , YYSYMBOL_ANDNOT = 40 , YYSYMBOL_EQUAL = 41 , YYSYMBOL_NOTEQUAL = 42 ,
  YYSYMBOL_43_ = 43 , YYSYMBOL_44_ = 44 , YYSYMBOL_LEQ = 45 , YYSYMBOL_GEQ = 46 ,
  YYSYMBOL_LSH = 47 , YYSYMBOL_RSH = 48 , YYSYMBOL_49_ = 49 , YYSYMBOL_50_ = 50 ,
  YYSYMBOL_51_ = 51 , YYSYMBOL_52_ = 52 , YYSYMBOL_53_ = 53 , YYSYMBOL_54_ = 54 ,
  YYSYMBOL_UNARY = 55 , YYSYMBOL_INCREMENT = 56 , YYSYMBOL_DECREMENT = 57 , YYSYMBOL_LEFT_ARROW = 58 ,
  YYSYMBOL_59_ = 59 , YYSYMBOL_60_ = 60 , YYSYMBOL_61_ = 61 , YYSYMBOL_62_ = 62 ,
  YYSYMBOL_63_ = 63 , YYSYMBOL_64_ = 64 , YYSYMBOL_65_ = 65 , YYSYMBOL_66_ = 66 ,
  YYSYMBOL_67_ = 67 , YYSYMBOL_YYACCEPT = 68 , YYSYMBOL_start = 69 , YYSYMBOL_type_exp = 70 ,
  YYSYMBOL_exp1 = 71 , YYSYMBOL_exp = 72 , YYSYMBOL_73_1 = 73 , YYSYMBOL_lcurly = 74 ,
  YYSYMBOL_arglist = 75 , YYSYMBOL_rcurly = 76 , YYSYMBOL_string_exp = 77 , YYSYMBOL_variable = 78 ,
  YYSYMBOL_type = 79 , YYSYMBOL_name_not_typename = 80
}
 
enum  { YYENOMEM = -2 }
 

Functions

int yyparse (void)
 
static int yylex (void)
 
static void yyerror (const char *)
 
static int parse_number (struct parser_state *, const char *, int, int, go_exp_YYSTYPE *)
 
void * xmalloc (YYSIZE_T)
 
void xfree (void *)
 
static const char * yysymbol_name (go_exp_yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED
 
static void yy_symbol_value_print (FILE *yyo, go_exp_yysymbol_kind_t yykind, go_exp_YYSTYPE const *const yyvaluep)
 
static void yy_symbol_print (FILE *yyo, go_exp_yysymbol_kind_t yykind, go_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, go_exp_YYSTYPE *yyvsp, int yyrule)
 
static void yydestruct (const char *yymsg, go_exp_yysymbol_kind_t yykind, go_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 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_statepstate = NULL
 
int yydebug
 
go_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_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 go_token tokentab3 []
 
static const struct go_token tokentab2 []
 
static const struct go_token ident_tokens []
 
static int saw_name_at_eof
 
static int last_was_structop
 
static int paren_depth
 
static std::vector< go_token_and_valuetoken_fifo
 
static int popping
 
static auto_obstack name_obstack
 

Macro Definition Documentation

◆ ABOVE_COMMA

#define ABOVE_COMMA   286

Definition at line 223 of file go-exp.c.

◆ ANDAND

#define ANDAND   288

Definition at line 225 of file go-exp.c.

◆ ANDNOT

#define ANDNOT   289

Definition at line 226 of file go-exp.c.

◆ ASSIGN_MODIFY

#define ASSIGN_MODIFY   285

Definition at line 222 of file go-exp.c.

◆ BYTE_KEYWORD

#define BYTE_KEYWORD   283

Definition at line 220 of file go-exp.c.

◆ CAP_KEYWORD

#define CAP_KEYWORD   275

Definition at line 212 of file go-exp.c.

◆ CHAN_KEYWORD

#define CHAN_KEYWORD   272

Definition at line 209 of file go-exp.c.

◆ CHAR

#define CHAR   262

Definition at line 199 of file go-exp.c.

Referenced by lex_one_token(), and parse_string_or_char().

◆ COMPLETE

#define COMPLETE   265

Definition at line 202 of file go-exp.c.

Referenced by lex_one_token().

◆ CONST_KEYWORD

#define CONST_KEYWORD   279

Definition at line 216 of file go-exp.c.

◆ DECREMENT

#define DECREMENT   298

Definition at line 235 of file go-exp.c.

◆ DOLLAR_VARIABLE

#define DOLLAR_VARIABLE   284

Definition at line 221 of file go-exp.c.

Referenced by lex_one_token().

◆ DOTDOTDOT

#define DOTDOTDOT   280

Definition at line 217 of file go-exp.c.

◆ ENTRY

#define ENTRY   281

Definition at line 218 of file go-exp.c.

Referenced by lex_one_token().

◆ EQUAL

#define EQUAL   290

Definition at line 227 of file go-exp.c.

◆ ERROR

#define ERROR   282

Definition at line 219 of file go-exp.c.

Referenced by lex_one_token(), and parse_number().

◆ FALSE_KEYWORD

#define FALSE_KEYWORD   268

Definition at line 205 of file go-exp.c.

◆ FLOAT

#define FLOAT   259

Definition at line 196 of file go-exp.c.

Referenced by parse_number().

◆ GDB_YY_REMAP_PREFIX

#define GDB_YY_REMAP_PREFIX   go_

Definition at line 89 of file go-exp.c.

◆ GEQ

#define GEQ   293

Definition at line 230 of file go-exp.c.

◆ go_exp_YYSTYPE_IS_DECLARED

#define go_exp_YYSTYPE_IS_DECLARED   1

Definition at line 269 of file go-exp.c.

◆ go_exp_YYSTYPE_IS_TRIVIAL

#define go_exp_YYSTYPE_IS_TRIVIAL   1

Definition at line 268 of file go-exp.c.

◆ INCREMENT

#define INCREMENT   297

Definition at line 234 of file go-exp.c.

◆ INT

#define INT   258

Definition at line 195 of file go-exp.c.

Referenced by classify_name(), and parse_number().

◆ INTERFACE_KEYWORD

#define INTERFACE_KEYWORD   270

Definition at line 207 of file go-exp.c.

◆ IOTA_KEYWORD

#define IOTA_KEYWORD   277

Definition at line 214 of file go-exp.c.

◆ LEFT_ARROW

#define LEFT_ARROW   299

Definition at line 236 of file go-exp.c.

◆ LEN_KEYWORD

#define LEN_KEYWORD   274

Definition at line 211 of file go-exp.c.

◆ LEQ

#define LEQ   292

Definition at line 229 of file go-exp.c.

◆ LSH

#define LSH   294

Definition at line 231 of file go-exp.c.

◆ NAME

#define NAME   263

Definition at line 200 of file go-exp.c.

Referenced by classify_name(), classify_packaged_name(), lex_one_token(), and yylex().

◆ NAME_OR_INT

#define NAME_OR_INT   266

Definition at line 203 of file go-exp.c.

Referenced by classify_name().

◆ NEW_KEYWORD

#define NEW_KEYWORD   276

Definition at line 213 of file go-exp.c.

◆ NIL_KEYWORD

#define NIL_KEYWORD   278

Definition at line 215 of file go-exp.c.

◆ NOTEQUAL

#define NOTEQUAL   291

Definition at line 228 of file go-exp.c.

◆ OROR

#define OROR   287

Definition at line 224 of file go-exp.c.

◆ parse_type

#define parse_type ( ps)    builtin_type (ps->gdbarch ())

Definition at line 85 of file go-exp.c.

Referenced by parse_number(), and yyparse().

◆ RAW_STRING

#define RAW_STRING   260

Definition at line 197 of file go-exp.c.

◆ RSH

#define RSH   295

Definition at line 232 of file go-exp.c.

◆ SIZEOF_KEYWORD

#define SIZEOF_KEYWORD   273

Definition at line 210 of file go-exp.c.

Referenced by classify_unsafe_function().

◆ STRING

#define STRING   261

Definition at line 198 of file go-exp.c.

Referenced by parse_string_or_char().

◆ STRUCT_KEYWORD

#define STRUCT_KEYWORD   269

Definition at line 206 of file go-exp.c.

◆ TRUE_KEYWORD

#define TRUE_KEYWORD   267

Definition at line 204 of file go-exp.c.

◆ TYPE_KEYWORD

#define TYPE_KEYWORD   271

Definition at line 208 of file go-exp.c.

◆ TYPENAME

#define TYPENAME   264

Definition at line 201 of file go-exp.c.

Referenced by classify_name().

◆ UNARY

#define UNARY   296

Definition at line 233 of file go-exp.c.

◆ YY_

#define YY_ ( Msgid)    Msgid

Definition at line 504 of file go-exp.c.

Referenced by yyparse().

◆ YY_ACCESSING_SYMBOL

#define YY_ACCESSING_SYMBOL ( State)    YY_CAST (go_exp_yysymbol_kind_t, yystos[State])

Accessing symbol of state STATE.

Definition at line 774 of file go-exp.c.

Referenced by yy_reduce_print(), and yyparse().

◆ YY_ASSERT

#define YY_ASSERT ( E)    ((void) (0 && (E)))

Definition at line 570 of file go-exp.c.

Referenced by yyparse().

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 513 of file go-exp.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 521 of file go-exp.c.

◆ YY_CAST

#define YY_CAST ( Type,
Val )   ((Type) (Val))

Definition at line 111 of file go-exp.c.

Referenced by yyparse().

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 550 of file go-exp.c.

Referenced by yy_symbol_value_print(), yydestruct(), and yyparse().

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 551 of file go-exp.c.

Referenced by yy_symbol_value_print(), yydestruct(), and yyparse().

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 565 of file go-exp.c.

Referenced by yyparse().

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 566 of file go-exp.c.

Referenced by yyparse().

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE ( Value)    Value

Definition at line 547 of file go-exp.c.

◆ YY_NULLPTRPTR

#define YY_NULLPTRPTR   ((void*)0)

Definition at line 123 of file go-exp.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT ( Rule)
Value:
do { \
if (yydebug) \
yy_reduce_print (yyssp, yyvsp, Rule); \
} while (0)
int yydebug
Definition go-exp.c:1171
#define yyvsp
Definition yy-remap.h:87
#define yyssp
Definition yy-remap.h:84

Definition at line 1163 of file go-exp.c.

Referenced by yyparse().

◆ YY_REINTERPRET_CAST

#define YY_REINTERPRET_CAST ( Type,
Val )   ((Type) (Val))

Definition at line 112 of file go-exp.c.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT ( Bottom,
Top )
Value:
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
} while (0)

Definition at line 1132 of file go-exp.c.

Referenced by yyparse().

◆ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT ( Title,
Kind,
Value,
Location )
Value:
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Kind, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)

Definition at line 1070 of file go-exp.c.

Referenced by yydestruct(), and yyparse().

◆ YY_USE

#define YY_USE ( E)    ((void) (E))

Definition at line 527 of file go-exp.c.

Referenced by yy_symbol_value_print(), and yydestruct().

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 1024 of file go-exp.c.

Referenced by yyparse().

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 1023 of file go-exp.c.

Referenced by yyparse().

◆ YYBACKUP

#define YYBACKUP ( Token,
Value )
Value:
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
} \
while (0)
#define YY_(Msgid)
Definition go-exp.c:504
go_exp_YYSTYPE yylval
Definition go-exp.c:1224
int yychar
Definition go-exp.c:1221
#define YYEMPTY
Definition go-exp.c:191
#define YYERROR
Definition go-exp.c:1025
#define yylen
Definition yy-remap.h:74
#define yystate
Definition yy-remap.h:63

Definition at line 1031 of file go-exp.c.

◆ YYBISON

#define YYBISON   30802

Definition at line 49 of file go-exp.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.8.2"

Definition at line 52 of file go-exp.c.

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 1021 of file go-exp.c.

◆ YYCOPY

#define YYCOPY ( Dst,
Src,
Count )
Value:
do \
{ \
YYPTRDIFF_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)
#define YYPTRDIFF_T
Definition go-exp.c:463

Definition at line 686 of file go-exp.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 658 of file go-exp.c.

◆ YYDPRINTF

#define YYDPRINTF ( Args)
Value:
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (0)
#define YYFPRINTF
Definition yy-remap.h:97

Definition at line 1061 of file go-exp.c.

Referenced by yyparse().

◆ YYEMPTY

#define YYEMPTY   -2

Definition at line 191 of file go-exp.c.

Referenced by yyparse().

◆ YYEOF

#define YYEOF   0

Definition at line 192 of file go-exp.c.

Referenced by yyparse().

◆ YYERRCODE

#define YYERRCODE   YYUNDEF

Definition at line 1050 of file go-exp.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 1020 of file go-exp.c.

◆ YYerror

#define YYerror   256

Definition at line 193 of file go-exp.c.

Referenced by yyparse().

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 1025 of file go-exp.c.

Referenced by yyparse().

◆ YYFINAL

#define YYFINAL   40

Definition at line 699 of file go-exp.c.

Referenced by yyparse().

◆ YYFREE

#define YYFREE   xfree

Definition at line 630 of file go-exp.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1182 of file go-exp.c.

Referenced by yyparse().

◆ YYLAST

#define YYLAST   451

Definition at line 701 of file go-exp.c.

Referenced by yyparse().

◆ YYMALLOC

#define YYMALLOC   xmalloc

Definition at line 624 of file go-exp.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 1193 of file go-exp.c.

Referenced by yyparse().

◆ YYMAXUTOK

#define YYMAXUTOK   299

Definition at line 713 of file go-exp.c.

◆ YYNNTS

#define YYNNTS   13

Definition at line 706 of file go-exp.c.

◆ YYNOMEM

#define YYNOMEM   goto yyexhaustedlab

Definition at line 1026 of file go-exp.c.

Referenced by yyparse().

◆ YYNRULES

#define YYNRULES   69

Definition at line 708 of file go-exp.c.

◆ YYNSTATES

#define YYNSTATES   122

Definition at line 710 of file go-exp.c.

Referenced by yyparse().

◆ YYNTOKENS

#define YYNTOKENS   68

Definition at line 704 of file go-exp.c.

Referenced by yy_symbol_print(), and yyparse().

◆ YYPACT_NINF

#define YYPACT_NINF   (-42)

Definition at line 808 of file go-exp.c.

◆ yypact_value_is_default

#define yypact_value_is_default ( Yyn)     ((Yyn) == YYPACT_NINF)

Definition at line 810 of file go-exp.c.

Referenced by yyparse().

◆ YYPOPSTACK

#define YYPOPSTACK ( N)    (yyvsp -= (N), yyssp -= (N))

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 464 of file go-exp.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 463 of file go-exp.c.

Referenced by yyparse().

◆ YYPULL

#define YYPULL   1

Definition at line 64 of file go-exp.c.

◆ YYPURE

#define YYPURE   0

Definition at line 58 of file go-exp.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 61 of file go-exp.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 1029 of file go-exp.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition go-exp.c:464
#define YY_CAST(Type, Val)
Definition go-exp.c:111
#define YYSIZE_T
Definition go-exp.c:477

Definition at line 481 of file go-exp.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 477 of file go-exp.c.

Referenced by yyparse().

◆ YYSIZEOF

#define YYSIZEOF ( X)    YY_CAST (YYPTRDIFF_T, sizeof (X))

Definition at line 487 of file go-exp.c.

Referenced by yyparse().

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 55 of file go-exp.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 610 of file go-exp.c.

Referenced by yyparse().

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 613 of file go-exp.c.

◆ YYSTACK_BYTES

#define YYSTACK_BYTES ( N)
Value:
yytype_uint8 yy_state_t
Definition ada-exp.c:871
#define YYSIZEOF(X)
Definition go-exp.c:487
#define YYSTACK_GAP_MAXIMUM
Definition go-exp.c:650

Definition at line 654 of file go-exp.c.

Referenced by yyparse().

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 611 of file go-exp.c.

Referenced by yyparse().

◆ YYSTACK_GAP_MAXIMUM

#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union go_exp_yyalloc) - 1)

Definition at line 650 of file go-exp.c.

◆ YYSTACK_RELOCATE

#define YYSTACK_RELOCATE ( Stack_alloc,
Stack )
Value:
do \
{ \
YYPTRDIFF_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / YYSIZEOF (*yyptr); \
} \
while (0)
#define yystacksize
Definition yy-remap.h:85

Definition at line 665 of file go-exp.c.

Referenced by yyparse().

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-1)

Definition at line 813 of file go-exp.c.

◆ yytable_value_is_error

#define yytable_value_is_error ( Yyn)     0

Definition at line 815 of file go-exp.c.

Referenced by yyparse().

◆ YYTOKENTYPE

#define YYTOKENTYPE

Definition at line 138 of file go-exp.c.

◆ YYTRANSLATE

#define YYTRANSLATE ( YYX)
Value:
(0 <= (YYX) && (YYX) <= YYMAXUTOK \
static const yytype_int8 yytranslate[]
Definition go-exp.c:725
go_exp_yysymbol_kind_t
Definition go-exp.c:282
@ YYSYMBOL_YYUNDEF
Definition go-exp.c:286
#define YYMAXUTOK
Definition go-exp.c:713

Definition at line 718 of file go-exp.c.

Referenced by yyparse().

◆ YYUNDEF

#define YYUNDEF   257

Definition at line 194 of file go-exp.c.

Referenced by yyparse().

Typedef Documentation

◆ go_exp_YYSTYPE

typedef union go_exp_YYSTYPE go_exp_YYSTYPE

Definition at line 267 of file go-exp.c.

◆ go_exp_yysymbol_kind_t

Definition at line 366 of file go-exp.c.

◆ yy_state_fast_t

typedef int yy_state_fast_t

Definition at line 494 of file go-exp.c.

◆ yy_state_t

Definition at line 491 of file go-exp.c.

◆ yytoken_kind_t

Definition at line 188 of file go-exp.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 415 of file go-exp.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 407 of file go-exp.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 447 of file go-exp.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 436 of file go-exp.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
YYENOMEM 

Definition at line 1018 of file go-exp.c.

◆ go_exp_yysymbol_kind_t

Enumerator
YYSYMBOL_YYEMPTY 
YYSYMBOL_YYEOF 
YYSYMBOL_YYerror 
YYSYMBOL_YYUNDEF 
YYSYMBOL_INT 
YYSYMBOL_FLOAT 
YYSYMBOL_RAW_STRING 
YYSYMBOL_STRING 
YYSYMBOL_CHAR 
YYSYMBOL_NAME 
YYSYMBOL_TYPENAME 
YYSYMBOL_COMPLETE 
YYSYMBOL_NAME_OR_INT 
YYSYMBOL_TRUE_KEYWORD 
YYSYMBOL_FALSE_KEYWORD 
YYSYMBOL_STRUCT_KEYWORD 
YYSYMBOL_INTERFACE_KEYWORD 
YYSYMBOL_TYPE_KEYWORD 
YYSYMBOL_CHAN_KEYWORD 
YYSYMBOL_SIZEOF_KEYWORD 
YYSYMBOL_LEN_KEYWORD 
YYSYMBOL_CAP_KEYWORD 
YYSYMBOL_NEW_KEYWORD 
YYSYMBOL_IOTA_KEYWORD 
YYSYMBOL_NIL_KEYWORD 
YYSYMBOL_CONST_KEYWORD 
YYSYMBOL_DOTDOTDOT 
YYSYMBOL_ENTRY 
YYSYMBOL_ERROR 
YYSYMBOL_BYTE_KEYWORD 
YYSYMBOL_DOLLAR_VARIABLE 
YYSYMBOL_ASSIGN_MODIFY 
YYSYMBOL_31_ 
YYSYMBOL_ABOVE_COMMA 
YYSYMBOL_33_ 
YYSYMBOL_34_ 
YYSYMBOL_OROR 
YYSYMBOL_ANDAND 
YYSYMBOL_37_ 
YYSYMBOL_38_ 
YYSYMBOL_39_ 
YYSYMBOL_ANDNOT 
YYSYMBOL_EQUAL 
YYSYMBOL_NOTEQUAL 
YYSYMBOL_43_ 
YYSYMBOL_44_ 
YYSYMBOL_LEQ 
YYSYMBOL_GEQ 
YYSYMBOL_LSH 
YYSYMBOL_RSH 
YYSYMBOL_49_ 
YYSYMBOL_50_ 
YYSYMBOL_51_ 
YYSYMBOL_52_ 
YYSYMBOL_53_ 
YYSYMBOL_54_ 
YYSYMBOL_UNARY 
YYSYMBOL_INCREMENT 
YYSYMBOL_DECREMENT 
YYSYMBOL_LEFT_ARROW 
YYSYMBOL_59_ 
YYSYMBOL_60_ 
YYSYMBOL_61_ 
YYSYMBOL_62_ 
YYSYMBOL_63_ 
YYSYMBOL_64_ 
YYSYMBOL_65_ 
YYSYMBOL_66_ 
YYSYMBOL_67_ 
YYSYMBOL_YYACCEPT 
YYSYMBOL_start 
YYSYMBOL_type_exp 
YYSYMBOL_exp1 
YYSYMBOL_exp 
YYSYMBOL_73_1 
YYSYMBOL_lcurly 
YYSYMBOL_arglist 
YYSYMBOL_rcurly 
YYSYMBOL_string_exp 
YYSYMBOL_variable 
YYSYMBOL_type 
YYSYMBOL_name_not_typename 

Definition at line 281 of file go-exp.c.

◆ yytokentype

Enumerator
YYEMPTY 
YYEOF 
YYerror 
YYUNDEF 
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 
EQUAL 
NOTEQUAL 
LEQ 
GEQ 
LSH 
RSH 
UNARY 
INCREMENT 
DECREMENT 
LEFT_ARROW 

Definition at line 139 of file go-exp.c.

Function Documentation

◆ build_packaged_name()

static struct stoken build_packaged_name ( const char * package,
int package_len,
const char * name,
int name_len )
static

Definition at line 2831 of file go-exp.c.

References stoken::length, name, name_obstack, and stoken::ptr.

Referenced by classify_name(), and yylex().

◆ classify_name()

static int classify_name ( struct parser_state * par_state,
const struct block * block )
static

◆ classify_packaged_name()

static int classify_packaged_name ( const struct block * block)
static

◆ classify_unsafe_function()

static int classify_unsafe_function ( struct stoken function_name)
static

Definition at line 2872 of file go-exp.c.

References copy_name(), SIZEOF_KEYWORD, go_exp_YYSTYPE::sval, and yylval.

Referenced by yylex().

◆ lex_one_token()

static int lex_one_token ( struct parser_state * par_state)
static

◆ package_name_p()

static int package_name_p ( const char * name,
const struct block * block )
static

◆ parse_number()

static int parse_number ( struct parser_state * par_state,
const char * p,
int len,
int parsed_float,
go_exp_YYSTYPE * putithere )
static

◆ parse_string_or_char()

static int parse_string_or_char ( const char * tokptr,
const char ** outptr,
struct typed_stoken * value,
int * host_chars )
static

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

◆ xfree()

void xfree ( void * )

Referenced by yyparse().

◆ xmalloc()

void * xmalloc ( YYSIZE_T )

Referenced by yyparse().

◆ yy_reduce_print()

static void yy_reduce_print ( yy_state_t * yyssp,
go_exp_YYSTYPE * yyvsp,
int yyrule )
static

Definition at line 1144 of file go-exp.c.

References YY_ACCESSING_SYMBOL, yy_symbol_print(), YYFPRINTF, yyr2, yyrline, yyrule, yyssp, and yyvsp.

◆ yy_stack_print()

static void yy_stack_print ( yy_state_t * yybottom,
yy_state_t * yytop )
static

Definition at line 1121 of file go-exp.c.

References YYFPRINTF.

◆ yy_symbol_print()

static void yy_symbol_print ( FILE * yyo,
go_exp_yysymbol_kind_t yykind,
go_exp_YYSTYPE const *const yyvaluep )
static

Definition at line 1105 of file go-exp.c.

References yy_symbol_value_print(), YYFPRINTF, YYNTOKENS, and yysymbol_name().

Referenced by yy_reduce_print().

◆ yy_symbol_value_print()

static void yy_symbol_value_print ( FILE * yyo,
go_exp_yysymbol_kind_t yykind,
go_exp_YYSTYPE const *const yyvaluep )
static

◆ yydestruct()

static void yydestruct ( const char * yymsg,
go_exp_yysymbol_kind_t yykind,
go_exp_YYSTYPE * yyvaluep )
static

◆ yyerror()

static void yyerror ( const char * msg)
static

Definition at line 3107 of file go-exp.c.

References parser_state::lexptr, parser_state::prev_lexptr, and pstate.

◆ yylex()

static int yylex ( void )
static

◆ yyparse()

int yyparse ( void )

Definition at line 1236 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, go_exp_YYSTYPE::type, typed_stoken::type, go_exp_YYSTYPE::typed_val_int, innermost_block_tracker::update(), go_exp_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, go_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, go_exp_yyalloc::yyvs_alloc, and yyvsp.

◆ yysymbol_name()

static const char * yysymbol_name ( go_exp_yysymbol_kind_t yysymbol)
static

Definition at line 802 of file go-exp.c.

References yytname.

Referenced by yy_symbol_print().

Variable Documentation

◆ ident_tokens

const struct go_token ident_tokens[]
static
Initial value:
=
{
{"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},
}
#define BYTE_KEYWORD
Definition go-exp.c:220
#define NEW_KEYWORD
Definition go-exp.c:213
#define INTERFACE_KEYWORD
Definition go-exp.c:207
#define NIL_KEYWORD
Definition go-exp.c:215
#define CONST_KEYWORD
Definition go-exp.c:216
#define STRUCT_KEYWORD
Definition go-exp.c:206
#define CAP_KEYWORD
Definition go-exp.c:212
#define FALSE_KEYWORD
Definition go-exp.c:205
#define CHAN_KEYWORD
Definition go-exp.c:209
#define IOTA_KEYWORD
Definition go-exp.c:214
#define TYPE_KEYWORD
Definition go-exp.c:208
#define LEN_KEYWORD
Definition go-exp.c:211
#define TRUE_KEYWORD
Definition go-exp.c:204

Definition at line 2503 of file go-exp.c.

Referenced by lex_one_token().

◆ last_was_structop

int last_was_structop
static

Definition at line 2528 of file go-exp.c.

Referenced by lex_one_token().

◆ name_obstack

auto_obstack name_obstack
static

Definition at line 2824 of file go-exp.c.

Referenced by build_packaged_name().

◆ paren_depth

int paren_depth
static

Definition at line 2531 of file go-exp.c.

Referenced by lex_one_token().

◆ popping

int popping
static

Definition at line 2820 of file go-exp.c.

Referenced by yylex().

◆ pstate

struct parser_state* pstate = NULL
static

Definition at line 95 of file go-exp.c.

Referenced by lex_one_token(), yyerror(), yylex(), and yyparse().

◆ saw_name_at_eof

int saw_name_at_eof
static

Definition at line 2523 of file go-exp.c.

Referenced by lex_one_token().

◆ tempbuf

struct obstack tempbuf
static

Definition at line 2386 of file go-exp.c.

Referenced by parse_string_or_char().

◆ tempbuf_init

int tempbuf_init
static

Definition at line 2387 of file go-exp.c.

Referenced by parse_string_or_char().

◆ token_fifo

std::vector<go_token_and_value> token_fifo
static

Definition at line 2817 of file go-exp.c.

Referenced by yylex().

◆ tokentab2

const struct go_token tokentab2[]
static
Initial value:
=
{
{"+=", 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, OP_NULL},
{"--", DECREMENT, OP_NULL},
{"<-", LEFT_ARROW, OP_NULL},
{"&&", ANDAND, OP_NULL},
{"||", OROR, OP_NULL},
{"<<", LSH, OP_NULL},
{">>", RSH, OP_NULL},
{"==", EQUAL, OP_NULL},
{"!=", NOTEQUAL, OP_NULL},
{"<=", LEQ, OP_NULL},
{">=", GEQ, OP_NULL},
}
#define LEQ
Definition go-exp.c:229
#define NOTEQUAL
Definition go-exp.c:228
#define EQUAL
Definition go-exp.c:227
#define RSH
Definition go-exp.c:232
#define LSH
Definition go-exp.c:231
#define OROR
Definition go-exp.c:224
#define DECREMENT
Definition go-exp.c:235
#define ASSIGN_MODIFY
Definition go-exp.c:222
#define GEQ
Definition go-exp.c:230
#define ANDAND
Definition go-exp.c:225
#define INCREMENT
Definition go-exp.c:234
#define LEFT_ARROW
Definition go-exp.c:236

Definition at line 2477 of file go-exp.c.

Referenced by lex_one_token().

◆ tokentab3

const struct go_token tokentab3[]
static
Initial value:
=
{
{">>=", ASSIGN_MODIFY, BINOP_RSH},
{"<<=", ASSIGN_MODIFY, BINOP_LSH},
{"...", DOTDOTDOT, OP_NULL},
}
#define DOTDOTDOT
Definition go-exp.c:217

Definition at line 2469 of file go-exp.c.

Referenced by lex_one_token().

◆ yychar

int yychar

Definition at line 1221 of file go-exp.c.

Referenced by yyparse().

◆ yycheck

const yytype_int8 yycheck[]
static

Definition at line 924 of file go-exp.c.

Referenced by yyparse().

◆ yydebug

int yydebug

Definition at line 1171 of file go-exp.c.

◆ yydefact

const yytype_int8 yydefact[]
static
Initial value:
=
{
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, 13, 14, 0, 0, 19, 0,
0, 0, 0, 64, 0, 0, 28, 6, 50, 49,
0, 47, 46, 45, 44, 43, 37, 38, 41, 42,
39, 40, 35, 36, 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
}

Definition at line 840 of file go-exp.c.

Referenced by yyparse().

◆ yydefgoto

const yytype_int8 yydefgoto[]
static
Initial value:
=
{
0, 21, 22, 23, 24, 103, 25, 115, 106, 26,
27, 32, 29
}

Definition at line 865 of file go-exp.c.

Referenced by yyparse().

◆ yylval

◆ yynerrs

int yynerrs

Definition at line 1226 of file go-exp.c.

Referenced by yyparse().

◆ yypact

const yytype_int16 yypact[]
static
Initial value:
=
{
49, -42, -42, -42, -42, -42, -42, -42, -42, -42,
-38, -42, -42, 49, 49, 49, 49, 49, 49, 49,
-42, 27, -42, 34, 187, 45, 16, -42, 11, 53,
49, -35, 11, -35, -35, -35, -35, 11, 38, -35,
-42, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, -42, -42, -3, 49, -42, 45,
9, 74, 49, -42, 123, 10, -42, 187, 187, 187,
88, 241, 266, 290, 313, 334, 353, 353, 368, 368,
368, 368, -41, -41, 380, 390, 390, -35, -35, -35,
-42, 72, 33, 49, -42, -42, 49, -42, 155, -42,
-42, 49, -42, -42, 187, 39, -35, -42, 215, 49,
-42, 187
}

Definition at line 820 of file go-exp.c.

Referenced by yyparse().

◆ yypgoto

const yytype_int8 yypgoto[]
static
Initial value:
=
{
-42, -42, -42, -4, -13, -42, -42, -42, -42, -42,
-42, 51, 17
}

Definition at line 858 of file go-exp.c.

Referenced by yyparse().

◆ yyr1

const yytype_int8 yyr1[]
static
Initial value:
=
{
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
}

Definition at line 994 of file go-exp.c.

Referenced by yyparse().

◆ yyr2

const yytype_int8 yyr2[]
static
Initial value:
=
{
0, 2, 1, 1, 1, 1, 3, 2, 2, 2,
2, 2, 2, 2, 2, 3, 4, 3, 4, 0,
5, 1, 0, 1, 3, 1, 4, 4, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 5, 3,
3, 1, 1, 1, 1, 1, 1, 4, 4, 1,
3, 1, 1, 1, 2, 1, 2, 1, 1, 1
}

Definition at line 1006 of file go-exp.c.

Referenced by yy_reduce_print(), and yyparse().

◆ yyrline

const yytype_int16 yyrline[]
static
Initial value:
=
{
0, 191, 191, 192, 195, 200, 201, 206, 210, 214,
218, 222, 226, 230, 234, 240, 247, 257, 266, 273,
270, 283, 287, 290, 294, 298, 302, 309, 316, 322,
326, 330, 334, 338, 342, 346, 350, 354, 358, 362,
366, 370, 374, 378, 382, 386, 390, 394, 398, 409,
413, 422, 429, 438, 449, 458, 461, 467, 479, 486,
503, 521, 533, 537, 541, 555, 600, 602, 609, 622
}

Definition at line 761 of file go-exp.c.

Referenced by yy_reduce_print().

◆ yystos

const yytype_int8 yystos[]
static
Initial value:
=
{
0, 3, 4, 6, 7, 8, 9, 11, 12, 13,
18, 28, 29, 38, 39, 50, 51, 52, 61, 62,
65, 69, 70, 71, 72, 74, 77, 78, 79, 80,
61, 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, 56, 57, 59, 60, 61, 52,
79, 50, 61, 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
}

Definition at line 976 of file go-exp.c.

◆ yytable

const yytype_int8 yytable[]
static

Definition at line 874 of file go-exp.c.

Referenced by yyparse().

◆ yytname

const char* const yytname[]
static
Initial value:
=
{
"\"end of file\"", "error", "\"invalid token\"", "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", "EQUAL",
"NOTEQUAL", "'<'", "'>'", "LEQ", "GEQ", "LSH", "RSH", "'@'", "'+'",
"'-'", "'*'", "'/'", "'%'", "UNARY", "INCREMENT", "DECREMENT",
"LEFT_ARROW", "'.'", "'['", "'('", "'!'", "']'", "')'", "'{'", "'}'",
"':'", "$accept", "start", "type_exp", "exp1", "exp", "$@1", "lcurly",
"arglist", "rcurly", "string_exp", "variable", "type",
"name_not_typename", YY_NULLPTRPTR
}
#define YY_NULLPTRPTR
Definition go-exp.c:123

Definition at line 783 of file go-exp.c.

Referenced by yysymbol_name().

◆ yytranslate

const yytype_int8 yytranslate[]
static

Definition at line 725 of file go-exp.c.