GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
c-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 "c-support.h"
#include "charset.h"
#include "block.h"
#include "cp-support.h"
#include "macroscope.h"
#include "objc-lang.h"
#include "typeprint.h"
#include "cp-abi.h"
#include "type-stack.h"
#include "target-float.h"
#include "c-exp.h"
#include "yy-remap.h"
#include <limits.h>

Go to the source code of this file.

Classes

struct  c_parse_state
 
union  c_exp_YYSTYPE
 
union  c_exp_yyalloc
 
struct  c_token
 
struct  c_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   c_
 
#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 COMPLEX_INT   259
 
#define FLOAT   260
 
#define COMPLEX_FLOAT   261
 
#define STRING   262
 
#define NSSTRING   263
 
#define SELECTOR   264
 
#define CHAR   265
 
#define NAME   266
 
#define UNKNOWN_CPP_NAME   267
 
#define COMPLETE   268
 
#define TYPENAME   269
 
#define CLASSNAME   270
 
#define OBJC_LBRAC   271
 
#define NAME_OR_INT   272
 
#define OPERATOR   273
 
#define STRUCT   274
 
#define CLASS   275
 
#define UNION   276
 
#define ENUM   277
 
#define SIZEOF   278
 
#define ALIGNOF   279
 
#define UNSIGNED   280
 
#define COLONCOLON   281
 
#define TEMPLATE   282
 
#define ERROR   283
 
#define NEW   284
 
#define DELETE   285
 
#define REINTERPRET_CAST   286
 
#define DYNAMIC_CAST   287
 
#define STATIC_CAST   288
 
#define CONST_CAST   289
 
#define ENTRY   290
 
#define TYPEOF   291
 
#define DECLTYPE   292
 
#define TYPEID   293
 
#define SIGNED_KEYWORD   294
 
#define LONG   295
 
#define SHORT   296
 
#define INT_KEYWORD   297
 
#define CONST_KEYWORD   298
 
#define VOLATILE_KEYWORD   299
 
#define DOUBLE_KEYWORD   300
 
#define RESTRICT   301
 
#define ATOMIC   302
 
#define FLOAT_KEYWORD   303
 
#define COMPLEX   304
 
#define DOLLAR_VARIABLE   305
 
#define ASSIGN_MODIFY   306
 
#define TRUEKEYWORD   307
 
#define FALSEKEYWORD   308
 
#define ABOVE_COMMA   309
 
#define OROR   310
 
#define ANDAND   311
 
#define EQUAL   312
 
#define NOTEQUAL   313
 
#define LEQ   314
 
#define GEQ   315
 
#define LSH   316
 
#define RSH   317
 
#define UNARY   318
 
#define INCREMENT   319
 
#define DECREMENT   320
 
#define ARROW   321
 
#define ARROW_STAR   322
 
#define DOT_STAR   323
 
#define BLOCKNAME   324
 
#define FILENAME   325
 
#define DOTDOTDOT   326
 
#define c_exp_YYSTYPE_IS_TRIVIAL   1
 
#define c_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 c_exp_yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYFINAL   177
 
#define YYLAST   1742
 
#define YYNTOKENS   96
 
#define YYNNTS   50
 
#define YYNRULES   285
 
#define YYNSTATES   442
 
#define YYMAXUTOK   326
 
#define YYTRANSLATE(YYX)
 
#define YY_ACCESSING_SYMBOL(State)   YY_CAST (c_exp_yysymbol_kind_t, yystos[State])
 
#define YYPACT_NINF   (-225)
 
#define yypact_value_is_default(Yyn)    ((Yyn) == YYPACT_NINF)
 
#define YYTABLE_NINF   (-128)
 
#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 c_exp_YYSTYPE c_exp_YYSTYPE
 
typedef enum c_exp_yysymbol_kind_t c_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_int16 yy_state_t
 
typedef int yy_state_fast_t
 

Enumerations

enum  yytokentype {
  YYEMPTY = -2 , YYEOF = 0 , YYerror = 256 , YYUNDEF = 257 ,
  INT = 258 , COMPLEX_INT = 259 , FLOAT = 260 , COMPLEX_FLOAT = 261 ,
  STRING = 262 , NSSTRING = 263 , SELECTOR = 264 , CHAR = 265 ,
  NAME = 266 , UNKNOWN_CPP_NAME = 267 , COMPLETE = 268 , TYPENAME = 269 ,
  CLASSNAME = 270 , OBJC_LBRAC = 271 , NAME_OR_INT = 272 , OPERATOR = 273 ,
  STRUCT = 274 , CLASS = 275 , UNION = 276 , ENUM = 277 ,
  SIZEOF = 278 , ALIGNOF = 279 , UNSIGNED = 280 , COLONCOLON = 281 ,
  TEMPLATE = 282 , ERROR = 283 , NEW = 284 , DELETE = 285 ,
  REINTERPRET_CAST = 286 , DYNAMIC_CAST = 287 , STATIC_CAST = 288 , CONST_CAST = 289 ,
  ENTRY = 290 , TYPEOF = 291 , DECLTYPE = 292 , TYPEID = 293 ,
  SIGNED_KEYWORD = 294 , LONG = 295 , SHORT = 296 , INT_KEYWORD = 297 ,
  CONST_KEYWORD = 298 , VOLATILE_KEYWORD = 299 , DOUBLE_KEYWORD = 300 , RESTRICT = 301 ,
  ATOMIC = 302 , FLOAT_KEYWORD = 303 , COMPLEX = 304 , DOLLAR_VARIABLE = 305 ,
  ASSIGN_MODIFY = 306 , TRUEKEYWORD = 307 , FALSEKEYWORD = 308 , ABOVE_COMMA = 309 ,
  OROR = 310 , ANDAND = 311 , EQUAL = 312 , NOTEQUAL = 313 ,
  LEQ = 314 , GEQ = 315 , LSH = 316 , RSH = 317 ,
  UNARY = 318 , INCREMENT = 319 , DECREMENT = 320 , ARROW = 321 ,
  ARROW_STAR = 322 , DOT_STAR = 323 , BLOCKNAME = 324 , FILENAME = 325 ,
  DOTDOTDOT = 326
}
 
