GDB (xrefs)
Classes | Macros | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/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 "bfd.h"
#include "symfile.h"
#include "objfiles.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 "yy-remap.h"
#include <stddef.h>

Go to the source code of this file.

Classes

union  YYSTYPE
 
union  yyalloc
 
struct  token
 
struct  token_and_value
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.0.4"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   0
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define parse_type(ps)   builtin_type (parse_gdbarch (ps))
 
#define GDB_YY_REMAP_PREFIX   c_
 
#define YY_NULLPTRPTR   0
 
#define YYERROR_VERBOSE   0
 
#define YYTOKENTYPE
 
#define INT   258
 
#define FLOAT   259
 
#define STRING   260
 
#define NSSTRING   261
 
#define SELECTOR   262
 
#define CHAR   263
 
#define NAME   264
 
#define UNKNOWN_CPP_NAME   265
 
#define COMPLETE   266
 
#define TYPENAME   267
 
#define CLASSNAME   268
 
#define OBJC_LBRAC   269
 
#define NAME_OR_INT   270
 
#define OPERATOR   271
 
#define STRUCT   272
 
#define CLASS   273
 
#define UNION   274
 
#define ENUM   275
 
#define SIZEOF   276
 
#define UNSIGNED   277
 
#define COLONCOLON   278
 
#define TEMPLATE   279
 
#define ERROR   280
 
#define NEW   281
 
#define DELETE   282
 
#define REINTERPRET_CAST   283
 
#define DYNAMIC_CAST   284
 
#define STATIC_CAST   285
 
#define CONST_CAST   286
 
#define ENTRY   287
 
#define TYPEOF   288
 
#define DECLTYPE   289
 
#define TYPEID   290
 
#define SIGNED_KEYWORD   291
 
#define LONG   292
 
#define SHORT   293
 
#define INT_KEYWORD   294
 
#define CONST_KEYWORD   295
 
#define VOLATILE_KEYWORD   296
 
#define DOUBLE_KEYWORD   297
 
#define VARIABLE   298
 
#define ASSIGN_MODIFY   299
 
#define TRUEKEYWORD   300
 
#define FALSEKEYWORD   301
 
#define ABOVE_COMMA   302
 
#define OROR   303
 
#define ANDAND   304
 
#define EQUAL   305
 
#define NOTEQUAL   306
 
#define LEQ   307
 
#define GEQ   308
 
#define LSH   309
 
#define RSH   310
 
#define UNARY   311
 
#define INCREMENT   312
 
#define DECREMENT   313
 
#define ARROW   314
 
#define ARROW_STAR   315
 
#define DOT_STAR   316
 
#define BLOCKNAME   317
 
#define FILENAME   318
 
#define DOTDOTDOT   319
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYPRINT(FILE, TYPE, VALUE)   c_print_token (FILE, TYPE, VALUE)
 
#define YYSIZE_T   size_t
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_(Msgid)   Msgid
 
#define YY_ATTRIBUTE(Spec)   /* empty */
 
#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
 
#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))
 
#define YYUSE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#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(Dst, Src, Count)
 
#define YYFINAL   169
 
#define YYLAST   1705
 
#define YYNTOKENS   89
 
#define YYNNTS   49
 
#define YYNRULES   267
 
#define YYNSTATES   421
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   319
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -218
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-218)))
 
#define YYTABLE_NINF   -126
 
#define yytable_value_is_error(Yytable_value)   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 YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYDPRINTF(Args)
 
#define YY_LOCATION_PRINT(File, Loc)   ((void) 0)
 
