Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
exparse.c File Reference
#include <assert.h>
#include <expr/exop.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ast/ast.h>
#include <util/gv_ctype.h>
#include <util/streq.h>
#include <expr/exgram.h>
#include <limits.h>
Include dependency graph for exparse.c:

Go to the source code of this file.

Data Structures

union  EX_STYPE
 
union  yyalloc
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.5.1"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   0
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define YYSTYPE   EX_STYPE
 
#define yyparse   ex_parse
 
#define yylex   ex_lex
 
#define yyerror   ex_error
 
#define yydebug   ex_debug
 
#define yynerrs   ex_nerrs
 
#define yylval   ex_lval
 
#define yychar   ex_char
 
#define YY_CAST(Type, Val)   ((Type) (Val))
 
#define YY_REINTERPRET_CAST(Type, Val)   ((Type) (Val))
 
#define YY_NULLPTR   ((void*)0)
 
#define YYERROR_VERBOSE   0
 
#define YY_EX_EXPARSE_H_INCLUDED
 
#define EX_DEBUG   1
 
#define EX_TOKENTYPE
 
#define MINTOKEN   258
 
#define INTEGER   259
 
#define UNSIGNED   260
 
#define CHARACTER   261
 
#define FLOATING   262
 
#define STRING   263
 
#define VOIDTYPE   264
 
#define ADDRESS   265
 
#define ARRAY   266
 
#define BREAK   267
 
#define CALL   268
 
#define CASE   269
 
#define CONSTANT   270
 
#define CONTINUE   271
 
#define DECLARE   272
 
#define DEFAULT   273
 
#define DYNAMIC   274
 
#define ELSE   275
 
#define EXIT   276
 
#define FOR   277
 
#define FUNCTION   278
 
#define GSUB   279
 
#define ITERATE   280
 
#define ITERATOR   281
 
#define ID   282
 
#define IF   283
 
#define LABEL   284
 
#define MEMBER   285
 
#define NAME   286
 
#define POS   287
 
#define PRAGMA   288
 
#define PRE   289
 
#define PRINT   290
 
#define PRINTF   291
 
#define PROCEDURE   292
 
#define QUERY   293
 
#define RAND   294
 
#define RETURN   295
 
#define SCANF   296
 
#define SPLIT   297
 
#define SPRINTF   298
 
#define SRAND   299
 
#define SSCANF   300
 
#define SUB   301
 
#define SUBSTR   302
 
#define SWITCH   303
 
#define TOKENS   304
 
#define UNSET   305
 
#define WHILE   306
 
#define F2I   307
 
#define F2S   308
 
#define I2F   309
 
#define I2S   310
 
#define S2B   311
 
#define S2F   312
 
#define S2I   313
 
#define F2X   314
 
#define I2X   315
 
#define S2X   316
 
#define X2F   317
 
#define X2I   318
 
#define X2S   319
 
#define X2X   320
 
#define XPRINT   321
 
#define OR   322
 
#define AND   323
 
#define EQ   324
 
#define NE   325
 
#define LE   326
 
#define GE   327
 
#define LSH   328
 
#define RSH   329
 
#define IN_OP   330
 
#define UNARY   331
 
#define INC   332
 
#define DEC   333
 
#define CAST   334
 
#define MAXTOKEN   335
 
#define EX_STYPE_IS_TRIVIAL   1
 
#define EX_STYPE_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 YYUSE(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   malloc
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYFINAL   3
 
#define YYLAST   1118
 
#define YYNTOKENS   106
 
#define YYNNTS   42
 
#define YYNRULES   139
 
#define YYNSTATES   283
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   335
 
#define YYTRANSLATE(YYX)    (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   (-180)
 
#define yypact_value_is_default(Yyn)    ((Yyn) == YYPACT_NINF)
 
#define YYTABLE_NINF   (-124)
 
#define yytable_value_is_error(Yyn)    ((Yyn) == YYTABLE_NINF)
 
