Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
exparse.c File Reference
#include <assert.h>
#include <cgraph/gv_ctype.h>
#include <cgraph/streq.h>
#include <expr/exop.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ast/ast.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 STATIC   265
 
#define ADDRESS   266
 
#define ARRAY   267
 
#define BREAK   268
 
#define CALL   269
 
#define CASE   270
 
#define CONSTANT   271
 
#define CONTINUE   272
 
#define DECLARE   273
 
#define DEFAULT   274
 
#define DYNAMIC   275
 
#define ELSE   276
 
#define EXIT   277
 
#define FOR   278
 
#define FUNCTION   279
 
#define GSUB   280
 
#define ITERATE   281
 
#define ITERATER   282
 
#define ID   283
 
#define IF   284
 
#define LABEL   285
 
#define MEMBER   286
 
#define NAME   287
 
#define POS   288
 
#define PRAGMA   289
 
#define PRE   290
 
#define PRINT   291
 
#define PRINTF   292
 
#define PROCEDURE   293
 
#define QUERY   294
 
#define RAND   295
 
#define RETURN   296
 
#define SCANF   297
 
#define SPLIT   298
 
#define SPRINTF   299
 
#define SRAND   300
 
#define SSCANF   301
 
#define SUB   302
 
#define SUBSTR   303
 
#define SWITCH   304
 
#define TOKENS   305
 
#define UNSET   306
 
#define WHILE   307
 
#define F2I   308
 
#define F2S   309
 
#define I2F   310
 
#define I2S   311
 
#define S2B   312
 
#define S2F   313
 
#define S2I   314
 
#define F2X   315
 
#define I2X   316
 
#define S2X   317
 
#define X2F   318
 
#define X2I   319
 
#define X2S   320
 
#define X2X   321
 
#define XPRINT   322
 
#define OR   323
 
#define AND   324
 
#define EQ   325
 
#define NE   326
 
#define LE   327
 
#define GE   328
 
#define LSH   329
 
#define RSH   330
 
#define IN_OP   331
 
#define UNARY   332
 
#define INC   333
 
#define DEC   334
 
#define CAST   335
 
#define MAXTOKEN   336
 
#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   1112
 
#define YYNTOKENS   107
 
#define YYNNTS   44
 
#define YYNRULES   142
 
#define YYNSTATES   286
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   336
 
#define YYTRANSLATE(YYX)    (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   (-144)
 
#define yypact_value_is_default(Yyn)    ((Yyn) == YYPACT_NINF)
 
#define YYTABLE_NINF   (-127)
 
#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 , STATIC = 265 ,
  ADDRESS = 266 , ARRAY = 267 , BREAK = 268 , CALL = 269 ,
  CASE = 270 , CONSTANT = 271 , CONTINUE = 272 , DECLARE = 273 ,
  DEFAULT = 274 , DYNAMIC = 275 , ELSE = 276 , EXIT = 277 ,
  FOR = 278 , FUNCTION = 279 , GSUB = 280 , ITERATE = 281 ,
  ITERATER = 282 , ID = 283 , IF = 284 , LABEL = 285 ,
  MEMBER = 286 , NAME = 287 , POS = 288 , PRAGMA = 289 ,
  PRE = 290 , PRINT = 291 , PRINTF = 292 , PROCEDURE = 293 ,
  QUERY = 294 , RAND = 295 , RETURN = 296 , SCANF = 297 ,
  SPLIT = 298 , SPRINTF = 299 , SRAND = 300 , SSCANF = 301 ,
  SUB = 302 , SUBSTR = 303 , SWITCH = 304 , TOKENS = 305 ,
  UNSET = 306 , WHILE = 307 , F2I = 308 , F2S = 309 ,
  I2F = 310 , I2S = 311 , S2B = 312 , S2F = 313 ,
  S2I = 314 , F2X = 315 , I2X = 316 , S2X = 317 ,
  X2F = 318 , X2I = 319 , X2S = 320 , X2X = 321 ,
  XPRINT = 322 , OR = 323 , AND = 324 , EQ = 325 ,
  NE = 326 , LE = 327 , GE = 328 , LSH = 329 ,
  RSH = 330 , IN_OP = 331 , UNARY = 332 , INC = 333 ,
  DEC = 334 , CAST = 335 , MAXTOKEN = 336
}
 

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   266

