GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
p-exp.c File Reference
#include "defs.h"
#include <ctype.h>
#include "expression.h"
#include "value.h"
#include "parser-defs.h"
#include "language.h"
#include "p-lang.h"
#include "bfd.h"
#include "symfile.h"
#include "objfiles.h"
#include "block.h"
#include "completer.h"
#include "expop.h"
#include "yy-remap.h"
#include <limits.h>

Go to the source code of this file.

Classes

union  YYSTYPE
 
union  yyalloc
 
struct  type_push
 
struct  token
 

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   pascal_
 
#define YY_CAST(Type, Val)   ((Type) (Val))
 
#define YY_REINTERPRET_CAST(Type, Val)   ((Type) (Val))
 
#define YY_NULLPTRPTR   ((void*)0)
 
#define YYTOKENTYPE
 
#define YYEMPTY   -2
 
#define YYEOF   0
 
#define YYerror   256
 
#define YYUNDEF   257
 
#define INT   258
 
#define FLOAT   259
 
#define STRING   260
 
#define FIELDNAME   261
 
#define COMPLETE   262
 
#define NAME   263
 
#define TYPENAME   264
 
#define NAME_OR_INT   265
 
#define STRUCT   266
 
#define CLASS   267
 
#define SIZEOF   268
 
#define COLONCOLON   269
 
#define ERROR   270
 
#define DOLLAR_VARIABLE   271
 
#define THIS   272
 
#define TRUEKEYWORD   273
 
#define FALSEKEYWORD   274
 
#define ABOVE_COMMA   275
 
#define ASSIGN   276
 
#define NOT   277
 
#define OR   278
 
#define XOR   279
 
#define ANDAND   280
 
#define NOTEQUAL   281
 
#define LEQ   282
 
#define GEQ   283
 
#define LSH   284
 
#define RSH   285
 
#define DIV   286
 
#define MOD   287
 
#define UNARY   288
 
#define INCREMENT   289
 
#define DECREMENT   290
 
#define ARROW   291
 
#define BLOCKNAME   292
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYPTRDIFF_T   long
 
#define YYPTRDIFF_MAXIMUM   LONG_MAX
 
#define YYSIZE_T   unsigned
 
#define YYSIZE_MAXIMUM
 
#define YYSIZEOF(X)   YY_CAST (YYPTRDIFF_T, sizeof (X))
 
#define YY_(Msgid)   Msgid
 
#define YY_ATTRIBUTE_PURE
 
#define YY_ATTRIBUTE_UNUSED
 
#define YY_USE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YY_IGNORE_USELESS_CAST_BEGIN
 
#define YY_IGNORE_USELESS_CAST_END
 
#define YY_ASSERT(E)   ((void) (0 && (E)))
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYMALLOC   xmalloc
 
#define YYFREE   xfree
 
#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYFINAL   3
 
#define YYLAST   377
 
#define YYNTOKENS   53
 
#define YYNNTS   20
 
#define YYNRULES   77
 
#define YYNSTATES   126
 
#define YYMAXUTOK   292
 
#define YYTRANSLATE(YYX)
 
#define YY_ACCESSING_SYMBOL(State)   YY_CAST (yysymbol_kind_t, yystos[State])
 
#define YYPACT_NINF   (-44)
 
#define yypact_value_is_default(Yyn)    ((Yyn) == YYPACT_NINF)
 
#define YYTABLE_NINF   (-61)
 
#define yytable_value_is_error(Yyn)    0
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYNOMEM   goto yyexhaustedlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYERRCODE   YYUNDEF
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 

Typedefs

typedef enum yytokentype yytoken_kind_t
 
typedef union YYSTYPE YYSTYPE
 
typedef enum yysymbol_kind_t yysymbol_kind_t
 
typedef signed char yytype_int8
 
typedef short yytype_int16
 
typedef short yytype_uint8
 
typedef int yytype_uint16
 
typedef yytype_int8 yy_state_t
 
typedef int yy_state_fast_t
 

Enumerations

enum  yytokentype {
  YYEMPTY = -2 , YYEOF = 0 , YYerror = 256 , YYUNDEF = 257 ,
  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 , DOLLAR_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
}
 