#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 signed char 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, _AND_ = 271, OR = 272, XOR = 273,
  THEN = 274, ELSE = 275, NOTEQUAL = 276, LEQ = 277,
  GEQ = 278, IN = 279, DOTDOT = 280, UNARY = 281,
  MOD = 282, REM = 283, STARSTAR = 284, ABS = 285,
  NOT = 286, VAR = 287, ARROW = 288, TICK_ACCESS = 289,
  TICK_ADDRESS = 290, TICK_FIRST = 291, TICK_LAST = 292, TICK_LENGTH = 293,
  TICK_MAX = 294, TICK_MIN = 295, TICK_MODULUS = 296, TICK_POS = 297,
  TICK_RANGE = 298, TICK_SIZE = 299, TICK_TAG = 300, TICK_VAL = 301,
  NEW = 302, OTHERS = 303, INT = 258, FLOAT = 259,
  STRING = 260, NSSTRING = 261, SELECTOR = 262, CHAR = 263,
  NAME = 264, UNKNOWN_CPP_NAME = 265, COMPLETE = 266, TYPENAME = 267,
  CLASSNAME = 268, OBJC_LBRAC = 269, NAME_OR_INT = 270, OPERATOR = 271,
  STRUCT = 272, CLASS = 273, UNION = 274, ENUM = 275,
  SIZEOF = 276, UNSIGNED = 277, COLONCOLON = 278, TEMPLATE = 279,
  ERROR = 280, NEW = 281, DELETE = 282, REINTERPRET_CAST = 283,
  DYNAMIC_CAST = 284, STATIC_CAST = 285, CONST_CAST = 286, ENTRY = 287,
  TYPEOF = 288, DECLTYPE = 289, TYPEID = 290, SIGNED_KEYWORD = 291,
  LONG = 292, SHORT = 293, INT_KEYWORD = 294, CONST_KEYWORD = 295,
  VOLATILE_KEYWORD = 296, DOUBLE_KEYWORD = 297, VARIABLE = 298, ASSIGN_MODIFY = 299,
  TRUEKEYWORD = 300, FALSEKEYWORD = 301, ABOVE_COMMA = 302, OROR = 303,
  ANDAND = 304, EQUAL = 305, NOTEQUAL = 306, LEQ = 307,
  GEQ = 308, LSH = 309, RSH = 310, UNARY = 311,
  INCREMENT = 312, DECREMENT = 313, ARROW = 314, ARROW_STAR = 315,
  DOT_STAR = 316, BLOCKNAME = 317, FILENAME = 318, DOTDOTDOT = 319,
  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,
  EQUAL = 298, NOTEQUAL = 299, LEQ = 300, GEQ = 301,
  LSH = 302, RSH = 303, UNARY = 304, INCREMENT = 305,
  DECREMENT = 306, ARROW = 307, IDENTIFIER = 258, UNKNOWN_NAME = 259,
  TYPENAME = 260, COMPLETE = 261, NAME_OR_INT = 262, INTEGER_LITERAL = 263,
  FLOAT_LITERAL = 264, CHARACTER_LITERAL = 265, STRING_LITERAL = 266, ENTRY = 267,
  ERROR = 268, TRUE_KEYWORD = 269, FALSE_KEYWORD = 270, NULL_KEYWORD = 271,
  SUPER_KEYWORD = 272, CAST_KEYWORD = 273, SIZEOF_KEYWORD = 274, TYPEOF_KEYWORD = 275,
  TYPEID_KEYWORD = 276, INIT_KEYWORD = 277, IMMUTABLE_KEYWORD = 278, CONST_KEYWORD = 279,
  SHARED_KEYWORD = 280, STRUCT_KEYWORD = 281, UNION_KEYWORD = 282, CLASS_KEYWORD = 283,
  INTERFACE_KEYWORD = 284, ENUM_KEYWORD = 285, TEMPLATE_KEYWORD = 286, DELEGATE_KEYWORD = 287,
  FUNCTION_KEYWORD = 288, DOLLAR_VARIABLE = 289, ASSIGN_MODIFY = 290, OROR = 291,
  ANDAND = 292, EQUAL = 293, NOTEQUAL = 294, LEQ = 295,
  GEQ = 296, LSH = 297, RSH = 298, HATHAT = 299,
  IDENTITY = 300, NOTIDENTITY = 301, INCREMENT = 302, DECREMENT = 303,
  DOTDOT = 304, 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, EQUAL = 286, NOTEQUAL = 287, LESSTHAN = 288,
  GREATERTHAN = 289, LEQ = 290, GEQ = 291, LSH = 292,
  RSH = 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, EQUAL = 290,
  NOTEQUAL = 291, LEQ = 292, GEQ = 293, LSH = 294,
  RSH = 295, UNARY = 296, INCREMENT = 297, DECREMENT = 298,
  LEFT_ARROW = 299, 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,
  LEQ = 293, GEQ = 294, NOTEQUAL = 295, IN = 296,
  OROR = 297, LOGICAL_AND = 298, DIV = 299, MOD = 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,
  LEQ = 282, GEQ = 283, LSH = 284, RSH = 285,
  DIV = 286, MOD = 287, UNARY = 288, INCREMENT = 289,
  DECREMENT = 290, ARROW = 291, BLOCKNAME = 292, GDBVAR = 258,
  IDENT = 259, COMPLETE = 260, INTEGER = 261, DECIMAL_INTEGER = 262,
  STRING = 263, BYTESTRING = 264, FLOAT = 265, COMPOUND_ASSIGN = 266,
  KW_AS = 267, KW_IF = 268, KW_TRUE = 269, KW_FALSE = 270,
  KW_SUPER = 271, KW_SELF = 272, KW_MUT = 273, KW_EXTERN = 274,
  KW_CONST = 275, KW_FN = 276, KW_SIZEOF = 277, DOTDOT = 278,
  OROR = 279, ANDAND = 280, EQEQ = 281, NOTEQ = 282,
  LTEQ = 283, GTEQ = 284, LSH = 285, RSH = 286,
  COLONCOLON = 287, ARROW = 288, UNARY = 289
}
 
enum  token_flag { FLAG_CXX = 1, FLAG_SHADOW = 2 }
 

Functions

int yyparse (void)
 
static int yylex (void)
 
void yyerror (const char *)
 
static int type_aggregate_p (struct type *)
 
static int parse_number (struct parser_state *par_state, const char *, int, int, YYSTYPE *)
 
static struct stoken operator_stoken (const char *)
 
static void check_parameter_typelist (VEC(type_ptr) *)
 
static void write_destructor_name (struct parser_state *par_state, struct stoken)
 
static void c_print_token (FILE *file, int type, YYSTYPE value)
 
void * xmalloc (YYSIZE_T)
 