#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_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 EX_STYPE EX_STYPE
 
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  ex_tokentype {
  MINTOKEN = 258 , INTEGER = 259 , UNSIGNED = 260 , CHARACTER = 261 ,
  FLOATING = 262 , STRING = 263 , VOIDTYPE = 264 , ADDRESS = 265 ,
  ARRAY = 266 , BREAK = 267 , CALL = 268 , CASE = 269 ,
  CONSTANT = 270 , CONTINUE = 271 , DECLARE = 272 , DEFAULT = 273 ,
  DYNAMIC = 274 , ELSE = 275 , EXIT = 276 , FOR = 277 ,
  FUNCTION = 278 , GSUB = 279 , ITERATE = 280 , ITERATOR = 281 ,
  ID = 282 , IF = 283 , LABEL = 284 , MEMBER = 285 ,
  NAME = 286 , POS = 287 , PRAGMA = 288 , PRE = 289 ,
  PRINT = 290 , PRINTF = 291 , PROCEDURE = 292 , QUERY = 293 ,
  RAND = 294 , RETURN = 295 , SCANF = 296 , SPLIT = 297 ,
  SPRINTF = 298 , SRAND = 299 , SSCANF = 300 , SUB = 301 ,
  SUBSTR = 302 , SWITCH = 303 , TOKENS = 304 , UNSET = 305 ,
  WHILE = 306 , F2I = 307 , F2S = 308 , I2F = 309 ,
  I2S = 310 , S2B = 311 , S2F = 312 , S2I = 313 ,
  F2X = 314 , I2X = 315 , S2X = 316 , X2F = 317 ,
  X2I = 318 , X2S = 319 , X2X = 320 , XPRINT = 321 ,
  OR = 322 , AND = 323 , EQ = 324 , NE = 325 ,
  LE = 326 , GE = 327 , LSH = 328 , RSH = 329 ,
  IN_OP = 330 , UNARY = 331 , INC = 332 , DEC = 333 ,
  CAST = 334 , MAXTOKEN = 335
}
 

Functions

int ex_parse (void)
 
void ex_error (const char *message)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 
const char * exop (size_t index)
 

Variables

EX_STYPE ex_lval
 
static const yytype_int8 yytranslate []
 
static const char *const yytname []
 
static const yytype_int16 yypact []
 
static const yytype_uint8 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
 
YYSTYPE yylval
 
int yynerrs
 

Macro Definition Documentation

◆ ADDRESS

#define ADDRESS   265

Definition at line 242 of file exparse.c.

◆ AND

#define AND   323

Definition at line 300 of file exparse.c.

◆ ARRAY

#define ARRAY   266

Definition at line 243 of file exparse.c.

◆ BREAK

#define BREAK   267

Definition at line 244 of file exparse.c.

◆ CALL

#define CALL   268

Definition at line 245 of file exparse.c.

◆ CASE

#define CASE   269

Definition at line 246 of file exparse.c.

◆ CAST

#define CAST   334

Definition at line 311 of file exparse.c.

◆ CHARACTER

#define CHARACTER   261

Definition at line 238 of file exparse.c.

◆ CONSTANT

#define CONSTANT   270

Definition at line 247 of file exparse.c.

◆ CONTINUE

#define CONTINUE   271

Definition at line 248 of file exparse.c.

◆ DEC

#define DEC   333

Definition at line 310 of file exparse.c.

◆ DECLARE

#define DECLARE   272

Definition at line 249 of file exparse.c.

◆ DEFAULT

#define DEFAULT   273

Definition at line 250 of file exparse.c.

◆ DYNAMIC

#define DYNAMIC   274

Definition at line 251 of file exparse.c.

◆ ELSE

#define ELSE   275

Definition at line 252 of file exparse.c.

◆ EQ

#define EQ   324

Definition at line 301 of file exparse.c.

◆ EX_DEBUG

#define EX_DEBUG   1

Definition at line 142 of file exparse.c.

◆ EX_STYPE_IS_DECLARED

#define EX_STYPE_IS_DECLARED   1

Definition at line 333 of file exparse.c.

◆ EX_STYPE_IS_TRIVIAL

#define EX_STYPE_IS_TRIVIAL   1

Definition at line 332 of file exparse.c.

◆ EX_TOKENTYPE

#define EX_TOKENTYPE

Definition at line 151 of file exparse.c.

◆ EXIT

#define EXIT   276

Definition at line 253 of file exparse.c.

◆ F2I

#define F2I   307

Definition at line 284 of file exparse.c.

◆ F2S

#define F2S   308

Definition at line 285 of file exparse.c.

◆ F2X

#define F2X   314

Definition at line 291 of file exparse.c.

◆ FLOATING

#define FLOATING   262

Definition at line 239 of file exparse.c.

◆ FOR

#define FOR   277

Definition at line 254 of file exparse.c.

◆ FUNCTION