enum  yysymbol_kind_t {
  YYSYMBOL_YYEMPTY = -2 , YYSYMBOL_YYEOF = 0 , YYSYMBOL_YYerror = 1 , YYSYMBOL_YYUNDEF = 2 ,
  YYSYMBOL_INT = 3 , YYSYMBOL_FLOAT = 4 , YYSYMBOL_STRING = 5 , YYSYMBOL_FIELDNAME = 6 ,
  YYSYMBOL_COMPLETE = 7 , YYSYMBOL_NAME = 8 , YYSYMBOL_TYPENAME = 9 , YYSYMBOL_NAME_OR_INT = 10 ,
  YYSYMBOL_STRUCT = 11 , YYSYMBOL_CLASS = 12 , YYSYMBOL_SIZEOF = 13 , YYSYMBOL_COLONCOLON = 14 ,
  YYSYMBOL_ERROR = 15 , YYSYMBOL_DOLLAR_VARIABLE = 16 , YYSYMBOL_THIS = 17 , YYSYMBOL_TRUEKEYWORD = 18 ,
  YYSYMBOL_FALSEKEYWORD = 19 , YYSYMBOL_20_ = 20 , YYSYMBOL_ABOVE_COMMA = 21 , YYSYMBOL_ASSIGN = 22 ,
  YYSYMBOL_NOT = 23 , YYSYMBOL_OR = 24 , YYSYMBOL_XOR = 25 , YYSYMBOL_ANDAND = 26 ,
  YYSYMBOL_27_ = 27 , YYSYMBOL_NOTEQUAL = 28 , YYSYMBOL_29_ = 29 , YYSYMBOL_30_ = 30 ,
  YYSYMBOL_LEQ = 31 , YYSYMBOL_GEQ = 32 , YYSYMBOL_LSH = 33 , YYSYMBOL_RSH = 34 ,
  YYSYMBOL_DIV = 35 , YYSYMBOL_MOD = 36 , YYSYMBOL_37_ = 37 , YYSYMBOL_38_ = 38 ,
  YYSYMBOL_39_ = 39 , YYSYMBOL_40_ = 40 , YYSYMBOL_41_ = 41 , YYSYMBOL_UNARY = 42 ,
  YYSYMBOL_INCREMENT = 43 , YYSYMBOL_DECREMENT = 44 , YYSYMBOL_ARROW = 45 , YYSYMBOL_46_ = 46 ,
  YYSYMBOL_47_ = 47 , YYSYMBOL_48_ = 48 , YYSYMBOL_49_ = 49 , YYSYMBOL_BLOCKNAME = 50 ,
  YYSYMBOL_51_ = 51 , YYSYMBOL_52_ = 52 , YYSYMBOL_YYACCEPT = 53 , YYSYMBOL_start = 54 ,
  YYSYMBOL_55_1 = 55 , YYSYMBOL_normal_start = 56 , YYSYMBOL_type_exp = 57 , YYSYMBOL_exp1 = 58 ,
  YYSYMBOL_exp = 59 , YYSYMBOL_field_exp = 60 , YYSYMBOL_61_2 = 61 , YYSYMBOL_62_3 = 62 ,
  YYSYMBOL_arglist = 63 , YYSYMBOL_64_4 = 64 , YYSYMBOL_block = 65 , YYSYMBOL_variable = 66 ,
  YYSYMBOL_qualified_name = 67 , YYSYMBOL_ptype = 68 , YYSYMBOL_type = 69 , YYSYMBOL_typebase = 70 ,
  YYSYMBOL_name = 71 , YYSYMBOL_name_not_typename = 72
}
 
enum  { YYENOMEM = -2 }
 

Functions

int yyparse (void)
 
static int yylex (void)
 
static void yyerror (const char *)
 
static char * uptok (const char *, int)
 
static int parse_number (struct parser_state *, const char *, int, int, YYSTYPE *)
 
static void push_current_type (void)
 
static void pop_current_type (void)
 
void * xmalloc (YYSIZE_T)
 
void xfree (void *)
 
static const char * yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED
 
static void yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep)
 
static void yy_symbol_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep)
 
static void yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
 
static void yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule)
 
static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
 

Variables

static struct parser_statepstate = NULL
 
static int paren_depth
 
int yydebug
 
YYSTYPE yylval
 
static struct typecurrent_type
 
static int leftdiv_is_integer
 
static int search_field
 
static const yytype_int8 yytranslate []
 
static const yytype_int16 yyrline []
 
static const char *const yytname []
 
