yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ilang_parser.tab.cc File Reference
#include <list>
#include "ilang_frontend.h"
#include <stddef.h>
#include <stdio.h>
+ Include dependency graph for ilang_parser.tab.cc:

Go to the source code of this file.

Data Structures

union  YYSTYPE
 
union  yyalloc
 

Namespaces

 ILANG_FRONTEND
 

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   rtlil_frontend_ilang_yyparse
 
#define yylex   rtlil_frontend_ilang_yylex
 
#define yyerror   rtlil_frontend_ilang_yyerror
 
#define yydebug   rtlil_frontend_ilang_yydebug
 
#define yynerrs   rtlil_frontend_ilang_yynerrs
 
#define yylval   rtlil_frontend_ilang_yylval
 
#define yychar   rtlil_frontend_ilang_yychar
 
#define YY_NULLPTR   0
 
#define YYERROR_VERBOSE   0
 
#define YY_RTLIL_FRONTEND_ILANG_YY_FRONTENDS_ILANG_ILANG_PARSER_TAB_H_INCLUDED
 
#define YYDEBUG   1
 
#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   3
 
#define YYLAST   136
 
#define YYNTOKENS   45
 
#define YYNNTS   42
 
#define YYNRULES   84
 
#define YYNSTATES   154
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   293
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -83
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-83)))
 
#define YYTABLE_NINF   -59
 
#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 YYFPRINTF   fprintf
 
#define YYDPRINTF(Args)
 
#define YY_LOCATION_PRINT(File, Loc)   ((void) 0)
 
#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 YYSTYPE YYSTYPE
 
typedef unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  yytokentype {
  TOK_ID = 258, TOK_VALUE = 259, TOK_STRING = 260, TOK_INT = 261,
  TOK_AUTOIDX = 262, TOK_MODULE = 263, TOK_WIRE = 264, TOK_WIDTH = 265,
  TOK_INPUT = 266, TOK_OUTPUT = 267, TOK_INOUT = 268, TOK_CELL = 269,
  TOK_CONNECT = 270, TOK_SWITCH = 271, TOK_CASE = 272, TOK_ASSIGN = 273,
  TOK_SYNC = 274, TOK_LOW = 275, TOK_HIGH = 276, TOK_POSEDGE = 277,
  TOK_NEGEDGE = 278, TOK_EDGE = 279, TOK_ALWAYS = 280, TOK_INIT = 281,
  TOK_UPDATE = 282, TOK_PROCESS = 283, TOK_END = 284, TOK_INVALID = 285,
  TOK_EOL = 286, TOK_OFFSET = 287, TOK_PARAMETER = 288, TOK_ATTRIBUTE = 289,
  TOK_MEMORY = 290, TOK_SIZE = 291, TOK_SIGNED = 292, TOK_UPTO = 293,
  TOK_ID = 258, TOK_VALUE = 259, TOK_STRING = 260, TOK_INT = 261,
  TOK_AUTOIDX = 262, TOK_MODULE = 263, TOK_WIRE = 264, TOK_WIDTH = 265,
  TOK_INPUT = 266, TOK_OUTPUT = 267, TOK_INOUT = 268, TOK_CELL = 269,
  TOK_CONNECT = 270, TOK_SWITCH = 271, TOK_CASE = 272, TOK_ASSIGN = 273,
  TOK_SYNC = 274, TOK_LOW = 275, TOK_HIGH = 276, TOK_POSEDGE = 277,
  TOK_NEGEDGE = 278, TOK_EDGE = 279, TOK_ALWAYS = 280, TOK_INIT = 281,
  TOK_UPDATE = 282, TOK_PROCESS = 283, TOK_END = 284, TOK_INVALID = 285,
  TOK_EOL = 286, TOK_OFFSET = 287, TOK_PARAMETER = 288, TOK_ATTRIBUTE = 289,
  TOK_MEMORY = 290, TOK_SIZE = 291, TOK_SIGNED = 292, TOK_UPTO = 293,
  TOK_STRING = 258, TOK_ID = 259, TOK_CONST = 260, TOK_REALVAL = 261,
  TOK_PRIMITIVE = 262, ATTR_BEGIN = 263, ATTR_END = 264, DEFATTR_BEGIN = 265,
  DEFATTR_END = 266, TOK_MODULE = 267, TOK_ENDMODULE = 268, TOK_PARAMETER = 269,
  TOK_LOCALPARAM = 270, TOK_DEFPARAM = 271, TOK_INPUT = 272, TOK_OUTPUT = 273,
  TOK_INOUT = 274, TOK_WIRE = 275, TOK_REG = 276, TOK_INTEGER = 277,
  TOK_SIGNED = 278, TOK_ASSIGN = 279, TOK_ALWAYS = 280, TOK_INITIAL = 281,
  TOK_BEGIN = 282, TOK_END = 283, TOK_IF = 284, TOK_ELSE = 285,
  TOK_FOR = 286, TOK_WHILE = 287, TOK_REPEAT = 288, TOK_DPI_FUNCTION = 289,
  TOK_POSEDGE = 290, TOK_NEGEDGE = 291, TOK_OR = 292, TOK_CASE = 293,
  TOK_CASEX = 294, TOK_CASEZ = 295, TOK_ENDCASE = 296, TOK_DEFAULT = 297,
  TOK_FUNCTION = 298, TOK_ENDFUNCTION = 299, TOK_TASK = 300, TOK_ENDTASK = 301,
  TOK_GENERATE = 302, TOK_ENDGENERATE = 303, TOK_GENVAR = 304, TOK_REAL = 305,
  TOK_SYNOPSYS_FULL_CASE = 306, TOK_SYNOPSYS_PARALLEL_CASE = 307, TOK_SUPPLY0 = 308, TOK_SUPPLY1 = 309,
  TOK_TO_SIGNED = 310, TOK_TO_UNSIGNED = 311, TOK_POS_INDEXED = 312, TOK_NEG_INDEXED = 313,
  TOK_ASSERT = 314, TOK_PROPERTY = 315, OP_LOR = 316, OP_LAND = 317,
  OP_NOR = 318, OP_XNOR = 319, OP_NAND = 320, OP_EQ = 321,
  OP_NE = 322, OP_EQX = 323, OP_NEX = 324, OP_LE = 325,
  OP_GE = 326, OP_SHL = 327, OP_SHR = 328, OP_SSHL = 329,
  OP_SSHR = 330, OP_POW = 331, UNARY_OPS = 332, TOK_STRING = 258,
  TOK_ID = 259, TOK_CONST = 260, TOK_REALVAL = 261, TOK_PRIMITIVE = 262,
  ATTR_BEGIN = 263, ATTR_END = 264, DEFATTR_BEGIN = 265, DEFATTR_END = 266,
  TOK_MODULE = 267, TOK_ENDMODULE = 268, TOK_PARAMETER = 269, TOK_LOCALPARAM = 270,
  TOK_DEFPARAM = 271, TOK_INPUT = 272, TOK_OUTPUT = 273, TOK_INOUT = 274,
  TOK_WIRE = 275, TOK_REG = 276, TOK_INTEGER = 277, TOK_SIGNED = 278,
  TOK_ASSIGN = 279, TOK_ALWAYS = 280, TOK_INITIAL = 281, TOK_BEGIN = 282,
  TOK_END = 283, TOK_IF = 284, TOK_ELSE = 285, TOK_FOR = 286,
  TOK_WHILE = 287, TOK_REPEAT = 288, TOK_DPI_FUNCTION = 289, TOK_POSEDGE = 290,
  TOK_NEGEDGE = 291, TOK_OR = 292, TOK_CASE = 293, TOK_CASEX = 294,
  TOK_CASEZ = 295, TOK_ENDCASE = 296, TOK_DEFAULT = 297, TOK_FUNCTION = 298,
  TOK_ENDFUNCTION = 299, TOK_TASK = 300, TOK_ENDTASK = 301, TOK_GENERATE = 302,
  TOK_ENDGENERATE = 303, TOK_GENVAR = 304, TOK_REAL = 305, TOK_SYNOPSYS_FULL_CASE = 306,
  TOK_SYNOPSYS_PARALLEL_CASE = 307, TOK_SUPPLY0 = 308, TOK_SUPPLY1 = 309, TOK_TO_SIGNED = 310,
  TOK_TO_UNSIGNED = 311, TOK_POS_INDEXED = 312, TOK_NEG_INDEXED = 313, TOK_ASSERT = 314,
  TOK_PROPERTY = 315, OP_LOR = 316, OP_LAND = 317, OP_NOR = 318,
  OP_XNOR = 319, OP_NAND = 320, OP_EQ = 321, OP_NE = 322,
  OP_EQX = 323, OP_NEX = 324, OP_LE = 325, OP_GE = 326,
  OP_SHL = 327, OP_SHR = 328, OP_SSHL = 329, OP_SSHR = 330,
  OP_POW = 331, UNARY_OPS = 332
}
 

Functions

int rtlil_frontend_ilang_yyparse (void)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
 
static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
 
static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 
static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
 
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 
int yyparse (void)
 

Variables

RTLIL::ModuleILANG_FRONTEND::current_module
 
RTLIL::WireILANG_FRONTEND::current_wire
 
RTLIL::MemoryILANG_FRONTEND::current_memory
 
RTLIL::CellILANG_FRONTEND::current_cell
 
RTLIL::ProcessILANG_FRONTEND::current_process
 
std::vector< std::vector
< RTLIL::SwitchRule * > * > 
ILANG_FRONTEND::switch_stack
 