enum  c_exp_yysymbol_kind_t {
  YYSYMBOL_YYEMPTY = -2 , YYSYMBOL_YYEOF = 0 , YYSYMBOL_YYerror = 1 , YYSYMBOL_YYUNDEF = 2 ,
  YYSYMBOL_INT = 3 , YYSYMBOL_COMPLEX_INT = 4 , YYSYMBOL_FLOAT = 5 , YYSYMBOL_COMPLEX_FLOAT = 6 ,
  YYSYMBOL_STRING = 7 , YYSYMBOL_NSSTRING = 8 , YYSYMBOL_SELECTOR = 9 , YYSYMBOL_CHAR = 10 ,
  YYSYMBOL_NAME = 11 , YYSYMBOL_UNKNOWN_CPP_NAME = 12 , YYSYMBOL_COMPLETE = 13 , YYSYMBOL_TYPENAME = 14 ,
  YYSYMBOL_CLASSNAME = 15 , YYSYMBOL_OBJC_LBRAC = 16 , YYSYMBOL_NAME_OR_INT = 17 , YYSYMBOL_OPERATOR = 18 ,
  YYSYMBOL_STRUCT = 19 , YYSYMBOL_CLASS = 20 , YYSYMBOL_UNION = 21 , YYSYMBOL_ENUM = 22 ,
  YYSYMBOL_SIZEOF = 23 , YYSYMBOL_ALIGNOF = 24 , YYSYMBOL_UNSIGNED = 25 , YYSYMBOL_COLONCOLON = 26 ,
  YYSYMBOL_TEMPLATE = 27 , YYSYMBOL_ERROR = 28 , YYSYMBOL_NEW = 29 , YYSYMBOL_DELETE = 30 ,
  YYSYMBOL_REINTERPRET_CAST = 31 , YYSYMBOL_DYNAMIC_CAST = 32 , YYSYMBOL_STATIC_CAST = 33 , YYSYMBOL_CONST_CAST = 34 ,
  YYSYMBOL_ENTRY = 35 , YYSYMBOL_TYPEOF = 36 , YYSYMBOL_DECLTYPE = 37 , YYSYMBOL_TYPEID = 38 ,
  YYSYMBOL_SIGNED_KEYWORD = 39 , YYSYMBOL_LONG = 40 , YYSYMBOL_SHORT = 41 , YYSYMBOL_INT_KEYWORD = 42 ,
  YYSYMBOL_CONST_KEYWORD = 43 , YYSYMBOL_VOLATILE_KEYWORD = 44 , YYSYMBOL_DOUBLE_KEYWORD = 45 , YYSYMBOL_RESTRICT = 46 ,
  YYSYMBOL_ATOMIC = 47 , YYSYMBOL_FLOAT_KEYWORD = 48 , YYSYMBOL_COMPLEX = 49 , YYSYMBOL_DOLLAR_VARIABLE = 50 ,
  YYSYMBOL_ASSIGN_MODIFY = 51 , YYSYMBOL_TRUEKEYWORD = 52 , YYSYMBOL_FALSEKEYWORD = 53 , YYSYMBOL_54_ = 54 ,
  YYSYMBOL_ABOVE_COMMA = 55 , YYSYMBOL_56_ = 56 , YYSYMBOL_57_ = 57 , YYSYMBOL_OROR = 58 ,
  YYSYMBOL_ANDAND = 59 , YYSYMBOL_60_ = 60 , YYSYMBOL_61_ = 61 , YYSYMBOL_62_ = 62 ,
  YYSYMBOL_EQUAL = 63 , YYSYMBOL_NOTEQUAL = 64 , YYSYMBOL_65_ = 65 , YYSYMBOL_66_ = 66 ,
  YYSYMBOL_LEQ = 67 , YYSYMBOL_GEQ = 68 , YYSYMBOL_LSH = 69 , YYSYMBOL_RSH = 70 ,
  YYSYMBOL_71_ = 71 , YYSYMBOL_72_ = 72 , YYSYMBOL_73_ = 73 , YYSYMBOL_74_ = 74 ,
  YYSYMBOL_75_ = 75 , YYSYMBOL_76_ = 76 , YYSYMBOL_UNARY = 77 , YYSYMBOL_INCREMENT = 78 ,
  YYSYMBOL_DECREMENT = 79 , YYSYMBOL_ARROW = 80 , YYSYMBOL_ARROW_STAR = 81 , YYSYMBOL_82_ = 82 ,
  YYSYMBOL_DOT_STAR = 83 , YYSYMBOL_84_ = 84 , YYSYMBOL_85_ = 85 , YYSYMBOL_BLOCKNAME = 86 ,
  YYSYMBOL_FILENAME = 87 , YYSYMBOL_DOTDOTDOT = 88 , YYSYMBOL_89_ = 89 , YYSYMBOL_90_ = 90 ,
  YYSYMBOL_91_ = 91 , YYSYMBOL_92_ = 92 , YYSYMBOL_93_ = 93 , YYSYMBOL_94_ = 94 ,
  YYSYMBOL_95_ = 95 , YYSYMBOL_YYACCEPT = 96 , YYSYMBOL_start = 97 , YYSYMBOL_type_exp = 98 ,
  YYSYMBOL_exp1 = 99 , YYSYMBOL_exp = 100 , YYSYMBOL_101_1 = 101 , YYSYMBOL_102_2 = 102 ,
  YYSYMBOL_103_3 = 103 , YYSYMBOL_msglist = 104 , YYSYMBOL_msgarglist = 105 , YYSYMBOL_msgarg = 106 ,
  YYSYMBOL_107_4 = 107 , YYSYMBOL_108_5 = 108 , YYSYMBOL_lcurly = 109 , YYSYMBOL_arglist = 110 ,
  YYSYMBOL_function_method = 111 , YYSYMBOL_function_method_void = 112 , YYSYMBOL_function_method_void_or_typelist = 113 , YYSYMBOL_rcurly = 114 ,
  YYSYMBOL_string_exp = 115 , YYSYMBOL_block = 116 , YYSYMBOL_variable = 117 , YYSYMBOL_qualified_name = 118 ,
  YYSYMBOL_const_or_volatile = 119 , YYSYMBOL_single_qualifier = 120 , YYSYMBOL_qualifier_seq_noopt = 121 , YYSYMBOL_qualifier_seq = 122 ,
  YYSYMBOL_ptr_operator = 123 , YYSYMBOL_124_6 = 124 , YYSYMBOL_125_7 = 125 , YYSYMBOL_ptr_operator_ts = 126 ,
  YYSYMBOL_abs_decl = 127 , YYSYMBOL_direct_abs_decl = 128 , YYSYMBOL_array_mod = 129 , YYSYMBOL_func_mod = 130 ,
  YYSYMBOL_type = 131 , YYSYMBOL_scalar_type = 132 , YYSYMBOL_typebase = 133 , YYSYMBOL_type_name = 134 ,
  YYSYMBOL_parameter_typelist = 135 , YYSYMBOL_nonempty_typelist = 136 , YYSYMBOL_ptype = 137 , YYSYMBOL_conversion_type_id = 138 ,
  YYSYMBOL_conversion_declarator = 139 , YYSYMBOL_const_and_volatile = 140 , YYSYMBOL_const_or_volatile_noopt = 141 , YYSYMBOL_oper = 142 ,
  YYSYMBOL_field_name = 143 , YYSYMBOL_name = 144 , YYSYMBOL_name_not_typename = 145
}
 
enum  { YYENOMEM = -2 }
 
enum  token_flag { FLAG_CXX = 1 , FLAG_C = 2 , FLAG_SHADOW = 4 }
 

Functions

int yyparse (void)
 
static int yylex (void)
 
static void yyerror (const char *)
 
static int type_aggregate_p (struct type *)
 
static int parse_number (struct parser_state *par_state, const char *, int, int, c_exp_YYSTYPE *)
 
static struct stoken operator_stoken (const char *)
 
static struct stoken typename_stoken (const char *)
 
static void check_parameter_typelist (std::vector< struct type * > *)
 
void * xmalloc (YYSIZE_T)
 
void xfree (void *)
 