void xfree (void *)
 
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 (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
 
static void yydestruct (const char *yymsg, int yytype, 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 (char *expansion)
 
static int scanning_macro_expansion (void)
 
static void finished_macro_expansion (void)
 
static void scan_macro_cleanup (void *dummy)
 
static int is_cast_operator (const char *token, int len)
 
static int lex_one_token (struct parser_state *par_state, int *is_quoted_name)
 
 DEF_VEC_O (token_and_value)
 
static VEC (token_and_value)
 
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
 
int yydebug
 
YYSTYPE yylval
 
static const yytype_uint8 yytranslate []
 
static const yytype_uint16 yyrline []
 
static const char *const yytname []
 
static const yytype_uint16 yytoknum []
 
static const yytype_int16 yypact []
 
static const yytype_uint16 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_uint8 yyr2 []
 
int yychar
 
int yynerrs
 
static struct obstack tempbuf
 
static int tempbuf_init
 
static const struct token tokentab3 []
 
static const struct token tokentab2 []
 
static const struct token ident_tokens []
 
static const char * macro_original_text
 
static struct obstack expansion_obstack
 
static struct macro_scopeexpression_macro_scope
 
static int saw_name_at_eof
 
static int last_was_structop
 

Macro Definition Documentation

◆ ABOVE_COMMA

#define ABOVE_COMMA   302

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

◆ ANDAND

#define ANDAND   304

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

◆ ARROW

#define ARROW   314

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

Referenced by lex_one_token().

◆ ARROW_STAR

#define ARROW_STAR   315

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

◆ ASSIGN_MODIFY

#define ASSIGN_MODIFY   299

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

◆ BLOCKNAME

#define BLOCKNAME   317

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

Referenced by c_print_token(), and VEC().

◆ CHAR

#define CHAR   263

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

Referenced by c_print_token(), lex_one_token(), and parse_string_or_char().

◆ CLASS

#define CLASS   273

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

◆ CLASSNAME

#define CLASSNAME   268

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

Referenced by VEC().

◆ COLONCOLON

#define COLONCOLON   278

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

Referenced by yylex().

◆ COMPLETE

#define COMPLETE   266

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

Referenced by lex_one_token().

◆ CONST_CAST

#define CONST_CAST   286

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

◆ CONST_KEYWORD

#define CONST_KEYWORD   295

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

◆ DECLTYPE

#define DECLTYPE   289

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

◆ DECREMENT

#define DECREMENT   313

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

◆ DELETE

#define DELETE   282

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

◆ DOT_STAR

#define DOT_STAR   316

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

◆ DOTDOTDOT

#define DOTDOTDOT   319

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

◆ DOUBLE_KEYWORD

#define DOUBLE_KEYWORD   297

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

◆ DYNAMIC_CAST

#define DYNAMIC_CAST   284

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

◆ ENTRY

#define ENTRY   287

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

Referenced by lex_one_token().

◆ ENUM

#define ENUM   275

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

◆ EQUAL

#define EQUAL   305

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

◆ ERROR

#define ERROR   280

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

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

◆ FALSEKEYWORD

#define FALSEKEYWORD   301

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

◆ FILENAME

#define FILENAME   318

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

Referenced by c_print_token(), VEC(), and yylex().

◆ FLOAT

#define FLOAT   259

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

Referenced by parse_number().

◆ GDB_YY_REMAP_PREFIX

#define GDB_YY_REMAP_PREFIX   c_

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

◆ GEQ

#define GEQ   308

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

◆ INCREMENT

#define INCREMENT   312

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

◆ INT

#define INT   258

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

Referenced by c_print_token(), parse_number(), and VEC().

◆ INT_KEYWORD

#define INT_KEYWORD   294

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

◆ LEQ

#define LEQ   307

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

◆ LONG

#define LONG   292

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

◆ LSH

#define LSH   309

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

◆ NAME

#define NAME   264

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

Referenced by c_print_token(), classify_inner_name(), lex_one_token(), VEC(), and yylex().

◆ NAME_OR_INT

#define NAME_OR_INT   270

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

Referenced by c_print_token(), and VEC().

◆ NEW

#define NEW   281

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

◆ NOTEQUAL

#define NOTEQUAL   306

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

◆ NSSTRING

#define NSSTRING   261

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

Referenced by c_print_token(), and parse_string_or_char().

◆ OBJC_LBRAC

#define OBJC_LBRAC   269

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

Referenced by lex_one_token().

◆ OPERATOR

#define OPERATOR   271

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

◆ OROR

#define OROR   303

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

◆ parse_type

#define parse_type (   ps)    builtin_type (parse_gdbarch (ps))

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

Referenced by parse_number(), and yyparse().

◆ REINTERPRET_CAST

#define REINTERPRET_CAST   283

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

◆ RSH

#define RSH   310

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

◆ SELECTOR

#define SELECTOR   262

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

Referenced by lex_one_token().

◆ SHORT

#define SHORT   293

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

◆ SIGNED_KEYWORD

#define SIGNED_KEYWORD   291

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

◆ SIZEOF

#define SIZEOF   276

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

◆ STATIC_CAST

#define STATIC_CAST   285

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

◆ STRING

#define STRING   260

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

Referenced by c_print_token(), and parse_string_or_char().

◆ STRUCT

#define STRUCT   272

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

◆ TEMPLATE

#define TEMPLATE   279

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

◆ TRUEKEYWORD

#define TRUEKEYWORD   300

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

◆ TYPEID

#define TYPEID   290

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

◆ TYPENAME

#define TYPENAME   267

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

Referenced by c_print_token(), classify_inner_name(), VEC(), and yylex().

◆ TYPEOF

#define TYPEOF   288

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

◆ UNARY

#define UNARY   311

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

◆ UNION

#define UNION   274

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

◆ UNKNOWN_CPP_NAME

#define UNKNOWN_CPP_NAME   265

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

Referenced by c_print_token(), and VEC().

◆ UNSIGNED

#define UNSIGNED   277

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

◆ VARIABLE

#define VARIABLE   298

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

Referenced by c_print_token(), and lex_one_token().

◆ VOLATILE_KEYWORD

#define VOLATILE_KEYWORD   296

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

◆ YY_

#define YY_ (   Msgid)    Msgid

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

Referenced by yyparse().

◆ YY_ATTRIBUTE

#define YY_ATTRIBUTE (   Spec)    /* empty */

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

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))

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

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))

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

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

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

Referenced by yydestruct(), and yyparse().

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

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

Referenced by yydestruct(), and yyparse().

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

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

◆ YY_LOCATION_PRINT

#define YY_LOCATION_PRINT (   File,
  Loc 
)    ((void) 0)

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

◆ YY_NULLPTRPTR

#define YY_NULLPTRPTR   0

Definition at line 113 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)
#define yyssp
#define yyvsp
int yydebug
Definition: c-exp.c:1465

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

Referenced by yyparse().

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)
Value:
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
} while (0)
int yydebug
Definition: c-exp.c:1465

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

Referenced by yyparse().

◆ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
Value:
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
int yydebug
Definition: c-exp.c:1465

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

Referenced by yydestruct(), and yyparse().

◆ YYABORT

#define YYABORT   goto yyabortlab

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

Referenced by yyparse().

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

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

