Otawa  0.10
ast_parser.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <otawa/ast.h>
#include <elm/genstruct/Vector.h>
#include <otawa/ast/ASTLoader.h>

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.0.2"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   0
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define yyparse   ast_parse
 
#define yylex   ast_lex
 
#define yyerror   ast_error
 
#define yydebug   ast_debug
 
#define yynerrs   ast_nerrs
 
#define yylval   ast_lval
 
#define yychar   ast_char
 
#define yylloc   ast_lloc
 
#define YY_NULLPTR   0
 
#define YYERROR_VERBOSE   1
 
#define YY_AST_HOME_CASSE_OTAWA_OTAWA_SRC_AST_AST_PARSER_H_INCLUDED
 
#define YYDEBUG   0
 
#define size_t   unsigned long
 
#define YYTOKENTYPE
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYLTYPE_IS_DECLARED   1
 
#define YYLTYPE_IS_TRIVIAL   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   6
 
#define YYLAST   91
 
#define YYNTOKENS   27
 
#define YYNNTS   13
 
#define YYNRULES   33
 
#define YYNSTATES   95
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   272
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -33
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-33)))
 
#define YYTABLE_NINF   -1
 
#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 YYLLOC_DEFAULT(Current, Rhs, N)
 
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
 
#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 YYCASE_(N, S)
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
 
#define YYSYNTAX_ERROR
 

Typedefs

typedef union YYSTYPE YYSTYPE
 
typedef struct YYLTYPE YYLTYPE
 
typedef unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  yytokentype {
  ID = 258, INTEGER = 259, REAL = 260, BB = 261,
  EDGE = 262, EOL = 263, OP_LE = 264, OP_GE = 265,
  ID = 258, INTEGER = 259, REAL = 260, BB = 261,
  EDGE = 262, EOL = 263, OP_LE = 264, OP_GE = 265,
  INTEGER = 258, STRING = 259, BAD_TOKEN = 260, CHECKSUM = 261,
  DOT_DOT = 262, KW_ACCESS = 263, KW_CALL = 264, KW_CONTROL = 265,
  KW_DOINLINE = 266, KW_ENTRY = 267, KW_IGNORE = 268, KW_IGNORECONTROL = 269,
  KW_IGNORESEQ = 270, KW_IN = 271, KW_INLINING_OFF = 272, KW_INLINING_ON = 273,
  KW_LIBRARY = 274, KW_MAX = 275, KW_MEMORY = 276, KW_MULTIBRANCH = 277,
  KW_MULTICALL = 278, KW_NO = 279, KW_NOCALL = 280, KW_NOINLINE = 281,
  KW_PRESERVE = 282, KW_REG = 283, KW_SEQ = 284, KW_TO = 285,
  KW_TOTAL = 286, LOOP = 287, NORETURN = 288, RETURN = 289,
  TYPE = 290, INTEGER = 258, STRING = 259, BAD_TOKEN = 260,
  CHECKSUM = 261, DOT_DOT = 262, KW_ACCESS = 263, KW_CALL = 264,
  KW_CONTROL = 265, KW_DOINLINE = 266, KW_ENTRY = 267, KW_IGNORE = 268,
  KW_IGNORECONTROL = 269, KW_IGNORESEQ = 270, KW_IN = 271, KW_INLINING_OFF = 272,
  KW_INLINING_ON = 273, KW_LIBRARY = 274, KW_MAX = 275, KW_MEMORY = 276,
  KW_MULTIBRANCH = 277, KW_MULTICALL = 278, KW_NO = 279, KW_NOCALL = 280,
  KW_NOINLINE = 281, KW_PRESERVE = 282, KW_REG = 283, KW_SEQ = 284,
  KW_TO = 285, KW_TOTAL = 286, LOOP = 287, NORETURN = 288,
  RETURN = 289, TYPE = 290, ERROR = 258, _LABEL = 259,
  NAME = 260, SEQ = 261, IF = 262, WHILE = 263,
  DOWHILE = 264, FOR = 265, CODE = 266, APPEL = 267,
  VIDE = 268, NUMBER = 269, UN_OP = 270, BIN_OP = 271,
  BI_OP = 272, ERROR = 258, _LABEL = 259, NAME = 260,
  SEQ = 261, IF = 262, WHILE = 263, DOWHILE = 264,
  FOR = 265, CODE = 266, APPEL = 267, VIDE = 268,
  NUMBER = 269, UN_OP = 270, BIN_OP = 271, BI_OP = 272
}
 