static const char * yysymbol_name (c_exp_yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED
 
static void yy_symbol_value_print (FILE *yyo, c_exp_yysymbol_kind_t yykind, c_exp_YYSTYPE const *const yyvaluep)
 
static void yy_symbol_print (FILE *yyo, c_exp_yysymbol_kind_t yykind, c_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, c_exp_YYSTYPE *yyvsp, int yyrule)
 
static void yydestruct (const char *yymsg, c_exp_yysymbol_kind_t yykind, c_exp_YYSTYPE *yyvaluep)
 
int c_parse_escape (const char **ptr, struct obstack *output)
 
static int parse_string_or_char (const char *tokptr, const char **outptr, struct typed_stoken *value, int *host_chars)
 
 DEF_ENUM_FLAGS_TYPE (enum token_flag, token_flags)
 
static void scan_macro_expansion (const char *expansion)
 
static int scanning_macro_expansion (void)
 
static void finished_macro_expansion (void)
 
static int is_cast_operator (const char *token, int len)
 
static int lex_one_token (struct parser_state *par_state, bool *is_quoted_name)
 
static int classify_name (struct parser_state *par_state, const struct block *block, bool is_quoted_name, bool is_after_structop)
 
static int classify_inner_name (struct parser_state *par_state, const struct block *block, struct type *context)
 
int c_parse (struct parser_state *par_state)
 

Variables

static struct parser_statepstate = NULL
 
static struct c_parse_statecpstate
 
int yydebug
 
c_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_int16 yydefact []
 
static const yytype_int16 yypgoto []
 
static const yytype_int16 yydefgoto []
 
static const yytype_int16 yytable []
 
static const yytype_int16 yycheck []
 
static const yytype_uint8 yystos []
 
static const yytype_uint8 yyr1 []
 
static const yytype_int8 yyr2 []
 
int yychar
 
int yynerrs
 
static struct obstack tempbuf
 
static int tempbuf_init
 
static const struct c_token tokentab3 []
 
static const struct c_token tokentab2 []
 
static const struct c_token ident_tokens []
 
static struct macro_scopeexpression_macro_scope
 
static int saw_name_at_eof
 
static bool last_was_structop
 
static int paren_depth
 
static std::vector< c_token_and_valuetoken_fifo
 
static int popping
 
static auto_obstack name_obstack
 

Macro Definition Documentation

◆ ABOVE_COMMA

#define ABOVE_COMMA   309

Definition at line 330 of file c-exp.c.

◆ ALIGNOF

#define ALIGNOF   279

Definition at line 300 of file c-exp.c.

◆ ANDAND

#define ANDAND   311

Definition at line 332 of file c-exp.c.

◆ ARROW

#define ARROW   321

Definition at line 342 of file c-exp.c.

Referenced by lex_one_token().

◆ ARROW_STAR

#define ARROW_STAR   322

Definition at line 343 of file c-exp.c.

◆ ASSIGN_MODIFY

#define ASSIGN_MODIFY   306

Definition at line 327 of file c-exp.c.

◆ ATOMIC

#define ATOMIC   302

Definition at line 323 of file c-exp.c.

◆ BLOCKNAME

#define BLOCKNAME   324

Definition at line 345 of file c-exp.c.

Referenced by classify_name().

◆ c_exp_YYSTYPE_IS_DECLARED

#define c_exp_YYSTYPE_IS_DECLARED   1

Definition at line 386 of file c-exp.c.

◆ c_exp_YYSTYPE_IS_TRIVIAL

#define c_exp_YYSTYPE_IS_TRIVIAL   1

Definition at line 385 of file c-exp.c.

◆ CHAR

#define CHAR   265

Definition at line 286 of file c-exp.c.

Referenced by lex_one_token(), and parse_string_or_char().

◆ CLASS

#define CLASS   275

Definition at line 296 of file c-exp.c.

◆ CLASSNAME

#define CLASSNAME   270

Definition at line 291 of file c-exp.c.

Referenced by classify_name().

◆ COLONCOLON

#define COLONCOLON   281

Definition at line 302 of file c-exp.c.

Referenced by yylex().

◆ COMPLETE

#define COMPLETE   268

Definition at line 289 of file c-exp.c.

Referenced by lex_one_token().

◆ COMPLEX

#define COMPLEX   304

Definition at line 325 of file c-exp.c.

◆ COMPLEX_FLOAT

#define COMPLEX_FLOAT   261

Definition at line 282 of file c-exp.c.

Referenced by parse_number().

◆ COMPLEX_INT

#define COMPLEX_INT   259

Definition at line 280 of file c-exp.c.

Referenced by parse_number().

◆ CONST_CAST

#define CONST_CAST   289

Definition at line 310 of file c-exp.c.

◆ CONST_KEYWORD

#define CONST_KEYWORD   298

Definition at line 319 of file c-exp.c.

◆ DECLTYPE

#define DECLTYPE   292

Definition at line 313 of file c-exp.c.

◆ DECREMENT

#define DECREMENT   320

Definition at line 341 of file c-exp.c.

◆ DELETE

#define DELETE   285

Definition at line 306 of file c-exp.c.

◆ DOLLAR_VARIABLE

#define DOLLAR_VARIABLE   305

Definition at line 326 of file c-exp.c.

Referenced by lex_one_token().

◆ DOT_STAR

#define DOT_STAR   323

Definition at line 344 of file c-exp.c.

◆ DOTDOTDOT

#define DOTDOTDOT   326

Definition at line 347 of file c-exp.c.

◆ DOUBLE_KEYWORD

#define DOUBLE_KEYWORD   300

Definition at line 321 of file c-exp.c.

◆ DYNAMIC_CAST

#define DYNAMIC_CAST   287

Definition at line 308 of file c-exp.c.

◆ ENTRY

#define ENTRY   290

Definition at line 311 of file c-exp.c.

Referenced by lex_one_token().

◆ ENUM

#define ENUM   277

Definition at line 298 of file c-exp.c.

◆ EQUAL

#define EQUAL   312

Definition at line 333 of file c-exp.c.

◆ ERROR

#define ERROR   283

Definition at line 304 of file c-exp.c.

Referenced by classify_inner_name(), lex_one_token(), and parse_number().

◆ FALSEKEYWORD

#define FALSEKEYWORD   308

Definition at line 329 of file c-exp.c.

◆ FILENAME

#define FILENAME   325

Definition at line 346 of file c-exp.c.

Referenced by classify_name(), and yylex().

◆ FLOAT

#define FLOAT   260

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

Referenced by parse_number().

◆ FLOAT_KEYWORD

#define FLOAT_KEYWORD   303

Definition at line 324 of file c-exp.c.

◆ GDB_YY_REMAP_PREFIX

#define GDB_YY_REMAP_PREFIX   c_

Definition at line 96 of file c-exp.c.

◆ GEQ

#define GEQ   315

Definition at line 336 of file c-exp.c.

◆ INCREMENT

#define INCREMENT   319

Definition at line 340 of file c-exp.c.

◆ INT

#define INT   258

Definition at line 279 of file c-exp.c.

Referenced by classify_name(), and parse_number().

◆ INT_KEYWORD

#define INT_KEYWORD   297

Definition at line 318 of file c-exp.c.

◆ LEQ

#define LEQ   314

Definition at line 335 of file c-exp.c.

◆ LONG

#define LONG   295

Definition at line 316 of file c-exp.c.

◆ LSH

#define LSH   316

Definition at line 337 of file c-exp.c.

◆ NAME

#define NAME   266

Definition at line 287 of file c-exp.c.

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

◆ NAME_OR_INT

#define NAME_OR_INT   272

Definition at line 293 of file c-exp.c.

Referenced by classify_name().

◆ NEW

#define NEW   284

Definition at line 305 of file c-exp.c.

◆ NOTEQUAL

#define NOTEQUAL   313

Definition at line 334 of file c-exp.c.

◆ NSSTRING

#define NSSTRING   263

Definition at line 284 of file c-exp.c.

Referenced by parse_string_or_char().

◆ OBJC_LBRAC

#define OBJC_LBRAC   271

Definition at line 292 of file c-exp.c.

Referenced by lex_one_token().

◆ OPERATOR

#define OPERATOR   273

Definition at line 294 of file c-exp.c.

◆ OROR

#define OROR   310

Definition at line 331 of file c-exp.c.

◆ parse_type

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

Definition at line 92 of file c-exp.c.

Referenced by parse_number(), and yyparse().

◆ REINTERPRET_CAST

#define REINTERPRET_CAST   286

Definition at line 307 of file c-exp.c.

◆ RESTRICT

#define RESTRICT   301

Definition at line 322 of file c-exp.c.

◆ RSH

#define RSH   317

Definition at line 338 of file c-exp.c.

◆ SELECTOR

#define SELECTOR   264

Definition at line 285 of file c-exp.c.

Referenced by lex_one_token().

◆ SHORT

#define SHORT   296

Definition at line 317 of file c-exp.c.

Referenced by gdb_console_fputs().

◆ SIGNED_KEYWORD

#define SIGNED_KEYWORD   294

Definition at line 315 of file c-exp.c.

◆ SIZEOF

#define SIZEOF   278

Definition at line 299 of file c-exp.c.

◆ STATIC_CAST

#define STATIC_CAST   288

Definition at line 309 of file c-exp.c.

◆ STRING

#define STRING   262

Definition at line 283 of file c-exp.c.

Referenced by parse_string_or_char().

◆ STRUCT

#define STRUCT   274

Definition at line 295 of file c-exp.c.

◆ TEMPLATE

#define TEMPLATE   282

Definition at line 303 of file c-exp.c.

◆ TRUEKEYWORD

#define TRUEKEYWORD   307

Definition at line 328 of file c-exp.c.

◆ TYPEID

#define TYPEID   293

Definition at line 314 of file c-exp.c.

◆ TYPENAME

#define TYPENAME   269

Definition at line 290 of file c-exp.c.

Referenced by classify_inner_name(), classify_name(), and yylex().

◆ TYPEOF

#define TYPEOF   291

Definition at line 312 of file c-exp.c.

◆ UNARY

#define UNARY   318

Definition at line 339 of file c-exp.c.

◆ UNION

#define UNION   276

Definition at line 297 of file c-exp.c.

◆ UNKNOWN_CPP_NAME

#define UNKNOWN_CPP_NAME   267

Definition at line 288 of file c-exp.c.

Referenced by classify_name().

◆ UNSIGNED

#define UNSIGNED   280

Definition at line 301 of file c-exp.c.

◆ VOLATILE_KEYWORD

#define VOLATILE_KEYWORD   299

Definition at line 320 of file c-exp.c.

◆ YY_

#define YY_ ( Msgid)    Msgid

Definition at line 692 of file c-exp.c.

Referenced by yyparse().

◆ YY_ACCESSING_SYMBOL

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

Accessing symbol of state STATE.

Definition at line 987 of file c-exp.c.

Referenced by yy_reduce_print(), and yyparse().

◆ YY_ASSERT

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

Definition at line 758 of file c-exp.c.

Referenced by yyparse().

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

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

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 709 of file c-exp.c.

◆ YY_CAST

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

Definition at line 168 of file c-exp.c.

Referenced by yyparse().

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 738 of file c-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 739 of file c-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 753 of file c-exp.c.

Referenced by yyparse().

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 754 of file c-exp.c.

Referenced by yyparse().

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE ( Value)    Value

Definition at line 735 of file c-exp.c.

◆ YY_NULLPTRPTR

#define YY_NULLPTRPTR   ((void*)0)

Definition at line 180 of file c-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 c-exp.c:1801
#define yyvsp
Definition yy-remap.h:87
#define yyssp
Definition yy-remap.h:84

Definition at line 1793 of file c-exp.c.

Referenced by yyparse().

◆ YY_REINTERPRET_CAST

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

Definition at line 169 of file c-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 1762 of file c-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 1700 of file c-exp.c.

Referenced by yydestruct(), and yyparse().

◆ YY_USE

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

Definition at line 715 of file c-exp.c.

Referenced by yy_symbol_value_print(), and yydestruct().

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 1654 of file c-exp.c.

Referenced by yyparse().

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 1653 of file c-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 c-exp.c:692
int yychar
Definition c-exp.c:1851
c_exp_YYSTYPE yylval
Definition c-exp.c:1854
#define YYEMPTY
Definition c-exp.c:275
#define YYERROR
Definition c-exp.c:1655
#define yylen
Definition yy-remap.h:74
#define yystate
Definition yy-remap.h:63

Definition at line 1661 of file c-exp.c.

◆ YYBISON

#define YYBISON   30802

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

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.8.2"

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

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 1651 of file c-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 c-exp.c:651

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

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 846 of file c-exp.c.

◆ YYDPRINTF

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

Definition at line 1691 of file c-exp.c.

Referenced by yyparse().

◆ YYEMPTY

#define YYEMPTY   -2

Definition at line 275 of file c-exp.c.

Referenced by yyparse().

◆ YYEOF

#define YYEOF   0

Definition at line 276 of file c-exp.c.

Referenced by yyparse().

◆ YYERRCODE

#define YYERRCODE   YYUNDEF

Definition at line 1680 of file c-exp.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 1650 of file c-exp.c.

◆ YYerror

#define YYerror   256

Definition at line 277 of file c-exp.c.

Referenced by yyparse().

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 1655 of file c-exp.c.

Referenced by yyparse().

◆ YYFINAL

#define YYFINAL   177

Definition at line 887 of file c-exp.c.

Referenced by yyparse().

◆ YYFREE

#define YYFREE   xfree

Definition at line 818 of file c-exp.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1812 of file c-exp.c.

Referenced by yyparse().

◆ YYLAST

#define YYLAST   1742

Definition at line 889 of file c-exp.c.

Referenced by yyparse().

◆ YYMALLOC

#define YYMALLOC   xmalloc

Definition at line 812 of file c-exp.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 1823 of file c-exp.c.

Referenced by yyparse().

◆ YYMAXUTOK

#define YYMAXUTOK   326

Definition at line 901 of file c-exp.c.

◆ YYNNTS

#define YYNNTS   50

Definition at line 894 of file c-exp.c.

◆ YYNOMEM

#define YYNOMEM   goto yyexhaustedlab

Definition at line 1656 of file c-exp.c.

Referenced by yyparse().

◆ YYNRULES

#define YYNRULES   285

Definition at line 896 of file c-exp.c.

◆ YYNSTATES

#define YYNSTATES   442

Definition at line 898 of file c-exp.c.

Referenced by yyparse().

◆ YYNTOKENS

#define YYNTOKENS   96

Definition at line 892 of file c-exp.c.

Referenced by yy_symbol_print(), and yyparse().

◆ YYPACT_NINF

#define YYPACT_NINF   (-225)

Definition at line 1034 of file c-exp.c.

◆ yypact_value_is_default

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

Definition at line 1036 of file c-exp.c.

Referenced by yyparse().

◆ YYPOPSTACK

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

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 652 of file c-exp.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 651 of file c-exp.c.

Referenced by yyparse().

◆ YYPULL

#define YYPULL   1

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

◆ YYPURE

#define YYPURE   0

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

◆ YYPUSH

#define YYPUSH   0

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

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 1659 of file c-exp.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition c-exp.c:652
#define YY_CAST(Type, Val)
Definition c-exp.c:168
#define YYSIZE_T
Definition c-exp.c:665

Definition at line 669 of file c-exp.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

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

Referenced by yyparse().

◆ YYSIZEOF

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

Definition at line 675 of file c-exp.c.

Referenced by yyparse().

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

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

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 798 of file c-exp.c.

Referenced by yyparse().

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 801 of file c-exp.c.

◆ YYSTACK_BYTES

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

Definition at line 842 of file c-exp.c.

Referenced by yyparse().

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 799 of file c-exp.c.

Referenced by yyparse().

◆ YYSTACK_GAP_MAXIMUM

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

Definition at line 838 of file c-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 853 of file c-exp.c.

Referenced by yyparse().

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-128)