Referenced by yyparse().

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
#define yylen
#define yyssp
if(!(yy_init))
Definition: ada-lex.c:1075
#define YYEMPTY
Definition: c-exp.c:1311
int yychar
Definition: c-exp.c:1734
#define YY_(Msgid)
Definition: c-exp.c:384

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

◆ YYBISON

#define YYBISON   1

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

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.0.4"

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

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

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

◆ YYCOPY

#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)

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

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

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

◆ YYDPRINTF

#define YYDPRINTF (   Args)
Value:
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (0)
int yydebug
Definition: c-exp.c:1465

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

Referenced by yyparse().

◆ YYEMPTY

#define YYEMPTY   (-2)

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

Referenced by yyparse().

◆ YYEOF

#define YYEOF   0

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

Referenced by yyparse().

◆ YYERRCODE

#define YYERRCODE   256

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

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

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

◆ YYERROR

#define YYERROR   goto yyerrorlab

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

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE   0

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

◆ YYFINAL

#define YYFINAL   169

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

Referenced by yyparse().

◆ YYFREE

#define YYFREE   xfree

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

◆ YYINITDEPTH

#define YYINITDEPTH   200

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

Referenced by yyparse().

◆ YYLAST

#define YYLAST   1705

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

Referenced by yyparse().

◆ YYMALLOC

#define YYMALLOC   xmalloc

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

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

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

Referenced by yyparse().

◆ YYMAXUTOK

#define YYMAXUTOK   319

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

◆ YYNNTS

#define YYNNTS   49

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

◆ YYNRULES

#define YYNRULES   267

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

◆ YYNSTATES

#define YYNSTATES   421

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

◆ YYNTOKENS

#define YYNTOKENS   89

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

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

◆ YYPACT_NINF

#define YYPACT_NINF   -218

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

◆ yypact_value_is_default

#define yypact_value_is_default (   Yystate)    (!!((Yystate) == (-218)))

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

Referenced by yyparse().

◆ YYPOPSTACK

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

Referenced by yyparse().

◆ YYPRINT

#define YYPRINT (   FILE,
  TYPE,
  VALUE 
)    c_print_token (FILE, TYPE, VALUE)

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

Referenced by yy_symbol_value_print().

◆ YYPULL

#define YYPULL   1

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

◆ YYPURE

#define YYPURE   0

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

◆ YYPUSH

#define YYPUSH   0

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

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

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

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

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

◆ YYSIZE_T

#define YYSIZE_T   size_t

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

Referenced by yyparse().

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

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

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

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

Referenced by yyparse().

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

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

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
#define YYSTACK_GAP_MAXIMUM
Definition: c-exp.c:521
union YYSTYPE YYSTYPE
Definition: c-exp.c:303
short int yytype_int16
Definition: ada-exp.c:342

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

Referenced by yyparse().

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

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

Referenced by yyparse().

◆ YYSTACK_GAP_MAXIMUM

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)

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

◆ YYSTACK_RELOCATE

#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
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 (0)
#define YYSTACK_GAP_MAXIMUM
Definition: c-exp.c:521
#define yystacksize

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

Referenced by yyparse().

◆ YYSTYPE_IS_DECLARED

#define YYSTYPE_IS_DECLARED   1

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

◆ YYSTYPE_IS_TRIVIAL

#define YYSTYPE_IS_TRIVIAL   1

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

◆ YYTABLE_NINF

#define YYTABLE_NINF   -126

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

◆ yytable_value_is_error

#define yytable_value_is_error (   Yytable_value)    0

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

Referenced by yyparse().

◆ YYTERROR

#define YYTERROR   1

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

Referenced by yyparse().

◆ YYTOKENTYPE

#define YYTOKENTYPE

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

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

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

Referenced by yyparse().

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

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

◆ YYUSE

#define YYUSE (   E)    ((void) (E))

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

Referenced by yy_symbol_value_print(), and yydestruct().

Typedef Documentation

◆ YYSTYPE

typedef union YYSTYPE YYSTYPE

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

◆ yytype_int16

typedef short int yytype_int16

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

◆ yytype_int8

typedef signed char yytype_int8

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

◆ yytype_uint16

typedef unsigned short int yytype_uint16

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

◆ yytype_uint8

typedef unsigned char yytype_uint8

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

Enumeration Type Documentation

◆ token_flag

enum token_flag
Enumerator
FLAG_CXX 
FLAG_SHADOW 

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

◆ yytokentype