#define FUNCTION   278

Definition at line 255 of file exparse.c.

◆ GE

#define GE   327

Definition at line 304 of file exparse.c.

◆ GSUB

#define GSUB   279

Definition at line 256 of file exparse.c.

◆ I2F

#define I2F   309

Definition at line 286 of file exparse.c.

◆ I2S

#define I2S   310

Definition at line 287 of file exparse.c.

◆ I2X

#define I2X   315

Definition at line 292 of file exparse.c.

◆ ID

#define ID   282

Definition at line 259 of file exparse.c.

◆ IF

#define IF   283

Definition at line 260 of file exparse.c.

◆ IN_OP

#define IN_OP   330

Definition at line 307 of file exparse.c.

◆ INC

#define INC   332

Definition at line 309 of file exparse.c.

◆ INTEGER

#define INTEGER   259

Definition at line 236 of file exparse.c.

◆ ITERATE

#define ITERATE   280

Definition at line 257 of file exparse.c.

◆ ITERATOR

#define ITERATOR   281

Definition at line 258 of file exparse.c.

◆ LABEL

#define LABEL   284

Definition at line 261 of file exparse.c.

◆ LE

#define LE   326

Definition at line 303 of file exparse.c.

◆ LSH

#define LSH   328

Definition at line 305 of file exparse.c.

◆ MAXTOKEN

#define MAXTOKEN   335

Definition at line 312 of file exparse.c.

◆ MEMBER

#define MEMBER   285

Definition at line 262 of file exparse.c.

◆ MINTOKEN

#define MINTOKEN   258

Definition at line 235 of file exparse.c.

◆ NAME

#define NAME   286

Definition at line 263 of file exparse.c.

◆ NE

#define NE   325

Definition at line 302 of file exparse.c.

◆ OR

#define OR   322

Definition at line 299 of file exparse.c.

◆ POS

#define POS   287

Definition at line 264 of file exparse.c.

◆ PRAGMA

#define PRAGMA   288

Definition at line 265 of file exparse.c.

◆ PRE

#define PRE   289

Definition at line 266 of file exparse.c.

◆ PRINT

#define PRINT   290

Definition at line 267 of file exparse.c.

◆ PRINTF

#define PRINTF   291

Definition at line 268 of file exparse.c.

◆ PROCEDURE

#define PROCEDURE   292

Definition at line 269 of file exparse.c.

◆ QUERY

#define QUERY   293

Definition at line 270 of file exparse.c.

◆ RAND

#define RAND   294

Definition at line 271 of file exparse.c.

◆ RETURN

#define RETURN   295

Definition at line 272 of file exparse.c.

◆ RSH

#define RSH   329

Definition at line 306 of file exparse.c.

◆ S2B

#define S2B   311

Definition at line 288 of file exparse.c.

◆ S2F

#define S2F   312

Definition at line 289 of file exparse.c.

◆ S2I

#define S2I   313

Definition at line 290 of file exparse.c.

◆ S2X

#define S2X   316

Definition at line 293 of file exparse.c.

◆ SCANF

#define SCANF   296

Definition at line 273 of file exparse.c.

◆ SPLIT

#define SPLIT   297

Definition at line 274 of file exparse.c.

◆ SPRINTF

#define SPRINTF   298

Definition at line 275 of file exparse.c.

◆ SRAND

#define SRAND   299

Definition at line 276 of file exparse.c.

◆ SSCANF

#define SSCANF   300

Definition at line 277 of file exparse.c.

◆ STRING

#define STRING   263

Definition at line 240 of file exparse.c.

◆ SUB

#define SUB   301

Definition at line 278 of file exparse.c.

◆ SUBSTR

#define SUBSTR   302

Definition at line 279 of file exparse.c.

◆ SWITCH

#define SWITCH   303

Definition at line 280 of file exparse.c.

◆ TOKENS

#define TOKENS   304

Definition at line 281 of file exparse.c.

◆ UNARY

#define UNARY   331

Definition at line 308 of file exparse.c.

◆ UNSET

#define UNSET   305

Definition at line 282 of file exparse.c.

◆ UNSIGNED

#define UNSIGNED   260

Definition at line 237 of file exparse.c.

◆ VOIDTYPE

#define VOIDTYPE   264

Definition at line 241 of file exparse.c.

◆ WHILE

#define WHILE   306

Definition at line 283 of file exparse.c.

◆ X2F

#define X2F   317