Definition at line 243 of file exparse.c.

◆ AND

#define AND   324

Definition at line 301 of file exparse.c.

◆ ARRAY

#define ARRAY   267

Definition at line 244 of file exparse.c.

◆ BREAK

#define BREAK   268

Definition at line 245 of file exparse.c.

◆ CALL

#define CALL   269

Definition at line 246 of file exparse.c.

◆ CASE

#define CASE   270

Definition at line 247 of file exparse.c.

◆ CAST

#define CAST   335

Definition at line 312 of file exparse.c.

◆ CHARACTER

#define CHARACTER   261

Definition at line 238 of file exparse.c.

◆ CONSTANT

#define CONSTANT   271

Definition at line 248 of file exparse.c.

◆ CONTINUE

#define CONTINUE   272

Definition at line 249 of file exparse.c.

◆ DEC

#define DEC   334

Definition at line 311 of file exparse.c.

◆ DECLARE

#define DECLARE   273

Definition at line 250 of file exparse.c.

◆ DEFAULT

#define DEFAULT   274

Definition at line 251 of file exparse.c.

◆ DYNAMIC

#define DYNAMIC   275

Definition at line 252 of file exparse.c.

◆ ELSE

#define ELSE   276

Definition at line 253 of file exparse.c.

◆ EQ

#define EQ   325

Definition at line 302 of file exparse.c.

◆ EX_DEBUG

#define EX_DEBUG   1

Definition at line 141 of file exparse.c.

◆ EX_STYPE_IS_DECLARED

#define EX_STYPE_IS_DECLARED   1

Definition at line 334 of file exparse.c.

◆ EX_STYPE_IS_TRIVIAL

#define EX_STYPE_IS_TRIVIAL   1

Definition at line 333 of file exparse.c.

◆ EX_TOKENTYPE

#define EX_TOKENTYPE

Definition at line 150 of file exparse.c.

◆ EXIT

#define EXIT   277

Definition at line 254 of file exparse.c.

◆ F2I

#define F2I   308

Definition at line 285 of file exparse.c.

◆ F2S

#define F2S   309

Definition at line 286 of file exparse.c.

◆ F2X

#define F2X   315

Definition at line 292 of file exparse.c.

◆ FLOATING

#define FLOATING   262

Definition at line 239 of file exparse.c.

◆ FOR

#define FOR   278

Definition at line 255 of file exparse.c.

◆ FUNCTION

#define FUNCTION   279

Definition at line 256 of file exparse.c.

◆ GE

#define GE   328

Definition at line 305 of file exparse.c.

◆ GSUB

#define GSUB   280

Definition at line 257 of file exparse.c.

◆ I2F

#define I2F   310

Definition at line 287 of file exparse.c.

◆ I2S

#define I2S   311

Definition at line 288 of file exparse.c.

◆ I2X

#define I2X   316

Definition at line 293 of file exparse.c.

◆ ID

#define ID   283

Definition at line 260 of file exparse.c.

◆ IF

#define IF   284

Definition at line 261 of file exparse.c.

◆ IN_OP

#define IN_OP   331

Definition at line 308 of file exparse.c.

◆ INC

#define INC   333

Definition at line 310 of file exparse.c.

◆ INTEGER

#define INTEGER   259

Definition at line 236 of file exparse.c.

◆ ITERATE

#define ITERATE   281

Definition at line 258 of file exparse.c.

◆ ITERATER

#define ITERATER   282

Definition at line 259 of file exparse.c.

◆ LABEL

#define LABEL   285

Definition at line 262 of file exparse.c.

◆ LE

#define LE   327

Definition at line 304 of file exparse.c.

◆ LSH