Enumerator
INT 
NULL_PTR 
CHARLIT 
FLOAT 
TRUEKEYWORD 
FALSEKEYWORD 
COLONCOLON 
STRING 
NAME 
DOT_ID 
DOT_ALL 
SPECIAL_VARIABLE 
ASSIGN 
_AND_ 
OR 
XOR 
THEN 
ELSE 
NOTEQUAL 
LEQ 
GEQ 
IN 
DOTDOT 
UNARY 
MOD 
REM 
STARSTAR 
ABS 
NOT 
VAR 
ARROW 
TICK_ACCESS 
TICK_ADDRESS 
TICK_FIRST 
TICK_LAST 
TICK_LENGTH 
TICK_MAX 
TICK_MIN 
TICK_MODULUS 
TICK_POS 
TICK_RANGE 
TICK_SIZE 
TICK_TAG 
TICK_VAL 
NEW 
OTHERS 
INT 
FLOAT 
STRING 
NSSTRING 
SELECTOR 
CHAR 
NAME 
UNKNOWN_CPP_NAME 
COMPLETE 
TYPENAME 
CLASSNAME 
OBJC_LBRAC 
NAME_OR_INT 
OPERATOR 
STRUCT 
CLASS 
UNION 
ENUM 
SIZEOF 
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 
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 
INT 
FLOAT 
NAME 
STRUCT 
CLASS 
UNION 
ENUM 
SIZEOF 
UNSIGNED 
COLONCOLON 
TEMPLATE 
ERROR 
NEW 
DELETE 
OPERATOR 
STATIC_CAST 
REINTERPRET_CAST 
DYNAMIC_CAST 
SIGNED_KEYWORD 
LONG 
SHORT 
INT_KEYWORD 
CONST_KEYWORD 
VOLATILE_KEYWORD 
DOUBLE_KEYWORD 
BOOL 
ELLIPSIS 
RESTRICT 
VOID 
FLOAT_KEYWORD 
CHAR 
WCHAR_T 
ASSIGN_MODIFY 
TRUEKEYWORD 
FALSEKEYWORD 
DEMANGLER_SPECIAL 
CONSTRUCTION_VTABLE 
CONSTRUCTION_IN 
OROR 
ANDAND 
EQUAL 
NOTEQUAL 
LEQ 
GEQ 
LSH 
RSH 
UNARY 
INCREMENT 
DECREMENT 
ARROW 
IDENTIFIER 
UNKNOWN_NAME 
TYPENAME 
COMPLETE 
NAME_OR_INT 
INTEGER_LITERAL 
FLOAT_LITERAL 
CHARACTER_LITERAL 
STRING_LITERAL 
ENTRY 
ERROR 
TRUE_KEYWORD 
FALSE_KEYWORD 
NULL_KEYWORD 
SUPER_KEYWORD 
CAST_KEYWORD 
SIZEOF_KEYWORD 
TYPEOF_KEYWORD 
TYPEID_KEYWORD 
INIT_KEYWORD 
IMMUTABLE_KEYWORD 
CONST_KEYWORD 
SHARED_KEYWORD 
STRUCT_KEYWORD 
UNION_KEYWORD 
CLASS_KEYWORD 
INTERFACE_KEYWORD 
ENUM_KEYWORD 
TEMPLATE_KEYWORD 
DELEGATE_KEYWORD 
FUNCTION_KEYWORD 
DOLLAR_VARIABLE 
ASSIGN_MODIFY 
OROR 
ANDAND 
EQUAL 
NOTEQUAL 
LEQ 
GEQ 
LSH 
RSH 
HATHAT 
IDENTITY 
NOTIDENTITY 
INCREMENT 
DECREMENT 
DOTDOT 
INT 
FLOAT 
STRING_LITERAL 
BOOLEAN_LITERAL 
NAME 
TYPENAME 
NAME_OR_INT 
SIZEOF 
ERROR 
INT_KEYWORD 
INT_S2_KEYWORD 
LOGICAL_S1_KEYWORD 
LOGICAL_S2_KEYWORD 
LOGICAL_S8_KEYWORD 
LOGICAL_KEYWORD 
REAL_KEYWORD 
REAL_S8_KEYWORD 
REAL_S16_KEYWORD 
COMPLEX_S8_KEYWORD 
COMPLEX_S16_KEYWORD 
COMPLEX_S32_KEYWORD 
BOOL_AND 
BOOL_OR 
BOOL_NOT 
CHARACTER 
VARIABLE 
ASSIGN_MODIFY 
ABOVE_COMMA 
EQUAL 
NOTEQUAL 
LESSTHAN 
GREATERTHAN 
LEQ 
GEQ 
LSH 
RSH 
STARSTAR 
UNARY 
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 
INT 
HEX 
ERROR 
UINT 
M2_TRUE 
M2_FALSE 
CHAR 
FLOAT 
STRING 
NAME 
BLOCKNAME 
IDENT 
VARNAME 
TYPENAME 
SIZE 
CAP 
ORD 
HIGH 
ABS 
MIN_FUNC 
MAX_FUNC 
FLOAT_FUNC 
VAL 
CHR 
ODD 
TRUNC 
TSIZE 
INC 
DEC 
INCL 
EXCL 
COLONCOLON 
INTERNAL_VAR 
ABOVE_COMMA 
ASSIGN 
LEQ 
GEQ 
NOTEQUAL 
IN 
OROR 
LOGICAL_AND 
DIV 
MOD 
UNARY 
DOT 
NOT 
QID 
INT 
FLOAT 
STRING 
FIELDNAME 
COMPLETE 
NAME 
TYPENAME 
NAME_OR_INT 
STRUCT 
CLASS 
SIZEOF 
COLONCOLON 
ERROR 
VARIABLE 
THIS 
TRUEKEYWORD 
FALSEKEYWORD 
ABOVE_COMMA 
ASSIGN 
NOT 
OR 
XOR 
ANDAND 
NOTEQUAL 
LEQ 
GEQ 
LSH 
RSH 
DIV 
MOD 
UNARY 
INCREMENT 
DECREMENT 
ARROW 
BLOCKNAME 
GDBVAR 
IDENT 
COMPLETE 
INTEGER 
DECIMAL_INTEGER 
STRING 
BYTESTRING 
FLOAT 
COMPOUND_ASSIGN 
KW_AS 
KW_IF 
KW_TRUE 
KW_FALSE 
KW_SUPER 
KW_SELF 
KW_MUT 
KW_EXTERN 
KW_CONST 
KW_FN 
KW_SIZEOF 
DOTDOT 
OROR 
ANDAND 
EQEQ 
NOTEQ 
LTEQ 
GTEQ 
LSH 
RSH 
COLONCOLON 
ARROW 
UNARY 

Definition at line 137 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 
)

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

References _, error(), HOST_ESCAPE_CHAR, and obstack_grow_str.

Referenced by get_character_constant(), get_string_literal(), and parse_string_or_char().

◆ c_print_token()

static void c_print_token ( FILE *  file,
int  type,
YYSTYPE  value 
)
static

◆ check_parameter_typelist()

static void check_parameter_typelist ( VEC(type_ptr) *  params)
static

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

References _, check_typedef(), error(), type, TYPE_CODE, TYPE_CODE_VOID, VEC_free, VEC_iterate, and VEC_length.

Referenced by yyparse().

◆ classify_inner_name()

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

◆ DEF_ENUM_FLAGS_TYPE()