std::vector< RTLIL::CaseRule * > ILANG_FRONTEND::case_stack
 
std::map< RTLIL::IdString,
RTLIL::Const
ILANG_FRONTEND::attrbuf
 
int rtlil_frontend_ilang_yydebug
 
YYSTYPE rtlil_frontend_ilang_yylval
 
static const yytype_uint8 yytranslate []
 
static const yytype_uint16 yyrline []
 
static const char *const yytname []
 
static const yytype_int8 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_uint8 yyr2 []
 
int yydebug
 
int yychar
 
YYSTYPE yylval
 
int yynerrs
 

Macro Definition Documentation

#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))

Definition at line 275 of file ilang_parser.tab.cc.

#define YY_ (   Msgid)    Msgid

Definition at line 248 of file ilang_parser.tab.cc.

#define YY_ATTRIBUTE (   Spec)    /* empty */

Definition at line 258 of file ilang_parser.tab.cc.

#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))

Definition at line 263 of file ilang_parser.tab.cc.

#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))

Definition at line 267 of file ilang_parser.tab.cc.

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 298 of file ilang_parser.tab.cc.

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 299 of file ilang_parser.tab.cc.

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 295 of file ilang_parser.tab.cc.

#define YY_LOCATION_PRINT (   File,
  Loc 
)    ((void) 0)

Definition at line 761 of file ilang_parser.tab.cc.

#define YY_NULLPTR   0

Definition at line 100 of file ilang_parser.tab.cc.

#define YY_REDUCE_PRINT (   Rule)
Value:
do { \
yy_reduce_print (yyssp, yyvsp, Rule); \
} while (0)
if(!(yy_init))
Definition: ilang_lexer.cc:846
#define yydebug
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)

Definition at line 858 of file ilang_parser.tab.cc.

#define YY_RTLIL_FRONTEND_ILANG_YY_FRONTENDS_ILANG_ILANG_PARSER_TAB_H_INCLUDED

Definition at line 115 of file ilang_parser.tab.cc.

#define YY_STACK_PRINT (   Bottom,
  Top 
)
Value:
do { \
yy_stack_print ((Bottom), (Top)); \
} while (0)
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
if(!(yy_init))
Definition: ilang_lexer.cc:846
#define yydebug

Definition at line 827 of file ilang_parser.tab.cc.

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
Value:
do { \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
#define YYFPRINTF
if(!(yy_init))
Definition: ilang_lexer.cc:846
#define yydebug
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)

Definition at line 765 of file ilang_parser.tab.cc.

#define YYABORT   goto yyabortlab

Definition at line 716 of file ilang_parser.tab.cc.

#define YYACCEPT   goto yyacceptlab

Definition at line 715 of file ilang_parser.tab.cc.

#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)
#define YYERROR
#define yychar
#define YYEMPTY
if(!(yy_init))
Definition: ilang_lexer.cc:846
#define yyerror
#define YYPOPSTACK(N)
while(1)
Definition: ilang_lexer.cc:872
#define yylval
#define YY_(Msgid)

Definition at line 722 of file ilang_parser.tab.cc.

#define YYBISON   1

Definition at line 44 of file ilang_parser.tab.cc.

#define YYBISON_VERSION   "3.0.2"

Definition at line 47 of file ilang_parser.tab.cc.

#define yychar   rtlil_frontend_ilang_yychar

Definition at line 70 of file ilang_parser.tab.cc.

#define yyclearin   (yychar = YYEMPTY)

Definition at line 711 of file ilang_parser.tab.cc.

#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
while(1)
Definition: ilang_lexer.cc:872

Definition at line 422 of file ilang_parser.tab.cc.

#define YYCOPY_NEEDED   1

Definition at line 394 of file ilang_parser.tab.cc.

#define yydebug   rtlil_frontend_ilang_yydebug

Definition at line 66 of file ilang_parser.tab.cc.

#define YYDEBUG   1

Definition at line 118 of file ilang_parser.tab.cc.

#define YYDPRINTF (   Args)
Value:
do { \
YYFPRINTF Args; \
} while (0)
#define YYFPRINTF
if(!(yy_init))
Definition: ilang_lexer.cc:846
#define yydebug

Definition at line 753 of file ilang_parser.tab.cc.

#define YYEMPTY   (-2)

Definition at line 712 of file ilang_parser.tab.cc.

#define YYEOF   0

Definition at line 713 of file ilang_parser.tab.cc.

#define YYERRCODE   256

Definition at line 741 of file ilang_parser.tab.cc.

#define yyerrok   (yyerrstatus = 0)

Definition at line 710 of file ilang_parser.tab.cc.

#define yyerror   rtlil_frontend_ilang_yyerror

Definition at line 65 of file ilang_parser.tab.cc.

#define YYERROR   goto yyerrorlab

Definition at line 717 of file ilang_parser.tab.cc.

#define YYERROR_VERBOSE   0

Definition at line 109 of file ilang_parser.tab.cc.

#define YYFINAL   3

Definition at line 435 of file ilang_parser.tab.cc.

#define YYFPRINTF   fprintf

Definition at line 750 of file ilang_parser.tab.cc.

#define YYFREE   free

Definition at line 365 of file ilang_parser.tab.cc.

#define YYINITDEPTH   200

Definition at line 877 of file ilang_parser.tab.cc.

#define YYLAST   136

Definition at line 437 of file ilang_parser.tab.cc.

#define yylex   rtlil_frontend_ilang_yylex

Definition at line 64 of file ilang_parser.tab.cc.

#define yylval   rtlil_frontend_ilang_yylval

Definition at line 69 of file ilang_parser.tab.cc.

#define YYMALLOC   malloc

Definition at line 359 of file ilang_parser.tab.cc.

#define YYMAXDEPTH   10000

Definition at line 888 of file ilang_parser.tab.cc.

#define YYMAXUTOK   293

Definition at line 451 of file ilang_parser.tab.cc.

#define yynerrs   rtlil_frontend_ilang_yynerrs

Definition at line 67 of file ilang_parser.tab.cc.

#define YYNNTS   42

Definition at line 442 of file ilang_parser.tab.cc.

#define YYNRULES   84

Definition at line 444 of file ilang_parser.tab.cc.

#define YYNSTATES   154

Definition at line 446 of file ilang_parser.tab.cc.

#define YYNTOKENS   45

Definition at line 440 of file ilang_parser.tab.cc.

#define YYPACT_NINF   -83

Definition at line 545 of file ilang_parser.tab.cc.

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

Definition at line 547 of file ilang_parser.tab.cc.

#define yyparse   rtlil_frontend_ilang_yyparse

Definition at line 63 of file ilang_parser.tab.cc.

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

Definition at line 59 of file ilang_parser.tab.cc.

#define YYPURE   0

Definition at line 53 of file ilang_parser.tab.cc.

#define YYPUSH   0

Definition at line 56 of file ilang_parser.tab.cc.

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 720 of file ilang_parser.tab.cc.

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 238 of file ilang_parser.tab.cc.

#define YYSIZE_T   size_t

Definition at line 232 of file ilang_parser.tab.cc.

#define YYSKELETON_NAME   "yacc.c"

Definition at line 50 of file ilang_parser.tab.cc.

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 345 of file ilang_parser.tab.cc.

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 348 of file ilang_parser.tab.cc.

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
union YYSTYPE YYSTYPE
#define YYSTACK_GAP_MAXIMUM
short int yytype_int16

Definition at line 390 of file ilang_parser.tab.cc.

#define YYSTACK_FREE   YYFREE

Definition at line 346 of file ilang_parser.tab.cc.

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

Definition at line 386 of file ilang_parser.tab.cc.

#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
#define YYSIZE_T
#define YYCOPY(Dst, Src, Count)
while(1)
Definition: ilang_lexer.cc:872

Definition at line 401 of file ilang_parser.tab.cc.

#define YYSTYPE_IS_DECLARED   1

Definition at line 183 of file ilang_parser.tab.cc.

#define YYSTYPE_IS_TRIVIAL   1

Definition at line 182 of file ilang_parser.tab.cc.

#define YYTABLE_NINF   -59

Definition at line 550 of file ilang_parser.tab.cc.

#define yytable_value_is_error (   Yytable_value)    0

Definition at line 552 of file ilang_parser.tab.cc.

#define YYTERROR   1

Definition at line 740 of file ilang_parser.tab.cc.

#define YYTOKENTYPE

Definition at line 126 of file ilang_parser.tab.cc.

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

Definition at line 453 of file ilang_parser.tab.cc.

#define YYUNDEFTOK   2

Definition at line 450 of file ilang_parser.tab.cc.

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

Definition at line 281 of file ilang_parser.tab.cc.

Typedef Documentation

typedef union YYSTYPE YYSTYPE

Definition at line 170 of file ilang_parser.tab.cc.

typedef short int yytype_int16

Definition at line 222 of file ilang_parser.tab.cc.

typedef signed char yytype_int8

Definition at line 210 of file ilang_parser.tab.cc.

typedef unsigned short int yytype_uint16

Definition at line 216 of file ilang_parser.tab.cc.

typedef unsigned char yytype_uint8

Definition at line 204 of file ilang_parser.tab.cc.

Enumeration Type Documentation