Definition at line 1039 of file c-exp.c.

◆ yytable_value_is_error

#define yytable_value_is_error ( Yyn)     0

Definition at line 1041 of file c-exp.c.

Referenced by yyparse().

◆ YYTOKENTYPE

#define YYTOKENTYPE

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

◆ YYTRANSLATE

#define YYTRANSLATE ( YYX)
Value:
(0 <= (YYX) && (YYX) <= YYMAXUTOK \
static const yytype_int8 yytranslate[]
Definition c-exp.c:913
c_exp_yysymbol_kind_t
Definition c-exp.c:399
@ YYSYMBOL_YYUNDEF
Definition c-exp.c:403
#define YYMAXUTOK
Definition c-exp.c:901

Definition at line 906 of file c-exp.c.

Referenced by yyparse().

◆ YYUNDEF

#define YYUNDEF   257

Definition at line 278 of file c-exp.c.

Referenced by yyparse().

Typedef Documentation

◆ c_exp_YYSTYPE

typedef union c_exp_YYSTYPE c_exp_YYSTYPE

Definition at line 384 of file c-exp.c.

◆ c_exp_yysymbol_kind_t

Definition at line 548 of file c-exp.c.

◆ yy_state_fast_t

typedef int yy_state_fast_t

Definition at line 682 of file c-exp.c.

◆ yy_state_t

Definition at line 679 of file c-exp.c.

◆ yytoken_kind_t

Definition at line 272 of file c-exp.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 603 of file c-exp.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 595 of file c-exp.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 635 of file c-exp.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
YYENOMEM 

Definition at line 1648 of file c-exp.c.

◆ c_exp_yysymbol_kind_t

Enumerator
YYSYMBOL_YYEMPTY 
YYSYMBOL_YYEOF 
YYSYMBOL_YYerror 
YYSYMBOL_YYUNDEF 
YYSYMBOL_INT 
YYSYMBOL_COMPLEX_INT 
YYSYMBOL_FLOAT 
YYSYMBOL_COMPLEX_FLOAT 
YYSYMBOL_STRING 
YYSYMBOL_NSSTRING 
YYSYMBOL_SELECTOR 
YYSYMBOL_CHAR 
YYSYMBOL_NAME 
YYSYMBOL_UNKNOWN_CPP_NAME 
YYSYMBOL_COMPLETE 
YYSYMBOL_TYPENAME 
YYSYMBOL_CLASSNAME 
YYSYMBOL_OBJC_LBRAC 
YYSYMBOL_NAME_OR_INT 
YYSYMBOL_OPERATOR 
YYSYMBOL_STRUCT 
YYSYMBOL_CLASS 
YYSYMBOL_UNION 
YYSYMBOL_ENUM 
YYSYMBOL_SIZEOF 
YYSYMBOL_ALIGNOF 
YYSYMBOL_UNSIGNED 
YYSYMBOL_COLONCOLON 
YYSYMBOL_TEMPLATE 
YYSYMBOL_ERROR 
YYSYMBOL_NEW 
YYSYMBOL_DELETE 
YYSYMBOL_REINTERPRET_CAST 
YYSYMBOL_DYNAMIC_CAST 
YYSYMBOL_STATIC_CAST 
YYSYMBOL_CONST_CAST 
YYSYMBOL_ENTRY 
YYSYMBOL_TYPEOF 
YYSYMBOL_DECLTYPE 
YYSYMBOL_TYPEID 
YYSYMBOL_SIGNED_KEYWORD 
YYSYMBOL_LONG 
YYSYMBOL_SHORT 
YYSYMBOL_INT_KEYWORD 
YYSYMBOL_CONST_KEYWORD 
YYSYMBOL_VOLATILE_KEYWORD 
YYSYMBOL_DOUBLE_KEYWORD 
YYSYMBOL_RESTRICT 
YYSYMBOL_ATOMIC 
YYSYMBOL_FLOAT_KEYWORD 
YYSYMBOL_COMPLEX 
YYSYMBOL_DOLLAR_VARIABLE 
YYSYMBOL_ASSIGN_MODIFY 
YYSYMBOL_TRUEKEYWORD 
YYSYMBOL_FALSEKEYWORD 
YYSYMBOL_54_ 
YYSYMBOL_ABOVE_COMMA 
YYSYMBOL_56_ 
YYSYMBOL_57_ 
YYSYMBOL_OROR 
YYSYMBOL_ANDAND 
YYSYMBOL_60_ 
YYSYMBOL_61_ 
YYSYMBOL_62_ 
YYSYMBOL_EQUAL 
YYSYMBOL_NOTEQUAL 
YYSYMBOL_65_ 
YYSYMBOL_66_ 
YYSYMBOL_LEQ 
YYSYMBOL_GEQ 
YYSYMBOL_LSH 
YYSYMBOL_RSH 
YYSYMBOL_71_ 
YYSYMBOL_72_ 
YYSYMBOL_73_ 
YYSYMBOL_74_ 
YYSYMBOL_75_ 
YYSYMBOL_76_ 
YYSYMBOL_UNARY 
YYSYMBOL_INCREMENT 
YYSYMBOL_DECREMENT 
YYSYMBOL_ARROW 
YYSYMBOL_ARROW_STAR 
YYSYMBOL_82_ 
YYSYMBOL_DOT_STAR 
YYSYMBOL_84_ 
YYSYMBOL_85_ 
YYSYMBOL_BLOCKNAME 
YYSYMBOL_FILENAME 
YYSYMBOL_DOTDOTDOT 
YYSYMBOL_89_ 
YYSYMBOL_90_ 
YYSYMBOL_91_ 
YYSYMBOL_92_ 
YYSYMBOL_93_ 
YYSYMBOL_94_ 
YYSYMBOL_95_ 
YYSYMBOL_YYACCEPT 
YYSYMBOL_start 
YYSYMBOL_type_exp 
YYSYMBOL_exp1 
YYSYMBOL_exp 
YYSYMBOL_101_1 
YYSYMBOL_102_2 
YYSYMBOL_103_3 
YYSYMBOL_msglist 
YYSYMBOL_msgarglist 
YYSYMBOL_msgarg 
YYSYMBOL_107_4 
YYSYMBOL_108_5 
YYSYMBOL_lcurly 
YYSYMBOL_arglist 
YYSYMBOL_function_method 
YYSYMBOL_function_method_void 
YYSYMBOL_function_method_void_or_typelist 
YYSYMBOL_rcurly 
YYSYMBOL_string_exp 
YYSYMBOL_block 
YYSYMBOL_variable 
YYSYMBOL_qualified_name 
YYSYMBOL_const_or_volatile 
YYSYMBOL_single_qualifier 
YYSYMBOL_qualifier_seq_noopt 
YYSYMBOL_qualifier_seq 
YYSYMBOL_ptr_operator 
YYSYMBOL_124_6 
YYSYMBOL_125_7 
YYSYMBOL_ptr_operator_ts 
YYSYMBOL_abs_decl 
YYSYMBOL_direct_abs_decl 
YYSYMBOL_array_mod 
YYSYMBOL_func_mod 
YYSYMBOL_type 
YYSYMBOL_scalar_type 
YYSYMBOL_typebase 
YYSYMBOL_type_name 
YYSYMBOL_parameter_typelist 
YYSYMBOL_nonempty_typelist 
YYSYMBOL_ptype 
YYSYMBOL_conversion_type_id 
YYSYMBOL_conversion_declarator 
YYSYMBOL_const_and_volatile 
YYSYMBOL_const_or_volatile_noopt 
YYSYMBOL_oper 
YYSYMBOL_field_name 
YYSYMBOL_name 
YYSYMBOL_name_not_typename 

Definition at line 398 of file c-exp.c.

◆ token_flag

enum token_flag
Enumerator
FLAG_CXX 
FLAG_C 
FLAG_SHADOW 

Definition at line 5111 of file c-exp.c.

◆ yytokentype

Enumerator
YYEMPTY 
YYEOF 
YYerror 
YYUNDEF 
INT 
COMPLEX_INT 
FLOAT 
COMPLEX_FLOAT 
STRING 
NSSTRING 
SELECTOR 
CHAR 
NAME 
UNKNOWN_CPP_NAME 
COMPLETE 
TYPENAME 
CLASSNAME 
OBJC_LBRAC 
NAME_OR_INT 
OPERATOR 
STRUCT 
CLASS 
UNION 
ENUM 
SIZEOF 
ALIGNOF 
UNSIGNED 
COLONCOLON 
TEMPLATE 
ERROR 
NEW 
DELETE 
REINTERPRET_CAST 
DYNAMIC_CAST 
STATIC_CAST 
CONST_CAST 
ENTRY 
TYPEOF 
DECLTYPE 
TYPEID 
SIGNED_KEYWORD 
LONG 
SHORT 
INT_KEYWORD 
CONST_KEYWORD 
VOLATILE_KEYWORD 
DOUBLE_KEYWORD 
RESTRICT 
ATOMIC 
FLOAT_KEYWORD 
COMPLEX 
DOLLAR_VARIABLE 
ASSIGN_MODIFY 
TRUEKEYWORD 
FALSEKEYWORD 
ABOVE_COMMA 
OROR 
ANDAND 
EQUAL 
NOTEQUAL 
LEQ 
GEQ 
LSH 
RSH 
UNARY 
INCREMENT 
DECREMENT 
ARROW 
ARROW_STAR 
DOT_STAR 
BLOCKNAME 
FILENAME 
DOTDOTDOT 

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

Function Documentation

◆ c_parse()

int c_parse ( struct parser_state * par_state)

◆ c_parse_escape()

int c_parse_escape ( const char ** ptr,
struct obstack * output )

◆ check_parameter_typelist()

static void check_parameter_typelist ( std::vector< struct type * > * params)
static

Definition at line 4570 of file c-exp.c.

References check_typedef(), code, and type.

Referenced by yyparse().

◆ classify_inner_name()

static int classify_inner_name ( struct parser_state * par_state,
const struct block * block,
struct type * context )
static

◆ classify_name()

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

◆ DEF_ENUM_FLAGS_TYPE()

DEF_ENUM_FLAGS_TYPE ( enum token_flag,
token_flags  )

◆ finished_macro_expansion()

static void finished_macro_expansion ( void )
static

Definition at line 5257 of file c-exp.c.

References cpstate, parser_state::lexptr, c_parse_state::macro_original_text, and pstate.

Referenced by lex_one_token().

◆ is_cast_operator()

static int is_cast_operator ( const char * token,
int len )
static

Definition at line 5270 of file c-exp.c.

References token.

Referenced by lex_one_token().

◆ lex_one_token()

static int lex_one_token ( struct parser_state * par_state,
bool * is_quoted_name )
static

◆ operator_stoken()

static struct stoken operator_stoken ( const char * op)
static

Definition at line 4529 of file c-exp.c.

References CP_OPERATOR_LEN, CP_OPERATOR_STR, cpstate, stoken::length, stoken::ptr, c_parse_state::strings, and xmalloc().

Referenced by yyparse().

◆ parse_number()

static int parse_number ( struct parser_state * par_state,
const char * buf,
int len,
int parsed_float,
c_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

◆ scan_macro_expansion()

static void scan_macro_expansion ( const char * expansion)
static

◆ scanning_macro_expansion()

static int scanning_macro_expansion ( void )
static

Definition at line 5251 of file c-exp.c.

References cpstate, and c_parse_state::macro_original_text.

Referenced by lex_one_token().

◆ type_aggregate_p()

static int type_aggregate_p ( struct type * type)
static

Definition at line 4558 of file c-exp.c.

References type::code(), and type::is_declared_class().

Referenced by classify_inner_name(), and yyparse().

◆ typename_stoken()

static struct stoken typename_stoken ( const char * type)
static

Definition at line 4548 of file c-exp.c.

References stoken::length, and type.

Referenced by yyparse().

◆ xfree()

void xfree ( void * )

Referenced by yyparse().

◆ xmalloc()

void * xmalloc ( YYSIZE_T )

Referenced by operator_stoken(), and yyparse().

◆ yy_reduce_print()

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

Definition at line 1774 of file c-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 1751 of file c-exp.c.

References YYFPRINTF.

◆ yy_symbol_print()

static void yy_symbol_print ( FILE * yyo,
c_exp_yysymbol_kind_t yykind,
c_exp_YYSTYPE const *const yyvaluep )
static

Definition at line 1735 of file c-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,
c_exp_yysymbol_kind_t yykind,
c_exp_YYSTYPE const *const yyvaluep )
static

Definition at line 1717 of file c-exp.c.

References YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, and YY_USE.

Referenced by yy_symbol_print().

◆ yydestruct()

static void yydestruct ( const char * yymsg,
c_exp_yysymbol_kind_t yykind,
c_exp_YYSTYPE * yyvaluep )
static

◆ yyerror()

static void yyerror ( const char * msg)
static

Definition at line 6162 of file c-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 1866 of file c-exp.c.

References symbol::aclass(), add_msglist(), parser_state::arglist_len, parser_state::block_tracker, c_print_type(), C_STRING, C_STRING_16, C_STRING_32, C_WIDE_STRING, check_parameter_typelist(), check_typedef(), copy_name(), cp_canonicalize_string(), cpstate, type_stack::create(), destructor_name_p(), parser_state::end_arglist(), end_msglist(), parser_state::expression_context_block, find_function_alias_target(), find_gnu_ifunc(), flags, type_stack::follow_type_instance_flags(), type_stack::follow_types(), expr_builder::gdbarch(), have_full_symbols(), have_partial_symbols(), init_complex_type(), type_stack::insert(), symbol::is_argument(), language_defn::la_language, expr_builder::language(), language_opencl, stoken_vector::len, type::length(), stoken::length, typed_stoken::length, LOC_BLOCK, lookup_bound_minimal_symbol(), lookup_enum(), lookup_objc_class(), lookup_signed_typename(), lookup_struct(), lookup_symbol(), lookup_template_type(), lookup_typename(), lookup_union(), lookup_unsigned_typename(), parser_state::mark_completion_tag(), parser_state::mark_struct_expression(), bound_minimal_symbol::minsym, mst_data_gnu_ifunc, mst_text_gnu_ifunc, name, type::name(), operator_stoken(), parse_number(), parse_type, parser_state::pop(), parser_state::pop_vector(), pstate, stoken::ptr, typed_stoken::ptr, type_stack::push(), parser_state::push(), parser_state::push_c_string(), parser_state::push_dollar(), parser_state::push_new(), parser_state::push_symbol(), string_file::release(), parser_state::start_arglist(), start_msglist(), symbol::symbol(), block_symbol::symbol, symbol_read_needs_frame(), target_float_from_host_double(), type::target_type(), stoken_vector::tokens, tp_array, tp_atomic, tp_const, tp_pointer, tp_reference, tp_restrict, tp_rvalue_reference, tp_volatile, c_exp_YYSTYPE::type, type, typed_stoken::type, minimal_symbol::type(), field_of_this_result::type, type_aggregate_p(), TYPE_IS_REFERENCE, c_parse_state::type_lists, type_print_raw_options, TYPE_SAFE_NAME, c_parse_state::type_stack, c_parse_state::type_stacks, c_exp_YYSTYPE::typed_val_int, typename_stoken(), innermost_block_tracker::update(), c_exp_YYSTYPE::val, symbol::value_block(), VAR_DOMAIN, parser_state::wrap(), parser_state::wrap2(), xfree(), xmalloc(), YY_, YY_ACCESSING_SYMBOL, YY_ASSERT, YY_CAST, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_IGNORE_USELESS_CAST_BEGIN, YY_IGNORE_USELESS_CAST_END, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, YYerror, YYERROR, yyerror, YYFINAL, YYINITDEPTH, YYLAST, yylen, yylex(), yylhs, yylloc, yylval, YYMAXDEPTH, yynerrs, YYNOMEM, YYNSTATES, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, YYPTRDIFF_T, yyr1, yyr2, YYSIZE_T, YYSIZEOF, yyss, c_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, c_exp_yyalloc::yyvs_alloc, and yyvsp.

Referenced by c_parse().

◆ yysymbol_name()

static const char * yysymbol_name ( c_exp_yysymbol_kind_t yysymbol)
static

Definition at line 1028 of file c-exp.c.

References yytname.

Referenced by yy_symbol_print().

Variable Documentation

◆ cpstate

struct c_parse_state* cpstate
static

◆ expression_macro_scope

struct macro_scope* expression_macro_scope
static

Definition at line 5279 of file c-exp.c.

Referenced by c_parse(), and lex_one_token().

◆ ident_tokens

const struct c_token ident_tokens[]
static

Definition at line 5176 of file c-exp.c.

Referenced by lex_one_token().

◆ last_was_structop

bool last_was_structop
static

Definition at line 5288 of file c-exp.c.

Referenced by c_parse(), lex_one_token(), f_language::parser(), go_language::parser(), and yylex().

◆ name_obstack

auto_obstack name_obstack
static

Definition at line 5697 of file c-exp.c.

Referenced by c_parse(), go_language::parser(), and yylex().

◆ paren_depth

int paren_depth
static

Definition at line 5291 of file c-exp.c.

Referenced by c_parse(), and lex_one_token().

◆ popping

int popping
static

Definition at line 5693 of file c-exp.c.

Referenced by c_parse(), go_language::parser(), and yylex().

◆ pstate

struct parser_state* pstate = NULL
static

◆ saw_name_at_eof

int saw_name_at_eof
static

Definition at line 5284 of file c-exp.c.

Referenced by c_parse(), lex_one_token(), f_language::parser(), and go_language::parser().

◆ tempbuf

struct obstack tempbuf
static

◆ tempbuf_init

int tempbuf_init
static

Definition at line 4840 of file c-exp.c.

Referenced by parse_string_or_char().

◆ token_fifo

std::vector<c_token_and_value> token_fifo
static

Definition at line 5690 of file c-exp.c.

Referenced by c_parse(), go_language::parser(), and yylex().

◆ tokentab2

const struct c_token tokentab2[]
static
Initial value:
=
{
{"+=", ASSIGN_MODIFY, BINOP_ADD, 0},
{"-=", ASSIGN_MODIFY, BINOP_SUB, 0},
{"*=", ASSIGN_MODIFY, BINOP_MUL, 0},
{"/=", ASSIGN_MODIFY, BINOP_DIV, 0},
{"%=", ASSIGN_MODIFY, BINOP_REM, 0},
{"|=", ASSIGN_MODIFY, BINOP_BITWISE_IOR, 0},
{"&=", ASSIGN_MODIFY, BINOP_BITWISE_AND, 0},
{"^=", ASSIGN_MODIFY, BINOP_BITWISE_XOR, 0},
{"++", INCREMENT, OP_NULL, 0},
{"--", DECREMENT, OP_NULL, 0},
{"->", ARROW, OP_NULL, 0},
{"&&", ANDAND, OP_NULL, 0},
{"||", OROR, OP_NULL, 0},
{"::", COLONCOLON, OP_NULL, 0},
{"<<", LSH, OP_NULL, 0},
{">>", RSH, OP_NULL, 0},
{"==", EQUAL, OP_NULL, 0},
{"!=", NOTEQUAL, OP_NULL, 0},
{"<=", LEQ, OP_NULL, 0},
{">=", GEQ, OP_NULL, 0},
{".*", DOT_STAR, OP_NULL, FLAG_CXX}
}
#define LEQ
Definition c-exp.c:335
#define NOTEQUAL
Definition c-exp.c:334
#define EQUAL
Definition c-exp.c:333
#define RSH
Definition c-exp.c:338
#define DOT_STAR
Definition c-exp.c:344
#define ARROW
Definition c-exp.c:342
#define LSH
Definition c-exp.c:337
@ FLAG_CXX
Definition c-exp.c:5115
#define OROR
Definition c-exp.c:331
#define DECREMENT
Definition c-exp.c:341
#define ASSIGN_MODIFY
Definition c-exp.c:327
#define GEQ
Definition c-exp.c:336
#define COLONCOLON
Definition c-exp.c:302
#define ANDAND
Definition c-exp.c:332
#define INCREMENT
Definition c-exp.c:340

Definition at line 5145 of file c-exp.c.

Referenced by lex_one_token().

◆ tokentab3

const struct c_token tokentab3[]
static
Initial value:
=
{
{">>=", ASSIGN_MODIFY, BINOP_RSH, 0},
{"<<=", ASSIGN_MODIFY, BINOP_LSH, 0},
{"->*", ARROW_STAR, OP_NULL, FLAG_CXX},
{"...", DOTDOTDOT, OP_NULL, 0}
}
#define DOTDOTDOT
Definition c-exp.c:347
#define ARROW_STAR
Definition c-exp.c:343

Definition at line 5137 of file c-exp.c.

Referenced by lex_one_token().

◆ yychar

int yychar

Definition at line 1851 of file c-exp.c.

Referenced by yyparse().

◆ yycheck

const yytype_int16 yycheck[]
static

Definition at line 1349 of file c-exp.c.

Referenced by yyparse().

◆ yydebug

int yydebug

Definition at line 1801 of file c-exp.c.

Referenced by c_parse().

◆ yydefact

const yytype_int16 yydefact[]
static

Definition at line 1098 of file c-exp.c.

Referenced by yyparse().

◆ yydefgoto

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
0, 58, 173, 174, 61, 236, 237, 238, 355, 356,
357, 323, 233, 62, 212, 63, 64, 65, 328, 66,
67, 68, 69, 393, 70, 71, 403, 225, 407, 338,
226, 227, 228, 229, 230, 72, 73, 74, 141, 343,
326, 75, 118, 247, 394, 395, 76, 313, 358, 77
}

