programmer's documentation
Macros | Typedefs | Enumerations | Functions | Variables
mei_parser.c File Reference
#include "cs_defs.h"
#include <string.h>
#include "bft_mem.h"
#include "bft_printf.h"
#include "mei_node.h"
#include "mei_parser_glob.h"
#include <stddef.h>
Include dependency graph for mei_parser.c:

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 YY_NULLPTR   0
 
#define YYERROR_VERBOSE   0
 
#define YY_YY_SRC_MEI_MEI_PARSER_H_INCLUDED
 
#define YYDEBUG   0
 
#define YYTOKENTYPE
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define YYSTYPE_IS_DECLARED   1
 
#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 _Noreturn   YY_ATTRIBUTE ((__noreturn__))
 
#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   malloc
 
#define YYFREE   free
 
#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   34
 
#define YYLAST   1149
 
#define YYNTOKENS   38
 
#define YYNNTS   5
 
#define YYNRULES   38
 
#define YYNSTATES   98
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   277
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -28
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-28)))
 
#define YYTABLE_NINF   -37
 
#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_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 unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  yytokentype {
  NUMBER = 258, VAR = 259, FUN1 = 260, FUN2 = 261,
  FUN3 = 262, FUN4 = 263, IN1D = 264, WHILE = 265,
  IF = 266, PRINT = 267, IFX = 268, ELSE = 269,
  OR = 270, AND = 271, EQ = 272, NE = 273,
  GE = 274, LE = 275, UMINUS = 276, UPLUS = 277,
  NUMBER = 258, VAR = 259, FUN1 = 260, FUN2 = 261,
  FUN3 = 262, FUN4 = 263, IN1D = 264, WHILE = 265,
  IF = 266, PRINT = 267, IFX = 268, ELSE = 269,
  OR = 270, AND = 271, EQ = 272, NE = 273,
  GE = 274, LE = 275, UMINUS = 276, UPLUS = 277
}
 

Functions

int yyparse (void)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 
void yyerror (const char *s)
 

Variables

YYSTYPE yylval
 
static const yytype_uint8 yytranslate []
 
static const yytype_int16 yypact []
 
static const yytype_uint8 yydefact []
 
static const yytype_int8 yypgoto []
 
static const yytype_int8 yydefgoto []
 
static const yytype_int8 yytable []
 
static const yytype_int8 yycheck []
 
static const yytype_uint8 yystos []
 
static const yytype_uint8 yyr1 []
 
static const yytype_uint8 yyr2 []
 
int yychar
 
int yynerrs
 

Macro Definition Documentation

◆ _Noreturn

#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))

◆ YY_

#define YY_ (   Msgid)    Msgid

◆ YY_ATTRIBUTE

#define YY_ATTRIBUTE (   Spec)    /* empty */

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

◆ YY_NULLPTR

#define YY_NULLPTR   0

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

◆ YY_SYMBOL_PRINT

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

◆ YY_YY_SRC_MEI_MEI_PARSER_H_INCLUDED

#define YY_YY_SRC_MEI_MEI_PARSER_H_INCLUDED

◆ YYABORT

#define YYABORT   goto yyabortlab

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

◆ 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)
if(!(yy_init))
Definition: mei_scanner.c:762
int yychar
Definition: mei_parser.c:1283
#define YY_(Msgid)
Definition: mei_parser.c:249
#define YYEMPTY
Definition: mei_parser.c:860

◆ YYBISON

#define YYBISON   1

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.0.4"

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

◆ YYCOPY

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

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

◆ YYDEBUG

#define YYDEBUG   0

◆ YYDPRINTF

#define YYDPRINTF (   Args)

◆ YYEMPTY

#define YYEMPTY   (-2)

◆ YYEOF

#define YYEOF   0

◆ YYERRCODE

#define YYERRCODE   256

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

◆ YYERROR

#define YYERROR   goto yyerrorlab

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE   0

◆ YYFINAL

#define YYFINAL   34

◆ YYFREE

#define YYFREE   free

◆ YYINITDEPTH

#define YYINITDEPTH   200

◆ YYLAST

#define YYLAST   1149

◆ YYMALLOC

#define YYMALLOC   malloc

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

◆ YYMAXUTOK

#define YYMAXUTOK   277

◆ YYNNTS

#define YYNNTS   5

◆ YYNRULES

#define YYNRULES   38

◆ YYNSTATES

#define YYNSTATES   98

◆ YYNTOKENS

#define YYNTOKENS   38

◆ YYPACT_NINF

#define YYPACT_NINF   -28

◆ yypact_value_is_default

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

◆ YYPOPSTACK

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

◆ YYPULL

#define YYPULL   1

◆ YYPURE

#define YYPURE   0

◆ YYPUSH

#define YYPUSH   0

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

◆ YYSIZE_T