static const yytype_int16 yypact []
 
static const yytype_int8 yydefact []
 
static const yytype_int8 yypgoto []
 
static const yytype_int8 yydefgoto []
 
static const yytype_int8 yytable []
 
static const yytype_int8 yycheck []
 
static const yytype_int8 yystos []
 
static const yytype_int8 yyr1 []
 
static const yytype_int8 yyr2 []
 
int yychar
 
int yynerrs
 
static struct type_pushtp_top = NULL
 
static const struct token tokentab3 []
 
static const struct token tokentab2 []
 

Macro Definition Documentation

◆ ABOVE_COMMA

#define ABOVE_COMMA   275

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

◆ ANDAND

#define ANDAND   280

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

◆ ARROW

#define ARROW   291

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

◆ ASSIGN

#define ASSIGN   276

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

◆ BLOCKNAME

#define BLOCKNAME   292

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

◆ CLASS

#define CLASS   267

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

◆ COLONCOLON

#define COLONCOLON   269

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

◆ COMPLETE

#define COMPLETE   262

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

◆ DECREMENT

#define DECREMENT   290

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

◆ DIV

#define DIV   286

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

◆ DOLLAR_VARIABLE

#define DOLLAR_VARIABLE   271

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

◆ ERROR

#define ERROR   270

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

◆ FALSEKEYWORD

#define FALSEKEYWORD   274

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

◆ FIELDNAME

#define FIELDNAME   261

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

◆ FLOAT

#define FLOAT   259

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

◆ GDB_YY_REMAP_PREFIX

#define GDB_YY_REMAP_PREFIX   pascal_

Definition at line 91 of file p-exp.c.

◆ GEQ

#define GEQ   283

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

◆ INCREMENT

#define INCREMENT   289

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

◆ INT

#define INT   258

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

◆ LEQ

#define LEQ   282

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

◆ LSH

#define LSH   284

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

◆ MOD

#define MOD   287

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

◆ NAME

#define NAME   263

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

◆ NAME_OR_INT

#define NAME_OR_INT   265

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

◆ NOT

#define NOT   277

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

◆ NOTEQUAL

#define NOTEQUAL   281

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

◆ OR

#define OR   278

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

◆ parse_type

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

Definition at line 87 of file p-exp.c.

◆ RSH

#define RSH   285

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

◆ SIZEOF

#define SIZEOF   268

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

◆ STRING

#define STRING   260

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

◆ STRUCT

#define STRUCT   266

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

◆ THIS

#define THIS   272

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

◆ TRUEKEYWORD

#define TRUEKEYWORD   273

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

◆ TYPENAME

#define TYPENAME   264

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

◆ UNARY

#define UNARY   288

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

◆ XOR

#define XOR   279

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

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 497 of file p-exp.c.

◆ YY_ACCESSING_SYMBOL

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

Accessing symbol of state STATE.

Definition at line 768 of file p-exp.c.

◆ YY_ASSERT

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

Definition at line 563 of file p-exp.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 506 of file p-exp.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 514 of file p-exp.c.

◆ YY_CAST

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

Definition at line 119 of file p-exp.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 543 of file p-exp.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 544 of file p-exp.c.

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 558 of file p-exp.c.

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 559 of file p-exp.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 540 of file p-exp.c.

◆ YY_NULLPTRPTR

#define YY_NULLPTRPTR   ((void*)0)

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

Definition at line 1140 of file p-exp.c.

◆ YY_REINTERPRET_CAST

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

Definition at line 120 of file p-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 1109 of file p-exp.c.

◆ 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 1047 of file p-exp.c.

◆ YY_USE

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

Definition at line 520 of file p-exp.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 1001 of file p-exp.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 1000 of file p-exp.c.

◆ 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 p-exp.c:497
YYSTYPE yylval
Definition p-exp.c:1201
int yychar
Definition p-exp.c:1198
#define YYEMPTY
Definition p-exp.c:192
#define YYERROR
Definition p-exp.c:1002
#define yylen
Definition yy-remap.h:74
#define yystate
Definition yy-remap.h:63

Definition at line 1008 of file p-exp.c.

◆ YYBISON

#define YYBISON   30802

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

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.8.2"

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

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 998 of file p-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 p-exp.c:456

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

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

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

◆ YYDPRINTF

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

Definition at line 1038 of file p-exp.c.

◆ YYEMPTY