Enumerator
TOK_ID 
TOK_VALUE 
TOK_STRING 
TOK_INT 
TOK_AUTOIDX 
TOK_MODULE 
TOK_WIRE 
TOK_WIDTH 
TOK_INPUT 
TOK_OUTPUT 
TOK_INOUT 
TOK_CELL 
TOK_CONNECT 
TOK_SWITCH 
TOK_CASE 
TOK_ASSIGN 
TOK_SYNC 
TOK_LOW 
TOK_HIGH 
TOK_POSEDGE 
TOK_NEGEDGE 
TOK_EDGE 
TOK_ALWAYS 
TOK_INIT 
TOK_UPDATE 
TOK_PROCESS 
TOK_END 
TOK_INVALID 
TOK_EOL 
TOK_OFFSET 
TOK_PARAMETER 
TOK_ATTRIBUTE 
TOK_MEMORY 
TOK_SIZE 
TOK_SIGNED 
TOK_UPTO 
TOK_ID 
TOK_VALUE 
TOK_STRING 
TOK_INT 
TOK_AUTOIDX 
TOK_MODULE 
TOK_WIRE 
TOK_WIDTH 
TOK_INPUT 
TOK_OUTPUT 
TOK_INOUT 
TOK_CELL 
TOK_CONNECT 
TOK_SWITCH 
TOK_CASE 
TOK_ASSIGN 
TOK_SYNC 
TOK_LOW 
TOK_HIGH 
TOK_POSEDGE 
TOK_NEGEDGE 
TOK_EDGE 
TOK_ALWAYS 
TOK_INIT 
TOK_UPDATE 
TOK_PROCESS 
TOK_END 
TOK_INVALID 
TOK_EOL 
TOK_OFFSET 
TOK_PARAMETER 
TOK_ATTRIBUTE 
TOK_MEMORY 
TOK_SIZE 
TOK_SIGNED 
TOK_UPTO 
TOK_STRING 
TOK_ID 
TOK_CONST 
TOK_REALVAL 
TOK_PRIMITIVE 
ATTR_BEGIN 
ATTR_END 
DEFATTR_BEGIN 
DEFATTR_END 
TOK_MODULE 
TOK_ENDMODULE 
TOK_PARAMETER 
TOK_LOCALPARAM 
TOK_DEFPARAM 
TOK_INPUT 
TOK_OUTPUT 
TOK_INOUT 
TOK_WIRE 
TOK_REG 
TOK_INTEGER 
TOK_SIGNED 
TOK_ASSIGN 
TOK_ALWAYS 
TOK_INITIAL 
TOK_BEGIN 
TOK_END 
TOK_IF 
TOK_ELSE 
TOK_FOR 
TOK_WHILE 
TOK_REPEAT 
TOK_DPI_FUNCTION 
TOK_POSEDGE 
TOK_NEGEDGE 
TOK_OR 
TOK_CASE 
TOK_CASEX 
TOK_CASEZ 
TOK_ENDCASE 
TOK_DEFAULT 
TOK_FUNCTION 
TOK_ENDFUNCTION 
TOK_TASK 
TOK_ENDTASK 
TOK_GENERATE 
TOK_ENDGENERATE 
TOK_GENVAR 
TOK_REAL 
TOK_SYNOPSYS_FULL_CASE 
TOK_SYNOPSYS_PARALLEL_CASE 
TOK_SUPPLY0 
TOK_SUPPLY1 
TOK_TO_SIGNED 
TOK_TO_UNSIGNED 
TOK_POS_INDEXED 
TOK_NEG_INDEXED 
TOK_ASSERT 
TOK_PROPERTY 
OP_LOR 
OP_LAND 
OP_NOR 
OP_XNOR 
OP_NAND 
OP_EQ 
OP_NE 
OP_EQX 
OP_NEX 
OP_LE 
OP_GE 
OP_SHL 
OP_SHR 
OP_SSHL 
OP_SSHR 
OP_POW 
UNARY_OPS 
TOK_STRING 
TOK_ID 
TOK_CONST 
TOK_REALVAL 
TOK_PRIMITIVE 
ATTR_BEGIN 
ATTR_END 
DEFATTR_BEGIN 
DEFATTR_END 
TOK_MODULE 
TOK_ENDMODULE 
TOK_PARAMETER 
TOK_LOCALPARAM 
TOK_DEFPARAM 
TOK_INPUT 
TOK_OUTPUT 
TOK_INOUT 
TOK_WIRE 
TOK_REG 
TOK_INTEGER 
TOK_SIGNED 
TOK_ASSIGN 
TOK_ALWAYS 
TOK_INITIAL 
TOK_BEGIN 
TOK_END 
TOK_IF 
TOK_ELSE 
TOK_FOR 
TOK_WHILE 
TOK_REPEAT 
TOK_DPI_FUNCTION 
TOK_POSEDGE 
TOK_NEGEDGE 
TOK_OR 
TOK_CASE 
TOK_CASEX 
TOK_CASEZ 
TOK_ENDCASE 
TOK_DEFAULT 
TOK_FUNCTION 
TOK_ENDFUNCTION 
TOK_TASK 
TOK_ENDTASK 
TOK_GENERATE 
TOK_ENDGENERATE 
TOK_GENVAR 
TOK_REAL 
TOK_SYNOPSYS_FULL_CASE 
TOK_SYNOPSYS_PARALLEL_CASE 
TOK_SUPPLY0 
TOK_SUPPLY1 
TOK_TO_SIGNED 
TOK_TO_UNSIGNED 
TOK_POS_INDEXED 
TOK_NEG_INDEXED 
TOK_ASSERT 
TOK_PROPERTY 
OP_LOR 
OP_LAND 
OP_NOR 
OP_XNOR 
OP_NAND 
OP_EQ 
OP_NE 
OP_EQX 
OP_NEX 
OP_LE 
OP_GE 
OP_SHL 
OP_SHR 
OP_SSHL 
OP_SSHR 
OP_POW 
UNARY_OPS 

Definition at line 127 of file ilang_parser.tab.cc.

128  {
129  TOK_ID = 258,
130  TOK_VALUE = 259,
131  TOK_STRING = 260,
132  TOK_INT = 261,
133  TOK_AUTOIDX = 262,
134  TOK_MODULE = 263,
135  TOK_WIRE = 264,
136  TOK_WIDTH = 265,
137  TOK_INPUT = 266,
138  TOK_OUTPUT = 267,
139  TOK_INOUT = 268,
140  TOK_CELL = 269,
141  TOK_CONNECT = 270,
142  TOK_SWITCH = 271,
143  TOK_CASE = 272,
144  TOK_ASSIGN = 273,
145  TOK_SYNC = 274,
146  TOK_LOW = 275,
147  TOK_HIGH = 276,
148  TOK_POSEDGE = 277,
149  TOK_NEGEDGE = 278,
150  TOK_EDGE = 279,
151  TOK_ALWAYS = 280,
152  TOK_INIT = 281,
153  TOK_UPDATE = 282,
154  TOK_PROCESS = 283,
155  TOK_END = 284,
156  TOK_INVALID = 285,
157  TOK_EOL = 286,
158  TOK_OFFSET = 287,
159  TOK_PARAMETER = 288,
160  TOK_ATTRIBUTE = 289,
161  TOK_MEMORY = 290,
162  TOK_SIZE = 291,
163  TOK_SIGNED = 292,
164  TOK_UPTO = 293
165  };

Function Documentation

void free ( void *  )

+ Here is the caller graph for this function:

void* malloc ( YYSIZE_T  )

+ Here is the caller graph for this function:

int rtlil_frontend_ilang_yyparse ( void  )
static void yy_reduce_print ( yytype_int16 yyssp,
YYSTYPE yyvsp,
int  yyrule 
)
static

Definition at line 839 of file ilang_parser.tab.cc.

840 {
841  unsigned long int yylno = yyrline[yyrule];
842  int yynrhs = yyr2[yyrule];
843  int yyi;
844  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
845  yyrule - 1, yylno);
846  /* The symbols being reduced. */
847  for (yyi = 0; yyi < yynrhs; yyi++)
848  {
849  YYFPRINTF (stderr, " $%d = ", yyi + 1);
850  yy_symbol_print (stderr,
851  yystos[yyssp[yyi + 1 - yynrhs]],
852  &(yyvsp[(yyi + 1) - (yynrhs)])
853  );
854  YYFPRINTF (stderr, "\n");
855  }
856 }
#define YYFPRINTF
static const yytype_uint8 yyr2[]
static const yytype_uint16 yyrline[]
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
static const yytype_uint8 yystos[]

+ Here is the call graph for this function:

static void yy_stack_print ( yytype_int16 yybottom,
yytype_int16 yytop 
)
static

Definition at line 816 of file ilang_parser.tab.cc.

817 {
818  YYFPRINTF (stderr, "Stack now");
819  for (; yybottom <= yytop; yybottom++)
820  {
821  int yybot = *yybottom;
822  YYFPRINTF (stderr, " %d", yybot);
823  }
824  YYFPRINTF (stderr, "\n");
825 }
#define YYFPRINTF
static void yy_symbol_print ( FILE *  yyoutput,
int  yytype,
YYSTYPE const *const  yyvaluep 
)
static

Definition at line 801 of file ilang_parser.tab.cc.

