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_MEI_PARSER_H_INCLUDED
 
#define YYDEBUG   0
 
#define YYTOKENTYPE
 
#define NUMBER   258
 
#define VAR   259
 
#define FUN1   260
 
#define FUN2   261
 
#define FUN3   262
 
#define FUN4   263
 
#define IN1D   264
 
#define WHILE   265
 
#define IF   266
 
#define PRINT   267
 
#define IFX   268
 
#define ELSE   269
 
#define OR   270
 
#define AND   271
 
#define EQ   272
 
#define NE   273
 
#define GE   274
 
#define LE   275
 
#define UMINUS   276
 
#define UPLUS   277
 
#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   36
 
#define YYLAST   1267
 
#define YYNTOKENS   38
 
#define YYNNTS   5
 
#define YYNRULES   39
 
#define YYNSTATES   108
 
#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   -38
 
#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

#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))
#define AND   271
#define ELSE   269
#define EQ   272
#define FUN1   260
#define FUN2   261
#define FUN3   262
#define FUN4   263
#define GE   274
#define IF   266
#define IFX   268
#define IN1D   264
#define LE   275
#define NE   273
#define NUMBER   258
#define OR   270
#define PRINT   267
#define UMINUS   276
#define UPLUS   277
#define VAR   259
#define WHILE   265
#define YY_ (   Msgid)    Msgid
#define YY_ATTRIBUTE (   Spec)    /* empty */
#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_INITIAL_VALUE (   Value)    Value
#define YY_NULLPTR   0
#define YY_REDUCE_PRINT (   Rule)
#define YY_STACK_PRINT (   Bottom,
  Top 
)
#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
#define YY_YY_MEI_PARSER_H_INCLUDED
#define YYABORT   goto yyabortlab
#define YYACCEPT   goto yyacceptlab
#define YYBACKUP (   Token,
  Value 
)
Value:
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
} \
while (0)
if(!(yy_init))
Definition: mei_scanner.c:808
int yychar
Definition: mei_parser.c:1331
#define YYPOPSTACK(N)
#define YY_(Msgid)
Definition: mei_parser.c:270
YYSTYPE yylval
Definition: mei_parser.c:1334
void yyerror(const char *s)
Definition: mei_parser.c:2043
#define YYERROR
Definition: mei_parser.c:913
#define YYEMPTY
Definition: mei_parser.c:908
#define YYBISON   1
#define YYBISON_VERSION   "3.0.4"
#define yyclearin   (yychar = YYEMPTY)
#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)
#define YYSIZE_T
Definition: mei_parser.c:254
#define YYCOPY_NEEDED   1
#define YYDEBUG   0
#define YYDPRINTF (   Args)
#define YYEMPTY   (-2)
#define YYEOF   0
#define YYERRCODE   256
#define yyerrok   (yyerrstatus = 0)
#define YYERROR   goto yyerrorlab
#define YYERROR_VERBOSE   0
#define YYFINAL   36
#define YYFREE   free
#define YYINITDEPTH   200
#define YYLAST   1267
#define YYMALLOC   malloc
#define YYMAXDEPTH   10000
#define YYMAXUTOK   277
#define YYNNTS   5
#define YYNRULES   39
#define YYNSTATES   108
#define YYNTOKENS   38
#define YYPACT_NINF   -28
#define yypact_value_is_default (   Yystate)    (!!((Yystate) == (-28)))
#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))
#define YYPULL   1
#define YYPURE   0
#define YYPUSH   0
#define YYRECOVERING ( )    (!!yyerrstatus)
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
#define YYSIZE_T   size_t
#define YYSKELETON_NAME   "yacc.c"
#define YYSTACK_ALLOC   YYMALLOC
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
short int yytype_int16
Definition: mei_parser.c:244
#define YYSTACK_GAP_MAXIMUM
Definition: mei_parser.c:408
#define YYSTACK_FREE   YYFREE
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
#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 YYSIZE_T
Definition: mei_parser.c:254
#define YYSTACK_GAP_MAXIMUM
Definition: mei_parser.c:408
#define YYCOPY(Dst, Src, Count)
Definition: mei_parser.c:444
#define YYSTYPE_IS_DECLARED   1
#define YYSTYPE_IS_TRIVIAL   1
#define YYTABLE_NINF   -38
#define yytable_value_is_error (   Yytable_value)    0
#define YYTERROR   1
#define YYTOKENTYPE
#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYUNDEFTOK   2
#define YYUSE (   E)    ((void) (E))

Typedef Documentation

typedef short int yytype_int16
typedef signed char yytype_int8
typedef unsigned short int yytype_uint16
typedef unsigned char yytype_uint8

Enumeration Type Documentation

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

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

Variable Documentation

int yychar
const yytype_int8 yycheck[]
static
const yytype_uint8 yydefact[]
static
Initial value:
=
{
2, 15, 16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 6, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 16,
0, 0, 0, 0, 0, 0, 1, 0, 14, 39,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 7, 0, 0, 0, 0, 0, 0,
0, 0, 8, 38, 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,
0, 0, 18, 0, 0, 0, 0, 0, 0, 0,
0, 19, 0, 0, 0, 0, 20, 21
}
const yytype_int8 yydefgoto[]
static
Initial value:
=
{
-1, 17, 18, 19, 20
}
YYSTYPE yylval
int yynerrs
const yytype_int16 yypact[]
static
Initial value:
=
{
1161, -28, -11, -27, -26, -25, -23, -14, -13, -12,
972, 972, 972, 972, -28, 972, 1161, 22, 1161, 205,
1181, 972, 972, 972, 972, 972, 972, 972, 972, -28,
1208, 27, 263, 290, 940, 919, -28, 242, -28, -28,
972, 972, 972, 972, 972, 972, 972, 972, 972, 972,
972, 972, 972, -28, 1235, 967, 668, 695, 722, 749,
994, 1021, -28, -28, -28, 317, 344, 371, 398, 425,
452, 479, 506, 533, 560, 587, 614, 641, -28, -28,
972, 972, 972, 972, 1161, 1161, 1048, 776, 803, 830,
94, 131, -28, 972, 972, 972, 1161, 1075, 857, 884,
168, -28, 972, 972, 1102, 1129, -28, -28
}
const yytype_int8 yypgoto[]
static
Initial value:
=
{
-28, -28, 7, -9, -10
}
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, 42
}
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, 10, 2, 2, 2, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 2
}
const yytype_uint8 yystos[]
static
Initial value:
=
{
0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 24, 25, 28, 32, 33, 35, 39, 40, 41,
42, 15, 33, 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, 42, 32, 34, 36, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 32, 34,
37, 37, 37, 37, 34, 34, 42, 42, 42, 42,
41, 41, 34, 37, 37, 37, 14, 42, 42, 42,
41, 34, 37, 37, 42, 42, 34, 34
}
const yytype_int8 yytable[]
static
const yytype_uint8 yytranslate[]
static