DEF_ENUM_FLAGS_TYPE ( enum  token_flag,
token_flags   
)

◆ DEF_VEC_O()

DEF_VEC_O ( token_and_value  )

◆ finished_macro_expansion()

static void finished_macro_expansion ( void  )
static

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

References gdb_assert, lexptr, and macro_original_text.

Referenced by lex_one_token(), and scan_macro_cleanup().

◆ is_cast_operator()

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

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

Referenced by lex_one_token().

◆ lex_one_token()

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

◆ operator_stoken()

static struct stoken operator_stoken ( const char *  op)
static

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

References CP_OPERATOR_LEN, CP_OPERATOR_STR, stoken::length, make_cleanup(), stoken::ptr, xfree(), and xmalloc().

Referenced by yyparse().

◆ parse_number()

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

static void scan_macro_cleanup ( void *  dummy)
static

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

References expansion_obstack, finished_macro_expansion(), and macro_original_text.

Referenced by c_parse().

◆ scan_macro_expansion()

static void scan_macro_expansion ( char *  expansion)
static

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

References expansion_obstack, gdb_assert, lexptr, macro_original_text, and xfree().

Referenced by lex_one_token().

◆ scanning_macro_expansion()

static int scanning_macro_expansion ( void  )
static

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

References macro_original_text.

Referenced by lex_one_token().

◆ type_aggregate_p()

static int type_aggregate_p ( struct type type)
static

◆ VEC()

static VEC ( token_and_value  )
static

◆ write_destructor_name()

static void write_destructor_name ( struct parser_state par_state,
struct stoken  token 
)
static

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

References write_exp_string().

Referenced by yyparse().

◆ xfree()

void xfree ( void *  )

◆ xmalloc()

void* xmalloc ( YYSIZE_T  )

Referenced by operator_stoken(), and yyparse().

◆ yy_reduce_print()

static void yy_reduce_print ( yytype_int16 yyssp,
YYSTYPE yyvsp,
int  yyrule 
)
static

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

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

◆ yy_stack_print()

static void yy_stack_print ( yytype_int16 yybottom,
yytype_int16 yytop 
)
static

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

References YYFPRINTF.

◆ yy_symbol_print()

static void yy_symbol_print ( FILE *  yyoutput,
int  yytype,
YYSTYPE const *const  yyvaluep 
)
static

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

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

Referenced by yy_reduce_print().

◆ yy_symbol_value_print()

static void yy_symbol_value_print ( FILE *  yyoutput,
int  yytype,
YYSTYPE const *const  yyvaluep 
)
static

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

References YYNTOKENS, YYPRINT, yytoknum, and YYUSE.

Referenced by yy_symbol_print().

◆ yydestruct()

static void yydestruct ( const char *  yymsg,
int  yytype,
YYSTYPE yyvaluep 
)
static

◆ yyerror()

void yyerror ( const char *  msg)

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

References _, error(), lexptr, and prev_lexptr.

Referenced by yyparse().

◆ yylex()

static int yylex ( void  )
static

◆ yyparse()

int yyparse ( void  )

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

References _, add_msglist(), append_type_stack(), arglist_len, block_symbol::block, c_print_type(), string_file::c_str(), C_STRING, C_STRING_16, C_STRING_32, C_WIDE_STRING, check_parameter_typelist(), check_typedef(), contained_in(), copy_name(), cp_canonicalize_string(), destructor_name_p(), end_arglist(), end_msglist(), error(), expression_context_block, find_function_alias_target(), follow_type_instance_flags(), follow_types(), get_type_stack(), have_full_symbols(), have_partial_symbols(), if(), innermost_block, insert_type(), insert_type_address_space(), internal_error(), stoken_vector::len, stoken::length, typed_stoken::length, type::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(), make_cleanup(), mark_completion_tag(), mark_struct_expression(), bound_minimal_symbol::minsym, name, operator_stoken(), parse_gdbarch, parse_language, parse_number(), parse_type, pstate, stoken::ptr, typed_stoken::ptr, push_type(), push_type_int(), push_type_stack(), push_typelist(), start_arglist(), start_msglist(), string, string_file::string(), block_symbol::symbol, SYMBOL_BLOCK_VALUE, SYMBOL_CLASS, SYMBOL_IS_ARGUMENT, symbol_read_needs_frame(), stoken_vector::tokens, tp_array, tp_const, tp_pointer, tp_reference, tp_rvalue_reference, tp_volatile, typed_stoken::type, YYSTYPE::type, field_of_this_result::type, type_aggregate_p(), TYPE_CODE_ENUM, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_IS_REFERENCE, TYPE_LENGTH, TYPE_NAME, type_print_raw_options, TYPE_SAFE_NAME, type_stack_cleanup(), TYPE_TARGET_TYPE, YYSTYPE::typed_val_int, YYSTYPE::val, VAR_DOMAIN, VEC(), VEC_free, VEC_iterate, VEC_length, VEC_safe_push, write_destructor_name(), write_dollar_variable(), write_exp_elt_block(), write_exp_elt_floatcst(), write_exp_elt_longcst(), write_exp_elt_opcode(), write_exp_elt_sym(), write_exp_elt_type(), write_exp_msymbol(), write_exp_string(), write_exp_string_vector(), xfree(), xmalloc(), XNEW, XRESIZEVEC, YY_, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror(), YYFINAL, YYINITDEPTH, YYLAST, yylen, yylex(), yylloc, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, yyss, yyalloc::yyss_alloc, yyssp, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystacksize, yystate, yystos, yytable, yytable_value_is_error, YYTERROR, YYTRANSLATE, yyval, yyvs, yyalloc::yyvs_alloc, and yyvsp.

Referenced by c_parse().

Variable Documentation

◆ expansion_obstack

struct obstack expansion_obstack
static

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

Referenced by c_parse(), scan_macro_cleanup(), scan_macro_expansion(), and yylex().

◆ expression_macro_scope