Definition at line 1158 of file c-exp.c.

Referenced by yyparse().

◆ yylval

c_exp_YYSTYPE yylval

Definition at line 1854 of file c-exp.c.

Referenced by classify_inner_name(), classify_name(), lex_one_token(), yylex(), and yyparse().

◆ yynerrs

int yynerrs

Definition at line 1856 of file c-exp.c.

Referenced by yyparse().

◆ yypact

const yytype_int16 yypact[]
static

Definition at line 1046 of file c-exp.c.

Referenced by yyparse().

◆ yypgoto

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-225, -225, 5, 15, -12, -225, -225, -225, -124, -225,
48, -225, -225, -225, -220, -225, -225, -225, 194, -225,
-225, -225, -151, 8, -70, -72, 14, -114, -225, -225,
-225, 212, 197, -224, -222, -122, 396, 17, 407, 234,
-225, -225, -225, 213, -225, -225, -7, 256, 3, 441
}

Definition at line 1148 of file c-exp.c.

Referenced by yyparse().

◆ yyr1

const yytype_uint8 yyr1[]
static

Definition at line 1580 of file c-exp.c.

Referenced by yyparse().

◆ yyr2

const yytype_int8 yyr2[]
static

Definition at line 1614 of file c-exp.c.

Referenced by yy_reduce_print(), and yyparse().