#define YYEMPTY   -2

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

◆ YYEOF

#define YYEOF   0

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

◆ YYERRCODE

#define YYERRCODE   YYUNDEF

Definition at line 1027 of file p-exp.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 997 of file p-exp.c.

◆ YYerror

#define YYerror   256

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

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 1002 of file p-exp.c.

◆ YYFINAL

#define YYFINAL   3

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

◆ YYFREE

#define YYFREE   xfree

Definition at line 623 of file p-exp.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1159 of file p-exp.c.

◆ YYLAST

#define YYLAST   377

Definition at line 694 of file p-exp.c.

◆ YYMALLOC

#define YYMALLOC   xmalloc

Definition at line 617 of file p-exp.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

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

◆ YYMAXUTOK

#define YYMAXUTOK   292

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

◆ YYNNTS

#define YYNNTS   20

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

◆ YYNOMEM

#define YYNOMEM   goto yyexhaustedlab

Definition at line 1003 of file p-exp.c.

◆ YYNRULES

#define YYNRULES   77

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

◆ YYNSTATES

#define YYNSTATES   126

Definition at line 703 of file p-exp.c.

◆ YYNTOKENS

#define YYNTOKENS   53

Definition at line 697 of file p-exp.c.

◆ YYPACT_NINF

#define YYPACT_NINF   (-44)

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

◆ yypact_value_is_default

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

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

◆ YYPOPSTACK

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

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 457 of file p-exp.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 456 of file p-exp.c.

◆ YYPULL

#define YYPULL   1

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

◆ YYPURE

#define YYPURE   0

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

◆ YYPUSH

#define YYPUSH   0

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

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

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

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition p-exp.c:457
#define YY_CAST(Type, Val)
Definition p-exp.c:119
#define YYSIZE_T
Definition p-exp.c:470

Definition at line 474 of file p-exp.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 470 of file p-exp.c.

◆ YYSIZEOF

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

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

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

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

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

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

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 606 of file p-exp.c.

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
yytype_uint8 yy_state_t
Definition ada-exp.c:861
#define YYSIZEOF(X)
Definition p-exp.c:480
#define YYSTACK_GAP_MAXIMUM
Definition p-exp.c:643

Definition at line 647 of file p-exp.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 604 of file p-exp.c.

◆ YYSTACK_GAP_MAXIMUM

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

Definition at line 643 of file p-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 658 of file p-exp.c.

◆ YYSTYPE_IS_DECLARED

#define YYSTYPE_IS_DECLARED   1

Definition at line 266 of file p-exp.c.

◆ YYSTYPE_IS_TRIVIAL

#define YYSTYPE_IS_TRIVIAL   1

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

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-61)

Definition at line 804 of file p-exp.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yyn)     0

Definition at line 806 of file p-exp.c.

◆ YYTOKENTYPE

#define YYTOKENTYPE