Definition at line 294 of file exparse.c.

◆ X2I

#define X2I   318

Definition at line 295 of file exparse.c.

◆ X2S

#define X2S   319

Definition at line 296 of file exparse.c.

◆ X2X

#define X2X   320

Definition at line 297 of file exparse.c.

◆ XPRINT

#define XPRINT   321

Definition at line 298 of file exparse.c.

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 465 of file exparse.c.

◆ YY_ASSERT

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

Definition at line 524 of file exparse.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 473 of file exparse.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 481 of file exparse.c.

◆ YY_CAST

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

Definition at line 105 of file exparse.c.

◆ YY_EX_EXPARSE_H_INCLUDED

#define YY_EX_EXPARSE_H_INCLUDED

Definition at line 132 of file exparse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 504 of file exparse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 505 of file exparse.c.

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 519 of file exparse.c.

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 520 of file exparse.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 501 of file exparse.c.

◆ YY_NULLPTR

#define YY_NULLPTR   ((void*)0)

Definition at line 117 of file exparse.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 1358 of file exparse.c.

◆ YY_REINTERPRET_CAST

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

Definition at line 106 of file exparse.c.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 1357 of file exparse.c.

◆ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)

Definition at line 1356 of file exparse.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 1201 of file exparse.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 1200 of file exparse.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 exparse.c:465
#define yychar
Definition exparse.c:74
#define yylval
Definition exparse.c:73
#define YYEMPTY
Definition exparse.c:1197
#define YYERROR
Definition exparse.c:1202

Definition at line 1207 of file exparse.c.

◆ YYBISON

#define YYBISON   1

Definition at line 48 of file exparse.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.5.1"

Definition at line 51 of file exparse.c.

◆ yychar

#define yychar   ex_char

Definition at line 74 of file exparse.c.

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 1196 of file exparse.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 614 of file exparse.c.

◆ yydebug

#define yydebug   ex_debug

Definition at line 71 of file exparse.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)

Definition at line 1355 of file exparse.c.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 1197 of file exparse.c.

◆ YYEOF

#define YYEOF   0

Definition at line 1198 of file exparse.c.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 1226 of file exparse.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 1195 of file exparse.c.

◆ yyerror

#define yyerror   ex_error

Definition at line 70 of file exparse.c.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 1202 of file exparse.c.

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE   0

Definition at line 126 of file exparse.c.

◆ YYFINAL

#define YYFINAL   3

Definition at line 655 of file exparse.c.

◆ YYFREE

#define YYFREE   free

Definition at line 585 of file exparse.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1364 of file exparse.c.

◆ YYLAST

#define YYLAST   1118

Definition at line 657 of file exparse.c.

◆ yylex

#define yylex (   void)    ex_lex

Definition at line 69 of file exparse.c.

◆ yylval

#define yylval   ex_lval

Definition at line 73 of file exparse.c.

◆ YYMALLOC

#define YYMALLOC   malloc

Definition at line 579 of file exparse.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 1375 of file exparse.c.

◆ YYMAXUTOK

#define YYMAXUTOK   335

Definition at line 669 of file exparse.c.

◆ yynerrs

#define yynerrs   ex_nerrs

Definition at line 72 of file exparse.c.

◆ YYNNTS

#define YYNNTS   42

Definition at line 662 of file exparse.c.

◆ YYNRULES

#define YYNRULES   139

Definition at line 664 of file exparse.c.

◆ YYNSTATES

#define YYNSTATES   283

Definition at line 666 of file exparse.c.

◆ YYNTOKENS

#define YYNTOKENS   106

Definition at line 660 of file exparse.c.

◆ YYPACT_NINF

#define YYPACT_NINF   (-180)

Definition at line 785 of file exparse.c.

◆ yypact_value_is_default

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

Definition at line 787 of file exparse.c.

◆ yyparse

#define yyparse (   void)    ex_parse

Definition at line 1645 of file exparse.c.

◆ YYPOPSTACK

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

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 426 of file exparse.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 425 of file exparse.c.

◆ YYPULL

#define YYPULL   1

Definition at line 63 of file exparse.c.

◆ YYPURE

#define YYPURE   0

Definition at line 57 of file exparse.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 60 of file exparse.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 1205 of file exparse.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition exparse.c:426
#define YY_CAST(Type, Val)
Definition exparse.c:105
#define YYSIZE_T
Definition exparse.c:439
#define YYPTRDIFF_T
Definition exparse.c:425