◆ yyrline

const yytype_int16 yyrline[]
static

Definition at line 952 of file c-exp.c.

Referenced by yy_reduce_print().

◆ yystos

const yytype_uint8 yystos[]
static

Definition at line 1530 of file c-exp.c.

◆ yytable

const yytype_int16 yytable[]
static

Definition at line 1170 of file c-exp.c.

Referenced by yyparse().

◆ yytname

const char* const yytname[]
static
Initial value:
=
{
"\"end of file\"", "error", "\"invalid token\"", "INT", "COMPLEX_INT",
"FLOAT", "COMPLEX_FLOAT", "STRING", "NSSTRING", "SELECTOR", "CHAR",
"NAME", "UNKNOWN_CPP_NAME", "COMPLETE", "TYPENAME", "CLASSNAME",
"OBJC_LBRAC", "NAME_OR_INT", "OPERATOR", "STRUCT", "CLASS", "UNION",
"ENUM", "SIZEOF", "ALIGNOF", "UNSIGNED", "COLONCOLON", "TEMPLATE",
"ERROR", "NEW", "DELETE", "REINTERPRET_CAST", "DYNAMIC_CAST",
"STATIC_CAST", "CONST_CAST", "ENTRY", "TYPEOF", "DECLTYPE", "TYPEID",
"SIGNED_KEYWORD", "LONG", "SHORT", "INT_KEYWORD", "CONST_KEYWORD",
"VOLATILE_KEYWORD", "DOUBLE_KEYWORD", "RESTRICT", "ATOMIC",
"FLOAT_KEYWORD", "COMPLEX", "DOLLAR_VARIABLE", "ASSIGN_MODIFY",
"TRUEKEYWORD", "FALSEKEYWORD", "','", "ABOVE_COMMA", "'='", "'?'",
"OROR", "ANDAND", "'|'", "'^'", "'&'", "EQUAL", "NOTEQUAL", "'<'", "'>'",
"LEQ", "GEQ", "LSH", "RSH", "'@'", "'+'", "'-'", "'*'", "'/'", "'%'",
"UNARY", "INCREMENT", "DECREMENT", "ARROW", "ARROW_STAR", "'.'",
"DOT_STAR", "'['", "'('", "BLOCKNAME", "FILENAME", "DOTDOTDOT", "')'",
"'!'", "'~'", "']'", "':'", "'{'", "'}'", "$accept", "start", "type_exp",
"exp1", "exp", "$@1", "$@2", "$@3", "msglist", "msgarglist", "msgarg",
"$@4", "$@5", "lcurly", "arglist", "function_method",
"function_method_void", "function_method_void_or_typelist", "rcurly",
"string_exp", "block", "variable", "qualified_name", "const_or_volatile",
"single_qualifier", "qualifier_seq_noopt", "qualifier_seq",
"ptr_operator", "$@6", "$@7", "ptr_operator_ts", "abs_decl",
"direct_abs_decl", "array_mod", "func_mod", "type", "scalar_type",
"typebase", "type_name", "parameter_typelist", "nonempty_typelist",
"ptype", "conversion_type_id", "conversion_declarator",
"const_and_volatile", "const_or_volatile_noopt", "oper", "field_name",
"name", "name_not_typename", YY_NULLPTRPTR
}
#define YY_NULLPTRPTR
Definition c-exp.c:180

Definition at line 996 of file c-exp.c.

Referenced by yysymbol_name().

◆ yytranslate

const yytype_int8 yytranslate[]
static

Definition at line 913 of file c-exp.c.