struct macro_scope* expression_macro_scope
static

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

Referenced by c_parse(), and lex_one_token().

◆ ident_tokens

const struct token ident_tokens[]
static

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

Referenced by lex_one_token().

◆ last_was_structop

int last_was_structop
static

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

Referenced by c_parse(), and lex_one_token().

◆ macro_original_text

const char* macro_original_text
static

◆ pstate

struct parser_state* pstate = NULL
static

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

Referenced by c_parse(), yylex(), and yyparse().

◆ saw_name_at_eof

int saw_name_at_eof
static

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

Referenced by c_parse(), and lex_one_token().

◆ tempbuf

struct obstack tempbuf
static

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

Referenced by go_demangle(), parse_string_or_char(), procfs_xfer_partial(), and yylex().

◆ tempbuf_init

int tempbuf_init
static

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

Referenced by parse_string_or_char().

◆ tokentab2

const struct 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, BINOP_END, 0},
{"--", DECREMENT, BINOP_END, 0},
{"->", ARROW, BINOP_END, 0},
{"&&", ANDAND, BINOP_END, 0},
{"||", OROR, BINOP_END, 0},
{"::", COLONCOLON, BINOP_END, 0},
{"<<", LSH, BINOP_END, 0},
{">>", RSH, BINOP_END, 0},
{"==", EQUAL, BINOP_END, 0},
{"!=", NOTEQUAL, BINOP_END, 0},
{"<=", LEQ, BINOP_END, 0},
{">=", GEQ, BINOP_END, 0},
{".*", DOT_STAR, BINOP_END, FLAG_CXX}
}
#define NOTEQUAL
Definition: c-exp.c:252
#define COLONCOLON
Definition: c-exp.c:224
#define LSH
Definition: c-exp.c:255
#define DECREMENT
Definition: c-exp.c:259
#define INCREMENT
Definition: c-exp.c:258
#define RSH
Definition: c-exp.c:256
#define ANDAND
Definition: c-exp.c:250
#define ASSIGN_MODIFY
Definition: c-exp.c:245
#define GEQ
Definition: c-exp.c:254
#define LEQ
Definition: c-exp.c:253
#define OROR
Definition: c-exp.c:249
#define EQUAL
Definition: c-exp.c:251
#define DOT_STAR
Definition: c-exp.c:262
#define ARROW
Definition: c-exp.c:260

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

Referenced by lex_one_token().

◆ tokentab3

const struct token tokentab3[]
static
Initial value:
=
{
{">>=", ASSIGN_MODIFY, BINOP_RSH, 0},
{"<<=", ASSIGN_MODIFY, BINOP_LSH, 0},
{"->*", ARROW_STAR, BINOP_END, FLAG_CXX},
{"...", DOTDOTDOT, BINOP_END, 0}
}
#define ARROW_STAR
Definition: c-exp.c:261
#define ASSIGN_MODIFY
Definition: c-exp.c:245
#define DOTDOTDOT
Definition: c-exp.c:265

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

Referenced by lex_one_token().

◆ yychar

int yychar

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

Referenced by yyparse().

◆ yycheck

const yytype_int16 yycheck[]
static

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

Referenced by yyparse().

◆ yydebug

int yydebug

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

Referenced by c_parse().

◆ yydefact

const yytype_uint16 yydefact[]
static

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

Referenced by yyparse().

◆ yydefgoto

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 50, 165, 166, 53, 229, 230, 231, 341, 342,
343, 307, 226, 54, 204, 55, 56, 57, 312, 58,
59, 60, 61, 209, 62, 63, 64, 384, 218, 388,
324, 219, 220, 221, 222, 223, 65, 66, 134, 329,
310, 67, 112, 240, 68, 69, 70, 344, 71
}

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

Referenced by yyparse().

◆ yylval

YYSTYPE yylval

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

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

◆ yynerrs

int yynerrs

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

Referenced by yyparse().

◆ yypact

const yytype_int16 yypact[]
static

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

Referenced by yyparse().

◆ yypgoto

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-218, -218, 2, 13, -10, -218, -218, -218, -45, -218,
45, -218, -218, -218, -214, -218, -218, -218, 198, -218,
-218, -218, -39, -218, -188, -218, -65, 16, -108, -218,
-218, -218, 200, 216, -217, -215, -123, 15, 390, 237,
-218, -218, -218, 201, -218, -184, -5, 3, 404
}

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

Referenced by yyparse().

◆ yyr1

const yytype_uint8 yyr1[]
static
Initial value:
=
{
0, 89, 90, 90, 91, 91, 91, 91, 92, 92,
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
93, 93, 93, 93, 93, 93, 93, 93, 93, 94,
93, 95, 93, 96, 93, 97, 97, 98, 98, 99,
99, 99, 100, 93, 93, 101, 93, 102, 103, 103,
103, 104, 105, 93, 106, 106, 93, 107, 93, 93,
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
93, 93, 93, 93, 93, 93, 108, 108, 93, 93,
93, 93, 109, 109, 109, 110, 110, 111, 111, 111,
110, 110, 110, 112, 113, 113, 114, 115, 115, 116,
116, 118, 117, 119, 117, 117, 117, 117, 117, 120,
121, 121, 121, 122, 122, 122, 122, 122, 123, 123,
123, 123, 124, 124, 125, 126, 126, 126, 126, 126,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
126, 126, 126, 127, 127, 127, 127, 128, 128, 129,
129, 130, 130, 131, 132, 132, 133, 133, 134, 134,
134, 135, 135, 135, 135, 135, 135, 135, 135, 135,
135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
135, 135, 135, 135, 135, 135, 135, 135, 136, 136,
136, 136, 136, 136, 137, 137, 137, 137
}

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

Referenced by yyparse().

◆ yyr2