#define LSH   329

Definition at line 306 of file exparse.c.

◆ MAXTOKEN

#define MAXTOKEN   336

Definition at line 313 of file exparse.c.

◆ MEMBER

#define MEMBER   286

Definition at line 263 of file exparse.c.

◆ MINTOKEN

#define MINTOKEN   258

Definition at line 235 of file exparse.c.

◆ NAME

#define NAME   287

Definition at line 264 of file exparse.c.

◆ NE

#define NE   326

Definition at line 303 of file exparse.c.

◆ OR

#define OR   323

Definition at line 300 of file exparse.c.

◆ POS

#define POS   288

Definition at line 265 of file exparse.c.

◆ PRAGMA

#define PRAGMA   289

Definition at line 266 of file exparse.c.

◆ PRE

#define PRE   290

Definition at line 267 of file exparse.c.

◆ PRINT

#define PRINT   291

Definition at line 268 of file exparse.c.

◆ PRINTF

#define PRINTF   292

Definition at line 269 of file exparse.c.

◆ PROCEDURE

#define PROCEDURE   293

Definition at line 270 of file exparse.c.

◆ QUERY

#define QUERY   294

Definition at line 271 of file exparse.c.

◆ RAND

#define RAND   295

Definition at line 272 of file exparse.c.

◆ RETURN

#define RETURN   296

Definition at line 273 of file exparse.c.

◆ RSH

#define RSH   330

Definition at line 307 of file exparse.c.

◆ S2B

#define S2B   312

Definition at line 289 of file exparse.c.

◆ S2F

#define S2F   313

Definition at line 290 of file exparse.c.

◆ S2I

#define S2I   314

Definition at line 291 of file exparse.c.

◆ S2X

#define S2X   317

Definition at line 294 of file exparse.c.

◆ SCANF

#define SCANF   297

Definition at line 274 of file exparse.c.

◆ SPLIT

#define SPLIT   298

Definition at line 275 of file exparse.c.

◆ SPRINTF

#define SPRINTF   299

Definition at line 276 of file exparse.c.

◆ SRAND

#define SRAND   300

Definition at line 277 of file exparse.c.

◆ SSCANF

#define SSCANF   301

Definition at line 278 of file exparse.c.

◆ STATIC

#define STATIC   265

Definition at line 242 of file exparse.c.

◆ STRING

#define STRING   263

Definition at line 240 of file exparse.c.

◆ SUB

#define SUB   302

Definition at line 279 of file exparse.c.

◆ SUBSTR

#define SUBSTR   303

Definition at line 280 of file exparse.c.

◆ SWITCH

#define SWITCH   304

Definition at line 281 of file exparse.c.

◆ TOKENS

#define TOKENS   305

Definition at line 282 of file exparse.c.

◆ UNARY

#define UNARY   332

Definition at line 309 of file exparse.c.

◆ UNSET

#define UNSET   306

Definition at line 283 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   307

Definition at line 284 of file exparse.c.

◆ X2F

#define X2F   318

Definition at line 295 of file exparse.c.

◆ X2I

#define X2I   319

Definition at line 296 of file exparse.c.

◆ X2S

#define X2S   320

Definition at line 297 of file exparse.c.

◆ X2X

#define X2X   321

Definition at line 298 of file exparse.c.

◆ XPRINT

#define XPRINT   322

Definition at line 299 of file exparse.c.

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 466 of file exparse.c.

◆ YY_ASSERT

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

Definition at line 525 of file exparse.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 474 of file exparse.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 482 of file exparse.c.

◆ YY_CAST

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

Definition at line 104 of file exparse.c.

◆ YY_EX_EXPARSE_H_INCLUDED

#define YY_EX_EXPARSE_H_INCLUDED

Definition at line 131 of file exparse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 505 of file exparse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 506 of file exparse.c.

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 520 of file exparse.c.

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 521 of file exparse.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 502 of file exparse.c.

◆ YY_NULLPTR

#define YY_NULLPTR   ((void*)0)