802 {
803  YYFPRINTF (yyoutput, "%s %s (",
804  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
805 
806  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
807  YYFPRINTF (yyoutput, ")");
808 }
#define YYNTOKENS
#define YYFPRINTF
static const char *const yytname[]
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void yy_symbol_value_print ( FILE *  yyoutput,
int  yytype,
YYSTYPE const *const  yyvaluep 
)
static

Definition at line 782 of file ilang_parser.tab.cc.

783 {
784  FILE *yyo = yyoutput;
785  YYUSE (yyo);
786  if (!yyvaluep)
787  return;
788 # ifdef YYPRINT
789  if (yytype < YYNTOKENS)
790  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
791 # endif
792  YYUSE (yytype);
793 }
#define YYNTOKENS
#define YYUSE(E)

+ Here is the caller graph for this function:

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

Definition at line 1119 of file ilang_parser.tab.cc.

1120 {
1121  YYUSE (yyvaluep);
1122  if (!yymsg)
1123  yymsg = "Deleting";
1124  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1125 
1127  YYUSE (yytype);
1129 }
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define YYUSE(E)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END

+ Here is the caller graph for this function:

int yyparse ( void  )

Definition at line 1148 of file ilang_parser.tab.cc.

1149 {
1150  int yystate;
1151  /* Number of tokens to shift before error messages enabled. */
1152  int yyerrstatus;
1153 
1154  /* The stacks and their tools:
1155  'yyss': related to states.
1156  'yyvs': related to semantic values.
1157 
1158  Refer to the stacks through separate pointers, to allow yyoverflow
1159  to reallocate them elsewhere. */
1160 
1161  /* The state stack. */
1162  yytype_int16 yyssa[YYINITDEPTH];
1163  yytype_int16 *yyss;
1164  yytype_int16 *yyssp;
1165 
1166  /* The semantic value stack. */
1167  YYSTYPE yyvsa[YYINITDEPTH];
1168  YYSTYPE *yyvs;
1169  YYSTYPE *yyvsp;
1170 
1171  YYSIZE_T yystacksize;
1172 
1173  int yyn;
1174  int yyresult;
1175  /* Lookahead token as an internal (translated) token number. */
1176  int yytoken = 0;
1177  /* The variables used to return semantic value and location from the
1178  action routines. */
1179  YYSTYPE yyval;
1180 
1181 #if YYERROR_VERBOSE
1182  /* Buffer for error messages, and its allocated size. */
1183  char yymsgbuf[128];
1184  char *yymsg = yymsgbuf;
1185  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1186 #endif
1187 
1188 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1189 
1190  /* The number of symbols on the RHS of the reduced rule.
1191  Keep to zero when no symbol should be popped. */
1192  int yylen = 0;
1193 
1194  yyssp = yyss = yyssa;
1195  yyvsp = yyvs = yyvsa;
1196  yystacksize = YYINITDEPTH;
1197 
1198  YYDPRINTF ((stderr, "Starting parse\n"));
1199 
1200  yystate = 0;
1201  yyerrstatus = 0;
1202  yynerrs = 0;
1203  yychar = YYEMPTY; /* Cause a token to be read. */
1204  goto yysetstate;
1205 
1206 /*------------------------------------------------------------.
1207 | yynewstate -- Push a new state, which is found in yystate. |
1208 `------------------------------------------------------------*/
1209  yynewstate:
1210  /* In all cases, when you get here, the value and location stacks
1211  have just been pushed. So pushing a state here evens the stacks. */
1212  yyssp++;
1213 
1214  yysetstate:
1215  *yyssp = yystate;
1216 
1217  if (yyss + yystacksize - 1 <= yyssp)
1218  {
1219  /* Get the current used size of the three stacks, in elements. */
1220  YYSIZE_T yysize = yyssp - yyss + 1;
1221 
1222 #ifdef yyoverflow
1223  {
1224  /* Give user a chance to reallocate the stack. Use copies of
1225  these so that the &'s don't force the real ones into
1226  memory. */
1227  YYSTYPE *yyvs1 = yyvs;
1228  yytype_int16 *yyss1 = yyss;
1229 
1230  /* Each stack pointer address is followed by the size of the
1231  data in use in that stack, in bytes. This used to be a
1232  conditional around just the two extra args, but that might
1233  be undefined if yyoverflow is a macro. */
1234  yyoverflow (YY_("memory exhausted"),
1235  &yyss1, yysize * sizeof (*yyssp),
1236  &yyvs1, yysize * sizeof (*yyvsp),
1237  &yystacksize);
1238 
1239  yyss = yyss1;
1240  yyvs = yyvs1;
1241  }
1242 #else /* no yyoverflow */
1243 # ifndef YYSTACK_RELOCATE
1244  goto yyexhaustedlab;
1245 # else
1246  /* Extend the stack our own way. */
1247  if (YYMAXDEPTH <= yystacksize)
1248  goto yyexhaustedlab;
1249  yystacksize *= 2;
1250  if (YYMAXDEPTH < yystacksize)
1251  yystacksize = YYMAXDEPTH;
1252 
1253  {
1254  yytype_int16 *yyss1 = yyss;
1255  union yyalloc *yyptr =
1256  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1257  if (! yyptr)
1258  goto yyexhaustedlab;
1259  YYSTACK_RELOCATE (yyss_alloc, yyss);
1260  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1261 # undef YYSTACK_RELOCATE
1262  if (yyss1 != yyssa)
1263  YYSTACK_FREE (yyss1);
1264  }
1265 # endif
1266 #endif /* no yyoverflow */
1267 
1268  yyssp = yyss + yysize - 1;
1269  yyvsp = yyvs + yysize - 1;
1270 
1271  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1272  (unsigned long int) yystacksize));
1273 
1274  if (yyss + yystacksize - 1 <= yyssp)
1275  YYABORT;
1276  }
1277 
1278  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1279 
1280  if (yystate == YYFINAL)
1281  YYACCEPT;
1282 
1283  goto yybackup;
1284 
1285 /*-----------.
1286 | yybackup. |
1287 `-----------*/
1288 yybackup:
1289 
1290  /* Do appropriate processing given the current state. Read a
1291  lookahead token if we need one and don't already have one. */
1292 
1293  /* First try to decide what to do without reference to lookahead token. */
1294  yyn = yypact[yystate];
1295  if (yypact_value_is_default (yyn))
1296  goto yydefault;
1297 
1298  /* Not known => get a lookahead token if don't already have one. */
1299 
1300  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1301  if (yychar == YYEMPTY)
1302  {
1303  YYDPRINTF ((stderr, "Reading a token: "));
1304  yychar = yylex ();
1305  }
1306 
1307  if (yychar <= YYEOF)
1308  {
1309  yychar = yytoken = YYEOF;
1310  YYDPRINTF ((stderr, "Now at end of input.\n"));
1311  }
1312  else
1313  {
1314  yytoken = YYTRANSLATE (yychar);
1315  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1316  }
1317 
1318  /* If the proper action on seeing token YYTOKEN is to reduce or to
1319  detect an error, take that action. */
1320  yyn += yytoken;
1321  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1322  goto yydefault;
1323  yyn = yytable[yyn];
1324  if (yyn <= 0)
1325  {
1326  if (yytable_value_is_error (yyn))
1327  goto yyerrlab;
1328  yyn = -yyn;
1329  goto yyreduce;
1330  }
1331 
1332  /* Count tokens shifted since error; after three, turn off error
1333  status. */
1334  if (yyerrstatus)
1335  yyerrstatus--;
1336 
1337  /* Shift the lookahead token. */
1338  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1339 
1340  /* Discard the shifted token. */
1341  yychar = YYEMPTY;
1342 
1343  yystate = yyn;
1345  *++yyvsp = yylval;
1347 
1348  goto yynewstate;
1349 
1350 
1351 /*-----------------------------------------------------------.
1352 | yydefault -- do the default action for the current state. |
1353 `-----------------------------------------------------------*/
1354 yydefault:
1355  yyn = yydefact[yystate];
1356  if (yyn == 0)
1357  goto yyerrlab;
1358  goto yyreduce;
1359 
1360 
1361 /*-----------------------------.
1362 | yyreduce -- Do a reduction. |
1363 `-----------------------------*/
1364 yyreduce:
1365  /* yyn is the number of a rule to reduce with. */
1366  yylen = yyr2[yyn];
1367 
1368  /* If YYLEN is nonzero, implement the default value of the action:
1369  '$$ = $1'.
1370 
1371  Otherwise, the following line sets YYVAL to garbage.
1372  This behavior is undocumented and Bison
1373  users should not rely upon it. Assigning to YYVAL
1374  unconditionally makes the parser a bit smaller, and it avoids a
1375  GCC warning that YYVAL may be used uninitialized. */
1376  yyval = yyvsp[1-yylen];
1377 
1378 
1379  YY_REDUCE_PRINT (yyn);
1380  switch (yyn)
1381  {
1382  case 2:
1383 #line 73 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1384  {
1385  attrbuf.clear();
1386  }
1387 #line 1388 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1388  break;
1389 
1390  case 3:
1391 #line 75 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1392  {
1393  if (attrbuf.size() != 0)
1394  rtlil_frontend_ilang_yyerror("dangling attribute");
1395  }
1396 #line 1397 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1397  break;
1398 
1399  case 11:
1400 #line 93 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1401  {
1402  if (current_design->has((yyvsp[-1].string)))
1403  rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of module %s.", (yyvsp[-1].string)).c_str());
1405  current_module->name = (yyvsp[-1].string);
1406  current_module->attributes = attrbuf;
1408  attrbuf.clear();
1409  free((yyvsp[-1].string));
1410  }
1411 #line 1412 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1412  break;
1413 
1414  case 12:
1415 #line 102 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1416  {
1417  if (attrbuf.size() != 0)
1418  rtlil_frontend_ilang_yyerror("dangling attribute");
1420  }
1421 #line 1422 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1422  break;
1423 
1424  case 22:
1425 #line 116 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1426  {
1427  attrbuf[(yyvsp[-2].string)] = *(yyvsp[-1].data);
1428  delete (yyvsp[-1].data);
1429  free((yyvsp[-2].string));
1430  }
1431 #line 1432 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1432  break;
1433 
1434  case 23:
1435 #line 123 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1436  {
1437  autoidx = std::max(autoidx, (yyvsp[-1].integer));
1438  }
1439 #line 1440 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1440  break;
1441 
1442  case 24:
1443 #line 128 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1444  {
1445  current_wire = current_module->addWire("$__ilang_frontend_tmp__");
1446  current_wire->attributes = attrbuf;
1447  attrbuf.clear();
1448  }
1449 #line 1450 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1450  break;
1451 
1452  case 25:
1453 #line 132 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1454  {
1455  if (current_module->wires_.count((yyvsp[-1].string)) != 0)
1456  rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of wire %s.", (yyvsp[-1].string)).c_str());
1457  current_module->rename(current_wire, (yyvsp[-1].string));
1458  free((yyvsp[-1].string));
1459  }
1460 #line 1461 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1461  break;
1462 
1463  case 26:
1464 #line 140 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1465  {
1466  current_wire->width = (yyvsp[0].integer);
1467  }
1468 #line 1469 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1469  break;
1470 
1471  case 27:
1472 #line 143 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1473  {
1474  current_wire->upto = true;
1475  }
1476 #line 1477 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1477  break;
1478 
1479  case 28:
1480 #line 146 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1481  {
1482  current_wire->start_offset = (yyvsp[0].integer);
1483  }
1484 #line 1485 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1485  break;
1486 
1487  case 29:
1488 #line 149 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1489  {
1490  current_wire->port_id = (yyvsp[0].integer);
1491  current_wire->port_input = true;
1492  current_wire->port_output = false;
1493  }
1494 #line 1495 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1495  break;
1496 
1497  case 30:
1498 #line 154 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1499  {
1500  current_wire->port_id = (yyvsp[0].integer);
1501  current_wire->port_input = false;
1502  current_wire->port_output = true;
1503  }
1504 #line 1505 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1505  break;
1506 
1507  case 31:
1508 #line 159 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1509  {
1510  current_wire->port_id = (yyvsp[0].integer);
1511  current_wire->port_input = true;
1512  current_wire->port_output = true;
1513  }
1514 #line 1515 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1515  break;
1516 
1517  case 33:
1518 #line 167 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1519  {
1521  current_memory->attributes = attrbuf;
1522  attrbuf.clear();
1523  }
1524 #line 1525 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1525  break;
1526 
1527  case 34:
1528 #line 171 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1529  {
1530  if (current_module->memories.count((yyvsp[-1].string)) != 0)
1531  rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of memory %s.", (yyvsp[-1].string)).c_str());
1532  current_memory->name = (yyvsp[-1].string);
1533  current_module->memories[(yyvsp[-1].string)] = current_memory;
1534  free((yyvsp[-1].string));
1535  }
1536 #line 1537 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1537  break;
1538 
1539  case 35:
1540 #line 180 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1541  {
1542  current_memory->width = (yyvsp[0].integer);
1543  }
1544 #line 1545 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1545  break;
1546 
1547  case 36:
1548 #line 183 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1549  {
1550  current_memory->size = (yyvsp[0].integer);
1551  }
1552 #line 1553 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1553  break;
1554 
1555  case 38:
1556 #line 189 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1557  {
1558  if (current_module->cells_.count((yyvsp[-1].string)) != 0)
1559  rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of cell %s.", (yyvsp[-1].string)).c_str());
1560  current_cell = current_module->addCell((yyvsp[-1].string), (yyvsp[-2].string));
1561  current_cell->attributes = attrbuf;
1562  attrbuf.clear();
1563  free((yyvsp[-2].string));
1564  free((yyvsp[-1].string));
1565  }
1566 #line 1567 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1567  break;
1568 
1569  case 40:
1570 #line 200 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1571  {
1572  current_cell->parameters[(yyvsp[-2].string)] = *(yyvsp[-1].data);
1573  free((yyvsp[-2].string));
1574  delete (yyvsp[-1].data);
1575  }
1576 #line 1577 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1577  break;
1578 
1579  case 41:
1580 #line 205 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1581  {
1582  current_cell->parameters[(yyvsp[-2].string)] = *(yyvsp[-1].data);
1583  current_cell->parameters[(yyvsp[-2].string)].flags |= RTLIL::CONST_FLAG_SIGNED;
1584  free((yyvsp[-2].string));
1585  delete (yyvsp[-1].data);
1586  }
1587 #line 1588 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1588  break;
1589 
1590  case 42:
1591 #line 211 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1592  {
1593  if (current_cell->hasPort((yyvsp[-2].string)))
1594  rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of cell port %s.", (yyvsp[-2].string)).c_str());
1595  current_cell->setPort((yyvsp[-2].string), *(yyvsp[-1].sigspec));
1596  delete (yyvsp[-1].sigspec);
1597  free((yyvsp[-2].string));
1598  }
1599 #line 1600 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1600  break;
1601 
1602  case 44:
1603 #line 221 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1604  {
1605  if (current_module->processes.count((yyvsp[-1].string)) != 0)
1606  rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of process %s.", (yyvsp[-1].string)).c_str());
1608  current_process->name = (yyvsp[-1].string);
1609  current_process->attributes = attrbuf;
1610  current_module->processes[(yyvsp[-1].string)] = current_process;
1611  switch_stack.clear();
1613  case_stack.clear();
1614  case_stack.push_back(&current_process->root_case);
1615  attrbuf.clear();
1616  free((yyvsp[-1].string));
1617  }
1618 #line 1619 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1619  break;
1620 
1621  case 46:
1622 #line 237 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1623  {
1625  rule->signal = *(yyvsp[-1].sigspec);
1626  rule->attributes = attrbuf;
1627  switch_stack.back()->push_back(rule);
1628  attrbuf.clear();
1629  delete (yyvsp[-1].sigspec);
1630  }
1631 #line 1632 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1632  break;
1633 
1634  case 50:
1635 #line 251 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1636  {
1637  RTLIL::CaseRule *rule = new RTLIL::CaseRule;
1638  switch_stack.back()->back()->cases.push_back(rule);
1639  switch_stack.push_back(&rule->switches);
1640  case_stack.push_back(rule);
1641  }
1642 #line 1643 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1643  break;
1644 
1645  case 51:
1646 #line 256 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1647  {
1648  switch_stack.pop_back();
1649  case_stack.pop_back();
1650  }
1651 #line 1652 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1652  break;
1653 
1654  case 53:
1655 #line 263 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1656  {
1657  case_stack.back()->compare.push_back(*(yyvsp[0].sigspec));
1658  delete (yyvsp[0].sigspec);
1659  }
1660 #line 1661 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1661  break;
1662 
1663  case 54:
1664 #line 267 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1665  {
1666  case_stack.back()->compare.push_back(*(yyvsp[0].sigspec));
1667  delete (yyvsp[0].sigspec);
1668  }
1669 #line 1670 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1670  break;
1671 
1672  case 59:
1673 #line 279 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1674  {
1675  case_stack.back()->actions.push_back(RTLIL::SigSig(*(yyvsp[-2].sigspec), *(yyvsp[-1].sigspec)));
1676  delete (yyvsp[-2].sigspec);
1677  delete (yyvsp[-1].sigspec);
1678  }
1679 #line 1680 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1680  break;
1681 
1682  case 60:
1683 #line 286 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1684  {
1685  RTLIL::SyncRule *rule = new RTLIL::SyncRule;
1686  rule->type = RTLIL::SyncType((yyvsp[-2].integer));
1687  rule->signal = *(yyvsp[-1].sigspec);
1688  current_process->syncs.push_back(rule);
1689  delete (yyvsp[-1].sigspec);
1690  }
1691 #line 1692 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1692  break;
1693 
1694  case 62:
1695 #line 293 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1696  {
1697  RTLIL::SyncRule *rule = new RTLIL::SyncRule;
1698  rule->type = RTLIL::SyncType::STa;
1699  rule->signal = RTLIL::SigSpec();
1700  current_process->syncs.push_back(rule);
1701  }
1702 #line 1703 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1703  break;
1704 
1705  case 64:
1706 #line 299 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1707  {
1708  RTLIL::SyncRule *rule = new RTLIL::SyncRule;
1709  rule->type = RTLIL::SyncType::STi;
1710  rule->signal = RTLIL::SigSpec();
1711  current_process->syncs.push_back(rule);
1712  }
1713 #line 1714 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1714  break;
1715 
1716  case 67:
1717 #line 308 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1718  { (yyval.integer) = RTLIL::ST0; }
1719 #line 1720 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1720  break;
1721 
1722  case 68:
1723 #line 309 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1724  { (yyval.integer) = RTLIL::ST1; }
1725 #line 1726 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1726  break;
1727 
1728  case 69:
1729 #line 310 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1730  { (yyval.integer) = RTLIL::STp; }
1731 #line 1732 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1732  break;
1733 
1734  case 70:
1735 #line 311 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1736  { (yyval.integer) = RTLIL::STn; }
1737 #line 1738 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1738  break;
1739 
1740  case 71:
1741 #line 312 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1742  { (yyval.integer) = RTLIL::STe; }
1743 #line 1744 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1744  break;
1745 
1746  case 72:
1747 #line 315 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1748  {
1749  current_process->syncs.back()->actions.push_back(RTLIL::SigSig(*(yyvsp[-2].sigspec), *(yyvsp[-1].sigspec)));
1750  delete (yyvsp[-2].sigspec);
1751  delete (yyvsp[-1].sigspec);
1752  }
1753 #line 1754 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1754  break;
1755 
1756  case 74:
1757 #line 323 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1758  {
1759  char *ep;
1760  int width = strtol((yyvsp[0].string), &ep, 10);
1761  std::list<RTLIL::State> bits;
1762  while (*(++ep) != 0) {
1763  RTLIL::State bit = RTLIL::Sx;
1764  switch (*ep) {
1765  case '0': bit = RTLIL::S0; break;
1766  case '1': bit = RTLIL::S1; break;
1767  case 'x': bit = RTLIL::Sx; break;
1768  case 'z': bit = RTLIL::Sz; break;
1769  case '-': bit = RTLIL::Sa; break;
1770  case 'm': bit = RTLIL::Sm; break;
1771  }
1772  bits.push_front(bit);
1773  }
1774  if (bits.size() == 0)
1775  bits.push_back(RTLIL::Sx);
1776  while ((int)bits.size() < width) {
1777  RTLIL::State bit = bits.back();
1778  if (bit == RTLIL::S1)
1779  bit = RTLIL::S0;
1780  bits.push_back(bit);
1781  }
1782  while ((int)bits.size() > width)
1783  bits.pop_back();
1784  (yyval.data) = new RTLIL::Const;
1785  for (auto it = bits.begin(); it != bits.end(); it++)
1786  (yyval.data)->bits.push_back(*it);
1787  free((yyvsp[0].string));
1788  }
1789 #line 1790 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1790  break;
1791 
1792  case 75:
1793 #line 354 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1794  {
1795  (yyval.data) = new RTLIL::Const((yyvsp[0].integer), 32);
1796  }
1797 #line 1798 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1798  break;
1799 
1800  case 76:
1801 #line 357 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1802  {
1803  (yyval.data) = new RTLIL::Const((yyvsp[0].string));
1804  free((yyvsp[0].string));
1805  }
1806 #line 1807 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1807  break;
1808 
1809  case 77:
1810 #line 363 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1811  {
1812  (yyval.sigspec) = new RTLIL::SigSpec(*(yyvsp[0].data));
1813  delete (yyvsp[0].data);
1814  }
1815 #line 1816 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1816  break;
1817 
1818  case 78:
1819 #line 367 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1820  {
1821  if (current_module->wires_.count((yyvsp[0].string)) == 0)
1822  rtlil_frontend_ilang_yyerror(stringf("ilang error: wire %s not found", (yyvsp[0].string)).c_str());
1823  (yyval.sigspec) = new RTLIL::SigSpec(current_module->wires_[(yyvsp[0].string)]);
1824  free((yyvsp[0].string));
1825  }
1826 #line 1827 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1827  break;
1828 
1829  case 79:
1830 #line 373 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1831  {
1832  if (current_module->wires_.count((yyvsp[-3].string)) == 0)
1833  rtlil_frontend_ilang_yyerror(stringf("ilang error: wire %s not found", (yyvsp[-3].string)).c_str());
1834  (yyval.sigspec) = new RTLIL::SigSpec(current_module->wires_[(yyvsp[-3].string)], (yyvsp[-1].integer));
1835  free((yyvsp[-3].string));
1836  }
1837 #line 1838 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1838  break;
1839 
1840  case 80:
1841 #line 379 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1842  {
1843  if (current_module->wires_.count((yyvsp[-5].string)) == 0)
1844  rtlil_frontend_ilang_yyerror(stringf("ilang error: wire %s not found", (yyvsp[-5].string)).c_str());
1845  (yyval.sigspec) = new RTLIL::SigSpec(current_module->wires_[(yyvsp[-5].string)], (yyvsp[-1].integer), (yyvsp[-3].integer) - (yyvsp[-1].integer) + 1);
1846  free((yyvsp[-5].string));
1847  }
1848 #line 1849 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1849  break;
1850 
1851  case 81:
1852 #line 385 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1853  {
1854  (yyval.sigspec) = (yyvsp[-1].sigspec);
1855  }
1856 #line 1857 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1857  break;
1858 
1859  case 82:
1860 #line 390 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1861  {
1862  (yyval.sigspec) = new RTLIL::SigSpec;
1863  (yyval.sigspec)->append(*(yyvsp[0].sigspec));
1864  (yyval.sigspec)->append(*(yyvsp[-1].sigspec));
1865  delete (yyvsp[-1].sigspec);
1866  delete (yyvsp[0].sigspec);
1867  }
1868 #line 1869 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1869  break;
1870 
1871  case 83:
1872 #line 397 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1873  {
1874  (yyval.sigspec) = new RTLIL::SigSpec;
1875  }
1876 #line 1877 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1877  break;
1878 
1879  case 84:
1880 #line 402 "frontends/ilang/ilang_parser.y" /* yacc.c:1646 */
1881  {
1882  if (attrbuf.size() != 0)
1883  rtlil_frontend_ilang_yyerror("dangling attribute");
1884  current_module->connect(*(yyvsp[-2].sigspec), *(yyvsp[-1].sigspec));
1885  delete (yyvsp[-2].sigspec);
1886  delete (yyvsp[-1].sigspec);
1887  }
1888 #line 1889 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1889  break;
1890 
1891 
1892 #line 1893 "frontends/ilang/ilang_parser.tab.c" /* yacc.c:1646 */
1893  default: break;
1894  }
1895  /* User semantic actions sometimes alter yychar, and that requires
1896  that yytoken be updated with the new translation. We take the
1897  approach of translating immediately before every use of yytoken.
1898  One alternative is translating here after every semantic action,
1899  but that translation would be missed if the semantic action invokes
1900  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1901  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1902  incorrect destructor might then be invoked immediately. In the
1903  case of YYERROR or YYBACKUP, subsequent parser actions might lead
1904  to an incorrect destructor call or verbose syntax error message
1905  before the lookahead is translated. */
1906  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1907 
1908  YYPOPSTACK (yylen);
1909  yylen = 0;
1910  YY_STACK_PRINT (yyss, yyssp);
1911 
1912  *++yyvsp = yyval;
1913 
1914  /* Now 'shift' the result of the reduction. Determine what state
1915  that goes to, based on the state we popped back to and the rule
1916  number reduced by. */
1917 
1918  yyn = yyr1[yyn];
1919 
1920  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1921  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1922  yystate = yytable[yystate];
1923  else
1924  yystate = yydefgoto[yyn - YYNTOKENS];
1925 
1926  goto yynewstate;
1927 
1928 
1929 /*--------------------------------------.
1930 | yyerrlab -- here on detecting error. |
1931 `--------------------------------------*/
1932 yyerrlab:
1933  /* Make sure we have latest lookahead translation. See comments at
1934  user semantic actions for why this is necessary. */
1935  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1936 
1937  /* If not already recovering from an error, report this error. */
1938  if (!yyerrstatus)
1939  {
1940  ++yynerrs;
1941 #if ! YYERROR_VERBOSE
1942  yyerror (YY_("syntax error"));
1943 #else
1944 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1945  yyssp, yytoken)
1946  {
1947  char const *yymsgp = YY_("syntax error");
1948  int yysyntax_error_status;
1949  yysyntax_error_status = YYSYNTAX_ERROR;
1950  if (yysyntax_error_status == 0)
1951  yymsgp = yymsg;
1952  else if (yysyntax_error_status == 1)
1953  {
1954  if (yymsg != yymsgbuf)
1955  YYSTACK_FREE (yymsg);
1956  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1957  if (!yymsg)
1958  {
1959  yymsg = yymsgbuf;
1960  yymsg_alloc = sizeof yymsgbuf;
1961  yysyntax_error_status = 2;
1962  }
1963  else
1964  {
1965  yysyntax_error_status = YYSYNTAX_ERROR;
1966  yymsgp = yymsg;
1967  }
1968  }
1969  yyerror (yymsgp);
1970  if (yysyntax_error_status == 2)
1971  goto yyexhaustedlab;
1972  }
1973 # undef YYSYNTAX_ERROR
1974 #endif
1975  }
1976 
1977 
1978 
1979  if (yyerrstatus == 3)
1980  {
1981  /* If just tried and failed to reuse lookahead token after an
1982  error, discard it. */
1983 
1984  if (yychar <= YYEOF)
1985  {
1986  /* Return failure if at end of input. */
1987  if (yychar == YYEOF)
1988  YYABORT;
1989  }
1990  else
1991  {
1992  yydestruct ("Error: discarding",
1993  yytoken, &yylval);
1994  yychar = YYEMPTY;
1995  }
1996  }
1997 
1998  /* Else will try to reuse lookahead token after shifting the error
1999  token. */
2000  goto yyerrlab1;
2001 
2002 
2003 /*---------------------------------------------------.
2004 | yyerrorlab -- error raised explicitly by YYERROR. |
2005 `---------------------------------------------------*/
2006 yyerrorlab:
2007 
2008  /* Pacify compilers like GCC when the user code never invokes
2009  YYERROR and the label yyerrorlab therefore never appears in user
2010  code. */
2011  if (/*CONSTCOND*/ 0)
2012  goto yyerrorlab;
2013 
2014  /* Do not reclaim the symbols of the rule whose action triggered
2015  this YYERROR. */
2016  YYPOPSTACK (yylen);
2017  yylen = 0;
2018  YY_STACK_PRINT (yyss, yyssp);
2019  yystate = *yyssp;
2020  goto yyerrlab1;
2021 
2022 
2023 /*-------------------------------------------------------------.
2024 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2025 `-------------------------------------------------------------*/
2026 yyerrlab1:
2027  yyerrstatus = 3; /* Each real token shifted decrements this. */
2028 
2029  for (;;)
2030  {
2031  yyn = yypact[yystate];
2032  if (!yypact_value_is_default (yyn))
2033  {
2034  yyn += YYTERROR;
2035  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2036  {
2037  yyn = yytable[yyn];
2038  if (0 < yyn)
2039  break;
2040  }
2041  }
2042 
2043  /* Pop the current state because it cannot handle the error token. */
2044  if (yyssp == yyss)
2045  YYABORT;
2046 
2047 
2048  yydestruct ("Error: popping",
2049  yystos[yystate], yyvsp);
2050  YYPOPSTACK (1);
2051  yystate = *yyssp;
2052  YY_STACK_PRINT (yyss, yyssp);
2053  }
2054 
2056  *++yyvsp = yylval;
2058 
2059 
2060  /* Shift the error token. */
2061  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2062 
2063  yystate = yyn;
2064  goto yynewstate;
2065 
2066 
2067 /*-------------------------------------.
2068 | yyacceptlab -- YYACCEPT comes here. |
2069 `-------------------------------------*/
2070 yyacceptlab:
2071  yyresult = 0;
2072  goto yyreturn;
2073 
2074 /*-----------------------------------.
2075 | yyabortlab -- YYABORT comes here. |
2076 `-----------------------------------*/
2077 yyabortlab:
2078  yyresult = 1;
2079  goto yyreturn;
2080 
2081 #if !defined yyoverflow || YYERROR_VERBOSE
2082 /*-------------------------------------------------.
2083 | yyexhaustedlab -- memory exhaustion comes here. |
2084 `-------------------------------------------------*/
2085 yyexhaustedlab:
2086  yyerror (YY_("memory exhausted"));
2087  yyresult = 2;
2088  /* Fall through. */
2089 #endif
2090 
2091 yyreturn:
2092  if (yychar != YYEMPTY)
2093  {
2094  /* Make sure we have latest lookahead translation. See comments at
2095  user semantic actions for why this is necessary. */
2096  yytoken = YYTRANSLATE (yychar);
2097  yydestruct ("Cleanup: discarding lookahead",
2098  yytoken, &yylval);
2099  }
2100  /* Do not reclaim the symbols of the rule whose action triggered
2101  this YYABORT or YYACCEPT. */
2102  YYPOPSTACK (yylen);
2103  YY_STACK_PRINT (yyss, yyssp);
2104  while (yyssp != yyss)
2105  {
2106  yydestruct ("Cleanup: popping",
2107  yystos[*yyssp], yyvsp);
2108  YYPOPSTACK (1);
2109  }
2110 #ifndef yyoverflow
2111  if (yyss != yyssa)
2112  YYSTACK_FREE (yyss);
2113 #endif
2114 #if YYERROR_VERBOSE
2115  if (yymsg != yymsgbuf)
2116  YYSTACK_FREE (yymsg);
2117 #endif
2118  return yyresult;
2119 }
static const yytype_int8 yypact[]
RTLIL::Process * current_process
static void append(const vec< T > &from, vec< T > &to)
Definition: Alg.h:79
static const yytype_uint8 yyr1[]
std::string stringf(const char *fmt,...)
Definition: yosys.cc:58
void rtlil_frontend_ilang_yyerror(char const *s)
void free(void *)
RTLIL::Cell * addCell(RTLIL::IdString name, RTLIL::IdString type)
Definition: rtlil.cc:1353
static const yytype_uint8 yydefact[]
#define yytable_value_is_error(Yytable_value)
void add(RTLIL::Module *module)
Definition: rtlil.cc:259
static const yytype_int16 yypgoto[]
#define YYSTACK_ALLOC
std::vector< std::vector< RTLIL::SwitchRule * > * > switch_stack
RTLIL::SyncType type
Definition: rtlil.h:1144
std::map< RTLIL::IdString, RTLIL::Wire * > wires_
Definition: rtlil.h:595
bool upto
Definition: rtlil.h:827
#define YYTERROR
#define yynerrs
#define YYNTOKENS
void setPort(RTLIL::IdString portname, RTLIL::SigSpec signal)
Definition: rtlil.cc:1789
#define yychar
bool port_input
Definition: rtlil.h:827
int width
Definition: rtlil.h:826
std::map< RTLIL::IdString, RTLIL::Memory * > memories
Definition: rtlil.h:601
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
int port_id
Definition: rtlil.h:826
#define YYFINAL
#define YYEMPTY
std::map< RTLIL::IdString, RTLIL::Const > parameters
Definition: rtlil.h:856
#define YYDPRINTF(Args)
RTLIL::SigSpec signal
Definition: rtlil.h:1145
int size
Definition: rtlil.h:836
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
RTLIL::Memory * current_memory
static const yytype_int16 yydefgoto[]
bool port_output
Definition: rtlil.h:827
#define YYMAXDEPTH
std::vector< RTLIL::CaseRule * > case_stack
void connect(const RTLIL::SigSig &conn)
Definition: rtlil.cc:1278
#define YY_REDUCE_PRINT(Rule)
std::map< RTLIL::IdString, RTLIL::Const > attrbuf
RTLIL::SigSpec signal
Definition: rtlil.h:1132
#define yyerror
RTLIL_ATTRIBUTE_MEMBERS bool hasPort(RTLIL::IdString portname) const
Definition: rtlil.cc:1766
#define YYPOPSTACK(N)
#define YYSIZE_T
yytype_int16 yyss_alloc
RTLIL::IdString name
Definition: rtlil.h:835
void fixup_ports()
Definition: rtlil.cc:1312
RTLIL::Wire * addWire(RTLIL::IdString name, int width=1)
Definition: rtlil.cc:1331
RTLIL::IdString name
Definition: rtlil.h:599
#define YYSTACK_FREE
YYSTYPE yyvs_alloc
short int yytype_int16
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YYABORT
#define YYEOF
#define YY_STACK_PRINT(Bottom, Top)
#define YYINITDEPTH
RTLIL::IdString name
Definition: rtlil.h:1154
std::map< RTLIL::IdString, RTLIL::Process * > processes
Definition: rtlil.h:602
RTLIL::Design * current_design
bool has(RTLIL::IdString id) const
Definition: rtlil.h:519
#define YYTRANSLATE(YYX)
std::map< RTLIL::IdString, RTLIL::Cell * > cells_
Definition: rtlil.h:596
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
RTLIL::Cell * current_cell
YOSYS_NAMESPACE_PREFIX RTLIL::Const * data
static const yytype_uint8 yyr2[]
std::vector< RTLIL::SyncRule * > syncs
Definition: rtlil.h:1157
RTLIL::Wire * current_wire
RTLIL::Module * current_module
std::vector< RTLIL::State > bits
Definition: rtlil.h:438
#define YYLAST
SyncType
Definition: rtlil.h:38
static const yytype_int16 yytable[]
State
Definition: rtlil.h:29
int start_offset
Definition: rtlil.h:826
#define yypact_value_is_default(Yystate)
int width
Definition: rtlil.h:836
#define yylex
std::vector< RTLIL::SwitchRule * > switches
Definition: rtlil.h:1121
std::pair< SigSpec, SigSpec > SigSig
Definition: rtlil.h:71
YOSYS_NAMESPACE_BEGIN int autoidx
Definition: yosys.cc:51
#define yylval
void rename(RTLIL::Wire *wire, RTLIL::IdString new_name)
Definition: rtlil.cc:1185
#define YYACCEPT
#define YYSTACK_BYTES(N)
static const yytype_int16 yycheck[]
RTLIL_ATTRIBUTE_MEMBERS RTLIL::CaseRule root_case
Definition: rtlil.h:1156
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#define YY_(Msgid)
static const yytype_uint8 yystos[]
YOSYS_NAMESPACE_PREFIX RTLIL::SigSpec * sigspec

