/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, especially those whose name start with YY_ or yy_. They are private implementation details that can be changed or removed. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ #define YYBISON 30802 /* Bison version string. */ #define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Substitute the variable and function names. */ #define yyparse sdfparse #define yylex sdflex #define yyerror sdferror #define yydebug sdfdebug #define yynerrs sdfnerrs #define yylval sdflval #define yychar sdfchar #define yylloc sdflloc /* First part of user prologue. */ #line 2 "sdf_parse.y" /* * Copyright (c) 1998-2023 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU * General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ extern int sdflex(void); static void yyerror(const char*msg); # include "vpi_user.h" # include "sdf_parse_priv.h" # include "sdf_priv.h" # include # include # include # include "ivl_alloc.h" /* This is the hierarchy separator to use. */ char sdf_use_hchar = '.'; #line 114 "sdf_parse.c" # ifndef YY_CAST # ifdef __cplusplus # define YY_CAST(Type, Val) static_cast (Val) # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) # else # define YY_CAST(Type, Val) ((Type) (Val)) # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) # endif # endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # else # define YY_NULLPTR ((void*)0) # endif # endif #include "sdf_parse.h" /* Symbol kind. */ enum yysymbol_kind_t { YYSYMBOL_YYEMPTY = -2, YYSYMBOL_YYEOF = 0, /* "end of file" */ YYSYMBOL_YYerror = 1, /* error */ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ YYSYMBOL_K_ABSOLUTE = 3, /* K_ABSOLUTE */ YYSYMBOL_K_CELL = 4, /* K_CELL */ YYSYMBOL_K_CELLTYPE = 5, /* K_CELLTYPE */ YYSYMBOL_K_COND = 6, /* K_COND */ YYSYMBOL_K_CONDELSE = 7, /* K_CONDELSE */ YYSYMBOL_K_DATE = 8, /* K_DATE */ YYSYMBOL_K_DELAYFILE = 9, /* K_DELAYFILE */ YYSYMBOL_K_DELAY = 10, /* K_DELAY */ YYSYMBOL_K_DESIGN = 11, /* K_DESIGN */ YYSYMBOL_K_DIVIDER = 12, /* K_DIVIDER */ YYSYMBOL_K_HOLD = 13, /* K_HOLD */ YYSYMBOL_K_INCREMENT = 14, /* K_INCREMENT */ YYSYMBOL_K_INSTANCE = 15, /* K_INSTANCE */ YYSYMBOL_K_INTERCONNECT = 16, /* K_INTERCONNECT */ YYSYMBOL_K_IOPATH = 17, /* K_IOPATH */ YYSYMBOL_K_NEGEDGE = 18, /* K_NEGEDGE */ YYSYMBOL_K_PATHPULSE = 19, /* K_PATHPULSE */ YYSYMBOL_K_PATHPULSEPERCENT = 20, /* K_PATHPULSEPERCENT */ YYSYMBOL_K_PERIOD = 21, /* K_PERIOD */ YYSYMBOL_K_POSEDGE = 22, /* K_POSEDGE */ YYSYMBOL_K_PROCESS = 23, /* K_PROCESS */ YYSYMBOL_K_PROGRAM = 24, /* K_PROGRAM */ YYSYMBOL_K_RECREM = 25, /* K_RECREM */ YYSYMBOL_K_RECOVERY = 26, /* K_RECOVERY */ YYSYMBOL_K_REMOVAL = 27, /* K_REMOVAL */ YYSYMBOL_K_SDFVERSION = 28, /* K_SDFVERSION */ YYSYMBOL_K_SETUP = 29, /* K_SETUP */ YYSYMBOL_K_SETUPHOLD = 30, /* K_SETUPHOLD */ YYSYMBOL_K_TEMPERATURE = 31, /* K_TEMPERATURE */ YYSYMBOL_K_TIMESCALE = 32, /* K_TIMESCALE */ YYSYMBOL_K_TIMINGCHECK = 33, /* K_TIMINGCHECK */ YYSYMBOL_K_VENDOR = 34, /* K_VENDOR */ YYSYMBOL_K_VERSION = 35, /* K_VERSION */ YYSYMBOL_K_VOLTAGE = 36, /* K_VOLTAGE */ YYSYMBOL_K_WIDTH = 37, /* K_WIDTH */ YYSYMBOL_K_01 = 38, /* K_01 */ YYSYMBOL_K_10 = 39, /* K_10 */ YYSYMBOL_K_0Z = 40, /* K_0Z */ YYSYMBOL_K_Z1 = 41, /* K_Z1 */ YYSYMBOL_K_1Z = 42, /* K_1Z */ YYSYMBOL_K_Z0 = 43, /* K_Z0 */ YYSYMBOL_K_EQ = 44, /* K_EQ */ YYSYMBOL_K_NE = 45, /* K_NE */ YYSYMBOL_K_CEQ = 46, /* K_CEQ */ YYSYMBOL_K_CNE = 47, /* K_CNE */ YYSYMBOL_K_LOGICAL_ONE = 48, /* K_LOGICAL_ONE */ YYSYMBOL_K_LOGICAL_ZERO = 49, /* K_LOGICAL_ZERO */ YYSYMBOL_K_LAND = 50, /* K_LAND */ YYSYMBOL_K_LOR = 51, /* K_LOR */ YYSYMBOL_HCHAR = 52, /* HCHAR */ YYSYMBOL_QSTRING = 53, /* QSTRING */ YYSYMBOL_IDENTIFIER = 54, /* IDENTIFIER */ YYSYMBOL_REAL_NUMBER = 55, /* REAL_NUMBER */ YYSYMBOL_INTEGER = 56, /* INTEGER */ YYSYMBOL_57_ = 57, /* '(' */ YYSYMBOL_58_ = 58, /* ')' */ YYSYMBOL_59_ = 59, /* '.' */ YYSYMBOL_60_ = 60, /* '/' */ YYSYMBOL_61_ = 61, /* '*' */ YYSYMBOL_62_ = 62, /* '~' */ YYSYMBOL_63_ = 63, /* '!' */ YYSYMBOL_64_ = 64, /* '[' */ YYSYMBOL_65_ = 65, /* ']' */ YYSYMBOL_66_ = 66, /* ':' */ YYSYMBOL_67_ = 67, /* '+' */ YYSYMBOL_68_ = 68, /* '-' */ YYSYMBOL_YYACCEPT = 69, /* $accept */ YYSYMBOL_source_file = 70, /* source_file */ YYSYMBOL_sdf_header_list = 71, /* sdf_header_list */ YYSYMBOL_sdf_header_item = 72, /* sdf_header_item */ YYSYMBOL_sdfversion = 73, /* sdfversion */ YYSYMBOL_design_name = 74, /* design_name */ YYSYMBOL_date = 75, /* date */ YYSYMBOL_vendor = 76, /* vendor */ YYSYMBOL_program_name = 77, /* program_name */ YYSYMBOL_program_version = 78, /* program_version */ YYSYMBOL_hierarchy_divider = 79, /* hierarchy_divider */ YYSYMBOL_voltage = 80, /* voltage */ YYSYMBOL_process = 81, /* process */ YYSYMBOL_temperature = 82, /* temperature */ YYSYMBOL_time_scale = 83, /* time_scale */ YYSYMBOL_cell_list = 84, /* cell_list */ YYSYMBOL_cell = 85, /* cell */ YYSYMBOL_86_1 = 86, /* $@1 */ YYSYMBOL_celltype = 87, /* celltype */ YYSYMBOL_cell_instance = 88, /* cell_instance */ YYSYMBOL_timing_spec_list_opt = 89, /* timing_spec_list_opt */ YYSYMBOL_timing_spec = 90, /* timing_spec */ YYSYMBOL_deltype_list = 91, /* deltype_list */ YYSYMBOL_deltype = 92, /* deltype */ YYSYMBOL_del_def_list = 93, /* del_def_list */ YYSYMBOL_del_def = 94, /* del_def */ YYSYMBOL_tchk_def_list = 95, /* tchk_def_list */ YYSYMBOL_tchk_def = 96, /* tchk_def */ YYSYMBOL_port_tchk = 97, /* port_tchk */ YYSYMBOL_cond_edge_start = 98, /* cond_edge_start */ YYSYMBOL_99_2 = 99, /* $@2 */ YYSYMBOL_cond_edge_identifier = 100, /* cond_edge_identifier */ YYSYMBOL_timing_check_condition = 101, /* timing_check_condition */ YYSYMBOL_conditional_port_expr = 102, /* conditional_port_expr */ YYSYMBOL_equality_operator = 103, /* equality_operator */ YYSYMBOL_scalar_constant = 104, /* scalar_constant */ YYSYMBOL_input_output_path_opt = 105, /* input_output_path_opt */ YYSYMBOL_input_output_path = 106, /* input_output_path */ YYSYMBOL_port_spec = 107, /* port_spec */ YYSYMBOL_port_instance = 108, /* port_instance */ YYSYMBOL_port = 109, /* port */ YYSYMBOL_port_interconnect = 110, /* port_interconnect */ YYSYMBOL_port_edge = 111, /* port_edge */ YYSYMBOL_112_3 = 112, /* $@3 */ YYSYMBOL_113_4 = 113, /* $@4 */ YYSYMBOL_edge_identifier = 114, /* edge_identifier */ YYSYMBOL_delval_list = 115, /* delval_list */ YYSYMBOL_delval = 116, /* delval */ YYSYMBOL_rvalue_opt = 117, /* rvalue_opt */ YYSYMBOL_rvalue = 118, /* rvalue */ YYSYMBOL_hierarchical_identifier = 119, /* hierarchical_identifier */ YYSYMBOL_rtriple = 120, /* rtriple */ YYSYMBOL_signed_real_number_opt = 121, /* signed_real_number_opt */ YYSYMBOL_signed_real_number = 122 /* signed_real_number */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; #ifdef short # undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure and (if available) are included so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ # include /* INFRINGES ON USER NAME SPACE */ # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YY_STDINT_H # endif #endif /* Narrow types that promote to a signed type and that can represent a signed or unsigned integer of at least N bits. In tables they can save space and decrease cache pressure. Promoting to a signed type helps avoid bugs in integer arithmetic. */ #ifdef __INT_LEAST8_MAX__ typedef __INT_LEAST8_TYPE__ yytype_int8; #elif defined YY_STDINT_H typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef __INT_LEAST16_MAX__ typedef __INT_LEAST16_TYPE__ yytype_int16; #elif defined YY_STDINT_H typedef int_least16_t yytype_int16; #else typedef short yytype_int16; #endif /* Work around bug in HP-UX 11.23, which defines these macros incorrectly for preprocessor constants. This workaround can likely be removed in 2023, as HPE has promised support for HP-UX 11.23 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux # undef UINT_LEAST8_MAX # undef UINT_LEAST16_MAX # define UINT_LEAST8_MAX 255 # define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; #else typedef short yytype_uint8; #endif #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; #else typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ # define YYPTRDIFF_T __PTRDIFF_TYPE__ # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ # elif defined PTRDIFF_MAX # ifndef ptrdiff_t # include /* INFRINGES ON USER NAME SPACE */ # endif # define YYPTRDIFF_T ptrdiff_t # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX # else # define YYPTRDIFF_T long # define YYPTRDIFF_MAXIMUM LONG_MAX # endif #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned # endif #endif #define YYSIZE_MAXIMUM \ YY_CAST (YYPTRDIFF_T, \ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ ? YYPTRDIFF_MAXIMUM \ : YY_CAST (YYSIZE_T, -1))) #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) /* Stored state numbers (used for stacks). */ typedef yytype_int16 yy_state_t; /* State numbers in computations. */ typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define YY_ATTRIBUTE_PURE # endif #endif #ifndef YY_ATTRIBUTE_UNUSED # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else # define YY_ATTRIBUTE_UNUSED # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YY_USE(E) ((void) (E)) #else # define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ # if __GNUC__ * 100 + __GNUC_MINOR__ < 407 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") # else # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ # define YY_IGNORE_USELESS_CAST_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") # define YY_IGNORE_USELESS_CAST_END \ _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_END #endif #define YY_ASSERT(E) ((void) (0 && (E))) #if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + YYSIZEOF (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 374 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 69 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 54 /* YYNRULES -- Number of rules. */ #define YYNRULES 151 /* YYNSTATES -- Number of states. */ #define YYNSTATES 329 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 311 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ #define YYTRANSLATE(YYX) \ (0 <= (YYX) && (YYX) <= YYMAXUTOK \ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ static const yytype_int8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 63, 2, 2, 2, 2, 2, 2, 57, 58, 61, 67, 2, 68, 59, 60, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 66, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 64, 2, 65, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 62, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 86, 86, 87, 94, 95, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 113, 123, 133, 143, 153, 163, 173, 178, 183, 191, 201, 208, 216, 226, 235, 240, 248, 249, 254, 253, 260, 266, 271, 273, 275, 277, 284, 285, 289, 290, 293, 296, 302, 303, 307, 308, 309, 310, 311, 317, 318, 322, 327, 330, 338, 347, 350, 357, 361, 371, 378, 379, 384, 385, 386, 387, 388, 389, 390, 391, 395, 398, 401, 403, 410, 410, 414, 415, 416, 417, 418, 419, 420, 421, 422, 426, 428, 430, 432, 438, 440, 441, 442, 443, 444, 445, 446, 447, 451, 452, 453, 454, 458, 459, 463, 464, 468, 472, 473, 477, 481, 487, 491, 498, 498, 498, 503, 504, 505, 506, 507, 508, 509, 510, 514, 525, 532, 534, 539, 548, 551, 555, 558, 560, 566, 568, 579, 601, 604, 611, 612, 613, 614, 615, 616 }; #endif /** Accessing symbol of state STATE. */ #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if YYDEBUG || 0 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "\"end of file\"", "error", "\"invalid token\"", "K_ABSOLUTE", "K_CELL", "K_CELLTYPE", "K_COND", "K_CONDELSE", "K_DATE", "K_DELAYFILE", "K_DELAY", "K_DESIGN", "K_DIVIDER", "K_HOLD", "K_INCREMENT", "K_INSTANCE", "K_INTERCONNECT", "K_IOPATH", "K_NEGEDGE", "K_PATHPULSE", "K_PATHPULSEPERCENT", "K_PERIOD", "K_POSEDGE", "K_PROCESS", "K_PROGRAM", "K_RECREM", "K_RECOVERY", "K_REMOVAL", "K_SDFVERSION", "K_SETUP", "K_SETUPHOLD", "K_TEMPERATURE", "K_TIMESCALE", "K_TIMINGCHECK", "K_VENDOR", "K_VERSION", "K_VOLTAGE", "K_WIDTH", "K_01", "K_10", "K_0Z", "K_Z1", "K_1Z", "K_Z0", "K_EQ", "K_NE", "K_CEQ", "K_CNE", "K_LOGICAL_ONE", "K_LOGICAL_ZERO", "K_LAND", "K_LOR", "HCHAR", "QSTRING", "IDENTIFIER", "REAL_NUMBER", "INTEGER", "'('", "')'", "'.'", "'/'", "'*'", "'~'", "'!'", "'['", "']'", "':'", "'+'", "'-'", "$accept", "source_file", "sdf_header_list", "sdf_header_item", "sdfversion", "design_name", "date", "vendor", "program_name", "program_version", "hierarchy_divider", "voltage", "process", "temperature", "time_scale", "cell_list", "cell", "$@1", "celltype", "cell_instance", "timing_spec_list_opt", "timing_spec", "deltype_list", "deltype", "del_def_list", "del_def", "tchk_def_list", "tchk_def", "port_tchk", "cond_edge_start", "$@2", "cond_edge_identifier", "timing_check_condition", "conditional_port_expr", "equality_operator", "scalar_constant", "input_output_path_opt", "input_output_path", "port_spec", "port_instance", "port", "port_interconnect", "port_edge", "$@3", "$@4", "edge_identifier", "delval_list", "delval", "rvalue_opt", "rvalue", "hierarchical_identifier", "rtriple", "signed_real_number_opt", "signed_real_number", YY_NULLPTR }; static const char * yysymbol_name (yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif #define YYPACT_NINF (-255) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-118) #define yytable_value_is_error(Yyn) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { -30, 35, 52, 9, -255, -1, 193, 44, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 6, 26, 31, 54, 58, 79, 164, 29, 85, 103, 164, 137, -255, 48, -255, 101, 106, 108, 112, 116, 118, 142, 148, -255, -255, 99, 124, 165, 129, 168, 181, 183, 172, 189, 201, 215, 16, 247, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 164, -255, 260, 261, -255, -255, -255, -255, 263, 276, 265, 254, -255, -255, -255, -255, 270, 309, -255, 164, 267, 2, -255, -255, -255, 268, -255, -255, 269, -32, 151, -255, -255, 274, -255, 22, -255, -255, -255, 18, 21, 271, 123, 176, -255, 272, 223, 199, -255, -255, 273, 275, 275, 279, 279, -255, -255, -255, 82, 82, 82, 82, 82, 82, 82, 82, -255, -255, -255, 146, 208, -255, 226, 277, -255, 279, -255, 283, 277, -255, 82, 192, -255, 277, 82, 82, 82, 82, 82, 277, 60, 24, 10, 20, -255, -255, -255, 126, 277, -255, 277, 80, 277, 71, 279, 279, 93, 278, 258, -22, 280, 277, 277, 277, 277, 277, 281, 282, -255, -255, 237, 237, 217, -255, -255, 284, 320, 285, 279, -36, 286, -255, 279, -255, -255, -255, 287, 288, 289, -255, 290, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 291, 93, -255, -255, 292, -255, -255, -255, -255, -255, 239, 295, -255, 277, 294, 296, 297, 277, -255, -255, 225, 152, 237, 237, 237, 237, 237, 237, 324, -255, 93, -255, 299, -255, 200, 299, -255, -255, -255, -255, -255, 300, -255, -255, 298, 301, -255, -255, -255, 302, 336, -255, -255, -255, -255, -255, 262, 251, 93, 279, 222, 235, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 242, -255, -255, -255, -255, 93, 279, 299, 277, -255, -255, 279, -255, 279, 299, 253, 255, 303, 299, 257, 304, -255, 306, -255, 259, 307, -255, -255, 308, -255, -255 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 0, 0, 0, 1, 0, 0, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 3, 0, 0, 0, 0, 0, 0, 144, 0, 0, 0, 144, 0, 4, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 146, 149, 0, 0, 0, 0, 145, 0, 0, 0, 0, 0, 145, 0, 0, 2, 33, 19, 18, 25, 23, 24, 28, 21, 17, 147, 150, 148, 151, 29, 144, 30, 0, 0, 20, 22, 26, 27, 0, 0, 0, 0, 145, 31, 32, 37, 0, 0, 35, 144, 0, 0, 43, 143, 38, 0, 141, 40, 0, 0, 0, 42, 41, 0, 39, 0, 36, 44, 142, 0, 0, 0, 0, 0, 50, 0, 0, 0, 68, 46, 0, 0, 0, 112, 112, 45, 49, 48, 0, 0, 0, 0, 0, 0, 0, 0, 47, 67, 55, 0, 0, 57, 0, 0, 111, 0, 116, 117, 0, 81, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 56, 54, 144, 136, 113, 136, 0, 0, 0, 0, 0, 0, 0, 92, 118, 0, 0, 0, 0, 0, 0, 0, 0, 109, 110, 0, 0, 0, 97, 96, 0, 0, 0, 0, 118, 0, 120, 0, 114, 115, 140, 0, 145, 0, 137, 0, 91, 84, 83, 85, 86, 87, 88, 89, 90, 82, 0, 0, 93, 94, 0, 78, 105, 106, 107, 108, 0, 0, 76, 0, 0, 0, 0, 0, 75, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 66, 0, 59, 0, 0, 139, 138, 51, 52, 70, 0, 79, 95, 0, 0, 72, 74, 69, 0, 0, 98, 101, 102, 103, 104, 99, 100, 0, 0, 144, 0, 132, 133, 124, 123, 125, 126, 127, 128, 129, 130, 121, 0, 80, 119, 73, 71, 0, 0, 0, 0, 65, 131, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 134, 0, 122, 0, 0, 63, 135, 0, 60, 61 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -255, -255, -255, 350, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 333, -255, -255, -255, -255, -255, -255, 252, 244, -101, -255, 250, 53, -255, -255, -255, 191, -180, -255, 138, 246, -255, -173, -126, -155, -51, -255, -255, -255, -255, -254, -182, 198, -139, -90, 7, -62, -27 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 34, 35, 96, 84, 92, 104, 111, 117, 118, 144, 145, 121, 122, 154, 155, 175, 224, 180, 196, 235, 197, 147, 148, 206, 156, 150, 182, 208, 259, 309, 297, 286, 287, 212, 288, 151, 210, 49, 86 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 50, 149, 149, 99, 56, 103, 298, 229, 172, 198, 5, 201, 85, 174, 245, 246, 107, 82, 184, 115, 107, 204, 119, 173, 190, 199, 108, 1, 236, 181, 107, 97, 113, 213, 48, 213, -117, 225, 55, 198, 198, 207, 236, 169, 3, 169, 238, 239, 240, 241, 242, 313, 4, 266, 207, 114, 100, 20, 317, 36, 101, 191, 322, 102, 100, 183, 6, 277, 278, 279, 280, 281, 282, 83, 100, 116, 203, 205, 120, 37, 260, 200, 284, 38, 51, 52, 215, 203, 203, 203, 39, 40, 198, 198, 198, 198, 198, 198, 216, 270, 207, 32, 217, 274, 308, 58, 59, 41, 192, 193, 304, 42, 203, 194, 100, 202, 308, 195, 218, 219, 220, 221, 222, 223, 124, 100, 125, 227, 228, 207, 311, 308, 43, 178, 179, 308, 100, 126, 53, 153, 308, 57, 127, 128, 211, 21, 306, 100, 22, 23, 205, 257, 164, 165, 69, 70, 54, 207, 305, 61, 24, 25, 166, 167, 62, 26, 63, 314, 27, 28, 64, 29, 30, 31, 65, 320, 66, 207, 312, 71, 72, 44, 45, 315, 209, 316, 157, 158, 159, 160, 161, 162, 163, 46, 47, 74, 247, 248, 249, 250, 67, 21, 251, 252, 22, 23, 68, 176, 109, 110, 276, 185, 186, 187, 188, 189, 24, 25, 289, 44, 45, 26, 290, 73, 27, 28, 75, 29, 30, 31, 78, 46, 47, 116, 129, 76, 132, 77, 291, 292, 293, 294, 295, 296, 133, 177, 100, 79, 134, 135, 136, 57, 137, 138, 178, 179, 120, 140, 211, 80, 139, 247, 248, 249, 250, 143, 168, 251, 252, 247, 248, 249, 250, 81, 253, 251, 252, 44, 45, 171, 209, 90, 275, 143, 170, 192, 193, 192, 193, 46, 47, 100, 285, 307, 195, 247, 248, 249, 250, 285, 310, 251, 231, 232, 233, 234, 247, 248, 249, 250, 285, 318, 171, 319, 285, 323, 285, 326, 87, 88, 93, 89, 91, 94, 95, 98, 105, 106, 112, 123, 131, 142, 143, 100, 171, 107, 230, 255, 237, 243, 244, 283, 254, 256, 258, 261, 262, 263, 264, 265, 267, 269, 271, 303, 272, 273, 285, 33, 299, 301, 302, 321, 324, 300, 325, 327, 328, 60, 226, 130, 146, 141, 214, 268, 152 }; static const yytype_int16 yycheck[] = { 27, 127, 128, 1, 31, 95, 260, 180, 147, 164, 1, 1, 74, 152, 194, 195, 52, 1, 157, 1, 52, 1, 1, 149, 163, 1, 58, 57, 64, 155, 52, 93, 10, 172, 27, 174, 58, 176, 31, 194, 195, 167, 64, 144, 9, 146, 185, 186, 187, 188, 189, 305, 0, 226, 180, 33, 54, 58, 312, 53, 58, 1, 316, 61, 54, 155, 57, 247, 248, 249, 250, 251, 252, 57, 54, 57, 166, 57, 57, 53, 206, 57, 255, 52, 55, 56, 6, 177, 178, 179, 59, 60, 247, 248, 249, 250, 251, 252, 18, 238, 226, 57, 22, 242, 286, 57, 58, 53, 48, 49, 283, 53, 202, 53, 54, 166, 298, 57, 38, 39, 40, 41, 42, 43, 1, 54, 3, 178, 179, 255, 303, 313, 53, 62, 63, 317, 54, 14, 53, 57, 322, 4, 19, 20, 171, 8, 285, 54, 11, 12, 57, 202, 6, 7, 55, 56, 53, 283, 284, 58, 23, 24, 16, 17, 58, 28, 58, 306, 31, 32, 58, 34, 35, 36, 58, 314, 58, 303, 304, 55, 56, 55, 56, 309, 58, 311, 133, 134, 135, 136, 137, 138, 139, 67, 68, 66, 44, 45, 46, 47, 58, 8, 50, 51, 11, 12, 58, 154, 57, 58, 58, 158, 159, 160, 161, 162, 23, 24, 18, 55, 56, 28, 22, 58, 31, 32, 58, 34, 35, 36, 58, 67, 68, 57, 58, 54, 13, 54, 38, 39, 40, 41, 42, 43, 21, 53, 54, 58, 25, 26, 27, 4, 29, 30, 62, 63, 57, 58, 285, 58, 37, 44, 45, 46, 47, 57, 58, 50, 51, 44, 45, 46, 47, 58, 57, 50, 51, 55, 56, 57, 58, 5, 57, 57, 58, 48, 49, 48, 49, 67, 68, 54, 57, 58, 57, 44, 45, 46, 47, 57, 58, 50, 44, 45, 46, 47, 44, 45, 46, 47, 57, 58, 57, 58, 57, 58, 57, 58, 58, 58, 66, 58, 57, 53, 15, 58, 58, 58, 54, 58, 58, 58, 57, 54, 57, 52, 58, 17, 58, 58, 58, 17, 58, 58, 58, 58, 58, 58, 58, 58, 58, 56, 58, 17, 58, 58, 57, 7, 58, 58, 58, 58, 58, 65, 58, 58, 58, 34, 177, 117, 126, 121, 174, 235, 128 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_int8 yystos[] = { 0, 57, 70, 9, 0, 1, 57, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 58, 8, 11, 12, 23, 24, 28, 31, 32, 34, 35, 36, 57, 72, 84, 85, 53, 53, 52, 59, 60, 53, 53, 53, 55, 56, 67, 68, 120, 121, 122, 55, 56, 53, 53, 120, 122, 4, 57, 58, 85, 58, 58, 58, 58, 58, 58, 58, 58, 55, 56, 55, 56, 58, 66, 58, 54, 54, 58, 58, 58, 58, 1, 57, 87, 121, 122, 58, 58, 58, 5, 57, 88, 66, 53, 15, 86, 121, 58, 1, 54, 58, 61, 119, 89, 58, 58, 52, 58, 57, 58, 90, 54, 10, 33, 1, 57, 91, 92, 1, 57, 95, 96, 58, 1, 3, 14, 19, 20, 58, 92, 58, 13, 21, 25, 26, 27, 29, 30, 37, 58, 96, 58, 57, 93, 94, 93, 105, 106, 108, 109, 119, 105, 57, 97, 98, 108, 97, 97, 97, 97, 97, 97, 97, 6, 7, 16, 17, 58, 94, 58, 57, 118, 108, 118, 99, 97, 53, 62, 63, 101, 108, 110, 119, 118, 97, 97, 97, 97, 97, 118, 1, 48, 49, 53, 57, 102, 104, 109, 1, 57, 1, 110, 119, 1, 57, 107, 108, 111, 58, 120, 122, 117, 118, 117, 6, 18, 22, 38, 39, 40, 41, 42, 43, 100, 118, 101, 110, 110, 107, 58, 44, 45, 46, 47, 103, 64, 58, 118, 118, 118, 118, 118, 58, 58, 102, 102, 44, 45, 46, 47, 50, 51, 57, 58, 17, 58, 110, 58, 112, 108, 58, 58, 58, 58, 58, 107, 58, 104, 56, 118, 58, 58, 58, 118, 57, 58, 102, 102, 102, 102, 102, 102, 17, 107, 57, 115, 116, 118, 18, 22, 38, 39, 40, 41, 42, 43, 114, 115, 58, 65, 58, 58, 17, 107, 108, 118, 58, 116, 113, 58, 107, 108, 115, 118, 108, 108, 115, 58, 58, 118, 58, 115, 58, 58, 58, 58, 58, 58 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { 0, 69, 70, 70, 71, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 74, 75, 76, 77, 78, 79, 79, 79, 80, 80, 81, 82, 82, 83, 83, 84, 84, 86, 85, 85, 87, 88, 88, 88, 88, 89, 89, 90, 90, 90, 90, 91, 91, 92, 92, 92, 92, 92, 93, 93, 94, 94, 94, 94, 94, 94, 94, 94, 94, 95, 95, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 99, 98, 100, 100, 100, 100, 100, 100, 100, 100, 100, 101, 101, 101, 101, 102, 102, 102, 102, 102, 102, 102, 102, 102, 103, 103, 103, 103, 104, 104, 105, 105, 106, 107, 107, 108, 109, 110, 110, 112, 113, 111, 114, 114, 114, 114, 114, 114, 114, 114, 115, 115, 116, 116, 116, 117, 117, 118, 118, 118, 119, 119, 120, 121, 121, 122, 122, 122, 122, 122, 122 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 5, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 2, 1, 0, 7, 4, 4, 4, 3, 4, 4, 0, 2, 4, 4, 4, 4, 2, 1, 6, 6, 4, 4, 3, 2, 1, 6, 4, 10, 11, 4, 9, 4, 6, 4, 2, 1, 6, 6, 7, 6, 7, 6, 5, 5, 1, 3, 4, 5, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 1, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 4, 0, 0, 6, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 4, 5, 0, 1, 3, 3, 2, 1, 3, 5, 0, 1, 1, 2, 2, 1, 2, 2 }; enum { YYENOMEM = -2 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) /* Backward compatibility with an undocumented macro. Use YYerror or YYUNDEF. */ #define YYERRCODE YYUNDEF /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ # ifndef YYLOCATION_PRINT # if defined YY_LOCATION_PRINT /* Temporary convenience wrapper in case some people defined the undocumented and private YY_LOCATION_PRINT macros. */ # define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) # elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED static int yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { res += YYFPRINTF (yyo, "%d", yylocp->first_line); if (0 <= yylocp->first_column) res += YYFPRINTF (yyo, ".%d", yylocp->first_column); } if (0 <= yylocp->last_line) { if (yylocp->first_line < yylocp->last_line) { res += YYFPRINTF (yyo, "-%d", yylocp->last_line); if (0 <= end_col) res += YYFPRINTF (yyo, ".%d", end_col); } else if (0 <= end_col && yylocp->first_column < end_col) res += YYFPRINTF (yyo, "-%d", end_col); } return res; } # define YYLOCATION_PRINT yy_location_print_ /* Temporary convenience wrapper in case some people defined the undocumented and private YY_LOCATION_PRINT macros. */ # define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) # else # define YYLOCATION_PRINT(File, Loc) ((void) 0) /* Temporary convenience wrapper in case some people defined the undocumented and private YY_LOCATION_PRINT macros. */ # define YY_LOCATION_PRINT YYLOCATION_PRINT # endif # endif /* !defined YYLOCATION_PRINT */ # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Kind, Value, Location); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ static void yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) { FILE *yyoutput = yyo; YY_USE (yyoutput); YY_USE (yylocationp); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ static void yy_symbol_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) { YYFPRINTF (yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); YYLOCATION_PRINT (yyo, yylocationp); YYFPRINTF (yyo, ": "); yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp); YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ static void yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ static void yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) { int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), &yyvsp[(yyi + 1) - (yynrhs)], &(yylsp[(yyi + 1) - (yynrhs)])); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) ((void) 0) # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) { YY_USE (yyvaluep); YY_USE (yylocationp); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } /* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Location data for the lookahead symbol. */ YYLTYPE yylloc # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL = { 1, 1, 1, 1 } # endif ; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ int yyparse (void) { yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus = 0; /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* Their size. */ YYPTRDIFF_T yystacksize = YYINITDEPTH; /* The state stack: array, bottom, top. */ yy_state_t yyssa[YYINITDEPTH]; yy_state_t *yyss = yyssa; yy_state_t *yyssp = yyss; /* The semantic value stack: array, bottom, top. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp = yyvs; /* The location stack: array, bottom, top. */ YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls = yylsa; YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ int yyresult; /* Lookahead symbol kind. */ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; /* The locations where the error started and ended. */ YYLTYPE yyerror_range[3]; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: YYDPRINTF ((stderr, "Entering state %d\n", yystate)); YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ YYPTRDIFF_T yysize = yyssp - yyss + 1; # if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; YYLTYPE *yyls1 = yyls; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * YYSIZEOF (*yyssp), &yyvs1, yysize * YYSIZEOF (*yyvsp), &yyls1, yysize * YYSIZEOF (*yylsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; yyls = yyls1; } # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yy_state_t *yyss1 = yyss; union yyalloc *yyptr = YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; yylsp = yyls + yysize - 1; YY_IGNORE_USELESS_CAST_BEGIN YYDPRINTF ((stderr, "Stack size increased to %ld\n", YY_CAST (long, yystacksize))); YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (); } if (yychar <= YYEOF) { yychar = YYEOF; yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else if (yychar == YYerror) { /* The scanner already issued an error message, process directly to error recovery. But do not keep the error token as lookahead, it is too special and may lead us to an endless loop in error recovery. */ yychar = YYUNDEF; yytoken = YYSYMBOL_YYerror; yyerror_range[1] = yylloc; goto yyerrlab1; } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END *++yylsp = yylloc; /* Discard the shifted token. */ yychar = YYEMPTY; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; /* Default location. */ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; YY_REDUCE_PRINT (yyn); switch (yyn) { case 3: /* source_file: '(' K_DELAYFILE error ')' */ #line 88 "sdf_parse.y" { vpi_printf("SDF ERROR: %s:%d: Invalid DELAYFILE format\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 1581 "sdf_parse.c" break; case 17: /* sdfversion: '(' K_SDFVERSION QSTRING ')' */ #line 114 "sdf_parse.y" { if (sdf_flag_inform) { vpi_printf("SDF INFO: %s:%d: Version: %s\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].string_val)); } free((yyvsp[-1].string_val)); } #line 1592 "sdf_parse.c" break; case 18: /* design_name: '(' K_DESIGN QSTRING ')' */ #line 124 "sdf_parse.y" { if (sdf_flag_inform) { vpi_printf("SDF INFO: %s:%d: Design: %s\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].string_val)); } free((yyvsp[-1].string_val)); } #line 1603 "sdf_parse.c" break; case 19: /* date: '(' K_DATE QSTRING ')' */ #line 134 "sdf_parse.y" { if (sdf_flag_inform) { vpi_printf("SDF INFO: %s:%d: Date: %s\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].string_val)); } free((yyvsp[-1].string_val)); } #line 1614 "sdf_parse.c" break; case 20: /* vendor: '(' K_VENDOR QSTRING ')' */ #line 144 "sdf_parse.y" { if (sdf_flag_inform) { vpi_printf("SDF INFO: %s:%d: Vendor: %s\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].string_val)); } free((yyvsp[-1].string_val)); } #line 1625 "sdf_parse.c" break; case 21: /* program_name: '(' K_PROGRAM QSTRING ')' */ #line 154 "sdf_parse.y" { if (sdf_flag_inform) { vpi_printf("SDF INFO: %s:%d: Program: %s\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].string_val)); } free((yyvsp[-1].string_val)); } #line 1636 "sdf_parse.c" break; case 22: /* program_version: '(' K_VERSION QSTRING ')' */ #line 164 "sdf_parse.y" { if (sdf_flag_inform) { vpi_printf("SDF INFO: %s:%d: Program Version: %s\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].string_val)); } free((yyvsp[-1].string_val)); } #line 1647 "sdf_parse.c" break; case 23: /* hierarchy_divider: '(' K_DIVIDER '.' ')' */ #line 174 "sdf_parse.y" { sdf_use_hchar = '.'; if (sdf_flag_inform) vpi_printf("SDF INFO: %s:%d: Divider: \"%c\"\n", sdf_parse_path, (yylsp[-3]).first_line, sdf_use_hchar); } #line 1656 "sdf_parse.c" break; case 24: /* hierarchy_divider: '(' K_DIVIDER '/' ')' */ #line 179 "sdf_parse.y" { sdf_use_hchar = '/'; if (sdf_flag_inform) vpi_printf("SDF INFO: %s:%d: Divider: \"%c\"\n", sdf_parse_path, (yylsp[-3]).first_line, sdf_use_hchar); } #line 1665 "sdf_parse.c" break; case 25: /* hierarchy_divider: '(' K_DIVIDER HCHAR ')' */ #line 184 "sdf_parse.y" { /* sdf_use_hchar no-change */ if (sdf_flag_inform) vpi_printf("SDF INFO: %s:%d: Divider: \"%c\"\n", sdf_parse_path, (yylsp[-3]).first_line, sdf_use_hchar); } #line 1674 "sdf_parse.c" break; case 26: /* voltage: '(' K_VOLTAGE rtriple ')' */ #line 192 "sdf_parse.y" { /* The value must be defined. */ if (! (yyvsp[-1].delay).defined) { vpi_printf("SDF ERROR: %s:%d: Chosen value not defined.\n", sdf_parse_path, (yylsp[-3]).first_line); } else if (sdf_flag_inform) { vpi_printf("SDF INFO: %s:%d: Voltage: %f\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].delay).value); } } #line 1688 "sdf_parse.c" break; case 27: /* voltage: '(' K_VOLTAGE signed_real_number ')' */ #line 202 "sdf_parse.y" { if (sdf_flag_inform) vpi_printf("SDF INFO: %s:%d: Voltage: %f\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].real_val)); } #line 1696 "sdf_parse.c" break; case 28: /* process: '(' K_PROCESS QSTRING ')' */ #line 209 "sdf_parse.y" { if (sdf_flag_inform) vpi_printf("SDF INFO: %s:%d: Process: %s\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].string_val)); free((yyvsp[-1].string_val)); } #line 1705 "sdf_parse.c" break; case 29: /* temperature: '(' K_TEMPERATURE rtriple ')' */ #line 217 "sdf_parse.y" { /* The value must be defined. */ if (! (yyvsp[-1].delay).defined) { vpi_printf("SDF ERROR: %s:%d: Chosen value not defined.\n", sdf_parse_path, (yylsp[-3]).first_line); } else if (sdf_flag_inform) { vpi_printf("SDF INFO: %s:%d: Temperature: %f\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].delay).value); } } #line 1719 "sdf_parse.c" break; case 30: /* temperature: '(' K_TEMPERATURE signed_real_number ')' */ #line 227 "sdf_parse.y" { if (sdf_flag_inform) { vpi_printf("SDF INFO: %s:%d: Temperature: %f\n", sdf_parse_path, (yylsp[-2]).first_line, (yyvsp[-1].real_val)); } } #line 1729 "sdf_parse.c" break; case 31: /* time_scale: '(' K_TIMESCALE REAL_NUMBER IDENTIFIER ')' */ #line 236 "sdf_parse.y" { if (sdf_flag_inform) vpi_printf("SDF INFO: %s:%d: Timescale: %f%s\n", sdf_parse_path, (yylsp[-3]).first_line, (yyvsp[-2].real_val), (yyvsp[-1].string_val)); free((yyvsp[-1].string_val)); } #line 1738 "sdf_parse.c" break; case 32: /* time_scale: '(' K_TIMESCALE INTEGER IDENTIFIER ')' */ #line 241 "sdf_parse.y" { if (sdf_flag_inform) vpi_printf("SDF INFO: %s:%d: Timescale: %lu%s\n", sdf_parse_path, (yylsp[-3]).first_line, (yyvsp[-2].int_val), (yyvsp[-1].string_val)); free((yyvsp[-1].string_val)); } #line 1747 "sdf_parse.c" break; case 35: /* $@1: %empty */ #line 254 "sdf_parse.y" { sdf_select_instance((yyvsp[-1].string_val), (yyvsp[0].string_val), (yylsp[0]).first_line); /* find the instance in the design */} #line 1753 "sdf_parse.c" break; case 36: /* cell: '(' K_CELL celltype cell_instance $@1 timing_spec_list_opt ')' */ #line 257 "sdf_parse.y" { free((yyvsp[-4].string_val)); if ((yyvsp[-3].string_val)) free((yyvsp[-3].string_val)); } #line 1761 "sdf_parse.c" break; case 37: /* cell: '(' K_CELL error ')' */ #line 261 "sdf_parse.y" { vpi_printf("SDF ERROR: %s:%d: Syntax error in CELL\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 1768 "sdf_parse.c" break; case 38: /* celltype: '(' K_CELLTYPE QSTRING ')' */ #line 267 "sdf_parse.y" { (yyval.string_val) = (yyvsp[-1].string_val); } #line 1774 "sdf_parse.c" break; case 39: /* cell_instance: '(' K_INSTANCE hierarchical_identifier ')' */ #line 272 "sdf_parse.y" { (yyval.string_val) = (yyvsp[-1].string_val); } #line 1780 "sdf_parse.c" break; case 40: /* cell_instance: '(' K_INSTANCE ')' */ #line 274 "sdf_parse.y" { (yyval.string_val) = strdup(""); } #line 1786 "sdf_parse.c" break; case 41: /* cell_instance: '(' K_INSTANCE '*' ')' */ #line 276 "sdf_parse.y" { (yyval.string_val) = 0; } #line 1792 "sdf_parse.c" break; case 42: /* cell_instance: '(' K_INSTANCE error ')' */ #line 278 "sdf_parse.y" { vpi_printf("SDF ERROR: %s:%d: Invalid/malformed INSTANCE argument\n", sdf_parse_path, (yylsp[-2]).first_line); (yyval.string_val) = strdup(""); } #line 1800 "sdf_parse.c" break; case 46: /* timing_spec: '(' K_DELAY error ')' */ #line 291 "sdf_parse.y" { vpi_printf("SDF ERROR: %s:%d: Syntax error in CELL DELAY SPEC\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 1807 "sdf_parse.c" break; case 47: /* timing_spec: '(' K_TIMINGCHECK tchk_def_list ')' */ #line 294 "sdf_parse.y" { vpi_printf("SDF WARNING: %s:%d: TIMINGCHECK not supported.\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 1814 "sdf_parse.c" break; case 48: /* timing_spec: '(' K_TIMINGCHECK error ')' */ #line 297 "sdf_parse.y" { vpi_printf("SDF ERROR: %s:%d: Syntax error in TIMINGCHECK SPEC\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 1821 "sdf_parse.c" break; case 55: /* deltype: '(' error ')' */ #line 312 "sdf_parse.y" { vpi_printf("SDF ERROR: %s:%d: Invalid/malformed delay type\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 1828 "sdf_parse.c" break; case 58: /* del_def: '(' K_IOPATH port_spec port_instance delval_list ')' */ #line 323 "sdf_parse.y" { sdf_iopath_delays((yyvsp[-3].port_with_edge).vpi_edge, (yyvsp[-3].port_with_edge).string_val, (yyvsp[-2].string_val), &(yyvsp[-1].delval_list), (yylsp[-4]).first_line); free((yyvsp[-3].port_with_edge).string_val); free((yyvsp[-2].string_val)); } #line 1837 "sdf_parse.c" break; case 59: /* del_def: '(' K_IOPATH error ')' */ #line 328 "sdf_parse.y" { vpi_printf("SDF ERROR: %s:%d: Invalid/malformed IOPATH\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 1844 "sdf_parse.c" break; case 60: /* del_def: '(' K_COND conditional_port_expr '(' K_IOPATH port_spec port_instance delval_list ')' ')' */ #line 332 "sdf_parse.y" { if (sdf_flag_warning) vpi_printf("SDF WARNING: %s:%d: " "COND not supported.\n", sdf_parse_path, (yylsp[-8]).first_line); free((yyvsp[-4].port_with_edge).string_val); free((yyvsp[-3].string_val)); } #line 1855 "sdf_parse.c" break; case 61: /* del_def: '(' K_COND QSTRING conditional_port_expr '(' K_IOPATH port_spec port_instance delval_list ')' ')' */ #line 340 "sdf_parse.y" { if (sdf_flag_warning) vpi_printf("SDF WARNING: %s:%d: " "COND not supported.\n", sdf_parse_path, (yylsp[-9]).first_line); free((yyvsp[-8].string_val)); free((yyvsp[-4].port_with_edge).string_val); free((yyvsp[-3].string_val)); } #line 1867 "sdf_parse.c" break; case 62: /* del_def: '(' K_COND error ')' */ #line 348 "sdf_parse.y" { vpi_printf("SDF ERROR: %s:%d: Invalid/malformed COND\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 1874 "sdf_parse.c" break; case 63: /* del_def: '(' K_CONDELSE '(' K_IOPATH port_spec port_instance delval_list ')' ')' */ #line 351 "sdf_parse.y" { if (sdf_flag_warning) vpi_printf("SDF WARNING: %s:%d: " "CONDELSE not supported.\n", sdf_parse_path, (yylsp[-7]).first_line); free((yyvsp[-4].port_with_edge).string_val); free((yyvsp[-3].string_val)); } #line 1885 "sdf_parse.c" break; case 64: /* del_def: '(' K_CONDELSE error ')' */ #line 358 "sdf_parse.y" { vpi_printf("SDF ERROR: %s:%d: Invalid/malformed CONDELSE\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 1892 "sdf_parse.c" break; case 65: /* del_def: '(' K_INTERCONNECT port_interconnect port_interconnect delval_list ')' */ #line 362 "sdf_parse.y" { if (sdf_flag_inform) { vpi_printf("SDF INFO: %s:%d: INTERCONNECT with " "port1 = %s index = %d, port2 = %s index = %d\n", sdf_parse_path, (yylsp[-4]).first_line, (yyvsp[-3].interconnect_port).name, (yyvsp[-3].interconnect_port).index, (yyvsp[-2].interconnect_port).name, (yyvsp[-2].interconnect_port).index); } sdf_interconnect_delays((yyvsp[-3].interconnect_port), (yyvsp[-2].interconnect_port), &(yyvsp[-1].delval_list), (yylsp[-4]).first_line); free((yyvsp[-3].interconnect_port).name); free((yyvsp[-2].interconnect_port).name); } #line 1906 "sdf_parse.c" break; case 66: /* del_def: '(' K_INTERCONNECT error ')' */ #line 372 "sdf_parse.y" { vpi_printf("SDF ERROR: %s:%d: Invalid/malformed INTERCONNECT\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 1914 "sdf_parse.c" break; case 77: /* port_tchk: port_instance */ #line 396 "sdf_parse.y" { free((yyvsp[0].string_val)); } #line 1920 "sdf_parse.c" break; case 78: /* port_tchk: cond_edge_start port_instance ')' */ #line 399 "sdf_parse.y" { free((yyvsp[-1].string_val)); } #line 1926 "sdf_parse.c" break; case 79: /* port_tchk: cond_edge_start timing_check_condition port_spec ')' */ #line 402 "sdf_parse.y" { free((yyvsp[-1].port_with_edge).string_val); } #line 1932 "sdf_parse.c" break; case 80: /* port_tchk: cond_edge_start QSTRING timing_check_condition port_spec ')' */ #line 404 "sdf_parse.y" { free((yyvsp[-3].string_val)); free((yyvsp[-1].port_with_edge).string_val); } #line 1940 "sdf_parse.c" break; case 81: /* $@2: %empty */ #line 410 "sdf_parse.y" { start_edge_id(1); } #line 1946 "sdf_parse.c" break; case 82: /* cond_edge_start: '(' $@2 cond_edge_identifier */ #line 410 "sdf_parse.y" { stop_edge_id(); } #line 1952 "sdf_parse.c" break; case 92: /* timing_check_condition: port_interconnect */ #line 427 "sdf_parse.y" { free((yyvsp[0].interconnect_port).name); } #line 1958 "sdf_parse.c" break; case 93: /* timing_check_condition: '~' port_interconnect */ #line 429 "sdf_parse.y" { free((yyvsp[0].interconnect_port).name); } #line 1964 "sdf_parse.c" break; case 94: /* timing_check_condition: '!' port_interconnect */ #line 431 "sdf_parse.y" { free((yyvsp[0].interconnect_port).name); } #line 1970 "sdf_parse.c" break; case 95: /* timing_check_condition: port_interconnect equality_operator scalar_constant */ #line 433 "sdf_parse.y" { free((yyvsp[-2].interconnect_port).name); } #line 1976 "sdf_parse.c" break; case 96: /* conditional_port_expr: port */ #line 439 "sdf_parse.y" { free((yyvsp[0].string_val)); } #line 1982 "sdf_parse.c" break; case 114: /* port_spec: port_instance */ #line 472 "sdf_parse.y" { (yyval.port_with_edge).vpi_edge = vpiNoEdge; (yyval.port_with_edge).string_val = (yyvsp[0].string_val); } #line 1988 "sdf_parse.c" break; case 115: /* port_spec: port_edge */ #line 473 "sdf_parse.y" { (yyval.port_with_edge) = (yyvsp[0].port_with_edge); } #line 1994 "sdf_parse.c" break; case 116: /* port_instance: port */ #line 477 "sdf_parse.y" { (yyval.string_val) = (yyvsp[0].string_val); } #line 2000 "sdf_parse.c" break; case 117: /* port: hierarchical_identifier */ #line 482 "sdf_parse.y" { (yyval.string_val) = (yyvsp[0].string_val); } #line 2006 "sdf_parse.c" break; case 118: /* port_interconnect: hierarchical_identifier */ #line 488 "sdf_parse.y" { struct interconnect_port_s tmp = {(yyvsp[0].string_val), false, 0}; (yyval.interconnect_port) = tmp; } #line 2014 "sdf_parse.c" break; case 119: /* port_interconnect: hierarchical_identifier '[' INTEGER ']' */ #line 492 "sdf_parse.y" { struct interconnect_port_s tmp = {(yyvsp[-3].string_val), true, (yyvsp[-1].int_val)}; (yyval.interconnect_port) = tmp; } #line 2022 "sdf_parse.c" break; case 120: /* $@3: %empty */ #line 498 "sdf_parse.y" {start_edge_id(0);} #line 2028 "sdf_parse.c" break; case 121: /* $@4: %empty */ #line 498 "sdf_parse.y" {stop_edge_id();} #line 2034 "sdf_parse.c" break; case 122: /* port_edge: '(' $@3 edge_identifier $@4 port_instance ')' */ #line 499 "sdf_parse.y" { (yyval.port_with_edge).vpi_edge = (yyvsp[-3].int_val); (yyval.port_with_edge).string_val = (yyvsp[-1].string_val); } #line 2040 "sdf_parse.c" break; case 123: /* edge_identifier: K_POSEDGE */ #line 503 "sdf_parse.y" { (yyval.int_val) = vpiPosedge; } #line 2046 "sdf_parse.c" break; case 124: /* edge_identifier: K_NEGEDGE */ #line 504 "sdf_parse.y" { (yyval.int_val) = vpiNegedge; } #line 2052 "sdf_parse.c" break; case 125: /* edge_identifier: K_01 */ #line 505 "sdf_parse.y" { (yyval.int_val) = vpiEdge01; } #line 2058 "sdf_parse.c" break; case 126: /* edge_identifier: K_10 */ #line 506 "sdf_parse.y" { (yyval.int_val) = vpiEdge10; } #line 2064 "sdf_parse.c" break; case 127: /* edge_identifier: K_0Z */ #line 507 "sdf_parse.y" { (yyval.int_val) = vpiEdge0x; } #line 2070 "sdf_parse.c" break; case 128: /* edge_identifier: K_Z1 */ #line 508 "sdf_parse.y" { (yyval.int_val) = vpiEdgex1; } #line 2076 "sdf_parse.c" break; case 129: /* edge_identifier: K_1Z */ #line 509 "sdf_parse.y" { (yyval.int_val) = vpiEdge1x; } #line 2082 "sdf_parse.c" break; case 130: /* edge_identifier: K_Z0 */ #line 510 "sdf_parse.y" { (yyval.int_val) = vpiEdgex0; } #line 2088 "sdf_parse.c" break; case 131: /* delval_list: delval_list delval */ #line 515 "sdf_parse.y" { int idx; (yyval.delval_list).count = (yyvsp[-1].delval_list).count; for (idx = 0 ; idx < (yyval.delval_list).count ; idx += 1) (yyval.delval_list).val[idx] = (yyvsp[-1].delval_list).val[idx]; // Is this correct? if ((yyval.delval_list).count < 12) { (yyval.delval_list).val[(yyval.delval_list).count] = (yyvsp[0].delay); (yyval.delval_list).count += 1; } } #line 2103 "sdf_parse.c" break; case 132: /* delval_list: delval */ #line 526 "sdf_parse.y" { (yyval.delval_list).count = 1; (yyval.delval_list).val[0] = (yyvsp[0].delay); } #line 2111 "sdf_parse.c" break; case 133: /* delval: rvalue */ #line 533 "sdf_parse.y" { (yyval.delay) = (yyvsp[0].delay); } #line 2117 "sdf_parse.c" break; case 134: /* delval: '(' rvalue rvalue ')' */ #line 535 "sdf_parse.y" { (yyval.delay) = (yyvsp[-2].delay); vpi_printf("SDF WARNING: %s:%d: Pulse rejection limits ignored\n", sdf_parse_path, (yylsp[-1]).first_line); } #line 2126 "sdf_parse.c" break; case 135: /* delval: '(' rvalue rvalue rvalue ')' */ #line 540 "sdf_parse.y" { (yyval.delay) = (yyvsp[-3].delay); vpi_printf("SDF WARNING: %s:%d: Pulse rejection limits ignored\n", sdf_parse_path, (yylsp[-2]).first_line); } #line 2135 "sdf_parse.c" break; case 136: /* rvalue_opt: %empty */ #line 548 "sdf_parse.y" { (yyval.delay).value = 0.0; (yyval.delay).defined = 0; } #line 2143 "sdf_parse.c" break; case 138: /* rvalue: '(' signed_real_number ')' */ #line 556 "sdf_parse.y" { (yyval.delay).defined = 1; (yyval.delay).value = (yyvsp[-1].real_val); } #line 2150 "sdf_parse.c" break; case 139: /* rvalue: '(' rtriple ')' */ #line 559 "sdf_parse.y" { (yyval.delay) = (yyvsp[-1].delay); } #line 2156 "sdf_parse.c" break; case 140: /* rvalue: '(' ')' */ #line 561 "sdf_parse.y" { (yyval.delay).defined = 0; (yyval.delay).value = 0.0; } #line 2163 "sdf_parse.c" break; case 141: /* hierarchical_identifier: IDENTIFIER */ #line 567 "sdf_parse.y" { (yyval.string_val) = (yyvsp[0].string_val); } #line 2169 "sdf_parse.c" break; case 142: /* hierarchical_identifier: hierarchical_identifier HCHAR IDENTIFIER */ #line 569 "sdf_parse.y" { int len = strlen((yyvsp[-2].string_val)) + strlen((yyvsp[0].string_val)) + 2; char*tmp = realloc((yyvsp[-2].string_val), len); strcat(tmp, "."); strcat(tmp, (yyvsp[0].string_val)); free((yyvsp[0].string_val)); (yyval.string_val) = tmp; } #line 2181 "sdf_parse.c" break; case 143: /* rtriple: signed_real_number_opt ':' signed_real_number_opt ':' signed_real_number_opt */ #line 580 "sdf_parse.y" { switch(sdf_min_typ_max) { case _vpiDelaySelMinimum: (yyval.delay) = (yyvsp[-4].delay); break; case _vpiDelaySelTypical: (yyval.delay) = (yyvsp[-2].delay); break; case _vpiDelaySelMaximum: (yyval.delay) = (yyvsp[0].delay); break; } /* At least one of the values must be defined. */ if (! ((yyvsp[-4].delay).defined || (yyvsp[-2].delay).defined || (yyvsp[0].delay).defined)) { vpi_printf("SDF ERROR: %s:%d: rtriple must have at least one " "defined value.\n", sdf_parse_path, (yylsp[-4]).first_line); } } #line 2203 "sdf_parse.c" break; case 144: /* signed_real_number_opt: %empty */ #line 601 "sdf_parse.y" { (yyval.delay).value = 0.0; (yyval.delay).defined = 0; } #line 2211 "sdf_parse.c" break; case 145: /* signed_real_number_opt: signed_real_number */ #line 605 "sdf_parse.y" { (yyval.delay).value = (yyvsp[0].real_val); (yyval.delay).defined = 1; } #line 2219 "sdf_parse.c" break; case 146: /* signed_real_number: REAL_NUMBER */ #line 611 "sdf_parse.y" { (yyval.real_val) = (yyvsp[0].real_val); } #line 2225 "sdf_parse.c" break; case 147: /* signed_real_number: '+' REAL_NUMBER */ #line 612 "sdf_parse.y" { (yyval.real_val) = (yyvsp[0].real_val); } #line 2231 "sdf_parse.c" break; case 148: /* signed_real_number: '-' REAL_NUMBER */ #line 613 "sdf_parse.y" { (yyval.real_val) = -(yyvsp[0].real_val); } #line 2237 "sdf_parse.c" break; case 149: /* signed_real_number: INTEGER */ #line 614 "sdf_parse.y" { (yyval.real_val) = (yyvsp[0].int_val); } #line 2243 "sdf_parse.c" break; case 150: /* signed_real_number: '+' INTEGER */ #line 615 "sdf_parse.y" { (yyval.real_val) = (yyvsp[0].int_val); } #line 2249 "sdf_parse.c" break; case 151: /* signed_real_number: '-' INTEGER */ #line 616 "sdf_parse.y" { (yyval.real_val) = -(yyvsp[0].int_val); } #line 2255 "sdf_parse.c" break; #line 2259 "sdf_parse.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; *++yylsp = yyloc; /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; const int yyi = yypgoto[yylhs] + *yyssp; yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; yyerror (YY_("syntax error")); } yyerror_range[1] = yylloc; if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, &yylloc); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYSYMBOL_YYerror; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yyerror_range[1] = *yylsp; yydestruct ("Error: popping", YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END yyerror_range[2] = yylloc; ++yylsp; YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturnlab; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturnlab; /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; } #line 619 "sdf_parse.y" void yyerror(const char*msg) { vpi_printf("SDF ERROR: %s: Too many errors: %s\n", sdf_parse_path, msg); }