47 #define YYBISON_VERSION "3.0.2"
50 #define YYSKELETON_NAME "yacc.c"
63 #define yyparse rtlil_frontend_ilang_yyparse
64 #define yylex rtlil_frontend_ilang_yylex
65 #define yyerror rtlil_frontend_ilang_yyerror
66 #define yydebug rtlil_frontend_ilang_yydebug
67 #define yynerrs rtlil_frontend_ilang_yynerrs
69 #define yylval rtlil_frontend_ilang_yylval
70 #define yychar rtlil_frontend_ilang_yychar
73 #line 25 "frontends/ilang/ilang_parser.y"
78 namespace ILANG_FRONTEND {
88 std::map<RTLIL::IdString, RTLIL::Const>
attrbuf;
90 using namespace ILANG_FRONTEND;
94 #line 95 "frontends/ilang/ilang_parser.tab.c"
97 # if defined __cplusplus && 201103L <= __cplusplus
98 # define YY_NULLPTR nullptr
100 # define YY_NULLPTR 0
105 #ifdef YYERROR_VERBOSE
106 # undef YYERROR_VERBOSE
107 # define YYERROR_VERBOSE 1
109 # define YYERROR_VERBOSE 0
114 #ifndef YY_RTLIL_FRONTEND_ILANG_YY_FRONTENDS_ILANG_ILANG_PARSER_TAB_H_INCLUDED
115 # define YY_RTLIL_FRONTEND_ILANG_YY_FRONTENDS_ILANG_ILANG_PARSER_TAB_H_INCLUDED
169 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
173 #line 48 "frontends/ilang/ilang_parser.y"
180 #line 181 "frontends/ilang/ilang_parser.tab.c"
182 # define YYSTYPE_IS_TRIVIAL 1
183 # define YYSTYPE_IS_DECLARED 1
195 #line 196 "frontends/ilang/ilang_parser.tab.c"
226 # ifdef __SIZE_TYPE__
227 # define YYSIZE_T __SIZE_TYPE__
228 # elif defined size_t
229 # define YYSIZE_T size_t
230 # elif ! defined YYSIZE_T
232 # define YYSIZE_T size_t
234 # define YYSIZE_T unsigned int
238 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
241 # if defined YYENABLE_NLS && YYENABLE_NLS
243 # include <libintl.h>
244 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
248 # define YY_(Msgid) Msgid
253 # if (defined __GNUC__ \
254 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
255 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
256 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
258 # define YY_ATTRIBUTE(Spec)
262 #ifndef YY_ATTRIBUTE_PURE
263 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
266 #ifndef YY_ATTRIBUTE_UNUSED
267 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
270 #if !defined _Noreturn \
271 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
272 # if defined _MSC_VER && 1200 <= _MSC_VER
273 # define _Noreturn __declspec (noreturn)
275 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
280 #if ! defined lint || defined __GNUC__
281 # define YYUSE(E) ((void) (E))
286 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
288 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
289 _Pragma ("GCC diagnostic push") \
290 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
291 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
292 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
293 _Pragma ("GCC diagnostic pop")
295 # define YY_INITIAL_VALUE(Value) Value
297 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
298 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
299 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
301 #ifndef YY_INITIAL_VALUE
302 # define YY_INITIAL_VALUE(Value)
306 #if ! defined yyoverflow || YYERROR_VERBOSE
310 # ifdef YYSTACK_USE_ALLOCA
311 # if YYSTACK_USE_ALLOCA
313 # define YYSTACK_ALLOC __builtin_alloca
314 # elif defined __BUILTIN_VA_ARG_INCR
317 # define YYSTACK_ALLOC __alloca
318 # elif defined _MSC_VER
320 # define alloca _alloca
322 # define YYSTACK_ALLOC alloca
323 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
326 # ifndef EXIT_SUCCESS
327 # define EXIT_SUCCESS 0
334 # ifdef YYSTACK_ALLOC
336 # define YYSTACK_FREE(Ptr) do { ; } while (0)
337 # ifndef YYSTACK_ALLOC_MAXIMUM
342 # define YYSTACK_ALLOC_MAXIMUM 4032
345 # define YYSTACK_ALLOC YYMALLOC
346 # define YYSTACK_FREE YYFREE
347 # ifndef YYSTACK_ALLOC_MAXIMUM
348 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
350 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
351 && ! ((defined YYMALLOC || defined malloc) \
352 && (defined YYFREE || defined free)))
354 # ifndef EXIT_SUCCESS
355 # define EXIT_SUCCESS 0
359 # define YYMALLOC malloc
360 # if ! defined malloc && ! defined EXIT_SUCCESS
366 # if ! defined free && ! defined EXIT_SUCCESS
374 #if (! defined yyoverflow \
375 && (! defined __cplusplus \
376 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
386 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
390 # define YYSTACK_BYTES(N) \
391 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
392 + YYSTACK_GAP_MAXIMUM)
394 # define YYCOPY_NEEDED 1
401 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
404 YYSIZE_T yynewbytes; \
405 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
406 Stack = &yyptr->Stack_alloc; \
407 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
408 yyptr += yynewbytes / sizeof (*yyptr); \
414 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
418 # if defined __GNUC__ && 1 < __GNUC__
419 # define YYCOPY(Dst, Src, Count) \
420 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
422 # define YYCOPY(Dst, Src, Count) \
426 for (yyi = 0; yyi < (Count); yyi++) \
427 (Dst)[yyi] = (Src)[yyi]; \
446 #define YYNSTATES 154
451 #define YYMAXUTOK 293
453 #define YYTRANSLATE(YYX) \
454 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
460 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 39, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 42, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 40, 2, 41, 2, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 2, 2, 43, 2, 44, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
480 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
484 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
485 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
486 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
487 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
488 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
496 0, 73, 73, 73, 81, 84, 84, 87, 88, 89,
497 89, 93, 102, 93, 109, 109, 113, 113, 113, 113,
498 113, 113, 116, 123, 128, 128, 140, 143, 146, 149,
499 154, 159, 163, 167, 167, 180, 183, 185, 189, 189,
500 200, 205, 211, 217, 221, 221, 237, 237, 246, 248,
501 251, 251, 259, 263, 267, 270, 274, 275, 275, 279,
502 286, 286, 293, 293, 299, 299, 304, 308, 309, 310,
503 311, 312, 315, 319, 323, 354, 357, 363, 367, 373,
504 379, 385, 390, 397, 402
508 #if YYDEBUG || YYERROR_VERBOSE || 0
513 "$end",
"error",
"$undefined",
"TOK_ID",
"TOK_VALUE",
"TOK_STRING",
514 "TOK_INT",
"TOK_AUTOIDX",
"TOK_MODULE",
"TOK_WIRE",
"TOK_WIDTH",
515 "TOK_INPUT",
"TOK_OUTPUT",
"TOK_INOUT",
"TOK_CELL",
"TOK_CONNECT",
516 "TOK_SWITCH",
"TOK_CASE",
"TOK_ASSIGN",
"TOK_SYNC",
"TOK_LOW",
517 "TOK_HIGH",
"TOK_POSEDGE",
"TOK_NEGEDGE",
"TOK_EDGE",
"TOK_ALWAYS",
518 "TOK_INIT",
"TOK_UPDATE",
"TOK_PROCESS",
"TOK_END",
"TOK_INVALID",
519 "TOK_EOL",
"TOK_OFFSET",
"TOK_PARAMETER",
"TOK_ATTRIBUTE",
"TOK_MEMORY",
520 "TOK_SIZE",
"TOK_SIGNED",
"TOK_UPTO",
"','",
"'['",
"']'",
"':'",
"'{'",
521 "'}'",
"$accept",
"input",
"$@1",
"EOL",
"optional_eol",
"design",
522 "module",
"$@2",
"$@3",
"module_body",
"module_stmt",
"attr_stmt",
523 "autoidx_stmt",
"wire_stmt",
"$@4",
"wire_options",
"memory_stmt",
"$@5",
524 "memory_options",
"cell_stmt",
"$@6",
"cell_body",
"proc_stmt",
"$@7",
525 "switch_stmt",
"$@8",
"attr_list",
"switch_body",
"$@9",
"compare_list",
526 "case_body",
"assign_stmt",
"sync_list",
"$@10",
"$@11",
"$@12",
527 "sync_type",
"update_list",
"constant",
"sigspec",
"sigspec_list",
537 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
538 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
539 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
540 285, 286, 287, 288, 289, 290, 291, 292, 293, 44,
545 #define YYPACT_NINF -83
547 #define yypact_value_is_default(Yystate) \
548 (!!((Yystate) == (-83)))
550 #define YYTABLE_NINF -59
552 #define yytable_value_is_error(Yytable_value) \
559 -83, 21, -25, -83, -83, -83, 17, 28, 39, 62,
560 -83, -83, -83, -83, -83, 69, -83, 37, -83, -83,
561 -83, -83, -83, 59, -83, -83, 83, -83, 73, 14,
562 90, -83, -83, -83, -83, -83, -83, -83, -83, -83,
563 -83, 91, 8, -83, -83, 14, -83, -83, -83, 34,
564 -83, 94, 10, -83, -83, -83, 19, -83, 96, 103,
565 108, 109, 113, -83, -83, 45, -83, -83, -83, 42,
566 -83, 114, 115, -83, -83, -83, -83, -83, -83, -83,
567 -83, 116, 14, -7, 15, -83, -7, -83, -83, -83,
568 -3, 55, 14, -83, 14, -83, 9, -83, 121, -83,
569 4, -83, -83, -83, 58, -83, 14, -83, 69, 122,
570 -83, -83, -83, -83, -83, -83, -83, -83, -83, 14,
571 -83, -83, -83, 69, -83, -83, -83, -83, -83, -83,
572 -83, 6, -83, -83, -83, -83, -83, -83, 99, 99,
573 -83, 14, -83, 14, 99, 88, -83, 14, 14, 41,
582 6, 0, 2, 1, 5, 10, 3, 0, 0, 0,
583 7, 8, 9, 6, 6, 0, 23, 0, 11, 74,
584 76, 75, 6, 4, 15, 22, 0, 24, 0, 0,
585 0, 12, 33, 14, 16, 17, 18, 19, 20, 21,
586 32, 0, 78, 83, 77, 0, 6, 6, 37, 0,
587 6, 0, 0, 6, 44, 13, 0, 6, 0, 0,
588 0, 0, 0, 27, 38, 0, 81, 82, 84, 48,
589 6, 0, 0, 25, 26, 29, 30, 31, 28, 43,
590 79, 0, 0, 58, 0, 66, 58, 34, 35, 36,
591 0, 0, 0, 56, 0, 49, 0, 57, 0, 6,
592 0, 80, 6, 6, 0, 6, 0, 39, 0, 0,
593 59, 46, 67, 68, 69, 70, 71, 6, 6, 0,
594 45, 6, 6, 0, 52, 62, 64, 6, 42, 40,
595 6, 0, 73, 73, 60, 41, 50, 6, 63, 65,
596 73, 55, 47, 0, 61, 6, 53, 0, 0, 48,
603 -83, -83, -83, -14, 128, -83, -83, -83, -83, -83,
604 -83, -21, -83, -83, -83, -83, -83, -83, -83, -83,
605 -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
606 -82, -83, -83, -83, -83, -83, -83, -71, -13, -42,
613 -1, 1, 5, 16, 17, 6, 10, 24, 47, 26,
614 33, 11, 12, 35, 40, 49, 36, 48, 56, 37,
615 79, 90, 38, 69, 83, 124, 84, 131, 141, 145,
616 85, 86, 96, 140, 132, 133, 119, 138, 44, 45,
625 18, 93, 22, 53, 97, 34, 4, 108, 25, -48,
626 67, 82, 98, 42, 19, 20, 21, 42, 19, 20,
627 21, 3, 70, 136, 7, 8, 99, -48, 104, 71,
628 100, 94, 54, 55, 13, 137, 64, 57, 105, 68,
629 92, 109, 14, 73, 58, 59, 60, 61, 51, 9,
630 102, 9, 103, 43, 66, 72, 87, 43, -58, 82,
631 82, -58, 139, 95, 121, 15, 62, 152, 23, 144,
632 -58, -58, 63, 19, 20, 21, 41, 127, 112, 113,
633 114, 115, 116, 117, 118, 107, 80, 81, 110, 111,
634 -5, 120, 27, 46, 50, 122, 101, 28, 29, 146,
635 65, 147, 74, 125, 126, 150, 151, 128, 129, 75,
636 130, 30, 31, 134, 76, 77, 135, 9, 32, 78,
637 88, 89, 91, 142, 106, 123, 143, 148, 2, 0,
638 0, 149, 0, 0, 0, 0, 153
643 14, 83, 15, 45, 86, 26, 31, 3, 22, 16,
644 52, 18, 15, 3, 4, 5, 6, 3, 4, 5,
645 6, 0, 3, 17, 7, 8, 29, 34, 19, 10,
646 33, 16, 46, 47, 6, 29, 50, 3, 29, 53,
647 82, 37, 3, 57, 10, 11, 12, 13, 40, 34,
648 92, 34, 94, 43, 44, 36, 70, 43, 17, 18,
649 18, 19, 133, 84, 106, 3, 32, 149, 31, 140,
650 29, 29, 38, 4, 5, 6, 3, 119, 20, 21,
651 22, 23, 24, 25, 26, 99, 41, 42, 102, 103,
652 31, 105, 9, 3, 3, 108, 41, 14, 15, 141,
653 6, 143, 6, 117, 118, 147, 148, 121, 122, 6,
654 123, 28, 29, 127, 6, 6, 130, 34, 35, 6,
655 6, 6, 6, 137, 3, 3, 27, 39, 0, -1,
656 -1, 145, -1, -1, -1, -1, 150
663 0, 46, 49, 0, 31, 47, 50, 7, 8, 34,
664 51, 56, 57, 6, 3, 3, 48, 49, 48, 4,
665 5, 6, 83, 31, 52, 48, 54, 9, 14, 15,
666 28, 29, 35, 55, 56, 58, 61, 64, 67, 86,
667 59, 3, 3, 43, 83, 84, 3, 53, 62, 60,
668 3, 40, 85, 84, 48, 48, 63, 3, 10, 11,
669 12, 13, 32, 38, 48, 6, 44, 84, 48, 68,
670 3, 10, 36, 48, 6, 6, 6, 6, 6, 65,
671 41, 42, 18, 69, 71, 75, 76, 48, 6, 6,
672 66, 6, 84, 75, 16, 56, 77, 75, 15, 29,
673 33, 41, 84, 84, 19, 29, 3, 48, 3, 37,
674 48, 48, 20, 21, 22, 23, 24, 25, 26, 81,
675 48, 84, 83, 3, 70, 48, 48, 84, 48, 48,
676 83, 72, 79, 80, 48, 48, 17, 29, 82, 82,
677 78, 73, 48, 27, 82, 74, 84, 84, 39, 48,
684 0, 45, 47, 46, 48, 49, 49, 50, 50, 50,
685 50, 52, 53, 51, 54, 54, 55, 55, 55, 55,
686 55, 55, 56, 57, 59, 58, 60, 60, 60, 60,
687 60, 60, 60, 62, 61, 63, 63, 63, 65, 64,
688 66, 66, 66, 66, 68, 67, 70, 69, 71, 71,
689 73, 72, 72, 74, 74, 74, 75, 75, 75, 76,
690 78, 77, 79, 77, 80, 77, 77, 81, 81, 81,
691 81, 81, 82, 82, 83, 83, 83, 84, 84, 84,
698 0, 2, 0, 3, 2, 2, 0, 2, 2, 2,
699 0, 0, 0, 8, 2, 0, 1, 1, 1, 1,
700 1, 1, 4, 3, 0, 5, 3, 2, 3, 3,
701 3, 3, 0, 0, 5, 3, 3, 0, 0, 8,
702 5, 6, 5, 0, 0, 8, 0, 8, 0, 2,
703 0, 6, 0, 1, 3, 0, 2, 2, 0, 4,
704 0, 7, 0, 6, 0, 6, 0, 1, 1, 1,
705 1, 1, 5, 0, 1, 1, 1, 1, 1, 4,
710 #define yyerrok (yyerrstatus = 0)
711 #define yyclearin (yychar = YYEMPTY)
715 #define YYACCEPT goto yyacceptlab
716 #define YYABORT goto yyabortlab
717 #define YYERROR goto yyerrorlab
720 #define YYRECOVERING() (!!yyerrstatus)
722 #define YYBACKUP(Token, Value) \
724 if (yychar == YYEMPTY) \
728 YYPOPSTACK (yylen); \
734 yyerror (YY_("syntax error: cannot back up")); \
741 #define YYERRCODE 256
750 # define YYFPRINTF fprintf
753 # define YYDPRINTF(Args) \
760 #ifndef YY_LOCATION_PRINT
761 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
765 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
769 YYFPRINTF (stderr, "%s ", Title); \
770 yy_symbol_print (stderr, \
772 YYFPRINTF (stderr, "\n"); \
784 FILE *yyo = yyoutput;
790 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
819 for (; yybottom <= yytop; yybottom++)
821 int yybot = *yybottom;
827 # define YY_STACK_PRINT(Bottom, Top) \
830 yy_stack_print ((Bottom), (Top)); \
841 unsigned long int yylno =
yyrline[yyrule];
842 int yynrhs =
yyr2[yyrule];
844 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
847 for (yyi = 0; yyi < yynrhs; yyi++)
851 yystos[yyssp[yyi + 1 - yynrhs]],
852 &(yyvsp[(yyi + 1) - (yynrhs)])
858 # define YY_REDUCE_PRINT(Rule) \
861 yy_reduce_print (yyssp, yyvsp, Rule); \
868 # define YYDPRINTF(Args)
869 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
870 # define YY_STACK_PRINT(Bottom, Top)
871 # define YY_REDUCE_PRINT(Rule)
877 # define YYINITDEPTH 200
888 # define YYMAXDEPTH 10000
895 # if defined __GLIBC__ && defined _STRING_H
896 # define yystrlen strlen
900 yystrlen (
const char *yystr)
903 for (yylen = 0; yystr[yylen]; yylen++)
911 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
912 # define yystpcpy stpcpy
917 yystpcpy (
char *yydest,
const char *yysrc)
920 const char *yys = yysrc;
922 while ((*yyd++ = *yys++) !=
'\0')
939 yytnamerr (
char *yyres,
const char *yystr)
944 char const *yyp = yystr;
951 goto do_not_strip_quotes;
955 goto do_not_strip_quotes;
968 do_not_strip_quotes: ;
972 return yystrlen (yystr);
974 return yystpcpy (yyres, yystr) - yyres;
987 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
992 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
996 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1026 int yyn =
yypact[*yyssp];
1027 yyarg[yycount++] =
yytname[yytoken];
1033 int yyxbegin = yyn < 0 ? -yyn : 0;
1035 int yychecklim =
YYLAST - yyn + 1;
1039 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1043 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1049 yyarg[yycount++] =
yytname[yyx];
1052 if (! (yysize <= yysize1
1063 # define YYCASE_(N, S) \
1067 YYCASE_(0,
YY_(
"syntax error"));
1068 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1069 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1070 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1071 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1072 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1077 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1083 if (*yymsg_alloc < yysize)
1085 *yymsg_alloc = 2 * yysize;
1086 if (! (yysize <= *yymsg_alloc
1098 while ((*yyp = *yyformat) !=
'\0')
1099 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1101 yyp += yytnamerr (yyp, yyarg[yyi++]);
1184 char *yymsg = yymsgbuf;
1185 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1188 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1194 yyssp = yyss = yyssa;
1195 yyvsp = yyvs = yyvsa;
1198 YYDPRINTF ((stderr,
"Starting parse\n"));
1217 if (yyss + yystacksize - 1 <= yyssp)
1220 YYSIZE_T yysize = yyssp - yyss + 1;
1234 yyoverflow (
YY_(
"memory exhausted"),
1235 &yyss1, yysize *
sizeof (*yyssp),
1236 &yyvs1, yysize *
sizeof (*yyvsp),
1243 # ifndef YYSTACK_RELOCATE
1244 goto yyexhaustedlab;
1248 goto yyexhaustedlab;
1258 goto yyexhaustedlab;
1261 # undef YYSTACK_RELOCATE
1268 yyssp = yyss + yysize - 1;
1269 yyvsp = yyvs + yysize - 1;
1271 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1272 (
unsigned long int) yystacksize));
1274 if (yyss + yystacksize - 1 <= yyssp)
1278 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1303 YYDPRINTF ((stderr,
"Reading a token: "));
1310 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1376 yyval = yyvsp[1-yylen];
1383 #line 73 "frontends/ilang/ilang_parser.y"
1387 #line 1388 "frontends/ilang/ilang_parser.tab.c"
1391 #line 75 "frontends/ilang/ilang_parser.y"
1396 #line 1397 "frontends/ilang/ilang_parser.tab.c"
1400 #line 93 "frontends/ilang/ilang_parser.y"
1409 free((yyvsp[-1].
string));
1411 #line 1412 "frontends/ilang/ilang_parser.tab.c"
1415 #line 102 "frontends/ilang/ilang_parser.y"
1421 #line 1422 "frontends/ilang/ilang_parser.tab.c"
1425 #line 116 "frontends/ilang/ilang_parser.y"
1427 attrbuf[(yyvsp[-2].string)] = *(yyvsp[-1].data);
1428 delete (yyvsp[-1].data);
1429 free((yyvsp[-2].
string));
1431 #line 1432 "frontends/ilang/ilang_parser.tab.c"
1435 #line 123 "frontends/ilang/ilang_parser.y"
1439 #line 1440 "frontends/ilang/ilang_parser.tab.c"
1443 #line 128 "frontends/ilang/ilang_parser.y"
1449 #line 1450 "frontends/ilang/ilang_parser.tab.c"
1453 #line 132 "frontends/ilang/ilang_parser.y"
1458 free((yyvsp[-1].
string));
1460 #line 1461 "frontends/ilang/ilang_parser.tab.c"
1464 #line 140 "frontends/ilang/ilang_parser.y"
1468 #line 1469 "frontends/ilang/ilang_parser.tab.c"
1472 #line 143 "frontends/ilang/ilang_parser.y"
1476 #line 1477 "frontends/ilang/ilang_parser.tab.c"
1480 #line 146 "frontends/ilang/ilang_parser.y"
1484 #line 1485 "frontends/ilang/ilang_parser.tab.c"
1488 #line 149 "frontends/ilang/ilang_parser.y"
1494 #line 1495 "frontends/ilang/ilang_parser.tab.c"
1498 #line 154 "frontends/ilang/ilang_parser.y"
1504 #line 1505 "frontends/ilang/ilang_parser.tab.c"
1508 #line 159 "frontends/ilang/ilang_parser.y"
1514 #line 1515 "frontends/ilang/ilang_parser.tab.c"
1518 #line 167 "frontends/ilang/ilang_parser.y"
1524 #line 1525 "frontends/ilang/ilang_parser.tab.c"
1528 #line 171 "frontends/ilang/ilang_parser.y"
1534 free((yyvsp[-1].
string));
1536 #line 1537 "frontends/ilang/ilang_parser.tab.c"
1540 #line 180 "frontends/ilang/ilang_parser.y"
1544 #line 1545 "frontends/ilang/ilang_parser.tab.c"
1548 #line 183 "frontends/ilang/ilang_parser.y"
1552 #line 1553 "frontends/ilang/ilang_parser.tab.c"
1556 #line 189 "frontends/ilang/ilang_parser.y"
1563 free((yyvsp[-2].
string));
1564 free((yyvsp[-1].
string));
1566 #line 1567 "frontends/ilang/ilang_parser.tab.c"
1570 #line 200 "frontends/ilang/ilang_parser.y"
1573 free((yyvsp[-2].
string));
1574 delete (yyvsp[-1].data);
1576 #line 1577 "frontends/ilang/ilang_parser.tab.c"
1580 #line 205 "frontends/ilang/ilang_parser.y"
1584 free((yyvsp[-2].
string));
1585 delete (yyvsp[-1].data);
1587 #line 1588 "frontends/ilang/ilang_parser.tab.c"
1591 #line 211 "frontends/ilang/ilang_parser.y"
1596 delete (yyvsp[-1].sigspec);
1597 free((yyvsp[-2].
string));
1599 #line 1600 "frontends/ilang/ilang_parser.tab.c"
1603 #line 221 "frontends/ilang/ilang_parser.y"
1616 free((yyvsp[-1].
string));
1618 #line 1619 "frontends/ilang/ilang_parser.tab.c"
1622 #line 237 "frontends/ilang/ilang_parser.y"
1625 rule->
signal = *(yyvsp[-1].sigspec);
1629 delete (yyvsp[-1].sigspec);
1631 #line 1632 "frontends/ilang/ilang_parser.tab.c"
1635 #line 251 "frontends/ilang/ilang_parser.y"
1642 #line 1643 "frontends/ilang/ilang_parser.tab.c"
1646 #line 256 "frontends/ilang/ilang_parser.y"
1651 #line 1652 "frontends/ilang/ilang_parser.tab.c"
1655 #line 263 "frontends/ilang/ilang_parser.y"
1657 case_stack.back()->compare.push_back(*(yyvsp[0].sigspec));
1658 delete (yyvsp[0].sigspec);
1660 #line 1661 "frontends/ilang/ilang_parser.tab.c"
1664 #line 267 "frontends/ilang/ilang_parser.y"
1666 case_stack.back()->compare.push_back(*(yyvsp[0].sigspec));
1667 delete (yyvsp[0].sigspec);
1669 #line 1670 "frontends/ilang/ilang_parser.tab.c"
1673 #line 279 "frontends/ilang/ilang_parser.y"
1676 delete (yyvsp[-2].sigspec);
1677 delete (yyvsp[-1].sigspec);
1679 #line 1680 "frontends/ilang/ilang_parser.tab.c"
1683 #line 286 "frontends/ilang/ilang_parser.y"
1687 rule->
signal = *(yyvsp[-1].sigspec);
1689 delete (yyvsp[-1].sigspec);
1691 #line 1692 "frontends/ilang/ilang_parser.tab.c"
1695 #line 293 "frontends/ilang/ilang_parser.y"
1702 #line 1703 "frontends/ilang/ilang_parser.tab.c"
1706 #line 299 "frontends/ilang/ilang_parser.y"
1713 #line 1714 "frontends/ilang/ilang_parser.tab.c"
1717 #line 308 "frontends/ilang/ilang_parser.y"
1719 #line 1720 "frontends/ilang/ilang_parser.tab.c"
1723 #line 309 "frontends/ilang/ilang_parser.y"
1725 #line 1726 "frontends/ilang/ilang_parser.tab.c"
1729 #line 310 "frontends/ilang/ilang_parser.y"
1731 #line 1732 "frontends/ilang/ilang_parser.tab.c"
1735 #line 311 "frontends/ilang/ilang_parser.y"
1737 #line 1738 "frontends/ilang/ilang_parser.tab.c"
1741 #line 312 "frontends/ilang/ilang_parser.y"
1743 #line 1744 "frontends/ilang/ilang_parser.tab.c"
1747 #line 315 "frontends/ilang/ilang_parser.y"
1750 delete (yyvsp[-2].sigspec);
1751 delete (yyvsp[-1].sigspec);
1753 #line 1754 "frontends/ilang/ilang_parser.tab.c"
1757 #line 323 "frontends/ilang/ilang_parser.y"
1760 int width = strtol((yyvsp[0].
string), &ep, 10);
1761 std::list<RTLIL::State> bits;
1762 while (*(++ep) != 0) {
1772 bits.push_front(bit);
1774 if (bits.size() == 0)
1776 while ((
int)bits.size() < width) {
1780 bits.push_back(bit);
1782 while ((
int)bits.size() > width)
1785 for (
auto it = bits.begin(); it != bits.end(); it++)
1787 free((yyvsp[0].
string));
1789 #line 1790 "frontends/ilang/ilang_parser.tab.c"
1793 #line 354 "frontends/ilang/ilang_parser.y"
1797 #line 1798 "frontends/ilang/ilang_parser.tab.c"
1801 #line 357 "frontends/ilang/ilang_parser.y"
1804 free((yyvsp[0].
string));
1806 #line 1807 "frontends/ilang/ilang_parser.tab.c"
1810 #line 363 "frontends/ilang/ilang_parser.y"
1813 delete (yyvsp[0].data);
1815 #line 1816 "frontends/ilang/ilang_parser.tab.c"
1819 #line 367 "frontends/ilang/ilang_parser.y"
1824 free((yyvsp[0].
string));
1826 #line 1827 "frontends/ilang/ilang_parser.tab.c"
1830 #line 373 "frontends/ilang/ilang_parser.y"
1835 free((yyvsp[-3].
string));
1837 #line 1838 "frontends/ilang/ilang_parser.tab.c"
1841 #line 379 "frontends/ilang/ilang_parser.y"
1846 free((yyvsp[-5].
string));
1848 #line 1849 "frontends/ilang/ilang_parser.tab.c"
1852 #line 385 "frontends/ilang/ilang_parser.y"
1854 (yyval.
sigspec) = (yyvsp[-1].sigspec);
1856 #line 1857 "frontends/ilang/ilang_parser.tab.c"
1860 #line 390 "frontends/ilang/ilang_parser.y"
1865 delete (yyvsp[-1].sigspec);
1866 delete (yyvsp[0].sigspec);
1868 #line 1869 "frontends/ilang/ilang_parser.tab.c"
1872 #line 397 "frontends/ilang/ilang_parser.y"
1876 #line 1877 "frontends/ilang/ilang_parser.tab.c"
1880 #line 402 "frontends/ilang/ilang_parser.y"
1885 delete (yyvsp[-2].sigspec);
1886 delete (yyvsp[-1].sigspec);
1888 #line 1889 "frontends/ilang/ilang_parser.tab.c"
1892 #line 1893 "frontends/ilang/ilang_parser.tab.c"
1921 if (0 <= yystate && yystate <=
YYLAST &&
yycheck[yystate] == *yyssp)
1941 #if ! YYERROR_VERBOSE
1944 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1947 char const *yymsgp =
YY_(
"syntax error");
1948 int yysyntax_error_status;
1949 yysyntax_error_status = YYSYNTAX_ERROR;
1950 if (yysyntax_error_status == 0)
1952 else if (yysyntax_error_status == 1)
1954 if (yymsg != yymsgbuf)
1960 yymsg_alloc =
sizeof yymsgbuf;
1961 yysyntax_error_status = 2;
1965 yysyntax_error_status = YYSYNTAX_ERROR;
1970 if (yysyntax_error_status == 2)
1971 goto yyexhaustedlab;
1973 # undef YYSYNTAX_ERROR
1979 if (yyerrstatus == 3)
2081 #if !defined yyoverflow || YYERROR_VERBOSE
2104 while (yyssp != yyss)
2115 if (yymsg != yymsgbuf)
static const yytype_int8 yypact[]
RTLIL::Process * current_process
static void append(const vec< T > &from, vec< T > &to)
static const yytype_uint8 yyr1[]
std::string stringf(const char *fmt,...)
void rtlil_frontend_ilang_yyerror(char const *s)
RTLIL::Cell * addCell(RTLIL::IdString name, RTLIL::IdString type)
static const yytype_uint8 yydefact[]
#define yytable_value_is_error(Yytable_value)
void add(RTLIL::Module *module)
static const yytype_int16 yypgoto[]
#define YOSYS_NAMESPACE_PREFIX
#define YOSYS_NAMESPACE_END
std::vector< std::vector< RTLIL::SwitchRule * > * > switch_stack
std::map< RTLIL::IdString, RTLIL::Wire * > wires_
void setPort(RTLIL::IdString portname, RTLIL::SigSpec signal)
std::map< RTLIL::IdString, RTLIL::Memory * > memories
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
std::map< RTLIL::IdString, RTLIL::Const > parameters
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
RTLIL::Memory * current_memory
unsigned short int yytype_uint16
int rtlil_frontend_ilang_yydebug
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
static const yytype_int16 yydefgoto[]
static const char *const yytname[]
std::vector< RTLIL::CaseRule * > case_stack
void connect(const RTLIL::SigSig &conn)
#define YY_REDUCE_PRINT(Rule)
std::map< RTLIL::IdString, RTLIL::Const > attrbuf
RTLIL_ATTRIBUTE_MEMBERS bool hasPort(RTLIL::IdString portname) const
RTLIL::Wire * addWire(RTLIL::IdString name, int width=1)
unsigned char yytype_uint8
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
YYSTYPE rtlil_frontend_ilang_yylval
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_STACK_PRINT(Bottom, Top)
std::map< RTLIL::IdString, RTLIL::Process * > processes
RTLIL::Design * current_design
bool has(RTLIL::IdString id) const
#define USING_YOSYS_NAMESPACE
std::map< RTLIL::IdString, RTLIL::Cell * > cells_
#define YOSYS_NAMESPACE_BEGIN
#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
RTLIL::Wire * current_wire
RTLIL::Module * current_module
static const yytype_uint16 yyrline[]
std::vector< RTLIL::State > bits
static const yytype_int16 yytable[]
#define yypact_value_is_default(Yystate)
#define YYSTACK_ALLOC_MAXIMUM
std::vector< RTLIL::SwitchRule * > switches
std::pair< SigSpec, SigSpec > SigSig
static const yytype_uint8 yytranslate[]
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
YOSYS_NAMESPACE_BEGIN int autoidx
int rtlil_frontend_ilang_yyparse(void)
void rename(RTLIL::Wire *wire, RTLIL::IdString new_name)
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
static const yytype_int16 yycheck[]
RTLIL_ATTRIBUTE_MEMBERS RTLIL::CaseRule root_case
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
static const yytype_uint8 yystos[]
YOSYS_NAMESPACE_PREFIX RTLIL::SigSpec * sigspec