Definition at line 146 of file p-exp.c.

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)
Value:
(0 <= (YYX) && (YYX) <= YYMAXUTOK \
yysymbol_kind_t
Definition ada-exp.c:647
static const yytype_int8 yytranslate[]
Definition p-exp.c:718
@ YYSYMBOL_YYUNDEF
Definition p-exp.c:283
#define YYMAXUTOK
Definition p-exp.c:706

Definition at line 711 of file p-exp.c.

◆ YYUNDEF

#define YYUNDEF   257

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

Typedef Documentation

◆ yy_state_fast_t

typedef int yy_state_fast_t

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

◆ yy_state_t

Definition at line 484 of file p-exp.c.

◆ YYSTYPE

typedef union YYSTYPE YYSTYPE

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

◆ yysymbol_kind_t

Definition at line 355 of file p-exp.c.

◆ yytoken_kind_t

Definition at line 189 of file p-exp.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 408 of file p-exp.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 400 of file p-exp.c.

◆ yytype_uint16

typedef int yytype_uint16

Definition at line 442 of file p-exp.c.

◆ yytype_uint8

typedef short yytype_uint8

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
YYENOMEM 

Definition at line 995 of file p-exp.c.

◆ yysymbol_kind_t

Enumerator
YYSYMBOL_YYEMPTY 
YYSYMBOL_YYEOF 
YYSYMBOL_YYerror 
YYSYMBOL_YYUNDEF 
YYSYMBOL_INT 
YYSYMBOL_FLOAT 
YYSYMBOL_STRING 
YYSYMBOL_FIELDNAME 
YYSYMBOL_COMPLETE 
YYSYMBOL_NAME 
YYSYMBOL_TYPENAME 
YYSYMBOL_NAME_OR_INT 
YYSYMBOL_STRUCT 
YYSYMBOL_CLASS 
YYSYMBOL_SIZEOF 
YYSYMBOL_COLONCOLON 
YYSYMBOL_ERROR 
YYSYMBOL_DOLLAR_VARIABLE 
YYSYMBOL_THIS 
YYSYMBOL_TRUEKEYWORD 
YYSYMBOL_FALSEKEYWORD 
YYSYMBOL_20_ 
YYSYMBOL_ABOVE_COMMA 
YYSYMBOL_ASSIGN 
YYSYMBOL_NOT 
YYSYMBOL_OR 
YYSYMBOL_XOR 
YYSYMBOL_ANDAND 
YYSYMBOL_27_ 
YYSYMBOL_NOTEQUAL 
YYSYMBOL_29_ 
YYSYMBOL_30_ 
YYSYMBOL_LEQ 
YYSYMBOL_GEQ 
YYSYMBOL_LSH 
YYSYMBOL_RSH 
YYSYMBOL_DIV 
YYSYMBOL_MOD 
YYSYMBOL_37_ 
YYSYMBOL_38_ 
YYSYMBOL_39_ 
YYSYMBOL_40_ 
YYSYMBOL_41_ 
YYSYMBOL_UNARY 
YYSYMBOL_INCREMENT 
YYSYMBOL_DECREMENT 
YYSYMBOL_ARROW 
YYSYMBOL_46_ 
YYSYMBOL_47_ 
YYSYMBOL_48_ 
YYSYMBOL_49_ 
YYSYMBOL_BLOCKNAME 
YYSYMBOL_51_ 
YYSYMBOL_52_ 
YYSYMBOL_YYACCEPT 
YYSYMBOL_start 
YYSYMBOL_55_1 
YYSYMBOL_normal_start 
YYSYMBOL_type_exp 
YYSYMBOL_exp1 
YYSYMBOL_exp 
YYSYMBOL_field_exp 
YYSYMBOL_61_2 
YYSYMBOL_62_3 
YYSYMBOL_arglist 
YYSYMBOL_64_4 
YYSYMBOL_block 
YYSYMBOL_variable 
YYSYMBOL_qualified_name 
YYSYMBOL_ptype 
YYSYMBOL_type 
YYSYMBOL_typebase 
YYSYMBOL_name 
YYSYMBOL_name_not_typename 

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

◆ yytokentype

Enumerator
YYEMPTY 
YYEOF 
YYerror 
YYUNDEF 
INT 
FLOAT 
STRING 
FIELDNAME 
COMPLETE 
NAME 
TYPENAME 
NAME_OR_INT 
STRUCT 
CLASS 
SIZEOF 
COLONCOLON 
ERROR 
DOLLAR_VARIABLE 
THIS 
TRUEKEYWORD 
FALSEKEYWORD 
ABOVE_COMMA 
ASSIGN 
NOT 
OR 
XOR 
ANDAND 
NOTEQUAL 
LEQ 
GEQ 
LSH 
RSH 
DIV 
MOD 
UNARY 
INCREMENT 
DECREMENT 
ARROW 
BLOCKNAME 

Definition at line 147 of file p-exp.c.

Function Documentation

◆ parse_number()

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

◆ pop_current_type()

static void pop_current_type ( void  )
static

Definition at line 2554 of file p-exp.c.

References current_type, type_push::next, type_push::stored, tp_top, and xfree().

Referenced by yyparse().

◆ push_current_type()

static void push_current_type ( void  )
static

Definition at line 2543 of file p-exp.c.

References current_type, type_push::next, type_push::stored, tp_top, and xmalloc().

Referenced by yyparse().

◆ uptok()

static char * uptok ( const char *  tokstart,
int  namelen 
)
static

Definition at line 2597 of file p-exp.c.

References xmalloc().

Referenced by yylex().

◆ xfree()

void xfree ( void *  )

Referenced by pop_current_type(), and yylex().

◆ xmalloc()

void * xmalloc ( YYSIZE_T  )

Referenced by push_current_type(), and uptok().

◆ yy_reduce_print()

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

Definition at line 1121 of file p-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 1098 of file p-exp.c.

References YYFPRINTF.

◆ yy_symbol_print()

static void yy_symbol_print ( FILE *  yyo,
yysymbol_kind_t  yykind,
YYSTYPE const *const  yyvaluep 
)
static

Definition at line 1082 of file p-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,
yysymbol_kind_t  yykind,
YYSTYPE const *const  yyvaluep 
)
static