Definition at line 116 of file exparse.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 1363 of file exparse.c.

◆ YY_REINTERPRET_CAST

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

Definition at line 105 of file exparse.c.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 1362 of file exparse.c.

◆ YY_SYMBOL_PRINT

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

Definition at line 1361 of file exparse.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 1206 of file exparse.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 1205 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:466
#define yychar
Definition exparse.c:74
#define yylval
Definition exparse.c:73
#define YYEMPTY
Definition exparse.c:1202
#define YYERROR
Definition exparse.c:1207

Definition at line 1212 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 1201 of file exparse.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 615 of file exparse.c.

◆ yydebug

#define yydebug   ex_debug

Definition at line 71 of file exparse.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)

Definition at line 1360 of file exparse.c.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 1202 of file exparse.c.

◆ YYEOF

#define YYEOF   0

Definition at line 1203 of file exparse.c.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 1231 of file exparse.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 1200 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 1207 of file exparse.c.

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE   0

Definition at line 125 of file exparse.c.

◆ YYFINAL

#define YYFINAL   3

Definition at line 656 of file exparse.c.

◆ YYFREE

#define YYFREE   free

Definition at line 586 of file exparse.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1369 of file exparse.c.

◆ YYLAST

#define YYLAST   1112

Definition at line 658 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 580 of file exparse.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 1380 of file exparse.c.

◆ YYMAXUTOK

#define YYMAXUTOK   336

Definition at line 670 of file exparse.c.

◆ yynerrs

#define yynerrs   ex_nerrs

Definition at line 72 of file exparse.c.

◆ YYNNTS

#define YYNNTS   44

Definition at line 663 of file exparse.c.

◆ YYNRULES

#define YYNRULES   142

Definition at line 665 of file exparse.c.

◆ YYNSTATES

#define YYNSTATES   286

Definition at line 667 of file exparse.c.

◆ YYNTOKENS

#define YYNTOKENS   107

Definition at line 661 of file exparse.c.

◆ YYPACT_NINF

#define YYPACT_NINF   (-144)

Definition at line 788 of file exparse.c.

◆ yypact_value_is_default

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

Definition at line 790 of file exparse.c.

◆ yyparse

#define yyparse (   void)    ex_parse

Definition at line 1650 of file exparse.c.

◆ YYPOPSTACK

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

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 427 of file exparse.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 426 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 1210 of file exparse.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition exparse.c:427
#define YY_CAST(Type, Val)
Definition exparse.c:104
#define YYSIZE_T
Definition exparse.c:440
#define YYPTRDIFF_T
Definition exparse.c:426

Definition at line 444 of file exparse.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 440 of file exparse.c.

◆ YYSIZEOF

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

Definition at line 450 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 566 of file exparse.c.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 569 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:450
#define YYSTACK_GAP_MAXIMUM
Definition exparse.c:607
yytype_int8 yy_state_t
Definition gmlparse.c:546

Definition at line 611 of file exparse.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 567 of file exparse.c.

◆ YYSTACK_GAP_MAXIMUM

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

Definition at line 607 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 622 of file exparse.c.

◆ YYSTYPE

#define YYSTYPE   EX_STYPE

Definition at line 66 of file exparse.c.

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-127)

Definition at line 793 of file exparse.c.

◆ yytable_value_is_error

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

Definition at line 795 of file exparse.c.

◆ YYTERROR

#define YYTERROR   1

Definition at line 1230 of file exparse.c.

◆ YYTRANSLATE

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

Definition at line 675 of file exparse.c.

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 669 of file exparse.c.

◆ YYUSE

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

Definition at line 488 of file exparse.c.

Typedef Documentation

◆ EX_STYPE

typedef union EX_STYPE EX_STYPE

Definition at line 332 of file exparse.c.

◆ yy_state_fast_t

typedef int yy_state_fast_t

Definition at line 456 of file exparse.c.

◆ yy_state_t

Definition at line 453 of file exparse.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 390 of file exparse.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 382 of file exparse.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 410 of file exparse.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 399 of file exparse.c.