Definition at line 443 of file exparse.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 439 of file exparse.c.

◆ YYSIZEOF

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

Definition at line 449 of file exparse.c.

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 54 of file exparse.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 565 of file exparse.c.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 568 of file exparse.c.

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
#define N(n)
Definition bcomps.c:58
#define YYSTYPE
Definition exparse.c:66
#define YYSIZEOF(X)
Definition exparse.c:449
#define YYSTACK_GAP_MAXIMUM
Definition exparse.c:606
yytype_int8 yy_state_t
Definition gmlparse.c:507

Definition at line 610 of file exparse.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 566 of file exparse.c.

◆ YYSTACK_GAP_MAXIMUM

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

Definition at line 606 of file exparse.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)

Definition at line 621 of file exparse.c.

◆ YYSTYPE

#define YYSTYPE   EX_STYPE

Definition at line 66 of file exparse.c.

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-124)

Definition at line 790 of file exparse.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yyn)     ((Yyn) == YYTABLE_NINF)

Definition at line 792 of file exparse.c.

◆ YYTERROR

#define YYTERROR   1

Definition at line 1225 of file exparse.c.

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)     (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 674 of file exparse.c.

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 668 of file exparse.c.

◆ YYUSE

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

Definition at line 487 of file exparse.c.

Typedef Documentation

◆ EX_STYPE

typedef union EX_STYPE EX_STYPE

Definition at line 331 of file exparse.c.

◆ yy_state_fast_t

typedef int yy_state_fast_t

Definition at line 455 of file exparse.c.

◆ yy_state_t

Definition at line 452 of file exparse.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 389 of file exparse.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 381 of file exparse.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 409 of file exparse.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 398 of file exparse.c.

Enumeration Type Documentation

◆ ex_tokentype

Enumerator
MINTOKEN 
INTEGER 
UNSIGNED 
CHARACTER 
FLOATING 
STRING 
VOIDTYPE 
ADDRESS 
ARRAY 
BREAK 
CALL 
CASE 
CONSTANT 
CONTINUE 
DECLARE 
DEFAULT 
DYNAMIC 
ELSE 
EXIT 
FOR 
FUNCTION 
GSUB 
ITERATE 
ITERATOR 
ID 
IF 
LABEL 
MEMBER 
NAME 
POS 
PRAGMA 
PRE 
PRINT 
PRINTF 
PROCEDURE 
QUERY 
RAND 
RETURN 
SCANF 
SPLIT 
SPRINTF 
SRAND 
SSCANF 
SUB 
SUBSTR 
SWITCH 
TOKENS 
UNSET 
WHILE 
F2I 
F2S 
I2F 
I2S 
S2B 
S2F 
S2I 
F2X 
I2X 
S2X 
X2F 
X2I 
X2S 
X2X 
XPRINT 
OR 
AND 
EQ 
NE 
LE 
GE 
LSH 
RSH 
IN_OP 
UNARY 
INC 
DEC 
CAST 
MAXTOKEN 

Definition at line 152 of file exparse.c.

Function Documentation

◆ ex_error()

void ex_error ( const char *  message)

Definition at line 3623 of file exparse.c.

References exerror().

Here is the call graph for this function:

◆ ex_parse()

int ex_parse ( void  )

◆ exop()

const char * exop ( size_t  id)

retrieve a string representation of a lexer token

Parameters
idThe numerical identifier of the sought token as an offset from MINTOKEN
Returns
The string name of the token or NULL if id is invalid

Definition at line 3579 of file exparse.c.

References gv_isalnum(), NULL, and yytname.

Referenced by lexname().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free()

void free ( void *  )

◆ malloc()

void * malloc ( YYSIZE_T  )

◆ yydestruct()

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

Variable Documentation

◆ ex_lval

EX_STYPE ex_lval
extern

Referenced by extoken_fn().

◆ yychar

int yychar

Definition at line 1632 of file exparse.c.

◆ yycheck

const yytype_int16 yycheck[]
static

Definition at line 1005 of file exparse.c.

◆ yydefact

const yytype_uint8 yydefact[]
static

Definition at line 833 of file exparse.c.

◆ yydefgoto

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 1, 49, 95, 213, 2, 50, 61, 208, 250,
261, 262, 263, 134, 135, 192, 136, 275, 240, 51,
52, 164, 243, 53, 54, 55, 56, 57, 221, 63,
126, 127, 254, 255, 256, 265, 70, 71, 124, 237,
247, 266
}