const yytype_uint8 yyr2[]
static
Initial value:
=
{
0, 2, 1, 1, 1, 4, 4, 4, 1, 3,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
4, 4, 2, 3, 4, 3, 4, 5, 3, 3,
3, 4, 3, 4, 5, 3, 3, 4, 4, 0,
5, 0, 5, 0, 5, 1, 1, 1, 2, 3,
2, 2, 0, 5, 3, 0, 5, 1, 0, 1,
3, 5, 4, 1, 1, 1, 3, 1, 3, 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, 7, 7, 7, 7, 1, 2, 1, 1,
1, 1, 1, 1, 3, 2, 3, 3, 4, 5,
1, 2, 1, 2, 1, 0, 3, 1, 1, 1,
0, 0, 4, 0, 3, 1, 2, 1, 2, 1,
2, 1, 1, 3, 2, 1, 2, 1, 2, 2,
3, 3, 2, 3, 1, 1, 1, 1, 1, 2,
3, 2, 3, 3, 3, 2, 2, 3, 4, 3,
3, 4, 3, 4, 3, 4, 2, 3, 2, 3,
2, 3, 1, 2, 2, 2, 3, 2, 2, 3,
2, 2, 3, 2, 2, 3, 2, 1, 2, 1,
5, 2, 2, 1, 1, 1, 1, 1, 3, 1,
3, 1, 2, 2, 0, 2, 2, 2, 1, 1,
1, 2, 2, 4, 4, 4, 4, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 3, 3, 3, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1
}

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

Referenced by yy_reduce_print(), and yyparse().

◆ yyrline

const yytype_uint16 yyrline[]
static
Initial value:
=
{
0, 227, 227, 228, 231, 235, 239, 245, 252, 253,
258, 262, 266, 270, 274, 278, 282, 286, 290, 294,
298, 302, 306, 310, 316, 323, 333, 339, 346, 354,
358, 364, 371, 381, 387, 394, 402, 406, 410, 420,
419, 443, 442, 459, 458, 467, 469, 472, 473, 476,
478, 480, 487, 484, 498, 508, 507, 533, 537, 540,
544, 548, 571, 582, 589, 590, 593, 601, 604, 611,
615, 619, 625, 629, 633, 637, 641, 645, 649, 653,
657, 661, 665, 669, 673, 677, 681, 685, 689, 693,
697, 701, 705, 709, 716, 723, 732, 745, 752, 755,
761, 768, 788, 793, 797, 801, 808, 825, 843, 876,
885, 893, 903, 911, 917, 928, 943, 965, 978, 1002,
1011, 1012, 1040, 1111, 1115, 1116, 1119, 1122, 1123, 1127,
1128, 1133, 1132, 1136, 1135, 1138, 1140, 1142, 1144, 1148,
1157, 1159, 1160, 1163, 1165, 1172, 1179, 1185, 1192, 1194,
1196, 1198, 1202, 1204, 1216, 1220, 1222, 1226, 1230, 1234,
1238, 1242, 1246, 1250, 1254, 1258, 1262, 1266, 1270, 1274,
1278, 1282, 1286, 1290, 1294, 1298, 1302, 1306, 1310, 1314,
1318, 1322, 1326, 1332, 1338, 1341, 1346, 1352, 1355, 1360,
1366, 1369, 1374, 1380, 1383, 1388, 1394, 1398, 1402, 1406,
1413, 1417, 1419, 1423, 1424, 1432, 1440, 1451, 1453, 1462,
1468, 1475, 1476, 1483, 1487, 1488, 1491, 1492, 1495, 1499,
1501, 1505, 1507, 1509, 1511, 1513, 1515, 1517, 1519, 1521,
1523, 1525, 1527, 1529, 1531, 1533, 1535, 1537, 1539, 1541,
1543, 1583, 1585, 1587, 1589, 1591, 1593, 1595, 1597, 1599,
1601, 1603, 1605, 1607, 1609, 1611, 1613, 1615, 1632, 1633,
1634, 1635, 1636, 1637, 1640, 1641, 1649, 1661
}

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

Referenced by yy_reduce_print().

◆ yystos

const yytype_uint8 yystos[]
static

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

Referenced by yy_reduce_print(), and yyparse().

◆ yytable

const yytype_int16 yytable[]
static

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

Referenced by yyparse().

◆ yytname

const char* const yytname[]
static
Initial value:
=
{
"$end", "error", "$undefined", "INT", "FLOAT", "STRING", "NSSTRING",
"SELECTOR", "CHAR", "NAME", "UNKNOWN_CPP_NAME", "COMPLETE", "TYPENAME",
"CLASSNAME", "OBJC_LBRAC", "NAME_OR_INT", "OPERATOR", "STRUCT", "CLASS",
"UNION", "ENUM", "SIZEOF", "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", "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", "space_identifier", "const_or_volatile",
"cv_with_space_id", "const_or_volatile_or_space_identifier_noopt",
"const_or_volatile_or_space_identifier", "ptr_operator", "$@6", "$@7",
"ptr_operator_ts", "abs_decl", "direct_abs_decl", "array_mod",
"func_mod", "type", "typebase", "type_name", "parameter_typelist",
"nonempty_typelist", "ptype", "conversion_type_id",
"conversion_declarator", "const_and_volatile", "const_or_volatile_noopt",
"oper", "name", "name_not_typename", YY_NULLPTRPTR
}
#define YY_NULLPTRPTR
Definition: c-exp.c:113

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

Referenced by yy_symbol_print().

◆ yytoknum

const yytype_uint16 yytoknum[]
static
Initial value:
=
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 44, 302, 61,
63, 303, 304, 124, 94, 38, 305, 306, 60, 62,
307, 308, 309, 310, 64, 43, 45, 42, 47, 37,
311, 312, 313, 314, 315, 46, 316, 91, 40, 317,
318, 319, 41, 33, 126, 93, 58, 123, 125
}

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

Referenced by yy_symbol_value_print().

◆ yytranslate

const yytype_uint8 yytranslate[]
static

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