+ Here is the call graph for this function:

Variable Documentation

int rtlil_frontend_ilang_yydebug
YYSTYPE rtlil_frontend_ilang_yylval
int yychar

Definition at line 1135 of file ilang_parser.tab.cc.

const yytype_int16 yycheck[]
static
Initial value:
=
{
14, 83, 15, 45, 86, 26, 31, 3, 22, 16,
52, 18, 15, 3, 4, 5, 6, 3, 4, 5,
6, 0, 3, 17, 7, 8, 29, 34, 19, 10,
33, 16, 46, 47, 6, 29, 50, 3, 29, 53,
82, 37, 3, 57, 10, 11, 12, 13, 40, 34,
92, 34, 94, 43, 44, 36, 70, 43, 17, 18,
18, 19, 133, 84, 106, 3, 32, 149, 31, 140,
29, 29, 38, 4, 5, 6, 3, 119, 20, 21,
22, 23, 24, 25, 26, 99, 41, 42, 102, 103,
31, 105, 9, 3, 3, 108, 41, 14, 15, 141,
6, 143, 6, 117, 118, 147, 148, 121, 122, 6,
123, 28, 29, 127, 6, 6, 130, 34, 35, 6,
6, 6, 6, 137, 3, 3, 27, 39, 0, -1,
-1, 145, -1, -1, -1, -1, 150
}