Definition at line 877 of file exparse.c.

◆ yylval

YYSTYPE yylval

Definition at line 1635 of file exparse.c.

◆ yynerrs

int yynerrs

Definition at line 1637 of file exparse.c.

◆ yypact

const yytype_int16 yypact[]
static

Definition at line 797 of file exparse.c.

◆ yypgoto

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-180, -180, -180, -180, -180, -48, -179, -180, -180, -180,
-180, -180, -23, -180, 57, -180, -180, -180, -180, -8,
-36, -180, -180, -180, -16, -180, -180, -12, -180, -180,
31, -180, -180, -180, -24, -180, 186, 109, 63, -180,
-180, -180
}

Definition at line 867 of file exparse.c.

◆ yyr1

const yytype_uint8 yyr1[]
static
Initial value:
=
{
0, 106, 107, 108, 108, 110, 109, 111, 111, 112,
112, 113, 112, 112, 112, 112, 112, 112, 112, 112,
114, 112, 112, 112, 112, 115, 115, 116, 117, 117,
118, 118, 119, 119, 121, 120, 122, 122, 122, 122,
123, 123, 124, 124, 125, 125, 126, 126, 126, 126,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
126, 126, 126, 126, 126, 126, 126, 127, 128, 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, 129, 129,
130, 130, 130, 130, 130, 131, 131, 131, 132, 132,
133, 133, 133, 134, 134, 134, 135, 135, 136, 136,
137, 137, 138, 138, 138, 139, 139, 141, 140, 142,
142, 142, 143, 143, 144, 144, 145, 146, 147, 145
}

Definition at line 1157 of file exparse.c.

◆ yyr2

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

Definition at line 1176 of file exparse.c.

◆ yystos

const yytype_uint8 yystos[]
static

Definition at line 1123 of file exparse.c.

◆ yytable

const yytype_int16 yytable[]
static

Definition at line 889 of file exparse.c.

◆ yytname

const char* const yytname[]
static
Initial value:
=
{
"$end", "error", "$undefined", "MINTOKEN", "INTEGER", "UNSIGNED",
"CHARACTER", "FLOATING", "STRING", "VOIDTYPE", "ADDRESS", "ARRAY",
"BREAK", "CALL", "CASE", "CONSTANT", "CONTINUE", "DECLARE", "DEFAULT",
"DYNAMIC", "ELSE", "EXIT", "FOR", "FUNCTION", "GSUB", "ITERATE",
"ITERATOR", "ID", "IF", "LABEL", "MEMBER", "NAME", "POS", "PRAGMA",
"PRE", "PRINT", "PRINTF", "PROCEDURE", "QUERY", "RAND", "RETURN",
"SCANF", "SPLIT", "SPRINTF", "SRAND", "SSCANF", "SUB", "SUBSTR",
"SWITCH", "TOKENS", "UNSET", "WHILE", "F2I", "F2S", "I2F", "I2S", "S2B",
"S2F", "S2I", "F2X", "I2X", "S2X", "X2F", "X2I", "X2S", "X2X", "XPRINT",
"','", "'='", "'?'", "':'", "OR", "AND", "'|'", "'^'", "'&'", "EQ", "NE",
"'<'", "'>'", "LE", "GE", "LSH", "RSH", "'+'", "'-'", "IN_OP", "'*'",
"'/'", "'%'", "'!'", "'~'", "'#'", "UNARY", "INC", "DEC", "CAST", "'('",
"MAXTOKEN", "'{'", "'}'", "';'", "')'", "'['", "']'", "'.'", "$accept",
"program", "action_list", "action", "$@1", "statement_list", "statement",
"$@2", "$@3", "switch_list", "switch_item", "case_list", "case_item",
"dcl_list", "dcl_item", "$@4", "dcl_name", "name", "else_opt",
"expr_opt", "expr", "$@5", "$@6", "splitop", "constant", "print", "scan",
"variable", "array", "index", "args", "arg_list", "formals",
"formal_list", "formal_item", "$@7", "members", "member", "assign",
"initialize", "$@8", "$@9", YY_NULLPTR
}
#define YY_NULLPTR
Definition exparse.c:117

Definition at line 741 of file exparse.c.

Referenced by exop().

◆ yytranslate

const yytype_int8 yytranslate[]
static

Definition at line 679 of file exparse.c.