Definition at line 1064 of file p-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,
yysymbol_kind_t  yykind,
YYSTYPE yyvaluep 
)
static

◆ yyerror()

static void yyerror ( const char *  msg)
static

Definition at line 3229 of file p-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 1213 of file p-exp.c.

References symbol::aclass(), parser_state::arglist_len, parser_state::block_tracker, compunit_symtab::blockvector(), check_typedef(), type::code(), symtab::compunit(), copy_name(), current_type, parser_state::end_arglist(), parser_state::expression_context_block, type::field(), expr_builder::gdbarch(), have_full_symbols(), have_partial_symbols(), is_integral_type(), expr_builder::language(), leftdiv_is_integer, LOC_BLOCK, lookup_bound_minimal_symbol(), lookup_only_internalvar(), lookup_pointer_type(), lookup_struct(), lookup_struct_elt_type(), lookup_symbol(), lookup_symtab(), parser_state::mark_struct_expression(), bound_minimal_symbol::minsym, name, type::name(), parse_number(), parse_type, pascal_is_string_type(), parser_state::pop(), pop_current_type(), parser_state::pop_vector(), pstate, stoken::ptr, parser_state::push(), push_current_type(), parser_state::push_dollar(), parser_state::push_new(), parser_state::push_symbol(), search_field, parser_state::start_arglist(), blockvector::static_block(), block_symbol::symbol, symbol_read_needs_frame(), type::target_type(), YYSTYPE::type, field::type(), symbol::type(), TYPE_POINTER_TYPE, YYSTYPE::typed_val_int, innermost_block_tracker::update(), YYSTYPE::val, symbol::value_block(), value_of_internalvar(), value_of_this_silent(), value_type(), VAR_DOMAIN, parser_state::wrap(), parser_state::wrap2(), YY_, YY_ACCESSING_SYMBOL, YY_ASSERT, YY_CAST, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_IGNORE_USELESS_CAST_BEGIN, YY_IGNORE_USELESS_CAST_END, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, YYerror, YYERROR, yyerror, YYFINAL, YYINITDEPTH, YYLAST, yylen, yylex(), yylhs, yylloc, yylval, YYMAXDEPTH, yynerrs, YYNOMEM, YYNSTATES, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, YYPTRDIFF_T, yyr1, yyr2, YYSIZE_T, YYSIZEOF, yyss, yyalloc::yyss_alloc, yyssp, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystacksize, yystate, YYSYMBOL_YYEMPTY, YYSYMBOL_YYEOF, YYSYMBOL_YYerror, yytable, yytable_value_is_error, YYTRANSLATE, YYUNDEF, yyval, yyvs, yyalloc::yyvs_alloc, and yyvsp.

◆ yysymbol_name()

static const char * yysymbol_name ( yysymbol_kind_t  yysymbol)
static

Definition at line 793 of file p-exp.c.

References yytname.

Referenced by yy_symbol_print().

Variable Documentation

◆ current_type

struct type* current_type
static

Definition at line 365 of file p-exp.c.

Referenced by pop_current_type(), push_current_type(), yylex(), and yyparse().

◆ leftdiv_is_integer

int leftdiv_is_integer
static

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

Referenced by yyparse().

◆ paren_depth

int paren_depth
static

Definition at line 100 of file p-exp.c.

Referenced by yylex().

◆ pstate

struct parser_state* pstate = NULL
static

Definition at line 97 of file p-exp.c.

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

◆ search_field

int search_field
static

Definition at line 369 of file p-exp.c.

Referenced by yylex(), and yyparse().

◆ tokentab2

const struct token tokentab2[]
static
Initial value:
=
{
{"or", OR, OP_NULL},
{"<>", NOTEQUAL, OP_NULL},
{"<=", LEQ, OP_NULL},
{">=", GEQ, OP_NULL},
{":=", ASSIGN, OP_NULL},
{"::", COLONCOLON, OP_NULL} }
#define LEQ
Definition p-exp.c:220
#define NOTEQUAL
Definition p-exp.c:219
#define OR
Definition p-exp.c:216
#define ASSIGN
Definition p-exp.c:214
#define GEQ
Definition p-exp.c:221
#define COLONCOLON
Definition p-exp.c:207