Definition at line 641 of file ilang_parser.tab.cc.

int yydebug

Definition at line 866 of file ilang_parser.tab.cc.

const yytype_uint8 yydefact[]
static
Initial value:
=
{
6, 0, 2, 1, 5, 10, 3, 0, 0, 0,
7, 8, 9, 6, 6, 0, 23, 0, 11, 74,
76, 75, 6, 4, 15, 22, 0, 24, 0, 0,
0, 12, 33, 14, 16, 17, 18, 19, 20, 21,
32, 0, 78, 83, 77, 0, 6, 6, 37, 0,
6, 0, 0, 6, 44, 13, 0, 6, 0, 0,
0, 0, 0, 27, 38, 0, 81, 82, 84, 48,
6, 0, 0, 25, 26, 29, 30, 31, 28, 43,
79, 0, 0, 58, 0, 66, 58, 34, 35, 36,
0, 0, 0, 56, 0, 49, 0, 57, 0, 6,
0, 80, 6, 6, 0, 6, 0, 39, 0, 0,
59, 46, 67, 68, 69, 70, 71, 6, 6, 0,
45, 6, 6, 0, 52, 62, 64, 6, 42, 40,
6, 0, 73, 73, 60, 41, 50, 6, 63, 65,
73, 55, 47, 0, 61, 6, 53, 0, 0, 48,
6, 54, 51, 72
}