#define YYSIZE_T   size_t

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
short int yytype_int16
Definition: mei_parser.c:223
#define YYSTACK_GAP_MAXIMUM
Definition: mei_parser.c:387

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

◆ YYSTACK_GAP_MAXIMUM

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

◆ 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: mei_parser.c:387

◆ YYSTYPE_IS_DECLARED

#define YYSTYPE_IS_DECLARED   1

◆ YYSTYPE_IS_TRIVIAL

#define YYSTYPE_IS_TRIVIAL   1

◆ YYTABLE_NINF

#define YYTABLE_NINF   -37

◆ yytable_value_is_error

#define yytable_value_is_error (   Yytable_value)    0

◆ YYTERROR

#define YYTERROR   1

◆ YYTOKENTYPE

#define YYTOKENTYPE

◆ YYTRANSLATE

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

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

◆ YYUSE

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

Typedef Documentation

◆ yytype_int16

typedef short int yytype_int16

◆ yytype_int8

typedef signed char yytype_int8

◆ yytype_uint16

typedef unsigned short int yytype_uint16

◆ yytype_uint8

typedef unsigned char yytype_uint8

Enumeration Type Documentation

◆ yytokentype

Enumerator
NUMBER 
VAR 
FUN1 
FUN2 
FUN3 
FUN4 
IN1D 
WHILE 
IF 
PRINT 
IFX 
ELSE 
OR 
AND 
EQ 
NE 
GE 
LE 
UMINUS 
UPLUS 
NUMBER 
VAR 
FUN1 
FUN2 
FUN3 
FUN4 
IN1D 
WHILE 
IF 
PRINT 
IFX 
ELSE 
OR 
AND 
EQ 
NE 
GE 
LE 
UMINUS 
UPLUS 

Function Documentation

◆ free()

void free ( void *  )

◆ malloc()

void* malloc ( YYSIZE_T  )

◆ yydestruct()

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

◆ yyerror()

void yyerror ( const char *  s)

◆ yyparse()

int yyparse ( void  )

Variable Documentation

◆ yychar

int yychar

◆ yycheck

const yytype_int8 yycheck[]
static

◆ yydefact

const yytype_uint8 yydefact[]
static
Initial value:
=
{
2, 15, 16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 6, 0, 0, 0, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 16, 0, 0,
0, 0, 0, 0, 1, 0, 14, 38, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 7, 0, 0, 0, 0, 0, 0, 0, 8,
37, 13, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 9, 17, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 18, 0, 0,
0, 0, 0, 0, 19, 0, 0, 20
}

◆ yydefgoto

const yytype_int8 yydefgoto[]
static
Initial value:
=
{
-1, 16, 17, 18, 19
}

◆ yylval

YYSTYPE yylval

◆ yynerrs

int yynerrs

◆ yypact

const yytype_int16 yypact[]
static
Initial value:
=
{
1043, -28, -11, -27, -26, -25, -23, -15, -14, 881,
881, 881, 881, -28, 881, 1043, 20, 1043, 195, 1063,
881, 881, 881, 881, 881, 881, 881, -28, 1090, 26,
253, 280, 849, 828, -28, 232, -28, -28, 881, 881,
881, 881, 881, 881, 881, 881, 881, 881, 881, 881,
881, -28, 1117, 876, 658, 685, 712, 903, 930, -28,
-28, -28, 307, 334, 361, 388, 415, 442, 469, 496,
523, 550, 577, 604, 631, -28, -28, 881, 881, 881,
1043, 1043, 957, 739, 766, 84, 121, -28, 881, 881,
1043, 984, 793, 158, -28, 881, 1011, -28
}

◆ yypgoto

const yytype_int8 yypgoto[]
static
Initial value:
=
{
-28, -28, 6, -8, -9
}

◆ yyr1

const yytype_uint8 yyr1[]
static
Initial value:
=
{
0, 38, 39, 39, 40, 40, 41, 41, 41, 41,
41, 41, 41, 41, 41, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42
}

◆ yyr2

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

◆ yystos

const yytype_uint8 yystos[]
static
Initial value:
=
{
0, 3, 4, 5, 6, 7, 8, 10, 11, 12,
24, 25, 28, 32, 33, 35, 39, 40, 41, 42,
15, 33, 33, 33, 33, 33, 33, 4, 42, 42,
42, 42, 42, 40, 0, 41, 1, 1, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
31, 32, 42, 42, 42, 42, 42, 42, 42, 32,
34, 36, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 32, 34, 37, 37, 37,
34, 34, 42, 42, 42, 41, 41, 34, 37, 37,
14, 42, 42, 41, 34, 37, 42, 34
}

◆ yytable

const yytype_int8 yytable[]
static

◆ yytranslate

const yytype_uint8 yytranslate[]
static