Functions

int ast_lex (void)
 
void ast_error (otawa::ast::ASTLoader *loader, const char *msg)
 
int ast_parse (otawa::ast::ASTLoader *loader)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
int yyparse (otawa::ast::ASTLoader *loader)
 

Variables

YYSTYPE ast_lval
 
YYLTYPE ast_lloc
 
int yychar
 
YYSTYPE yylval
 
YYLTYPE yylloc = { 1, 1, 1, 1 }
 
int yynerrs
 

Macro Definition Documentation

#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))
#define size_t   unsigned long
#define YY_ (   Msgid)    Msgid

Referenced by yyparse().

#define YY_AST_HOME_CASSE_OTAWA_OTAWA_SRC_AST_AST_PARSER_H_INCLUDED
#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

Referenced by yyparse().

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Referenced by yyparse().

#define YY_INITIAL_VALUE (   Value)    Value
#define YY_NULLPTR   0
#define YY_REDUCE_PRINT (   Rule)

Referenced by yyparse().

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Referenced by yyparse().

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

Referenced by yyparse().

#define YYABORT   goto yyabortlab

Referenced by yyparse().

#define YYACCEPT   goto yyacceptlab

Referenced by yyparse().

#define YYBACKUP (   Token,
  Value 
)
Value:
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (loader, YY_("syntax error: cannot back up")); \
} \
while (0)
#define YYPOPSTACK(N)
#define yychar
Definition: ast_parser.cpp:70
#define YY_(Msgid)
Definition: ast_parser.cpp:241
#define yylval
Definition: ast_parser.cpp:69
#define YYERROR
Definition: ast_parser.cpp:650
#define YYEMPTY
Definition: ast_parser.cpp:645
#define yyerror
Definition: ast_parser.cpp:65
if(!(yy_init))
Definition: ipet_lexer.cc:734
while(1)
Definition: ipet_lexer.cc:760
#define YYBISON   1
#define YYBISON_VERSION   "3.0.2"
#define YYCASE_ (   N,
 
)
Value:
case N: \
yyformat = S; \
break
#define yychar   ast_char

Referenced by yyparse().

#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: ast_parser.cpp:222
while(1)
Definition: ipet_lexer.cc:760
#define YYCOPY_NEEDED   1
#define yydebug   ast_debug
#define YYDEBUG   0
#define YYDPRINTF (   Args)

Referenced by yyparse().

#define YYEMPTY   (-2)

Referenced by yyparse().

#define YYEOF   0

Referenced by yyparse().

#define YYERRCODE   256
#define yyerrok   (yyerrstatus = 0)
#define yyerror   ast_error

Referenced by yyparse().

#define YYERROR   goto yyerrorlab
#define YYERROR_VERBOSE   1
#define YYFINAL   6

Referenced by yyparse().

#define YYFREE   free
#define YYINITDEPTH   200

Referenced by yyparse().

#define YYLAST   91

Referenced by yyparse().

#define yylex   ast_lex

Referenced by yyparse().

#define yylloc   ast_lloc

Referenced by yyparse().

#define YYLLOC_DEFAULT (   Current,
  Rhs,
 
)
Value:
if (N) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (0)
#define YYRHSLOC(Rhs, K)
Definition: ast_parser.cpp:701
if(!(yy_init))
Definition: ipet_lexer.cc:734
while(1)
Definition: ipet_lexer.cc:760

Referenced by yyparse().

#define YYLTYPE_IS_DECLARED   1
#define YYLTYPE_IS_TRIVIAL   1
#define yylval   ast_lval

Referenced by yyparse().

#define YYMALLOC   malloc
#define YYMAXDEPTH   10000

Referenced by yyparse().

#define YYMAXUTOK   272
#define yynerrs   ast_nerrs

Referenced by yyparse().

#define YYNNTS   13
#define YYNRULES   33
#define YYNSTATES   95
#define YYNTOKENS   27

Referenced by yyparse().

#define YYPACT_NINF   -33
#define yypact_value_is_default (   Yystate)    (!!((Yystate) == (-33)))

Referenced by yyparse().

#define yyparse   ast_parse
#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N), yylsp -= (N))

Referenced by yyparse().