Definition at line 580 of file ilang_parser.tab.cc.

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 1, 5, 16, 17, 6, 10, 24, 47, 26,
33, 11, 12, 35, 40, 49, 36, 48, 56, 37,
79, 90, 38, 69, 83, 124, 84, 131, 141, 145,
85, 86, 96, 140, 132, 133, 119, 138, 44, 45,
52, 39
}

Definition at line 611 of file ilang_parser.tab.cc.

YYSTYPE yylval

Definition at line 1138 of file ilang_parser.tab.cc.

int yynerrs

Definition at line 1140 of file ilang_parser.tab.cc.

const yytype_int8 yypact[]
static
Initial value:
=
{
-83, 21, -25, -83, -83, -83, 17, 28, 39, 62,
-83, -83, -83, -83, -83, 69, -83, 37, -83, -83,
-83, -83, -83, 59, -83, -83, 83, -83, 73, 14,
90, -83, -83, -83, -83, -83, -83, -83, -83, -83,
-83, 91, 8, -83, -83, 14, -83, -83, -83, 34,
-83, 94, 10, -83, -83, -83, 19, -83, 96, 103,
108, 109, 113, -83, -83, 45, -83, -83, -83, 42,
-83, 114, 115, -83, -83, -83, -83, -83, -83, -83,
-83, 116, 14, -7, 15, -83, -7, -83, -83, -83,
-3, 55, 14, -83, 14, -83, 9, -83, 121, -83,
4, -83, -83, -83, 58, -83, 14, -83, 69, 122,
-83, -83, -83, -83, -83, -83, -83, -83, -83, 14,
-83, -83, -83, 69, -83, -83, -83, -83, -83, -83,
-83, 6, -83, -83, -83, -83, -83, -83, 99, 99,
-83, 14, -83, 14, 99, 88, -83, 14, 14, 41,
-83, -83, -83, -83
}