Enumeration Type Documentation

◆ ex_tokentype

Enumerator
MINTOKEN 
INTEGER 
UNSIGNED 
CHARACTER 
FLOATING 
STRING 
VOIDTYPE 
STATIC 
ADDRESS 
ARRAY 
BREAK 
CALL 
CASE 
CONSTANT 
CONTINUE 
DECLARE 
DEFAULT 
DYNAMIC 
ELSE 
EXIT 
FOR 
FUNCTION 
GSUB 
ITERATE 
ITERATER 
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 151 of file exparse.c.

Function Documentation

◆ ex_error()

void ex_error ( const char *  message)

Definition at line 3659 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 3615 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 1637 of file exparse.c.

◆ yycheck

const yytype_int16 yycheck[]
static

Definition at line 1008 of file exparse.c.

◆ yydefact

const yytype_uint8 yydefact[]
static

Definition at line 836 of file exparse.c.

◆ yydefgoto

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 1, 49, 95, 205, 2, 50, 96, 206, 200,
243, 253, 254, 255, 51, 225, 226, 237, 227, 279,
232, 52, 53, 159, 238, 54, 55, 56, 57, 58,
246, 63, 127, 128, 271, 272, 273, 274, 70, 71,
125, 260, 268, 275
}

Definition at line 880 of file exparse.c.

◆ yylval

YYSTYPE yylval

Definition at line 1640 of file exparse.c.

◆ yynerrs

int yynerrs

Definition at line 1642 of file exparse.c.

◆ yypact

const yytype_int16 yypact[]
static

Definition at line 800 of file exparse.c.

◆ yypgoto

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-144, -144, -144, -144, -144, -48, -143, -144, -144, -144,
-144, -144, -144, 28, -144, -144, 48, -144, -144, -144,
-144, -9, -36, -144, -144, -144, 34, -144, -144, 101,
-144, -144, 24, -144, -144, -144, 12, -144, 224, 150,
51, -144, -144, -144
}

Definition at line 870 of file exparse.c.

◆ yyr1

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

Definition at line 1160 of file exparse.c.

◆ yyr2

const yytype_int8 yyr2[]
static
Initial value:
=
{
0, 2, 2, 0, 2, 0, 4, 0, 2, 3,
2, 0, 0, 6, 6, 5, 9, 5, 4, 6,
5, 0, 8, 3, 3, 3, 0, 2, 2, 1,
2, 3, 2, 0, 1, 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 1180 of file exparse.c.

◆ yystos

const yytype_uint8 yystos[]
static

Definition at line 1126 of file exparse.c.

◆ yytable

const yytype_int16 yytable[]
static

Definition at line 892 of file exparse.c.

◆ yytname

const char* const yytname[]
static
Initial value:
=
{
"$end", "error", "$undefined", "MINTOKEN", "INTEGER", "UNSIGNED",
"CHARACTER", "FLOATING", "STRING", "VOIDTYPE", "STATIC", "ADDRESS",
"ARRAY", "BREAK", "CALL", "CASE", "CONSTANT", "CONTINUE", "DECLARE",
"DEFAULT", "DYNAMIC", "ELSE", "EXIT", "FOR", "FUNCTION", "GSUB",
"ITERATE", "ITERATER", "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", "$@4", "switch_list",
"switch_item", "case_list", "case_item", "static", "dcl_list",
"dcl_item", "$@5", "dcl_name", "name", "else_opt", "expr_opt", "expr",
"$@6", "$@7", "splitop", "constant", "print", "scan", "variable",
"array", "index", "args", "arg_list", "formals", "formal_list",
"formal_item", "$@8", "members", "member", "assign", "initialize", "$@9",
"$@10", YY_NULLPTR
}
#define YY_NULLPTR
Definition exparse.c:116

Definition at line 743 of file exparse.c.

Referenced by exop().

◆ yytranslate

const yytype_int8 yytranslate[]
static

Definition at line 680 of file exparse.c.