Definition at line 2585 of file p-exp.c.

Referenced by yylex().

◆ tokentab3

const struct token tokentab3[]
static
Initial value:
=
{
{"shr", RSH, OP_NULL},
{"shl", LSH, OP_NULL},
{"and", ANDAND, OP_NULL},
{"div", DIV, OP_NULL},
{"not", NOT, OP_NULL},
{"mod", MOD, OP_NULL},
{"inc", INCREMENT, OP_NULL},
{"dec", DECREMENT, OP_NULL},
{"xor", XOR, OP_NULL}
}
#define RSH
Definition p-exp.c:223
#define XOR
Definition p-exp.c:217
#define LSH
Definition p-exp.c:222
#define DIV
Definition p-exp.c:224
#define DECREMENT
Definition p-exp.c:228
#define ANDAND
Definition p-exp.c:218
#define MOD
Definition p-exp.c:225
#define NOT
Definition p-exp.c:215
#define INCREMENT
Definition p-exp.c:227

Definition at line 2572 of file p-exp.c.

Referenced by yylex().

◆ tp_top

struct type_push* tp_top = NULL
static

Definition at line 2540 of file p-exp.c.

Referenced by pop_current_type(), and push_current_type().

◆ yychar

int yychar

Definition at line 1198 of file p-exp.c.

Referenced by yyparse().

◆ yycheck

const yytype_int8 yycheck[]
static

Definition at line 907 of file p-exp.c.

Referenced by yyparse().

◆ yydebug

int yydebug

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

◆ yydefact

const yytype_int8 yydefact[]
static
Initial value:
=
{
2, 0, 0, 1, 50, 52, 57, 76, 69, 51,
0, 0, 0, 0, 54, 58, 48, 49, 0, 0,
0, 0, 0, 0, 0, 77, 3, 5, 4, 7,
0, 0, 53, 63, 67, 6, 66, 65, 72, 74,
75, 73, 70, 71, 0, 64, 12, 0, 10, 11,
0, 0, 0, 68, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 30, 15, 20, 22, 9, 16, 19, 17,
0, 0, 0, 0, 0, 0, 0, 28, 8, 47,
46, 45, 44, 38, 39, 42, 43, 40, 41, 36,
37, 32, 33, 34, 35, 29, 0, 0, 24, 18,
61, 0, 62, 56, 55, 13, 14, 31, 0, 25,
0, 27, 21, 0, 23, 26
}

Definition at line 831 of file p-exp.c.

Referenced by yyparse().

◆ yydefgoto

const yytype_int8 yydefgoto[]
static
Initial value:
=
{
0, 1, 2, 26, 27, 28, 29, 30, 107, 108,
120, 106, 31, 32, 33, 34, 47, 36, 42, 37
}

Definition at line 856 of file p-exp.c.

Referenced by yyparse().

◆ yylval

YYSTYPE yylval

Definition at line 1201 of file p-exp.c.

Referenced by yylex(), and yyparse().

◆ yynerrs

int yynerrs

Definition at line 1203 of file p-exp.c.

Referenced by yyparse().

◆ yypact

const yytype_int16 yypact[]
static
Initial value:
=
{
-44, 20, 90, -44, -44, -44, -44, -44, -44, -44,
7, 7, -41, 7, -44, -44, -44, -44, 90, 90,
90, -39, -24, 90, 10, 13, -44, -44, 8, 231,
4, 21, -44, -44, -44, -14, 41, -44, -44, -44,
-44, -44, -44, -44, 90, -44, 35, -14, 35, 35,
90, 90, 5, -44, 90, 90, 90, 90, 90, 90,
90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
90, 90, -44, -44, -44, -44, -44, -44, -44, 23,
7, 90, 7, 119, -43, 147, 175, -44, 231, 231,
256, 280, 303, 324, 324, 31, 31, 31, 31, 76,
76, 76, 76, 328, 328, 35, 90, 90, 90, -44,
44, 203, -44, -44, -44, -44, -44, 35, 9, 231,
11, -44, -44, 90, -44, 231
}

Definition at line 811 of file p-exp.c.

Referenced by yyparse().