Definition at line 557 of file ilang_parser.tab.cc.

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-83, -83, -83, -14, 128, -83, -83, -83, -83, -83,
-83, -21, -83, -83, -83, -83, -83, -83, -83, -83,
-83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
-82, -83, -83, -83, -83, -83, -83, -71, -13, -42,
-83, -83
}

Definition at line 601 of file ilang_parser.tab.cc.

const yytype_uint8 yyr1[]
static
Initial value:
=
{
0, 45, 47, 46, 48, 49, 49, 50, 50, 50,
50, 52, 53, 51, 54, 54, 55, 55, 55, 55,
55, 55, 56, 57, 59, 58, 60, 60, 60, 60,
60, 60, 60, 62, 61, 63, 63, 63, 65, 64,
66, 66, 66, 66, 68, 67, 70, 69, 71, 71,
73, 72, 72, 74, 74, 74, 75, 75, 75, 76,
78, 77, 79, 77, 80, 77, 77, 81, 81, 81,
81, 81, 82, 82, 83, 83, 83, 84, 84, 84,
84, 84, 85, 85, 86
}

Definition at line 682 of file ilang_parser.tab.cc.

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

Definition at line 696 of file ilang_parser.tab.cc.

const yytype_uint16 yyrline[]
static
Initial value:
=
{
0, 73, 73, 73, 81, 84, 84, 87, 88, 89,
89, 93, 102, 93, 109, 109, 113, 113, 113, 113,
113, 113, 116, 123, 128, 128, 140, 143, 146, 149,
154, 159, 163, 167, 167, 180, 183, 185, 189, 189,
200, 205, 211, 217, 221, 221, 237, 237, 246, 248,
251, 251, 259, 263, 267, 270, 274, 275, 275, 279,
286, 286, 293, 293, 299, 299, 304, 308, 309, 310,
311, 312, 315, 319, 323, 354, 357, 363, 367, 373,
379, 385, 390, 397, 402
}

Definition at line 494 of file ilang_parser.tab.cc.

const yytype_uint8 yystos[]
static
Initial value:
=
{
0, 46, 49, 0, 31, 47, 50, 7, 8, 34,
51, 56, 57, 6, 3, 3, 48, 49, 48, 4,
5, 6, 83, 31, 52, 48, 54, 9, 14, 15,
28, 29, 35, 55, 56, 58, 61, 64, 67, 86,
59, 3, 3, 43, 83, 84, 3, 53, 62, 60,
3, 40, 85, 84, 48, 48, 63, 3, 10, 11,
12, 13, 32, 38, 48, 6, 44, 84, 48, 68,
3, 10, 36, 48, 6, 6, 6, 6, 6, 65,
41, 42, 18, 69, 71, 75, 76, 48, 6, 6,
66, 6, 84, 75, 16, 56, 77, 75, 15, 29,
33, 41, 84, 84, 19, 29, 3, 48, 3, 37,
48, 48, 20, 21, 22, 23, 24, 25, 26, 81,
48, 84, 83, 3, 70, 48, 48, 84, 48, 48,
83, 72, 79, 80, 48, 48, 17, 29, 82, 82,
78, 73, 48, 27, 82, 74, 84, 84, 39, 48,
84, 84, 75, 48
}

Definition at line 661 of file ilang_parser.tab.cc.

const yytype_int16 yytable[]
static
Initial value:
=
{
18, 93, 22, 53, 97, 34, 4, 108, 25, -48,
67, 82, 98, 42, 19, 20, 21, 42, 19, 20,
21, 3, 70, 136, 7, 8, 99, -48, 104, 71,
100, 94, 54, 55, 13, 137, 64, 57, 105, 68,
92, 109, 14, 73, 58, 59, 60, 61, 51, 9,
102, 9, 103, 43, 66, 72, 87, 43, -58, 82,
82, -58, 139, 95, 121, 15, 62, 152, 23, 144,
-58, -58, 63, 19, 20, 21, 41, 127, 112, 113,
114, 115, 116, 117, 118, 107, 80, 81, 110, 111,
-5, 120, 27, 46, 50, 122, 101, 28, 29, 146,
65, 147, 74, 125, 126, 150, 151, 128, 129, 75,
130, 30, 31, 134, 76, 77, 135, 9, 32, 78,
88, 89, 91, 142, 106, 123, 143, 148, 2, 0,
0, 149, 0, 0, 0, 0, 153
}

Definition at line 623 of file ilang_parser.tab.cc.

const char* const yytname[]
static
Initial value:
=
{
"$end", "error", "$undefined", "TOK_ID", "TOK_VALUE", "TOK_STRING",
"TOK_INT", "TOK_AUTOIDX", "TOK_MODULE", "TOK_WIRE", "TOK_WIDTH",
"TOK_INPUT", "TOK_OUTPUT", "TOK_INOUT", "TOK_CELL", "TOK_CONNECT",
"TOK_SWITCH", "TOK_CASE", "TOK_ASSIGN", "TOK_SYNC", "TOK_LOW",
"TOK_HIGH", "TOK_POSEDGE", "TOK_NEGEDGE", "TOK_EDGE", "TOK_ALWAYS",
"TOK_INIT", "TOK_UPDATE", "TOK_PROCESS", "TOK_END", "TOK_INVALID",
"TOK_EOL", "TOK_OFFSET", "TOK_PARAMETER", "TOK_ATTRIBUTE", "TOK_MEMORY",
"TOK_SIZE", "TOK_SIGNED", "TOK_UPTO", "','", "'['", "']'", "':'", "'{'",
"'}'", "$accept", "input", "$@1", "EOL", "optional_eol", "design",
"module", "$@2", "$@3", "module_body", "module_stmt", "attr_stmt",
"autoidx_stmt", "wire_stmt", "$@4", "wire_options", "memory_stmt", "$@5",
"memory_options", "cell_stmt", "$@6", "cell_body", "proc_stmt", "$@7",
"switch_stmt", "$@8", "attr_list", "switch_body", "$@9", "compare_list",
"case_body", "assign_stmt", "sync_list", "$@10", "$@11", "$@12",
"sync_type", "update_list", "constant", "sigspec", "sigspec_list",
"conn_stmt", YY_NULLPTR
}
#define YY_NULLPTR

Definition at line 511 of file ilang_parser.tab.cc.

const yytype_uint8 yytranslate[]
static

Definition at line 458 of file ilang_parser.tab.cc.