#define YYPULL   1
#define YYPURE   0
#define YYPUSH   0
#define YYRECOVERING ( )    (!!yyerrstatus)
#define YYRHSLOC (   Rhs,
 
)    ((Rhs)[K])
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
#define YYSIZE_T   size_t

Referenced by yyparse().

#define YYSKELETON_NAME   "yacc.c"
#define YYSTACK_ALLOC   YYMALLOC

Referenced by yyparse().

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
union YYSTYPE YYSTYPE
Definition: ast_parser.cpp:151
struct YYLTYPE YYLTYPE
Definition: ast_parser.cpp:167
short int yytype_int16
Definition: ipet_parser.cpp:202
#define YYSTACK_GAP_MAXIMUM
Definition: ast_parser.cpp:381

Referenced by yyparse().

#define YYSTACK_FREE   YYFREE

Referenced by yyparse().

#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: ast_parser.cpp:222
#define YYSTACK_GAP_MAXIMUM
Definition: ast_parser.cpp:381
while(1)
Definition: ipet_lexer.cc:760
#define YYCOPY(Dst, Src, Count)
Definition: ast_parser.cpp:417

Referenced by yyparse().

#define YYSTYPE_IS_DECLARED   1
#define YYSTYPE_IS_TRIVIAL   1
#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)

Referenced by yyparse().

#define YYTABLE_NINF   -1
#define yytable_value_is_error (   Yytable_value)    0

Referenced by yyparse().

#define YYTERROR   1

Referenced by yyparse().

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

Referenced by yyparse().

#define YYUNDEFTOK   2
#define YYUSE (   E)    ((void) (E))

Typedef Documentation

typedef struct YYLTYPE YYLTYPE
typedef union YYSTYPE YYSTYPE
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
ID 
INTEGER 
REAL 
BB 
EDGE 
EOL 
OP_LE 
OP_GE 
ID 
INTEGER 
REAL 
BB 
EDGE 
EOL 
OP_LE 
OP_GE 
INTEGER 
STRING 
BAD_TOKEN 
CHECKSUM 
DOT_DOT 
KW_ACCESS 
KW_CALL 
KW_CONTROL 
KW_DOINLINE 
KW_ENTRY 
KW_IGNORE 
KW_IGNORECONTROL 
KW_IGNORESEQ 
KW_IN 
KW_INLINING_OFF 
KW_INLINING_ON 
KW_LIBRARY 
KW_MAX 
KW_MEMORY 
KW_MULTIBRANCH 
KW_MULTICALL 
KW_NO 
KW_NOCALL 
KW_NOINLINE 
KW_PRESERVE 
KW_REG 
KW_SEQ 
KW_TO 
KW_TOTAL 
LOOP 
NORETURN 
RETURN 
TYPE 
INTEGER 
STRING 
BAD_TOKEN 
CHECKSUM 
DOT_DOT 
KW_ACCESS 
KW_CALL 
KW_CONTROL 
KW_DOINLINE 
KW_ENTRY 
KW_IGNORE 
KW_IGNORECONTROL 
KW_IGNORESEQ 
KW_IN 
KW_INLINING_OFF 
KW_INLINING_ON 
KW_LIBRARY 
KW_MAX 
KW_MEMORY 
KW_MULTIBRANCH 
KW_MULTICALL 
KW_NO 
KW_NOCALL 
KW_NOINLINE 
KW_PRESERVE 
KW_REG 
KW_SEQ 
KW_TO 
KW_TOTAL 
LOOP 
NORETURN 
RETURN 
TYPE 
ERROR 
_LABEL 
NAME 
SEQ 
IF 
WHILE 
DOWHILE 
FOR 
CODE 
APPEL 
VIDE 
NUMBER 
UN_OP 
BIN_OP 
BI_OP 
ERROR 
_LABEL 
NAME 
SEQ 
IF 
WHILE 
DOWHILE 
FOR 
CODE 
APPEL 
VIDE 
NUMBER 
UN_OP 
BIN_OP 
BI_OP 

Function Documentation

void ast_error ( otawa::ast::ASTLoader loader,
const char *  msg 
)
int ast_lex ( void  )
int ast_parse ( otawa::ast::ASTLoader loader)
void free ( void *  )

Referenced by yyparse().

void* malloc ( YYSIZE_T  )

Variable Documentation

YYLTYPE ast_lloc
YYSTYPE ast_lval

Referenced by while().

int yychar
YYLTYPE yylloc = { 1, 1, 1, 1 }
YYSTYPE yylval
int yynerrs