◆ yypgoto

const yytype_int8 yypgoto[]
static
Initial value:
=
{
-44, -44, -44, -44, -44, -20, -18, -44, -44, -44,
-44, -44, -44, -44, -44, -44, 16, 50, -7, -44
}

Definition at line 849 of file p-exp.c.

Referenced by yyparse().

◆ yyr1

const yytype_int8 yyr1[]
static
Initial value:
=
{
0, 53, 55, 54, 56, 56, 57, 58, 58, 59,
59, 59, 59, 59, 59, 60, 59, 59, 59, 59,
61, 59, 62, 59, 63, 63, 63, 59, 59, 59,
64, 59, 59, 59, 59, 59, 59, 59, 59, 59,
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
59, 59, 59, 59, 59, 59, 59, 59, 59, 65,
65, 66, 67, 66, 66, 66, 68, 69, 70, 70,
70, 70, 71, 71, 71, 71, 72, 72
}

Definition at line 969 of file p-exp.c.

Referenced by yyparse().

◆ yyr2

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

Definition at line 982 of file p-exp.c.

Referenced by yy_reduce_print(), and yyparse().

◆ yyrline

const yytype_int16 yyrline[]
static
Initial value:
=
{
0, 196, 196, 196, 204, 205, 208, 214, 215, 220,
226, 232, 236, 240, 244, 249, 253, 271, 287, 296,
307, 305, 330, 327, 344, 345, 347, 351, 365, 371,
375, 375, 396, 400, 404, 408, 412, 416, 420, 427,
434, 441, 448, 455, 462, 466, 470, 474, 478, 485,
492, 500, 512, 521, 524, 550, 559, 563, 585, 612,
631, 644, 658, 672, 673, 684, 742, 753, 757, 759,
761, 766, 776, 777, 778, 779, 782, 783
}

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

Referenced by yy_reduce_print().

◆ yystos

const yytype_int8 yystos[]
static
Initial value:
=
{
0, 54, 55, 0, 3, 4, 5, 8, 9, 10,
11, 12, 13, 14, 16, 17, 18, 19, 23, 37,
39, 43, 44, 48, 49, 50, 56, 57, 58, 59,
60, 65, 66, 67, 68, 69, 70, 72, 8, 9,
10, 50, 71, 71, 48, 71, 59, 69, 59, 59,
48, 48, 58, 70, 20, 22, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 38,
39, 40, 41, 46, 47, 48, 49, 6, 7, 71,
14, 48, 14, 59, 69, 59, 59, 51, 59, 59,
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
59, 59, 59, 59, 59, 59, 64, 61, 62, 7,
71, 59, 71, 51, 51, 51, 51, 59, 58, 59,
63, 51, 52, 20, 51, 59
}

Definition at line 951 of file p-exp.c.

◆ yytable

const yytype_int8 yytable[]
static

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

Referenced by yyparse().

◆ yytname

const char* const yytname[]
static
Initial value:
=
{
"\"end of file\"", "error", "\"invalid token\"", "INT", "FLOAT",
"STRING", "FIELDNAME", "COMPLETE", "NAME", "TYPENAME", "NAME_OR_INT",
"STRUCT", "CLASS", "SIZEOF", "COLONCOLON", "ERROR", "DOLLAR_VARIABLE",
"THIS", "TRUEKEYWORD", "FALSEKEYWORD", "','", "ABOVE_COMMA", "ASSIGN",
"NOT", "OR", "XOR", "ANDAND", "'='", "NOTEQUAL", "'<'", "'>'", "LEQ",
"GEQ", "LSH", "RSH", "DIV", "MOD", "'@'", "'+'", "'-'", "'*'", "'/'",
"UNARY", "INCREMENT", "DECREMENT", "ARROW", "'.'", "'['", "'('", "'^'",
"BLOCKNAME", "')'", "']'", "$accept", "start", "$@1", "normal_start",
"type_exp", "exp1", "exp", "field_exp", "$@2", "$@3", "arglist", "$@4",
"block", "variable", "qualified_name", "ptype", "type", "typebase",
"name", "name_not_typename", YY_NULLPTRPTR
}
#define YY_NULLPTRPTR
Definition p-exp.c:131

Definition at line 777 of file p-exp.c.

Referenced by yysymbol_name().

◆ yytranslate

const yytype_int8 yytranslate[]
static

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