From 8d4bac45ced53cf3635c5aeb02a18e2abf2313fb Mon Sep 17 00:00:00 2001 From: m0_56903617 Date: Thu, 27 May 2021 21:28:10 +0800 Subject: [PATCH] 202105272128 --- CMakeLists.txt | 1 + examples/counter/CMakeLists.txt | 2 +- parser/CMakeLists.txt | 29 + parser/flex.bat | 1 + parser/verilog_ast.h | 3338 ++++++++ parser/verilog_ast_common.h | 256 + parser/verilog_ast_mem.h | 47 + parser/verilog_keyword.c | 145 + parser/verilog_module.c | 273 + parser/verilog_module.h | 29 + parser/verilog_parser.tab.c | 13659 ++++++++++++++++++++++++++++++ parser/verilog_parser.tab.h | 294 + parser/verilog_parser.y | 4455 ++++++++++ parser/verilog_parsetree.c | 9 + parser/verilog_parsetree.h | 55 + parser/verilog_root.c | 115 + parser/verilog_root.h | 22 + parser/verilog_scanner.c | 2846 +++++++ parser/verilog_scanner.l | 446 + parser/verlog.y | 1049 +++ preprocess/CMakeLists.txt | 2 +- testpreprocess/CMakeLists.txt | 4 +- 22 files changed, 27073 insertions(+), 4 deletions(-) create mode 100644 parser/CMakeLists.txt create mode 100644 parser/flex.bat create mode 100644 parser/verilog_ast.h create mode 100644 parser/verilog_ast_common.h create mode 100644 parser/verilog_ast_mem.h create mode 100644 parser/verilog_keyword.c create mode 100644 parser/verilog_module.c create mode 100644 parser/verilog_module.h create mode 100644 parser/verilog_parser.tab.c create mode 100644 parser/verilog_parser.tab.h create mode 100644 parser/verilog_parser.y create mode 100644 parser/verilog_parsetree.c create mode 100644 parser/verilog_parsetree.h create mode 100644 parser/verilog_root.c create mode 100644 parser/verilog_root.h create mode 100644 parser/verilog_scanner.c create mode 100644 parser/verilog_scanner.l create mode 100644 parser/verlog.y diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cd5969..8755dff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ project ("hdl4se") # 包含子项目。 add_subdirectory ("preprocess") +add_subdirectory ("parser") add_subdirectory ("testpreprocess") add_subdirectory ("hdl4secell") add_subdirectory ("hdl4sesim") diff --git a/examples/counter/CMakeLists.txt b/examples/counter/CMakeLists.txt index 988fd70..ba5d527 100644 --- a/examples/counter/CMakeLists.txt +++ b/examples/counter/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required (VERSION 3.8) add_executable (counter "include/counter.h" "src/counter.c" "../../../glfw/deps/glad_gl.c" "src/main.c") -target_link_libraries(counter hdl4sesim preprocess hdl4secell bignumber digitled glfw lcom) +target_link_libraries(counter hdl4sesim hdl4secell bignumber digitled glfw lcom) include_directories("../../../lcom/include") include_directories("../../hdl4sesim/include") diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt new file mode 100644 index 0000000..0ec0b94 --- /dev/null +++ b/parser/CMakeLists.txt @@ -0,0 +1,29 @@ + +cmake_minimum_required (VERSION 3.8) + +add_library (verilog_parser STATIC + "verilog_ast.h" + "verilog_ast_common.h" + "verilog_ast_mem.h" + "verilog_keyword.c" + "verilog_module.c" + "verilog_module.h" + "verilog_parser.tab.c" + "verilog_parser.tab.h" + "verilog_parsetree.c" + "verilog_parsetree.h" + "verilog_root.c" + "verilog_root.h" + "verilog_scanner.c" + ) + +include_directories("../../lcom/include") +include_directories("../hdl4secell/include") +include_directories("../bignumber/include") + +add_custom_command(OUTPUT verilog_scanner.c + COMMAND flex ARGS verilog_scanner.l + ) +add_custom_command(OUTPUT verilog_parser.tab.c verilog_parser.tab.h + COMMAND bison ARGS verilog_parser.y) + diff --git a/parser/flex.bat b/parser/flex.bat new file mode 100644 index 0000000..b1a1a8e --- /dev/null +++ b/parser/flex.bat @@ -0,0 +1 @@ +flex %1 diff --git a/parser/verilog_ast.h b/parser/verilog_ast.h new file mode 100644 index 0000000..8bde55a --- /dev/null +++ b/parser/verilog_ast.h @@ -0,0 +1,3338 @@ +/*! +@file verilog_ast.h +@brief Contains Declarations of datastructures and functions which represent + and operate on the Verilog Abstract Syntax Tree (AST) +*/ + +#include +#include +#include + +#include "verilog_ast_common.h" + +#ifndef VERILOG_AST_H +#define VERILOG_AST_H + +extern int yylineno; + +//! Forward declare. Defines the core node type for the AST. +typedef struct ast_node_t ast_node; + +/*! +@brief Typedef to make it easier to change into a proper structure later. +@note The pointer is already included in the type. +*/ +typedef struct ast_identifier_t * ast_identifier; + +//! Placeholder until this is implemented properly. +typedef struct ast_concatenation_t ast_concatenation; + +//! Expression type over a struct +typedef struct ast_expression_t ast_expression; +//! Expression type over a struct +typedef struct ast_function_call_t ast_function_call; + +//! An item within a module. Duh. +typedef struct ast_module_item_t ast_module_item; + +//! Stores different Operators. +typedef enum ast_operator_e{ + OPERATOR_STAR , //!< + OPERATOR_PLUS , //!< + OPERATOR_MINUS , //!< + OPERATOR_ASL , //!< Arithmetic shift left + OPERATOR_ASR , //!< Arithmetic shift right + OPERATOR_LSL , //!< logical shift left + OPERATOR_LSR , //!< logical shift right + OPERATOR_DIV , //!< divide + OPERATOR_POW , //!< pow + OPERATOR_MOD , //!< mod + OPERATOR_GTE , //!< greater than or equal to + OPERATOR_LTE , //!< + OPERATOR_GT , //!< + OPERATOR_LT , //!< + OPERATOR_L_NEG , //!< + OPERATOR_L_AND , //!< + OPERATOR_L_OR , //!< + OPERATOR_C_EQ , //!< + OPERATOR_L_EQ , //!< + OPERATOR_C_NEQ , //!< + OPERATOR_L_NEQ , //!< + OPERATOR_B_NEG , //!< + OPERATOR_B_AND , //!< + OPERATOR_B_OR , //!< + OPERATOR_B_XOR , //!< + OPERATOR_B_EQU , //!< + OPERATOR_B_NAND , //!< + OPERATOR_B_NOR , //!< + OPERATOR_TERNARY , //!< + OPERATOR_NONE = 0 +} ast_operator; + +typedef char * ast_string ; +//! A set of lvalue and corresponding assigned expressions +typedef struct ast_assignment_t ast_assignment; +//! A single lvalue=expression assignment. +typedef struct ast_single_assignment_t ast_single_assignment; +//! Generate block (of statements) type. +typedef struct ast_generate_block_t ast_generate_block; +typedef struct ast_delay3_t ast_delay3; +typedef struct ast_delay2_t ast_delay2; +typedef struct ast_delay_value_t ast_delay_value ; +typedef struct ast_pull_strength_t ast_drive_strength; +typedef void * ast_macro_use ; +typedef void * ast_minmax_exp ; +//! Number data structure. +typedef struct ast_number_t ast_number ; +typedef struct ast_range_t ast_range ; +typedef struct ast_block_item_declaration_t ast_block_item_declaration; +typedef void * ast_tf_input_declaration; +typedef struct ast_statement_t ast_statement; +typedef struct ast_module_declaration_t ast_module_declaration; + +//! Stores the values of booleans. +typedef enum ast_boolean_e +{ + AST_TRUE=1, + AST_FALSE=0 +} ast_boolean; + +//! Describes a rising or falling edge, or where none is specified. +typedef enum ast_edge_e{ + EDGE_POS, //! Positive edge + EDGE_NEG, //! Negative edge + EDGE_NONE, //! Not edge triggered + EDGE_ANY //! Positive or negative edge. +} ast_edge; + +//! Describes the direction of a port +typedef enum ast_port_direction_e{ + PORT_INPUT, //!< Input port. + PORT_OUTPUT, //!< Output port. + PORT_INOUT, //!< Bi-directional port. + PORT_NONE, //!< Used for when we don't know at declaration time. +} ast_port_direction; + +/*! +@defgroup ast-node-meta Meta Data +@{ +@ingroup ast-construction +@brief Objects used to represent meta data about a particular construct. +*/ + +//! Refers to a source code file line number. +typedef int ast_line; +//! Refers to a source code file name. +typedef char * ast_file; + +/*! +@brief Stores "meta" information and other tagging stuff about nodes. +*/ +typedef struct ast_metadata_t{ + ast_line line; //!< The line number the construct came from. + ast_file file; //!< The file the construct came from. +} ast_metadata; + +/*! @} */ + +//-------------- Numbers --------------------------------------- + +/*! +@defgroup ast-node-numbers Numbers +@{ +@ingroup ast-construction +@brief Objects used to represent individual numbers. +*/ + +//! Base value of a number representation. +typedef enum ast_number_base_e{ + BASE_BINARY, + BASE_OCTAL, + BASE_DECIMAL, + BASE_HEX +} ast_number_base; + +//! How is the number represented? +typedef enum ast_number_representation_e{ + REP_BITS, //!< For numbers specified per digit. + REP_INTEGER, //!< For "Integer" typed numbers" + REP_FLOAT //!< For "real" typed numbers. +} ast_number_representation; + +/*! +@brief Stores the base, value and width (in bits) of a number. +*/ +struct ast_number_t{ + ast_metadata meta; //!< Node metadata. + unsigned int width; //!< Width of the number in bits. + ast_number_base base; //!< Hex, octal, binary, decimal. + ast_number_representation representation; //!< How is it expressed? + union{ + char * as_bits; + float as_float; + int as_int; + }; +}; + +/*! +@brief Creates a new number representation object. +*/ +ast_number * ast_new_number( + ast_number_base base, //!< What is the base of the number. + ast_number_representation representation, //!< How to interepret digits. + char * digits //!< The string token representing the number. +); + +/*! +@brief A utility function for converting an ast number into a string. +@param [in] n - The number to turn into a string. +*/ +char * ast_number_tostring( + ast_number * n +); + + +/*! @} */ + + +//-------------- attributes ------------------------------------ + +/*! +@defgroup ast-node-attributes Attributes +@{ +@ingroup ast-construction +@brief Describes attributes passed to modules, functions and expression +assignments. +*/ + +/*! +@brief Node data describing an attribute. +*/ +typedef struct ast_node_attributes_t ast_node_attributes; +struct ast_node_attributes_t +{ + ast_metadata meta; //!< Node metadata. + ast_identifier attr_name; //!< Name of the attribute + ast_expression * attr_value; //!< Value of the attribute. + + ast_node_attributes * next; //!< Next one in a linked list. +}; + + +/*! +@brief Creates and returns as a pointer a new attribute descriptor. +@param [in] name - The name of the parameter/attribute. +@param [in] value - The value the attribute should take. +*/ +ast_node_attributes * ast_new_attributes( + ast_identifier name, + ast_expression * value +); + +/*! +@brief Creates and returns a new attribute node with the specified value + and name. +@param [inout] parent - Pointer to the node which represents the list of + attribute name,value pairs. +@param [in] toadd - The new attribute to add. +*/ +void ast_append_attribute(ast_node_attributes * parent, + ast_node_attributes * toadd); + +/*! @} */ +// -------------------------------- Concatenations --------------------------- + +/*! +@defgroup ast-node-concatenations Concatenations +@{ +@ingroup ast-construction +@brief Concatenations of expressions, l-values, variables, nets and +module paths. +*/ + +//! Describes the type of concatenation being dealt with. +typedef enum ast_concatenation_type_e +{ + CONCATENATION_EXPRESSION, //!< A set of expressions concatenated + CONCATENATION_CONSTANT_EXPRESSION, //!< Constant expressions + CONCATENATION_NET, //!< Net name concatenation (lvalue) + CONCATENATION_VARIABLE, //!< Variable name concatenation (lvalue) + CONCATENATION_MODULE_PATH //!< Module path concatenation. +} ast_concatenation_type; + +//! Fully describes a concatenation in terms of type and data. +struct ast_concatenation_t{ + ast_metadata meta; //!< Node metadata. + ast_concatenation_type type; //!< The type of concatenation + ast_expression * repeat;//!< The number of repetitions. Normally 1. + ast_list * items; //!< sequence of items. +}; + +/*! +@brief Creates a new AST concatenation element with the supplied type and +initial starting value. +@param [in] repeat - Used for replications or multiple_concatenation +@param [in] type - What sort of values are being concatenated? +@param [in] first_value - The first element of the concatentation. +@details Depending on the type supplied, the type of first_value +should be: + - CONCATENATION_EXPRESSION : ast_expression + - CONCATENATION_CONSTANT_EXPRESSION : ast_expression + - CONCATENATION_NET : ast_identifier + - CONCATENATION_VARIABLE : ast_identifer + - CONCATENATION_MODULE_PATH : ast_identifier +*/ +ast_concatenation * ast_new_concatenation(ast_concatenation_type type, + ast_expression * repeat, + void * first_value); + +/*! +@brief Creates and returns a new empty concatenation of the specified type. +@param [in] type - What sort of values are being concatenated? +*/ +ast_concatenation * ast_new_empty_concatenation(ast_concatenation_type type); + +/*! +@brief Adds a new data element on to the *front* of a concatenation. +@param [inout] element - THe concantenation being extended, +@param [in] repeat - Is the concatenation repeated? +@param [in] data - The item to add to the concatenation sequence. +*/ +void ast_extend_concatenation(ast_concatenation * element, + ast_expression * repeat, + void * data); + + +/*! @} */ +// -------------------------------- L Value ------------------------ + +/*! +@defgroup ast-node-lvalues L-Values +@{ +@ingroup ast-construction +@brief Represents the class of values which represent the left hand term +of an assignment. +*/ + +/*! +@brief Identifies the kind of LValue the @ref ast_lvalue structure holds. +*/ +typedef enum ast_lvalue_type_e +{ + SPECPARAM_ID, + PARAM_ID, + NET_IDENTIFIER, //!< Identifies a wire/reg + VAR_IDENTIFIER, //!< Identifies a variable + GENVAR_IDENTIFIER, //!< Generateor variable. + NET_CONCATENATION, //!< Concatenation of net identifiers + VAR_CONCATENATION //!< Concatenation of variable identifiers. +} ast_lvalue_type; + +/*! +@brief Storage for the data describing an assignment L Value. +*/ +typedef union ast_lvalue_data_u +{ + ast_identifier identifier; //!< Identifier value. + ast_concatenation * concatenation; //!< Concatenation list. +} ast_lvalue_data ; + +/*! +@brief Stores and describes an expression l value. +*/ +typedef struct ast_lvalue_t +{ + ast_metadata meta; //!< Node metadata. + ast_lvalue_data data; //!< The identifier or concattenation being assigned. + ast_lvalue_type type; //!< The type of the L Value assignment. +} ast_lvalue; + +/*! +@brief Creates and returns a new @ref ast_lvalue pointer, with the data type + being a single identifier of either @ref NET_IDENTIFIER or + @ref VAR_IDENTIFIER. +*/ +ast_lvalue * ast_new_lvalue_id(ast_lvalue_type type, ast_identifier id); + +/*! +@brief Creates and returns a new @ref ast_lvalue pointer, with the data type + being a concatenation holder of either @ref NET_CONCATENATION or + @ref VAR_CONCATENATION. +*/ +ast_lvalue * ast_new_lvalue_concat(ast_lvalue_type type, ast_concatenation*id); + +/*! @} */ +// -------------------------------- Function Calls --------------------------- + +/*! +@defgroup ast-node-function-calls Function Calls +@{ +@ingroup ast-construction +@brief Represents a call to a system or user function. Note this is +destinct from a function declaration. +*/ +/*! + +@brief describes a single call to a function, constant function, or +system fucntion. +*/ +struct ast_function_call_t { + ast_metadata meta; //!< Node metadata. + ast_boolean constant; //!< Constant function call? + ast_boolean system; //!< System function call? + ast_identifier function; //!< Function identifier + ast_list * arguments; //!< Linked list of arguments. + ast_node_attributes * attributes; +}; + + +/*! +@brief Creates and returns a new node representing a function call. +@param [in] arguments - list of elements of type ast_expression +representing the various parameters to the function. If the function has +no arguments, then it is an empty list, not NULL. +@param [in] id - Function identifier / name +@param [in] constant - Does this function return a constant value? +@param [in] system - Is this a system function? +@param [in] attr - Attributes for vendor specific tool features. +*/ +ast_function_call * ast_new_function_call(ast_identifier id, + ast_boolean constant, + ast_boolean system, + ast_node_attributes * attr, + ast_list * arguments); + + +/*! @} */ +// -------------------------------- Primaries ---------------------- + +/*! +@defgroup ast-node-expression-primaries Expression Primaries +@{ +@ingroup ast-node-expressions +@brief Expresses primary terms of expressions. These can be sub-expressions, +numbers, identifiers etc. +*/ + +/*! +@brief Describes the kind of expression primary being represented, and hence +the sort of expression we are dealing with. +*/ +typedef enum ast_primary_type_e +{ + CONSTANT_PRIMARY, + PRIMARY, + MODULE_PATH_PRIMARY +} ast_primary_type; + + +//! The kind of production the expression primary holds. +typedef enum ast_primary_value_type_e +{ + PRIMARY_NUMBER, + PRIMARY_IDENTIFIER, + PRIMARY_CONCATENATION, + PRIMARY_FUNCTION_CALL, + PRIMARY_MINMAX_EXP, + PRIMARY_MACRO_USAGE +} ast_primary_value_type; + +//! The expression primary can produce several different sub-expressions: +typedef union ast_primary_value_e +{ + ast_number * number; //!< A single constant number + ast_identifier identifier; //!< Net or variable identifier. + ast_concatenation * concatenation; //!< Concatenation of expressions. + ast_function_call * function_call; //!< Call to a function. + ast_expression * minmax; + ast_macro_use macro; //!< A MACRO expansion. + char * string; +} ast_primary_value; + +/*! +@brief Stores the type and value of an AST primary expression. +@details The following AST_PRIMARY_VALUE_TYPE values map to the following +ast_primary_value_members: + + - PRIMARY_NUMBER : use value.number + - PRIMARY_IDENTIFIER : use value.identifier + - PRIMARY_CONCATENATION : use value.concatenation + - PRIMARY_FUNCTION_CALL : use value.function_call + - PRIMARY_MINMAX_EXP : use value.minmax + - PRIMARY_MACRO_USAGE : use value.macro + +*/ +typedef struct ast_primary_t +{ + ast_metadata meta; //!< Node metadata. + ast_primary_type primary_type; //!< @see ast_primary_type + ast_primary_value_type value_type; //!< @see ast_primary_value_type + ast_primary_value value; //!< @see ast_primary_value +} ast_primary; + + +/*! +@brief A utility function for converting an ast expression primaries back into +a string representation. +@param [in] p - The expression primary to turn into a string. +*/ +char * ast_primary_tostring( + ast_primary * p +); + +/*! +@brief Creates a new ast primary which is part of a constant expression tree + with the supplied type and value. +@param [in] type - Self explanatory +*/ +ast_primary * ast_new_constant_primary(ast_primary_value_type type); + +/*! +@brief Creates a new AST primary wrapper around a function call. +@param [in] call - The AST node representing a function call. +*/ +ast_primary * ast_new_primary_function_call(ast_function_call * call); + +/*! +@brief Creates a new ast primary which is part of an expression tree + with the supplied type and value. +@param [in] type - Self explanatory +*/ +ast_primary * ast_new_primary(ast_primary_value_type type); + +/*! +@brief Creates a new ast primary which is part of a constant expression tree + with the supplied type and value. +@param [in] type - Self explanatory +*/ +ast_primary * ast_new_module_path_primary(ast_primary_value_type type); + +/*! @} */ +// -------------------------------- Expressions -------------------- + +/*! +@defgroup ast-node-expressions Expressions +@{ +@ingroup ast-construction +@brief Super-group for data-structures representing the kinds of +expressions that Verilog has. +*/ + +//! Describes the kind of expression a node contains. +typedef enum ast_expression_type_e +{ + PRIMARY_EXPRESSION, //!< A straight value + UNARY_EXPRESSION, //!< A unary op: "~bits" for example. + BINARY_EXPRESSION, //!< The "normal" expression + RANGE_EXPRESSION_UP_DOWN, //!< Bit range expression + RANGE_EXPRESSION_INDEX, //!< Bit index expression + MINTYPMAX_EXPRESSION, //!< Minimum typical maximum + CONDITIONAL_EXPRESSION, //!< Conditional expression + MODULE_PATH_PRIMARY_EXPRESSION, + MODULE_PATH_BINARY_EXPRESSION, + MODULE_PATH_UNARY_EXPRESSION, + MODULE_PATH_CONDITIONAL_EXPRESSION, + MODULE_PATH_MINTYPMAX_EXPRESSION, + STRING_EXPRESSION //!< Just a normal string. No operations. +} ast_expression_type; + + +//! Returns the string representation of an operator; +char * ast_operator_tostring(ast_operator op); + +/*! +@brief Storage type for an entire expression / subexpression tree. +@details Each expression node has left and right children (unless it is a +leaf) and an operation. The idea being that if the children are primaries, +then we extract their value, perform the operation described in this node, +and return up the expression tree, or recurse into a child expression as +appropriate. +@todo This part of the tree (and sub parts) is currently quite messy. +When I come to actually using this for something practicle, I may end up +re-writing it. That will be post the first "release" though. +*/ +struct ast_expression_t +{ + ast_metadata meta; //!< Node metadata. + ast_expression_type type; //!< What sort of expression is this? + ast_node_attributes * attributes; //!< Additional expression attributes. + ast_expression * left; //!< LHS of operation + ast_expression * right; //!< RHS of operation + ast_expression * aux; //!< Optional auxiliary/predicate. + ast_primary * primary; //!< Valid IFF type == PRIMARY_EXPRESSION. + ast_operator operation; //!< What are we doing? + ast_boolean constant; //!< True iff constant_expression. + ast_string string; //!< The string constant. Valid IFF type == STRING_EXPRESSION. +}; + +/*! +@brief A utility function for converting an ast expression tree back into +a string representation. +@param [in] exp - The expression to turn into a string. +*/ +char * ast_expression_tostring( + ast_expression * exp +); + +/*! +@brief Creates and returns a new expression primary. +@details This is simply an expression instance wrapped around a +primary instance for the purposes of mirroring the expression tree gramamr. +Whether or not the expression is constant is denoted by the type member +of the passed primary. +@param [in] p - The primary to insert into the expression. +*/ +ast_expression * ast_new_expression_primary(ast_primary * p); + +/*! +@brief Creates a new binary infix expression with the supplied operands. +@param [in] left - LHS of the infix operation. +@param [in] right - RHS of the infix operation. +@param [in] operation - What do we do?! +@param [in] attr - Attributes applied to the expression. +@param [in] constant - Is this a constant expression we can simplify? +*/ +ast_expression * ast_new_binary_expression(ast_expression * left, + ast_expression * right, + ast_operator operation, + ast_node_attributes * attr, + ast_boolean constant); + +/*! +@brief Creates a new unary expression with the supplied operation. +@param [in] operand - The thing to operate on. +@param [in] operation - What do we do?! +@param [in] attr - Expression attributes. +@param [in] constant - Is this a constant expression we can simplify? +*/ +ast_expression * ast_new_unary_expression(ast_primary * operand, + ast_operator operation, + ast_node_attributes * attr, + ast_boolean constant); + +/*! +@brief Creates a new range expression with the supplied operands. +@param [in] left - The Upper range of the expression +@param [in] right - The lower range of the expression. +@details +For example, when specifying a simple bus in verilog: + +@code +wire [31:0] bus_data; +@endcode + +Then the `31` would go into left, and the `0` into the right. +*/ +ast_expression * ast_new_range_expression(ast_expression * left, + ast_expression * right); + +/*! +@brief Creates a new range index expression with the supplied operands. +@param [in] left - The single expression index into an array. +@details Used to represent code like... + +@code +wire [32:0] adder_result; +assign overflow = adder_result[32]; +@endcode + +Here, accessing the 32nd bit of `adder_result` is an index expression. +*/ +ast_expression * ast_new_index_expression(ast_expression * left); + +/*! +@brief Creates a new string expression. +@param [in] string - The string. Duh. +*/ +ast_expression * ast_new_string_expression(ast_string string); + + +/*! +@brief Creates a new conditional expression node. +@param [in] condition - Decides which result expression is presented. +@param [in] if_true - executed if condition == true (!0) +@param [in] if_false - executed if condition == false (0). +@param [in] attr - Attributes +@note The condition is stored in the aux member, if_true in left, and if_false +on the right. +@details Can be used to represent ternary operations: + +@code +assign stall = mem_error || mem_stall ? 1'b0 : global_stall; +@endcode + +*/ +ast_expression * ast_new_conditional_expression(ast_expression * condition, + ast_expression * if_true, + ast_expression * if_false, + ast_node_attributes * attr); + +/*! +@brief Creates a new (min,typical,maximum) expression. +@details If the mintypmax expression only specifies a typical value, +then the min and max arguments should be NULL, and only typ set. +@param [in] min - Minimum value in the distribution. +@param [in] typ - Typical / average. +@param [in] max - Maximum value in the distribution. +*/ +ast_expression * ast_new_mintypmax_expression(ast_expression * min, + ast_expression * typ, + ast_expression * max); + +/*! @} */ +// -------------------------------- Specify Blocks --------------------------- + +/*! +@defgroup ast-node-path-declaration Path Declarations +@{ +@ingroup ast-construction +@brief Describes construction of path declarations and delay specifiers. +*/ + +//! Describes the type of path being declared. +typedef enum ast_path_declaration_type_e{ + SIMPLE_PARALLEL_PATH, + SIMPLE_FULL_PATH, + EDGE_SENSITIVE_PARALLEL_PATH, + EDGE_SENSITIVE_FULL_PATH, + STATE_DEPENDENT_PARALLEL_PATH, + STATE_DEPENDENT_FULL_PATH, + STATE_DEPENDENT_EDGE_PARALLEL_PATH, + STATE_DEPENDENT_EDGE_FULL_PATH, +} ast_path_declaration_type; + + +//! Describes the declaration of a path. +typedef struct ast_simple_parallel_path_declaration_t{ + ast_metadata meta; //!< Node metadata. + ast_identifier input_terminal; + ast_operator polarity; + ast_identifier output_terminal; + ast_list * delay_value; +} ast_simple_parallel_path_declaration; + + +//! Describes the declaration of a path. +typedef struct ast_simple_full_path_declaration_t{ + ast_metadata meta; //!< Node metadata. + ast_list * input_terminals; + ast_operator polarity; + ast_list * output_terminals; + ast_list * delay_value; +} ast_simple_full_path_declaration; + + +//! Describes a single edge sensitive path declaration +typedef struct ast_edge_sensitive_parallel_path_declaration_t { + ast_metadata meta; //!< Node metadata. + ast_edge edge; //!< edge_identifier + ast_identifier input_terminal; //!< specify_input_terminal_descriptor + ast_operator polarity; //!< polarity_operator + ast_identifier output_terminal; //!< specify_output_terminal_descriptor + ast_expression * data_source; //!< data_source_expression + ast_list * delay_value; //!< path_delay_value +} ast_edge_sensitive_parallel_path_declaration; + +//! Describes a parallel edge sensitive path declaration +typedef struct ast_edge_sensitive_full_path_declaration_t { + ast_metadata meta; //!< Node metadata. + ast_edge edge; //!< edge_identifier + ast_list * input_terminal; //!< list_of_path_inputs + ast_operator polarity; //!< polarity_operator + ast_list * output_terminal; //!< list_of_path_outputs + ast_expression * data_source; //!< data_source_expression + ast_list * delay_value; //!< path_delay_value +} ast_edge_sensitive_full_path_declaration; + +//! Struct which holds the type and data of a path declaration. +typedef struct ast_path_declaration_t{ + ast_metadata meta; //!< Node metadata. + ast_path_declaration_type type; + ast_expression * state_expression; //!< Used iff type == state_dependent_* + union { + ast_simple_parallel_path_declaration * parallel; + ast_simple_full_path_declaration * full; + ast_edge_sensitive_parallel_path_declaration * es_parallel; + ast_edge_sensitive_full_path_declaration * es_full; + }; +} ast_path_declaration; + +/*! +@brief Creates and returns a new path declaration type. Expects that the data +be filled in manually; +*/ +ast_path_declaration * ast_new_path_declaration(ast_path_declaration_type type); + +/*! +@brief Creates and returns a pointer to a new simple parallel path declaration. +*/ +ast_simple_parallel_path_declaration * ast_new_simple_parallel_path_declaration +( + ast_identifier input_terminal, + ast_operator polarity, + ast_identifier output_terminal, + ast_list * delay_value +); + + +/*! +@brief Creates and returns a pointer to a new simple full path declaration. +*/ +ast_simple_full_path_declaration * ast_new_simple_full_path_declaration +( + ast_list * input_terminals, + ast_operator polarity, + ast_list * output_terminals, + ast_list * delay_value +); + +/*! +@brief Describes a single edge sensitive path declaration +*/ +ast_edge_sensitive_parallel_path_declaration * + ast_new_edge_sensitive_parallel_path_declaration( + ast_edge edge, //!< edge_identifier + ast_identifier input_terminal, //!< specify_input_terminal_descriptor + ast_operator polarity, //!< polarity_operator + ast_identifier output_terminal, //!< specify_output_terminal_descriptor + ast_expression * data_source, //!< data_source_expression + ast_list * delay_value //!< path_delay_value +); + +/*! +@brief Describes a parallel edge sensitive path declaration +*/ +ast_edge_sensitive_full_path_declaration * + ast_new_edge_sensitive_full_path_declaration( + ast_edge edge, //!< edge_identifier + ast_list * input_terminal, //!< list_of_path_inputs + ast_operator polarity, //!< polarity_operator + ast_list * output_terminal, //!< list_of_path_outputs + ast_expression * data_source, //!< data_source_expression + ast_list * delay_value //!< path_delay_value +); + + +/*! @} */ + +// -------------------------------- Task Enable Statements ------------------- + +/*! +@defgroup ast-node-task-enable-statements Task Enable Statements +@{ +@ingroup ast-node-procedural +@brief Describes task enable statements. +*/ + +//! Fully describes a task enable statement. +typedef struct ast_task_enable_statement_t{ + ast_metadata meta; //!< Node metadata. + ast_list * expressions; //!< Arguments to the task + ast_identifier identifier; //!< Task identifier. + ast_boolean is_system; //!< Is this a system task? +} ast_task_enable_statement; + +/*! +@brief creates and returns a pointer to a new task-enable statement. +*/ +ast_task_enable_statement * ast_new_task_enable_statement( + ast_list * expressions, + ast_identifier identifier, + ast_boolean is_system +); + +/*! @} */ + +// -------------------------------- Loop Statements -------------------------- + +/*! +@defgroup ast-node-loop-statements Loop Statements +@{ +@ingroup ast-node-procedural +@brief Describes for and while loop representation. +*/ + +//! Describes the different syntactic methods of looping. +typedef enum ast_loop_type_e{ + LOOP_FOREVER, + LOOP_REPEAT, + LOOP_WHILE, + LOOP_FOR, + LOOP_GENERATE +} ast_loop_type; + +//! Fully describes a single loop statement. +typedef struct ast_loop_statement_t{ + ast_metadata meta; //!< Node metadata. + ast_loop_type type; //!< The type of loop + union{ + ast_statement * inner_statement; //!< Loop body. + ast_list * generate_items; //!< IFF type == LOOP_GENERATE; + }; + ast_expression * condition; //!< Condition on which the loop runs. + ast_single_assignment * initial; //!< Initial condition for for loops. + ast_single_assignment * modify; //!< Modification assignment for for loop. +} ast_loop_statement; + + +/*! +@brief Creates and returns a new forever loop statement. +@param inner_statement - Pointer to the inner body of statements which +make upt the loop body. +*/ +ast_loop_statement * ast_new_forever_loop_statement( + ast_statement * inner_statement +); + +/*! +@brief Creates and returns a new for loop statement. +@param inner_statements - Pointer to the inner body of statements which +make up the loop body. +@param initial_condition - Assignement which sets up the initial condition +of the iterator. +@param modify_assignment - How the iterator variable changes with each +loop iteration. +@param continue_condition - Expression which governs whether the loop should +continue or break. +*/ +ast_loop_statement * ast_new_for_loop_statement( + ast_statement * inner_statements, + ast_single_assignment * initial_condition, + ast_single_assignment * modify_assignment, + ast_expression * continue_condition +); + +/*! +@brief Creates and returns a new generate loop statement. +@param inner_statements - Pointer to the inner body of statements which +make up the loop body. +@param initial_condition - Assignement which sets up the initial condition +of the iterator. +@param modify_assignment - How the iterator variable changes with each +loop iteration. +@param continue_condition - Expression which governs whether the loop should +continue or break. +*/ +ast_loop_statement * ast_new_generate_loop_statement( + ast_list * inner_statements, + ast_single_assignment * initial_condition, + ast_single_assignment * modify_assignment, + ast_expression * continue_condition +); + +/*! +@brief Creates and returns a while loop statement. +@param inner_statement - Pointer to the inner body of statements which +make upt the loop body. +@param continue_condition - Expression which governs whether the loop should +continue or break. +*/ +ast_loop_statement * ast_new_while_loop_statement( + ast_statement * inner_statement, + ast_expression * continue_condition +); + +/*! +@brief Creates and returns a repeat loop statement. +@param inner_statement - Pointer to the inner body of statements which +make upt the loop body. +@param continue_condition - Expression which governs whether the loop should +continue or break. +*/ +ast_loop_statement * ast_new_repeat_loop_statement( + ast_statement * inner_statement, + ast_expression * continue_condition +); + + +/*! @} */ + +// -------------------------------- Case Statements -------------------------- + +/*! +@defgroup ast-node-case-statements Case Statements +@{ +@ingroup ast-node-procedural +@brief +*/ + +//! Records the three different types of case statement Verilog has. +typedef enum ast_case_statement_type_e{ + CASE, + CASEX, + CASEZ +} ast_case_statement_type; + +//! Describes a single exeuctable item in a case statement. +typedef struct ast_case_item_t{ + ast_metadata meta; //!< Node metadata. + ast_list * conditions; //!< A list of condtions, one must be met. + ast_statement * body; //!< What to execute if the condition is met. + ast_boolean is_default; //!< This is the default item. +} ast_case_item; + +//! Describes the top level of a case statement in terms of its items. +typedef struct ast_case_statement_t{ + ast_metadata meta; //!< Node metadata. + ast_expression * expression; //!< The thing to be evaluated. + ast_list * cases; //!< Statements, conditionally run. + ast_statement * default_item; //!< Default IFF no item matches. + ast_case_statement_type type; //!< CASE, CASEX or CASEZ. + ast_boolean is_function; //!< Is this a function_case_statement? +} ast_case_statement; + +/*! +@brief Create and return a new item in a cast statement. +@param conditions - The conditions on which the item is executed. +@param body - Executes when any of the conditions are met. +*/ +ast_case_item * ast_new_case_item(ast_list * conditions, + ast_statement * body); + + +/*! +@brief Creates and returns a new case statement. +@param expression - The expression evaluated to select a case. +@param cases - list of possible cases. +*/ +ast_case_statement * ast_new_case_statement(ast_expression * expression, + ast_list * cases, + ast_case_statement_type type); + + +/*! @} */ + +// -------------------------------- IF Else Statements ----------------------- + +/*! +@defgroup ast-node-if-else If Else Statements +@{ +@ingroup ast-node-procedural +@brief +*/ + +//! Describes a single if-then-do statement. +typedef struct ast_conditional_statement_t { + ast_metadata meta; //!< Node metadata. + ast_statement * statement; //!< What should be executed. + ast_expression * condition; //!< Execute iff true. +} ast_conditional_statement; + +//! Describes a complete set of if-elseif-else statements +typedef struct ast_if_else_t{ + ast_metadata meta; //!< Node metadata. + ast_list * conditional_statements; //!< Ordered list of if-elseifs + ast_statement * else_condition; //!< Execute iff no conditonals are met. +} ast_if_else; + + +/*! +@brief Creates and returns a new conditional statement. +@param statement - what to run if the condition holds true. +@param condtion - the condition on which statement is run. +*/ +ast_conditional_statement * ast_new_conditional_statement( + ast_statement * statement, + ast_expression * condition +); + +/*! +@brief Creates a new if-then-else-then statement. +@param if_condition - the conditional statement. +@param else_condition - What to do if no conditional statements are executed. +This can be NULL. +@details This node also supports "if then elseif then else then" statements, +and uses the ast_extend_if_else function to append a new +ast_conditional_statement to the end of a list of if-else conditions. +Priority of exectuion is given to items added first. +*/ +ast_if_else * ast_new_if_else( + ast_conditional_statement * if_condition, + ast_statement * else_condition +); + + +/*! +@brief Adds an additional conditional (ha..) to an existing if-else +statement. +@param conditional_statements - the existing if-else tree. +@param new_statement - The new statement to add at the end of the existing +if-then conditions, but before any else_condtion. +*/ +void ast_extend_if_else( + ast_if_else * conditional_statements, + ast_list * new_statement +); + + +/*! @} */ + +// -------------------------------- Timing Control Statements ---------------- + +/*! +@defgroup ast-node-timing-control Timing Control Statements +@{ +@ingroup ast-construction +@brief +*/ + +//! Describes a single wait statement. +typedef struct ast_wait_statement_t{ + ast_metadata meta; //!< Node metadata. + ast_expression * expression; //!< How long to wait for. + ast_statement * statement; //!< What to execute after waiting. +} ast_wait_statement; + +typedef enum ast_event_expression_type_e{ + EVENT_EXPRESSION, //!< Goes to a single expression + EVENT_POSEDGE, //!< on posedge + EVENT_NEGEDGE, //!< on negedge + EVENT_SEQUENCE //!< Covers event_expression COMMA event_expression +} ast_event_expression_type; + +//! Describes a single event expression +typedef struct ast_event_expression_t ast_event_expression; +struct ast_event_expression_t { + ast_event_expression_type type; + union{ + ast_expression * expression; //!< Single event expressions. + ast_list * sequence; //!< Used for CSV lists of events + }; +}; + +//! Whether an event control struct contains a list of triggers, no triggers +// or triggers on anything. +typedef enum ast_event_control_type_e{ + EVENT_CTRL_NONE, + EVENT_CTRL_ANY, + EVENT_CTRL_TRIGGERS + +} ast_event_control_type; + +//! Describes the type of event triggers. +typedef struct ast_event_control_t{ + ast_metadata meta; //!< Node metadata. + ast_event_control_type type; + ast_event_expression * expression; +} ast_event_control; + +//! What sort of procedural timing control statement is this? +typedef enum ast_timing_control_statement_type_e{ + TIMING_CTRL_DELAY_CONTROL, + TIMING_CTRL_EVENT_CONTROL, + TIMING_CTRL_EVENT_CONTROL_REPEAT +} ast_timing_control_statement_type; + +//! Denotes whether a delay control expression is a single value or a range +typedef enum ast_delay_ctrl_type_e{ + DELAY_CTRL_VALUE, + DELAY_CTRL_MINTYPMAX +} ast_delay_ctrl_type; + +//! Describes a single delay control statement +typedef struct ast_delay_ctrl_t{ + ast_metadata meta; //!< Node metadata. + ast_delay_ctrl_type type; + union{ + ast_delay_value * value; + ast_expression * mintypmax; + }; +} ast_delay_ctrl; + +//! Describes a single procedural timing control statement. +typedef struct ast_timing_control_statement_t{ + ast_metadata meta; //!< Node metadata. + ast_timing_control_statement_type type; + union{ + ast_delay_ctrl * delay; + ast_event_control * event_ctrl; + }; + ast_expression * repeat; //!< NULL unless part of repeat statement. + ast_statement * statement; //!< What to execute after the control. +} ast_timing_control_statement; + +/*! +@brief Creates and returns a new wait statement. +*/ +ast_wait_statement * ast_new_wait_statement( + ast_expression * wait_for, + ast_statement * statement +); + +/*! +@brief Creates a new event expression node +@param trigger_edge - the edge on which the trigger is activated. +@param expression - the expression to monitor the waveforms of. +*/ +ast_event_expression * ast_new_event_expression( + ast_edge trigger_edge, + ast_expression * expression +); + +/*! +@brief Creates a new event expression node, which is itself a sequence of +sub-expressions. +*/ +ast_event_expression * ast_new_event_expression_sequence( + ast_event_expression * left, + ast_event_expression * right +); + +/*! +@brief Creates and returns a new event control specifier. +*/ +ast_event_control * ast_new_event_control( + ast_event_control_type type, + ast_event_expression * expression +); + +/*! +@brief creates and returns a new delay control statement. +*/ +ast_delay_ctrl * ast_new_delay_ctrl_value(ast_delay_value * value); + +/*! +@brief creates and returns a new delay control statement. +*/ +ast_delay_ctrl * ast_new_delay_ctrl_mintypmax( + ast_expression * mintypmax +); + +/*! +@brief Creates and returns a new timing control statement node. +*/ +ast_timing_control_statement * ast_new_timing_control_statement_delay( + ast_timing_control_statement_type type, + ast_statement * statement, + ast_delay_ctrl * delay_ctrl +); + + +/*! +@brief Creates and returns a new timing control statement node. +*/ +ast_timing_control_statement * ast_new_timing_control_statement_event( + ast_timing_control_statement_type type, + ast_expression * repeat, + ast_statement * statement, + ast_event_control * event_ctrl +); + +/*! @} */ + +// -------------------------------- Fork Join Sequential --------------------- + +/*! +@defgroup ast-node-fork-join Fork Join and Sequential Blocks +@{ +@ingroup ast-node-module-items +@brief Fork join and sequential stamement blocks. +*/ + +//! Contains the identifier from a disable statement. +typedef struct ast_disable_statement_t{ + ast_metadata meta; //!< Node metadata. + ast_identifier id; +} ast_disable_statement; + +//! Creates and returns a pointer to a new disable statement. +ast_disable_statement * ast_new_disable_statement(ast_identifier id); + + +//! Describes the type of a block of statements. +typedef enum ast_block_type_e{ + BLOCK_SEQUENTIAL, + BLOCK_SEQUENTIAL_INITIAL, + BLOCK_SEQUENTIAL_ALWAYS, + BLOCK_FUNCTION_SEQUENTIAL, + BLOCK_PARALLEL, +} ast_block_type; + +/*! +@brief Fully describes a single block of statements. +@details this is used to represent begin...end constructs, always, initial +blocks, and collections of statements in the body of a function or task. +*/ +typedef struct ast_statement_block_t{ + ast_metadata meta; //!< Node metadata. + ast_block_type type; + ast_identifier block_identifier; + ast_list * declarations; + ast_list * statements; + ast_timing_control_statement * trigger; //1 range selector + ID_HAS_INDEX, //!< Has an index selector + ID_HAS_NONE //!< Has neither a range or index selector. +} ast_id_range_or_index; + +/*! +@brief Structure containing all information on an identifier. +*/ +struct ast_identifier_t{ + ast_metadata meta; //!< Node metadata. + ast_identifier_type type; //!< What construct does it identify? + char * identifier; //!< The identifier value. + unsigned int from_line; //!< The line number of the file. + ast_boolean is_system; //!< Is this a system identifier? + ast_identifier next; //!< Represents a hierarchical id. + ast_id_range_or_index range_or_idx; //!< Is it indexed or ranged? + union{ + ast_list * ranges; //!< For multi-dimensional arrays. + ast_range * range; //!< Iff range_or_idx == ID_HAS_RANGE + ast_expression * index; //!< Iff range_or_idx == ID_HAS_INDEX + }; +}; + +/*! +@brief Simply returns the fully qualified representation of an identifier as +a string. +@details Where the identifier is "simple" or a system id, then the identifier +will just be returned as a character array. Where it is a hierarchical +idenifier, then a dot separated string of all identifiers in the hierarchy +will be returned. +@param [in] id - The identifier object to return a string representation of. +@returns A copy of the identifiers full name, as a null terminated character +array. +*/ +char * ast_identifier_tostring(ast_identifier id); + +/*! +@brief Acts like strcmp but works on ast identifiers. +*/ +int ast_identifier_cmp( + ast_identifier a, + ast_identifier b +); + +/*! +@brief Creates and returns a new node representing an identifier. +@details By default, the returned identifier has the ID_UNKNOWN type, +and this is set later when the parser winds back up and knows which rules +to follow. +Also, the is_system member is set to false. If you want a new system +idenifier instance, use the @ref ast_new_system_identifier function. +*/ +ast_identifier ast_new_identifier( + char * identifier, //!< String text of the identifier. + unsigned int from_line //!< THe line the idenifier came from. +); + + +/*! +@brief Creates and returns a new node representing an identifier. +@details By default, the returned identifier has the ID_SYSTEM_* type, +*/ +ast_identifier ast_new_system_identifier( + char * identifier, //!< String text of the identifier. + unsigned int from_line //!< THe line the idenifier came from. +); + +/*! +@brief Used to construct linked lists of hierarchical identifiers. +@details The child node is linked to the next field of the parent, +and the parent field returned. +@param [in] child - The child to add to the hierarchy. +@param [inout] parent - The parent identifier. +*/ +ast_identifier ast_append_identifier( + ast_identifier parent, + ast_identifier child +); + +/*! +@brief Used to set the range field of an identifier. +@param [inout] id - The identifier to set the range for. +@param [in] range - The range the identifier refers to. +@post Also sets the range_or_idx member to ID_HAS_RANGE +*/ +void ast_identifier_set_range( + ast_identifier id, + ast_range * range +); + +/*! +@brief Used to set the index field of an identifier. +@param [inout] id - The identifier to set the index for. +@param [in] index - The index the identifier refers to. +@post Also sets the range_or_idx member to ID_HAS_INDEX +*/ +void ast_identifier_set_index( + ast_identifier id, + ast_expression * index +); + +/*! @} */ + +// -------------------------------- Configuration Source --------------------- + +/*! +@defgroup ast-node-configuration-source Configuration Source +@{ +@ingroup ast-construction +@brief Describes configuration constructs. +*/ + +//! Fully describes a config rule statemnet. See Annex 1.2 +typedef struct ast_config_rule_statement_t{ + ast_metadata meta; //!< Node metadata. + ast_boolean is_default; + ast_boolean multiple_clauses; // +#include +#include +#include + +#ifndef VERILOG_AST_MEM_H +#define VERILOG_AST_MEM_H + +//! Typedef over ast_memory_T +typedef struct ast_memory_t ast_memory; + +//! Stores information on some allocated memory as a linked list. +struct ast_memory_t{ + size_t size; //!< Amount of memory allocated. + void * data; //!< Pointer to the allocated memory. + ast_memory * next; //!< Next element to be allocated. +}; + + +//! Iterates over all allocated memory and frees it. +void ast_free_all(); + +//! Duplicates the supplied null terminated string. +char * ast_strdup(char * in); + +/*! +@brief A simple wrapper around calloc. +@details This function is identical to calloc, but uses the head and +walker variables above to keep a linked list of all heap memory that the +AST construction allocates. This makes it very easy to clean up afterward +using the @ref ast_free_all function. +@param [in] num - Number of elements to allocate space for. +@param [in] size - The size of each element being allocated. +@returns A pointer to the start of the block of memory allocated. +*/ +void * ast_calloc(size_t num, size_t size); + + + +#endif + diff --git a/parser/verilog_keyword.c b/parser/verilog_keyword.c new file mode 100644 index 0000000..5cb3c2a --- /dev/null +++ b/parser/verilog_keyword.c @@ -0,0 +1,145 @@ + +#include "verilog_parser.tab.h" +#include "string.h" + +#define DEFKEYWORD(id, n) {KW_##id, n} + +static struct s_key_word_list { + int keyid; + const char *name; +} key_word_list[] = { + DEFKEYWORD(ALWAYS ,"always"), + DEFKEYWORD(AND ,"and"), + DEFKEYWORD(ASSIGN ,"assign"), + DEFKEYWORD(AUTOMATIC ,"automatic"), + DEFKEYWORD(BEGIN ,"begin"), + DEFKEYWORD(BUF ,"buf"), + DEFKEYWORD(BUFIF0 ,"bufif0"), + DEFKEYWORD(BUFIF1 ,"bufif1"), + DEFKEYWORD(CASE ,"case"), + DEFKEYWORD(CASEX ,"casex"), + DEFKEYWORD(CASEZ ,"casez"), + DEFKEYWORD(CELL ,"cell"), + DEFKEYWORD(CMOS ,"cmos"), + DEFKEYWORD(CONFIG ,"config"), + DEFKEYWORD(DEASSIGN ,"deassign"), + DEFKEYWORD(DEFAULT ,"default"), + DEFKEYWORD(DEFPARAM ,"defparam"), + DEFKEYWORD(DESIGN ,"design"), + DEFKEYWORD(DISABLE ,"disable"), + DEFKEYWORD(EDGE ,"edge"), + DEFKEYWORD(ELSE ,"else"), + DEFKEYWORD(END ,"end"), + DEFKEYWORD(ENDCASE ,"endcase"), + DEFKEYWORD(ENDCONFIG ,"endconfig"), + DEFKEYWORD(ENDFUNCTION ,"endfunction"), + DEFKEYWORD(ENDGENERATE ,"endgenerate"), + DEFKEYWORD(ENDMODULE ,"endmodule"), + DEFKEYWORD(ENDPRIMITIVE ,"endprimitive"), + DEFKEYWORD(ENDSPECIFY ,"endspecify"), + DEFKEYWORD(ENDTABLE ,"endtable"), + DEFKEYWORD(ENDTASK ,"endtask"), + DEFKEYWORD(EVENT ,"event"), + DEFKEYWORD(FOR ,"for"), + DEFKEYWORD(FORCE ,"force"), + DEFKEYWORD(FOREVER ,"forever"), + DEFKEYWORD(FORK ,"fork"), + DEFKEYWORD(FUNCTION ,"function"), + DEFKEYWORD(GENERATE ,"generate"), + DEFKEYWORD(GENVAR ,"genvar"), + DEFKEYWORD(HIGHZ0 ,"highz0"), + DEFKEYWORD(HIGHZ1 ,"highz1"), + DEFKEYWORD(IF ,"if"), + DEFKEYWORD(IFNONE ,"ifnone"), + DEFKEYWORD(INCDIR ,"-incdir"), + DEFKEYWORD(INCLUDE ,"include"), + DEFKEYWORD(INITIAL ,"initial"), + DEFKEYWORD(INOUT ,"inout"), + DEFKEYWORD(INPUT ,"input"), + DEFKEYWORD(INSTANCE ,"instance"), + DEFKEYWORD(INTEGER ,"integer"), + DEFKEYWORD(JOIN ,"join"), + DEFKEYWORD(LARGE ,"large"), + DEFKEYWORD(LIBLIST ,"liblist"), + DEFKEYWORD(LIBRARY ,"library"), + DEFKEYWORD(LOCALPARAM ,"localparam"), + DEFKEYWORD(MACROMODULE ,"macromodule"), + DEFKEYWORD(MEDIUM ,"medium"), + DEFKEYWORD(MODULE ,"module"), + DEFKEYWORD(NAND ,"nand"), + DEFKEYWORD(NEGEDGE ,"negedge"), + DEFKEYWORD(NMOS ,"nmos"), + DEFKEYWORD(NOR ,"nor"), + DEFKEYWORD(NOSHOWCANCELLED ,"noshowcancelled"), + DEFKEYWORD(NOT ,"not"), + DEFKEYWORD(NOTIF0 ,"notif0"), + DEFKEYWORD(NOTIF1 ,"notif1"), + DEFKEYWORD(OR ,"or"), + DEFKEYWORD(OUTPUT ,"output"), + DEFKEYWORD(PARAMETER ,"parameter"), + DEFKEYWORD(PMOS ,"pmos"), + DEFKEYWORD(POSEDGE ,"posedge"), + DEFKEYWORD(PRIMITIVE ,"primitive"), + DEFKEYWORD(PULL0 ,"pull0"), + DEFKEYWORD(PULL1 ,"pull1"), + DEFKEYWORD(PULLDOWN ,"pulldown"), + DEFKEYWORD(PULLUP ,"pullup"), + DEFKEYWORD(PULSESTYLE_ONEVENT ,"pulsestyle_onevent"), + DEFKEYWORD(PULSESTYLE_ONDETECT ,"pulsestyle_ondetect"), + DEFKEYWORD(RCMOS ,"rcmos"), + DEFKEYWORD(REAL ,"real"), + DEFKEYWORD(REALTIME ,"realtime"), + DEFKEYWORD(REG ,"reg"), + DEFKEYWORD(RELEASE ,"release"), + DEFKEYWORD(REPEAT ,"repeat"), + DEFKEYWORD(RNMOS ,"rnmos"), + DEFKEYWORD(RPMOS ,"rpmos"), + DEFKEYWORD(RTRAN ,"rtran"), + DEFKEYWORD(RTRANIF0 ,"rtranif0"), + DEFKEYWORD(RTRANIF1 ,"rtranif1"), + DEFKEYWORD(SCALARED ,"scalared"), + DEFKEYWORD(SHOWCANCELLED ,"showcancelled"), + DEFKEYWORD(SIGNED ,"signed"), + DEFKEYWORD(SMALL ,"small"), + DEFKEYWORD(SPECIFY ,"specify"), + DEFKEYWORD(SPECPARAM ,"specparam"), + DEFKEYWORD(STRONG0 ,"strong0"), + DEFKEYWORD(STRONG1 ,"strong1"), + DEFKEYWORD(SUPPLY0 ,"supply0"), + DEFKEYWORD(SUPPLY1 ,"supply1"), + DEFKEYWORD(TABLE ,"table"), + DEFKEYWORD(TASK ,"task"), + DEFKEYWORD(TIME ,"time"), + DEFKEYWORD(TRAN ,"tran"), + DEFKEYWORD(TRANIF0 ,"tranif0"), + DEFKEYWORD(TRANIF1 ,"tranif1"), + DEFKEYWORD(TRI0 ,"tri0"), + DEFKEYWORD(TRI1 ,"tri1"), + DEFKEYWORD(TRI ,"tri"), + DEFKEYWORD(TRIAND ,"triand"), + DEFKEYWORD(TRIOR ,"trior"), + DEFKEYWORD(TRIREG ,"trireg"), + DEFKEYWORD(UNSIGNED ,"unsigned"), + DEFKEYWORD(USE ,"use"), + DEFKEYWORD(VECTORED ,"vectored"), + DEFKEYWORD(WAIT ,"wait"), + DEFKEYWORD(WAND ,"wand"), + DEFKEYWORD(WEAK0 ,"weak0"), + DEFKEYWORD(WEAK1 ,"weak1"), + DEFKEYWORD(WHILE ,"while"), + DEFKEYWORD(WIRE ,"wire"), + DEFKEYWORD(WOR ,"wor"), + DEFKEYWORD(XNOR ,"xnor"), + DEFKEYWORD(XOR ,"xor"), +}; + +int verilog_find_reserved_word(const char * ident) +{ + int i; + for (i = 0;ialways_blocks); + dlistInit(&pobj->continuous_assignments); + dlistInit(&pobj->event_declarations); + dlistInit(&pobj->function_declarations); + dlistInit(&pobj->gate_instantiations); + dlistInit(&pobj->genvar_declarations); + dlistInit(&pobj->generate_blocks); + dlistInit(&pobj->initial_blocks); + dlistInit(&pobj->integer_declarations); + dlistInit(&pobj->local_parameters); + dlistInit(&pobj->module_instantiations); + dlistInit(&pobj->module_parameters); + dlistInit(&pobj->module_ports); + dlistInit(&pobj->net_declarations); + dlistInit(&pobj->parameter_overrides); + dlistInit(&pobj->real_declarations); + dlistInit(&pobj->realtime_declarations); + dlistInit(&pobj->reg_declarations); + dlistInit(&pobj->specify_blocks); + dlistInit(&pobj->specparams); + dlistInit(&pobj->task_declarations); + dlistInit(&pobj->time_declarations); + dlistInit(&pobj->udp_instantiations); + + *pObject = 0; + DLIST_VARINIT(pobj, verilogmodule); + VERILOGNODE_VARINIT(pobj, CLSID_VERILOG_MODULE_DECLARATION); + INTERFACE_INIT(IVerilogNode, pobj, verilogmodule, verilognode); + + /*ɵĶ*/ + OBJECT_RETURN_GEN(verilogmodule, pobj, pObject, CLSID_VERILOG_MODULE_DECLARATION); + return EIID_OK; +} + + +static void verilogmoduleDestroy(HOBJECT object) +{ + sVerilogModule * pTree; + pTree = (sVerilogModule *)objectThis(object); + free(pTree); +} + +/* + ܣж϶ǷһЧ + + object -- ָ + ֵ + 0 -- Ч + 1 -- Ч +*/ +static int verilogmoduleValid(HOBJECT object) +{ + return 1; +} + +static int verilogmodule_verilognode_dump(HOBJECT object, FILE * pFile, int opt) +{ + sVerilogModule * pTree; + pTree = (sVerilogModule *)objectThis(object); + + return 0; +} + +HOBJECT verilogparseCreateModuleDeclaration( + HOBJECT attributes, + HOBJECT identifier, + IDListVarPtr parameters, + IDListVarPtr ports, + IDListVarPtr constructs +) +{ + HOBJECT module = NULL; + sVerilogModule * pModule; + A_u_t_o_registor_verilogmodule(); + objectCreate(CLSID_VERILOG_MODULE_DECLARATION, NULL, 0, &module); + if (module == NULL) + return NULL; + pModule = (sVerilogModule *)objectThis(module); + pModule->attributes = attributes; + pModule->identifier = identifier; + pModule->module_parameters = *parameters; + if(ports != NULL) { + pModule->module_ports = *ports; + } +/* + for(i = 0; i < constructs -> items; i++) + { + ast_module_item * construct = ast_list_get(constructs, i); + + if(construct -> type == MOD_ITEM_PORT_DECLARATION && ports == NULL){ + // Only accept ports declared this way iff the ports argument to + // this function is NULL, signifying the old style of port + // declaration. + ast_list_append(tr -> module_ports, + construct -> port_declaration); + } + else if(construct -> type == MOD_ITEM_GENERATED_INSTANTIATION){ + ast_list_append(tr -> generate_blocks, + construct -> generated_instantiation); + } + else if(construct -> type == MOD_ITEM_PARAMETER_DECLARATION) { + ast_list_append(tr -> module_parameters, + construct -> parameter_declaration); + } + else if(construct -> type == MOD_ITEM_SPECIFY_BLOCK){ + ast_list_append(tr -> specify_blocks, + construct -> specify_block); + } + else if(construct -> type == MOD_ITEM_SPECPARAM_DECLARATION){ + ast_list_append(tr -> specparams, + construct -> specparam_declaration); + } + else if(construct -> type == MOD_ITEM_PARAMETER_OVERRIDE){ + ast_list_append(tr -> parameter_overrides, + construct -> parameter_override); + } + else if(construct -> type == MOD_ITEM_CONTINOUS_ASSIGNMENT){ + ast_list_append(tr -> continuous_assignments, + construct -> continuous_assignment); + } + else if(construct -> type == MOD_ITEM_GATE_INSTANTIATION){ + ast_list_append(tr -> gate_instantiations, + construct -> gate_instantiation); + } + else if(construct -> type == MOD_ITEM_UDP_INSTANTIATION){ + ast_list_append(tr -> udp_instantiations, + construct -> udp_instantiation); + } + else if(construct -> type == MOD_ITEM_MODULE_INSTANTIATION){ + ast_list_append(tr -> module_instantiations, + construct -> module_instantiation); + } + else if(construct -> type == MOD_ITEM_INITIAL_CONSTRUCT){ + ast_statement_block * toadd = ast_extract_statement_block( + BLOCK_SEQUENTIAL_INITIAL, construct -> initial_construct); + ast_list_append(tr -> initial_blocks ,toadd); + } + else if(construct -> type == MOD_ITEM_ALWAYS_CONSTRUCT){ + ast_statement_block * toadd = ast_extract_statement_block( + BLOCK_SEQUENTIAL_ALWAYS, construct -> always_construct); + ast_list_append(tr -> always_blocks,toadd); + } + else if(construct -> type == MOD_ITEM_NET_DECLARATION){ + tr -> net_declarations = ast_list_concat( + tr -> net_declarations, + ast_new_net_declaration(construct -> net_declaration)); + } + else if(construct -> type == MOD_ITEM_REG_DECLARATION){ + tr -> reg_declarations = ast_list_concat( + tr -> reg_declarations, + ast_new_reg_declaration(construct -> reg_declaration)); + } + else if(construct -> type == MOD_ITEM_INTEGER_DECLARATION){ + tr -> integer_declarations = ast_list_concat( + tr -> integer_declarations, + ast_new_var_declaration(construct -> integer_declaration)); + } + else if(construct -> type == MOD_ITEM_REAL_DECLARATION){ + tr -> real_declarations = ast_list_concat( + tr -> real_declarations, + ast_new_var_declaration(construct -> real_declaration)); + } + else if(construct -> type == MOD_ITEM_TIME_DECLARATION){ + tr -> time_declarations = ast_list_concat( + tr -> time_declarations, + ast_new_var_declaration(construct -> time_declaration)); + } + else if(construct -> type == MOD_ITEM_REALTIME_DECLARATION){ + tr -> realtime_declarations = ast_list_concat( + tr -> realtime_declarations, + ast_new_var_declaration(construct -> realtime_declaration)); + } + else if(construct -> type == MOD_ITEM_EVENT_DECLARATION){ + tr -> event_declarations = ast_list_concat( + tr -> event_declarations, + ast_new_var_declaration(construct -> event_declaration)); + } + else if(construct -> type == MOD_ITEM_GENVAR_DECLARATION){ + tr -> genvar_declarations = ast_list_concat( + tr -> genvar_declarations, + ast_new_var_declaration(construct -> genvar_declaration)); + } + else if(construct -> type == MOD_ITEM_TASK_DECLARATION){ + ast_list_append(tr -> task_declarations, + construct -> task_declaration); + } + else if(construct -> type == MOD_ITEM_FUNCTION_DECLARATION){ + ast_list_append(tr -> function_declarations, + construct -> function_declaration); + } + else + { + printf("ERROR: Unsupported module construct type: %d\n", + construct -> type); + assert(0); // Fail out because this should *never* happen + } + } + + return tr; +}*/ + return module; +} + + diff --git a/parser/verilog_module.h b/parser/verilog_module.h new file mode 100644 index 0000000..cb08727 --- /dev/null +++ b/parser/verilog_module.h @@ -0,0 +1,29 @@ + +#ifndef __VERILOG_MODULE_H +#define __VERILOG_MODULE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ASMLANGUAGE + +#include "guid.h" + +DEFINE_GUID(CLSID_VERILOG_MODULE_DECLARATION, 0x6aabba73, 0x8d57, 0x47f6, 0xb5, 0x2f, 0xaf, 0xc4, 0x1f, 0x55, 0x7b, 0xe); + +HOBJECT verilogparseCreateModuleDeclaration( + HOBJECT attributes, + HOBJECT identifier, + IDListVarPtr parameters, + IDListVarPtr ports, + IDListVarPtr constructs +); + +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/parser/verilog_parser.tab.c b/parser/verilog_parser.tab.c new file mode 100644 index 0000000..759415e --- /dev/null +++ b/parser/verilog_parser.tab.c @@ -0,0 +1,13659 @@ +/* A Bison parser, made by GNU Bison 3.7. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 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. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "3.7" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + + + +/* First part of user prologue. */ +#line 9 "verilog_parser.y" + + #include + #include + #include + + extern int yylex(); + extern int yylineno; + extern char * yytext; + + void yyerror(const char *msg){ + printf("line %d - ERROR: %s\n", yylineno,msg); + printf("- '%s'\n", yytext); + } + +#line 86 "verilog_parser.tab.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 "verilog_parser.tab.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_END = 3, /* END */ + YYSYMBOL_ANY = 4, /* ANY */ + YYSYMBOL_NEWLINE = 5, /* NEWLINE */ + YYSYMBOL_SPACE = 6, /* SPACE */ + YYSYMBOL_TAB = 7, /* TAB */ + YYSYMBOL_AT = 8, /* AT */ + YYSYMBOL_COMMA = 9, /* COMMA */ + YYSYMBOL_HASH = 10, /* HASH */ + YYSYMBOL_DOT = 11, /* DOT */ + YYSYMBOL_EQ = 12, /* EQ */ + YYSYMBOL_COLON = 13, /* COLON */ + YYSYMBOL_IDX_PRT_SEL = 14, /* IDX_PRT_SEL */ + YYSYMBOL_SEMICOLON = 15, /* SEMICOLON */ + YYSYMBOL_OPEN_BRACKET = 16, /* OPEN_BRACKET */ + YYSYMBOL_CLOSE_BRACKET = 17, /* CLOSE_BRACKET */ + YYSYMBOL_OPEN_SQ_BRACKET = 18, /* OPEN_SQ_BRACKET */ + YYSYMBOL_CLOSE_SQ_BRACKET = 19, /* CLOSE_SQ_BRACKET */ + YYSYMBOL_OPEN_SQ_BRACE = 20, /* OPEN_SQ_BRACE */ + YYSYMBOL_CLOSE_SQ_BRACE = 21, /* CLOSE_SQ_BRACE */ + YYSYMBOL_BIN_VALUE = 22, /* BIN_VALUE */ + YYSYMBOL_OCT_VALUE = 23, /* OCT_VALUE */ + YYSYMBOL_HEX_VALUE = 24, /* HEX_VALUE */ + YYSYMBOL_DEC_VALUE = 25, /* DEC_VALUE */ + YYSYMBOL_DEC_BASE = 26, /* DEC_BASE */ + YYSYMBOL_BIN_BASE = 27, /* BIN_BASE */ + YYSYMBOL_OCT_BASE = 28, /* OCT_BASE */ + YYSYMBOL_HEX_BASE = 29, /* HEX_BASE */ + YYSYMBOL_NUM_REAL = 30, /* NUM_REAL */ + YYSYMBOL_NUM_SIZE = 31, /* NUM_SIZE */ + YYSYMBOL_UNSIGNED_NUMBER = 32, /* UNSIGNED_NUMBER */ + YYSYMBOL_SYSTEM_ID = 33, /* SYSTEM_ID */ + YYSYMBOL_SIMPLE_ID = 34, /* SIMPLE_ID */ + YYSYMBOL_ESCAPED_ID = 35, /* ESCAPED_ID */ + YYSYMBOL_DEFINE_ID = 36, /* DEFINE_ID */ + YYSYMBOL_ATTRIBUTE_START = 37, /* ATTRIBUTE_START */ + YYSYMBOL_ATTRIBUTE_END = 38, /* ATTRIBUTE_END */ + YYSYMBOL_COMMENT_LINE = 39, /* COMMENT_LINE */ + YYSYMBOL_COMMENT_BLOCK = 40, /* COMMENT_BLOCK */ + YYSYMBOL_STRING = 41, /* STRING */ + YYSYMBOL_STAR = 42, /* STAR */ + YYSYMBOL_PLUS = 43, /* PLUS */ + YYSYMBOL_MINUS = 44, /* MINUS */ + YYSYMBOL_ASL = 45, /* ASL */ + YYSYMBOL_ASR = 46, /* ASR */ + YYSYMBOL_LSL = 47, /* LSL */ + YYSYMBOL_LSR = 48, /* LSR */ + YYSYMBOL_DIV = 49, /* DIV */ + YYSYMBOL_POW = 50, /* POW */ + YYSYMBOL_MOD = 51, /* MOD */ + YYSYMBOL_GTE = 52, /* GTE */ + YYSYMBOL_LTE = 53, /* LTE */ + YYSYMBOL_GT = 54, /* GT */ + YYSYMBOL_LT = 55, /* LT */ + YYSYMBOL_L_NEG = 56, /* L_NEG */ + YYSYMBOL_L_AND = 57, /* L_AND */ + YYSYMBOL_L_OR = 58, /* L_OR */ + YYSYMBOL_C_EQ = 59, /* C_EQ */ + YYSYMBOL_L_EQ = 60, /* L_EQ */ + YYSYMBOL_C_NEQ = 61, /* C_NEQ */ + YYSYMBOL_L_NEQ = 62, /* L_NEQ */ + YYSYMBOL_B_NEG = 63, /* B_NEG */ + YYSYMBOL_B_AND = 64, /* B_AND */ + YYSYMBOL_B_OR = 65, /* B_OR */ + YYSYMBOL_B_XOR = 66, /* B_XOR */ + YYSYMBOL_B_EQU = 67, /* B_EQU */ + YYSYMBOL_B_NAND = 68, /* B_NAND */ + YYSYMBOL_B_NOR = 69, /* B_NOR */ + YYSYMBOL_TERNARY = 70, /* TERNARY */ + YYSYMBOL_UNARY_OP = 71, /* UNARY_OP */ + YYSYMBOL_MACRO_TEXT = 72, /* MACRO_TEXT */ + YYSYMBOL_MACRO_IDENTIFIER = 73, /* MACRO_IDENTIFIER */ + YYSYMBOL_KW_ALWAYS = 74, /* KW_ALWAYS */ + YYSYMBOL_KW_AND = 75, /* KW_AND */ + YYSYMBOL_KW_ASSIGN = 76, /* KW_ASSIGN */ + YYSYMBOL_KW_AUTOMATIC = 77, /* KW_AUTOMATIC */ + YYSYMBOL_KW_BEGIN = 78, /* KW_BEGIN */ + YYSYMBOL_KW_BUF = 79, /* KW_BUF */ + YYSYMBOL_KW_BUFIF0 = 80, /* KW_BUFIF0 */ + YYSYMBOL_KW_BUFIF1 = 81, /* KW_BUFIF1 */ + YYSYMBOL_KW_CASE = 82, /* KW_CASE */ + YYSYMBOL_KW_CASEX = 83, /* KW_CASEX */ + YYSYMBOL_KW_CASEZ = 84, /* KW_CASEZ */ + YYSYMBOL_KW_CELL = 85, /* KW_CELL */ + YYSYMBOL_KW_CMOS = 86, /* KW_CMOS */ + YYSYMBOL_KW_CONFIG = 87, /* KW_CONFIG */ + YYSYMBOL_KW_DEASSIGN = 88, /* KW_DEASSIGN */ + YYSYMBOL_KW_DEFAULT = 89, /* KW_DEFAULT */ + YYSYMBOL_KW_DEFPARAM = 90, /* KW_DEFPARAM */ + YYSYMBOL_KW_DESIGN = 91, /* KW_DESIGN */ + YYSYMBOL_KW_DISABLE = 92, /* KW_DISABLE */ + YYSYMBOL_KW_EDGE = 93, /* KW_EDGE */ + YYSYMBOL_KW_ELSE = 94, /* KW_ELSE */ + YYSYMBOL_KW_END = 95, /* KW_END */ + YYSYMBOL_KW_ENDCASE = 96, /* KW_ENDCASE */ + YYSYMBOL_KW_ENDCONFIG = 97, /* KW_ENDCONFIG */ + YYSYMBOL_KW_ENDFUNCTION = 98, /* KW_ENDFUNCTION */ + YYSYMBOL_KW_ENDGENERATE = 99, /* KW_ENDGENERATE */ + YYSYMBOL_KW_ENDMODULE = 100, /* KW_ENDMODULE */ + YYSYMBOL_KW_ENDPRIMITIVE = 101, /* KW_ENDPRIMITIVE */ + YYSYMBOL_KW_ENDSPECIFY = 102, /* KW_ENDSPECIFY */ + YYSYMBOL_KW_ENDTABLE = 103, /* KW_ENDTABLE */ + YYSYMBOL_KW_ENDTASK = 104, /* KW_ENDTASK */ + YYSYMBOL_KW_EVENT = 105, /* KW_EVENT */ + YYSYMBOL_KW_FOR = 106, /* KW_FOR */ + YYSYMBOL_KW_FORCE = 107, /* KW_FORCE */ + YYSYMBOL_KW_FOREVER = 108, /* KW_FOREVER */ + YYSYMBOL_KW_FORK = 109, /* KW_FORK */ + YYSYMBOL_KW_FUNCTION = 110, /* KW_FUNCTION */ + YYSYMBOL_KW_GENERATE = 111, /* KW_GENERATE */ + YYSYMBOL_KW_GENVAR = 112, /* KW_GENVAR */ + YYSYMBOL_KW_HIGHZ0 = 113, /* KW_HIGHZ0 */ + YYSYMBOL_KW_HIGHZ1 = 114, /* KW_HIGHZ1 */ + YYSYMBOL_KW_IF = 115, /* KW_IF */ + YYSYMBOL_KW_IFNONE = 116, /* KW_IFNONE */ + YYSYMBOL_KW_INCDIR = 117, /* KW_INCDIR */ + YYSYMBOL_KW_INCLUDE = 118, /* KW_INCLUDE */ + YYSYMBOL_KW_INITIAL = 119, /* KW_INITIAL */ + YYSYMBOL_KW_INOUT = 120, /* KW_INOUT */ + YYSYMBOL_KW_INPUT = 121, /* KW_INPUT */ + YYSYMBOL_KW_INSTANCE = 122, /* KW_INSTANCE */ + YYSYMBOL_KW_INTEGER = 123, /* KW_INTEGER */ + YYSYMBOL_KW_JOIN = 124, /* KW_JOIN */ + YYSYMBOL_KW_LARGE = 125, /* KW_LARGE */ + YYSYMBOL_KW_LIBLIST = 126, /* KW_LIBLIST */ + YYSYMBOL_KW_LIBRARY = 127, /* KW_LIBRARY */ + YYSYMBOL_KW_LOCALPARAM = 128, /* KW_LOCALPARAM */ + YYSYMBOL_KW_MACROMODULE = 129, /* KW_MACROMODULE */ + YYSYMBOL_KW_MEDIUM = 130, /* KW_MEDIUM */ + YYSYMBOL_KW_MODULE = 131, /* KW_MODULE */ + YYSYMBOL_KW_NAN = 132, /* KW_NAN */ + YYSYMBOL_KW_NEGEDGE = 133, /* KW_NEGEDGE */ + YYSYMBOL_KW_NMOS = 134, /* KW_NMOS */ + YYSYMBOL_KW_NOR = 135, /* KW_NOR */ + YYSYMBOL_KW_NOSHOWCANCELLED = 136, /* KW_NOSHOWCANCELLED */ + YYSYMBOL_KW_NOT = 137, /* KW_NOT */ + YYSYMBOL_KW_NOTIF0 = 138, /* KW_NOTIF0 */ + YYSYMBOL_KW_NOTIF1 = 139, /* KW_NOTIF1 */ + YYSYMBOL_KW_OR = 140, /* KW_OR */ + YYSYMBOL_KW_OUTPUT = 141, /* KW_OUTPUT */ + YYSYMBOL_KW_PARAMETER = 142, /* KW_PARAMETER */ + YYSYMBOL_KW_PATHPULSE = 143, /* KW_PATHPULSE */ + YYSYMBOL_KW_PMOS = 144, /* KW_PMOS */ + YYSYMBOL_KW_POSEDGE = 145, /* KW_POSEDGE */ + YYSYMBOL_KW_PRIMITIVE = 146, /* KW_PRIMITIVE */ + YYSYMBOL_KW_PULL0 = 147, /* KW_PULL0 */ + YYSYMBOL_KW_PULL1 = 148, /* KW_PULL1 */ + YYSYMBOL_KW_PULLDOWN = 149, /* KW_PULLDOWN */ + YYSYMBOL_KW_PULLUP = 150, /* KW_PULLUP */ + YYSYMBOL_KW_PULSESTYLE_ONEVENT = 151, /* KW_PULSESTYLE_ONEVENT */ + YYSYMBOL_KW_PULSESTYLE_ONDETECT = 152, /* KW_PULSESTYLE_ONDETECT */ + YYSYMBOL_KW_RCMOS = 153, /* KW_RCMOS */ + YYSYMBOL_KW_REAL = 154, /* KW_REAL */ + YYSYMBOL_KW_REALTIME = 155, /* KW_REALTIME */ + YYSYMBOL_KW_REG = 156, /* KW_REG */ + YYSYMBOL_KW_RELEASE = 157, /* KW_RELEASE */ + YYSYMBOL_KW_REPEAT = 158, /* KW_REPEAT */ + YYSYMBOL_KW_RNMOS = 159, /* KW_RNMOS */ + YYSYMBOL_KW_RPMOS = 160, /* KW_RPMOS */ + YYSYMBOL_KW_RTRAN = 161, /* KW_RTRAN */ + YYSYMBOL_KW_RTRANIF0 = 162, /* KW_RTRANIF0 */ + YYSYMBOL_KW_RTRANIF1 = 163, /* KW_RTRANIF1 */ + YYSYMBOL_KW_SCALARED = 164, /* KW_SCALARED */ + YYSYMBOL_KW_SHOWCANCELLED = 165, /* KW_SHOWCANCELLED */ + YYSYMBOL_KW_SIGNED = 166, /* KW_SIGNED */ + YYSYMBOL_KW_SMALL = 167, /* KW_SMALL */ + YYSYMBOL_KW_SPECIFY = 168, /* KW_SPECIFY */ + YYSYMBOL_KW_SPECPARAM = 169, /* KW_SPECPARAM */ + YYSYMBOL_KW_STRONG0 = 170, /* KW_STRONG0 */ + YYSYMBOL_KW_STRONG1 = 171, /* KW_STRONG1 */ + YYSYMBOL_KW_SUPPLY0 = 172, /* KW_SUPPLY0 */ + YYSYMBOL_KW_SUPPLY1 = 173, /* KW_SUPPLY1 */ + YYSYMBOL_KW_TABLE = 174, /* KW_TABLE */ + YYSYMBOL_KW_TASK = 175, /* KW_TASK */ + YYSYMBOL_KW_TIME = 176, /* KW_TIME */ + YYSYMBOL_KW_TRAN = 177, /* KW_TRAN */ + YYSYMBOL_KW_TRANIF0 = 178, /* KW_TRANIF0 */ + YYSYMBOL_KW_TRANIF1 = 179, /* KW_TRANIF1 */ + YYSYMBOL_KW_TRI = 180, /* KW_TRI */ + YYSYMBOL_KW_TRI0 = 181, /* KW_TRI0 */ + YYSYMBOL_KW_TRI1 = 182, /* KW_TRI1 */ + YYSYMBOL_KW_TRIAND = 183, /* KW_TRIAND */ + YYSYMBOL_KW_TRIOR = 184, /* KW_TRIOR */ + YYSYMBOL_KW_TRIREG = 185, /* KW_TRIREG */ + YYSYMBOL_KW_UNSIGNED = 186, /* KW_UNSIGNED */ + YYSYMBOL_KW_USE = 187, /* KW_USE */ + YYSYMBOL_KW_VECTORED = 188, /* KW_VECTORED */ + YYSYMBOL_KW_WAIT = 189, /* KW_WAIT */ + YYSYMBOL_KW_WAND = 190, /* KW_WAND */ + YYSYMBOL_KW_WEAK0 = 191, /* KW_WEAK0 */ + YYSYMBOL_KW_WEAK1 = 192, /* KW_WEAK1 */ + YYSYMBOL_KW_WHILE = 193, /* KW_WHILE */ + YYSYMBOL_KW_WIRE = 194, /* KW_WIRE */ + YYSYMBOL_KW_WOR = 195, /* KW_WOR */ + YYSYMBOL_KW_XNOR = 196, /* KW_XNOR */ + YYSYMBOL_KW_XOR = 197, /* KW_XOR */ + YYSYMBOL_KW_NAND = 198, /* KW_NAND */ + YYSYMBOL_199_ = 199, /* '$' */ + YYSYMBOL_200_X_ = 200, /* 'X' */ + YYSYMBOL_201_x_ = 201, /* 'x' */ + YYSYMBOL_202_B_ = 202, /* 'B' */ + YYSYMBOL_203_b_ = 203, /* 'b' */ + YYSYMBOL_204_r_ = 204, /* 'r' */ + YYSYMBOL_205_R_ = 205, /* 'R' */ + YYSYMBOL_206_f_ = 206, /* 'f' */ + YYSYMBOL_207_F_ = 207, /* 'F' */ + YYSYMBOL_208_p_ = 208, /* 'p' */ + YYSYMBOL_209_P_ = 209, /* 'P' */ + YYSYMBOL_210_n_ = 210, /* 'n' */ + YYSYMBOL_211_N_ = 211, /* 'N' */ + YYSYMBOL_YYACCEPT = 212, /* $accept */ + YYSYMBOL_grammar_begin = 213, /* grammar_begin */ + YYSYMBOL_text_macro_usage = 214, /* text_macro_usage */ + YYSYMBOL_list_of_actual_arguments = 215, /* list_of_actual_arguments */ + YYSYMBOL_actual_argument = 216, /* actual_argument */ + YYSYMBOL_library_text = 217, /* library_text */ + YYSYMBOL_library_descriptions = 218, /* library_descriptions */ + YYSYMBOL_library_declaration = 219, /* library_declaration */ + YYSYMBOL_file_path_specs = 220, /* file_path_specs */ + YYSYMBOL_file_path_spec = 221, /* file_path_spec */ + YYSYMBOL_file_path = 222, /* file_path */ + YYSYMBOL_include_statement = 223, /* include_statement */ + YYSYMBOL_config_declaration = 224, /* config_declaration */ + YYSYMBOL_design_statement = 225, /* design_statement */ + YYSYMBOL_lib_cell_identifier_os = 226, /* lib_cell_identifier_os */ + YYSYMBOL_config_rule_statement_os = 227, /* config_rule_statement_os */ + YYSYMBOL_config_rule_statement = 228, /* config_rule_statement */ + YYSYMBOL_inst_clause = 229, /* inst_clause */ + YYSYMBOL_inst_name = 230, /* inst_name */ + YYSYMBOL_instance_identifier_os = 231, /* instance_identifier_os */ + YYSYMBOL_cell_clause = 232, /* cell_clause */ + YYSYMBOL_liblist_clause = 233, /* liblist_clause */ + YYSYMBOL_library_identifier_os = 234, /* library_identifier_os */ + YYSYMBOL_use_clause = 235, /* use_clause */ + YYSYMBOL_source_text = 236, /* source_text */ + YYSYMBOL_description = 237, /* description */ + YYSYMBOL_module_declaration = 238, /* module_declaration */ + YYSYMBOL_module_keyword = 239, /* module_keyword */ + YYSYMBOL_module_parameter_port_list = 240, /* module_parameter_port_list */ + YYSYMBOL_module_params = 241, /* module_params */ + YYSYMBOL_list_of_ports = 242, /* list_of_ports */ + YYSYMBOL_list_of_port_declarations = 243, /* list_of_port_declarations */ + YYSYMBOL_port_declarations = 244, /* port_declarations */ + YYSYMBOL_port_declaration_l = 245, /* port_declaration_l */ + YYSYMBOL_identifier_csv = 246, /* identifier_csv */ + YYSYMBOL_port_dir = 247, /* port_dir */ + YYSYMBOL_port_declaration = 248, /* port_declaration */ + YYSYMBOL_ports = 249, /* ports */ + YYSYMBOL_port = 250, /* port */ + YYSYMBOL_port_expression = 251, /* port_expression */ + YYSYMBOL_port_reference = 252, /* port_reference */ + YYSYMBOL_module_item_os = 253, /* module_item_os */ + YYSYMBOL_non_port_module_item_os = 254, /* non_port_module_item_os */ + YYSYMBOL_module_item = 255, /* module_item */ + YYSYMBOL_module_or_generate_item = 256, /* module_or_generate_item */ + YYSYMBOL_module_or_generate_item_declaration = 257, /* module_or_generate_item_declaration */ + YYSYMBOL_non_port_module_item = 258, /* non_port_module_item */ + YYSYMBOL_parameter_override = 259, /* parameter_override */ + YYSYMBOL_signed_o = 260, /* signed_o */ + YYSYMBOL_range_o = 261, /* range_o */ + YYSYMBOL_local_parameter_declaration = 262, /* local_parameter_declaration */ + YYSYMBOL_parameter_declaration = 263, /* parameter_declaration */ + YYSYMBOL_specparam_declaration = 264, /* specparam_declaration */ + YYSYMBOL_net_type_o = 265, /* net_type_o */ + YYSYMBOL_reg_o = 266, /* reg_o */ + YYSYMBOL_inout_declaration = 267, /* inout_declaration */ + YYSYMBOL_input_declaration = 268, /* input_declaration */ + YYSYMBOL_output_declaration = 269, /* output_declaration */ + YYSYMBOL_event_declaration = 270, /* event_declaration */ + YYSYMBOL_genvar_declaration = 271, /* genvar_declaration */ + YYSYMBOL_integer_declaration = 272, /* integer_declaration */ + YYSYMBOL_time_declaration = 273, /* time_declaration */ + YYSYMBOL_real_declaration = 274, /* real_declaration */ + YYSYMBOL_realtime_declaration = 275, /* realtime_declaration */ + YYSYMBOL_delay3_o = 276, /* delay3_o */ + YYSYMBOL_drive_strength_o = 277, /* drive_strength_o */ + YYSYMBOL_net_declaration = 278, /* net_declaration */ + YYSYMBOL_net_dec_p_ds = 279, /* net_dec_p_ds */ + YYSYMBOL_net_dec_p_vs = 280, /* net_dec_p_vs */ + YYSYMBOL_net_dec_p_si = 281, /* net_dec_p_si */ + YYSYMBOL_net_dec_p_range = 282, /* net_dec_p_range */ + YYSYMBOL_net_dec_p_delay = 283, /* net_dec_p_delay */ + YYSYMBOL_reg_declaration = 284, /* reg_declaration */ + YYSYMBOL_reg_dec_p_signed = 285, /* reg_dec_p_signed */ + YYSYMBOL_reg_dec_p_range = 286, /* reg_dec_p_range */ + YYSYMBOL_net_type = 287, /* net_type */ + YYSYMBOL_output_variable_type_o = 288, /* output_variable_type_o */ + YYSYMBOL_output_variable_type = 289, /* output_variable_type */ + YYSYMBOL_real_type = 290, /* real_type */ + YYSYMBOL_dimensions = 291, /* dimensions */ + YYSYMBOL_variable_type = 292, /* variable_type */ + YYSYMBOL_drive_strength = 293, /* drive_strength */ + YYSYMBOL_strength0 = 294, /* strength0 */ + YYSYMBOL_strength1 = 295, /* strength1 */ + YYSYMBOL_charge_strength = 296, /* charge_strength */ + YYSYMBOL_delay3 = 297, /* delay3 */ + YYSYMBOL_delay2 = 298, /* delay2 */ + YYSYMBOL_delay_value = 299, /* delay_value */ + YYSYMBOL_dimensions_o = 300, /* dimensions_o */ + YYSYMBOL_list_of_event_identifiers = 301, /* list_of_event_identifiers */ + YYSYMBOL_list_of_genvar_identifiers = 302, /* list_of_genvar_identifiers */ + YYSYMBOL_list_of_net_decl_assignments = 303, /* list_of_net_decl_assignments */ + YYSYMBOL_list_of_net_identifiers = 304, /* list_of_net_identifiers */ + YYSYMBOL_list_of_param_assignments = 305, /* list_of_param_assignments */ + YYSYMBOL_list_of_port_identifiers = 306, /* list_of_port_identifiers */ + YYSYMBOL_list_of_real_identifiers = 307, /* list_of_real_identifiers */ + YYSYMBOL_list_of_specparam_assignments = 308, /* list_of_specparam_assignments */ + YYSYMBOL_list_of_variable_identifiers = 309, /* list_of_variable_identifiers */ + YYSYMBOL_eq_const_exp_o = 310, /* eq_const_exp_o */ + YYSYMBOL_list_of_variable_port_identifiers = 311, /* list_of_variable_port_identifiers */ + YYSYMBOL_net_decl_assignment = 312, /* net_decl_assignment */ + YYSYMBOL_param_assignment = 313, /* param_assignment */ + YYSYMBOL_specparam_assignment = 314, /* specparam_assignment */ + YYSYMBOL_error_limit_value_o = 315, /* error_limit_value_o */ + YYSYMBOL_pulse_control_specparam = 316, /* pulse_control_specparam */ + YYSYMBOL_error_limit_value = 317, /* error_limit_value */ + YYSYMBOL_reject_limit_value = 318, /* reject_limit_value */ + YYSYMBOL_limit_value = 319, /* limit_value */ + YYSYMBOL_dimension = 320, /* dimension */ + YYSYMBOL_range = 321, /* range */ + YYSYMBOL_automatic_o = 322, /* automatic_o */ + YYSYMBOL_function_declaration = 323, /* function_declaration */ + YYSYMBOL_block_item_declarations = 324, /* block_item_declarations */ + YYSYMBOL_function_item_declarations = 325, /* function_item_declarations */ + YYSYMBOL_function_item_declaration = 326, /* function_item_declaration */ + YYSYMBOL_function_port_list = 327, /* function_port_list */ + YYSYMBOL_tf_input_declarations = 328, /* tf_input_declarations */ + YYSYMBOL_range_or_type_o = 329, /* range_or_type_o */ + YYSYMBOL_range_or_type = 330, /* range_or_type */ + YYSYMBOL_task_declaration = 331, /* task_declaration */ + YYSYMBOL_task_item_declarations = 332, /* task_item_declarations */ + YYSYMBOL_task_item_declaration = 333, /* task_item_declaration */ + YYSYMBOL_task_port_list = 334, /* task_port_list */ + YYSYMBOL_task_port_item = 335, /* task_port_item */ + YYSYMBOL_tf_input_declaration = 336, /* tf_input_declaration */ + YYSYMBOL_tf_output_declaration = 337, /* tf_output_declaration */ + YYSYMBOL_tf_inout_declaration = 338, /* tf_inout_declaration */ + YYSYMBOL_task_port_type_o = 339, /* task_port_type_o */ + YYSYMBOL_task_port_type = 340, /* task_port_type */ + YYSYMBOL_block_item_declaration = 341, /* block_item_declaration */ + YYSYMBOL_block_reg_declaration = 342, /* block_reg_declaration */ + YYSYMBOL_list_of_block_variable_identifiers = 343, /* list_of_block_variable_identifiers */ + YYSYMBOL_block_variable_type = 344, /* block_variable_type */ + YYSYMBOL_delay2_o = 345, /* delay2_o */ + YYSYMBOL_gate_instantiation = 346, /* gate_instantiation */ + YYSYMBOL_OB = 347, /* OB */ + YYSYMBOL_CB = 348, /* CB */ + YYSYMBOL_gate_n_output = 349, /* gate_n_output */ + YYSYMBOL_gate_n_output_a_id = 350, /* gate_n_output_a_id */ + YYSYMBOL_gatetype_n_output = 351, /* gatetype_n_output */ + YYSYMBOL_n_output_gate_instances = 352, /* n_output_gate_instances */ + YYSYMBOL_n_output_gate_instance = 353, /* n_output_gate_instance */ + YYSYMBOL_gate_enable = 354, /* gate_enable */ + YYSYMBOL_enable_gate_instances = 355, /* enable_gate_instances */ + YYSYMBOL_enable_gate_instance = 356, /* enable_gate_instance */ + YYSYMBOL_enable_gatetype = 357, /* enable_gatetype */ + YYSYMBOL_gate_n_input = 358, /* gate_n_input */ + YYSYMBOL_gatetype_n_input = 359, /* gatetype_n_input */ + YYSYMBOL_gate_pass_en_switch = 360, /* gate_pass_en_switch */ + YYSYMBOL_pass_enable_switch_instances = 361, /* pass_enable_switch_instances */ + YYSYMBOL_pass_enable_switch_instance = 362, /* pass_enable_switch_instance */ + YYSYMBOL_pull_gate_instances = 363, /* pull_gate_instances */ + YYSYMBOL_pass_switch_instances = 364, /* pass_switch_instances */ + YYSYMBOL_n_input_gate_instances = 365, /* n_input_gate_instances */ + YYSYMBOL_mos_switch_instances = 366, /* mos_switch_instances */ + YYSYMBOL_cmos_switch_instances = 367, /* cmos_switch_instances */ + YYSYMBOL_pull_gate_instance = 368, /* pull_gate_instance */ + YYSYMBOL_pass_switch_instance = 369, /* pass_switch_instance */ + YYSYMBOL_n_input_gate_instance = 370, /* n_input_gate_instance */ + YYSYMBOL_mos_switch_instance = 371, /* mos_switch_instance */ + YYSYMBOL_cmos_switch_instance = 372, /* cmos_switch_instance */ + YYSYMBOL_output_terminals = 373, /* output_terminals */ + YYSYMBOL_input_terminals = 374, /* input_terminals */ + YYSYMBOL_pulldown_strength_o = 375, /* pulldown_strength_o */ + YYSYMBOL_pulldown_strength = 376, /* pulldown_strength */ + YYSYMBOL_pullup_strength_o = 377, /* pullup_strength_o */ + YYSYMBOL_pullup_strength = 378, /* pullup_strength */ + YYSYMBOL_name_of_gate_instance = 379, /* name_of_gate_instance */ + YYSYMBOL_enable_terminal = 380, /* enable_terminal */ + YYSYMBOL_input_terminal = 381, /* input_terminal */ + YYSYMBOL_ncontrol_terminal = 382, /* ncontrol_terminal */ + YYSYMBOL_pcontrol_terminal = 383, /* pcontrol_terminal */ + YYSYMBOL_inout_terminal = 384, /* inout_terminal */ + YYSYMBOL_output_terminal = 385, /* output_terminal */ + YYSYMBOL_cmos_switchtype = 386, /* cmos_switchtype */ + YYSYMBOL_mos_switchtype = 387, /* mos_switchtype */ + YYSYMBOL_pass_switchtype = 388, /* pass_switchtype */ + YYSYMBOL_module_instantiation = 389, /* module_instantiation */ + YYSYMBOL_parameter_value_assignment_o = 390, /* parameter_value_assignment_o */ + YYSYMBOL_parameter_value_assignment = 391, /* parameter_value_assignment */ + YYSYMBOL_list_of_parameter_assignments = 392, /* list_of_parameter_assignments */ + YYSYMBOL_ordered_parameter_assignments = 393, /* ordered_parameter_assignments */ + YYSYMBOL_named_parameter_assignments = 394, /* named_parameter_assignments */ + YYSYMBOL_module_instances = 395, /* module_instances */ + YYSYMBOL_ordered_parameter_assignment = 396, /* ordered_parameter_assignment */ + YYSYMBOL_named_parameter_assignment = 397, /* named_parameter_assignment */ + YYSYMBOL_module_instance = 398, /* module_instance */ + YYSYMBOL_name_of_instance = 399, /* name_of_instance */ + YYSYMBOL_list_of_port_connections = 400, /* list_of_port_connections */ + YYSYMBOL_ordered_port_connections = 401, /* ordered_port_connections */ + YYSYMBOL_named_port_connections = 402, /* named_port_connections */ + YYSYMBOL_ordered_port_connection = 403, /* ordered_port_connection */ + YYSYMBOL_named_port_connection = 404, /* named_port_connection */ + YYSYMBOL_expression_o = 405, /* expression_o */ + YYSYMBOL_generated_instantiation = 406, /* generated_instantiation */ + YYSYMBOL_generate_items = 407, /* generate_items */ + YYSYMBOL_generate_item_or_null = 408, /* generate_item_or_null */ + YYSYMBOL_generate_item = 409, /* generate_item */ + YYSYMBOL_generate_conditional_statement = 410, /* generate_conditional_statement */ + YYSYMBOL_generate_case_statement = 411, /* generate_case_statement */ + YYSYMBOL_genvar_case_items = 412, /* genvar_case_items */ + YYSYMBOL_genvar_case_item = 413, /* genvar_case_item */ + YYSYMBOL_generate_loop_statement = 414, /* generate_loop_statement */ + YYSYMBOL_genvar_assignment = 415, /* genvar_assignment */ + YYSYMBOL_generate_block = 416, /* generate_block */ + YYSYMBOL_udp_declaration = 417, /* udp_declaration */ + YYSYMBOL_udp_port_declarations = 418, /* udp_port_declarations */ + YYSYMBOL_udp_port_list = 419, /* udp_port_list */ + YYSYMBOL_input_port_identifiers = 420, /* input_port_identifiers */ + YYSYMBOL_udp_declaration_port_list = 421, /* udp_declaration_port_list */ + YYSYMBOL_udp_input_declarations = 422, /* udp_input_declarations */ + YYSYMBOL_udp_port_declaration = 423, /* udp_port_declaration */ + YYSYMBOL_udp_output_declaration = 424, /* udp_output_declaration */ + YYSYMBOL_udp_input_declaration = 425, /* udp_input_declaration */ + YYSYMBOL_udp_reg_declaration = 426, /* udp_reg_declaration */ + YYSYMBOL_udp_body = 427, /* udp_body */ + YYSYMBOL_sequential_entrys = 428, /* sequential_entrys */ + YYSYMBOL_combinational_entrys = 429, /* combinational_entrys */ + YYSYMBOL_combinational_entry = 430, /* combinational_entry */ + YYSYMBOL_sequential_entry = 431, /* sequential_entry */ + YYSYMBOL_udp_initial_statement = 432, /* udp_initial_statement */ + YYSYMBOL_init_val = 433, /* init_val */ + YYSYMBOL_level_symbols_o = 434, /* level_symbols_o */ + YYSYMBOL_level_symbols = 435, /* level_symbols */ + YYSYMBOL_edge_input_list = 436, /* edge_input_list */ + YYSYMBOL_edge_indicator = 437, /* edge_indicator */ + YYSYMBOL_next_state = 438, /* next_state */ + YYSYMBOL_output_symbol = 439, /* output_symbol */ + YYSYMBOL_level_symbol = 440, /* level_symbol */ + YYSYMBOL_edge_symbol = 441, /* edge_symbol */ + YYSYMBOL_udp_instantiation = 442, /* udp_instantiation */ + YYSYMBOL_udp_instances = 443, /* udp_instances */ + YYSYMBOL_udp_instance = 444, /* udp_instance */ + YYSYMBOL_continuous_assign = 445, /* continuous_assign */ + YYSYMBOL_list_of_net_assignments = 446, /* list_of_net_assignments */ + YYSYMBOL_net_assignment = 447, /* net_assignment */ + YYSYMBOL_initial_construct = 448, /* initial_construct */ + YYSYMBOL_always_construct = 449, /* always_construct */ + YYSYMBOL_blocking_assignment = 450, /* blocking_assignment */ + YYSYMBOL_nonblocking_assignment = 451, /* nonblocking_assignment */ + YYSYMBOL_delay_or_event_control_o = 452, /* delay_or_event_control_o */ + YYSYMBOL_procedural_continuous_assignments = 453, /* procedural_continuous_assignments */ + YYSYMBOL_function_blocking_assignment = 454, /* function_blocking_assignment */ + YYSYMBOL_function_statement_or_null = 455, /* function_statement_or_null */ + YYSYMBOL_function_statements_o = 456, /* function_statements_o */ + YYSYMBOL_function_statements = 457, /* function_statements */ + YYSYMBOL_function_seq_block = 458, /* function_seq_block */ + YYSYMBOL_variable_assignment = 459, /* variable_assignment */ + YYSYMBOL_par_block = 460, /* par_block */ + YYSYMBOL_seq_block = 461, /* seq_block */ + YYSYMBOL_statements_o = 462, /* statements_o */ + YYSYMBOL_statements = 463, /* statements */ + YYSYMBOL_statement = 464, /* statement */ + YYSYMBOL_statement_or_null = 465, /* statement_or_null */ + YYSYMBOL_function_statement = 466, /* function_statement */ + YYSYMBOL_procedural_timing_control_statement = 467, /* procedural_timing_control_statement */ + YYSYMBOL_delay_or_event_control = 468, /* delay_or_event_control */ + YYSYMBOL_delay_control = 469, /* delay_control */ + YYSYMBOL_disable_statement = 470, /* disable_statement */ + YYSYMBOL_event_control = 471, /* event_control */ + YYSYMBOL_event_trigger = 472, /* event_trigger */ + YYSYMBOL_event_expression = 473, /* event_expression */ + YYSYMBOL_wait_statement = 474, /* wait_statement */ + YYSYMBOL_conditional_statement = 475, /* conditional_statement */ + YYSYMBOL_if_else_if_statement = 476, /* if_else_if_statement */ + YYSYMBOL_else_if_statements = 477, /* else_if_statements */ + YYSYMBOL_function_conditional_statement = 478, /* function_conditional_statement */ + YYSYMBOL_function_else_if_statements = 479, /* function_else_if_statements */ + YYSYMBOL_function_if_else_if_statement = 480, /* function_if_else_if_statement */ + YYSYMBOL_case_statement = 481, /* case_statement */ + YYSYMBOL_case_items = 482, /* case_items */ + YYSYMBOL_case_item = 483, /* case_item */ + YYSYMBOL_function_case_statement = 484, /* function_case_statement */ + YYSYMBOL_function_case_items = 485, /* function_case_items */ + YYSYMBOL_function_case_item = 486, /* function_case_item */ + YYSYMBOL_function_loop_statement = 487, /* function_loop_statement */ + YYSYMBOL_loop_statement = 488, /* loop_statement */ + YYSYMBOL_system_task_enable = 489, /* system_task_enable */ + YYSYMBOL_task_enable = 490, /* task_enable */ + YYSYMBOL_specify_block = 491, /* specify_block */ + YYSYMBOL_specify_items_o = 492, /* specify_items_o */ + YYSYMBOL_specify_items = 493, /* specify_items */ + YYSYMBOL_specify_item = 494, /* specify_item */ + YYSYMBOL_pulsestyle_declaration = 495, /* pulsestyle_declaration */ + YYSYMBOL_showcancelled_declaration = 496, /* showcancelled_declaration */ + YYSYMBOL_path_declaration = 497, /* path_declaration */ + YYSYMBOL_simple_path_declaration = 498, /* simple_path_declaration */ + YYSYMBOL_list_of_path_inputs = 499, /* list_of_path_inputs */ + YYSYMBOL_list_of_path_outputs = 500, /* list_of_path_outputs */ + YYSYMBOL_specify_input_terminal_descriptor = 501, /* specify_input_terminal_descriptor */ + YYSYMBOL_specify_output_terminal_descriptor = 502, /* specify_output_terminal_descriptor */ + YYSYMBOL_input_identifier = 503, /* input_identifier */ + YYSYMBOL_output_identifier = 504, /* output_identifier */ + YYSYMBOL_path_delay_value = 505, /* path_delay_value */ + YYSYMBOL_list_of_path_delay_expressions = 506, /* list_of_path_delay_expressions */ + YYSYMBOL_path_delay_expression = 507, /* path_delay_expression */ + YYSYMBOL_edge_sensitive_path_declaration = 508, /* edge_sensitive_path_declaration */ + YYSYMBOL_data_source_expression = 509, /* data_source_expression */ + YYSYMBOL_edge_identifier_o = 510, /* edge_identifier_o */ + YYSYMBOL_edge_identifier = 511, /* edge_identifier */ + YYSYMBOL_state_dependent_path_declaration = 512, /* state_dependent_path_declaration */ + YYSYMBOL_polarity_operator_o = 513, /* polarity_operator_o */ + YYSYMBOL_polarity_operator = 514, /* polarity_operator */ + YYSYMBOL_system_timing_check = 515, /* system_timing_check */ + YYSYMBOL_concatenation = 516, /* concatenation */ + YYSYMBOL_concatenation_cont = 517, /* concatenation_cont */ + YYSYMBOL_constant_concatenation = 518, /* constant_concatenation */ + YYSYMBOL_constant_concatenation_cont = 519, /* constant_concatenation_cont */ + YYSYMBOL_multiple_concatenation = 520, /* multiple_concatenation */ + YYSYMBOL_constant_multiple_concatenation = 521, /* constant_multiple_concatenation */ + YYSYMBOL_module_path_concatenation = 522, /* module_path_concatenation */ + YYSYMBOL_modpath_concatenation_cont = 523, /* modpath_concatenation_cont */ + YYSYMBOL_module_path_multiple_concatenation = 524, /* module_path_multiple_concatenation */ + YYSYMBOL_net_concatenation = 525, /* net_concatenation */ + YYSYMBOL_net_concatenation_cont = 526, /* net_concatenation_cont */ + YYSYMBOL_sq_bracket_expressions = 527, /* sq_bracket_expressions */ + YYSYMBOL_net_concatenation_value = 528, /* net_concatenation_value */ + YYSYMBOL_variable_concatenation = 529, /* variable_concatenation */ + YYSYMBOL_variable_concatenation_cont = 530, /* variable_concatenation_cont */ + YYSYMBOL_variable_concatenation_value = 531, /* variable_concatenation_value */ + YYSYMBOL_constant_expressions = 532, /* constant_expressions */ + YYSYMBOL_expressions = 533, /* expressions */ + YYSYMBOL_constant_function_call = 534, /* constant_function_call */ + YYSYMBOL_constant_function_call_pid = 535, /* constant_function_call_pid */ + YYSYMBOL_function_call = 536, /* function_call */ + YYSYMBOL_system_function_call = 537, /* system_function_call */ + YYSYMBOL_conditional_expression = 538, /* conditional_expression */ + YYSYMBOL_constant_expression = 539, /* constant_expression */ + YYSYMBOL_constant_mintypmax_expression = 540, /* constant_mintypmax_expression */ + YYSYMBOL_constant_range_expression = 541, /* constant_range_expression */ + YYSYMBOL_expression = 542, /* expression */ + YYSYMBOL_mintypmax_expression = 543, /* mintypmax_expression */ + YYSYMBOL_module_path_conditional_expression = 544, /* module_path_conditional_expression */ + YYSYMBOL_module_path_expression = 545, /* module_path_expression */ + YYSYMBOL_module_path_mintypemax_expression = 546, /* module_path_mintypemax_expression */ + YYSYMBOL_range_expression = 547, /* range_expression */ + YYSYMBOL_constant_primary = 548, /* constant_primary */ + YYSYMBOL_primary = 549, /* primary */ + YYSYMBOL_module_path_primary = 550, /* module_path_primary */ + YYSYMBOL_sq_bracket_constant_expressions = 551, /* sq_bracket_constant_expressions */ + YYSYMBOL_net_lvalue = 552, /* net_lvalue */ + YYSYMBOL_variable_lvalue = 553, /* variable_lvalue */ + YYSYMBOL_unary_operator = 554, /* unary_operator */ + YYSYMBOL_unary_module_path_operator = 555, /* unary_module_path_operator */ + YYSYMBOL_binary_module_path_operator = 556, /* binary_module_path_operator */ + YYSYMBOL_unsigned_number = 557, /* unsigned_number */ + YYSYMBOL_number = 558, /* number */ + YYSYMBOL_string = 559, /* string */ + YYSYMBOL_attribute_instances = 560, /* attribute_instances */ + YYSYMBOL_list_of_attribute_instances = 561, /* list_of_attribute_instances */ + YYSYMBOL_attr_specs = 562, /* attr_specs */ + YYSYMBOL_attr_spec = 563, /* attr_spec */ + YYSYMBOL_attr_name = 564, /* attr_name */ + YYSYMBOL_escaped_arrayed_identifier = 565, /* escaped_arrayed_identifier */ + YYSYMBOL_escaped_hierarchical_identifier = 566, /* escaped_hierarchical_identifier */ + YYSYMBOL_escaped_hierarchical_identifiers = 567, /* escaped_hierarchical_identifiers */ + YYSYMBOL_arrayed_identifier = 568, /* arrayed_identifier */ + YYSYMBOL_hierarchical_identifier = 569, /* hierarchical_identifier */ + YYSYMBOL_hierarchical_net_identifier = 570, /* hierarchical_net_identifier */ + YYSYMBOL_hierarchical_variable_identifier = 571, /* hierarchical_variable_identifier */ + YYSYMBOL_hierarchical_task_identifier = 572, /* hierarchical_task_identifier */ + YYSYMBOL_hierarchical_block_identifier = 573, /* hierarchical_block_identifier */ + YYSYMBOL_hierarchical_event_identifier = 574, /* hierarchical_event_identifier */ + YYSYMBOL_hierarchical_function_identifier = 575, /* hierarchical_function_identifier */ + YYSYMBOL_gate_instance_identifier = 576, /* gate_instance_identifier */ + YYSYMBOL_module_instance_identifier = 577, /* module_instance_identifier */ + YYSYMBOL_udp_instance_identifier = 578, /* udp_instance_identifier */ + YYSYMBOL_block_identifier = 579, /* block_identifier */ + YYSYMBOL_cell_identifier = 580, /* cell_identifier */ + YYSYMBOL_config_identifier = 581, /* config_identifier */ + YYSYMBOL_event_identifier = 582, /* event_identifier */ + YYSYMBOL_function_identifier = 583, /* function_identifier */ + YYSYMBOL_generate_block_identifier = 584, /* generate_block_identifier */ + YYSYMBOL_genvar_identifier = 585, /* genvar_identifier */ + YYSYMBOL_inout_port_identifier = 586, /* inout_port_identifier */ + YYSYMBOL_input_port_identifier = 587, /* input_port_identifier */ + YYSYMBOL_instance_identifier = 588, /* instance_identifier */ + YYSYMBOL_library_identifier = 589, /* library_identifier */ + YYSYMBOL_module_identifier = 590, /* module_identifier */ + YYSYMBOL_net_identifier = 591, /* net_identifier */ + YYSYMBOL_output_port_identifier = 592, /* output_port_identifier */ + YYSYMBOL_specparam_identifier = 593, /* specparam_identifier */ + YYSYMBOL_task_identifier = 594, /* task_identifier */ + YYSYMBOL_topmodule_identifier = 595, /* topmodule_identifier */ + YYSYMBOL_udp_identifier = 596, /* udp_identifier */ + YYSYMBOL_variable_identifier = 597, /* variable_identifier */ + YYSYMBOL_parameter_identifier = 598, /* parameter_identifier */ + YYSYMBOL_port_identifier = 599, /* port_identifier */ + YYSYMBOL_real_identifier = 600, /* real_identifier */ + YYSYMBOL_identifier = 601, /* identifier */ + YYSYMBOL_simple_identifier = 602, /* simple_identifier */ + YYSYMBOL_escaped_identifier = 603, /* escaped_identifier */ + YYSYMBOL_simple_arrayed_identifier = 604, /* simple_arrayed_identifier */ + YYSYMBOL_simple_hierarchical_identifier = 605, /* simple_hierarchical_identifier */ + YYSYMBOL_system_function_identifier = 606, /* system_function_identifier */ + YYSYMBOL_system_task_identifier = 607, /* system_task_identifier */ + YYSYMBOL_simple_hierarchical_branch = 608, /* simple_hierarchical_branch */ + YYSYMBOL_escaped_hierarchical_branch = 609 /* escaped_hierarchical_branch */ +}; +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 + +#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 YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# 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 1 + +/* 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 /* 1 */ + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (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; +}; + +/* 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)) \ + + 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 35 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 11170 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 212 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 398 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 1018 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 2114 + +/* YYMAXUTOK -- Last valid token kind. */ +#define YYMAXUTOK 453 + + +/* 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_uint8 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, 2, 2, 2, 199, 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, 202, 2, 2, 2, + 207, 2, 2, 2, 2, 2, 2, 2, 211, 2, + 209, 2, 205, 2, 2, 2, 2, 2, 200, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 203, 2, + 2, 2, 206, 2, 2, 2, 2, 2, 2, 2, + 210, 2, 208, 2, 204, 2, 2, 2, 2, 2, + 201, 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, + 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, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198 +}; + +#if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_int16 yyrline[] = +{ + 0, 176, 176, 182, 186, 217, 225, 226, 229, 230, + 233, 240, 245, 253, 257, 261, 268, 271, 278, 282, + 288, 291, 293, 299, 305, 311, 312, 315, 318, 325, + 335, 338, 342, 349, 354, 359, 362, 367, 372, 376, + 384, 385, 386, 397, 400, 406, 410, 413, 417, 424, + 428, 432, 435, 443, 447, 454, 457, 463, 476, 492, + 493, 498, 501, 507, 511, 517, 520, 526, 529, 535, + 540, 545, 553, 559, 565, 571, 577, 585, 588, 592, + 599, 600, 601, 605, 606, 607, 610, 613, 617, 624, + 627, 633, 637, 644, 647, 650, 657, 660, 664, 670, + 673, 677, 684, 687, 691, 695, 699, 703, 707, 714, + 717, 721, 725, 729, 733, 737, 741, 748, 752, 756, + 760, 764, 768, 772, 776, 780, 784, 791, 795, 799, + 802, 806, 810, 817, 822, 822, 823, 823, 826, 829, + 833, 837, 841, 848, 851, 855, 859, 863, 870, 878, + 878, 879, 879, 882, 888, 894, 897, 901, 909, 917, + 928, 932, 936, 940, 944, 948, 953, 953, 954, 954, + 957, 961, 966, 970, 975, 983, 987, 991, 995, 999, + 1003, 1007, 1011, 1015, 1019, 1023, 1032, 1036, 1043, 1047, + 1050, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1070, + 1070, 1071, 1072, 1075, 1076, 1077, 1085, 1089, 1093, 1099, + 1102, 1105, 1116, 1119, 1122, 1125, 1128, 1131, 1137, 1138, + 1139, 1140, 1144, 1145, 1146, 1147, 1150, 1151, 1152, 1158, + 1161, 1164, 1167, 1170, 1176, 1179, 1182, 1185, 1191, 1194, + 1197, 1200, 1207, 1208, 1214, 1218, 1225, 1229, 1236, 1240, + 1247, 1251, 1258, 1262, 1266, 1273, 1277, 1282, 1286, 1295, + 1299, 1306, 1310, 1317, 1321, 1328, 1329, 1333, 1338, 1348, + 1351, 1356, 1361, 1364, 1369, 1370, 1374, 1378, 1387, 1388, + 1389, 1393, 1398, 1405, 1405, 1408, 1412, 1420, 1424, 1428, + 1434, 1438, 1442, 1448, 1453, 1461, 1466, 1469, 1475, 1475, + 1478, 1482, 1486, 1490, 1494, 1503, 1507, 1514, 1517, 1521, + 1528, 1533, 1538, 1543, 1551, 1555, 1562, 1563, 1564, 1568, + 1571, 1578, 1581, 1588, 1591, 1597, 1597, 1598, 1599, 1600, + 1601, 1608, 1612, 1616, 1620, 1624, 1628, 1632, 1636, 1643, + 1649, 1653, 1659, 1660, 1665, 1665, 1668, 1672, 1676, 1680, + 1684, 1688, 1692, 1696, 1701, 1710, 1711, 1714, 1717, 1720, + 1723, 1726, 1732, 1735, 1738, 1739, 1743, 1747, 1755, 1764, + 1767, 1770, 1773, 1780, 1788, 1794, 1798, 1805, 1811, 1812, + 1813, 1814, 1820, 1823, 1826, 1829, 1836, 1845, 1851, 1852, + 1853, 1854, 1855, 1856, 1862, 1865, 1868, 1871, 1877, 1881, + 1889, 1899, 1903, 1910, 1914, 1921, 1925, 1932, 1936, 1943, + 1947, 1955, 1961, 1969, 1976, 1983, 1990, 1994, 2001, 2005, + 2013, 2014, 2019, 2022, 2025, 2030, 2031, 2036, 2039, 2042, + 2049, 2050, 2056, 2057, 2058, 2059, 2060, 2061, 2066, 2068, + 2073, 2075, 2077, 2079, 2084, 2086, 2093, 2097, 2102, 2103, + 2108, 2112, 2113, 2117, 2121, 2127, 2131, 2137, 2141, 2147, + 2152, 2158, 2163, 2167, 2170, 2171, 2175, 2179, 2186, 2190, + 2196, 2206, 2211, 2212, 2216, 2225, 2229, 2235, 2235, 2238, + 2241, 2244, 2247, 2250, 2260, 2265, 2272, 2279, 2283, 2287, + 2293, 2296, 2300, 2307, 2315, 2321, 2328, 2336, 2348, 2355, + 2359, 2367, 2373, 2377, 2384, 2391, 2395, 2402, 2403, 2404, + 2408, 2411, 2414, 2420, 2425, 2433, 2436, 2439, 2444, 2448, + 2454, 2458, 2464, 2469, 2472, 2478, 2483, 2484, 2488, 2491, + 2496, 2500, 2506, 2511, 2516, 2519, 2520, 2524, 2525, 2526, + 2527, 2528, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2542, + 2543, 2544, 2545, 2546, 2547, 2548, 2549, 2550, 2559, 2565, + 2571, 2575, 2582, 2586, 2595, 2601, 2605, 2611, 2617, 2618, + 2620, 2624, 2629, 2629, 2632, 2635, 2638, 2641, 2644, 2647, + 2652, 2656, 2657, 2663, 2667, 2674, 2675, 2678, 2682, 2689, + 2692, 2698, 2703, 2706, 2712, 2715, 2723, 2726, 2731, 2735, + 2742, 2745, 2748, 2751, 2754, 2757, 2760, 2763, 2766, 2769, + 2772, 2775, 2778, 2781, 2784, 2789, 2790, 2791, 2795, 2798, + 2801, 2804, 2807, 2810, 2813, 2816, 2825, 2832, 2839, 2847, + 2858, 2861, 2868, 2871, 2877, 2886, 2889, 2894, 2897, 2903, + 2907, 2910, 2913, 2916, 2919, 2925, 2933, 2937, 2942, 2946, + 2952, 2961, 2965, 2973, 2977, 2982, 2988, 2993, 3001, 3007, + 3018, 3021, 3024, 3030, 3034, 3048, 3051, 3055, 3062, 3067, + 3072, 3080, 3084, 3091, 3095, 3099, 3108, 3111, 3114, 3117, + 3124, 3127, 3130, 3133, 3143, 3146, 3152, 3155, 3163, 3166, + 3167, 3171, 3175, 3181, 3182, 3183, 3184, 3185, 3188, 3189, + 3192, 3193, 3198, 3199, 3200, 3204, 3211, 3222, 3226, 3233, + 3237, 3246, 3247, 3248, 3252, 3253, 3254, 3257, 3258, 3261, + 3262, 3267, 3268, 3273, 3277, 3281, 3287, 3297, 3318, 3324, + 3331, 3340, 3342, 3343, 3345, 3346, 3350, 3363, 3377, 3382, + 3383, 3386, 3387, 3392, 3401, 3408, 3411, 3418, 3425, 3428, + 3435, 3439, 3446, 3450, 3457, 3464, 3467, 3474, 3481, 3488, + 3491, 3498, 3502, 3506, 3513, 3516, 3519, 3522, 3525, 3531, + 3538, 3541, 3548, 3551, 3554, 3557, 3560, 3569, 3573, 3580, + 3584, 3591, 3598, 3603, 3610, 3613, 3616, 3625, 3632, 3634, + 3637, 3640, 3643, 3646, 3649, 3652, 3655, 3658, 3661, 3664, + 3667, 3670, 3673, 3676, 3679, 3682, 3685, 3688, 3691, 3694, + 3697, 3700, 3703, 3706, 3709, 3713, 3718, 3721, 3727, 3731, + 3734, 3740, 3743, 3746, 3749, 3752, 3755, 3758, 3761, 3764, + 3767, 3770, 3773, 3776, 3779, 3782, 3785, 3788, 3791, 3794, + 3797, 3800, 3803, 3806, 3809, 3812, 3815, 3818, 3821, 3824, + 3825, 3830, 3833, 3839, 3847, 3851, 3855, 3860, 3866, 3870, + 3879, 3882, 3886, 3895, 3899, 3902, 3906, 3910, 3914, 3918, + 3922, 3926, 3933, 3937, 3940, 3944, 3948, 3951, 3955, 3960, + 3964, 3968, 3972, 3976, 3983, 3988, 3993, 3998, 4003, 4006, + 4009, 4012, 4016, 4025, 4026, 4031, 4034, 4037, 4041, 4045, + 4051, 4054, 4057, 4061, 4065, 4073, 4074, 4075, 4076, 4077, + 4078, 4079, 4080, 4081, 4082, 4086, 4087, 4088, 4089, 4090, + 4091, 4092, 4093, 4096, 4097, 4098, 4099, 4100, 4101, 4102, + 4103, 4109, 4115, 4118, 4121, 4124, 4127, 4130, 4133, 4136, + 4139, 4142, 4148, 4152, 4153, 4157, 4160, 4170, 4171, 4174, + 4181, 4184, 4189, 4203, 4211, 4214, 4220, 4221, 4222, 4225, + 4235, 4236, 4240, 4241, 4244, 4247, 4250, 4253, 4256, 4259, + 4262, 4265, 4268, 4271, 4274, 4277, 4280, 4283, 4286, 4289, + 4292, 4295, 4298, 4301, 4304, 4309, 4312, 4316, 4319, 4322, + 4325, 4328, 4331, 4334, 4337, 4342, 4347, 4352, 4353, 4354, + 4358, 4361, 4367, 4371, 4379, 4380, 4385, 4389, 4400, 4403, + 4407, 4411, 4414, 4420, 4433, 4436, 4441, 4444, 4448 +}; +#endif + +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if 1 +/* 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\"", "END", "ANY", + "NEWLINE", "SPACE", "TAB", "AT", "COMMA", "HASH", "DOT", "EQ", "COLON", + "IDX_PRT_SEL", "SEMICOLON", "OPEN_BRACKET", "CLOSE_BRACKET", + "OPEN_SQ_BRACKET", "CLOSE_SQ_BRACKET", "OPEN_SQ_BRACE", "CLOSE_SQ_BRACE", + "BIN_VALUE", "OCT_VALUE", "HEX_VALUE", "DEC_VALUE", "DEC_BASE", + "BIN_BASE", "OCT_BASE", "HEX_BASE", "NUM_REAL", "NUM_SIZE", + "UNSIGNED_NUMBER", "SYSTEM_ID", "SIMPLE_ID", "ESCAPED_ID", "DEFINE_ID", + "ATTRIBUTE_START", "ATTRIBUTE_END", "COMMENT_LINE", "COMMENT_BLOCK", + "STRING", "STAR", "PLUS", "MINUS", "ASL", "ASR", "LSL", "LSR", "DIV", + "POW", "MOD", "GTE", "LTE", "GT", "LT", "L_NEG", "L_AND", "L_OR", "C_EQ", + "L_EQ", "C_NEQ", "L_NEQ", "B_NEG", "B_AND", "B_OR", "B_XOR", "B_EQU", + "B_NAND", "B_NOR", "TERNARY", "UNARY_OP", "MACRO_TEXT", + "MACRO_IDENTIFIER", "KW_ALWAYS", "KW_AND", "KW_ASSIGN", "KW_AUTOMATIC", + "KW_BEGIN", "KW_BUF", "KW_BUFIF0", "KW_BUFIF1", "KW_CASE", "KW_CASEX", + "KW_CASEZ", "KW_CELL", "KW_CMOS", "KW_CONFIG", "KW_DEASSIGN", + "KW_DEFAULT", "KW_DEFPARAM", "KW_DESIGN", "KW_DISABLE", "KW_EDGE", + "KW_ELSE", "KW_END", "KW_ENDCASE", "KW_ENDCONFIG", "KW_ENDFUNCTION", + "KW_ENDGENERATE", "KW_ENDMODULE", "KW_ENDPRIMITIVE", "KW_ENDSPECIFY", + "KW_ENDTABLE", "KW_ENDTASK", "KW_EVENT", "KW_FOR", "KW_FORCE", + "KW_FOREVER", "KW_FORK", "KW_FUNCTION", "KW_GENERATE", "KW_GENVAR", + "KW_HIGHZ0", "KW_HIGHZ1", "KW_IF", "KW_IFNONE", "KW_INCDIR", + "KW_INCLUDE", "KW_INITIAL", "KW_INOUT", "KW_INPUT", "KW_INSTANCE", + "KW_INTEGER", "KW_JOIN", "KW_LARGE", "KW_LIBLIST", "KW_LIBRARY", + "KW_LOCALPARAM", "KW_MACROMODULE", "KW_MEDIUM", "KW_MODULE", "KW_NAN", + "KW_NEGEDGE", "KW_NMOS", "KW_NOR", "KW_NOSHOWCANCELLED", "KW_NOT", + "KW_NOTIF0", "KW_NOTIF1", "KW_OR", "KW_OUTPUT", "KW_PARAMETER", + "KW_PATHPULSE", "KW_PMOS", "KW_POSEDGE", "KW_PRIMITIVE", "KW_PULL0", + "KW_PULL1", "KW_PULLDOWN", "KW_PULLUP", "KW_PULSESTYLE_ONEVENT", + "KW_PULSESTYLE_ONDETECT", "KW_RCMOS", "KW_REAL", "KW_REALTIME", "KW_REG", + "KW_RELEASE", "KW_REPEAT", "KW_RNMOS", "KW_RPMOS", "KW_RTRAN", + "KW_RTRANIF0", "KW_RTRANIF1", "KW_SCALARED", "KW_SHOWCANCELLED", + "KW_SIGNED", "KW_SMALL", "KW_SPECIFY", "KW_SPECPARAM", "KW_STRONG0", + "KW_STRONG1", "KW_SUPPLY0", "KW_SUPPLY1", "KW_TABLE", "KW_TASK", + "KW_TIME", "KW_TRAN", "KW_TRANIF0", "KW_TRANIF1", "KW_TRI", "KW_TRI0", + "KW_TRI1", "KW_TRIAND", "KW_TRIOR", "KW_TRIREG", "KW_UNSIGNED", "KW_USE", + "KW_VECTORED", "KW_WAIT", "KW_WAND", "KW_WEAK0", "KW_WEAK1", "KW_WHILE", + "KW_WIRE", "KW_WOR", "KW_XNOR", "KW_XOR", "KW_NAND", "'$'", "'X'", "'x'", + "'B'", "'b'", "'r'", "'R'", "'f'", "'F'", "'p'", "'P'", "'n'", "'N'", + "$accept", "grammar_begin", "text_macro_usage", + "list_of_actual_arguments", "actual_argument", "library_text", + "library_descriptions", "library_declaration", "file_path_specs", + "file_path_spec", "file_path", "include_statement", "config_declaration", + "design_statement", "lib_cell_identifier_os", "config_rule_statement_os", + "config_rule_statement", "inst_clause", "inst_name", + "instance_identifier_os", "cell_clause", "liblist_clause", + "library_identifier_os", "use_clause", "source_text", "description", + "module_declaration", "module_keyword", "module_parameter_port_list", + "module_params", "list_of_ports", "list_of_port_declarations", + "port_declarations", "port_declaration_l", "identifier_csv", "port_dir", + "port_declaration", "ports", "port", "port_expression", "port_reference", + "module_item_os", "non_port_module_item_os", "module_item", + "module_or_generate_item", "module_or_generate_item_declaration", + "non_port_module_item", "parameter_override", "signed_o", "range_o", + "local_parameter_declaration", "parameter_declaration", + "specparam_declaration", "net_type_o", "reg_o", "inout_declaration", + "input_declaration", "output_declaration", "event_declaration", + "genvar_declaration", "integer_declaration", "time_declaration", + "real_declaration", "realtime_declaration", "delay3_o", + "drive_strength_o", "net_declaration", "net_dec_p_ds", "net_dec_p_vs", + "net_dec_p_si", "net_dec_p_range", "net_dec_p_delay", "reg_declaration", + "reg_dec_p_signed", "reg_dec_p_range", "net_type", + "output_variable_type_o", "output_variable_type", "real_type", + "dimensions", "variable_type", "drive_strength", "strength0", + "strength1", "charge_strength", "delay3", "delay2", "delay_value", + "dimensions_o", "list_of_event_identifiers", + "list_of_genvar_identifiers", "list_of_net_decl_assignments", + "list_of_net_identifiers", "list_of_param_assignments", + "list_of_port_identifiers", "list_of_real_identifiers", + "list_of_specparam_assignments", "list_of_variable_identifiers", + "eq_const_exp_o", "list_of_variable_port_identifiers", + "net_decl_assignment", "param_assignment", "specparam_assignment", + "error_limit_value_o", "pulse_control_specparam", "error_limit_value", + "reject_limit_value", "limit_value", "dimension", "range", "automatic_o", + "function_declaration", "block_item_declarations", + "function_item_declarations", "function_item_declaration", + "function_port_list", "tf_input_declarations", "range_or_type_o", + "range_or_type", "task_declaration", "task_item_declarations", + "task_item_declaration", "task_port_list", "task_port_item", + "tf_input_declaration", "tf_output_declaration", "tf_inout_declaration", + "task_port_type_o", "task_port_type", "block_item_declaration", + "block_reg_declaration", "list_of_block_variable_identifiers", + "block_variable_type", "delay2_o", "gate_instantiation", "OB", "CB", + "gate_n_output", "gate_n_output_a_id", "gatetype_n_output", + "n_output_gate_instances", "n_output_gate_instance", "gate_enable", + "enable_gate_instances", "enable_gate_instance", "enable_gatetype", + "gate_n_input", "gatetype_n_input", "gate_pass_en_switch", + "pass_enable_switch_instances", "pass_enable_switch_instance", + "pull_gate_instances", "pass_switch_instances", "n_input_gate_instances", + "mos_switch_instances", "cmos_switch_instances", "pull_gate_instance", + "pass_switch_instance", "n_input_gate_instance", "mos_switch_instance", + "cmos_switch_instance", "output_terminals", "input_terminals", + "pulldown_strength_o", "pulldown_strength", "pullup_strength_o", + "pullup_strength", "name_of_gate_instance", "enable_terminal", + "input_terminal", "ncontrol_terminal", "pcontrol_terminal", + "inout_terminal", "output_terminal", "cmos_switchtype", "mos_switchtype", + "pass_switchtype", "module_instantiation", + "parameter_value_assignment_o", "parameter_value_assignment", + "list_of_parameter_assignments", "ordered_parameter_assignments", + "named_parameter_assignments", "module_instances", + "ordered_parameter_assignment", "named_parameter_assignment", + "module_instance", "name_of_instance", "list_of_port_connections", + "ordered_port_connections", "named_port_connections", + "ordered_port_connection", "named_port_connection", "expression_o", + "generated_instantiation", "generate_items", "generate_item_or_null", + "generate_item", "generate_conditional_statement", + "generate_case_statement", "genvar_case_items", "genvar_case_item", + "generate_loop_statement", "genvar_assignment", "generate_block", + "udp_declaration", "udp_port_declarations", "udp_port_list", + "input_port_identifiers", "udp_declaration_port_list", + "udp_input_declarations", "udp_port_declaration", + "udp_output_declaration", "udp_input_declaration", "udp_reg_declaration", + "udp_body", "sequential_entrys", "combinational_entrys", + "combinational_entry", "sequential_entry", "udp_initial_statement", + "init_val", "level_symbols_o", "level_symbols", "edge_input_list", + "edge_indicator", "next_state", "output_symbol", "level_symbol", + "edge_symbol", "udp_instantiation", "udp_instances", "udp_instance", + "continuous_assign", "list_of_net_assignments", "net_assignment", + "initial_construct", "always_construct", "blocking_assignment", + "nonblocking_assignment", "delay_or_event_control_o", + "procedural_continuous_assignments", "function_blocking_assignment", + "function_statement_or_null", "function_statements_o", + "function_statements", "function_seq_block", "variable_assignment", + "par_block", "seq_block", "statements_o", "statements", "statement", + "statement_or_null", "function_statement", + "procedural_timing_control_statement", "delay_or_event_control", + "delay_control", "disable_statement", "event_control", "event_trigger", + "event_expression", "wait_statement", "conditional_statement", + "if_else_if_statement", "else_if_statements", + "function_conditional_statement", "function_else_if_statements", + "function_if_else_if_statement", "case_statement", "case_items", + "case_item", "function_case_statement", "function_case_items", + "function_case_item", "function_loop_statement", "loop_statement", + "system_task_enable", "task_enable", "specify_block", "specify_items_o", + "specify_items", "specify_item", "pulsestyle_declaration", + "showcancelled_declaration", "path_declaration", + "simple_path_declaration", "list_of_path_inputs", "list_of_path_outputs", + "specify_input_terminal_descriptor", + "specify_output_terminal_descriptor", "input_identifier", + "output_identifier", "path_delay_value", + "list_of_path_delay_expressions", "path_delay_expression", + "edge_sensitive_path_declaration", "data_source_expression", + "edge_identifier_o", "edge_identifier", + "state_dependent_path_declaration", "polarity_operator_o", + "polarity_operator", "system_timing_check", "concatenation", + "concatenation_cont", "constant_concatenation", + "constant_concatenation_cont", "multiple_concatenation", + "constant_multiple_concatenation", "module_path_concatenation", + "modpath_concatenation_cont", "module_path_multiple_concatenation", + "net_concatenation", "net_concatenation_cont", "sq_bracket_expressions", + "net_concatenation_value", "variable_concatenation", + "variable_concatenation_cont", "variable_concatenation_value", + "constant_expressions", "expressions", "constant_function_call", + "constant_function_call_pid", "function_call", "system_function_call", + "conditional_expression", "constant_expression", + "constant_mintypmax_expression", "constant_range_expression", + "expression", "mintypmax_expression", + "module_path_conditional_expression", "module_path_expression", + "module_path_mintypemax_expression", "range_expression", + "constant_primary", "primary", "module_path_primary", + "sq_bracket_constant_expressions", "net_lvalue", "variable_lvalue", + "unary_operator", "unary_module_path_operator", + "binary_module_path_operator", "unsigned_number", "number", "string", + "attribute_instances", "list_of_attribute_instances", "attr_specs", + "attr_spec", "attr_name", "escaped_arrayed_identifier", + "escaped_hierarchical_identifier", "escaped_hierarchical_identifiers", + "arrayed_identifier", "hierarchical_identifier", + "hierarchical_net_identifier", "hierarchical_variable_identifier", + "hierarchical_task_identifier", "hierarchical_block_identifier", + "hierarchical_event_identifier", "hierarchical_function_identifier", + "gate_instance_identifier", "module_instance_identifier", + "udp_instance_identifier", "block_identifier", "cell_identifier", + "config_identifier", "event_identifier", "function_identifier", + "generate_block_identifier", "genvar_identifier", + "inout_port_identifier", "input_port_identifier", "instance_identifier", + "library_identifier", "module_identifier", "net_identifier", + "output_port_identifier", "specparam_identifier", "task_identifier", + "topmodule_identifier", "udp_identifier", "variable_identifier", + "parameter_identifier", "port_identifier", "real_identifier", + "identifier", "simple_identifier", "escaped_identifier", + "simple_arrayed_identifier", "simple_hierarchical_identifier", + "system_function_identifier", "system_task_identifier", + "simple_hierarchical_branch", "escaped_hierarchical_branch", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} +#endif + +#ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_int16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, + 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 36, + 88, 120, 66, 98, 114, 82, 102, 70, 112, 80, + 110, 78 +}; +#endif + +#define YYPACT_NINF (-1790) + +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) + +#define YYTABLE_NINF (-1017) + +#define yytable_value_is_error(Yyn) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = +{ + 411, 714, 714, 62, 714, 154, 609, -1790, -1790, -1790, + 290, 119, -1790, -1790, -1790, 226, -1790, -1790, -1790, 6311, + -1790, 261, -1790, 300, -1790, -1790, -1790, 417, -1790, -1790, + 444, -1790, -1790, 62, -1790, -1790, -1790, -1790, -1790, 714, + -1790, -1790, 714, 714, 6311, 6381, 366, 445, 500, 517, + -1790, 1827, -1790, 1279, -1790, -1790, -1790, -1790, -1790, -1790, + -1790, -1790, -1790, -1790, -1790, 598, -1790, -1790, -1790, -1790, + -1790, -1790, 9077, -1790, 529, -1790, -1790, -1790, -1790, 260, + 529, 634, -1790, 652, 616, 126, 714, -1790, 8103, 628, + -1790, 427, -1790, 441, 686, -1790, 735, -1790, 6204, 763, + 6381, 6381, 1527, 947, -1790, -1790, -1790, 4141, 5483, -1790, + 529, 570, 708, 260, 529, -1790, -1790, -1790, 643, 710, + -1790, -1790, -1790, -1790, 849, 784, 824, 834, 6311, -1790, + 757, 6311, 529, 529, 529, 529, 529, 529, 529, 529, + 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, + 529, 529, 529, 529, 529, 529, 529, 529, 529, 2229, + 6311, 900, -1790, 830, 6311, 3739, 1017, 1565, 886, 920, + -1790, 8103, 6381, 1212, 841, 9366, 529, -1790, -1790, -1790, + 714, 560, 62, -1790, 62, -1790, 1233, 934, 1009, 6311, + -1790, 6867, 963, 5036, 5537, 6311, 6311, -1790, 529, 529, + 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, + 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, + 529, 529, 529, 982, -1790, -1790, 2622, 846, -1790, -1790, + -1790, -1790, 4535, 1011, 8103, -1790, 3551, 3551, 3551, 3551, + 3551, 3551, 3551, 3551, 3551, 3551, 3551, 3551, 3551, 3551, + 3551, 3551, 3551, 3551, 3551, 3551, 3551, 3551, 3551, 3551, + 3551, 3551, 3551, -1790, 5870, 1036, 6311, 6311, 5928, 1069, + -1790, 150, 9077, 1053, -1790, -1790, -1790, 1083, -1790, 1088, + -1790, 611, 1124, 5645, 5591, 3154, 1039, -1790, 1111, 1172, + 714, 1018, 714, 1046, -1790, 1, 1, -1790, 148, 1187, + 1242, 1255, 174, 1268, -1790, 1140, 1165, 1276, 1317, 6247, + 8103, -1790, 6311, 6311, 1335, 1337, -1790, -1790, 5483, 6818, + 6818, 6818, 6818, 6818, 6818, 6818, 6818, 6818, 6818, 6818, + 6818, 6818, 6818, 6818, 6818, 6818, 6818, 6818, 6818, 6818, + 6818, 6818, 6818, 6818, -1790, -1790, 8103, 8103, 8103, -1790, + -1790, 155, 9366, 1351, 1418, 1418, 1362, 1362, 1362, 1362, + 1351, -1790, 1351, 2192, 2192, 2192, 2192, 8416, 8445, 4194, + 4194, 4194, 4194, 4470, 8688, 3651, 3651, 4470, 8688, 6468, + 1376, -1790, 6127, 1482, 461, -1790, -1790, 6311, -1790, 6311, + 6311, 1565, 920, -1790, 6311, 6311, -1790, -1790, -1790, 1493, + 714, -1790, 1508, 714, -1790, -1790, 1517, -1790, -1790, -1790, + 714, -1790, -1790, -1790, -1790, -1790, 1529, 1551, 529, 113, + 714, 1451, 583, -1790, 714, -1790, 654, 1838, 863, -1790, + 1531, -1790, 662, 1544, -1790, 749, 529, 6311, 7065, 5483, + -1790, -1790, 1537, 1539, 1539, 1506, 1506, 1506, 1506, 1537, + -1790, 1537, 2388, 2388, 2388, 2388, 6440, 6100, 4693, 4693, + 4693, 4693, 4766, 8376, 5366, 5366, 7171, 924, 9366, 9366, + 8103, -1790, 6311, -1790, -1790, -1790, 9077, 5986, 1585, 6055, + 5483, 714, -1790, -1790, 714, 714, -1790, 714, 1566, 1599, + 1610, 529, 308, 97, -1790, 99, 714, -1790, 1614, -1790, + -1790, 1102, 1102, 1102, -1790, 1102, 1629, 1140, -1790, 1612, + 1289, -1790, -1790, 1474, -1790, -1790, -1790, -1790, -1790, -1790, + -1790, -1790, -1790, -1790, 1629, 1474, -1790, 714, 714, 983, + -1790, 714, -1790, -1790, -1790, 6381, 1722, 1722, 2178, 1649, + 672, -1790, -1790, -1790, -1790, -1790, 3159, 315, -1790, 520, + 9077, 8103, 1646, 8103, -1790, 9366, 9077, -1790, -1790, -1790, + -1790, -1790, -1790, -1790, -1790, -1790, 714, 1591, 714, 73, + -1790, 1673, 1678, 1693, 450, 714, 1186, 1611, 1548, -1790, + 714, 1712, 714, 1718, -1790, 1717, -1790, 1718, 1718, 1718, + 8103, 1102, -1790, -1790, 714, 714, 529, 1838, -1790, 1629, + 714, 1629, -1790, 1735, -1790, -1790, 10346, 1733, 1474, 1474, + 1474, 1474, 1474, 714, 714, -1790, -1790, -1790, 529, -1790, + 1738, -1790, -1790, -1790, 1746, 1102, 714, 1691, 804, 714, + 529, 714, 1619, 1746, -1790, -1790, -1790, -1790, -1790, 1746, + 1759, 1768, 1746, 714, 714, 642, 1746, 1746, 1783, 1783, + 1783, 1168, 1629, 1691, 714, 1783, 1783, 1783, 750, -1790, + -1790, -1790, -1790, -1790, -1790, 1788, -1790, -1790, -1790, -1790, + -1790, -1790, -1790, -1790, -1790, 1226, -1790, -1790, -1790, 1792, + 1329, 1796, 1336, 1798, 1336, 1802, 714, 714, 714, -1790, + -1790, -1790, -1790, -1790, -1790, -1790, 1809, 1738, 1806, -1790, + -1790, 714, -1790, -1790, 1811, -1790, -1790, -1790, 4145, 9366, + 9366, -1790, -1790, 1819, -1790, 1734, -1790, -1790, -1790, 714, + 1828, -1790, -1790, -1790, -1790, -1790, -1790, -1790, 358, 1045, + -1790, -1790, 717, 768, 1831, -1790, -1790, -1790, 1186, 1851, + 1845, 8103, -1790, 542, 8103, 7360, 1718, 1049, 870, 1838, + -1790, 714, -1790, 714, 8103, -1790, -1790, -1790, 1629, 1629, + 1629, 1629, 1629, 1851, 1875, 1735, -1790, 1487, 1438, 1746, + 6956, -1790, 596, 726, 1873, -1790, -1790, 1474, 880, 1877, + 1880, 1881, -1790, 907, -1790, -1790, -1790, -1790, -1790, 746, + -1790, -1790, -1790, -1790, 1052, 557, -1790, 1102, 1102, 1102, + 1102, 1629, -1790, -1790, 1578, 714, -1790, 1578, 714, -1790, + -1790, -1790, 1125, 876, -1790, 1146, 1294, -1790, -1790, 1228, + 714, -1790, -1790, 7481, -1790, 714, 714, 754, 1883, 1884, + 714, 714, 714, 714, -1790, 1807, 1168, -1790, -1790, -1790, + -1790, 1895, 1896, 1898, -1790, 87, 714, 1316, -1790, 714, + 714, 1345, 134, 802, 134, -1790, -1790, -1790, -1790, -1790, + 1065, 1102, 1339, 1366, -1790, 874, -1790, 1472, -1790, -1790, + 1438, -1790, -1790, -1790, 714, 1015, 1905, -1790, 1899, -1790, + -1790, 1629, 1629, 1629, -1790, -1790, 714, 1015, 1909, -1790, + 1904, -1790, 714, 1015, 1916, -1790, 1913, -1790, 1457, -1790, + 1914, 1490, -1790, 1915, 1499, -1790, 1918, 7542, 714, -1790, + 1783, 594, -1790, 1848, -1790, -1790, 1947, -1790, -1790, 964, + -1790, -1790, 978, 1186, -1790, -1790, -1790, -1790, -1790, -1790, + -1790, -1790, -1790, -1790, 1186, -1790, 1223, -1790, 1186, 1086, + 714, 8103, 9366, 1102, -1790, 9366, 8103, -1790, -1790, -1790, + 1735, -1790, 9366, 714, 714, 714, 714, 714, 714, -1790, + 1179, 7600, 953, -1790, 1885, 953, 351, 1921, 1922, 1924, + 953, 1565, 1928, 1177, 529, 140, 1929, 1177, 1931, 1935, + 1937, 1939, 1940, 1941, -1790, -1790, -1790, 271, -1790, -1790, + -1790, -1790, -1790, -1790, -1790, -1790, -1790, -1790, -1790, -1790, + 1942, 138, 1750, 1946, 1756, 1764, 1951, 1956, -1790, -1790, + -1790, -1790, -1790, -1790, -1790, -1790, -1790, 1959, 1960, 1348, + -1790, 7674, -1790, -1790, -1790, 2661, -1790, -1790, -1790, -1790, + 714, -1790, 8103, 1873, -1790, -1790, 60, 714, 987, 8103, + 714, 8103, -1790, -1790, 714, -1790, 714, -1790, 8103, 1873, + 1514, 1558, 1583, 1588, 1102, 1961, 1067, 1598, -1790, 1955, + 1971, 1107, 1622, 714, -1790, 8103, 1873, -1790, -1790, -1790, + -1790, 7674, -1790, 1972, -1790, 1966, 1972, -1790, -1790, 833, + 822, 6381, 714, -1790, -1790, -1790, -1790, 2566, 714, -1790, + 1623, -1790, 6381, -1790, -1790, -1790, 1624, 1626, 1633, -1790, + -1790, -1790, -1790, -1790, 1025, 1640, -1790, -1790, 1973, -1790, + 1767, -1790, -1790, 1972, 1972, 1967, 1974, 1976, 1065, -1790, + -1790, -1790, -1790, -1790, 1102, -1790, 1102, -1790, -1790, 6311, + -1790, 1065, 1905, 1348, 941, 1979, -1790, -1790, -1790, 1965, + 714, 1348, -1790, -1790, -1790, 1909, 941, 1980, 714, 1348, + 1916, 941, 1986, 714, 1348, 714, -1790, 1348, 714, -1790, + 1348, 714, -1790, 1348, 2743, 1987, 1659, -1790, 1985, -1790, + 1629, -1790, 1073, 562, -1790, 1981, -1790, -1790, 1186, 465, + 1186, -1790, 1186, 1990, 1992, 1994, 1995, 1997, 1996, 2000, + 2002, -1790, 1999, 10390, -1790, 10462, -1790, 1851, 1851, 1875, + 1851, 1851, 1735, 3078, 2006, -1790, -1790, 6311, -1790, -1790, + 800, -1790, 5145, 1565, -1790, 2012, 714, 1930, 92, -1790, + 6311, 6311, 6311, -1790, -1790, 2011, 2014, 953, 1177, -1790, + -1790, 2015, -1790, -1790, 714, 1906, 6311, -1790, -1790, 6311, + 6311, 6311, -1790, -1790, -1790, -1790, -1790, -1790, 1652, -1790, + 71, 71, 8103, 2013, -1790, 6311, -1790, 6311, 871, 1225, + 801, 835, 1664, -1790, 1110, 763, 1873, 7428, -1790, -1790, + -1790, -1790, -1790, -1790, 714, -1790, 804, -1790, -1790, 9460, + 2019, 2023, 9833, -1790, -1790, 9366, 1873, -1790, -1790, -1790, + -1790, 1666, 871, 1225, -1790, 714, -1790, 1348, 871, 1225, + -1790, -1790, -1790, 9366, 1873, 1184, 714, 1348, 714, -1790, + -1790, 2001, -1790, 2024, 9366, -1790, 416, 2026, 2566, 7737, + -1790, -1790, -1790, -1790, -1790, -1790, -1790, -1790, 841, -1790, + -1790, -1790, -1790, -1790, -1790, 2951, -1790, 529, -1790, -1790, + 643, 714, -1790, 9366, -1790, -1790, -1790, -1790, 2028, 1840, + 87, -1790, 8103, 529, 529, -1790, -1790, -1790, -1790, -1790, + 2030, 1873, 9077, -1790, -1790, 958, 5145, 714, 1905, 6311, + 8103, 2027, -1790, 2037, -1790, 714, 1909, 6311, -1790, 2038, + 714, 1916, 6311, -1790, 2039, -1790, 2041, -1790, 2042, -1790, + 2043, -1790, 1102, 2036, 2046, 2048, -1790, -1790, 6204, 2050, + 714, 714, -1790, 397, -1790, 1348, 1668, -1790, -1790, 1629, + -1790, -1790, -1790, -1790, -1790, -1790, 2045, -1790, 538, 538, + 8103, -1790, -1790, -1790, 2054, 6311, 6311, 66, 9077, -1790, + 2058, 953, -1790, -1790, 6311, -1790, -1790, -1790, 6311, 529, + -1790, -1790, -1790, 8647, 8729, 8768, -1790, -1790, 2061, 6311, + 529, -1790, 8814, 8868, 8927, 8991, -1790, 2063, 6311, -1790, + 6311, 6636, 2062, 8103, 1241, 1245, 2060, 2065, 2070, 2071, + 2073, 2077, 1348, -1790, 7674, -1790, -1790, 8103, 1800, -1790, + 990, 4913, 8103, 8103, 804, -1790, 2078, 2080, -1790, 2083, + 2085, 2087, 7674, -1790, -1790, 2049, -1790, 2052, 2059, 2064, + 2066, 1732, 2091, 7737, 7798, -1790, -1790, -1790, -1790, -1790, + -1790, -1790, -1790, 1189, -1790, 10652, 1637, 1002, 855, 2328, + 2096, -1790, -1790, -1790, -1790, -1790, -1790, -1790, -1790, 529, + 529, 2848, -1790, 8103, 714, -1790, -1790, 529, -1790, -1790, + 1180, 1257, -1790, 791, -1790, 1348, -1790, -1790, 6311, -1790, + 1905, 2098, 9077, 2100, 8103, 7861, 1909, 2112, 6311, 1916, + 1356, -1790, 6311, 6311, 6311, 1348, 2106, -1790, 6311, 2069, + 2743, 1700, -1790, 714, 2107, 2117, 2119, -1790, -1790, 3551, + 2120, 1073, -1790, 2116, -1790, -1790, 2118, -1790, 2121, 10506, + -1790, 9077, 9077, 2385, -1790, 2385, 4361, 800, -1790, 9077, + 359, -1790, 1577, 4004, 4004, 4004, 6311, 9077, 89, 271, + 661, 271, 529, 6311, 9077, 9077, 8103, 8103, 2123, -1790, + 6694, 2124, 2122, 2127, -1790, -1790, -1790, -1790, -1790, -1790, + -1790, 1368, 10543, 136, 529, -1790, 3351, 5262, -1790, 1344, + 8608, 9366, 2044, -1790, -1790, -1790, -1790, -1790, -1790, 2128, + 1348, 714, 714, 714, 714, 2566, -1790, 7798, 7798, 1041, + -1790, -1790, 5699, 1417, 2566, 2125, 2566, -1790, -1790, -1790, + -1790, 8181, 8181, -1790, 2130, -1790, -1790, 2132, -1790, 2047, + 2878, 1371, 1371, 1371, 1474, -1790, 2135, -1790, -1790, -1790, + -1790, -1790, 2137, 2140, 2142, -1790, 529, 2143, 2144, 2145, + 2146, 958, -1790, -1790, 2153, -1790, 2147, 7924, 2151, -1790, + 1133, 6311, 2160, 6311, 2161, 1398, 2162, 2163, 2157, 6311, + -1790, 9077, -1790, -1790, 2159, -1790, 529, 2166, -1790, 9077, + 6311, -1790, 1348, -1790, -1790, -1790, 83, 83, -1790, -1790, + 2084, 3048, 984, 2875, -1790, 1408, 3453, 3879, 6735, 2056, + 2088, -1790, -1790, -1790, -1790, 9045, 9366, 9366, 8103, -1790, + -1790, -1790, -1790, 7674, -1790, -1790, 136, -1790, 2168, -1790, + 2164, 141, 3795, -1790, -1790, -1790, 3795, 714, 804, -1790, + 2169, 1454, 2173, 893, 1794, 2433, 5758, 8044, -1790, 1637, + 2670, 2003, 8103, 2174, 2170, -1790, -1790, -1790, -1790, -1790, + -1790, 1474, 714, -1790, 1474, 714, 1474, 714, 1629, -1790, + -1790, -1790, -1790, -1790, 529, -1790, -1790, -1790, -1790, 714, + -1790, -1790, 7924, 2546, -1790, 2098, 9077, 6311, -1790, 714, + -1790, 6311, 6311, -1790, 2175, 6311, -1790, -1790, 1470, 2176, + -1790, 271, -1790, -1790, -1790, 271, -1790, -1790, 953, -1790, + 418, 2099, 2186, 10616, 2098, -1790, 2097, 1844, -1790, 2181, + 2190, -1790, -1790, 2184, -1790, 6311, 2191, 2193, 2189, 2234, + 2566, 8044, 8044, 7798, 841, -1790, -1790, 2566, -1790, -1790, + 2233, 8103, 1629, 1851, 1629, 1851, 1629, 1851, 714, 529, + 1905, 2195, 2235, 1916, 2242, 9077, 2236, -1790, 2237, -1790, + 6311, -1790, -1790, 2248, 2251, -1790, 580, -1790, -1790, 380, + 2252, 2253, 2254, 2255, 529, 2281, 2282, 2283, 2285, -1790, + -1790, -1790, -1790, -1790, -1790, -1790, 2288, 2292, 529, 529, + -1790, 2228, 2290, 8161, 8161, 6311, 6311, 2003, 5812, 2003, + -1790, 2130, 714, 714, 714, 1701, -1790, 1873, 2204, 714, + -1790, 6311, -1790, -1790, 1525, 529, 6311, 2293, -1790, 714, + 2215, 376, -1790, 1476, 6311, 6311, 6311, 953, -1790, 6311, + 6311, 6311, -1790, -1790, 6311, 529, 141, 2298, -1790, 8103, + -1790, -1790, 2303, -1790, -1790, 2297, 9077, 2299, 8044, 2300, + 1851, 1851, 1851, 714, -1790, 1873, -1790, 1905, 2304, 9077, + -1790, -1790, 9116, 6311, 529, -1790, -1790, 9155, 9219, 9298, + 2307, 9337, 9421, 9540, 9077, 2217, 2190, 714, 2306, 963, + 8103, 2312, 2313, 2311, -1790, -1790, 271, 10004, 483, 4734, + 4734, 4734, 6311, 529, 529, 529, -1790, -1790, 804, -1790, + 2318, 8161, 8161, -1790, -1790, 271, 2238, 826, 4328, -1790, + 1526, 4438, 4638, 8551, 2241, -1790, 1157, -1790, -1790, 1383, + 8103, -1790, -1790, -1790, -1790, 529, -1790, -1790, -1790, 529, + -1790, -1790, 953, 448, 2246, -1790, -1790, 2319, -1790, -1790, + 2325, 2327, -1790, 599, 8103, 529, 6311, 2330, -1790, 2339, + -1790, 10103, 6311, 8103, 529, 10281, 2343, -1790, 529, 8103, + -1790, 2344, 8103, 2346, 8103, 2347, 8103, 2348, 8103, 2350, + 8103, 2354, 8103, -1790 +}; + + /* 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_int16 yydefact[] = +{ + 943, 947, 0, 0, 0, 0, 2, 11, 13, 14, + 15, 943, 53, 55, 56, 0, 944, 1000, 1002, 7, + 999, 0, 948, 951, 952, 997, 998, 0, 975, 942, + 0, 20, 21, 0, 983, 1, 12, 15, 54, 947, + 60, 59, 0, 0, 0, 0, 0, 0, 0, 0, + 932, 931, 1006, 1008, 905, 906, 907, 908, 909, 911, + 913, 914, 910, 912, 883, 6, 8, 879, 880, 873, + 876, 849, 10, 821, 943, 941, 872, 850, 963, 881, + 943, 1016, 962, 784, 1004, 955, 0, 945, 0, 0, + 22, 0, 18, 0, 0, 991, 61, 984, 851, 0, + 0, 0, 1000, 871, 863, 866, 864, 0, 0, 788, + 943, 868, 815, 881, 943, 867, 870, 869, 979, 998, + 935, 933, 936, 934, 0, 0, 0, 0, 0, 875, + 0, 0, 943, 943, 943, 943, 943, 943, 943, 943, + 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, + 943, 943, 943, 943, 943, 943, 943, 943, 943, 0, + 0, 877, 874, 0, 0, 0, 0, 0, 0, 954, + 949, 0, 0, 1000, 871, 950, 943, 868, 815, 994, + 25, 30, 0, 16, 0, 946, 943, 0, 65, 0, + 882, 816, 0, 0, 0, 0, 0, 745, 943, 943, + 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, + 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, + 943, 943, 943, 0, 751, 744, 0, 0, 940, 937, + 939, 938, 0, 0, 0, 9, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 822, 0, 0, 0, 0, 0, 0, + 785, 0, 779, 1000, 1001, 1011, 1005, 1008, 957, 1014, + 956, 0, 0, 0, 0, 0, 0, 26, 0, 974, + 0, 0, 0, 0, 31, 0, 0, 19, 0, 0, + 0, 0, 0, 0, 987, 0, 943, 0, 0, 0, + 0, 865, 0, 0, 745, 0, 753, 747, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 750, 789, 0, 0, 0, 1009, + 1010, 0, 777, 825, 823, 824, 848, 847, 846, 845, + 826, 834, 827, 838, 836, 837, 835, 832, 833, 830, + 828, 831, 829, 839, 840, 841, 844, 843, 842, 0, + 761, 762, 860, 0, 0, 1017, 1018, 0, 786, 0, + 0, 0, 959, 958, 0, 0, 748, 24, 28, 0, + 0, 43, 0, 46, 33, 38, 40, 990, 23, 32, + 0, 34, 35, 36, 37, 17, 0, 0, 943, 0, + 0, 135, 0, 63, 0, 67, 0, 135, 0, 88, + 89, 91, 0, 93, 995, 96, 99, 0, 0, 0, + 752, 746, 792, 790, 791, 813, 812, 811, 810, 793, + 801, 794, 805, 803, 804, 802, 799, 800, 797, 795, + 798, 796, 806, 807, 808, 809, 0, 0, 861, 862, + 0, 782, 0, 763, 878, 783, 780, 0, 0, 0, + 0, 0, 27, 974, 0, 45, 47, 0, 39, 52, + 0, 943, 0, 504, 505, 0, 0, 510, 501, 502, + 981, 0, 0, 0, 134, 0, 137, 0, 62, 0, + 77, 68, 201, 135, 191, 192, 202, 193, 194, 195, + 197, 196, 198, 71, 137, 135, 149, 0, 0, 0, + 66, 0, 82, 81, 80, 0, 150, 150, 150, 0, + 943, 97, 102, 83, 84, 85, 0, 943, 100, 943, + 852, 0, 746, 0, 781, 778, 787, 1012, 1013, 1015, + 749, 29, 44, 48, 41, 982, 0, 0, 0, 943, + 499, 0, 0, 0, 0, 0, 529, 0, 0, 506, + 0, 511, 0, 144, 252, 0, 993, 145, 146, 147, + 0, 0, 136, 64, 0, 0, 943, 135, 78, 137, + 0, 137, 75, 266, 87, 92, 0, 0, 135, 135, + 135, 135, 135, 0, 0, 103, 58, 98, 943, 388, + 169, 364, 378, 379, 233, 0, 0, 284, 943, 0, + 943, 0, 135, 233, 391, 365, 380, 381, 390, 233, + 421, 426, 233, 0, 0, 0, 233, 233, 237, 237, + 237, 690, 137, 284, 0, 237, 237, 237, 0, 393, + 392, 389, 109, 110, 105, 0, 108, 123, 124, 119, + 121, 120, 122, 117, 118, 0, 126, 125, 112, 0, + 0, 0, 0, 0, 0, 0, 431, 431, 431, 114, + 104, 113, 111, 115, 116, 107, 449, 169, 984, 57, + 101, 947, 129, 128, 0, 132, 127, 131, 0, 817, + 814, 42, 51, 50, 500, 0, 507, 508, 509, 0, + 0, 931, 548, 545, 543, 544, 546, 547, 529, 0, + 520, 518, 0, 528, 0, 530, 542, 498, 529, 513, + 255, 0, 503, 0, 0, 0, 143, 0, 77, 135, + 69, 0, 73, 0, 0, 76, 94, 95, 137, 137, + 137, 137, 137, 157, 158, 266, 569, 0, 0, 167, + 0, 438, 0, 0, 208, 976, 283, 135, 943, 0, + 0, 0, 483, 943, 475, 479, 480, 481, 482, 0, + 246, 979, 568, 263, 0, 209, 992, 0, 0, 0, + 0, 137, 440, 441, 0, 431, 420, 0, 431, 425, + 439, 259, 0, 203, 996, 0, 0, 187, 189, 0, + 0, 442, 443, 0, 445, 431, 431, 0, 0, 0, + 0, 0, 0, 0, 693, 0, 689, 691, 694, 695, + 696, 0, 0, 0, 697, 0, 0, 0, 444, 431, + 431, 0, 0, 0, 0, 172, 177, 179, 181, 183, + 0, 0, 0, 0, 248, 0, 986, 208, 985, 106, + 0, 170, 350, 355, 431, 0, 357, 366, 0, 961, + 970, 137, 137, 137, 960, 349, 431, 0, 369, 375, + 0, 352, 431, 0, 382, 405, 0, 351, 0, 409, + 0, 0, 407, 0, 0, 403, 0, 0, 0, 448, + 237, 0, 130, 0, 497, 514, 0, 517, 519, 528, + 515, 521, 0, 0, 557, 558, 549, 550, 551, 552, + 553, 554, 555, 556, 529, 534, 0, 531, 0, 529, + 0, 0, 512, 0, 253, 271, 0, 90, 79, 70, + 266, 72, 265, 0, 0, 0, 0, 0, 0, 267, + 0, 0, 0, 1006, 0, 0, 943, 0, 0, 0, + 0, 0, 0, 0, 943, 943, 0, 0, 0, 0, + 0, 0, 0, 0, 608, 611, 610, 943, 627, 605, + 628, 606, 614, 604, 648, 603, 607, 613, 601, 904, + 0, 0, 965, 900, 0, 0, 0, 0, 220, 224, + 219, 223, 218, 222, 221, 225, 168, 0, 0, 0, + 166, 0, 883, 229, 241, 238, 240, 239, 988, 133, + 0, 160, 0, 242, 244, 206, 299, 0, 943, 0, + 0, 0, 474, 476, 0, 161, 0, 162, 0, 208, + 0, 0, 0, 0, 0, 0, 0, 0, 401, 0, + 0, 0, 0, 0, 164, 0, 208, 165, 186, 190, + 188, 0, 234, 397, 398, 0, 396, 735, 734, 740, + 707, 711, 0, 732, 718, 717, 980, 0, 0, 738, + 0, 709, 714, 720, 719, 980, 0, 0, 0, 688, + 692, 702, 703, 704, 0, 0, 261, 273, 0, 988, + 0, 989, 163, 394, 395, 0, 0, 0, 0, 176, + 178, 175, 174, 182, 0, 185, 0, 184, 180, 0, + 250, 0, 360, 0, 237, 0, 899, 437, 964, 895, + 431, 0, 430, 1003, 953, 374, 237, 0, 431, 0, + 387, 237, 0, 431, 0, 431, 346, 0, 431, 347, + 0, 431, 348, 0, 0, 449, 0, 457, 0, 971, + 137, 344, 0, 945, 49, 0, 526, 527, 0, 0, + 0, 532, 528, 541, 540, 538, 539, 0, 0, 537, + 0, 516, 257, 0, 254, 0, 74, 153, 154, 159, + 155, 156, 266, 0, 0, 636, 634, 0, 630, 776, + 0, 965, 772, 0, 574, 0, 0, 0, 943, 598, + 0, 0, 0, 575, 966, 0, 0, 0, 0, 577, + 576, 0, 964, 680, 0, 0, 0, 579, 578, 0, + 0, 0, 600, 602, 609, 617, 615, 626, 0, 612, + 573, 573, 0, 901, 686, 0, 685, 0, 0, 0, + 0, 0, 0, 565, 0, 241, 208, 0, 207, 301, + 302, 303, 304, 300, 0, 298, 943, 978, 495, 0, + 0, 0, 0, 247, 264, 210, 211, 139, 140, 141, + 142, 0, 0, 0, 424, 431, 353, 0, 0, 0, + 429, 354, 260, 204, 205, 0, 431, 0, 0, 741, + 742, 0, 739, 0, 712, 713, 0, 707, 0, 0, + 915, 916, 917, 919, 921, 922, 918, 920, 892, 886, + 887, 890, 888, 889, 857, 0, 854, 943, 884, 969, + 885, 0, 701, 715, 716, 698, 699, 700, 0, 0, + 0, 148, 0, 307, 943, 228, 227, 226, 173, 249, + 270, 208, 269, 171, 768, 0, 764, 431, 359, 0, + 0, 896, 367, 0, 417, 431, 371, 0, 376, 0, + 431, 384, 0, 406, 0, 410, 0, 408, 0, 404, + 0, 436, 0, 0, 451, 452, 453, 455, 459, 0, + 0, 0, 447, 943, 462, 0, 0, 560, 972, 137, + 525, 541, 540, 538, 539, 537, 0, 522, 0, 0, + 0, 256, 282, 268, 0, 0, 0, 0, 640, 637, + 0, 0, 770, 769, 773, 775, 968, 639, 0, 289, + 973, 594, 599, 0, 0, 0, 632, 633, 0, 0, + 289, 592, 0, 0, 0, 0, 616, 0, 0, 572, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 564, 0, 230, 245, 0, 0, 977, + 943, 489, 0, 0, 478, 138, 0, 0, 402, 0, + 0, 0, 0, 235, 399, 0, 708, 0, 0, 0, + 0, 858, 0, 0, 0, 907, 908, 909, 911, 913, + 914, 910, 912, 871, 864, 0, 0, 868, 994, 979, + 0, 925, 926, 923, 924, 927, 928, 929, 930, 943, + 943, 0, 710, 0, 0, 262, 272, 943, 308, 310, + 0, 0, 314, 0, 251, 0, 759, 758, 765, 767, + 358, 0, 433, 0, 0, 0, 370, 0, 0, 383, + 0, 418, 0, 0, 0, 0, 0, 450, 0, 0, + 0, 0, 458, 0, 0, 464, 465, 466, 468, 473, + 0, 0, 559, 0, 533, 536, 0, 535, 0, 0, + 638, 642, 641, 0, 635, 0, 631, 0, 774, 591, + 943, 287, 0, 0, 0, 0, 0, 567, 943, 943, + 943, 943, 943, 0, 570, 571, 0, 0, 893, 903, + 818, 0, 0, 0, 216, 217, 214, 212, 215, 213, + 566, 0, 0, 292, 943, 496, 943, 0, 487, 0, + 0, 494, 485, 477, 422, 423, 411, 427, 428, 0, + 0, 0, 0, 0, 0, 0, 891, 0, 0, 871, + 873, 876, 0, 868, 0, 0, 0, 755, 754, 736, + 737, 0, 0, 855, 275, 279, 280, 0, 309, 0, + 0, 152, 152, 152, 135, 334, 0, 332, 333, 338, + 336, 337, 0, 0, 0, 331, 943, 0, 0, 0, + 0, 0, 766, 356, 362, 898, 0, 0, 0, 416, + 881, 0, 0, 0, 385, 0, 0, 0, 0, 473, + 454, 459, 456, 446, 0, 461, 943, 0, 470, 472, + 0, 561, 0, 523, 524, 258, 644, 643, 771, 288, + 0, 0, 943, 0, 663, 0, 0, 0, 0, 0, + 646, 681, 629, 645, 682, 0, 819, 820, 0, 894, + 902, 687, 684, 0, 231, 281, 943, 290, 0, 293, + 0, 0, 943, 492, 486, 488, 943, 0, 478, 236, + 0, 0, 0, 740, 740, 0, 0, 0, 757, 0, + 0, 856, 0, 0, 0, 305, 330, 328, 329, 151, + 327, 135, 0, 325, 135, 0, 135, 0, 137, 335, + 311, 312, 313, 315, 289, 316, 317, 318, 760, 431, + 361, 897, 0, 881, 368, 0, 432, 0, 419, 431, + 413, 0, 0, 412, 0, 473, 467, 469, 0, 0, + 595, 943, 666, 660, 664, 943, 662, 661, 0, 593, + 943, 649, 0, 0, 0, 291, 0, 0, 294, 0, + 296, 491, 490, 0, 484, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 883, 872, 756, 0, 274, 278, + 0, 0, 137, 324, 137, 320, 137, 322, 0, 943, + 363, 373, 0, 386, 0, 434, 0, 460, 0, 563, + 0, 667, 665, 0, 0, 647, 943, 232, 285, 943, + 0, 0, 0, 0, 943, 0, 0, 0, 0, 622, + 623, 620, 655, 619, 621, 625, 0, 0, 289, 943, + 295, 0, 0, 0, 0, 0, 0, 859, 0, 853, + 276, 275, 0, 0, 0, 0, 340, 208, 0, 431, + 377, 0, 414, 471, 0, 943, 0, 0, 650, 0, + 0, 943, 587, 0, 0, 0, 0, 0, 676, 0, + 0, 0, 618, 624, 0, 943, 0, 0, 400, 0, + 706, 721, 723, 728, 705, 0, 731, 0, 0, 0, + 323, 319, 321, 0, 339, 343, 306, 372, 0, 435, + 562, 683, 0, 0, 289, 589, 588, 0, 0, 0, + 0, 0, 0, 0, 580, 0, 296, 0, 0, 728, + 0, 0, 0, 0, 341, 415, 943, 0, 943, 0, + 0, 0, 0, 943, 943, 943, 286, 297, 943, 722, + 724, 0, 0, 277, 651, 943, 0, 943, 0, 671, + 0, 0, 0, 0, 653, 581, 0, 677, 678, 943, + 0, 730, 729, 652, 590, 943, 674, 668, 672, 943, + 670, 669, 0, 943, 658, 582, 493, 725, 675, 673, + 0, 0, 654, 943, 0, 943, 0, 0, 659, 0, + 679, 0, 0, 0, 943, 0, 0, 656, 943, 0, + 657, 726, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 727 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -1790, -1790, 3404, -1790, 2239, -1790, 2358, -1790, 2182, 58, + -1790, -1790, 2361, -1790, -1790, -1790, 2076, -1790, -1790, -1790, + -1790, 1547, -1790, 2075, -1790, 2363, -1790, -1790, -1790, -1790, + -1790, -1790, -1790, -503, 1627, -387, -1790, -1790, 1847, 1784, + 1846, -1790, -1790, 1839, -28, -1790, 1834, -1790, -408, -506, + 781, -193, 795, 1154, 56, -1790, -1790, -1790, -474, -1790, + -470, -460, -458, -457, -1790, 1687, -1790, -578, 373, 1534, + 1524, 1530, -1790, 1580, 1579, -450, 1859, 1862, 1343, -1034, + 1361, 613, -737, -750, -1790, 132, -525, -799, -836, -1790, + -1790, -1790, -1790, -308, -583, 1758, -1790, -455, -738, 1453, + 1285, -669, 1066, 480, -1790, -1790, 541, 631, -767, -90, + 1771, -1790, -1417, -1790, 659, -1790, 424, -1790, -1790, -1790, + -1790, 905, -1790, 747, -1495, 901, 902, 165, -1790, -1094, + -1790, -1790, 463, -1790, -1790, 550, -1476, -1790, -1790, -1790, + -854, 1315, -1790, -839, 1309, -1790, -1790, -1790, -1790, -59, + 1155, 1654, -1790, -863, -1790, -1790, 1169, 1302, 1312, 1308, + 1313, -1790, -1502, -1790, -1790, -1790, -1790, -445, -1022, -1090, + -1790, -1790, -1249, -754, -1790, -1790, -1790, -1790, 1304, -1790, + -1790, -1790, -1790, 1070, 899, 903, 1074, -1790, -1790, -1790, + -1790, 753, 756, -1603, 1927, -769, -1174, -585, -1790, -1790, + -1790, 844, -1790, 707, -1790, -1790, -1790, -1790, -1790, -1790, + -1790, 1917, 2308, -267, -1790, 1920, 1747, -1790, 1772, -679, + -1790, -1790, 1568, -510, -1790, -1790, 1085, 432, -282, -1790, + -1790, -1790, 925, -1790, -1790, -967, -1790, -1790, -1790, -1790, + 1254, -1790, -1790, -208, 479, -1790, -1790, -959, -1790, -1790, + -950, -1790, -608, -1429, -1217, -1790, 608, -1790, -1789, -1546, + -1790, -284, -1790, -1790, -1790, -1790, -1790, -1790, -1790, -1790, + 269, -433, -1790, -148, -331, -1790, -1790, -1755, -1790, 1962, + -1790, -1790, 1672, -1790, -1790, -1790, -803, 1430, -797, -1031, + -1223, -1790, -1790, -1548, 534, -279, 994, 579, -1790, -1790, + -1790, -1059, -1790, -1790, -102, -45, -185, -79, -1790, -1790, + -1435, 727, -1790, -1093, 819, -357, 972, -885, 926, 1090, + -125, -163, 459, 462, 879, 816, -1790, 2509, -81, -1305, + 5004, -38, -1790, -1037, -1790, -91, 76, 223, 991, -1122, + -918, -760, 8210, -1790, -1790, 985, 6970, 1108, 2074, -1790, + -23, 2438, -1790, -1790, 29, 2244, -869, 6305, -1088, -880, + 1555, -1790, -1790, -1790, -1790, -1790, -1790, -1222, 186, -1790, + -849, 1253, 512, -618, -720, -307, 1969, 170, 2488, 284, + -130, -717, -1790, -1790, 2490, -715, -360, -235, -1790, 9153, + 938, -1, -1790, -47, -1790, -1790, -1790, -1790 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 5, 20, 65, 66, 6, 7, 8, 91, 92, + 31, 9, 10, 181, 286, 293, 294, 295, 405, 488, + 296, 404, 485, 412, 11, 12, 13, 43, 188, 422, + 307, 308, 426, 523, 596, 427, 539, 428, 429, 430, + 431, 540, 547, 541, 782, 662, 548, 663, 524, 591, + 1685, 1686, 834, 525, 612, 543, 544, 545, 1687, 668, + 1688, 1689, 1690, 1691, 1019, 769, 673, 855, 856, 857, + 858, 859, 674, 817, 818, 526, 527, 528, 811, 1033, + 793, 1016, 1017, 1018, 860, 861, 824, 1023, 1034, 773, + 789, 862, 863, 583, 739, 812, 1105, 819, 755, 764, + 864, 584, 1106, 1793, 1107, 1878, 1674, 1675, 1035, 592, + 777, 676, 1600, 1766, 1767, 1770, 1930, 1274, 1275, 677, + 1537, 1538, 1541, 1542, 1692, 1693, 1694, 1802, 1803, 1601, + 1695, 1945, 1946, 1172, 678, 875, 1704, 679, 1820, 680, + 876, 877, 681, 888, 889, 682, 683, 684, 685, 1073, + 1074, 1057, 904, 894, 901, 898, 1058, 905, 895, 902, + 899, 1373, 1560, 805, 806, 808, 809, 878, 1825, 1561, + 1894, 1998, 1390, 1135, 686, 687, 688, 689, 908, 909, + 1393, 1394, 1395, 1166, 1396, 1397, 1167, 1168, 1574, 1575, + 1576, 1577, 1578, 1728, 690, 783, 1642, 1643, 785, 786, + 1637, 1638, 787, 1280, 788, 14, 569, 299, 498, 300, + 493, 570, 571, 572, 573, 577, 728, 729, 730, 731, + 578, 1175, 732, 919, 734, 934, 1586, 1187, 735, 935, + 691, 1406, 1407, 692, 1262, 1229, 693, 694, 981, 982, + 1458, 983, 1918, 2054, 1960, 1961, 1919, 1214, 984, 985, + 1217, 1218, 1246, 1247, 2055, 986, 987, 988, 989, 990, + 991, 1427, 992, 993, 994, 1851, 1921, 2074, 1922, 995, + 1743, 1744, 1923, 2048, 2049, 1924, 996, 997, 998, 695, + 835, 836, 837, 838, 839, 840, 841, 1079, 1090, 1080, + 1091, 1081, 1092, 1980, 1981, 1982, 842, 1985, 1082, 1083, + 843, 1311, 1312, 844, 67, 224, 104, 316, 68, 105, + 1329, 1668, 1330, 1136, 1547, 161, 1365, 999, 1433, 1210, + 1639, 1745, 106, 162, 69, 70, 71, 191, 1983, 1462, + 272, 1024, 1334, 1516, 1502, 269, 109, 73, 1336, 1253, + 1137, 1215, 74, 1337, 1530, 75, 76, 77, 708, 16, + 21, 22, 23, 879, 78, 169, 880, 79, 1139, 1003, + 1004, 1226, 1437, 80, 881, 1170, 1409, 1439, 287, 27, + 774, 114, 1276, 115, 1093, 1085, 564, 33, 696, 867, + 1094, 116, 1110, 406, 697, 795, 117, 740, 813, 118, + 25, 81, 884, 82, 83, 1005, 84, 85 +}; + + /* 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[] = +{ + 26, 26, 271, 26, 915, 223, 99, 1001, 315, 1038, + 766, 790, 1450, 506, 1230, 1286, 93, 1371, 600, 192, + 1132, 1313, 792, 473, 1072, 1235, 1089, 959, 1049, 1150, + 763, 1130, 1304, 1608, 1096, 1097, 1098, 233, 26, 1169, + 1364, 26, 26, 784, 119, 1366, 1066, 1145, 1698, 918, + 1335, 1317, 1263, 1026, 1056, 1231, 303, 1061, 1495, 1237, + 1715, 30, 99, 225, 1752, 1553, 733, 1055, 1920, 265, + 1060, 433, 667, 1349, 944, 1593, 669, 1209, 590, 960, + 1665, 961, 1212, 1594, 1714, 26, 670, 119, 671, 672, + 192, 223, 1593, 751, 750, 753, 675, 871, 315, 119, + 119, 1231, 1925, 29, 384, 599, 1026, 1084, 1165, 351, + 1, 1206, 423, 499, 168, 317, 1834, 601, 1532, -4, + 280, 17, 18, 597, 825, 826, 1, 403, 1108, 1, + 848, 849, 850, 1147, 1, 1364, 39, 167, 1768, 1152, + 1366, 585, 585, 585, 770, 585, 845, 17, 18, 225, + 1250, 494, 590, 1234, 35, 874, 1, 182, 1621, 387, + 19, 18, 1208, 415, 470, 276, 279, 388, 173, 18, + 119, 119, 471, 1, 1920, 383, 794, 1, 39, 26, + 1750, 1266, 1753, 1269, 497, 26, 19, -596, 410, 509, + 1026, 1251, 575, 784, 587, 588, 278, 589, 1043, 847, + 758, 759, 760, 761, 762, 317, 1595, 19, 1925, 749, + 1223, 39, 1196, -597, 1270, 1271, -596, 1238, -943, 922, + 580, 467, 1264, 1595, 801, 119, 579, 1665, 1838, 1457, + 1104, 585, 1898, 119, 667, 393, 1272, 890, 669, 896, + 297, 900, 903, 906, 1026, 1391, 949, 576, 670, 1706, + 671, 672, 953, 954, 955, 956, 957, 1682, 675, 1539, + 918, 581, 1682, 39, -597, 585, 1268, 1920, 1448, 496, + 86, 1768, 1305, 441, 1194, 742, 1860, 1496, 160, 1551, + 1368, 1501, 1122, 746, 119, 26, 1245, 1557, 1381, 26, + -3, 26, 602, 603, 433, 1054, 433, 1, 478, 87, + 853, 1925, 345, 1408, 1026, 26, 1752, 1376, 1, 119, + 168, 1677, 88, 1842, 593, 419, 1718, 772, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 1209, 280, 119, 119, 119, 1212, 1891, + 288, 1665, 1, 665, 1026, 40, 704, 41, 1219, 433, + 1059, 345, 1084, 1059, 1216, 752, 1233, 1219, 1084, 1036, + 1197, 1198, 42, 1200, 1201, 1142, 1143, 1144, 1907, 765, + 1075, 1075, 263, 585, 1084, 1171, 1984, 1374, 1, 1391, + 721, 120, 722, 1959, 552, 1379, 1, 1889, 1954, 26, + 1384, 1780, 26, 1386, 1075, 1075, 1388, 542, 1573, 26, + 1027, -5, 1901, 1, -463, 699, 1902, 1, 26, 26, + 278, 1905, 1281, 26, 1182, 1308, 1283, 575, 723, 1782, + 1476, 1784, 89, 1245, 1, 560, 182, 585, 585, 585, + 585, 890, 183, 1539, 607, 720, -597, 896, 1, 263, + 86, 937, 1364, 1043, -597, 1, 399, 1366, 1499, 90, + 402, 917, 1773, 1027, 1423, 1708, 1501, 121, 1712, 119, + 387, -585, 398, 1716, 1717, -586, 401, 1958, 475, 185, + 26, 2016, 576, 26, 26, 1, 26, 39, 1001, 1050, + 1051, 1052, 1053, 2061, 2062, 26, 1759, 721, 2, 1411, + 119, 119, 119, 1665, 119, 1630, 1739, 1480, 1466, 26, + 1469, 1975, 542, 1550, 1739, 129, 950, 1559, 951, 1268, + 1, 702, 1467, 122, 1471, 1544, 26, 26, 26, 3, + 26, 1169, 1169, 1904, 119, 1412, 1556, 1268, 4, 1769, + 1358, 123, 1486, 1489, 184, 26, 1209, 1027, 1490, 1856, + 119, 1212, 119, 1363, 1231, 820, 1487, 701, 724, 725, + 726, 727, 1491, 2081, 129, 26, 1, 26, 865, 1048, + 721, 580, 1411, 486, 26, 1032, 173, 18, -586, 26, + 490, 26, 1585, 585, -872, 865, 482, 2028, 1084, 119, + 119, 419, 507, 26, 26, 1245, 489, 2044, 1861, 26, + 508, 1027, 1862, 86, 1864, 743, 719, 131, 1412, 1367, + 1442, 1029, 26, 26, 1364, 19, 2063, 1, 1785, 1366, + 1501, 1375, 391, 1828, 119, 26, 1380, 166, 26, 1789, + 26, 628, 1173, 1108, 1790, 1791, 1, 937, -872, -872, + 937, 1180, 26, 26, 26, 290, 18, 1391, 632, 291, + 1740, 1580, 164, 26, 1188, 563, 1190, 119, 1749, -977, + 590, 1027, 421, 510, 1404, 1413, 1414, 561, 165, 960, + 562, 511, 1769, -946, 119, 1631, 17, 18, 911, 883, + -977, 883, 292, 883, 943, 883, 883, 883, 651, 652, + -946, 784, 1962, 1649, 585, 1957, 2, 1968, 1, 39, + 26, 890, 186, 890, -946, 1192, 896, 26, 896, 1, + 900, 1027, 1408, 903, 2087, 19, 906, 1669, 26, 180, + 765, -1016, -850, 1202, 1868, 1869, 820, 3, 164, 1364, + -946, -946, 1391, 923, 1366, 1030, 4, 2004, 1413, 1414, + 119, 1031, 119, 119, 2006, 187, 1291, 26, 17, 18, + 26, 924, 26, 119, 713, 1044, 771, 1026, 2015, 925, + 770, 1045, 865, 865, 865, 802, 851, 1076, 590, 119, + 865, 803, 616, 234, 810, 1026, -850, -850, 821, 822, + 190, 936, 532, 533, 173, 18, 1, 19, 17, 18, + 1113, 1114, 536, 537, 39, 1739, 119, 119, 119, 119, + 721, 1709, 722, 534, 883, 1892, 229, 883, 816, 1431, + 1896, 1962, 770, 538, 886, 26, 892, 2057, 2058, 26, + 590, 1432, 119, 19, 883, 883, 26, 19, 39, 26, + 26, 26, 26, 1937, -740, 1501, 173, 18, 723, 2065, + 1939, 1, 1308, 1932, 26, 26, 267, 230, 883, 883, + 1059, 119, 119, 119, 1781, 1434, 1783, -999, 231, 119, + 119, 1075, 346, 1, 119, 1309, 1310, 39, 2090, 536, + 537, -969, 529, 883, 228, 19, 1309, 1310, -999, 595, + 530, 1739, 778, 39, 770, 883, 779, 1077, 1065, 1903, + 538, 883, -969, 1037, 1032, 1043, 1188, 281, 1416, 1078, + 937, 1020, 1341, 1583, 17, 18, 119, 883, 173, 18, + 780, 1681, 1682, 1995, 852, 1468, 853, 1, 266, 781, + 1001, 926, 927, 928, 929, 930, 931, 932, 933, 1679, + 890, 282, 1683, 470, 1739, 896, 1309, 1310, 854, 26, + 119, 554, 119, 19, 1, 119, 1273, 19, 1470, 1009, + 305, 823, 26, 26, 26, 26, 26, 26, 778, 26, + 119, -883, 779, -999, 1854, 1890, 1893, 1545, 724, 725, + 726, 727, 1011, 962, 1013, 17, 18, 1178, 1839, 1546, + 311, 1001, 1008, 1265, -999, 778, 780, 277, 18, 779, + 1315, 1179, 1219, 1015, 424, 781, 721, 1841, 722, 1245, + 1219, 1344, 1751, 344, 1754, 1010, 1042, 1012, 2010, 1548, + 721, -884, 722, 780, 19, -883, -883, 17, 18, 1009, + 119, 1, 781, -884, 1, 306, 1014, 1, 865, 26, + 350, 119, 1566, 1265, 723, 1133, 26, 1348, 119, 26, + 119, 865, 1011, 26, 1013, 26, 1026, 119, 723, 277, + 18, 273, 18, 119, 397, 381, 19, -999, 531, 17, + 18, 1046, 26, 1015, 119, 778, 947, 1047, 778, 779, + 119, 389, 779, 17, 18, 770, 1293, 721, -999, 722, + 119, 26, 1278, 590, 1294, 1635, 119, 26, 386, 1405, + 19, 119, 1464, 780, 1465, 1997, 780, 1927, 19, 173, + 18, 128, 781, 26, 275, 781, 390, 17, 18, -883, + -883, 32, 19, 2080, 1027, 723, 1299, 119, 721, 1474, + 722, 1435, 400, 119, 1300, 119, 99, 1475, 1006, 1007, + 119, 290, 1027, 883, 1063, 291, 173, 18, 19, 883, + 1064, 32, -964, 408, 403, 883, 19, 883, 920, -943, + 883, 160, 883, 112, 883, 1063, 723, 883, 277, 1281, + 883, 1067, 1008, 1009, 724, 725, 726, 727, 292, 1430, + 1, 883, 2075, 1947, -86, 19, 424, 962, 724, 725, + 726, 727, 425, -983, 827, 1010, 1011, 1012, 1013, 1191, + 963, 277, 18, 1492, 39, 1203, 178, 1228, -892, 17, + 18, 1493, 1, 1927, 416, -999, 1014, 1015, 112, 112, + -892, 277, 18, 17, 18, 26, 1204, 39, 721, 1883, + 722, 1205, 1885, -1008, 1887, 1119, -999, 1121, 1268, 852, + 128, 853, 887, 26, 893, 1909, 770, 1046, 19, 1910, + 1911, 1912, 870, 1069, 590, 724, 725, 726, 727, 971, + 387, 119, 19, 854, 387, 721, 723, 1183, 1622, 417, + 173, 18, 1623, 1913, 418, 1914, 1696, 17, 18, 2059, + 1, 1536, 1915, 26, 1697, 1549, 1808, 420, 1947, 178, + 112, 1948, 421, 828, 829, 626, 724, 725, 726, 727, + 32, 435, 32, 1184, 883, -943, 1927, 128, 595, 19, + 1681, 1682, 1888, 631, 830, 883, 19, 26, 632, 1736, + 1844, 1737, 590, 1844, 1844, 1916, 1, 119, 119, 831, + 832, 1683, 421, 17, 18, 1046, 1, 664, 17, 18, + 703, 1112, 436, 833, 643, 644, 1684, 652, 1724, 823, + 26, 666, 178, 1598, 705, 873, 770, 2001, 1124, 26, + 1917, 119, 873, 470, 1125, -748, 654, 1776, 440, 1990, + 1991, 1992, 19, 17, 18, 1713, 883, 19, 1133, 119, + 17, 18, 1008, 1703, 883, 1126, 1942, 1763, 1943, 883, + 1944, 1127, 277, 18, 896, 1764, 724, 725, 726, 727, + 852, 119, 853, 1882, 160, 1010, 1884, 1012, 1886, 883, + 883, 140, 19, 1027, 132, 133, 134, 1713, 1360, 19, + 1361, 139, 140, 141, 854, 1830, 1014, 387, 178, 119, + 1, 1845, 192, 1185, 1186, 726, 727, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 1676, 784, 178, 178, 178, 1702, 1006, 1007, + 132, 778, 119, 1341, 1118, 779, 1155, 139, 140, 141, + 1115, 1866, 1156, 119, 1043, 1116, 119, 315, 2076, 1713, + 119, 119, 119, 1131, 1129, -872, -872, 1899, 1134, 780, + 1032, 119, 1008, 1009, 1796, 960, 962, 961, 781, 1158, + 1146, 474, 119, 119, 481, 1159, 1151, 962, 1161, 963, + 277, 18, 1117, 39, 1162, 1010, 1011, 1012, 1013, 484, + 963, 277, 18, 743, 39, 1797, 1798, 1799, 487, 1287, + 119, 964, 119, 26, 1713, 387, 1014, 1015, -1008, 2069, + 531, -1008, 2000, -943, 491, 128, 1331, 1800, 198, 199, + 200, 1006, 1007, 119, 1909, 205, 206, 207, 1910, 1911, + 1912, 736, 535, 965, 1, 966, 492, 743, 971, 967, + 968, 969, 26, 1288, 501, 970, 192, 566, 178, 971, + 883, 198, 1913, 1000, 1914, 1008, 1009, 206, 205, 206, + 207, 1915, 743, 972, 973, 974, 975, 743, 1289, 277, + 18, 315, 976, 1290, 558, 502, 503, 1295, 1010, 1011, + 1012, 1013, 567, 1296, 39, 119, 119, 504, 882, 99, + 882, 568, 882, 582, 882, 882, 882, 505, 594, 1014, + 1015, 1295, 1341, 1341, 1916, 1341, 119, 1301, 1342, 1345, + 504, 1346, 1341, 112, 977, 978, 1666, 590, 1347, 1350, + 26, 26, 26, 26, 119, 1351, 119, 119, 1667, 178, + 960, 178, 961, 119, 615, 119, -749, 1456, 1401, 1917, + 119, 119, 962, 1472, 1402, 743, 979, 1581, 712, 1473, + 980, 1485, 626, 1582, 223, 963, 277, 18, 716, 39, + 608, 609, 611, 717, 1521, 1522, 964, 1523, 178, 1524, + 631, 1525, 1526, 1527, 1528, 632, 119, 1529, 718, 1401, + 1993, 1676, 737, 736, 736, 1723, 1994, 2068, 736, 421, + 2068, 2068, 738, 736, 741, 1008, 1009, 743, 965, 744, + 966, 643, 644, 1684, 967, 968, 969, 1801, 1804, 1806, + 970, 2040, 797, 882, 971, 1655, 882, 754, 1010, 1011, + 1012, 1013, 757, 654, 768, 1025, 770, 119, 972, 973, + 974, 975, 119, 882, 882, -966, -966, 976, 776, 1014, + 1015, 1254, 1255, 798, 799, 804, 26, 1331, 1514, 1256, + 1257, 2077, 1353, 1354, 807, 504, 119, 882, 882, 1521, + 1522, 119, 1523, 823, 1524, 800, 1525, 1526, 1527, 1528, + 1676, 26, 1529, 869, 26, 2089, 26, 872, 1025, 977, + 978, 885, 882, 891, 2096, 1633, 1634, 897, 883, 907, + 2101, 119, -991, 2103, 882, 2105, 912, 2107, 883, 2109, + 882, 2111, 913, 2113, 99, 914, 223, 1309, 1310, 2066, + 916, 979, 411, 413, 938, 980, 882, 1805, 1807, 178, + 1587, 1587, 178, 124, 125, 126, 127, 2078, 1459, 1459, + 940, 2079, 178, 941, 962, 2082, 2050, 2050, 2050, 119, + 119, 119, 119, 1746, 1747, 2088, 119, 963, 277, 18, + 119, 39, 2051, 2052, 958, 2050, 2097, 26, 2050, 2050, + 2100, 1032, 1025, 1039, 514, 515, 1040, 1041, 2019, 1087, + 1088, 1176, 517, 1333, 736, 518, 519, 736, 736, 1099, + 1101, 1102, 520, 1103, 1140, 1141, 521, 522, 1148, 736, + 1149, 1189, 1909, 736, 736, 1153, 1910, 1911, 1912, 1154, + 1157, 1160, 119, 119, 1163, 1174, 971, 1220, 1221, 1213, + 1222, 26, 26, 26, 1227, 1236, 1025, 1239, 883, 626, + 1913, 1240, 1914, 1241, 1242, 1243, 1244, 1249, 26, 1915, + 1258, 512, 1514, 1514, 1252, 1259, 1332, 631, 1260, 1261, + 1292, 1297, 632, 46, 47, 48, 49, 50, 119, 51, + 1298, 1306, 1307, 1370, 1355, 1352, 421, 119, 1369, 1377, + 1331, 1356, 26, 1357, 513, 1382, 1410, 1399, 643, 644, + 1684, 1403, 1916, -548, 504, -545, 1025, -543, -544, 1418, + 514, 515, 1417, -542, 516, 1419, 26, 1420, 517, 119, + 654, 518, 519, 1429, 1438, 1441, 1446, 1449, 520, 1447, + 1451, 1463, 521, 522, 1482, 1483, 1498, 1917, 1500, 1534, + 119, 119, 1129, 1497, 1533, 1554, 1555, 1558, 1562, 178, + 1563, 1564, 1565, 1567, 178, 1568, 1025, 1569, 1650, 119, + 1521, 1522, 1584, 1523, 1000, 1524, 1570, 1525, 1526, 1527, + 1528, 1590, 882, 1529, 15, 1596, 1606, 1624, 882, 1613, + 1392, 1619, 1625, 119, 882, 15, 882, 1626, 1627, 882, + 1628, 882, 119, 882, 1629, 1644, 882, 1645, 119, 882, + 1646, 119, 1647, 119, 1648, 119, 1651, 119, 1656, 119, + 882, 119, 827, 1652, 1331, 1703, 1514, 1514, 1653, 1705, + 1654, 1711, 1719, 1331, 1725, 1331, 1726, 130, 1727, 1730, + 1331, 1331, 1732, 1733, 1333, 1333, 1734, 1761, 1778, 1792, + 178, 1758, 1762, 1760, 1794, 1779, 1788, 178, 159, 178, + 1809, 1795, 1810, 130, 163, 1811, 178, 1812, 1814, 1815, + 1816, 1817, 1819, 736, 1415, 736, 1821, 736, 1824, 1827, + 1829, 1831, 1832, 178, 1833, 1835, 130, 1573, 1865, 1840, + 1849, 1859, 1850, 1858, 226, 1900, 1881, 130, 227, 112, + 1867, 1880, 1897, 1906, 960, 1908, 1928, 1332, 1332, 1929, + 112, 1931, 1935, 1933, 1949, 1934, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 882, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 882, 44, 1331, 1936, 1940, 45, + 285, 1951, 1950, 1952, 1953, 46, 47, 48, 49, 50, + 302, 51, 52, 53, 18, 1955, 39, 1956, 1964, 1965, + 1966, 1967, 319, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 1969, 1970, 1971, + 1972, 512, 19, 1973, 1974, 882, 1977, 1978, 1996, 2003, + 2005, 2017, 2020, 882, 2021, 2036, 2022, 2023, 882, 1333, + 1661, 2025, 2032, 2039, 2041, 2042, 2043, 2060, 2084, 1331, + 1331, 1331, 1514, 2064, 610, 2073, 1331, -885, 882, 882, + 2083, -885, 2085, 2086, -977, -885, 2092, 1333, 2093, -885, + 514, 515, 2099, 2102, 516, 2104, 2106, 2108, 517, 2110, + 178, 518, 519, 2112, 36, -977, 298, 37, 520, 409, + 235, 414, 521, 522, 38, 948, 604, 605, 747, 617, + 432, 700, 1332, 1660, 910, -885, -885, 1120, -885, 1128, + -885, 1123, -885, -885, -885, -885, 1068, 613, -885, 1070, + 614, 44, 815, 1415, 1415, 45, 1302, 1284, 1199, 1359, + 1332, 46, 47, 48, 49, 50, 1535, 51, 52, 53, + 18, 1989, 1941, 1879, 846, 1855, 29, 178, 54, 55, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 2037, 56, 1678, 1813, 1699, 1700, 1870, 1331, 57, 58, + 59, 60, 61, 62, 63, 1372, 2024, 1378, 19, 1025, + 178, 1494, 1062, 1389, 1488, 1383, 1387, 1720, 1385, 1400, + 1571, 1333, 1722, 1661, 1661, 1572, 706, 1025, 178, 1836, + 1333, 1775, 1333, 1837, 1863, 939, 714, 1333, 1333, 715, + 1521, 1522, 495, 1523, 301, 1524, 1000, 1525, 1526, 1527, + 1528, 921, 1181, 1529, 1588, 1460, 1731, 2046, 1100, 546, + 549, 707, 1316, 2018, 1670, 1987, 1876, 1701, 1425, 882, + 1818, 1597, 1673, 1738, 170, 392, 1225, 1478, 178, 2038, + 1426, 96, 94, 0, 1332, 711, 1660, 1660, 0, 0, + 0, 0, 0, 1332, 0, 1332, 0, 0, 0, 0, + 1332, 1332, 0, 0, 107, 0, 0, 1000, 0, 0, + 0, 0, -943, 0, 160, 574, -964, 495, 0, 0, + 0, 178, -964, -964, -964, -964, -964, 0, -964, -964, + -964, -964, 1318, 1, 432, 178, 1319, -964, 0, 178, + 178, 178, 46, 47, 48, 49, 50, 175, 51, 52, + 173, 18, -964, 1661, 0, 0, 0, 0, 0, -964, + 193, 178, 112, 0, 546, 0, 0, 0, 0, -964, + 0, 549, 1320, 0, 0, 0, 0, 0, 0, 1321, + 1322, 1323, 1324, 1325, 1326, 1327, 0, 0, 100, 19, + 0, 178, 101, 574, 0, 0, 0, 0, 46, 47, + 48, 49, 50, 0, 51, 52, 102, 18, 0, 39, + 0, 0, 178, 0, 0, 0, 1660, 0, 0, 0, + 432, 0, 0, 1926, -941, 0, 0, 0, 0, 0, + 0, 283, 0, 1877, 0, 0, 1333, 1661, 1661, 1661, + 0, 0, 767, 1333, 0, 19, 0, 0, 0, 0, + 0, 0, 0, -941, 767, 0, -941, -941, -941, -941, + -941, -941, -941, -941, -941, -941, -941, 0, -941, -941, + -941, -941, -941, -941, 178, 178, 0, 1521, 1522, 0, + 1523, -941, 1524, 0, 1525, 1526, 1527, 1528, 0, 0, + 1529, 0, 0, 352, 0, 178, 0, 0, 1025, 1332, + 1660, 1660, 1660, 0, 1392, 0, 1332, 882, 0, 44, + 0, 0, 0, 45, 0, 112, 112, 882, 0, 46, + 47, 48, 49, 50, 0, 51, 52, 53, 18, 1926, + 0, 0, 0, 0, 29, 0, 54, 55, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, + 0, 0, 0, 0, 1661, 0, 57, 58, 59, 60, + 61, 62, 63, 0, 0, 112, 19, 0, 0, 438, + 0, 0, 0, 0, 0, 0, 0, 0, 442, 443, + 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, + 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, + 464, 465, 466, 0, 0, 352, 468, 469, 0, 0, + 0, 0, 0, 0, 1318, 0, 178, 1660, 1319, 0, + 0, 0, 1926, 0, 46, 47, 48, 49, 50, 0, + 51, 52, 173, 18, 0, 39, 960, 882, 961, 0, + 0, 44, 0, 0, 0, 45, 0, 0, 962, 0, + 178, 46, 47, 48, 49, 50, 0, 51, 52, 53, + 18, 963, 277, 18, 0, 39, 29, 0, 54, 55, + 0, 19, 964, 0, 0, 0, 0, 0, 0, 0, + 112, 56, 0, 0, 0, 0, 0, 0, 57, 58, + 59, 60, 61, 62, 63, 0, 0, 0, 19, 0, + 0, 0, 0, 0, 965, 0, 966, 0, 0, 0, + 967, 968, 969, 0, 1742, 0, 970, 0, 1520, 0, + 971, 1843, 0, 0, 0, 0, 0, 0, 0, 555, + 0, 112, 0, 626, 972, 973, 974, 975, 0, 178, + 0, 0, 0, 976, 0, 0, 0, 0, 1681, 1682, + 0, 631, 0, 0, 0, 0, 632, 0, 1521, 1522, + 0, 1523, 0, 1524, 0, 1525, 1526, 1527, 1528, 1683, + 421, 1529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 643, 644, 1684, 977, 978, 0, 0, 0, + 767, 178, 178, 0, 606, 0, 0, 0, 767, 767, + 0, 0, 0, 0, 654, 0, 960, 0, 961, 0, + 709, 1248, 710, 0, 0, 0, 0, 979, 962, 0, + 0, 980, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 963, 277, 18, 0, 39, 0, 178, 0, 0, + 0, 0, 964, 0, 44, 0, 0, 0, 45, 745, + 0, 0, 0, 0, 46, 47, 48, 49, 50, 0, + 51, 52, 53, 18, 0, 0, 0, 0, 0, 29, + 1424, 54, 55, 0, 965, 0, 966, 0, 178, 0, + 967, 968, 969, 0, 56, 0, 970, 0, 0, 0, + 971, 57, 58, 59, 60, 61, 62, 63, 0, 178, + 178, 19, 0, 626, 972, 973, 974, 975, 0, 0, + 0, 0, 0, 976, 0, 0, 0, 0, 178, 0, + 171, 631, 0, 0, 172, 0, 632, 0, 0, 0, + 46, 47, 48, 49, 50, 0, 51, 0, 173, 18, + 421, 39, 178, 17, 18, 0, 39, 0, 0, 0, + 0, 178, 643, 644, 1684, 977, 978, 178, 0, 0, + 178, 1425, 178, 0, 178, 0, 178, 0, 178, 0, + 178, 0, 0, 1426, 654, 0, 0, 19, 0, 0, + 0, 0, 19, 618, 619, 620, 0, 979, 621, 622, + 623, 980, 0, 0, 0, 624, 0, 0, 0, 625, + 942, 0, 0, 945, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 952, 626, 0, 0, 0, 0, 627, + 628, 629, 0, 0, 0, 0, 0, 0, 630, 0, + 0, 0, 631, 0, 0, 0, 0, 632, 0, 0, + 0, 0, 767, 633, 634, 0, 635, 636, 637, 638, + 0, 421, 0, 639, 0, 0, 0, 0, 640, 641, + 0, 0, 642, 643, 644, 645, 0, 0, 646, 647, + 648, 649, 650, 0, 0, 0, 0, 651, 652, 0, + 0, 514, 515, 0, 653, 654, 655, 656, 657, 517, + 0, 0, 518, 519, 658, 0, 0, 0, 0, 520, + 0, 0, 0, 521, 522, 659, 660, 661, 0, 0, + 0, 0, 0, 0, 1772, 0, 0, -478, 0, 0, + 0, -478, 0, 0, 0, 0, 0, -478, -478, -478, + -478, -478, 0, -478, 0, -478, -478, 0, 1, 0, + 0, 0, -478, 0, -478, -478, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -478, 0, 0, + 0, 1531, 0, 0, -478, -478, -478, -478, -478, -478, + -478, 0, 0, 64, -478, 0, 0, 1540, 1543, 778, + 0, 0, 0, 779, 0, 0, 0, 0, 0, 0, + -478, 0, 0, 0, 0, 0, 0, -478, 64, 103, + 1193, 0, 0, 0, 0, 1195, 0, 780, 0, 0, + 0, 0, 0, 0, 0, 0, 781, 0, 0, 44, + 0, 0, 0, 45, 0, 0, 0, 1579, 0, 46, + 47, 48, 49, 50, 0, 51, 52, 53, 18, 0, + 0, 0, 174, 0, 29, 0, 54, 55, 0, 0, + 0, 0, 0, 0, 103, 103, 0, 0, 0, 56, + 0, 0, 0, 1602, 0, 0, 57, 58, 59, 60, + 61, 62, 63, 0, 1602, 0, 19, 0, 0, 0, + 0, 0, 64, 0, 0, 64, 0, 0, 0, 0, + 0, 1267, 1742, 0, 0, 0, 0, 0, 1279, 1846, + 1282, 0, 0, 0, 0, 0, 0, 1285, 0, 0, + 0, 0, 0, 64, 64, 0, 0, 44, 64, 64, + 274, 45, 0, 0, 1303, 174, 103, 46, 47, 48, + 49, 50, 0, 51, 52, 53, 18, 0, 39, 0, + 1314, 0, 29, 64, 54, 55, 0, 0, 0, 64, + 64, 1343, 0, 1671, 1672, 0, 0, 56, 0, 0, + 0, 1680, 0, 0, 57, 58, 59, 60, 61, 62, + 63, 0, 0, 0, 19, 0, 0, 0, 0, 0, + 103, 0, 0, 0, 0, 0, 0, 0, 174, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, + 64, 64, 0, 0, 1741, 0, 0, 0, 0, 0, + 0, 0, 1741, 1248, 767, 1248, 767, 0, 0, 174, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 1602, 1771, 0, + 148, 149, 150, 151, 174, 152, 64, 64, 0, 156, + 0, 0, 0, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 0, 0, + 174, 174, 174, 0, 0, 44, 270, 0, 0, 45, + 0, 1461, 0, 0, 0, 46, 47, 48, 49, 50, + 1543, 51, 52, 53, 18, 0, 0, 0, 0, 0, + 29, 0, 54, 55, 130, 0, 0, 0, 0, 0, + 0, 64, 0, 64, 64, 56, 0, 0, 64, 64, + 1579, 0, 57, 58, 59, 60, 61, 62, 63, 0, + 0, -478, 19, 0, 0, -478, 1248, 0, 0, 0, + 0, -478, -478, -478, -478, -478, 0, -478, 1515, -478, + -478, 0, 1, 0, 0, 0, -478, 0, -478, -478, + 1857, 64, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -478, 0, 0, 0, 0, 0, 0, -478, -478, + -478, -478, -478, -478, -478, 0, 0, 0, -478, 0, + 0, 0, 0, 778, 174, 0, 64, 779, 0, 1461, + 0, 0, 0, 0, -478, 0, 0, 0, 1602, 0, + 0, -478, 0, 0, 0, 44, 0, 130, 0, 45, + 0, 780, 0, 0, 0, 46, 47, 48, 49, 50, + 781, 51, 52, 53, 18, 1248, 0, 0, 0, 1248, + 29, 0, 54, 55, 1248, 0, 0, 0, 0, 1589, + 0, 0, 0, 0, 0, 56, 0, 0, 0, 103, + 0, 0, 57, 58, 59, 60, 61, 62, 63, 0, + 0, 0, 19, 0, 0, 174, 0, 174, 0, 0, + 0, 0, 0, 1741, 0, 0, 0, 0, 1742, 0, + 0, 0, 1620, 0, 0, 1847, 0, 0, 0, 0, + 1248, 0, 0, 1963, 0, 0, 1632, 0, 1963, 0, + 352, 1640, 1641, 0, 174, 0, 0, 0, 0, 0, + 0, 0, 1602, 1976, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1662, 0, 0, 0, 0, 0, 0, + 44, 0, 0, 0, 45, 0, 0, 0, 0, 767, + 46, 47, 48, 49, 50, 1963, 51, 52, 53, 18, + 0, 0, 0, 0, 0, 29, 0, 54, 55, 1857, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 56, 0, 0, 1620, 0, 0, 0, 57, 58, 59, + 60, 61, 62, 63, 0, 0, 0, 19, 1602, 0, + 0, 0, 0, 0, 274, 0, 274, 0, 274, 0, + 274, 274, 274, 1742, 0, 0, 0, 0, 0, 0, + 1248, 0, 1857, 0, 0, 0, 0, 2056, 1963, 1963, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1248, + 0, 2056, 0, 0, 0, 1756, 1757, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2056, + 0, 0, 0, 2056, 0, 174, 352, 2056, 174, 0, + 195, 0, 0, 0, 0, 0, 0, 2056, 174, 1963, + 0, 196, 197, 0, 0, 0, 0, 1786, 2056, 0, + 0, 0, 2056, 0, 1022, 0, 0, 0, 0, 17, + 18, 0, 39, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 0, 212, 213, + 214, 215, 216, 217, 0, 218, 219, 220, 221, 274, + 0, 222, 274, 0, 0, 0, 107, 0, 19, 618, + 619, 620, 0, 0, 621, 622, 623, 1022, 0, 274, + 274, 624, 0, 0, 0, 625, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 626, 0, 0, 274, 274, 627, 0, 629, 0, 0, + 0, 0, 0, 0, 630, 0, 0, 1853, 631, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 274, 633, + 634, 0, 635, 636, 637, 638, 0, 0, 0, 639, + 274, 0, 0, 0, 640, 641, 274, 0, 642, 643, + 644, 645, 0, 0, 646, 647, 648, 649, 650, 0, + 0, 1022, 274, 0, 0, 0, 0, 514, 515, 0, + 653, 654, 655, 656, 657, 517, 0, 0, 518, 519, + 658, 193, 0, 0, 0, 520, 0, 0, 0, 521, + 522, 659, 660, 661, 44, 174, 0, 0, 45, 0, + 174, 0, 0, 0, 46, 47, 48, 49, 50, 0, + 51, 52, 53, 18, 0, 1022, 0, 0, 0, 29, + 0, 54, 55, 0, -882, 0, 0, 0, 0, 0, + 0, 0, 1938, 0, 56, 0, 0, 0, 0, 0, + 0, 57, 58, 59, 60, 61, 62, 63, 0, 0, + 0, 19, 0, -882, 0, 0, -882, -882, -882, -882, + -882, -882, -882, -882, -882, -882, -882, 2047, -882, -882, + -882, -882, -882, -882, 2067, 1022, 0, 0, 0, 0, + 0, -882, 0, 0, 0, 0, 174, 0, 0, 0, + 0, 0, 0, 174, 0, 174, 0, 0, 0, 0, + 0, 0, 174, 0, 44, 0, 0, 0, 45, 0, + 0, 0, 0, 0, 46, 47, 48, 49, 50, 174, + 51, 52, 53, 18, 0, 1022, 0, 0, 0, 29, + 0, 54, 55, 0, 0, 103, 0, 0, 0, 0, + 0, 1328, 0, 0, 56, 0, 103, 0, 0, 0, + 0, 57, 58, 59, 60, 61, 62, 63, 0, 0, + 0, 19, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 0, 2047, 0, 148, + 149, 150, 151, 64, 2070, 0, 0, 0, 274, 0, + 0, 0, 0, 0, 274, 0, 0, 0, 347, 348, + 274, 0, 274, 0, 349, 274, 0, 274, 0, 274, + 0, 0, 274, 0, 0, 274, 0, 0, 64, 0, + 0, 0, 0, 0, 0, 0, 274, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 0, 146, 147, 148, 149, 150, 151, 0, 152, + 153, 154, 155, 156, 157, 158, 0, 64, 0, 0, + 0, 64, 0, 0, 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 64, 64, 64, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 0, 0, 64, 64, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 44, 0, 174, 0, 45, 64, + 0, 64, 0, 0, 46, 47, 48, 49, 50, 0, + 51, 52, 53, 18, 0, 0, 0, 0, 0, 29, + 0, 54, 55, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 56, 0, 0, 0, 0, 274, + 0, 57, 58, 59, 60, 61, 62, 63, 0, 0, + 274, 19, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1328, 1513, 0, 0, 0, 2047, 0, 0, + 0, 0, 0, 0, 2071, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 0, + 44, 0, 0, 0, 45, 0, 174, 0, 0, 0, + 46, 47, 48, 49, 50, 0, 51, 52, 53, 18, + 64, 274, 0, 64, 174, 29, 0, 54, 55, 274, + 0, 64, 0, 0, 274, 0, 64, 0, 0, 0, + 56, 0, 0, 0, 0, 0, 0, 57, 58, 59, + 60, 61, 62, 63, 274, 274, 0, 19, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 0, 2047, 174, 214, 215, 216, 217, 64, + 64, 0, 0, 0, 0, 0, 0, 0, 64, 0, + 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, + 0, 0, 64, 0, 64, 0, 0, 174, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1022, 0, + 0, 174, 0, 0, 0, 174, 174, 174, 0, 0, + 0, 0, 0, 0, 0, 0, 1022, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1513, 1659, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, + 0, 0, 0, 172, 0, 1328, 0, 174, 0, 46, + 47, 48, 49, 50, 0, 51, 0, 173, 18, 0, + 0, 0, 64, 0, 29, 0, 54, 55, 174, 64, + 0, 0, 64, 0, 0, 0, 64, 64, 64, 56, + 0, 0, 64, 0, 64, 0, 57, 58, 59, 60, + 61, 62, 63, 64, 0, 274, 19, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 64, 0, 64, + 0, 0, 1636, 0, 0, 0, 0, 64, 64, 64, + 64, 0, 0, 0, 0, 0, 0, 64, 0, 0, + 174, 174, 0, 72, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 174, 0, 0, 0, 312, 0, 0, 98, 108, + 0, 0, 0, 0, 0, 0, 313, 314, 0, 1328, + 0, 1659, 1659, 0, 0, 0, 0, 0, 1328, 0, + 1328, 0, 0, 0, 0, 1328, 1328, 0, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 0, 212, 213, 214, 215, 216, 217, 0, + 218, 219, 220, 221, 98, 194, 222, 0, 0, 0, + 0, 103, 0, 0, 0, 64, 0, 64, 0, 0, + 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, + 0, 0, 232, 0, 64, 72, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, + 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 44, 174, 160, 264, 45, 0, 1022, 268, 0, + 0, 46, 47, 48, 49, 50, 284, 51, 52, 53, + 18, 0, 0, 0, 0, 0, 29, 0, 54, 55, + 0, 1874, 0, 309, 0, 0, 174, 0, 0, 318, + 108, 56, 0, 0, 0, 0, 0, 0, 57, 58, + 59, 60, 61, 62, 63, 0, 0, 0, 19, 0, + 0, 0, 0, 274, 0, 0, 103, 0, 0, 0, + 0, 64, 0, 274, 0, 64, 64, 0, 0, 64, + 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 376, 377, 378, 379, 0, 0, 64, + 382, 0, 0, 0, 1328, 1874, 1874, 1659, 171, 0, + 0, 1328, 172, 0, 0, 174, 0, 0, 46, 47, + 48, 49, 50, 0, 51, 0, 173, 18, 0, 0, + 0, 0, 0, 29, 64, 54, 55, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 439, 194, 56, 0, + 0, 0, 0, 0, 0, 57, 58, 59, 60, 61, + 62, 63, 0, 0, 0, 19, 0, 174, 174, 64, + 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1636, 0, 274, 0, 64, 0, 0, 1774, 0, + 64, 0, 0, 0, 0, 0, 0, 0, 64, 64, + 64, 0, 0, 64, 64, 64, 0, 0, 64, 0, + 0, 0, 0, 174, 0, 0, 0, 0, 0, 0, + 0, 476, 1874, 477, 479, 0, 0, 0, 480, 284, + 0, 0, 0, 0, 0, 0, 0, 64, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 0, 0, 174, 214, 215, 216, 217, 0, + 218, 0, 0, 64, 64, 64, 64, 0, 0, 0, + 0, 550, 0, 0, 0, 174, 174, 0, 0, 0, + 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, + 0, 0, 0, 0, 174, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 556, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 174, 0, + 64, 0, 195, 0, 0, 0, 64, 174, 0, 0, + 0, 0, 0, 174, 197, 0, 174, 0, 174, 0, + 174, 0, 174, 0, 174, 0, 174, 0, 0, 0, + 0, 0, 0, 0, 0, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 382, + 146, 147, 148, 149, 150, 151, 312, 152, 153, 154, + 155, 156, 157, 158, 0, 0, 0, 0, 314, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 0, 146, 147, 148, 149, 150, 151, + 394, 152, 153, 154, 155, 156, 157, 158, 0, 0, + 0, 0, 396, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 0, 146, 147, + 148, 149, 150, 151, 394, 152, 153, 154, 155, 156, + 157, 158, 0, 0, 0, 395, 396, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 0, 212, 213, 214, 215, 216, 217, 394, 218, + 219, 220, 221, 0, 0, 222, 0, 0, 0, 1787, + 396, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 0, 212, 213, 214, 215, + 216, 217, 0, 218, 219, 220, 221, 312, 0, 222, + 0, 0, 0, 0, 98, 0, 0, 0, 1871, 314, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 0, 212, 213, 214, 215, 216, + 217, 195, 218, 219, 220, 221, 0, 98, 222, 0, + 0, 0, 1988, 197, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 0, 212, + 213, 214, 215, 216, 217, 0, 218, 219, 220, 221, + 0, 0, 222, 347, 348, 0, 0, 0, 0, 380, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 98, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 0, 146, 147, 148, + 149, 150, 151, 0, 152, 153, 154, 155, 156, 157, + 158, 347, 348, 0, 0, 0, 0, 385, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 98, 0, 0, 0, 0, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 0, 146, 147, 148, 149, 150, + 151, 0, 152, 153, 154, 155, 156, 157, 158, 347, + 348, 0, 0, 0, 0, 557, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 98, 0, 0, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 0, 146, 147, 148, 149, 150, 151, 0, + 152, 153, 154, 155, 156, 157, 158, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 347, 348, + 0, 0, 0, 0, 559, 98, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 382, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 382, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 0, 146, 147, 148, 149, 150, 151, 0, 152, + 153, 154, 155, 156, 157, 158, 0, 0, 0, 0, + 0, 0, 0, 1362, 0, 0, 0, 0, 0, 0, + 347, 348, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 0, 212, 0, 214, + 215, 216, 217, 0, 218, 219, 220, 221, 1398, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 0, 146, 147, 148, 149, 150, 151, + 0, 152, 153, 154, 155, 156, 157, 158, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1428, 0, 0, + 0, 98, 0, 0, 0, 0, 382, 189, 0, 0, + 0, 0, 0, 0, 1443, 1444, 1445, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1452, 0, 0, 1453, 1454, 1455, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 437, 146, 147, 148, 149, 150, 151, 0, 152, 153, + 154, 155, 156, 157, 158, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 0, 146, 147, 148, 149, 150, 151, + 0, 152, 153, 154, 155, 156, 157, 158, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, + 0, 45, 0, 0, 0, 0, 0, 46, 47, 48, + 49, 50, 0, 51, 52, 53, 18, 0, 0, 0, + 113, 0, 29, 0, 54, 55, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, + 382, 0, 0, 1552, 57, 58, 59, 60, 61, 62, + 63, 1552, 0, 0, 19, 0, 1552, 0, 0, 0, + 0, 0, 0, 179, 0, 0, 0, 100, 0, 0, + 0, 101, 0, 0, 0, 113, 113, 46, 47, 48, + 49, 50, 0, 51, 52, 102, 18, 0, 0, 0, + 0, 0, 29, 0, 54, 55, 0, 0, 0, 1591, + 1592, 0, 0, 0, 0, 0, 0, 56, 382, 0, + 0, 0, 1599, 0, 57, 58, 59, 60, 61, 62, + 63, 0, 0, 1607, 19, 0, 0, 0, 0, 0, + 0, 0, 1614, 0, 1615, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 179, 113, 98, 0, + 0, 472, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 98, 0, 0, 214, + 215, 216, 217, 0, 218, 219, 220, 221, 284, 0, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 0, 146, 147, 148, 149, 150, + 151, 113, 152, 153, 154, 155, 156, 157, 158, 179, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 382, 0, 0, 0, 0, 0, 0, 1552, + 0, 0, 1552, 0, 0, 0, 1552, 1552, 1552, 0, + 0, 0, 1721, 0, 1721, 0, 0, 0, 0, 0, + 0, 0, 0, 1729, 0, 0, 0, 0, 0, 0, + 179, 0, 0, 0, 0, 0, 0, 1428, 0, 1428, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1748, 0, 0, 0, 0, 179, 0, 1755, 0, 0, + 0, 0, 0, 0, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 1616, + 1617, 179, 179, 179, 0, 1618, 0, 0, 0, 0, + 0, 98, 194, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 0, 212, 213, 214, 215, 216, 217, 0, + 218, 219, 220, 221, 0, 0, 222, 1616, 1617, 0, + 0, 108, 0, 0, 0, 1826, 0, 1552, 0, 0, + 0, 0, 0, 1729, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1552, 0, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 1848, 212, 213, 214, 215, 216, 217, 0, 218, 219, + 220, 221, 0, 0, 222, 0, 0, 98, 0, 0, + 0, 0, 0, 0, 0, 179, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 284, 146, 147, 148, 149, 150, 151, 0, 152, + 153, 154, 155, 156, 157, 158, 179, 179, 179, 0, + 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 194, 0, 0, 0, + 0, 1826, 0, 0, 171, 1895, 1826, 0, 172, 1729, + 113, 0, 0, 0, 46, 47, 48, 49, 50, 0, + 51, 0, 173, 18, 0, 39, 179, 0, 179, 29, + 0, 54, 55, 0, 0, 0, 0, 0, 0, 1826, + 0, 0, 0, 0, 56, 194, 98, 108, 0, 0, + 310, 57, 58, 59, 60, 61, 62, 63, 0, 0, + 0, 19, 0, 0, 0, 179, 179, 0, 0, 0, + 0, 0, 0, 0, 1552, 0, 0, 0, 0, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 0, 212, 213, 214, 215, 216, 217, + 179, 218, 219, 220, 221, 0, 0, 222, 0, 1986, + 1986, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1999, 0, 0, 0, 0, + 2002, 0, 0, 866, 0, 0, 0, 0, 2007, 2008, + 2009, 0, 1021, 2011, 2012, 2013, 45, 0, 2014, 0, + 866, 0, 46, 47, 48, 49, 50, 0, 51, 52, + 102, 18, 108, 0, 0, 0, 0, 29, 0, 54, + 55, 0, 0, 0, 0, 0, 0, 2027, 0, 0, + 0, 0, 56, 0, 0, 111, 0, 0, 0, 57, + 58, 59, 60, 61, 62, 63, 0, 0, 0, 19, + 0, 0, 0, 0, 0, 0, 2053, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 179, 0, 179, 179, + 0, 0, 0, 0, 0, 0, 0, 0, 177, 179, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 111, 111, 1002, 0, 0, 113, 0, 0, 551, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2091, 0, 0, 0, 0, 0, 2095, 0, 0, 0, + 0, 0, 179, 179, 179, 179, 0, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 0, 212, 213, 214, 215, 216, 217, 113, 218, + 219, 220, 221, 0, 0, 222, 0, 0, 0, 0, + 0, 177, 111, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 866, 866, 866, + 0, 0, 0, 0, 0, 866, 866, 0, 0, 0, + 866, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1138, 0, 0, 0, 553, 0, 0, 0, 0, 0, + 0, 0, 1138, 0, 0, 0, 111, 0, 1138, 0, + 0, 0, 0, 0, 177, 0, 0, 0, 0, 0, + 0, 0, 113, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 0, 212, 213, + 214, 215, 216, 217, 0, 218, 219, 220, 221, 0, + 0, 222, 0, 0, 0, 0, 179, 0, 179, 0, + 0, 179, 0, 0, 0, 177, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 113, 1211, 0, 0, + 1211, 0, 0, 0, 0, 1211, 1224, 0, 1232, 0, + 177, 0, 1232, 0, 0, 0, 0, 0, 0, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 0, 0, 177, 177, 177, 0, + 0, 0, 0, 0, 1138, 0, 113, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 179, 0, 0, + 0, 0, 0, 0, 179, 0, 179, 0, 0, 0, + 0, 0, 0, 179, 0, 0, 0, 0, 0, 179, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 179, 0, 0, 946, 0, 0, 113, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, + 0, 0, 1339, 0, 0, 0, 0, 113, 0, 0, + 0, 0, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 0, 212, 213, 214, + 215, 216, 217, 866, 218, 219, 220, 221, 0, 866, + 222, 866, 0, 0, 0, 0, 866, 0, 1138, 0, + 177, 1477, 0, 0, 0, 0, 1138, 0, 0, 0, + 0, 0, 0, 0, 1138, 0, 0, 0, 0, 1138, + 0, 0, 1138, 0, 0, 1138, 0, 0, 1138, 0, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 0, 212, 213, 214, 215, 216, + 217, 0, 218, 219, 220, 221, 0, 1071, 222, 0, + 0, 45, 0, 0, 0, 111, 0, 46, 47, 48, + 49, 50, 0, 51, 52, 102, 18, 0, 1436, 0, + 0, 177, 29, 177, 54, 55, 0, 0, 0, 0, + 0, 0, 1211, 1232, 0, 0, 0, 56, 0, 0, + 0, 0, 0, 0, 57, 58, 59, 60, 61, 62, + 63, 0, 0, 1002, 19, 0, 0, 179, 1164, 0, + 177, 0, 45, 0, 0, 0, 0, 0, 46, 47, + 48, 49, 50, 0, 51, 52, 102, 18, 0, 0, + 0, 0, 0, 29, 0, 54, 55, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, + 0, 0, 1138, 0, 0, 57, 58, 59, 60, 61, + 62, 63, 1138, 0, 0, 19, 1207, 0, 0, 0, + 45, 0, 0, 1339, 1518, 0, 46, 47, 48, 49, + 50, 0, 51, 52, 102, 18, 0, 0, 0, 0, + 0, 29, 0, 54, 55, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 56, 179, 0, 0, + 0, 0, 0, 57, 58, 59, 60, 61, 62, 63, + 0, 0, 0, 19, 0, 179, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 44, 0, 0, 0, 45, 0, 0, 179, 0, 0, + 46, 47, 48, 49, 50, 0, 51, 52, 102, 18, + 1138, 177, 0, 0, 177, 29, 0, 54, 55, 0, + 0, 0, 0, 0, 177, 179, 0, 0, 0, 0, + 56, 0, 0, 0, 0, 0, 1211, 57, 58, 59, + 60, 61, 62, 63, 0, 0, 0, 19, 0, 0, + 0, 0, 0, 1503, 0, 0, 0, 1504, 0, 0, + 0, 0, 0, 46, 47, 48, 49, 50, 179, 51, + 52, 173, 18, 0, 0, 0, 0, 1138, 29, 113, + 54, 55, 179, 0, 0, 0, 179, 179, 179, 0, + 0, 0, 0, 1505, 0, 0, 0, 113, 0, 0, + 1506, 1507, 1508, 1509, 1510, 1511, 1512, 0, 1518, 113, + 19, 0, 0, 0, 1657, 0, 0, 0, 1658, 0, + 0, 0, 0, 0, 46, 47, 48, 49, 50, 0, + 51, 52, 102, 18, 0, 0, 1339, 0, 179, 29, + 0, 54, 55, 0, 0, 0, 0, 0, 0, 0, + 1138, 0, 0, 0, 1505, 0, 0, 0, 0, 179, + 1710, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 0, 0, + 1138, 19, 0, 0, 0, 0, 0, 44, 0, 0, + 0, 1707, 0, 0, 0, 0, 1177, 46, 47, 48, + 49, 50, 0, 51, 52, 53, 18, 0, 0, 0, + 0, 0, 29, 0, 54, 55, 0, 0, 0, 0, + 0, 177, 0, 0, 0, 0, 177, 56, 0, 0, + 0, 179, 179, 0, 57, 58, 59, 60, 61, 62, + 63, 0, 0, 0, 19, 0, 0, 0, 0, 0, + 100, 0, 179, 0, 1822, 0, 0, 0, 0, 0, + 46, 47, 48, 49, 50, 1138, 51, 52, 102, 18, + 1339, 0, 113, 113, 0, 29, 0, 54, 55, 1339, + 0, 1339, 0, 0, 0, 0, 1339, 1339, 0, 0, + 56, 0, 0, 0, 0, 1002, 0, 57, 58, 59, + 60, 61, 62, 63, 0, 0, 0, 19, 0, 0, + 0, 0, 177, 0, 0, 0, 0, 0, 0, 177, + 0, 177, 1823, 0, 0, 0, 0, 0, 177, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 177, 0, 1138, 0, 0, + 0, 0, 0, 0, 0, 0, 1002, 0, 0, 0, + 0, 111, 0, 0, 0, 0, 0, 1338, 0, 0, + 1872, 0, 111, 179, 1873, 0, 0, 0, 113, 0, + 46, 47, 48, 49, 50, 0, 51, 52, 102, 18, + 0, 0, 0, 0, 0, 29, 0, 54, 55, 0, + 0, 0, 0, 0, 0, 0, 0, 179, 0, 0, + 1505, 0, 0, 0, 0, 0, 0, 1506, 1507, 1508, + 1509, 1510, 1511, 1512, 0, 0, 0, 19, 0, 171, + 0, 0, 0, 172, 0, 0, 0, 1823, 0, 46, + 47, 48, 49, 50, 0, 51, 0, 173, 18, 0, + 0, 0, 0, 0, 29, 0, 54, 55, 0, 0, + 0, 0, 0, 1211, 0, 0, 0, 0, 0, 56, + 0, 0, 1211, 0, 0, 0, 57, 58, 59, 60, + 61, 62, 63, 0, 0, 1339, 19, 1979, 113, 0, + 0, 172, 1339, 0, 0, 0, 179, 46, 47, 48, + 49, 50, 0, 51, 0, 173, 18, 1318, 0, 0, + 0, 1319, 29, 0, 54, 55, 0, 46, 47, 48, + 49, 50, 0, 51, 52, 173, 18, 56, 39, 0, + 0, 0, 177, 0, 57, 58, 59, 60, 61, 62, + 63, 0, 0, 0, 19, 0, 0, 1320, 179, 179, + 0, 0, 0, 0, 1321, 1322, 1323, 1324, 1325, 1326, + 1327, 0, 0, 0, 19, 110, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1211, 0, + 0, 0, 1211, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 179, 0, 0, 0, 1338, 1517, + 0, 0, 0, 0, 0, 0, 0, 0, 176, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 110, 110, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 177, 0, 0, 179, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 177, 0, 0, 0, 0, 0, 179, 179, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1211, 0, 0, 0, 179, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1211, 0, 0, + 0, 176, 110, 0, 0, 0, 0, 0, 0, 179, + 177, 0, 0, 0, 0, 0, 0, 0, 179, 0, + 0, 0, 0, 0, 179, 0, 0, 179, 0, 179, + 0, 179, 0, 179, 0, 179, 0, 179, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 0, 177, 0, 214, 215, 216, 217, 0, + 218, 0, 220, 221, 176, 0, 0, 177, 0, 0, + 0, 177, 177, 177, 0, 0, 0, 0, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 0, 1517, 1663, 148, 149, 150, 151, 0, + 152, 153, 154, 155, 156, 157, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 1338, 146, 177, 148, 149, 150, 151, 0, 152, + 153, 154, 155, 156, 157, 0, 0, 0, 0, 0, + 176, 0, 0, 0, 177, 0, 0, 0, 0, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 0, 0, 176, 176, 176, 0, + 0, 0, 0, 0, 0, 0, 2072, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 177, 177, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 177, 146, 147, + 148, 149, 150, 151, 0, 152, 153, 154, 155, 156, + 157, 158, 0, 1777, 0, 1338, 0, 1663, 1663, 0, + 0, 0, 0, 0, 1338, 0, 1338, 0, 0, 0, + 0, 1338, 1338, 0, 0, 0, 0, 0, 0, 0, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 1603, 212, 213, 214, 215, 216, + 217, 0, 218, 219, 220, 221, 0, 111, 222, 0, + 176, 0, 0, 0, 0, 0, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 0, 146, 147, 148, 149, 150, 151, + 0, 152, 153, 154, 155, 156, 157, 158, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 177, 0, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 0, 110, 1604, 148, 149, 150, + 151, 0, 152, 0, 154, 155, 156, 1875, 0, 0, + 0, 176, 177, 176, 0, 0, 0, 0, 0, 0, + 0, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 1605, 146, 147, 148, 149, + 150, 151, 111, 152, 153, 154, 155, 156, 157, 158, + 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 0, 146, 147, 148, 149, 150, + 151, 1609, 152, 153, 154, 155, 156, 157, 158, 0, + 1338, 1875, 1875, 1663, 0, 0, 0, 1338, 0, 0, + 0, 177, 0, 0, 0, 0, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 0, 146, 147, 148, 149, 150, 151, 0, 152, 153, + 154, 155, 156, 157, 158, 1610, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 177, 177, 0, 0, 0, 0, 0, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 0, 146, 147, 148, 149, 150, + 151, 0, 152, 153, 154, 155, 156, 157, 158, 0, + 0, 0, 0, 0, 1611, 0, 0, 0, 0, 177, + 0, 176, 0, 0, 176, 0, 0, 0, 1875, 0, + 0, 0, 0, 0, 176, 0, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 0, 146, 147, 148, 149, 150, 151, + 177, 152, 153, 154, 155, 156, 157, 158, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1612, 0, + 0, 177, 177, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 177, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 0, 146, 147, + 148, 149, 150, 151, 177, 152, 153, 154, 155, 156, + 157, 158, 1852, 177, 0, 0, 0, 0, 0, 177, + 0, 0, 177, 0, 177, 0, 177, 0, 177, 0, + 177, 0, 177, 0, 0, 0, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 0, 146, 147, 148, 149, 150, 151, 0, 152, + 153, 154, 155, 156, 157, 158, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 2026, 146, 147, 148, 149, 150, 151, + 0, 152, 153, 154, 155, 156, 157, 158, 0, 0, + 0, 176, 0, 0, 24, 28, 176, 34, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 2029, 146, 147, 148, 149, 150, 151, 0, + 152, 153, 154, 155, 156, 157, 158, 0, 0, 0, + 0, 0, 24, 0, 0, 95, 97, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 0, 146, 147, 148, 149, 150, 151, 0, 152, + 153, 154, 155, 156, 157, 158, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2030, 0, 0, 24, + 0, 0, 176, 0, 0, 0, 0, 0, 0, 176, + 0, 176, 0, 0, 0, 0, 0, 0, 176, 0, + 0, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 176, 146, 147, 148, 149, + 150, 151, 0, 152, 153, 154, 155, 156, 157, 158, + 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2031, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 289, 0, 0, 0, 0, 0, 304, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 2033, 146, 147, 148, 149, 150, + 151, 0, 152, 153, 154, 155, 156, 157, 158, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 0, 146, 147, 148, 149, 150, 151, + 0, 152, 153, 154, 155, 156, 157, 158, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 0, 212, 213, 214, 215, 216, 217, 0, + 218, 219, 220, 221, 0, 0, 222, 0, 2034, 289, + 0, 0, 0, 289, 0, 407, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 434, + 0, 0, 176, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 1481, 146, 147, + 148, 149, 150, 151, 0, 152, 153, 154, 155, 156, + 157, 158, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 0, 212, 213, 214, + 215, 216, 217, 0, 218, 219, 220, 221, 0, 176, + 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 483, 0, 0, 34, 2035, 0, 0, + 0, 0, 176, 289, 0, 0, 0, 0, 0, 0, + 0, 0, 434, 500, 0, 0, 0, 434, 0, 0, + 176, 0, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 0, 146, 147, 148, + 149, 150, 151, 0, 152, 153, 154, 155, 156, 157, + 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 176, 0, 0, 0, 483, 0, 0, 483, 34, 0, + 565, 0, 0, 0, 0, 0, 0, 0, 0, 434, + 0, 0, 0, 0, 586, 586, 586, 0, 586, 0, + 0, 0, 0, 598, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 176, 0, 0, 0, 0, 0, 0, + 434, 434, 434, 0, 434, 0, 0, 176, 0, 0, + 0, 176, 176, 176, 0, 0, 0, 0, 0, 698, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 176, 110, 0, 0, 0, 0, 565, + 0, 483, 0, 0, 0, 0, 0, 0, 304, 0, + 0, 0, 0, 434, 0, 500, 0, 0, 0, 0, + 0, 0, 0, 176, 586, 0, 0, 434, 748, 0, + 0, 0, 0, 434, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 176, 0, 434, 434, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 586, 775, + 0, 0, 791, 0, 796, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 814, 814, 796, 0, + 0, 0, 0, 0, 0, 0, 0, 796, 0, 0, + 0, 868, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 176, 176, 868, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 176, 0, 0, + 1484, 0, 0, 0, 24, 0, 0, 0, 0, 0, + 0, 698, 0, 0, 0, 0, 0, 110, 110, 0, + 0, 0, 796, 0, 0, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 0, + 212, 213, 214, 215, 216, 217, 586, 218, 219, 220, + 221, 598, 0, 222, 434, 0, 434, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 110, 0, 0, + 0, 0, 0, 1028, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 586, 586, 586, 586, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 176, 796, + 0, 0, 0, 796, 0, 0, 1028, 0, 0, 0, + 1086, 0, 0, 1095, 1095, 1095, 1095, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1109, 1111, + 0, 0, 176, 0, 0, 868, 868, 868, 0, 0, + 0, 0, 0, 868, 868, 0, 0, 0, 868, 0, + 0, 2045, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 1028, 146, 147, 148, 149, 150, 151, 0, 152, 153, + 154, 155, 156, 157, 158, 0, 0, 0, 0, 0, + 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, + 0, 176, 0, 434, 0, 0, 586, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 434, 434, 434, 434, + 434, 434, 0, 775, 1028, 0, 0, 0, 0, 0, + 2094, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 176, 176, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 0, + 146, 147, 148, 149, 150, 151, 0, 152, 153, 154, + 155, 156, 157, 158, 1028, 0, 0, 0, 0, 0, + 0, 0, 0, 775, 0, 0, 0, 0, 0, 176, + 1277, 0, 0, 791, 0, 0, 0, 791, 0, 796, + 0, 0, 0, 0, 0, 0, 0, 586, 0, 0, + 0, 0, 0, 0, 0, 0, 814, 0, 0, 0, + 0, 0, 0, 0, 1028, 0, 0, 0, 0, 0, + 176, 0, 0, 0, 0, 1086, 0, 0, 0, 0, + 1340, 1086, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 176, 176, 0, 0, 0, 0, 1086, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 176, 868, 0, 0, 0, 0, 0, 868, 0, 868, + 0, 0, 0, 0, 868, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 176, 0, 0, 0, 2098, 0, + 0, 0, 0, 176, 0, 0, 0, 0, 0, 176, + 0, 0, 176, 0, 176, 0, 176, 0, 176, 0, + 176, 0, 176, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 0, 146, 147, + 148, 149, 150, 151, 0, 152, 153, 154, 155, 156, + 157, 158, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 756, 0, 0, 0, 1440, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1440, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 0, 212, 213, 214, 215, 216, 217, 1421, + 218, 219, 220, 221, 0, 0, 222, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1479, 0, 0, + 0, 0, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 0, 212, 213, 214, + 215, 216, 217, 0, 218, 219, 220, 221, 0, 0, + 222, 1086, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1340, 1519, 0, 0, 0, 0, 0, 0, 0, + 0, 1422, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1095, 0, 0, 0, 0, 0, + 0, 0, 0, 1109, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 0, 212, + 213, 214, 215, 216, 217, 1735, 218, 219, 220, 221, + 0, 0, 222, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 586, 0, 0, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 1765, 212, 213, 214, 215, 216, 217, 0, + 218, 219, 220, 221, 0, 0, 222, 0, 0, 0, + 0, 0, 0, 0, 0, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 0, + 212, 213, 214, 215, 216, 217, 0, 218, 219, 220, + 221, 0, 0, 222, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1028, 0, 0, + 0, 0, 0, 0, 0, 1618, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1028, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1519, 1519, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 1664, 212, 213, 214, 215, 216, 217, 0, + 218, 219, 220, 221, 1340, 0, 222, 1095, 0, 0, + 0, 0, 0, 0, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 0, 212, + 213, 214, 215, 216, 217, 0, 218, 219, 220, 221, + 0, 0, 222, 0, 0, 0, 434, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1095, 1095, 1095, 1095, 1340, 0, + 1519, 1519, 0, 0, 0, 0, 0, 1340, 0, 1340, + 0, 0, 0, 0, 1340, 1340, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1028, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 791, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1340, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 434, 0, 0, 434, 0, + 434, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1340, 1340, 1340, 1519, 0, 0, 0, + 1340, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 796, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 434, 434, 434, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1440, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1340, 0, 0, 0, 0, 796, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1277 +}; + +static const yytype_int16 yycheck[] = +{ + 1, 2, 165, 4, 719, 107, 44, 767, 193, 778, + 618, 629, 1234, 421, 973, 1049, 39, 1139, 524, 100, + 874, 1080, 630, 380, 823, 975, 829, 765, 795, 892, + 613, 867, 1066, 1450, 831, 832, 833, 128, 39, 908, + 1133, 42, 43, 628, 45, 1133, 813, 886, 1543, 728, + 1087, 1082, 1019, 770, 804, 973, 186, 807, 1307, 977, + 1562, 3, 100, 108, 1610, 1370, 576, 804, 1857, 160, + 807, 306, 546, 1104, 743, 9, 546, 962, 18, 8, + 1515, 10, 962, 17, 1560, 86, 546, 88, 546, 546, + 171, 193, 9, 599, 597, 601, 546, 675, 283, 100, + 101, 1019, 1857, 41, 267, 513, 823, 827, 907, 234, + 37, 960, 305, 420, 85, 194, 1719, 525, 1341, 0, + 167, 34, 35, 510, 649, 650, 37, 126, 845, 37, + 655, 656, 657, 887, 37, 1228, 37, 11, 1633, 893, + 1228, 501, 502, 503, 10, 505, 652, 34, 35, 194, + 12, 418, 18, 13, 0, 680, 37, 9, 1463, 9, + 73, 35, 961, 15, 9, 166, 167, 17, 34, 35, + 171, 172, 17, 37, 1963, 266, 631, 37, 37, 180, + 1609, 1030, 1611, 123, 419, 186, 73, 95, 187, 424, + 907, 53, 119, 778, 502, 503, 167, 505, 783, 654, + 608, 609, 610, 611, 612, 284, 140, 73, 1963, 596, + 970, 37, 950, 124, 154, 155, 124, 977, 121, 729, + 121, 346, 1021, 140, 632, 226, 493, 1662, 1730, 158, + 143, 591, 1835, 234, 708, 282, 176, 682, 708, 684, + 182, 686, 687, 688, 961, 1163, 749, 174, 708, 1554, + 708, 708, 758, 759, 760, 761, 762, 121, 708, 1353, + 939, 496, 121, 37, 124, 625, 1033, 2056, 1227, 156, + 9, 1766, 1071, 318, 943, 582, 1771, 1308, 18, 1369, + 1134, 1318, 860, 591, 285, 286, 15, 1377, 1151, 290, + 0, 292, 527, 528, 529, 801, 531, 37, 389, 38, + 166, 2056, 226, 1172, 1021, 306, 1852, 1146, 37, 310, + 281, 1534, 12, 1742, 507, 141, 1565, 625, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 1228, 391, 346, 347, 348, 1228, 1825, + 180, 1786, 37, 546, 1071, 129, 549, 131, 966, 594, + 805, 285, 1082, 808, 13, 600, 974, 975, 1088, 777, + 953, 954, 146, 956, 957, 881, 882, 883, 1854, 614, + 825, 826, 159, 743, 1104, 910, 1934, 1141, 37, 1307, + 32, 25, 34, 13, 439, 1149, 37, 1814, 1900, 400, + 1154, 1650, 403, 1157, 849, 850, 1160, 435, 11, 410, + 770, 0, 1841, 37, 17, 100, 1845, 37, 419, 420, + 391, 1850, 1040, 424, 934, 9, 1044, 119, 70, 1652, + 1266, 1654, 15, 15, 37, 480, 9, 797, 798, 799, + 800, 886, 15, 1537, 535, 575, 95, 892, 37, 226, + 9, 733, 1545, 1038, 95, 37, 286, 1545, 42, 15, + 290, 103, 1636, 823, 1202, 1555, 1503, 22, 1558, 470, + 9, 95, 286, 1563, 1564, 95, 290, 1906, 17, 38, + 481, 1976, 174, 484, 485, 37, 487, 37, 1248, 797, + 798, 799, 800, 2041, 2042, 496, 1618, 32, 87, 34, + 501, 502, 503, 1938, 505, 1472, 1600, 1276, 1258, 510, + 1260, 1928, 540, 1367, 1608, 53, 751, 1380, 753, 1286, + 37, 549, 1259, 23, 1261, 1361, 527, 528, 529, 118, + 531, 1400, 1401, 115, 535, 70, 1375, 1304, 127, 1633, + 1118, 24, 1292, 1297, 117, 546, 1431, 907, 1298, 1766, + 551, 1431, 553, 1131, 1472, 645, 1293, 37, 200, 201, + 202, 203, 1299, 115, 102, 566, 37, 568, 658, 12, + 32, 121, 34, 403, 575, 18, 34, 35, 95, 580, + 410, 582, 44, 943, 14, 675, 400, 2004, 1308, 590, + 591, 141, 9, 594, 595, 15, 410, 2026, 1772, 600, + 17, 961, 1776, 9, 1778, 9, 156, 9, 70, 1134, + 1218, 15, 613, 614, 1707, 73, 2045, 37, 1655, 1707, + 1657, 1146, 11, 1713, 625, 626, 1151, 11, 629, 1666, + 631, 111, 38, 1350, 1671, 1672, 37, 919, 68, 69, + 922, 923, 643, 644, 645, 85, 35, 1565, 128, 89, + 1600, 1405, 18, 654, 936, 485, 938, 658, 1608, 16, + 18, 1021, 142, 9, 1170, 200, 201, 481, 16, 8, + 484, 17, 1766, 111, 675, 1474, 34, 35, 701, 680, + 37, 682, 122, 684, 142, 686, 687, 688, 168, 169, + 128, 1276, 1909, 1492, 1054, 115, 87, 1914, 37, 37, + 701, 1146, 16, 1148, 142, 940, 1151, 708, 1153, 37, + 1155, 1071, 1581, 1158, 115, 73, 1161, 1520, 719, 91, + 955, 11, 14, 958, 1783, 1784, 816, 118, 18, 1822, + 168, 169, 1650, 16, 1822, 9, 127, 1959, 200, 201, + 741, 15, 743, 744, 1961, 10, 1054, 748, 34, 35, + 751, 34, 753, 754, 568, 9, 624, 1474, 1975, 42, + 10, 15, 852, 853, 854, 633, 16, 826, 18, 770, + 860, 639, 100, 16, 642, 1492, 68, 69, 646, 647, + 17, 13, 120, 121, 34, 35, 37, 73, 34, 35, + 849, 850, 120, 121, 37, 1889, 797, 798, 799, 800, + 32, 1555, 34, 141, 805, 1827, 22, 808, 166, 9, + 1832, 2028, 10, 141, 682, 816, 684, 2034, 2035, 820, + 18, 21, 823, 73, 825, 826, 827, 73, 37, 830, + 831, 832, 833, 1870, 12, 1872, 34, 35, 70, 13, + 1877, 37, 9, 1865, 845, 846, 16, 23, 849, 850, + 1295, 852, 853, 854, 1651, 1212, 1653, 16, 24, 860, + 861, 1306, 16, 37, 865, 43, 44, 37, 2085, 120, + 121, 16, 9, 874, 25, 73, 43, 44, 37, 9, + 17, 1975, 78, 37, 10, 886, 82, 133, 12, 1848, + 141, 892, 37, 13, 18, 1480, 1178, 11, 1180, 145, + 1182, 769, 9, 1409, 34, 35, 907, 908, 34, 35, + 106, 120, 121, 1947, 164, 114, 166, 37, 18, 115, + 1680, 204, 205, 206, 207, 208, 209, 210, 211, 1537, + 1375, 11, 141, 9, 2028, 1380, 43, 44, 188, 940, + 941, 17, 943, 73, 37, 946, 1036, 73, 113, 148, + 16, 10, 953, 954, 955, 956, 957, 958, 78, 960, + 961, 14, 82, 16, 1763, 1819, 1829, 9, 200, 201, + 202, 203, 171, 20, 173, 34, 35, 13, 1732, 21, + 17, 1741, 147, 1021, 37, 78, 106, 34, 35, 82, + 1081, 13, 1600, 192, 11, 115, 32, 13, 34, 15, + 1608, 1092, 1610, 21, 1612, 170, 99, 172, 1967, 1366, + 32, 9, 34, 106, 73, 68, 69, 34, 35, 148, + 1021, 37, 115, 21, 37, 16, 191, 37, 1118, 1030, + 19, 1032, 1392, 1071, 70, 20, 1037, 12, 1039, 1040, + 1041, 1131, 171, 1044, 173, 1046, 1763, 1048, 70, 34, + 35, 34, 35, 1054, 15, 19, 73, 16, 9, 34, + 35, 9, 1063, 192, 1065, 78, 17, 15, 78, 82, + 1071, 18, 82, 34, 35, 10, 9, 32, 37, 34, + 1081, 1082, 95, 18, 17, 95, 1087, 1088, 19, 16, + 73, 1092, 1255, 106, 1257, 1949, 106, 1857, 73, 34, + 35, 18, 115, 1104, 166, 115, 18, 34, 35, 68, + 69, 3, 73, 2072, 1474, 70, 9, 1118, 32, 9, + 34, 1212, 11, 1124, 17, 1126, 1164, 17, 113, 114, + 1131, 85, 1492, 1134, 9, 89, 34, 35, 73, 1140, + 15, 33, 9, 97, 126, 1146, 73, 1148, 103, 16, + 1151, 18, 1153, 45, 1155, 9, 70, 1158, 34, 1777, + 1161, 15, 147, 148, 200, 201, 202, 203, 122, 1207, + 37, 1172, 15, 1888, 9, 73, 11, 20, 200, 201, + 202, 203, 17, 11, 16, 170, 171, 172, 173, 103, + 33, 34, 35, 9, 37, 16, 88, 20, 9, 34, + 35, 17, 37, 1963, 17, 16, 191, 192, 100, 101, + 21, 34, 35, 34, 35, 1216, 37, 37, 32, 1802, + 34, 42, 1805, 11, 1807, 852, 37, 854, 1995, 164, + 18, 166, 682, 1234, 684, 78, 10, 9, 73, 82, + 83, 84, 16, 15, 18, 200, 201, 202, 203, 92, + 9, 1252, 73, 188, 9, 32, 70, 34, 17, 17, + 34, 35, 17, 106, 9, 108, 9, 34, 35, 2038, + 37, 1352, 115, 1274, 17, 1366, 1684, 9, 1993, 171, + 172, 1889, 142, 115, 116, 105, 200, 201, 202, 203, + 182, 15, 184, 70, 1295, 16, 2056, 18, 9, 73, + 120, 121, 1808, 123, 136, 1306, 73, 1308, 128, 1593, + 1743, 1595, 18, 1746, 1747, 158, 37, 1318, 1319, 151, + 152, 141, 142, 34, 35, 9, 37, 546, 34, 35, + 549, 15, 15, 165, 154, 155, 156, 169, 1573, 10, + 1341, 546, 234, 1434, 549, 16, 10, 1955, 9, 1350, + 193, 1352, 16, 9, 15, 20, 176, 13, 21, 1942, + 1943, 1944, 73, 34, 35, 9, 1367, 73, 20, 1370, + 34, 35, 147, 17, 1375, 9, 1882, 9, 1884, 1380, + 1886, 15, 34, 35, 1829, 17, 200, 201, 202, 203, + 164, 1392, 166, 1801, 18, 170, 1804, 172, 1806, 1400, + 1401, 50, 73, 1763, 42, 43, 44, 9, 1124, 73, + 1126, 49, 50, 51, 188, 17, 191, 9, 310, 1420, + 37, 13, 1503, 200, 201, 202, 203, 319, 320, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 1533, 2038, 346, 347, 348, 1548, 113, 114, + 42, 78, 1463, 9, 851, 82, 9, 49, 50, 51, + 125, 17, 15, 1474, 2059, 130, 1477, 1662, 95, 9, + 1481, 1482, 1483, 870, 12, 68, 69, 17, 875, 106, + 18, 1492, 147, 148, 123, 8, 20, 10, 115, 9, + 887, 19, 1503, 1504, 11, 15, 893, 20, 9, 33, + 34, 35, 167, 37, 15, 170, 171, 172, 173, 11, + 33, 34, 35, 9, 37, 154, 155, 156, 11, 15, + 1531, 44, 1533, 1534, 9, 9, 191, 192, 11, 13, + 9, 14, 17, 16, 15, 18, 1087, 176, 42, 43, + 44, 113, 114, 1554, 78, 49, 50, 51, 82, 83, + 84, 576, 18, 76, 37, 78, 15, 9, 92, 82, + 83, 84, 1573, 15, 123, 88, 1657, 11, 470, 92, + 1581, 42, 106, 767, 108, 147, 148, 50, 49, 50, + 51, 115, 9, 106, 107, 108, 109, 9, 15, 34, + 35, 1786, 115, 15, 19, 154, 155, 9, 170, 171, + 172, 173, 13, 15, 37, 1616, 1617, 166, 680, 1657, + 682, 11, 684, 9, 686, 687, 688, 176, 16, 191, + 192, 9, 9, 9, 158, 9, 1637, 15, 15, 15, + 166, 15, 9, 535, 157, 158, 9, 18, 15, 9, + 1651, 1652, 1653, 1654, 1655, 15, 1657, 1658, 21, 551, + 8, 553, 10, 1664, 15, 1666, 20, 15, 9, 193, + 1671, 1672, 20, 9, 15, 9, 189, 9, 87, 15, + 193, 15, 105, 15, 1786, 33, 34, 35, 15, 37, + 536, 537, 538, 15, 57, 58, 44, 60, 590, 62, + 123, 64, 65, 66, 67, 128, 1707, 70, 15, 9, + 9, 1792, 101, 728, 729, 15, 15, 2048, 733, 142, + 2051, 2052, 174, 738, 12, 147, 148, 9, 76, 12, + 78, 154, 155, 156, 82, 83, 84, 1681, 1682, 1683, + 88, 2020, 123, 805, 92, 13, 808, 12, 170, 171, + 172, 173, 19, 176, 16, 770, 10, 1758, 106, 107, + 108, 109, 1763, 825, 826, 15, 16, 115, 77, 191, + 192, 15, 16, 154, 155, 16, 1777, 1318, 1319, 15, + 16, 2060, 15, 16, 16, 166, 1787, 849, 850, 57, + 58, 1792, 60, 10, 62, 176, 64, 65, 66, 67, + 1881, 1802, 70, 15, 1805, 2084, 1807, 15, 823, 157, + 158, 15, 874, 15, 2093, 15, 16, 15, 1819, 10, + 2099, 1822, 16, 2102, 886, 2104, 15, 2106, 1829, 2108, + 892, 2110, 13, 2112, 1872, 101, 1938, 43, 44, 2047, + 12, 189, 295, 296, 13, 193, 908, 1682, 1683, 741, + 1418, 1419, 744, 26, 27, 28, 29, 2065, 1250, 1251, + 9, 2069, 754, 18, 20, 2073, 2029, 2030, 2031, 1870, + 1871, 1872, 1873, 1604, 1605, 2083, 1877, 33, 34, 35, + 1881, 37, 2030, 2031, 9, 2048, 2094, 1888, 2051, 2052, + 2098, 18, 907, 16, 172, 173, 16, 16, 1979, 16, + 16, 916, 180, 1087, 919, 183, 184, 922, 923, 102, + 15, 15, 190, 15, 9, 16, 194, 195, 9, 934, + 16, 936, 78, 938, 939, 9, 82, 83, 84, 16, + 16, 16, 1933, 1934, 16, 87, 92, 16, 16, 54, + 16, 1942, 1943, 1944, 16, 16, 961, 16, 1949, 105, + 106, 16, 108, 16, 15, 15, 15, 15, 1959, 115, + 9, 123, 1503, 1504, 18, 9, 1087, 123, 9, 9, + 9, 16, 128, 26, 27, 28, 29, 30, 1979, 32, + 9, 9, 16, 18, 17, 12, 142, 1988, 9, 9, + 1531, 17, 1993, 17, 156, 9, 15, 10, 154, 155, + 156, 16, 158, 13, 166, 13, 1021, 13, 13, 13, + 172, 173, 15, 13, 176, 13, 2017, 18, 180, 2020, + 176, 183, 184, 17, 12, 95, 15, 12, 190, 15, + 124, 18, 194, 195, 15, 12, 12, 193, 12, 199, + 2041, 2042, 12, 42, 16, 18, 9, 9, 9, 941, + 9, 9, 9, 17, 946, 9, 1071, 9, 9, 2060, + 57, 58, 17, 60, 1248, 62, 16, 64, 65, 66, + 67, 17, 1134, 70, 0, 17, 15, 17, 1140, 16, + 11, 19, 17, 2084, 1146, 11, 1148, 17, 17, 1151, + 17, 1153, 2093, 1155, 17, 17, 1158, 17, 2099, 1161, + 17, 2102, 17, 2104, 17, 2106, 54, 2108, 17, 2110, + 1172, 2112, 16, 54, 1655, 17, 1657, 1658, 54, 19, + 54, 9, 16, 1664, 17, 1666, 9, 53, 9, 9, + 1671, 1672, 16, 15, 1318, 1319, 15, 15, 94, 9, + 1032, 18, 15, 19, 12, 17, 21, 1039, 74, 1041, + 15, 104, 15, 79, 80, 15, 1048, 15, 15, 15, + 15, 15, 9, 1178, 1179, 1180, 19, 1182, 17, 9, + 9, 9, 9, 1065, 17, 16, 102, 11, 9, 95, + 124, 17, 94, 15, 110, 9, 16, 113, 114, 1081, + 17, 17, 17, 94, 8, 98, 15, 1318, 1319, 9, + 1092, 17, 13, 12, 9, 12, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 1295, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 1306, 16, 1787, 13, 15, 20, + 176, 9, 17, 17, 17, 26, 27, 28, 29, 30, + 186, 32, 33, 34, 35, 17, 37, 16, 16, 16, + 16, 16, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 16, 16, 16, + 15, 123, 73, 15, 12, 1367, 78, 17, 104, 16, + 95, 13, 9, 1375, 17, 98, 17, 17, 1380, 1503, + 1504, 17, 15, 17, 12, 12, 15, 9, 9, 1870, + 1871, 1872, 1873, 95, 156, 94, 1877, 9, 1400, 1401, + 94, 13, 17, 16, 16, 17, 16, 1531, 9, 21, + 172, 173, 9, 9, 176, 9, 9, 9, 180, 9, + 1252, 183, 184, 9, 6, 37, 184, 6, 190, 293, + 131, 296, 194, 195, 11, 748, 529, 531, 594, 540, + 306, 547, 1503, 1504, 697, 57, 58, 853, 60, 865, + 62, 861, 64, 65, 66, 67, 816, 538, 70, 820, + 538, 16, 644, 1418, 1419, 20, 1063, 1046, 955, 1124, + 1531, 26, 27, 28, 29, 30, 1350, 32, 33, 34, + 35, 1941, 1881, 1792, 653, 1766, 41, 1319, 43, 44, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 2016, 56, 1537, 1696, 1543, 1543, 13, 1988, 63, 64, + 65, 66, 67, 68, 69, 1140, 1993, 1148, 73, 1474, + 1352, 1306, 808, 1161, 1295, 1153, 1158, 1568, 1155, 1165, + 1400, 1655, 1569, 1657, 1658, 1401, 549, 1492, 1370, 1726, + 1664, 1637, 1666, 1727, 1777, 738, 569, 1671, 1672, 569, + 57, 58, 418, 60, 186, 62, 1680, 64, 65, 66, + 67, 729, 934, 70, 1419, 1251, 1581, 2028, 836, 435, + 436, 549, 1082, 1979, 1520, 1936, 1789, 1545, 133, 1581, + 1701, 1431, 1531, 1597, 86, 281, 971, 1274, 1420, 2017, + 145, 43, 42, -1, 1655, 566, 1657, 1658, -1, -1, + -1, -1, -1, 1664, -1, 1666, -1, -1, -1, -1, + 1671, 1672, -1, -1, 45, -1, -1, 1741, -1, -1, + -1, -1, 16, -1, 18, 491, 20, 493, -1, -1, + -1, 1463, 26, 27, 28, 29, 30, -1, 32, 33, + 34, 35, 16, 37, 510, 1477, 20, 41, -1, 1481, + 1482, 1483, 26, 27, 28, 29, 30, 88, 32, 33, + 34, 35, 56, 1787, -1, -1, -1, -1, -1, 63, + 101, 1503, 1504, -1, 540, -1, -1, -1, -1, 73, + -1, 547, 56, -1, -1, -1, -1, -1, -1, 63, + 64, 65, 66, 67, 68, 69, -1, -1, 16, 73, + -1, 1533, 20, 569, -1, -1, -1, -1, 26, 27, + 28, 29, 30, -1, 32, 33, 34, 35, -1, 37, + -1, -1, 1554, -1, -1, -1, 1787, -1, -1, -1, + 596, -1, -1, 1857, 13, -1, -1, -1, -1, -1, + -1, 172, -1, 13, -1, -1, 1870, 1871, 1872, 1873, + -1, -1, 618, 1877, -1, 73, -1, -1, -1, -1, + -1, -1, -1, 42, 630, -1, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, + 59, 60, 61, 62, 1616, 1617, -1, 57, 58, -1, + 60, 70, 62, -1, 64, 65, 66, 67, -1, -1, + 70, -1, -1, 234, -1, 1637, -1, -1, 1763, 1870, + 1871, 1872, 1873, -1, 11, -1, 1877, 1819, -1, 16, + -1, -1, -1, 20, -1, 1657, 1658, 1829, -1, 26, + 27, 28, 29, 30, -1, 32, 33, 34, 35, 1963, + -1, -1, -1, -1, 41, -1, 43, 44, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 56, + -1, -1, -1, -1, 1988, -1, 63, 64, 65, 66, + 67, 68, 69, -1, -1, 1707, 73, -1, -1, 310, + -1, -1, -1, -1, -1, -1, -1, -1, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, -1, -1, 346, 347, 348, -1, -1, + -1, -1, -1, -1, 16, -1, 1758, 1988, 20, -1, + -1, -1, 2056, -1, 26, 27, 28, 29, 30, -1, + 32, 33, 34, 35, -1, 37, 8, 1949, 10, -1, + -1, 16, -1, -1, -1, 20, -1, -1, 20, -1, + 1792, 26, 27, 28, 29, 30, -1, 32, 33, 34, + 35, 33, 34, 35, -1, 37, 41, -1, 43, 44, + -1, 73, 44, -1, -1, -1, -1, -1, -1, -1, + 1822, 56, -1, -1, -1, -1, -1, -1, 63, 64, + 65, 66, 67, 68, 69, -1, -1, -1, 73, -1, + -1, -1, -1, -1, 76, -1, 78, -1, -1, -1, + 82, 83, 84, -1, 89, -1, 88, -1, 17, -1, + 92, 96, -1, -1, -1, -1, -1, -1, -1, 470, + -1, 1873, -1, 105, 106, 107, 108, 109, -1, 1881, + -1, -1, -1, 115, -1, -1, -1, -1, 120, 121, + -1, 123, -1, -1, -1, -1, 128, -1, 57, 58, + -1, 60, -1, 62, -1, 64, 65, 66, 67, 141, + 142, 70, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 154, 155, 156, 157, 158, -1, -1, -1, + 966, 1933, 1934, -1, 535, -1, -1, -1, 974, 975, + -1, -1, -1, -1, 176, -1, 8, -1, 10, -1, + 551, 987, 553, -1, -1, -1, -1, 189, 20, -1, + -1, 193, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 33, 34, 35, -1, 37, -1, 1979, -1, -1, + -1, -1, 44, -1, 16, -1, -1, -1, 20, 590, + -1, -1, -1, -1, 26, 27, 28, 29, 30, -1, + 32, 33, 34, 35, -1, -1, -1, -1, -1, 41, + 42, 43, 44, -1, 76, -1, 78, -1, 2020, -1, + 82, 83, 84, -1, 56, -1, 88, -1, -1, -1, + 92, 63, 64, 65, 66, 67, 68, 69, -1, 2041, + 2042, 73, -1, 105, 106, 107, 108, 109, -1, -1, + -1, -1, -1, 115, -1, -1, -1, -1, 2060, -1, + 16, 123, -1, -1, 20, -1, 128, -1, -1, -1, + 26, 27, 28, 29, 30, -1, 32, -1, 34, 35, + 142, 37, 2084, 34, 35, -1, 37, -1, -1, -1, + -1, 2093, 154, 155, 156, 157, 158, 2099, -1, -1, + 2102, 133, 2104, -1, 2106, -1, 2108, -1, 2110, -1, + 2112, -1, -1, 145, 176, -1, -1, 73, -1, -1, + -1, -1, 73, 74, 75, 76, -1, 189, 79, 80, + 81, 193, -1, -1, -1, 86, -1, -1, -1, 90, + 741, -1, -1, 744, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 754, 105, -1, -1, -1, -1, 110, + 111, 112, -1, -1, -1, -1, -1, -1, 119, -1, + -1, -1, 123, -1, -1, -1, -1, 128, -1, -1, + -1, -1, 1218, 134, 135, -1, 137, 138, 139, 140, + -1, 142, -1, 144, -1, -1, -1, -1, 149, 150, + -1, -1, 153, 154, 155, 156, -1, -1, 159, 160, + 161, 162, 163, -1, -1, -1, -1, 168, 169, -1, + -1, 172, 173, -1, 175, 176, 177, 178, 179, 180, + -1, -1, 183, 184, 185, -1, -1, -1, -1, 190, + -1, -1, -1, 194, 195, 196, 197, 198, -1, -1, + -1, -1, -1, -1, 13, -1, -1, 16, -1, -1, + -1, 20, -1, -1, -1, -1, -1, 26, 27, 28, + 29, 30, -1, 32, -1, 34, 35, -1, 37, -1, + -1, -1, 41, -1, 43, 44, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 56, -1, -1, + -1, 1337, -1, -1, 63, 64, 65, 66, 67, 68, + 69, -1, -1, 19, 73, -1, -1, 1353, 1354, 78, + -1, -1, -1, 82, -1, -1, -1, -1, -1, -1, + 89, -1, -1, -1, -1, -1, -1, 96, 44, 45, + 941, -1, -1, -1, -1, 946, -1, 106, -1, -1, + -1, -1, -1, -1, -1, -1, 115, -1, -1, 16, + -1, -1, -1, 20, -1, -1, -1, 1403, -1, 26, + 27, 28, 29, 30, -1, 32, 33, 34, 35, -1, + -1, -1, 88, -1, 41, -1, 43, 44, -1, -1, + -1, -1, -1, -1, 100, 101, -1, -1, -1, 56, + -1, -1, -1, 1439, -1, -1, 63, 64, 65, 66, + 67, 68, 69, -1, 1450, -1, 73, -1, -1, -1, + -1, -1, 128, -1, -1, 131, -1, -1, -1, -1, + -1, 1032, 89, -1, -1, -1, -1, -1, 1039, 96, + 1041, -1, -1, -1, -1, -1, -1, 1048, -1, -1, + -1, -1, -1, 159, 160, -1, -1, 16, 164, 165, + 166, 20, -1, -1, 1065, 171, 172, 26, 27, 28, + 29, 30, -1, 32, 33, 34, 35, -1, 37, -1, + 1081, -1, 41, 189, 43, 44, -1, -1, -1, 195, + 196, 1092, -1, 1529, 1530, -1, -1, 56, -1, -1, + -1, 1537, -1, -1, 63, 64, 65, 66, 67, 68, + 69, -1, -1, -1, 73, -1, -1, -1, -1, -1, + 226, -1, -1, -1, -1, -1, -1, -1, 234, -1, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, -1, -1, -1, + 266, 267, -1, -1, 1600, -1, -1, -1, -1, -1, + -1, -1, 1608, 1609, 1610, 1611, 1612, -1, -1, 285, + -1, -1, -1, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 1633, 1634, -1, + 59, 60, 61, 62, 310, 64, 312, 313, -1, 68, + -1, -1, -1, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, -1, -1, + 346, 347, 348, -1, -1, 16, 17, -1, -1, 20, + -1, 1252, -1, -1, -1, 26, 27, 28, 29, 30, + 1696, 32, 33, 34, 35, -1, -1, -1, -1, -1, + 41, -1, 43, 44, 1710, -1, -1, -1, -1, -1, + -1, 387, -1, 389, 390, 56, -1, -1, 394, 395, + 1726, -1, 63, 64, 65, 66, 67, 68, 69, -1, + -1, 16, 73, -1, -1, 20, 1742, -1, -1, -1, + -1, 26, 27, 28, 29, 30, -1, 32, 1319, 34, + 35, -1, 37, -1, -1, -1, 41, -1, 43, 44, + 1766, 437, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 56, -1, -1, -1, -1, -1, -1, 63, 64, + 65, 66, 67, 68, 69, -1, -1, -1, 73, -1, + -1, -1, -1, 78, 470, -1, 472, 82, -1, 1370, + -1, -1, -1, -1, 89, -1, -1, -1, 1814, -1, + -1, 96, -1, -1, -1, 16, -1, 1823, -1, 20, + -1, 106, -1, -1, -1, 26, 27, 28, 29, 30, + 115, 32, 33, 34, 35, 1841, -1, -1, -1, 1845, + 41, -1, 43, 44, 1850, -1, -1, -1, -1, 1420, + -1, -1, -1, -1, -1, 56, -1, -1, -1, 535, + -1, -1, 63, 64, 65, 66, 67, 68, 69, -1, + -1, -1, 73, -1, -1, 551, -1, 553, -1, -1, + -1, -1, -1, 1889, -1, -1, -1, -1, 89, -1, + -1, -1, 1463, -1, -1, 96, -1, -1, -1, -1, + 1906, -1, -1, 1909, -1, -1, 1477, -1, 1914, -1, + 1481, 1482, 1483, -1, 590, -1, -1, -1, -1, -1, + -1, -1, 1928, 1929, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1504, -1, -1, -1, -1, -1, -1, + 16, -1, -1, -1, 20, -1, -1, -1, -1, 1955, + 26, 27, 28, 29, 30, 1961, 32, 33, 34, 35, + -1, -1, -1, -1, -1, 41, -1, 43, 44, 1975, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 56, -1, -1, 1554, -1, -1, -1, 63, 64, 65, + 66, 67, 68, 69, -1, -1, -1, 73, 2004, -1, + -1, -1, -1, -1, 680, -1, 682, -1, 684, -1, + 686, 687, 688, 89, -1, -1, -1, -1, -1, -1, + 2026, -1, 2028, -1, -1, -1, -1, 2033, 2034, 2035, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 2045, + -1, 2047, -1, -1, -1, 1616, 1617, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 2065, + -1, -1, -1, 2069, -1, 741, 1637, 2073, 744, -1, + 9, -1, -1, -1, -1, -1, -1, 2083, 754, 2085, + -1, 20, 21, -1, -1, -1, -1, 1658, 2094, -1, + -1, -1, 2098, -1, 770, -1, -1, -1, -1, 34, + 35, -1, 37, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, + 59, 60, 61, 62, -1, 64, 65, 66, 67, 805, + -1, 70, 808, -1, -1, -1, 1707, -1, 73, 74, + 75, 76, -1, -1, 79, 80, 81, 823, -1, 825, + 826, 86, -1, -1, -1, 90, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 105, -1, -1, 849, 850, 110, -1, 112, -1, -1, + -1, -1, -1, -1, 119, -1, -1, 1758, 123, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 874, 134, + 135, -1, 137, 138, 139, 140, -1, -1, -1, 144, + 886, -1, -1, -1, 149, 150, 892, -1, 153, 154, + 155, 156, -1, -1, 159, 160, 161, 162, 163, -1, + -1, 907, 908, -1, -1, -1, -1, 172, 173, -1, + 175, 176, 177, 178, 179, 180, -1, -1, 183, 184, + 185, 1822, -1, -1, -1, 190, -1, -1, -1, 194, + 195, 196, 197, 198, 16, 941, -1, -1, 20, -1, + 946, -1, -1, -1, 26, 27, 28, 29, 30, -1, + 32, 33, 34, 35, -1, 961, -1, -1, -1, 41, + -1, 43, 44, -1, 13, -1, -1, -1, -1, -1, + -1, -1, 1873, -1, 56, -1, -1, -1, -1, -1, + -1, 63, 64, 65, 66, 67, 68, 69, -1, -1, + -1, 73, -1, 42, -1, -1, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 89, 57, 58, + 59, 60, 61, 62, 96, 1021, -1, -1, -1, -1, + -1, 70, -1, -1, -1, -1, 1032, -1, -1, -1, + -1, -1, -1, 1039, -1, 1041, -1, -1, -1, -1, + -1, -1, 1048, -1, 16, -1, -1, -1, 20, -1, + -1, -1, -1, -1, 26, 27, 28, 29, 30, 1065, + 32, 33, 34, 35, -1, 1071, -1, -1, -1, 41, + -1, 43, 44, -1, -1, 1081, -1, -1, -1, -1, + -1, 1087, -1, -1, 56, -1, 1092, -1, -1, -1, + -1, 63, 64, 65, 66, 67, 68, 69, -1, -1, + -1, 73, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, -1, 89, -1, 59, + 60, 61, 62, 1129, 96, -1, -1, -1, 1134, -1, + -1, -1, -1, -1, 1140, -1, -1, -1, 13, 14, + 1146, -1, 1148, -1, 19, 1151, -1, 1153, -1, 1155, + -1, -1, 1158, -1, -1, 1161, -1, -1, 1164, -1, + -1, -1, -1, -1, -1, -1, 1172, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, -1, 57, 58, 59, 60, 61, 62, -1, 64, + 65, 66, 67, 68, 69, 70, -1, 1203, -1, -1, + -1, 1207, -1, -1, -1, -1, 1212, -1, -1, -1, + -1, -1, -1, -1, 1220, 1221, 1222, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 1236, -1, -1, 1239, 1240, 1241, -1, -1, -1, -1, + -1, -1, -1, -1, 16, -1, 1252, -1, 20, 1255, + -1, 1257, -1, -1, 26, 27, 28, 29, 30, -1, + 32, 33, 34, 35, -1, -1, -1, -1, -1, 41, + -1, 43, 44, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 56, -1, -1, -1, -1, 1295, + -1, 63, 64, 65, 66, 67, 68, 69, -1, -1, + 1306, 73, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 1318, 1319, -1, -1, -1, 89, -1, -1, + -1, -1, -1, -1, 96, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, -1, + 16, -1, -1, -1, 20, -1, 1352, -1, -1, -1, + 26, 27, 28, 29, 30, -1, 32, 33, 34, 35, + 1366, 1367, -1, 1369, 1370, 41, -1, 43, 44, 1375, + -1, 1377, -1, -1, 1380, -1, 1382, -1, -1, -1, + 56, -1, -1, -1, -1, -1, -1, 63, 64, 65, + 66, 67, 68, 69, 1400, 1401, -1, 73, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, -1, 89, 1420, 59, 60, 61, 62, 1425, + 1426, -1, -1, -1, -1, -1, -1, -1, 1434, -1, + -1, -1, 1438, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1449, -1, -1, -1, -1, -1, -1, + -1, -1, 1458, -1, 1460, -1, -1, 1463, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 1474, -1, + -1, 1477, -1, -1, -1, 1481, 1482, 1483, -1, -1, + -1, -1, -1, -1, -1, -1, 1492, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1503, 1504, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, + -1, -1, -1, 20, -1, 1531, -1, 1533, -1, 26, + 27, 28, 29, 30, -1, 32, -1, 34, 35, -1, + -1, -1, 1548, -1, 41, -1, 43, 44, 1554, 1555, + -1, -1, 1558, -1, -1, -1, 1562, 1563, 1564, 56, + -1, -1, 1568, -1, 1570, -1, 63, 64, 65, 66, + 67, 68, 69, 1579, -1, 1581, 73, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1593, -1, 1595, + -1, -1, 89, -1, -1, -1, -1, 1603, 1604, 1605, + 1606, -1, -1, -1, -1, -1, -1, 1613, -1, -1, + 1616, 1617, -1, 19, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 1637, -1, -1, -1, 9, -1, -1, 44, 45, + -1, -1, -1, -1, -1, -1, 20, 21, -1, 1655, + -1, 1657, 1658, -1, -1, -1, -1, -1, 1664, -1, + 1666, -1, -1, -1, -1, 1671, 1672, -1, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, -1, 57, 58, 59, 60, 61, 62, -1, + 64, 65, 66, 67, 100, 101, 70, -1, -1, -1, + -1, 1707, -1, -1, -1, 1711, -1, 1713, -1, -1, + -1, -1, -1, 1719, -1, -1, -1, -1, -1, -1, + -1, -1, 128, -1, 1730, 131, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1743, -1, -1, + 1746, 1747, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 16, 1758, 18, 160, 20, -1, 1763, 164, -1, + -1, 26, 27, 28, 29, 30, 172, 32, 33, 34, + 35, -1, -1, -1, -1, -1, 41, -1, 43, 44, + -1, 1787, -1, 189, -1, -1, 1792, -1, -1, 195, + 196, 56, -1, -1, -1, -1, -1, -1, 63, 64, + 65, 66, 67, 68, 69, -1, -1, -1, 73, -1, + -1, -1, -1, 1819, -1, -1, 1822, -1, -1, -1, + -1, 1827, -1, 1829, -1, 1831, 1832, -1, -1, 1835, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, -1, -1, 1865, + 266, -1, -1, -1, 1870, 1871, 1872, 1873, 16, -1, + -1, 1877, 20, -1, -1, 1881, -1, -1, 26, 27, + 28, 29, 30, -1, 32, -1, 34, 35, -1, -1, + -1, -1, -1, 41, 1900, 43, 44, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 312, 313, 56, -1, + -1, -1, -1, -1, -1, 63, 64, 65, 66, 67, + 68, 69, -1, -1, -1, 73, -1, 1933, 1934, 1935, + 1936, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 89, -1, 1949, -1, 1951, -1, -1, 96, -1, + 1956, -1, -1, -1, -1, -1, -1, -1, 1964, 1965, + 1966, -1, -1, 1969, 1970, 1971, -1, -1, 1974, -1, + -1, -1, -1, 1979, -1, -1, -1, -1, -1, -1, + -1, 387, 1988, 389, 390, -1, -1, -1, 394, 395, + -1, -1, -1, -1, -1, -1, -1, 2003, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, -1, -1, 2020, 59, 60, 61, 62, -1, + 64, -1, -1, 2029, 2030, 2031, 2032, -1, -1, -1, + -1, 437, -1, -1, -1, 2041, 2042, -1, -1, -1, + -1, -1, 2048, -1, -1, 2051, 2052, -1, -1, -1, + -1, -1, -1, -1, 2060, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 472, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 2084, -1, + 2086, -1, 9, -1, -1, -1, 2092, 2093, -1, -1, + -1, -1, -1, 2099, 21, -1, 2102, -1, 2104, -1, + 2106, -1, 2108, -1, 2110, -1, 2112, -1, -1, -1, + -1, -1, -1, -1, -1, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 535, + 57, 58, 59, 60, 61, 62, 9, 64, 65, 66, + 67, 68, 69, 70, -1, -1, -1, -1, 21, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, -1, 57, 58, 59, 60, 61, 62, + 9, 64, 65, 66, 67, 68, 69, 70, -1, -1, + -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, + 59, 60, 61, 62, 9, 64, 65, 66, 67, 68, + 69, 70, -1, -1, -1, 20, 21, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, -1, 57, 58, 59, 60, 61, 62, 9, 64, + 65, 66, 67, -1, -1, 70, -1, -1, -1, 20, + 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, -1, 57, 58, 59, 60, + 61, 62, -1, 64, 65, 66, 67, 9, -1, 70, + -1, -1, -1, -1, 770, -1, -1, -1, 20, 21, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, -1, 57, 58, 59, 60, 61, + 62, 9, 64, 65, 66, 67, -1, 823, 70, -1, + -1, -1, 20, 21, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, -1, 57, + 58, 59, 60, 61, 62, -1, 64, 65, 66, 67, + -1, -1, 70, 13, 14, -1, -1, -1, -1, 19, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 907, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, -1, 57, 58, 59, + 60, 61, 62, -1, 64, 65, 66, 67, 68, 69, + 70, 13, 14, -1, -1, -1, -1, 19, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 961, -1, -1, -1, -1, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, -1, 57, 58, 59, 60, 61, + 62, -1, 64, 65, 66, 67, 68, 69, 70, 13, + 14, -1, -1, -1, -1, 19, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1021, -1, -1, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, -1, 57, 58, 59, 60, 61, 62, -1, + 64, 65, 66, 67, 68, 69, 70, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 13, 14, + -1, -1, -1, -1, 19, 1071, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1081, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 1092, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, -1, 57, 58, 59, 60, 61, 62, -1, 64, + 65, 66, 67, 68, 69, 70, -1, -1, -1, -1, + -1, -1, -1, 1129, -1, -1, -1, -1, -1, -1, + 13, 14, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, -1, 57, -1, 59, + 60, 61, 62, -1, 64, 65, 66, 67, 1164, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, -1, 57, 58, 59, 60, 61, 62, + -1, 64, 65, 66, 67, 68, 69, 70, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1203, -1, -1, + -1, 1207, -1, -1, -1, -1, 1212, 13, -1, -1, + -1, -1, -1, -1, 1220, 1221, 1222, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 1236, -1, -1, 1239, 1240, 1241, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 13, 57, 58, 59, 60, 61, 62, -1, 64, 65, + 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, -1, 57, 58, 59, 60, 61, 62, + -1, 64, 65, 66, 67, 68, 69, 70, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, + -1, 20, -1, -1, -1, -1, -1, 26, 27, 28, + 29, 30, -1, 32, 33, 34, 35, -1, -1, -1, + 45, -1, 41, -1, 43, 44, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 56, -1, -1, + 1366, -1, -1, 1369, 63, 64, 65, 66, 67, 68, + 69, 1377, -1, -1, 73, -1, 1382, -1, -1, -1, + -1, -1, -1, 88, -1, -1, -1, 16, -1, -1, + -1, 20, -1, -1, -1, 100, 101, 26, 27, 28, + 29, 30, -1, 32, 33, 34, 35, -1, -1, -1, + -1, -1, 41, -1, 43, 44, -1, -1, -1, 1425, + 1426, -1, -1, -1, -1, -1, -1, 56, 1434, -1, + -1, -1, 1438, -1, 63, 64, 65, 66, 67, 68, + 69, -1, -1, 1449, 73, -1, -1, -1, -1, -1, + -1, -1, 1458, -1, 1460, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 171, 172, 1474, -1, + -1, 13, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 1492, -1, -1, 59, + 60, 61, 62, -1, 64, 65, 66, 67, 1504, -1, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, -1, 57, 58, 59, 60, 61, + 62, 226, 64, 65, 66, 67, 68, 69, 70, 234, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 1548, -1, -1, -1, -1, -1, -1, 1555, + -1, -1, 1558, -1, -1, -1, 1562, 1563, 1564, -1, + -1, -1, 1568, -1, 1570, -1, -1, -1, -1, -1, + -1, -1, -1, 1579, -1, -1, -1, -1, -1, -1, + 285, -1, -1, -1, -1, -1, -1, 1593, -1, 1595, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 1606, -1, -1, -1, -1, 310, -1, 1613, -1, -1, + -1, -1, -1, -1, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 13, + 14, 346, 347, 348, -1, 19, -1, -1, -1, -1, + -1, 1657, 1658, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, -1, 57, 58, 59, 60, 61, 62, -1, + 64, 65, 66, 67, -1, -1, 70, 13, 14, -1, + -1, 1707, -1, -1, -1, 1711, -1, 1713, -1, -1, + -1, -1, -1, 1719, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1730, -1, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 15, 57, 58, 59, 60, 61, 62, -1, 64, 65, + 66, 67, -1, -1, 70, -1, -1, 1763, -1, -1, + -1, -1, -1, -1, -1, 470, -1, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 1787, 57, 58, 59, 60, 61, 62, -1, 64, + 65, 66, 67, 68, 69, 70, 501, 502, 503, -1, + 505, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 1822, -1, -1, -1, + -1, 1827, -1, -1, 16, 1831, 1832, -1, 20, 1835, + 535, -1, -1, -1, 26, 27, 28, 29, 30, -1, + 32, -1, 34, 35, -1, 37, 551, -1, 553, 41, + -1, 43, 44, -1, -1, -1, -1, -1, -1, 1865, + -1, -1, -1, -1, 56, 1871, 1872, 1873, -1, -1, + 13, 63, 64, 65, 66, 67, 68, 69, -1, -1, + -1, 73, -1, -1, -1, 590, 591, -1, -1, -1, + -1, -1, -1, -1, 1900, -1, -1, -1, -1, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, -1, 57, 58, 59, 60, 61, 62, + 625, 64, 65, 66, 67, -1, -1, 70, -1, 1935, + 1936, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1951, -1, -1, -1, -1, + 1956, -1, -1, 658, -1, -1, -1, -1, 1964, 1965, + 1966, -1, 16, 1969, 1970, 1971, 20, -1, 1974, -1, + 675, -1, 26, 27, 28, 29, 30, -1, 32, 33, + 34, 35, 1988, -1, -1, -1, -1, 41, -1, 43, + 44, -1, -1, -1, -1, -1, -1, 2003, -1, -1, + -1, -1, 56, -1, -1, 45, -1, -1, -1, 63, + 64, 65, 66, 67, 68, 69, -1, -1, -1, 73, + -1, -1, -1, -1, -1, -1, 2032, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 741, -1, 743, 744, + -1, -1, -1, -1, -1, -1, -1, -1, 88, 754, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 100, 101, 767, -1, -1, 770, -1, -1, 13, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 2086, -1, -1, -1, -1, -1, 2092, -1, -1, -1, + -1, -1, 797, 798, 799, 800, -1, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, -1, 57, 58, 59, 60, 61, 62, 823, 64, + 65, 66, 67, -1, -1, 70, -1, -1, -1, -1, + -1, 171, 172, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 852, 853, 854, + -1, -1, -1, -1, -1, 860, 861, -1, -1, -1, + 865, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 875, -1, -1, -1, 13, -1, -1, -1, -1, -1, + -1, -1, 887, -1, -1, -1, 226, -1, 893, -1, + -1, -1, -1, -1, 234, -1, -1, -1, -1, -1, + -1, -1, 907, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, + 59, 60, 61, 62, -1, 64, 65, 66, 67, -1, + -1, 70, -1, -1, -1, -1, 941, -1, 943, -1, + -1, 946, -1, -1, -1, 285, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 961, 962, -1, -1, + 965, -1, -1, -1, -1, 970, 971, -1, 973, -1, + 310, -1, 977, -1, -1, -1, -1, -1, -1, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, -1, -1, 346, 347, 348, -1, + -1, -1, -1, -1, 1019, -1, 1021, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1032, -1, -1, + -1, -1, -1, -1, 1039, -1, 1041, -1, -1, -1, + -1, -1, -1, 1048, -1, -1, -1, -1, -1, 1054, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 1065, -1, -1, 13, -1, -1, 1071, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 1081, -1, -1, -1, + -1, -1, 1087, -1, -1, -1, -1, 1092, -1, -1, + -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, -1, 57, 58, 59, + 60, 61, 62, 1118, 64, 65, 66, 67, -1, 1124, + 70, 1126, -1, -1, -1, -1, 1131, -1, 1133, -1, + 470, 13, -1, -1, -1, -1, 1141, -1, -1, -1, + -1, -1, -1, -1, 1149, -1, -1, -1, -1, 1154, + -1, -1, 1157, -1, -1, 1160, -1, -1, 1163, -1, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, -1, 57, 58, 59, 60, 61, + 62, -1, 64, 65, 66, 67, -1, 16, 70, -1, + -1, 20, -1, -1, -1, 535, -1, 26, 27, 28, + 29, 30, -1, 32, 33, 34, 35, -1, 1213, -1, + -1, 551, 41, 553, 43, 44, -1, -1, -1, -1, + -1, -1, 1227, 1228, -1, -1, -1, 56, -1, -1, + -1, -1, -1, -1, 63, 64, 65, 66, 67, 68, + 69, -1, -1, 1248, 73, -1, -1, 1252, 16, -1, + 590, -1, 20, -1, -1, -1, -1, -1, 26, 27, + 28, 29, 30, -1, 32, 33, 34, 35, -1, -1, + -1, -1, -1, 41, -1, 43, 44, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 56, -1, + -1, -1, 1297, -1, -1, 63, 64, 65, 66, 67, + 68, 69, 1307, -1, -1, 73, 16, -1, -1, -1, + 20, -1, -1, 1318, 1319, -1, 26, 27, 28, 29, + 30, -1, 32, 33, 34, 35, -1, -1, -1, -1, + -1, 41, -1, 43, 44, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 56, 1352, -1, -1, + -1, -1, -1, 63, 64, 65, 66, 67, 68, 69, + -1, -1, -1, 73, -1, 1370, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 16, -1, -1, -1, 20, -1, -1, 1392, -1, -1, + 26, 27, 28, 29, 30, -1, 32, 33, 34, 35, + 1405, 741, -1, -1, 744, 41, -1, 43, 44, -1, + -1, -1, -1, -1, 754, 1420, -1, -1, -1, -1, + 56, -1, -1, -1, -1, -1, 1431, 63, 64, 65, + 66, 67, 68, 69, -1, -1, -1, 73, -1, -1, + -1, -1, -1, 16, -1, -1, -1, 20, -1, -1, + -1, -1, -1, 26, 27, 28, 29, 30, 1463, 32, + 33, 34, 35, -1, -1, -1, -1, 1472, 41, 1474, + 43, 44, 1477, -1, -1, -1, 1481, 1482, 1483, -1, + -1, -1, -1, 56, -1, -1, -1, 1492, -1, -1, + 63, 64, 65, 66, 67, 68, 69, -1, 1503, 1504, + 73, -1, -1, -1, 16, -1, -1, -1, 20, -1, + -1, -1, -1, -1, 26, 27, 28, 29, 30, -1, + 32, 33, 34, 35, -1, -1, 1531, -1, 1533, 41, + -1, 43, 44, -1, -1, -1, -1, -1, -1, -1, + 1545, -1, -1, -1, 56, -1, -1, -1, -1, 1554, + 1555, 63, 64, 65, 66, 67, 68, 69, -1, -1, + 1565, 73, -1, -1, -1, -1, -1, 16, -1, -1, + -1, 20, -1, -1, -1, -1, 916, 26, 27, 28, + 29, 30, -1, 32, 33, 34, 35, -1, -1, -1, + -1, -1, 41, -1, 43, 44, -1, -1, -1, -1, + -1, 941, -1, -1, -1, -1, 946, 56, -1, -1, + -1, 1616, 1617, -1, 63, 64, 65, 66, 67, 68, + 69, -1, -1, -1, 73, -1, -1, -1, -1, -1, + 16, -1, 1637, -1, 20, -1, -1, -1, -1, -1, + 26, 27, 28, 29, 30, 1650, 32, 33, 34, 35, + 1655, -1, 1657, 1658, -1, 41, -1, 43, 44, 1664, + -1, 1666, -1, -1, -1, -1, 1671, 1672, -1, -1, + 56, -1, -1, -1, -1, 1680, -1, 63, 64, 65, + 66, 67, 68, 69, -1, -1, -1, 73, -1, -1, + -1, -1, 1032, -1, -1, -1, -1, -1, -1, 1039, + -1, 1041, 1707, -1, -1, -1, -1, -1, 1048, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1065, -1, 1732, -1, -1, + -1, -1, -1, -1, -1, -1, 1741, -1, -1, -1, + -1, 1081, -1, -1, -1, -1, -1, 1087, -1, -1, + 16, -1, 1092, 1758, 20, -1, -1, -1, 1763, -1, + 26, 27, 28, 29, 30, -1, 32, 33, 34, 35, + -1, -1, -1, -1, -1, 41, -1, 43, 44, -1, + -1, -1, -1, -1, -1, -1, -1, 1792, -1, -1, + 56, -1, -1, -1, -1, -1, -1, 63, 64, 65, + 66, 67, 68, 69, -1, -1, -1, 73, -1, 16, + -1, -1, -1, 20, -1, -1, -1, 1822, -1, 26, + 27, 28, 29, 30, -1, 32, -1, 34, 35, -1, + -1, -1, -1, -1, 41, -1, 43, 44, -1, -1, + -1, -1, -1, 1848, -1, -1, -1, -1, -1, 56, + -1, -1, 1857, -1, -1, -1, 63, 64, 65, 66, + 67, 68, 69, -1, -1, 1870, 73, 16, 1873, -1, + -1, 20, 1877, -1, -1, -1, 1881, 26, 27, 28, + 29, 30, -1, 32, -1, 34, 35, 16, -1, -1, + -1, 20, 41, -1, 43, 44, -1, 26, 27, 28, + 29, 30, -1, 32, 33, 34, 35, 56, 37, -1, + -1, -1, 1252, -1, 63, 64, 65, 66, 67, 68, + 69, -1, -1, -1, 73, -1, -1, 56, 1933, 1934, + -1, -1, -1, -1, 63, 64, 65, 66, 67, 68, + 69, -1, -1, -1, 73, 45, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 1963, -1, + -1, -1, 1967, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1979, -1, -1, -1, 1318, 1319, + -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 100, 101, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 1352, -1, -1, 2020, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 1370, -1, -1, -1, -1, -1, 2041, 2042, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 2056, -1, -1, -1, 2060, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 2072, -1, -1, + -1, 171, 172, -1, -1, -1, -1, -1, -1, 2084, + 1420, -1, -1, -1, -1, -1, -1, -1, 2093, -1, + -1, -1, -1, -1, 2099, -1, -1, 2102, -1, 2104, + -1, 2106, -1, 2108, -1, 2110, -1, 2112, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, -1, 1463, -1, 59, 60, 61, 62, -1, + 64, -1, 66, 67, 234, -1, -1, 1477, -1, -1, + -1, 1481, 1482, 1483, -1, -1, -1, -1, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, -1, 1503, 1504, 59, 60, 61, 62, -1, + 64, 65, 66, 67, 68, 69, -1, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 1531, 57, 1533, 59, 60, 61, 62, -1, 64, + 65, 66, 67, 68, 69, -1, -1, -1, -1, -1, + 310, -1, -1, -1, 1554, -1, -1, -1, -1, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, -1, -1, 346, 347, 348, -1, + -1, -1, -1, -1, -1, -1, 15, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 1616, 1617, -1, -1, + -1, -1, -1, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 1637, 57, 58, + 59, 60, 61, 62, -1, 64, 65, 66, 67, 68, + 69, 70, -1, 15, -1, 1655, -1, 1657, 1658, -1, + -1, -1, -1, -1, 1664, -1, 1666, -1, -1, -1, + -1, 1671, 1672, -1, -1, -1, -1, -1, -1, -1, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 17, 57, 58, 59, 60, 61, + 62, -1, 64, 65, 66, 67, -1, 1707, 70, -1, + 470, -1, -1, -1, -1, -1, -1, -1, -1, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, -1, 57, 58, 59, 60, 61, 62, + -1, 64, 65, 66, 67, 68, 69, 70, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 1758, -1, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, -1, 535, 17, 59, 60, 61, + 62, -1, 64, -1, 66, 67, 68, 1787, -1, -1, + -1, 551, 1792, 553, -1, -1, -1, -1, -1, -1, + -1, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 17, 57, 58, 59, 60, + 61, 62, 1822, 64, 65, 66, 67, 68, 69, 70, + 590, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, -1, 57, 58, 59, 60, 61, + 62, 17, 64, 65, 66, 67, 68, 69, 70, -1, + 1870, 1871, 1872, 1873, -1, -1, -1, 1877, -1, -1, + -1, 1881, -1, -1, -1, -1, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + -1, 57, 58, 59, 60, 61, 62, -1, 64, 65, + 66, 67, 68, 69, 70, 17, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1933, 1934, -1, -1, -1, -1, -1, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, -1, 57, 58, 59, 60, 61, + 62, -1, 64, 65, 66, 67, 68, 69, 70, -1, + -1, -1, -1, -1, 17, -1, -1, -1, -1, 1979, + -1, 741, -1, -1, 744, -1, -1, -1, 1988, -1, + -1, -1, -1, -1, 754, -1, -1, -1, -1, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, -1, 57, 58, 59, 60, 61, 62, + 2020, 64, 65, 66, 67, 68, 69, 70, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, + -1, 2041, 2042, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 2060, -1, -1, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, + 59, 60, 61, 62, 2084, 64, 65, 66, 67, 68, + 69, 70, 17, 2093, -1, -1, -1, -1, -1, 2099, + -1, -1, 2102, -1, 2104, -1, 2106, -1, 2108, -1, + 2110, -1, 2112, -1, -1, -1, -1, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, -1, 57, 58, 59, 60, 61, 62, -1, 64, + 65, 66, 67, 68, 69, 70, -1, -1, -1, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 17, 57, 58, 59, 60, 61, 62, + -1, 64, 65, 66, 67, 68, 69, 70, -1, -1, + -1, 941, -1, -1, 1, 2, 946, 4, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 17, 57, 58, 59, 60, 61, 62, -1, + 64, 65, 66, 67, 68, 69, 70, -1, -1, -1, + -1, -1, 39, -1, -1, 42, 43, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, -1, 57, 58, 59, 60, 61, 62, -1, 64, + 65, 66, 67, 68, 69, 70, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 17, -1, -1, 86, + -1, -1, 1032, -1, -1, -1, -1, -1, -1, 1039, + -1, 1041, -1, -1, -1, -1, -1, -1, 1048, -1, + -1, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 1065, 57, 58, 59, 60, + 61, 62, -1, 64, 65, 66, 67, 68, 69, 70, + -1, 1081, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 1092, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 180, -1, -1, -1, -1, -1, 186, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 17, 57, 58, 59, 60, 61, + 62, -1, 64, 65, 66, 67, 68, 69, 70, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, -1, 57, 58, 59, 60, 61, 62, + -1, 64, 65, 66, 67, 68, 69, 70, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, -1, 57, 58, 59, 60, 61, 62, -1, + 64, 65, 66, 67, -1, -1, 70, -1, 17, 286, + -1, -1, -1, 290, -1, 292, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 306, + -1, -1, 1252, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 17, 57, 58, + 59, 60, 61, 62, -1, 64, 65, 66, 67, 68, + 69, 70, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, -1, 57, 58, 59, + 60, 61, 62, -1, 64, 65, 66, 67, -1, 1319, + 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 400, -1, -1, 403, 17, -1, -1, + -1, -1, 1352, 410, -1, -1, -1, -1, -1, -1, + -1, -1, 419, 420, -1, -1, -1, 424, -1, -1, + 1370, -1, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, -1, 57, 58, 59, + 60, 61, 62, -1, 64, 65, 66, 67, 68, 69, + 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 1420, -1, -1, -1, 481, -1, -1, 484, 485, -1, + 487, -1, -1, -1, -1, -1, -1, -1, -1, 496, + -1, -1, -1, -1, 501, 502, 503, -1, 505, -1, + -1, -1, -1, 510, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1463, -1, -1, -1, -1, -1, -1, + 527, 528, 529, -1, 531, -1, -1, 1477, -1, -1, + -1, 1481, 1482, 1483, -1, -1, -1, -1, -1, 546, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1503, 1504, -1, -1, -1, -1, 566, + -1, 568, -1, -1, -1, -1, -1, -1, 575, -1, + -1, -1, -1, 580, -1, 582, -1, -1, -1, -1, + -1, -1, -1, 1533, 591, -1, -1, 594, 595, -1, + -1, -1, -1, 600, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1554, -1, 613, 614, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 625, 626, + -1, -1, 629, -1, 631, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 643, 644, 645, -1, + -1, -1, -1, -1, -1, -1, -1, 654, -1, -1, + -1, 658, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 1616, 1617, 675, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1637, -1, -1, + 17, -1, -1, -1, 701, -1, -1, -1, -1, -1, + -1, 708, -1, -1, -1, -1, -1, 1657, 1658, -1, + -1, -1, 719, -1, -1, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, -1, + 57, 58, 59, 60, 61, 62, 743, 64, 65, 66, + 67, 748, -1, 70, 751, -1, 753, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1707, -1, -1, + -1, -1, -1, 770, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 797, 798, 799, 800, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 1758, 816, + -1, -1, -1, 820, -1, -1, 823, -1, -1, -1, + 827, -1, -1, 830, 831, 832, 833, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 845, 846, + -1, -1, 1792, -1, -1, 852, 853, 854, -1, -1, + -1, -1, -1, 860, 861, -1, -1, -1, 865, -1, + -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 1822, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 907, 57, 58, 59, 60, 61, 62, -1, 64, 65, + 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, + -1, -1, -1, 1873, -1, -1, -1, -1, -1, -1, + -1, 1881, -1, 940, -1, -1, 943, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 953, 954, 955, 956, + 957, 958, -1, 960, 961, -1, -1, -1, -1, -1, + 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1933, 1934, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, -1, + 57, 58, 59, 60, 61, 62, -1, 64, 65, 66, + 67, 68, 69, 70, 1021, -1, -1, -1, -1, -1, + -1, -1, -1, 1030, -1, -1, -1, -1, -1, 1979, + 1037, -1, -1, 1040, -1, -1, -1, 1044, -1, 1046, + -1, -1, -1, -1, -1, -1, -1, 1054, -1, -1, + -1, -1, -1, -1, -1, -1, 1063, -1, -1, -1, + -1, -1, -1, -1, 1071, -1, -1, -1, -1, -1, + 2020, -1, -1, -1, -1, 1082, -1, -1, -1, -1, + 1087, 1088, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 2041, 2042, -1, -1, -1, -1, 1104, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 2060, 1118, -1, -1, -1, -1, -1, 1124, -1, 1126, + -1, -1, -1, -1, 1131, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 2084, -1, -1, -1, 17, -1, + -1, -1, -1, 2093, -1, -1, -1, -1, -1, 2099, + -1, -1, 2102, -1, 2104, -1, 2106, -1, 2108, -1, + 2110, -1, 2112, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, + 59, 60, 61, 62, -1, 64, 65, 66, 67, 68, + 69, 70, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 19, -1, -1, -1, 1216, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1234, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, -1, 57, 58, 59, 60, 61, 62, 19, + 64, 65, 66, 67, -1, -1, 70, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1274, -1, -1, + -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, -1, 57, 58, 59, + 60, 61, 62, -1, 64, 65, 66, 67, -1, -1, + 70, 1308, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 1318, 1319, -1, -1, -1, -1, -1, -1, -1, + -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1341, -1, -1, -1, -1, -1, + -1, -1, -1, 1350, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, -1, 57, + 58, 59, 60, 61, 62, 19, 64, 65, 66, 67, + -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1392, -1, -1, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 19, 57, 58, 59, 60, 61, 62, -1, + 64, 65, 66, 67, -1, -1, 70, -1, -1, -1, + -1, -1, -1, -1, -1, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, -1, + 57, 58, 59, 60, 61, 62, -1, 64, 65, 66, + 67, -1, -1, 70, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1474, -1, -1, + -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1492, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 1503, 1504, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 20, 57, 58, 59, 60, 61, 62, -1, + 64, 65, 66, 67, 1531, -1, 70, 1534, -1, -1, + -1, -1, -1, -1, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, -1, 57, + 58, 59, 60, 61, 62, -1, 64, 65, 66, 67, + -1, -1, 70, -1, -1, -1, 1573, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1651, 1652, 1653, 1654, 1655, -1, + 1657, 1658, -1, -1, -1, -1, -1, 1664, -1, 1666, + -1, -1, -1, -1, 1671, 1672, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 1763, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 1777, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 1787, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1802, -1, -1, 1805, -1, + 1807, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1870, 1871, 1872, 1873, -1, -1, -1, + 1877, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 1888, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1942, 1943, 1944, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 1959, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 1988, -1, -1, -1, -1, 1993, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 2017 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_int16 yystos[] = +{ + 0, 37, 87, 118, 127, 213, 217, 218, 219, 223, + 224, 236, 237, 238, 417, 560, 561, 34, 35, 73, + 214, 562, 563, 564, 601, 602, 603, 581, 601, 41, + 221, 222, 559, 589, 601, 0, 218, 224, 237, 37, + 129, 131, 146, 239, 16, 20, 26, 27, 28, 29, + 30, 32, 33, 34, 43, 44, 56, 63, 64, 65, + 66, 67, 68, 69, 214, 215, 216, 516, 520, 536, + 537, 538, 542, 549, 554, 557, 558, 559, 566, 569, + 575, 603, 605, 606, 608, 609, 9, 38, 12, 15, + 15, 220, 221, 562, 596, 601, 590, 601, 542, 543, + 16, 20, 34, 214, 518, 521, 534, 539, 542, 548, + 554, 558, 559, 569, 583, 585, 593, 598, 601, 603, + 25, 22, 23, 24, 26, 27, 28, 29, 18, 535, + 560, 9, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, + 61, 62, 64, 65, 66, 67, 68, 69, 70, 560, + 18, 527, 535, 560, 18, 16, 11, 11, 566, 567, + 563, 16, 20, 34, 214, 539, 554, 558, 559, 569, + 91, 225, 9, 15, 117, 38, 16, 10, 240, 13, + 17, 539, 540, 539, 542, 9, 20, 21, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 57, 58, 59, 60, 61, 62, 64, 65, + 66, 67, 70, 516, 517, 517, 560, 560, 25, 22, + 23, 24, 542, 547, 16, 216, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 549, 542, 547, 18, 16, 542, 547, + 17, 533, 542, 34, 214, 602, 603, 34, 566, 603, + 605, 11, 11, 539, 542, 560, 226, 580, 589, 601, + 85, 89, 122, 227, 228, 229, 232, 221, 220, 419, + 421, 424, 560, 592, 601, 16, 16, 242, 243, 542, + 13, 17, 9, 20, 21, 518, 519, 519, 542, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 21, 548, 16, 13, 14, 19, + 19, 532, 539, 542, 542, 542, 542, 542, 542, 542, + 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, + 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, + 19, 19, 542, 547, 533, 19, 19, 9, 17, 18, + 18, 11, 567, 605, 9, 20, 21, 15, 580, 589, + 11, 580, 589, 126, 233, 230, 595, 601, 97, 228, + 187, 233, 235, 233, 235, 15, 17, 17, 9, 141, + 9, 142, 241, 263, 11, 17, 244, 247, 249, 250, + 251, 252, 560, 599, 601, 15, 15, 13, 539, 542, + 21, 517, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 532, 539, 539, + 9, 17, 13, 527, 19, 17, 542, 542, 547, 542, + 542, 11, 580, 601, 11, 234, 589, 11, 231, 580, + 589, 15, 15, 422, 425, 560, 156, 599, 420, 587, + 601, 123, 154, 155, 166, 176, 260, 9, 17, 599, + 9, 17, 123, 156, 172, 173, 176, 180, 183, 184, + 190, 194, 195, 245, 260, 265, 287, 288, 289, 9, + 17, 9, 120, 121, 141, 18, 120, 121, 141, 248, + 253, 255, 256, 267, 268, 269, 560, 254, 258, 560, + 542, 13, 517, 13, 17, 539, 542, 19, 19, 19, + 517, 580, 580, 589, 588, 601, 11, 13, 11, 418, + 423, 424, 425, 426, 560, 119, 174, 427, 432, 425, + 121, 599, 9, 305, 313, 598, 601, 305, 305, 305, + 18, 261, 321, 263, 16, 9, 246, 247, 601, 260, + 261, 260, 599, 599, 250, 252, 539, 547, 265, 265, + 156, 265, 266, 288, 289, 15, 100, 255, 74, 75, + 76, 79, 80, 81, 86, 90, 105, 110, 111, 112, + 119, 123, 128, 134, 135, 137, 138, 139, 140, 144, + 149, 150, 153, 154, 155, 156, 159, 160, 161, 162, + 163, 168, 169, 175, 176, 177, 178, 179, 185, 196, + 197, 198, 257, 259, 262, 263, 264, 270, 271, 272, + 273, 274, 275, 278, 284, 287, 323, 331, 346, 349, + 351, 354, 357, 358, 359, 360, 386, 387, 388, 389, + 406, 442, 445, 448, 449, 491, 590, 596, 601, 100, + 258, 37, 256, 262, 263, 264, 406, 491, 560, 539, + 539, 588, 87, 580, 423, 427, 15, 15, 15, 156, + 592, 32, 34, 70, 200, 201, 202, 203, 428, 429, + 430, 431, 434, 435, 436, 440, 557, 101, 174, 306, + 599, 12, 587, 9, 12, 539, 305, 251, 601, 247, + 245, 261, 599, 261, 12, 310, 19, 19, 260, 260, + 260, 260, 260, 306, 311, 599, 464, 560, 16, 277, + 10, 297, 305, 301, 582, 601, 77, 322, 78, 82, + 106, 115, 256, 407, 409, 410, 411, 414, 416, 302, + 585, 601, 464, 292, 309, 597, 601, 123, 154, 155, + 176, 260, 297, 297, 16, 375, 376, 16, 377, 378, + 297, 290, 307, 600, 601, 307, 166, 285, 286, 309, + 321, 297, 297, 10, 298, 298, 298, 16, 115, 116, + 136, 151, 152, 165, 264, 492, 493, 494, 495, 496, + 497, 498, 508, 512, 515, 261, 322, 309, 298, 298, + 298, 16, 164, 166, 188, 279, 280, 281, 282, 283, + 296, 297, 303, 304, 312, 321, 569, 591, 601, 15, + 16, 279, 15, 16, 298, 347, 352, 353, 379, 565, + 568, 576, 602, 603, 604, 15, 297, 347, 355, 356, + 379, 15, 297, 347, 365, 370, 379, 15, 367, 372, + 379, 366, 371, 379, 364, 369, 379, 10, 390, 391, + 277, 562, 15, 13, 101, 597, 12, 103, 431, 435, + 103, 430, 435, 16, 34, 42, 204, 205, 206, 207, + 208, 209, 210, 211, 437, 441, 13, 440, 13, 428, + 9, 18, 539, 142, 313, 539, 13, 17, 246, 245, + 599, 599, 539, 261, 261, 261, 261, 261, 9, 310, + 8, 10, 20, 33, 44, 76, 78, 82, 83, 84, + 88, 92, 106, 107, 108, 109, 115, 157, 158, 189, + 193, 450, 451, 453, 460, 461, 467, 468, 469, 470, + 471, 472, 474, 475, 476, 481, 488, 489, 490, 529, + 537, 553, 569, 571, 572, 607, 113, 114, 147, 148, + 170, 171, 172, 173, 191, 192, 293, 294, 295, 276, + 297, 16, 214, 299, 543, 557, 593, 598, 601, 15, + 9, 15, 18, 291, 300, 320, 260, 13, 407, 16, + 16, 16, 99, 409, 9, 15, 9, 15, 12, 320, + 305, 305, 305, 305, 261, 294, 295, 363, 368, 379, + 294, 295, 363, 9, 15, 12, 320, 15, 285, 15, + 286, 16, 299, 361, 362, 379, 361, 133, 145, 499, + 501, 503, 510, 511, 586, 587, 601, 16, 16, 498, + 500, 502, 504, 586, 592, 601, 500, 500, 500, 102, + 494, 15, 15, 15, 143, 308, 314, 316, 593, 601, + 594, 601, 15, 361, 361, 125, 130, 167, 293, 280, + 281, 280, 279, 283, 9, 15, 9, 15, 282, 12, + 300, 293, 352, 20, 293, 385, 525, 552, 569, 570, + 9, 16, 261, 261, 261, 355, 293, 385, 9, 16, + 365, 293, 385, 9, 16, 9, 15, 16, 9, 15, + 16, 9, 15, 16, 16, 299, 395, 398, 399, 568, + 577, 298, 345, 38, 87, 433, 557, 558, 13, 13, + 440, 434, 435, 34, 70, 200, 201, 439, 440, 557, + 440, 103, 599, 539, 313, 539, 310, 306, 306, 311, + 306, 306, 599, 16, 37, 42, 582, 16, 299, 529, + 531, 569, 571, 54, 459, 553, 13, 462, 463, 464, + 16, 16, 16, 553, 569, 572, 573, 16, 20, 447, + 459, 552, 569, 464, 13, 462, 16, 552, 553, 16, + 16, 16, 15, 15, 15, 15, 464, 465, 560, 15, + 12, 53, 18, 551, 15, 16, 15, 16, 9, 9, + 9, 9, 446, 447, 299, 543, 582, 539, 320, 123, + 154, 155, 176, 321, 329, 330, 584, 601, 95, 539, + 415, 585, 539, 585, 292, 539, 291, 15, 15, 15, + 15, 305, 9, 9, 17, 9, 15, 16, 9, 9, + 17, 15, 290, 539, 291, 299, 9, 16, 9, 43, + 44, 513, 514, 513, 539, 547, 499, 501, 16, 20, + 56, 63, 64, 65, 66, 67, 68, 69, 214, 522, + 524, 534, 536, 537, 544, 545, 550, 555, 558, 569, + 601, 9, 15, 539, 547, 15, 15, 15, 12, 501, + 9, 15, 12, 15, 16, 17, 17, 17, 279, 312, + 591, 591, 542, 279, 525, 528, 570, 298, 352, 9, + 18, 551, 353, 373, 385, 298, 355, 9, 356, 385, + 298, 365, 9, 370, 385, 372, 385, 371, 385, 369, + 384, 552, 11, 392, 393, 394, 396, 397, 542, 10, + 390, 9, 15, 16, 261, 16, 443, 444, 568, 578, + 15, 34, 70, 200, 201, 557, 440, 15, 13, 13, + 18, 19, 19, 310, 42, 133, 145, 473, 542, 17, + 543, 9, 21, 530, 527, 547, 569, 574, 12, 579, + 601, 95, 464, 542, 542, 542, 15, 15, 459, 12, + 579, 124, 542, 542, 542, 542, 15, 158, 452, 468, + 452, 539, 541, 18, 533, 533, 295, 294, 114, 295, + 113, 294, 9, 15, 9, 17, 300, 13, 583, 601, + 407, 17, 15, 12, 17, 15, 295, 294, 368, 385, + 295, 294, 9, 17, 362, 384, 501, 42, 12, 42, + 12, 545, 546, 16, 20, 56, 63, 64, 65, 66, + 67, 68, 69, 214, 534, 539, 545, 558, 569, 601, + 17, 57, 58, 60, 62, 64, 65, 66, 67, 70, + 556, 560, 502, 16, 199, 314, 540, 332, 333, 341, + 560, 334, 335, 560, 300, 9, 21, 526, 527, 547, + 352, 381, 542, 541, 18, 9, 355, 381, 9, 365, + 374, 381, 9, 9, 9, 9, 598, 17, 9, 9, + 16, 395, 398, 11, 400, 401, 402, 403, 404, 560, + 385, 9, 15, 261, 17, 44, 438, 439, 438, 539, + 17, 542, 542, 9, 17, 140, 17, 531, 547, 542, + 324, 341, 560, 17, 17, 17, 15, 542, 324, 17, + 17, 17, 17, 16, 542, 542, 13, 14, 19, 19, + 539, 541, 17, 17, 17, 17, 17, 17, 17, 17, + 447, 299, 539, 15, 16, 95, 89, 412, 413, 532, + 539, 539, 408, 409, 17, 17, 17, 17, 17, 299, + 9, 54, 54, 54, 54, 13, 17, 16, 20, 214, + 536, 537, 539, 558, 20, 522, 9, 21, 523, 498, + 508, 560, 560, 550, 318, 319, 540, 502, 333, 464, + 560, 120, 121, 141, 156, 262, 263, 270, 272, 273, + 274, 275, 336, 337, 338, 342, 9, 17, 336, 337, + 338, 528, 547, 17, 348, 19, 541, 20, 381, 385, + 569, 9, 381, 9, 348, 374, 381, 381, 384, 16, + 396, 542, 397, 15, 599, 17, 9, 9, 405, 542, + 9, 444, 16, 15, 15, 19, 473, 473, 530, 341, + 462, 560, 89, 482, 483, 533, 482, 482, 542, 462, + 465, 464, 471, 465, 464, 542, 539, 539, 18, 551, + 19, 15, 15, 9, 17, 19, 325, 326, 336, 341, + 327, 560, 13, 408, 96, 413, 13, 15, 94, 17, + 384, 500, 502, 500, 502, 545, 539, 20, 21, 545, + 545, 545, 9, 315, 12, 104, 123, 154, 155, 156, + 176, 266, 339, 340, 266, 339, 266, 339, 260, 15, + 15, 15, 15, 335, 15, 15, 15, 15, 526, 9, + 350, 19, 20, 569, 17, 380, 542, 9, 381, 9, + 17, 9, 9, 17, 405, 16, 403, 404, 374, 385, + 95, 13, 465, 96, 483, 13, 96, 96, 15, 124, + 94, 477, 17, 539, 299, 326, 466, 560, 15, 17, + 336, 408, 408, 415, 408, 9, 17, 17, 513, 513, + 13, 20, 16, 20, 214, 558, 523, 13, 317, 319, + 17, 16, 260, 306, 260, 306, 260, 306, 261, 324, + 352, 348, 380, 365, 382, 542, 380, 17, 405, 17, + 9, 465, 465, 459, 115, 465, 94, 348, 98, 78, + 82, 83, 84, 106, 108, 115, 158, 193, 454, 458, + 470, 478, 480, 484, 487, 489, 537, 553, 15, 9, + 328, 17, 380, 12, 12, 13, 13, 545, 539, 545, + 15, 318, 261, 261, 261, 343, 344, 597, 464, 9, + 17, 9, 17, 17, 374, 17, 16, 115, 465, 13, + 456, 457, 466, 560, 16, 16, 16, 16, 466, 16, + 16, 16, 15, 15, 12, 324, 560, 78, 17, 16, + 505, 506, 507, 540, 505, 509, 542, 509, 20, 315, + 306, 306, 306, 9, 15, 291, 104, 352, 383, 542, + 17, 464, 542, 16, 579, 95, 466, 542, 542, 542, + 459, 542, 542, 542, 542, 466, 336, 13, 506, 540, + 9, 17, 17, 17, 344, 17, 17, 542, 324, 17, + 17, 17, 15, 17, 17, 17, 98, 328, 584, 17, + 507, 12, 12, 15, 465, 17, 456, 89, 485, 486, + 533, 485, 485, 542, 455, 466, 560, 466, 466, 407, + 9, 505, 505, 465, 95, 13, 455, 96, 486, 13, + 96, 96, 15, 94, 479, 15, 95, 507, 455, 455, + 459, 115, 455, 94, 9, 17, 16, 115, 455, 507, + 466, 542, 16, 9, 17, 542, 507, 455, 17, 9, + 455, 507, 9, 507, 9, 507, 9, 507, 9, 507, + 9, 507, 9, 507 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_int16 yyr1[] = +{ + 0, 212, 213, 213, 213, 213, 214, 214, 215, 215, + 216, 217, 217, 218, 218, 218, 219, 219, 220, 220, + 221, 222, 223, 224, 225, 226, 226, 226, 226, 226, + 227, 227, 227, 228, 228, 228, 228, 228, 229, 230, + 231, 231, 231, 232, 232, 233, 234, 234, 234, 235, + 235, 235, 235, 236, 236, 237, 237, 238, 238, 239, + 239, 240, 240, 241, 241, 242, 242, 243, 243, 244, + 244, 244, 245, 245, 245, 245, 245, 246, 246, 246, + 247, 247, 247, 248, 248, 248, 249, 249, 249, 250, + 250, 251, 251, 252, 252, 252, 253, 253, 253, 254, + 254, 254, 255, 255, 255, 255, 255, 255, 255, 256, + 256, 256, 256, 256, 256, 256, 256, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, 258, 258, 258, + 258, 258, 258, 259, 260, 260, 261, 261, 262, 262, + 262, 262, 262, 263, 263, 263, 263, 263, 264, 265, + 265, 266, 266, 267, 268, 269, 269, 269, 269, 269, + 270, 271, 272, 273, 274, 275, 276, 276, 277, 277, + 278, 278, 278, 278, 278, 279, 279, 279, 280, 280, + 281, 281, 282, 282, 283, 283, 284, 284, 285, 285, + 286, 287, 287, 287, 287, 287, 287, 287, 287, 288, + 288, 289, 289, 290, 290, 290, 291, 291, 291, 292, + 292, 292, 293, 293, 293, 293, 293, 293, 294, 294, + 294, 294, 295, 295, 295, 295, 296, 296, 296, 297, + 297, 297, 297, 297, 298, 298, 298, 298, 299, 299, + 299, 299, 300, 300, 301, 301, 302, 302, 303, 303, + 304, 304, 305, 305, 305, 306, 306, 306, 306, 307, + 307, 308, 308, 309, 309, 310, 310, 311, 311, 312, + 312, 313, 314, 314, 315, 315, 316, 316, 317, 318, + 319, 320, 321, 322, 322, 323, 323, 324, 324, 324, + 325, 325, 325, 326, 326, 327, 328, 328, 329, 329, + 330, 330, 330, 330, 330, 331, 331, 332, 332, 332, + 333, 333, 333, 333, 334, 334, 335, 335, 335, 336, + 336, 337, 337, 338, 338, 339, 339, 340, 340, 340, + 340, 341, 341, 341, 341, 341, 341, 341, 341, 342, + 343, 343, 344, 344, 345, 345, 346, 346, 346, 346, + 346, 346, 346, 346, 346, 347, 348, 349, 349, 349, + 349, 349, 350, 350, 351, 351, 352, 352, 353, 354, + 354, 354, 354, 354, 354, 355, 355, 356, 357, 357, + 357, 357, 358, 358, 358, 358, 358, 358, 359, 359, + 359, 359, 359, 359, 360, 360, 360, 360, 361, 361, + 362, 363, 363, 364, 364, 365, 365, 366, 366, 367, + 367, 368, 369, 370, 371, 372, 373, 373, 374, 374, + 375, 375, 376, 376, 376, 377, 377, 378, 378, 378, + 379, 379, 380, 381, 382, 383, 384, 385, 386, 386, + 387, 387, 387, 387, 388, 388, 389, 389, 390, 390, + 391, 392, 392, 393, 393, 394, 394, 395, 395, 396, + 397, 398, 399, 400, 400, 400, 401, 401, 402, 402, + 403, 404, 405, 405, 406, 407, 407, 408, 408, 409, + 409, 409, 409, 409, 410, 410, 411, 412, 412, 412, + 413, 413, 413, 414, 415, 416, 416, 417, 417, 418, + 418, 419, 420, 420, 421, 422, 422, 423, 423, 423, + 424, 424, 424, 425, 426, 427, 427, 427, 428, 428, + 429, 429, 430, 431, 431, 432, 433, 433, 434, 434, + 435, 435, 436, 437, 437, 438, 438, 439, 439, 439, + 439, 439, 440, 440, 440, 440, 440, 440, 440, 441, + 441, 441, 441, 441, 441, 441, 441, 441, 441, 442, + 443, 443, 444, 444, 445, 446, 446, 447, 448, 449, + 450, 451, 452, 452, 453, 453, 453, 453, 453, 453, + 454, 455, 455, 324, 324, 456, 456, 457, 457, 458, + 458, 459, 460, 460, 461, 461, 462, 462, 463, 463, + 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, + 464, 464, 464, 464, 464, 465, 465, 465, 466, 466, + 466, 466, 466, 466, 466, 466, 467, 468, 468, 468, + 469, 469, 470, 470, 471, 471, 471, 471, 471, 472, + 473, 473, 473, 473, 473, 474, 475, 475, 475, 476, + 476, 477, 477, 478, 478, 478, 479, 479, 480, 480, + 481, 481, 481, 482, 482, 483, 483, 483, 484, 484, + 484, 485, 485, 486, 486, 486, 487, 487, 487, 487, + 488, 488, 488, 488, 489, 489, 490, 490, 491, 492, + 492, 493, 493, 494, 494, 494, 494, 494, 495, 495, + 496, 496, 497, 497, 497, 498, 498, 499, 499, 500, + 500, 501, 501, 501, 502, 502, 502, 503, 503, 504, + 504, 505, 505, 506, 506, 506, 506, 506, 507, 508, + 508, 509, 510, 510, 511, 511, 512, 512, 512, 513, + 513, 514, 514, 515, 516, 517, 517, 518, 519, 519, + 520, 520, 521, 521, 522, 523, 523, 524, 525, 526, + 526, 527, 527, 527, 528, 528, 528, 528, 528, 529, + 530, 530, 531, 531, 531, 531, 531, 532, 532, 533, + 533, 534, 535, 536, 537, 537, 537, 538, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 540, 540, 541, 541, + 541, 542, 542, 542, 542, 542, 542, 542, 542, 542, + 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, + 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, + 542, 543, 543, 544, 545, 545, 545, 545, 546, 546, + 547, 547, 547, 548, 548, 548, 548, 548, 548, 548, + 548, 548, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 551, 551, 552, 552, 552, 552, 552, + 553, 553, 553, 553, 553, 554, 554, 554, 554, 554, + 554, 554, 554, 554, 554, 555, 555, 555, 555, 555, + 555, 555, 555, 556, 556, 556, 556, 556, 556, 556, + 556, 557, 558, 558, 558, 558, 558, 558, 558, 558, + 558, 558, 559, 560, 560, 561, 561, 562, 562, 562, + 563, 563, 564, 565, 566, 566, 567, 567, 567, 567, + 568, 568, 569, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, + 586, 587, 588, 589, 590, 591, 591, 592, 593, 594, + 595, 596, 597, 598, 598, 599, 600, 601, 601, 601, + 602, 602, 603, 604, 605, 605, 606, 607, 608, 608, + 608, 608, 608, 608, 609, 609, 609, 609, 609 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_int8 yyr2[] = +{ + 0, 2, 1, 1, 1, 0, 2, 1, 1, 3, + 1, 1, 2, 1, 1, 1, 4, 6, 1, 3, + 1, 1, 3, 6, 3, 0, 1, 3, 2, 4, + 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 3, 2, 4, 2, 0, 1, 2, 6, + 4, 4, 2, 1, 2, 1, 1, 8, 8, 1, + 1, 0, 4, 1, 3, 0, 3, 2, 3, 4, + 5, 2, 4, 3, 5, 2, 3, 0, 1, 3, + 2, 2, 2, 1, 1, 1, 0, 3, 1, 1, + 5, 1, 3, 1, 4, 4, 0, 1, 2, 0, + 1, 2, 1, 2, 2, 2, 3, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, + 3, 2, 2, 3, 1, 0, 1, 0, 5, 4, + 4, 4, 4, 4, 3, 3, 3, 3, 4, 1, + 0, 1, 0, 5, 5, 5, 5, 3, 3, 5, + 3, 3, 3, 3, 3, 3, 1, 0, 2, 0, + 2, 4, 2, 4, 3, 2, 2, 1, 2, 1, + 2, 1, 2, 1, 2, 2, 3, 2, 2, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 3, 3, 1, 2, 0, 1, + 3, 3, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 2, + 4, 6, 8, 0, 2, 4, 6, 0, 1, 1, + 1, 1, 1, 0, 2, 4, 1, 3, 1, 3, + 2, 4, 1, 3, 4, 1, 4, 3, 6, 1, + 3, 1, 3, 1, 3, 2, 0, 2, 4, 3, + 1, 3, 3, 1, 2, 0, 7, 10, 1, 1, + 1, 5, 5, 1, 0, 9, 12, 1, 2, 0, + 1, 2, 0, 1, 2, 3, 0, 4, 1, 0, + 1, 1, 1, 1, 1, 7, 10, 0, 1, 2, + 1, 3, 3, 3, 1, 3, 3, 3, 3, 5, + 3, 5, 3, 5, 3, 1, 0, 1, 1, 1, + 1, 2, 2, 2, 2, 3, 2, 2, 2, 5, + 1, 3, 1, 2, 1, 0, 3, 3, 3, 2, + 2, 2, 2, 4, 4, 1, 1, 2, 5, 4, + 3, 7, 0, 2, 1, 1, 1, 3, 6, 2, + 5, 4, 10, 8, 3, 1, 3, 8, 1, 1, + 1, 1, 2, 5, 4, 6, 8, 3, 1, 1, + 1, 1, 1, 1, 3, 3, 3, 3, 1, 3, + 8, 1, 3, 1, 3, 1, 3, 1, 3, 1, + 3, 4, 6, 6, 8, 10, 3, 1, 1, 3, + 1, 0, 5, 5, 3, 1, 0, 5, 5, 3, + 2, 0, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 2, 2, 6, 4, 1, 0, + 4, 1, 1, 1, 3, 1, 3, 1, 3, 1, + 5, 4, 2, 0, 1, 1, 1, 3, 1, 3, + 2, 5, 1, 0, 3, 1, 2, 1, 0, 1, + 1, 1, 1, 1, 7, 5, 6, 1, 2, 0, + 3, 3, 2, 13, 3, 3, 5, 10, 9, 1, + 2, 3, 1, 3, 3, 1, 2, 2, 2, 2, + 3, 4, 6, 3, 3, 3, 4, 3, 1, 2, + 1, 2, 4, 6, 6, 5, 1, 1, 1, 0, + 1, 2, 3, 4, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, + 1, 3, 7, 5, 5, 1, 3, 3, 2, 2, + 4, 4, 1, 0, 2, 2, 2, 2, 2, 2, + 3, 1, 2, 1, 2, 1, 0, 1, 2, 3, + 6, 3, 3, 6, 3, 6, 1, 0, 1, 2, + 3, 2, 3, 2, 2, 2, 2, 2, 2, 3, + 2, 2, 3, 2, 2, 1, 2, 1, 3, 2, + 2, 2, 2, 2, 3, 2, 2, 1, 1, 5, + 2, 4, 3, 3, 2, 4, 2, 3, 4, 3, + 1, 2, 2, 3, 3, 5, 5, 7, 1, 6, + 8, 6, 7, 5, 7, 1, 6, 7, 6, 8, + 6, 6, 6, 1, 2, 3, 2, 3, 6, 6, + 6, 1, 2, 3, 2, 3, 2, 5, 5, 9, + 2, 5, 5, 9, 5, 2, 2, 5, 3, 1, + 0, 1, 2, 1, 1, 1, 1, 1, 3, 3, + 3, 3, 2, 2, 2, 9, 9, 1, 3, 1, + 3, 1, 2, 2, 1, 2, 2, 1, 1, 1, + 1, 1, 3, 1, 3, 5, 11, 23, 1, 12, + 12, 1, 1, 0, 1, 1, 5, 5, 2, 1, + 0, 1, 1, 0, 3, 1, 3, 3, 1, 3, + 4, 3, 4, 3, 3, 1, 3, 4, 3, 1, + 3, 3, 3, 4, 1, 2, 3, 2, 1, 3, + 1, 3, 1, 2, 3, 2, 1, 1, 3, 1, + 3, 5, 4, 5, 1, 3, 4, 6, 1, 3, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 6, 1, 1, 5, 1, 3, + 3, 1, 3, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 5, 6, 1, 3, 4, 1, 1, 5, + 1, 3, 3, 1, 1, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 2, 1, 2, 5, 1, + 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 3, 4, 1, 2, 5, 4, 1, + 1, 2, 5, 4, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, + 3, 1, 1, 0, 1, 3, 4, 0, 1, 3, + 3, 1, 1, 2, 2, 1, 2, 2, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 1, 3, 1, 1, 1, 4, + 4, 3, 6, 6, 3, 6, 1, 4, 4 +}; + + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#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 + + +/* 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) + +/* This macro is provided for backward compatibility. */ +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value); \ + 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) +{ + FILE *yyoutput = yyo; + YYUSE (yyoutput); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); +# endif + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (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) +{ + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + + yy_symbol_value_print (yyo, yykind, yyvaluep); + 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, + 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)]); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, 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 + + +/* Context of a parse error. */ +typedef struct +{ + yy_state_t *yyssp; + yysymbol_kind_t yytoken; +} yypcontext_t; + +/* Put in YYARG at most YYARGN of the expected tokens given the + current YYCTX, and return the number of tokens stored in YYARG. If + YYARG is null, return the number of expected tokens (guaranteed to + be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. + Return 0 if there are more than YYARGN expected tokens, yet fill + YYARG up to YYARGN. */ +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) +{ + /* Actual size of YYARG. */ + int yycount = 0; + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = YYSYMBOL_YYEMPTY; + return yycount; +} + + + + +#ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else +/* Return the length of YYSTR. */ +static YYPTRDIFF_T +yystrlen (const char *yystr) +{ + YYPTRDIFF_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +#endif + +#ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +#endif + +#ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (yyres) + return yystpcpy (yyres, yystr) - yyres; + else + return yystrlen (yystr); +} +#endif + + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) +{ + /* Actual size of YYARG. */ + int yycount = 0; + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } + return yycount; +} + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) +{ + enum { YYARGS_MAX = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat: reported tokens (one for the "unexpected", + one per "expected"). */ + yysymbol_kind_t yyarg[YYARGS_MAX]; + /* Cumulated lengths of YYARG. */ + YYPTRDIFF_T yysize = 0; + + /* Actual size of YYARG. */ + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + if (yycount == YYENOMEM) + return YYENOMEM; + + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + default: /* Avoid compiler warnings. */ + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +#undef YYCASE_ + } + + /* Compute error message size. Don't count the "%s"s, but reserve + room for the terminator. */ + yysize = yystrlen (yyformat) - 2 * yycount + 1; + { + int yyi; + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } + } + return 0; +} + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep) +{ + YYUSE (yyvaluep); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + +/* Lookahead token kind. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; +/* 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; + + 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; + + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (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. */ + 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 + goto yyexhaustedlab; +#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; + + /* 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), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + 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) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + 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; + 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 + + /* 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]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: /* grammar_begin: library_text */ +#line 176 "verilog_parser.y" + { /* + assert(yy_verilog_source_tree != NULL); + yy_verilog_source_tree -> libraries = + ast_list_concat(yy_verilog_source_tree -> libraries, $1); + */ +} +#line 5407 "verilog_parser.tab.c" + break; + + case 3: /* grammar_begin: config_declaration */ +#line 182 "verilog_parser.y" + {/* + assert(yy_verilog_source_tree != NULL); + //ast_list_append(yy_verilog_source_tree -> configs, $1); +*/} +#line 5416 "verilog_parser.tab.c" + break; + + case 4: /* grammar_begin: source_text */ +#line 186 "verilog_parser.y" + { + //IVerilogParseTree ** ppTree = getVerilogParseTree(); + //(*ppTree)->append_source_text(ppTree, &$1); + /* unsigned int i; + assert(yy_verilog_source_tree != NULL); + + for(i = 0; i < $1 -> items; i ++) + { + ast_source_item * toadd = ast_list_get($1, i); + + if(toadd -> type == SOURCE_MODULE) + { + //ast_list_append(yy_verilog_source_tree -> modules, + toadd -> module); + } + else if (toadd -> type == SOURCE_UDP) + { + //ast_list_append(yy_verilog_source_tree -> primitives, + toadd -> udp); + } + else + { + // Do nothing / unknown / unsupported type. + printf("line %d of %s - Unknown source item type: %d", + __LINE__, + __FILE__, + toadd -> type); + } + } +*/ +} +#line 5452 "verilog_parser.tab.c" + break; + + case 5: /* grammar_begin: %empty */ +#line 217 "verilog_parser.y" + { + // Do nothing, it's an empty file. +} +#line 5460 "verilog_parser.tab.c" + break; + + case 11: /* library_text: library_descriptions */ +#line 240 "verilog_parser.y" + { +/* // $$ = ast_list_new(); + //ast_list_append($$,$1); +*/ + } +#line 5470 "verilog_parser.tab.c" + break; + + case 12: /* library_text: library_text library_descriptions */ +#line 245 "verilog_parser.y" + { +/* $$ = $1; + //ast_list_append($$,$2); +*/ +} +#line 5480 "verilog_parser.tab.c" + break; + + case 13: /* library_descriptions: library_declaration */ +#line 253 "verilog_parser.y" + { + /* // $$ = ast_new_library_description(LIB_LIBRARY); + // $$ ->library = $1; + */ } +#line 5489 "verilog_parser.tab.c" + break; + + case 14: /* library_descriptions: include_statement */ +#line 257 "verilog_parser.y" + { +/* // $$ = ast_new_library_description(LIB_INCLUDE); + // $$ ->include = $1; +*/ } +#line 5498 "verilog_parser.tab.c" + break; + + case 15: /* library_descriptions: config_declaration */ +#line 261 "verilog_parser.y" + { +/* // $$ = ast_new_library_description(LIB_CONFIG); + // $$ ->config = $1; +*/ } +#line 5507 "verilog_parser.tab.c" + break; + + case 16: /* library_declaration: KW_LIBRARY library_identifier file_path_specs SEMICOLON */ +#line 268 "verilog_parser.y" + { + // // $$ = ast_new_library_declaration($2,$3,ast_list_new()); + } +#line 5515 "verilog_parser.tab.c" + break; + + case 17: /* library_declaration: KW_LIBRARY library_identifier file_path_specs KW_INCDIR file_path_specs SEMICOLON */ +#line 272 "verilog_parser.y" + { + //// $$ = ast_new_library_declaration($2,$3,$5); + } +#line 5523 "verilog_parser.tab.c" + break; + + case 18: /* file_path_specs: file_path_spec */ +#line 278 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +#line 5532 "verilog_parser.tab.c" + break; + + case 19: /* file_path_specs: file_path_specs COMMA file_path_spec */ +#line 282 "verilog_parser.y" + { + //$$ = $1; + ////ast_list_append($$,$3); + } +#line 5541 "verilog_parser.tab.c" + break; + + case 20: /* file_path_spec: file_path */ +#line 288 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 5547 "verilog_parser.tab.c" + break; + + case 21: /* file_path: string */ +#line 291 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 5553 "verilog_parser.tab.c" + break; + + case 22: /* include_statement: KW_INCLUDE file_path_spec SEMICOLON */ +#line 293 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 5559 "verilog_parser.tab.c" + break; + + case 23: /* config_declaration: KW_CONFIG config_identifier SEMICOLON design_statement config_rule_statement_os KW_ENDCONFIG */ +#line 300 "verilog_parser.y" + { + //$$ = ast_new_config_declaration($2,$4,$5); + } +#line 5567 "verilog_parser.tab.c" + break; + + case 24: /* design_statement: KW_DESIGN lib_cell_identifier_os SEMICOLON */ +#line 305 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-1].treenode); +} +#line 5575 "verilog_parser.tab.c" + break; + + case 25: /* lib_cell_identifier_os: %empty */ +#line 311 "verilog_parser.y" + {(yyval.treenode) =NULL;} +#line 5581 "verilog_parser.tab.c" + break; + + case 26: /* lib_cell_identifier_os: cell_identifier */ +#line 312 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + } +#line 5589 "verilog_parser.tab.c" + break; + + case 27: /* lib_cell_identifier_os: library_identifier DOT cell_identifier */ +#line 315 "verilog_parser.y" + { + //$$ = ast_append_identifier($1,$3); +} +#line 5597 "verilog_parser.tab.c" + break; + + case 28: /* lib_cell_identifier_os: lib_cell_identifier_os cell_identifier */ +#line 318 "verilog_parser.y" + { + if((yyvsp[-1].treenode) == NULL){ + (yyval.treenode) = (yyvsp[0].treenode); + } else { + // $$ = ast_append_identifier($1,$2); + } +} +#line 5609 "verilog_parser.tab.c" + break; + + case 29: /* lib_cell_identifier_os: lib_cell_identifier_os library_identifier DOT cell_identifier */ +#line 325 "verilog_parser.y" + { + if((yyvsp[-3].treenode) == NULL){ + //$$ = ast_append_identifier($2,$4); + } else { + //$2 = ast_append_identifier($2,$4); + //$$ = ast_append_identifier($1,$2); + } +} +#line 5622 "verilog_parser.tab.c" + break; + + case 30: /* config_rule_statement_os: %empty */ +#line 335 "verilog_parser.y" + { + //$$ = ast_list_new(); +} +#line 5630 "verilog_parser.tab.c" + break; + + case 31: /* config_rule_statement_os: config_rule_statement */ +#line 338 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); +} +#line 5639 "verilog_parser.tab.c" + break; + + case 32: /* config_rule_statement_os: config_rule_statement_os config_rule_statement */ +#line 342 "verilog_parser.y" + { + //$$ = $1; + ////ast_list_append($$,$2); +} +#line 5648 "verilog_parser.tab.c" + break; + + case 33: /* config_rule_statement: KW_DEFAULT liblist_clause */ +#line 349 "verilog_parser.y" + { + //$$ = ast_new_config_rule_statement(AST_TRUE,NULL,NULL); + //// $$ ->multiple_clauses = AST_TRUE; + //// $$ ->clauses = $2; + } +#line 5658 "verilog_parser.tab.c" + break; + + case 34: /* config_rule_statement: inst_clause liblist_clause */ +#line 354 "verilog_parser.y" + { + //$$ = ast_new_config_rule_statement(AST_FALSE,NULL,NULL); + //// $$ ->multiple_clauses = AST_TRUE; + //// $$ ->clauses = $2; + } +#line 5668 "verilog_parser.tab.c" + break; + + case 35: /* config_rule_statement: inst_clause use_clause */ +#line 359 "verilog_parser.y" + { + //$$ = ast_new_config_rule_statement(AST_FALSE,$1,$2); + } +#line 5676 "verilog_parser.tab.c" + break; + + case 36: /* config_rule_statement: cell_clause liblist_clause */ +#line 362 "verilog_parser.y" + { + //$$ = ast_new_config_rule_statement(AST_FALSE,NULL,NULL); + //// $$ ->multiple_clauses = AST_TRUE; + //// $$ ->clauses = $2; + } +#line 5686 "verilog_parser.tab.c" + break; + + case 37: /* config_rule_statement: cell_clause use_clause */ +#line 367 "verilog_parser.y" + { + //$$ = ast_new_config_rule_statement(AST_FALSE,$1,$2); + } +#line 5694 "verilog_parser.tab.c" + break; + + case 38: /* inst_clause: KW_INSTANCE inst_name */ +#line 372 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 5700 "verilog_parser.tab.c" + break; + + case 39: /* inst_name: topmodule_identifier instance_identifier_os */ +#line 376 "verilog_parser.y" + { + //$$ = $1; + //if($2 != NULL) + // ast_append_identifier($$,$2); + } +#line 5710 "verilog_parser.tab.c" + break; + + case 40: /* instance_identifier_os: %empty */ +#line 384 "verilog_parser.y" + {(yyval.treenode) = NULL;} +#line 5716 "verilog_parser.tab.c" + break; + + case 41: /* instance_identifier_os: DOT instance_identifier */ +#line 385 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 5722 "verilog_parser.tab.c" + break; + + case 42: /* instance_identifier_os: instance_identifier_os DOT instance_identifier */ +#line 386 "verilog_parser.y" + { + if((yyvsp[-2].treenode) == NULL){ + (yyval.treenode) = (yyvsp[0].treenode); + } else { + (yyval.treenode) = (yyvsp[-2].treenode); + // ast_append_identifier($$,$3); + } +} +#line 5735 "verilog_parser.tab.c" + break; + + case 43: /* cell_clause: KW_CELL cell_identifier */ +#line 397 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + } +#line 5743 "verilog_parser.tab.c" + break; + + case 44: /* cell_clause: KW_CELL library_identifier DOT cell_identifier */ +#line 400 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-2].treenode); + //ast_append_identifier($$,$4); +} +#line 5752 "verilog_parser.tab.c" + break; + + case 45: /* liblist_clause: KW_LIBLIST library_identifier_os */ +#line 406 "verilog_parser.y" + {(yyval.list) = (yyvsp[0].list);} +#line 5758 "verilog_parser.tab.c" + break; + + case 46: /* library_identifier_os: %empty */ +#line 410 "verilog_parser.y" + { + //$$ = ast_list_new(); + } +#line 5766 "verilog_parser.tab.c" + break; + + case 47: /* library_identifier_os: library_identifier */ +#line 413 "verilog_parser.y" + { + // $$ = ast_list_new(); + ////ast_list_append($$,$1); +} +#line 5775 "verilog_parser.tab.c" + break; + + case 48: /* library_identifier_os: library_identifier_os library_identifier */ +#line 417 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + ////ast_list_append($$,$2); +} +#line 5784 "verilog_parser.tab.c" + break; + + case 49: /* use_clause: KW_USE library_identifier DOT cell_identifier COLON KW_CONFIG */ +#line 424 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-4].treenode); + //ast_append_identifier($$,$4); + } +#line 5793 "verilog_parser.tab.c" + break; + + case 50: /* use_clause: KW_USE library_identifier DOT cell_identifier */ +#line 428 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-2].treenode); + //ast_append_identifier($$,$4); + } +#line 5802 "verilog_parser.tab.c" + break; + + case 51: /* use_clause: KW_USE cell_identifier COLON KW_CONFIG */ +#line 432 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-2].treenode); + } +#line 5810 "verilog_parser.tab.c" + break; + + case 52: /* use_clause: KW_USE cell_identifier */ +#line 435 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + } +#line 5818 "verilog_parser.tab.c" + break; + + case 53: /* source_text: description */ +#line 443 "verilog_parser.y" + { + dlistInit(&(yyval.list)); + // dlistAppendItem(&$$, &$1); +} +#line 5827 "verilog_parser.tab.c" + break; + + case 54: /* source_text: source_text description */ +#line 447 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + // dlistAppendItem(&$$, &$2); +} +#line 5836 "verilog_parser.tab.c" + break; + + case 55: /* description: module_declaration */ +#line 454 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); +} +#line 5844 "verilog_parser.tab.c" + break; + + case 56: /* description: udp_declaration */ +#line 457 "verilog_parser.y" + { + //$$ = $1; +} +#line 5852 "verilog_parser.tab.c" + break; + + case 57: /* module_declaration: attribute_instances module_keyword module_identifier module_parameter_port_list list_of_port_declarations SEMICOLON non_port_module_item_os KW_ENDMODULE */ +#line 471 "verilog_parser.y" + { + IVerilogRoot ** ppRoot = getVerilogRoot(); + (*ppRoot)->add_module(ppRoot, (yyval.treenode) = verilogparseCreateModuleDeclaration((yyvsp[-7].treenode),(yyvsp[-5].treenode),&(yyvsp[-4].list),&(yyvsp[-3].list),&(yyvsp[-1].list))); + //$$ = ast_new_module_declaration($1,$3,$4,$5,$7); +} +#line 5862 "verilog_parser.tab.c" + break; + + case 58: /* module_declaration: attribute_instances module_keyword module_identifier module_parameter_port_list list_of_ports SEMICOLON module_item_os KW_ENDMODULE */ +#line 483 "verilog_parser.y" + { + IVerilogRoot ** ppRoot = getVerilogRoot(); + (*ppRoot)->add_module(ppRoot, (yyval.treenode) = verilogparseCreateModuleDeclaration((yyvsp[-7].treenode),(yyvsp[-5].treenode),&(yyvsp[-4].list),NULL,&(yyvsp[-1].list))); + // Old style of port declaration, don't pass them directly into the + // function. + //$$ = ast_new_module_declaration($1,$3,$4,NULL,$7); +} +#line 5874 "verilog_parser.tab.c" + break; + + case 61: /* module_parameter_port_list: %empty */ +#line 498 "verilog_parser.y" + { + //$$ = ast_list_new(); +} +#line 5882 "verilog_parser.tab.c" + break; + + case 62: /* module_parameter_port_list: HASH OPEN_BRACKET module_params CLOSE_BRACKET */ +#line 501 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); +} +#line 5890 "verilog_parser.tab.c" + break; + + case 63: /* module_params: parameter_declaration */ +#line 507 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$, $1); + } +#line 5899 "verilog_parser.tab.c" + break; + + case 64: /* module_params: module_params COMMA parameter_declaration */ +#line 511 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + ////ast_list_append($$,$3); +} +#line 5908 "verilog_parser.tab.c" + break; + + case 65: /* list_of_ports: %empty */ +#line 517 "verilog_parser.y" + { +//$$ = ast_list_new(); +} +#line 5916 "verilog_parser.tab.c" + break; + + case 66: /* list_of_ports: OPEN_BRACKET ports CLOSE_BRACKET */ +#line 520 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); +} +#line 5924 "verilog_parser.tab.c" + break; + + case 67: /* list_of_port_declarations: OPEN_BRACKET CLOSE_BRACKET */ +#line 526 "verilog_parser.y" + { +// $$ = ast_list_new(); + } +#line 5932 "verilog_parser.tab.c" + break; + + case 68: /* list_of_port_declarations: OPEN_BRACKET port_declarations CLOSE_BRACKET */ +#line 529 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); +} +#line 5940 "verilog_parser.tab.c" + break; + + case 69: /* port_declarations: port_declarations COMMA port_dir port_declaration_l */ +#line 535 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-3].list); + // $4 -> direction = $3; + // //ast_list_append($$,$4); +} +#line 5950 "verilog_parser.tab.c" + break; + + case 70: /* port_declarations: port_declarations COMMA identifier_csv port_dir port_declaration_l */ +#line 540 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-4].list); + // $5 -> direction = $4; + // //ast_list_append($$,$5); +} +#line 5960 "verilog_parser.tab.c" + break; + + case 71: /* port_declarations: port_dir port_declaration_l */ +#line 545 "verilog_parser.y" + { + // $$ = ast_list_new(); + // $2 -> direction = $1; + // //ast_list_append($$,$2); +} +#line 5970 "verilog_parser.tab.c" + break; + + case 72: /* port_declaration_l: net_type_o signed_o range_o port_identifier */ +#line 553 "verilog_parser.y" + { + // ast_list * names = ast_list_new(); + // //ast_list_append(names, $4); + // $$ = ast_new_port_declaration(PORT_NONE, $1, $2, + // AST_FALSE,AST_FALSE,$3,names); +} +#line 5981 "verilog_parser.tab.c" + break; + + case 73: /* port_declaration_l: signed_o range_o port_identifier */ +#line 559 "verilog_parser.y" + { + // ast_list * names = ast_list_new(); + // //ast_list_append(names, $3); + // $$ = ast_new_port_declaration(PORT_NONE, NET_TYPE_NONE, $1, + // AST_FALSE,AST_FALSE,$2,names); +} +#line 5992 "verilog_parser.tab.c" + break; + + case 74: /* port_declaration_l: KW_REG signed_o range_o port_identifier eq_const_exp_o */ +#line 565 "verilog_parser.y" + { + // ast_list * names = ast_list_new(); + // //ast_list_append(names, $4); + // $$ = ast_new_port_declaration(PORT_NONE, NET_TYPE_NONE, AST_FALSE, + // AST_TRUE,AST_FALSE,$3,names); +} +#line 6003 "verilog_parser.tab.c" + break; + + case 75: /* port_declaration_l: output_variable_type_o port_identifier */ +#line 571 "verilog_parser.y" + { + // ast_list * names = ast_list_new(); + // //ast_list_append(names, $2); + // $$ = ast_new_port_declaration(PORT_NONE, NET_TYPE_NONE, AST_FALSE, + // AST_FALSE,AST_TRUE,NULL,names); +} +#line 6014 "verilog_parser.tab.c" + break; + + case 76: /* port_declaration_l: output_variable_type port_identifier eq_const_exp_o */ +#line 577 "verilog_parser.y" + { + // ast_list * names = ast_list_new(); + // //ast_list_append(names, $2); + // $$ = ast_new_port_declaration(PORT_NONE, NET_TYPE_NONE, AST_FALSE, + // AST_FALSE,AST_TRUE,NULL,names); +} +#line 6025 "verilog_parser.tab.c" + break; + + case 77: /* identifier_csv: %empty */ +#line 585 "verilog_parser.y" + { +//$$ = ast_list_new(); +} +#line 6033 "verilog_parser.tab.c" + break; + + case 78: /* identifier_csv: identifier */ +#line 588 "verilog_parser.y" + { + // $$ = ast_list_new(); +// //ast_list_append($$,$1); +} +#line 6042 "verilog_parser.tab.c" + break; + + case 79: /* identifier_csv: COMMA identifier identifier_csv */ +#line 592 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + // //ast_list_append($$,$2); +} +#line 6051 "verilog_parser.tab.c" + break; + + case 80: /* port_dir: attribute_instances KW_OUTPUT */ +#line 599 "verilog_parser.y" + {(yyval.treenode) = PORT_OUTPUT;} +#line 6057 "verilog_parser.tab.c" + break; + + case 81: /* port_dir: attribute_instances KW_INPUT */ +#line 600 "verilog_parser.y" + {(yyval.treenode) = PORT_INPUT;} +#line 6063 "verilog_parser.tab.c" + break; + + case 82: /* port_dir: attribute_instances KW_INOUT */ +#line 601 "verilog_parser.y" + {(yyval.treenode) = PORT_INOUT;} +#line 6069 "verilog_parser.tab.c" + break; + + case 83: /* port_declaration: inout_declaration */ +#line 605 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 6075 "verilog_parser.tab.c" + break; + + case 84: /* port_declaration: input_declaration */ +#line 606 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 6081 "verilog_parser.tab.c" + break; + + case 85: /* port_declaration: output_declaration */ +#line 607 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 6087 "verilog_parser.tab.c" + break; + + case 86: /* ports: %empty */ +#line 610 "verilog_parser.y" + { +//$$ = ast_list_new(); +} +#line 6095 "verilog_parser.tab.c" + break; + + case 87: /* ports: ports COMMA port */ +#line 613 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + ////ast_list_append($$,$3); +} +#line 6104 "verilog_parser.tab.c" + break; + + case 88: /* ports: port */ +#line 617 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); +} +#line 6113 "verilog_parser.tab.c" + break; + + case 89: /* port: port_expression */ +#line 624 "verilog_parser.y" + { + //$$ = $1; + } +#line 6121 "verilog_parser.tab.c" + break; + + case 90: /* port: DOT port_identifier OPEN_BRACKET port_expression CLOSE_BRACKET */ +#line 627 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-3].treenode); +} +#line 6129 "verilog_parser.tab.c" + break; + + case 91: /* port_expression: port_reference */ +#line 633 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +#line 6138 "verilog_parser.tab.c" + break; + + case 92: /* port_expression: port_expression COMMA port_reference */ +#line 637 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + ////ast_list_append($$,$3); +} +#line 6147 "verilog_parser.tab.c" + break; + + case 93: /* port_reference: port_identifier */ +#line 644 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); +} +#line 6155 "verilog_parser.tab.c" + break; + + case 94: /* port_reference: port_identifier OPEN_SQ_BRACKET constant_expression CLOSE_SQ_BRACKET */ +#line 647 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-3].treenode); +} +#line 6163 "verilog_parser.tab.c" + break; + + case 95: /* port_reference: port_identifier OPEN_SQ_BRACKET range_expression CLOSE_SQ_BRACKET */ +#line 650 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-3].treenode); +} +#line 6171 "verilog_parser.tab.c" + break; + + case 96: /* module_item_os: %empty */ +#line 657 "verilog_parser.y" + { +//$$ = ast_list_new(); +} +#line 6179 "verilog_parser.tab.c" + break; + + case 97: /* module_item_os: module_item */ +#line 660 "verilog_parser.y" + { + //$$ = ast_list_new(); +// //ast_list_append($$,$1); +} +#line 6188 "verilog_parser.tab.c" + break; + + case 98: /* module_item_os: module_item_os module_item */ +#line 664 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + // //ast_list_append($$,$2); +} +#line 6197 "verilog_parser.tab.c" + break; + + case 99: /* non_port_module_item_os: %empty */ +#line 670 "verilog_parser.y" + { +//$$ = ast_list_new(); +} +#line 6205 "verilog_parser.tab.c" + break; + + case 100: /* non_port_module_item_os: non_port_module_item */ +#line 673 "verilog_parser.y" + { + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } +#line 6214 "verilog_parser.tab.c" + break; + + case 101: /* non_port_module_item_os: non_port_module_item_os non_port_module_item */ +#line 677 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + // //ast_list_append($$,$2); + } +#line 6223 "verilog_parser.tab.c" + break; + + case 102: /* module_item: module_or_generate_item */ +#line 684 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + } +#line 6231 "verilog_parser.tab.c" + break; + + case 103: /* module_item: port_declaration SEMICOLON */ +#line 687 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL, MOD_ITEM_PORT_DECLARATION); + // // $$ ->port_declaration = $1; + } +#line 6240 "verilog_parser.tab.c" + break; + + case 104: /* module_item: attribute_instances generated_instantiation */ +#line 691 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_GENERATED_INSTANTIATION); + // // $$ ->generated_instantiation = $2; + } +#line 6249 "verilog_parser.tab.c" + break; + + case 105: /* module_item: attribute_instances local_parameter_declaration */ +#line 695 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_PARAMETER_DECLARATION); + // // $$ ->parameter_declaration = $2; + } +#line 6258 "verilog_parser.tab.c" + break; + + case 106: /* module_item: attribute_instances parameter_declaration SEMICOLON */ +#line 699 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_PARAMETER_DECLARATION); + // // $$ ->parameter_declaration = $2; + } +#line 6267 "verilog_parser.tab.c" + break; + + case 107: /* module_item: attribute_instances specify_block */ +#line 703 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_SPECIFY_BLOCK); + // // $$ ->specify_block = $2; + } +#line 6276 "verilog_parser.tab.c" + break; + + case 108: /* module_item: attribute_instances specparam_declaration */ +#line 707 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_SPECPARAM_DECLARATION); + // // $$ ->specparam_declaration = $2; + } +#line 6285 "verilog_parser.tab.c" + break; + + case 109: /* module_or_generate_item: attribute_instances module_or_generate_item_declaration */ +#line 714 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + } +#line 6293 "verilog_parser.tab.c" + break; + + case 110: /* module_or_generate_item: attribute_instances parameter_override */ +#line 717 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_PARAMETER_OVERRIDE); + // // $$ ->parameter_override = $2; + } +#line 6302 "verilog_parser.tab.c" + break; + + case 111: /* module_or_generate_item: attribute_instances continuous_assign */ +#line 721 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_CONTINOUS_ASSIGNMENT); + // // $$ ->continuous_assignment = $2 -> continuous; + } +#line 6311 "verilog_parser.tab.c" + break; + + case 112: /* module_or_generate_item: attribute_instances gate_instantiation */ +#line 725 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_GATE_INSTANTIATION); + // // $$ ->gate_instantiation = $2; + } +#line 6320 "verilog_parser.tab.c" + break; + + case 113: /* module_or_generate_item: attribute_instances udp_instantiation */ +#line 729 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_UDP_INSTANTIATION); + // // $$ ->udp_instantiation = $2; + } +#line 6329 "verilog_parser.tab.c" + break; + + case 114: /* module_or_generate_item: attribute_instances module_instantiation */ +#line 733 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_MODULE_INSTANTIATION); + // // $$ ->module_instantiation = $2; + } +#line 6338 "verilog_parser.tab.c" + break; + + case 115: /* module_or_generate_item: attribute_instances initial_construct */ +#line 737 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_INITIAL_CONSTRUCT); + // // $$ ->initial_construct = $2; + } +#line 6347 "verilog_parser.tab.c" + break; + + case 116: /* module_or_generate_item: attribute_instances always_construct */ +#line 741 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_ALWAYS_CONSTRUCT); + // // $$ ->always_construct = $2; + } +#line 6356 "verilog_parser.tab.c" + break; + + case 117: /* module_or_generate_item_declaration: net_declaration */ +#line 748 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL,MOD_ITEM_NET_DECLARATION); + // // $$ ->net_declaration = $1; + } +#line 6365 "verilog_parser.tab.c" + break; + + case 118: /* module_or_generate_item_declaration: reg_declaration */ +#line 752 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL,MOD_ITEM_REG_DECLARATION); + // // $$ ->reg_declaration = $1; + } +#line 6374 "verilog_parser.tab.c" + break; + + case 119: /* module_or_generate_item_declaration: integer_declaration */ +#line 756 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL, MOD_ITEM_INTEGER_DECLARATION); + // // $$ ->integer_declaration = $1; + } +#line 6383 "verilog_parser.tab.c" + break; + + case 120: /* module_or_generate_item_declaration: real_declaration */ +#line 760 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL,MOD_ITEM_REAL_DECLARATION); + // // $$ ->real_declaration = $1; + } +#line 6392 "verilog_parser.tab.c" + break; + + case 121: /* module_or_generate_item_declaration: time_declaration */ +#line 764 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL,MOD_ITEM_TIME_DECLARATION); + // // $$ ->time_declaration = $1; + } +#line 6401 "verilog_parser.tab.c" + break; + + case 122: /* module_or_generate_item_declaration: realtime_declaration */ +#line 768 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL, MOD_ITEM_REALTIME_DECLARATION); + // // $$ ->realtime_declaration = $1; + } +#line 6410 "verilog_parser.tab.c" + break; + + case 123: /* module_or_generate_item_declaration: event_declaration */ +#line 772 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL,MOD_ITEM_EVENT_DECLARATION); + // // $$ ->event_declaration = $1; + } +#line 6419 "verilog_parser.tab.c" + break; + + case 124: /* module_or_generate_item_declaration: genvar_declaration */ +#line 776 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL,MOD_ITEM_GENVAR_DECLARATION); + // // $$ ->genvar_declaration = $1; + } +#line 6428 "verilog_parser.tab.c" + break; + + case 125: /* module_or_generate_item_declaration: task_declaration */ +#line 780 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL,MOD_ITEM_TASK_DECLARATION); + // // $$ ->task_declaration = $1; + } +#line 6437 "verilog_parser.tab.c" + break; + + case 126: /* module_or_generate_item_declaration: function_declaration */ +#line 784 "verilog_parser.y" + { + // $$ = ast_new_module_item(NULL,MOD_ITEM_FUNCTION_DECLARATION); + // // $$ ->function_declaration = $1; + } +#line 6446 "verilog_parser.tab.c" + break; + + case 127: /* non_port_module_item: attribute_instances generated_instantiation */ +#line 791 "verilog_parser.y" + { + // $$ = ast_new_module_item($1, MOD_ITEM_GENERATED_INSTANTIATION); + // // $$ ->generated_instantiation = $2; + } +#line 6455 "verilog_parser.tab.c" + break; + + case 128: /* non_port_module_item: attribute_instances local_parameter_declaration */ +#line 795 "verilog_parser.y" + { + // $$ = ast_new_module_item($1,MOD_ITEM_PARAMETER_DECLARATION); + // // $$ ->parameter_declaration = $2; +} +#line 6464 "verilog_parser.tab.c" + break; + + case 129: /* non_port_module_item: attribute_instances module_or_generate_item */ +#line 799 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); +} +#line 6472 "verilog_parser.tab.c" + break; + + case 130: /* non_port_module_item: attribute_instances parameter_declaration SEMICOLON */ +#line 802 "verilog_parser.y" + { + // $$ = ast_new_module_item($1,MOD_ITEM_PARAMETER_DECLARATION); + // // $$ ->parameter_declaration = $2; +} +#line 6481 "verilog_parser.tab.c" + break; + + case 131: /* non_port_module_item: attribute_instances specify_block */ +#line 806 "verilog_parser.y" + { + // $$ = ast_new_module_item($1,MOD_ITEM_SPECIFY_BLOCK); + // // $$ ->specify_block = $2; +} +#line 6490 "verilog_parser.tab.c" + break; + + case 132: /* non_port_module_item: attribute_instances specparam_declaration */ +#line 810 "verilog_parser.y" + { + // $$ = ast_new_module_item($1,MOD_ITEM_PORT_DECLARATION); + // // $$ ->specparam_declaration = $2; +} +#line 6499 "verilog_parser.tab.c" + break; + + case 133: /* parameter_override: KW_DEFPARAM list_of_param_assignments SEMICOLON */ +#line 817 "verilog_parser.y" + {(yyval.list) = (yyvsp[-1].list);} +#line 6505 "verilog_parser.tab.c" + break; + + case 134: /* signed_o: KW_SIGNED */ +#line 822 "verilog_parser.y" + {(yyval.treenode)=1;} +#line 6511 "verilog_parser.tab.c" + break; + + case 135: /* signed_o: %empty */ +#line 822 "verilog_parser.y" + {(yyval.treenode)=0;} +#line 6517 "verilog_parser.tab.c" + break; + + case 136: /* range_o: range */ +#line 823 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 6523 "verilog_parser.tab.c" + break; + + case 137: /* range_o: %empty */ +#line 823 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 6529 "verilog_parser.tab.c" + break; + + case 138: /* local_parameter_declaration: KW_LOCALPARAM signed_o range_o list_of_param_assignments SEMICOLON */ +#line 826 "verilog_parser.y" + { + //$$ = ast_new_parameter_declarations($4,$2,AST_TRUE,$3,PARAM_GENERIC); + } +#line 6537 "verilog_parser.tab.c" + break; + + case 139: /* local_parameter_declaration: KW_LOCALPARAM KW_INTEGER list_of_param_assignments SEMICOLON */ +#line 829 "verilog_parser.y" + { + // $$ = ast_new_parameter_declarations($3,AST_FALSE,AST_TRUE,NULL, + // PARAM_INTEGER); + } +#line 6546 "verilog_parser.tab.c" + break; + + case 140: /* local_parameter_declaration: KW_LOCALPARAM KW_REAL list_of_param_assignments SEMICOLON */ +#line 833 "verilog_parser.y" + { + // $$ = ast_new_parameter_declarations($3,AST_FALSE,AST_TRUE,NULL, + // PARAM_REAL); + } +#line 6555 "verilog_parser.tab.c" + break; + + case 141: /* local_parameter_declaration: KW_LOCALPARAM KW_REALTIME list_of_param_assignments SEMICOLON */ +#line 837 "verilog_parser.y" + { + // $$ = ast_new_parameter_declarations($3,AST_FALSE,AST_TRUE,NULL, + // PARAM_REALTIME); + } +#line 6564 "verilog_parser.tab.c" + break; + + case 142: /* local_parameter_declaration: KW_LOCALPARAM KW_TIME list_of_param_assignments SEMICOLON */ +#line 841 "verilog_parser.y" + { + // $$ = ast_new_parameter_declarations($3,AST_FALSE,AST_TRUE,NULL, + // PARAM_TIME); + } +#line 6573 "verilog_parser.tab.c" + break; + + case 143: /* parameter_declaration: KW_PARAMETER signed_o range_o list_of_param_assignments */ +#line 848 "verilog_parser.y" + { + //$$ = ast_new_parameter_declarations($4,$2,AST_FALSE,$3,PARAM_GENERIC); + } +#line 6581 "verilog_parser.tab.c" + break; + + case 144: /* parameter_declaration: KW_PARAMETER KW_INTEGER list_of_param_assignments */ +#line 851 "verilog_parser.y" + { + //$$ = ast_new_parameter_declarations($3,AST_FALSE,AST_FALSE,NULL, + // PARAM_INTEGER); + } +#line 6590 "verilog_parser.tab.c" + break; + + case 145: /* parameter_declaration: KW_PARAMETER KW_REAL list_of_param_assignments */ +#line 855 "verilog_parser.y" + { + //$$ = ast_new_parameter_declarations($3,AST_FALSE,AST_FALSE,NULL, + // PARAM_REAL); + } +#line 6599 "verilog_parser.tab.c" + break; + + case 146: /* parameter_declaration: KW_PARAMETER KW_REALTIME list_of_param_assignments */ +#line 859 "verilog_parser.y" + { + //$$ = ast_new_parameter_declarations($3,AST_FALSE,AST_FALSE,NULL, + // PARAM_REALTIME); + } +#line 6608 "verilog_parser.tab.c" + break; + + case 147: /* parameter_declaration: KW_PARAMETER KW_TIME list_of_param_assignments */ +#line 863 "verilog_parser.y" + { + //$$ = ast_new_parameter_declarations($3,AST_FALSE,AST_FALSE,NULL, + // PARAM_TIME); + } +#line 6617 "verilog_parser.tab.c" + break; + + case 148: /* specparam_declaration: KW_SPECPARAM range_o list_of_specparam_assignments SEMICOLON */ +#line 870 "verilog_parser.y" + { + //$$ = ast_new_parameter_declarations($3,AST_FALSE,AST_FALSE,$2, + // PARAM_SPECPARAM); + } +#line 6626 "verilog_parser.tab.c" + break; + + case 149: /* net_type_o: net_type */ +#line 878 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 6632 "verilog_parser.tab.c" + break; + + case 150: /* net_type_o: %empty */ +#line 878 "verilog_parser.y" + {(yyval.treenode) = NET_TYPE_NONE;} +#line 6638 "verilog_parser.tab.c" + break; + + case 151: /* reg_o: KW_REG */ +#line 879 "verilog_parser.y" + {(yyval.treenode)=1;} +#line 6644 "verilog_parser.tab.c" + break; + + case 152: /* reg_o: %empty */ +#line 879 "verilog_parser.y" + {(yyval.treenode)=0;} +#line 6650 "verilog_parser.tab.c" + break; + + case 153: /* inout_declaration: KW_INOUT net_type_o signed_o range_o list_of_port_identifiers */ +#line 882 "verilog_parser.y" + { +//$$ = ast_new_port_declaration(PORT_INOUT, $2,$3,AST_FALSE,AST_FALSE,$4,$5); + } +#line 6658 "verilog_parser.tab.c" + break; + + case 154: /* input_declaration: KW_INPUT net_type_o signed_o range_o list_of_port_identifiers */ +#line 888 "verilog_parser.y" + { +//$$ = ast_new_port_declaration(PORT_INPUT, $2,$3,AST_FALSE,AST_FALSE,$4,$5); + } +#line 6666 "verilog_parser.tab.c" + break; + + case 155: /* output_declaration: KW_OUTPUT net_type_o signed_o range_o list_of_port_identifiers */ +#line 894 "verilog_parser.y" + { +//$$ = ast_new_port_declaration(PORT_OUTPUT, $2,$3,AST_FALSE,AST_FALSE,$4,$5); + } +#line 6674 "verilog_parser.tab.c" + break; + + case 156: /* output_declaration: KW_OUTPUT reg_o signed_o range_o list_of_port_identifiers */ +#line 897 "verilog_parser.y" + { +//$$ = ast_new_port_declaration(PORT_OUTPUT, +//NET_TYPE_NONE,$3,$2,AST_FALSE,$4,$5); + } +#line 6683 "verilog_parser.tab.c" + break; + + case 157: /* output_declaration: KW_OUTPUT output_variable_type_o list_of_port_identifiers */ +#line 901 "verilog_parser.y" + { + // $$ = ast_new_port_declaration(PORT_OUTPUT, NET_TYPE_NONE, + // AST_FALSE, + // AST_FALSE, + // AST_TRUE, + // NULL, + // $3); + } +#line 6696 "verilog_parser.tab.c" + break; + + case 158: /* output_declaration: KW_OUTPUT output_variable_type list_of_variable_port_identifiers */ +#line 909 "verilog_parser.y" + { + // $$ = ast_new_port_declaration(PORT_OUTPUT, NET_TYPE_NONE, + // AST_FALSE, + // AST_FALSE, + // AST_TRUE, + // NULL, + // $3); + } +#line 6709 "verilog_parser.tab.c" + break; + + case 159: /* output_declaration: KW_OUTPUT KW_REG signed_o range_o list_of_variable_port_identifiers */ +#line 917 "verilog_parser.y" + { + // $$ = ast_new_port_declaration(PORT_OUTPUT, + // NET_TYPE_NONE, + // $3, AST_TRUE, + // AST_FALSE, + // $4, $5); + } +#line 6721 "verilog_parser.tab.c" + break; + + case 160: /* event_declaration: KW_EVENT list_of_event_identifiers SEMICOLON */ +#line 928 "verilog_parser.y" + { + // $$ = ast_new_type_declaration(DECLARE_EVENT); + // // $$ ->identifiers = $2; +} +#line 6730 "verilog_parser.tab.c" + break; + + case 161: /* genvar_declaration: KW_GENVAR list_of_genvar_identifiers SEMICOLON */ +#line 932 "verilog_parser.y" + { + // $$ = ast_new_type_declaration(DECLARE_GENVAR); + // // $$ ->identifiers = $2; +} +#line 6739 "verilog_parser.tab.c" + break; + + case 162: /* integer_declaration: KW_INTEGER list_of_variable_identifiers SEMICOLON */ +#line 936 "verilog_parser.y" + { + // $$ = ast_new_type_declaration(DECLARE_INTEGER); + // // $$ ->identifiers = $2; +} +#line 6748 "verilog_parser.tab.c" + break; + + case 163: /* time_declaration: KW_TIME list_of_variable_identifiers SEMICOLON */ +#line 940 "verilog_parser.y" + { + // $$ = ast_new_type_declaration(DECLARE_TIME); + // // $$ ->identifiers = $2; +} +#line 6757 "verilog_parser.tab.c" + break; + + case 164: /* real_declaration: KW_REAL list_of_real_identifiers SEMICOLON */ +#line 944 "verilog_parser.y" + { + // $$ = ast_new_type_declaration(DECLARE_REAL); + // // $$ ->identifiers = $2; +} +#line 6766 "verilog_parser.tab.c" + break; + + case 165: /* realtime_declaration: KW_REALTIME list_of_real_identifiers SEMICOLON */ +#line 948 "verilog_parser.y" + { + // $$ = ast_new_type_declaration(DECLARE_REALTIME); + // // $$ ->identifiers = $2; +} +#line 6775 "verilog_parser.tab.c" + break; + + case 166: /* delay3_o: delay3 */ +#line 953 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 6781 "verilog_parser.tab.c" + break; + + case 167: /* delay3_o: %empty */ +#line 953 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 6787 "verilog_parser.tab.c" + break; + + case 168: /* drive_strength_o: OPEN_BRACKET drive_strength */ +#line 954 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 6793 "verilog_parser.tab.c" + break; + + case 169: /* drive_strength_o: %empty */ +#line 954 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 6799 "verilog_parser.tab.c" + break; + + case 170: /* net_declaration: net_type net_dec_p_ds */ +#line 957 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->net_type = $1; + } +#line 6808 "verilog_parser.tab.c" + break; + + case 171: /* net_declaration: net_type OPEN_BRACKET drive_strength net_dec_p_ds */ +#line 961 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->net_type = $1; + //// $$ ->drive_strength = $3; + } +#line 6818 "verilog_parser.tab.c" + break; + + case 172: /* net_declaration: KW_TRIREG net_dec_p_ds */ +#line 966 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->net_type = NET_TYPE_TRIREG; + } +#line 6827 "verilog_parser.tab.c" + break; + + case 173: /* net_declaration: KW_TRIREG OPEN_BRACKET drive_strength net_dec_p_ds */ +#line 970 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->drive_strength = $3; + //// $$ ->net_type = NET_TYPE_TRIREG; + } +#line 6837 "verilog_parser.tab.c" + break; + + case 174: /* net_declaration: KW_TRIREG charge_strength net_dec_p_ds */ +#line 975 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->charge_strength = $2; + //// $$ ->net_type = NET_TYPE_TRIREG; + } +#line 6847 "verilog_parser.tab.c" + break; + + case 175: /* net_dec_p_ds: KW_VECTORED net_dec_p_vs */ +#line 983 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->vectored = AST_TRUE; + } +#line 6856 "verilog_parser.tab.c" + break; + + case 176: /* net_dec_p_ds: KW_SCALARED net_dec_p_vs */ +#line 987 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->scalared = AST_TRUE; + } +#line 6865 "verilog_parser.tab.c" + break; + + case 177: /* net_dec_p_ds: net_dec_p_vs */ +#line 991 "verilog_parser.y" + { (yyval.treenode)= (yyvsp[0].treenode);} +#line 6871 "verilog_parser.tab.c" + break; + + case 178: /* net_dec_p_vs: KW_SIGNED net_dec_p_si */ +#line 995 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->is_signed = AST_TRUE; + } +#line 6880 "verilog_parser.tab.c" + break; + + case 179: /* net_dec_p_vs: net_dec_p_si */ +#line 999 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 6886 "verilog_parser.tab.c" + break; + + case 180: /* net_dec_p_si: range net_dec_p_range */ +#line 1003 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->range = $1; + } +#line 6895 "verilog_parser.tab.c" + break; + + case 181: /* net_dec_p_si: net_dec_p_range */ +#line 1007 "verilog_parser.y" + {(yyval.treenode) =(yyvsp[0].treenode);} +#line 6901 "verilog_parser.tab.c" + break; + + case 182: /* net_dec_p_range: delay3 net_dec_p_delay */ +#line 1011 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->delay = $1; + } +#line 6910 "verilog_parser.tab.c" + break; + + case 183: /* net_dec_p_range: net_dec_p_delay */ +#line 1015 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 6916 "verilog_parser.tab.c" + break; + + case 184: /* net_dec_p_delay: list_of_net_identifiers SEMICOLON */ +#line 1019 "verilog_parser.y" + { + //$$ = ast_new_type_declaration(DECLARE_NET); + //// $$ ->identifiers = $1; + } +#line 6925 "verilog_parser.tab.c" + break; + + case 185: /* net_dec_p_delay: list_of_net_decl_assignments SEMICOLON */ +#line 1023 "verilog_parser.y" + { + //$$ = ast_new_type_declaration(DECLARE_NET); + //// $$ ->identifiers = $1; + } +#line 6934 "verilog_parser.tab.c" + break; + + case 186: /* reg_declaration: KW_REG KW_SIGNED reg_dec_p_signed */ +#line 1032 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->is_signed = AST_TRUE; + } +#line 6943 "verilog_parser.tab.c" + break; + + case 187: /* reg_declaration: KW_REG reg_dec_p_signed */ +#line 1036 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->is_signed = AST_FALSE; + } +#line 6952 "verilog_parser.tab.c" + break; + + case 188: /* reg_dec_p_signed: range reg_dec_p_range */ +#line 1043 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //// $$ ->range = $1; + } +#line 6961 "verilog_parser.tab.c" + break; + + case 189: /* reg_dec_p_signed: reg_dec_p_range */ +#line 1047 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 6967 "verilog_parser.tab.c" + break; + + case 190: /* reg_dec_p_range: list_of_variable_identifiers SEMICOLON */ +#line 1050 "verilog_parser.y" + { + //$$ = ast_new_type_declaration(DECLARE_REG); + //// $$ ->identifiers = $1; +} +#line 6976 "verilog_parser.tab.c" + break; + + case 191: /* net_type: KW_SUPPLY0 */ +#line 1060 "verilog_parser.y" + { (yyval.treenode) = NET_TYPE_SUPPLY0 ;} +#line 6982 "verilog_parser.tab.c" + break; + + case 192: /* net_type: KW_SUPPLY1 */ +#line 1061 "verilog_parser.y" + { (yyval.treenode) = NET_TYPE_SUPPLY1 ;} +#line 6988 "verilog_parser.tab.c" + break; + + case 193: /* net_type: KW_TRI */ +#line 1062 "verilog_parser.y" + { (yyval.treenode) = NET_TYPE_TRI ;} +#line 6994 "verilog_parser.tab.c" + break; + + case 194: /* net_type: KW_TRIAND */ +#line 1063 "verilog_parser.y" + { (yyval.treenode) = NET_TYPE_TRIAND ;} +#line 7000 "verilog_parser.tab.c" + break; + + case 195: /* net_type: KW_TRIOR */ +#line 1064 "verilog_parser.y" + { (yyval.treenode) = NET_TYPE_TRIOR ;} +#line 7006 "verilog_parser.tab.c" + break; + + case 196: /* net_type: KW_WIRE */ +#line 1065 "verilog_parser.y" + { (yyval.treenode) = NET_TYPE_WIRE ;} +#line 7012 "verilog_parser.tab.c" + break; + + case 197: /* net_type: KW_WAND */ +#line 1066 "verilog_parser.y" + { (yyval.treenode) = NET_TYPE_WAND ;} +#line 7018 "verilog_parser.tab.c" + break; + + case 198: /* net_type: KW_WOR */ +#line 1067 "verilog_parser.y" + { (yyval.treenode) = NET_TYPE_WOR ;} +#line 7024 "verilog_parser.tab.c" + break; + + case 199: /* output_variable_type_o: output_variable_type */ +#line 1070 "verilog_parser.y" + {(yyval.treenode)= (yyvsp[0].treenode);} +#line 7030 "verilog_parser.tab.c" + break; + + case 200: /* output_variable_type_o: %empty */ +#line 1070 "verilog_parser.y" + {(yyval.treenode)=PARAM_GENERIC;} +#line 7036 "verilog_parser.tab.c" + break; + + case 201: /* output_variable_type: KW_INTEGER */ +#line 1071 "verilog_parser.y" + {(yyval.treenode)=PARAM_INTEGER;} +#line 7042 "verilog_parser.tab.c" + break; + + case 202: /* output_variable_type: KW_TIME */ +#line 1072 "verilog_parser.y" + {(yyval.treenode)=PARAM_INTEGER;} +#line 7048 "verilog_parser.tab.c" + break; + + case 203: /* real_type: real_identifier */ +#line 1075 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); /* TODO FIXME */} +#line 7054 "verilog_parser.tab.c" + break; + + case 204: /* real_type: real_identifier EQ constant_expression */ +#line 1076 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-2].treenode); /* TODO FIXME */} +#line 7060 "verilog_parser.tab.c" + break; + + case 205: /* real_type: real_identifier dimension dimensions */ +#line 1077 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[-2].treenode); + //// $$ ->range_or_idx = ID_HAS_RANGES; + //ast_list_preappend($3,$2); + //// $$ ->ranges = $3; + } +#line 7071 "verilog_parser.tab.c" + break; + + case 206: /* dimensions: dimension */ +#line 1085 "verilog_parser.y" + { + //$$=ast_list_new(); + ////ast_list_append($$,$1); + } +#line 7080 "verilog_parser.tab.c" + break; + + case 207: /* dimensions: dimensions dimension */ +#line 1089 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + ////ast_list_append($$,$2); + } +#line 7089 "verilog_parser.tab.c" + break; + + case 208: /* dimensions: %empty */ +#line 1093 "verilog_parser.y" + { + //$$ = ast_list_new(); + } +#line 7097 "verilog_parser.tab.c" + break; + + case 209: /* variable_type: variable_identifier */ +#line 1099 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[0].treenode); + } +#line 7105 "verilog_parser.tab.c" + break; + + case 210: /* variable_type: variable_identifier EQ constant_expression */ +#line 1102 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[-2].treenode); /* TODO FIXME */ + } +#line 7113 "verilog_parser.tab.c" + break; + + case 211: /* variable_type: variable_identifier dimension dimensions */ +#line 1105 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[-2].treenode); + // // $$ ->range_or_idx = ID_HAS_RANGES; + // ast_list_preappend($3,$2); + // // $$ ->ranges = $3; + } +#line 7124 "verilog_parser.tab.c" + break; + + case 212: /* drive_strength: strength0 COMMA strength1 CLOSE_BRACKET */ +#line 1116 "verilog_parser.y" + { + // $$ = ast_new_pull_stregth($1,$3); + } +#line 7132 "verilog_parser.tab.c" + break; + + case 213: /* drive_strength: strength1 COMMA strength0 CLOSE_BRACKET */ +#line 1119 "verilog_parser.y" + { + // $$ = ast_new_pull_stregth($1,$3); + } +#line 7140 "verilog_parser.tab.c" + break; + + case 214: /* drive_strength: strength0 COMMA KW_HIGHZ1 CLOSE_BRACKET */ +#line 1122 "verilog_parser.y" + { + // $$ = ast_new_pull_stregth($1,STRENGTH_HIGHZ1); + } +#line 7148 "verilog_parser.tab.c" + break; + + case 215: /* drive_strength: strength1 COMMA KW_HIGHZ0 CLOSE_BRACKET */ +#line 1125 "verilog_parser.y" + { + // $$ = ast_new_pull_stregth($1,STRENGTH_HIGHZ0); + } +#line 7156 "verilog_parser.tab.c" + break; + + case 216: /* drive_strength: KW_HIGHZ0 COMMA strength1 CLOSE_BRACKET */ +#line 1128 "verilog_parser.y" + { + // $$ = ast_new_pull_stregth(STRENGTH_HIGHZ0, $3); + } +#line 7164 "verilog_parser.tab.c" + break; + + case 217: /* drive_strength: KW_HIGHZ1 COMMA strength0 CLOSE_BRACKET */ +#line 1131 "verilog_parser.y" + { + // $$ = ast_new_pull_stregth(STRENGTH_HIGHZ1, $3); + } +#line 7172 "verilog_parser.tab.c" + break; + + case 218: /* strength0: KW_SUPPLY0 */ +#line 1137 "verilog_parser.y" + { (yyval.treenode) = STRENGTH_SUPPLY0;} +#line 7178 "verilog_parser.tab.c" + break; + + case 219: /* strength0: KW_STRONG0 */ +#line 1138 "verilog_parser.y" + { (yyval.treenode) = STRENGTH_STRONG0;} +#line 7184 "verilog_parser.tab.c" + break; + + case 220: /* strength0: KW_PULL0 */ +#line 1139 "verilog_parser.y" + { (yyval.treenode) = STRENGTH_PULL0 ;} +#line 7190 "verilog_parser.tab.c" + break; + + case 221: /* strength0: KW_WEAK0 */ +#line 1140 "verilog_parser.y" + { (yyval.treenode) = STRENGTH_WEAK0 ;} +#line 7196 "verilog_parser.tab.c" + break; + + case 222: /* strength1: KW_SUPPLY1 */ +#line 1144 "verilog_parser.y" + { (yyval.treenode) = STRENGTH_SUPPLY1;} +#line 7202 "verilog_parser.tab.c" + break; + + case 223: /* strength1: KW_STRONG1 */ +#line 1145 "verilog_parser.y" + { (yyval.treenode) = STRENGTH_STRONG1;} +#line 7208 "verilog_parser.tab.c" + break; + + case 224: /* strength1: KW_PULL1 */ +#line 1146 "verilog_parser.y" + { (yyval.treenode) = STRENGTH_PULL1 ;} +#line 7214 "verilog_parser.tab.c" + break; + + case 225: /* strength1: KW_WEAK1 */ +#line 1147 "verilog_parser.y" + { (yyval.treenode) = STRENGTH_WEAK1 ;} +#line 7220 "verilog_parser.tab.c" + break; + + case 226: /* charge_strength: OPEN_BRACKET KW_SMALL CLOSE_BRACKET */ +#line 1150 "verilog_parser.y" + {(yyval.treenode)=CHARGE_SMALL;} +#line 7226 "verilog_parser.tab.c" + break; + + case 227: /* charge_strength: OPEN_BRACKET KW_MEDIUM CLOSE_BRACKET */ +#line 1151 "verilog_parser.y" + {(yyval.treenode)=CHARGE_MEDIUM;} +#line 7232 "verilog_parser.tab.c" + break; + + case 228: /* charge_strength: OPEN_BRACKET KW_LARGE CLOSE_BRACKET */ +#line 1152 "verilog_parser.y" + {(yyval.treenode)=CHARGE_LARGE;} +#line 7238 "verilog_parser.tab.c" + break; + + case 229: /* delay3: HASH delay_value */ +#line 1158 "verilog_parser.y" + { + // $$ = ast_new_delay3($2,$2,$2); + } +#line 7246 "verilog_parser.tab.c" + break; + + case 230: /* delay3: HASH OPEN_BRACKET delay_value CLOSE_BRACKET */ +#line 1161 "verilog_parser.y" + { + // $$ = ast_new_delay3($3,$3,$3); + } +#line 7254 "verilog_parser.tab.c" + break; + + case 231: /* delay3: HASH OPEN_BRACKET delay_value COMMA delay_value CLOSE_BRACKET */ +#line 1164 "verilog_parser.y" + { + // $$ = ast_new_delay3($3,NULL,$5); + } +#line 7262 "verilog_parser.tab.c" + break; + + case 232: /* delay3: HASH OPEN_BRACKET delay_value COMMA delay_value COMMA delay_value CB */ +#line 1167 "verilog_parser.y" + { + // $$ = ast_new_delay3($3,$5,$7); + } +#line 7270 "verilog_parser.tab.c" + break; + + case 233: /* delay3: %empty */ +#line 1170 "verilog_parser.y" + { +//$$ = ast_new_delay3(NULL,NULL,NULL); +} +#line 7278 "verilog_parser.tab.c" + break; + + case 234: /* delay2: HASH delay_value */ +#line 1176 "verilog_parser.y" + { +// $$ = ast_new_delay2($2,$2); + } +#line 7286 "verilog_parser.tab.c" + break; + + case 235: /* delay2: HASH OPEN_BRACKET delay_value CLOSE_BRACKET */ +#line 1179 "verilog_parser.y" + { + // $$ = ast_new_delay2($3,$3); + } +#line 7294 "verilog_parser.tab.c" + break; + + case 236: /* delay2: HASH OPEN_BRACKET delay_value COMMA delay_value CLOSE_BRACKET */ +#line 1182 "verilog_parser.y" + { + // $$ = ast_new_delay2($3,$5); + } +#line 7302 "verilog_parser.tab.c" + break; + + case 237: /* delay2: %empty */ +#line 1185 "verilog_parser.y" + { +//$$ = ast_new_delay2(NULL,NULL); +} +#line 7310 "verilog_parser.tab.c" + break; + + case 238: /* delay_value: unsigned_number */ +#line 1191 "verilog_parser.y" + { +// $$ = ast_new_delay_value(DELAY_VAL_NUMBER, $1); + } +#line 7318 "verilog_parser.tab.c" + break; + + case 239: /* delay_value: parameter_identifier */ +#line 1194 "verilog_parser.y" + { +// $$ = ast_new_delay_value(DELAY_VAL_PARAMETER, $1); + } +#line 7326 "verilog_parser.tab.c" + break; + + case 240: /* delay_value: specparam_identifier */ +#line 1197 "verilog_parser.y" + { + // $$ = ast_new_delay_value(DELAY_VAL_SPECPARAM, $1); + } +#line 7334 "verilog_parser.tab.c" + break; + + case 241: /* delay_value: mintypmax_expression */ +#line 1200 "verilog_parser.y" + { + // $$ = ast_new_delay_value(DELAY_VAL_MINTYPMAX, $1); + } +#line 7342 "verilog_parser.tab.c" + break; + + case 242: /* dimensions_o: dimensions */ +#line 1207 "verilog_parser.y" + {(yyval.list) = (yyvsp[0].list);} +#line 7348 "verilog_parser.tab.c" + break; + + case 243: /* dimensions_o: %empty */ +#line 1208 "verilog_parser.y" + { + //dlistInit($$); + } +#line 7356 "verilog_parser.tab.c" + break; + + case 244: /* list_of_event_identifiers: event_identifier dimensions_o */ +#line 1214 "verilog_parser.y" + { + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } +#line 7365 "verilog_parser.tab.c" + break; + + case 245: /* list_of_event_identifiers: list_of_event_identifiers COMMA event_identifier dimensions_o */ +#line 1218 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-3].list); + // //ast_list_append($$,$3); +} +#line 7374 "verilog_parser.tab.c" + break; + + case 246: /* list_of_genvar_identifiers: genvar_identifier */ +#line 1225 "verilog_parser.y" + { + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } +#line 7383 "verilog_parser.tab.c" + break; + + case 247: /* list_of_genvar_identifiers: list_of_genvar_identifiers COMMA genvar_identifier */ +#line 1229 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + // //ast_list_append($$,$3); +} +#line 7392 "verilog_parser.tab.c" + break; + + case 248: /* list_of_net_decl_assignments: net_decl_assignment */ +#line 1236 "verilog_parser.y" + { + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } +#line 7401 "verilog_parser.tab.c" + break; + + case 249: /* list_of_net_decl_assignments: list_of_net_decl_assignments COMMA net_decl_assignment */ +#line 1240 "verilog_parser.y" + { + (yyval.list)= (yyvsp[-2].list); + // //ast_list_append($$,$3); +} +#line 7410 "verilog_parser.tab.c" + break; + + case 250: /* list_of_net_identifiers: net_identifier dimensions_o */ +#line 1247 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +#line 7419 "verilog_parser.tab.c" + break; + + case 251: /* list_of_net_identifiers: list_of_net_identifiers COMMA net_identifier dimensions_o */ +#line 1251 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-3].list); + ////ast_list_append($$,$3); +} +#line 7428 "verilog_parser.tab.c" + break; + + case 252: /* list_of_param_assignments: param_assignment */ +#line 1258 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +#line 7437 "verilog_parser.tab.c" + break; + + case 253: /* list_of_param_assignments: list_of_param_assignments COMMA param_assignment */ +#line 1262 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + ////ast_list_append($$,$3); + } +#line 7446 "verilog_parser.tab.c" + break; + + case 254: /* list_of_param_assignments: list_of_param_assignments COMMA KW_PARAMETER param_assignment */ +#line 1266 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-3].list); + ////ast_list_append($$,$3); + } +#line 7455 "verilog_parser.tab.c" + break; + + case 255: /* list_of_port_identifiers: port_identifier */ +#line 1273 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +#line 7464 "verilog_parser.tab.c" + break; + + case 256: /* list_of_port_identifiers: port_identifier OPEN_SQ_BRACKET constant_expression CLOSE_SQ_BRACKET */ +#line 1277 "verilog_parser.y" + { + ////ast_identifier_set_index($1,$3); + //$$ = ast_list_new(); + ////ast_list_append($$,$1); +} +#line 7474 "verilog_parser.tab.c" + break; + + case 257: /* list_of_port_identifiers: list_of_port_identifiers COMMA port_identifier */ +#line 1282 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + ////ast_list_append($$,$3); +} +#line 7483 "verilog_parser.tab.c" + break; + + case 258: /* list_of_port_identifiers: list_of_port_identifiers COMMA port_identifier OPEN_SQ_BRACKET constant_expression CLOSE_SQ_BRACKET */ +#line 1287 "verilog_parser.y" + { + ////ast_identifier_set_index($3,$5); + (yyval.list) = (yyvsp[-5].list); + ////ast_list_append($$,$3); +} +#line 7493 "verilog_parser.tab.c" + break; + + case 259: /* list_of_real_identifiers: real_type */ +#line 1295 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +#line 7502 "verilog_parser.tab.c" + break; + + case 260: /* list_of_real_identifiers: list_of_real_identifiers COMMA real_type */ +#line 1299 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + ////ast_list_append($$,$3); +} +#line 7511 "verilog_parser.tab.c" + break; + + case 261: /* list_of_specparam_assignments: specparam_assignment */ +#line 1306 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +#line 7520 "verilog_parser.tab.c" + break; + + case 262: /* list_of_specparam_assignments: list_of_specparam_assignments COMMA specparam_assignment */ +#line 1310 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + ////ast_list_append($$,$3); +} +#line 7529 "verilog_parser.tab.c" + break; + + case 263: /* list_of_variable_identifiers: variable_type */ +#line 1317 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +#line 7538 "verilog_parser.tab.c" + break; + + case 264: /* list_of_variable_identifiers: list_of_variable_identifiers COMMA variable_type */ +#line 1321 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + ////ast_list_append($$,$3); +} +#line 7547 "verilog_parser.tab.c" + break; + + case 265: /* eq_const_exp_o: EQ constant_expression */ +#line 1328 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 7553 "verilog_parser.tab.c" + break; + + case 266: /* eq_const_exp_o: %empty */ +#line 1329 "verilog_parser.y" + {(yyval.treenode) = NULL;} +#line 7559 "verilog_parser.tab.c" + break; + + case 267: /* list_of_variable_port_identifiers: port_identifier eq_const_exp_o */ +#line 1333 "verilog_parser.y" + { + //$$ = ast_list_new(); + // //ast_list_append($$, + // ast_new_single_assignment(ast_new_lvalue_id(VAR_IDENTIFIER,$1),$2)); + } +#line 7569 "verilog_parser.tab.c" + break; + + case 268: /* list_of_variable_port_identifiers: list_of_variable_port_identifiers COMMA port_identifier eq_const_exp_o */ +#line 1338 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-3].list); + ////ast_list_append($$, + // ast_new_single_assignment(ast_new_lvalue_id(VAR_IDENTIFIER,$3),$4)); +} +#line 7579 "verilog_parser.tab.c" + break; + + case 269: /* net_decl_assignment: net_identifier EQ expression */ +#line 1348 "verilog_parser.y" + { + //$$ = ast_new_single_assignment(ast_new_lvalue_id(NET_IDENTIFIER,$1),$3); + } +#line 7587 "verilog_parser.tab.c" + break; + + case 270: /* net_decl_assignment: net_identifier */ +#line 1351 "verilog_parser.y" + { + //$$ = ast_new_single_assignment(ast_new_lvalue_id(NET_IDENTIFIER,$1),NULL); +} +#line 7595 "verilog_parser.tab.c" + break; + + case 271: /* param_assignment: parameter_identifier EQ constant_expression */ +#line 1356 "verilog_parser.y" + { + //$$ = ast_new_single_assignment(ast_new_lvalue_id(PARAM_ID,$1),$3); +} +#line 7603 "verilog_parser.tab.c" + break; + + case 272: /* specparam_assignment: specparam_identifier EQ constant_mintypmax_expression */ +#line 1361 "verilog_parser.y" + { + //$$= ast_new_single_assignment(ast_new_lvalue_id(SPECPARAM_ID,$1),$3); + } +#line 7611 "verilog_parser.tab.c" + break; + + case 273: /* specparam_assignment: pulse_control_specparam */ +#line 1364 "verilog_parser.y" + { + //$$ = $1; +} +#line 7619 "verilog_parser.tab.c" + break; + + case 274: /* error_limit_value_o: COMMA error_limit_value */ +#line 1369 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 7625 "verilog_parser.tab.c" + break; + + case 275: /* error_limit_value_o: %empty */ +#line 1370 "verilog_parser.y" + {(yyval.treenode) =NULL;} +#line 7631 "verilog_parser.tab.c" + break; + + case 276: /* pulse_control_specparam: KW_PATHPULSE EQ OPEN_BRACKET reject_limit_value error_limit_value_o CLOSE_BRACKET SEMICOLON */ +#line 1375 "verilog_parser.y" + { + //$$ = ast_new_pulse_control_specparam($4,$5); + } +#line 7639 "verilog_parser.tab.c" + break; + + case 277: /* pulse_control_specparam: KW_PATHPULSE specify_input_terminal_descriptor '$' specify_output_terminal_descriptor EQ OPEN_BRACKET reject_limit_value error_limit_value_o CLOSE_BRACKET SEMICOLON */ +#line 1380 "verilog_parser.y" + { + //$$ = ast_new_pulse_control_specparam($7,$8); + //// $$ ->input_terminal = $2; + //// $$ ->output_terminal = $4; + } +#line 7649 "verilog_parser.tab.c" + break; + + case 278: /* error_limit_value: limit_value */ +#line 1387 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 7655 "verilog_parser.tab.c" + break; + + case 279: /* reject_limit_value: limit_value */ +#line 1388 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 7661 "verilog_parser.tab.c" + break; + + case 280: /* limit_value: constant_mintypmax_expression */ +#line 1389 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 7667 "verilog_parser.tab.c" + break; + + case 281: /* dimension: OPEN_SQ_BRACKET constant_expression COLON constant_expression CLOSE_SQ_BRACKET */ +#line 1394 "verilog_parser.y" + { + //$$ = ast_new_range($2,$4); +} +#line 7675 "verilog_parser.tab.c" + break; + + case 282: /* range: OPEN_SQ_BRACKET constant_expression COLON constant_expression CLOSE_SQ_BRACKET */ +#line 1399 "verilog_parser.y" + { + //$$ = ast_new_range($2,$4); +} +#line 7683 "verilog_parser.tab.c" + break; + + case 283: /* automatic_o: KW_AUTOMATIC */ +#line 1405 "verilog_parser.y" + {(yyval.treenode)=AST_TRUE;} +#line 7689 "verilog_parser.tab.c" + break; + + case 284: /* automatic_o: %empty */ +#line 1405 "verilog_parser.y" + {(yyval.treenode)=AST_FALSE;} +#line 7695 "verilog_parser.tab.c" + break; + + case 285: /* function_declaration: KW_FUNCTION automatic_o signed_o range_or_type_o function_identifier SEMICOLON function_item_declarations function_statement KW_ENDFUNCTION */ +#line 1409 "verilog_parser.y" + { + //$$ = ast_new_function_declaration($2,$3,AST_TRUE,$4,$5,$7,$8); + } +#line 7703 "verilog_parser.tab.c" + break; + + case 286: /* function_declaration: KW_FUNCTION automatic_o signed_o range_or_type_o function_identifier OPEN_BRACKET function_port_list CLOSE_BRACKET SEMICOLON block_item_declarations function_statement KW_ENDFUNCTION */ +#line 1414 "verilog_parser.y" + { + //$$ = ast_new_function_declaration($2,$3,AST_FALSE,$4,$5,$10,$11); + } +#line 7711 "verilog_parser.tab.c" + break; + + case 287: /* block_item_declarations: block_item_declaration */ +#line 1420 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +#line 7720 "verilog_parser.tab.c" + break; + + case 288: /* block_item_declarations: block_item_declarations block_item_declaration */ +#line 1424 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + ////ast_list_append($$,$2); +} +#line 7729 "verilog_parser.tab.c" + break; + + case 289: /* block_item_declarations: %empty */ +#line 1428 "verilog_parser.y" + { +//$$ = ast_list_new(); +} +#line 7737 "verilog_parser.tab.c" + break; + + case 290: /* function_item_declarations: function_item_declaration */ +#line 1434 "verilog_parser.y" + { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +#line 7746 "verilog_parser.tab.c" + break; + + case 291: /* function_item_declarations: function_item_declarations function_item_declaration */ +#line 1438 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + ////ast_list_append($$,$2); + } +#line 7755 "verilog_parser.tab.c" + break; + + case 292: /* function_item_declarations: %empty */ +#line 1442 "verilog_parser.y" + { + //$$ = ast_list_new(); + } +#line 7763 "verilog_parser.tab.c" + break; + + case 293: /* function_item_declaration: block_item_declaration */ +#line 1448 "verilog_parser.y" + { + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_FALSE; + // // $$ ->block_item = $1; +} +#line 7773 "verilog_parser.tab.c" + break; + + case 294: /* function_item_declaration: tf_input_declaration SEMICOLON */ +#line 1453 "verilog_parser.y" + { + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_TRUE; + // // $$ ->port_declaration = $1; +} +#line 7783 "verilog_parser.tab.c" + break; + + case 295: /* function_port_list: attribute_instances tf_input_declaration tf_input_declarations */ +#line 1461 "verilog_parser.y" + { + (yyval.list) = (yyvsp[0].list); + // ast_list_preappend($$,$2); +} +#line 7792 "verilog_parser.tab.c" + break; + + case 296: /* tf_input_declarations: %empty */ +#line 1466 "verilog_parser.y" + { + // $$ = ast_list_new(); +} +#line 7800 "verilog_parser.tab.c" + break; + + case 297: /* tf_input_declarations: COMMA attribute_instances tf_input_declaration tf_input_declarations */ +#line 1469 "verilog_parser.y" + { + (yyval.list) = (yyvsp[0].list); + // ast_list_preappend($$,$3); +} +#line 7809 "verilog_parser.tab.c" + break; + + case 298: /* range_or_type_o: range_or_type */ +#line 1475 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 7815 "verilog_parser.tab.c" + break; + + case 299: /* range_or_type_o: %empty */ +#line 1475 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 7821 "verilog_parser.tab.c" + break; + + case 300: /* range_or_type: range */ +#line 1478 "verilog_parser.y" + { + //$$ = ast_new_range_or_type(AST_TRUE); + //// $$ ->range = $1; + } +#line 7830 "verilog_parser.tab.c" + break; + + case 301: /* range_or_type: KW_INTEGER */ +#line 1482 "verilog_parser.y" + { + //$$ = ast_new_range_or_type(AST_FALSE); + //// $$ ->type = PORT_TYPE_INTEGER; + } +#line 7839 "verilog_parser.tab.c" + break; + + case 302: /* range_or_type: KW_REAL */ +#line 1486 "verilog_parser.y" + { + //$$ = ast_new_range_or_type(AST_FALSE); + //// $$ ->type = PORT_TYPE_REAL; + } +#line 7848 "verilog_parser.tab.c" + break; + + case 303: /* range_or_type: KW_REALTIME */ +#line 1490 "verilog_parser.y" + { + //$$ = ast_new_range_or_type(AST_FALSE); + //// $$ ->type = PORT_TYPE_REALTIME; + } +#line 7857 "verilog_parser.tab.c" + break; + + case 304: /* range_or_type: KW_TIME */ +#line 1494 "verilog_parser.y" + { + //$$ = ast_new_range_or_type(AST_FALSE); + //// $$ ->type = PORT_TYPE_TIME; + } +#line 7866 "verilog_parser.tab.c" + break; + + case 305: /* task_declaration: KW_TASK automatic_o task_identifier SEMICOLON task_item_declarations statement KW_ENDTASK */ +#line 1504 "verilog_parser.y" + { + //$$ = ast_new_task_declaration($2,$3,NULL,$5,$6); + } +#line 7874 "verilog_parser.tab.c" + break; + + case 306: /* task_declaration: KW_TASK automatic_o task_identifier OPEN_BRACKET task_port_list CLOSE_BRACKET SEMICOLON block_item_declarations statement KW_ENDTASK */ +#line 1508 "verilog_parser.y" + { + //$$ = ast_new_task_declaration($2,$3,$5,$8,$9); + } +#line 7882 "verilog_parser.tab.c" + break; + + case 307: /* task_item_declarations: %empty */ +#line 1514 "verilog_parser.y" + { + //$$ = ast_list_new(); + } +#line 7890 "verilog_parser.tab.c" + break; + + case 308: /* task_item_declarations: task_item_declaration */ +#line 1517 "verilog_parser.y" + { + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } +#line 7899 "verilog_parser.tab.c" + break; + + case 309: /* task_item_declarations: task_item_declarations task_item_declaration */ +#line 1521 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + // //ast_list_append($$,$2); + } +#line 7908 "verilog_parser.tab.c" + break; + + case 310: /* task_item_declaration: block_item_declaration */ +#line 1528 "verilog_parser.y" + { + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_FALSE; + // // $$ ->block_item = $1; +} +#line 7918 "verilog_parser.tab.c" + break; + + case 311: /* task_item_declaration: attribute_instances tf_input_declaration SEMICOLON */ +#line 1533 "verilog_parser.y" + { + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_TRUE; + // // $$ ->port_declaration = $2; +} +#line 7928 "verilog_parser.tab.c" + break; + + case 312: /* task_item_declaration: attribute_instances tf_output_declaration SEMICOLON */ +#line 1538 "verilog_parser.y" + { + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_TRUE; + // // $$ ->port_declaration = $2; +} +#line 7938 "verilog_parser.tab.c" + break; + + case 313: /* task_item_declaration: attribute_instances tf_inout_declaration SEMICOLON */ +#line 1543 "verilog_parser.y" + { + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_TRUE; + // // $$ ->port_declaration = $2; +} +#line 7948 "verilog_parser.tab.c" + break; + + case 314: /* task_port_list: task_port_item */ +#line 1551 "verilog_parser.y" + { + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } +#line 7957 "verilog_parser.tab.c" + break; + + case 315: /* task_port_list: task_port_list COMMA task_port_item */ +#line 1555 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + // //ast_list_append($$,$3); + } +#line 7966 "verilog_parser.tab.c" + break; + + case 316: /* task_port_item: attribute_instances tf_input_declaration SEMICOLON */ +#line 1562 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 7972 "verilog_parser.tab.c" + break; + + case 317: /* task_port_item: attribute_instances tf_output_declaration SEMICOLON */ +#line 1563 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 7978 "verilog_parser.tab.c" + break; + + case 318: /* task_port_item: attribute_instances tf_inout_declaration SEMICOLON */ +#line 1564 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 7984 "verilog_parser.tab.c" + break; + + case 319: /* tf_input_declaration: KW_INPUT reg_o signed_o range_o list_of_port_identifiers */ +#line 1568 "verilog_parser.y" + { + // $$ = ast_new_task_port(PORT_INPUT, $2,$3,$4,PORT_TYPE_NONE,$5); + } +#line 7992 "verilog_parser.tab.c" + break; + + case 320: /* tf_input_declaration: KW_INPUT task_port_type_o list_of_port_identifiers */ +#line 1571 "verilog_parser.y" + { + // $$ = ast_new_task_port(PORT_INPUT,AST_FALSE,AST_FALSE,NULL, + // $2,$3); +} +#line 8001 "verilog_parser.tab.c" + break; + + case 321: /* tf_output_declaration: KW_OUTPUT reg_o signed_o range_o list_of_port_identifiers */ +#line 1578 "verilog_parser.y" + { + //$$ = ast_new_task_port(PORT_OUTPUT, $2,$3,$4,PORT_TYPE_NONE,$5); + } +#line 8009 "verilog_parser.tab.c" + break; + + case 322: /* tf_output_declaration: KW_OUTPUT task_port_type_o list_of_port_identifiers */ +#line 1581 "verilog_parser.y" + { + // $$ = ast_new_task_port(PORT_OUTPUT,AST_FALSE,AST_FALSE,NULL, + // $2,$3); +} +#line 8018 "verilog_parser.tab.c" + break; + + case 323: /* tf_inout_declaration: KW_INOUT reg_o signed_o range_o list_of_port_identifiers */ +#line 1588 "verilog_parser.y" + { + //$$ = ast_new_task_port(PORT_INOUT, $2,$3,$4,PORT_TYPE_NONE,$5); + } +#line 8026 "verilog_parser.tab.c" + break; + + case 324: /* tf_inout_declaration: KW_INOUT task_port_type_o list_of_port_identifiers */ +#line 1591 "verilog_parser.y" + { + //$$ = ast_new_task_port(PORT_INOUT,AST_FALSE,AST_FALSE,NULL, + // $2,$3); +} +#line 8035 "verilog_parser.tab.c" + break; + + case 325: /* task_port_type_o: task_port_type */ +#line 1597 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8041 "verilog_parser.tab.c" + break; + + case 326: /* task_port_type_o: %empty */ +#line 1597 "verilog_parser.y" + {(yyval.treenode)=PORT_TYPE_NONE;} +#line 8047 "verilog_parser.tab.c" + break; + + case 327: /* task_port_type: KW_TIME */ +#line 1598 "verilog_parser.y" + {(yyval.treenode) = PORT_TYPE_TIME;} +#line 8053 "verilog_parser.tab.c" + break; + + case 328: /* task_port_type: KW_REAL */ +#line 1599 "verilog_parser.y" + {(yyval.treenode) = PORT_TYPE_REAL;} +#line 8059 "verilog_parser.tab.c" + break; + + case 329: /* task_port_type: KW_REALTIME */ +#line 1600 "verilog_parser.y" + {(yyval.treenode) = PORT_TYPE_REALTIME;} +#line 8065 "verilog_parser.tab.c" + break; + + case 330: /* task_port_type: KW_INTEGER */ +#line 1601 "verilog_parser.y" + {(yyval.treenode) = PORT_TYPE_INTEGER;} +#line 8071 "verilog_parser.tab.c" + break; + + case 331: /* block_item_declaration: attribute_instances block_reg_declaration */ +#line 1608 "verilog_parser.y" + { + //$$ = ast_new_block_item_declaration(BLOCK_ITEM_REG, $1); + //// $$ ->reg = $2; + } +#line 8080 "verilog_parser.tab.c" + break; + + case 332: /* block_item_declaration: attribute_instances event_declaration */ +#line 1612 "verilog_parser.y" + { + //$$ = ast_new_block_item_declaration(BLOCK_ITEM_TYPE, $1); + //// $$ ->event_or_var = $2; + } +#line 8089 "verilog_parser.tab.c" + break; + + case 333: /* block_item_declaration: attribute_instances integer_declaration */ +#line 1616 "verilog_parser.y" + { + //$$ = ast_new_block_item_declaration(BLOCK_ITEM_TYPE, $1); + //// $$ ->event_or_var = $2; + } +#line 8098 "verilog_parser.tab.c" + break; + + case 334: /* block_item_declaration: attribute_instances local_parameter_declaration */ +#line 1620 "verilog_parser.y" + { + //$$ = ast_new_block_item_declaration(BLOCK_ITEM_PARAM, $1); + //// $$ ->parameters = $2; + } +#line 8107 "verilog_parser.tab.c" + break; + + case 335: /* block_item_declaration: attribute_instances parameter_declaration SEMICOLON */ +#line 1624 "verilog_parser.y" + { + //$$ = ast_new_block_item_declaration(BLOCK_ITEM_PARAM, $1); + //// $$ ->parameters = $2; + } +#line 8116 "verilog_parser.tab.c" + break; + + case 336: /* block_item_declaration: attribute_instances real_declaration */ +#line 1628 "verilog_parser.y" + { + // $$ = ast_new_block_item_declaration(BLOCK_ITEM_TYPE, $1); + // $$ ->event_or_var = $2; + } +#line 8125 "verilog_parser.tab.c" + break; + + case 337: /* block_item_declaration: attribute_instances realtime_declaration */ +#line 1632 "verilog_parser.y" + { + // $$ = ast_new_block_item_declaration(BLOCK_ITEM_TYPE, $1); + // $$ ->event_or_var = $2; + } +#line 8134 "verilog_parser.tab.c" + break; + + case 338: /* block_item_declaration: attribute_instances time_declaration */ +#line 1636 "verilog_parser.y" + { + // $$ = ast_new_block_item_declaration(BLOCK_ITEM_TYPE, $1); + // $$ ->event_or_var = $2; + } +#line 8143 "verilog_parser.tab.c" + break; + + case 339: /* block_reg_declaration: KW_REG signed_o range_o list_of_block_variable_identifiers SEMICOLON */ +#line 1643 "verilog_parser.y" + { + // $$ = ast_new_block_reg_declaration($2,$3,$4); + } +#line 8151 "verilog_parser.tab.c" + break; + + case 340: /* list_of_block_variable_identifiers: block_variable_type */ +#line 1649 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8160 "verilog_parser.tab.c" + break; + + case 341: /* list_of_block_variable_identifiers: list_of_block_variable_identifiers COMMA block_variable_type */ +#line 1653 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); +} +#line 8169 "verilog_parser.tab.c" + break; + + case 342: /* block_variable_type: variable_identifier */ +#line 1659 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8175 "verilog_parser.tab.c" + break; + + case 343: /* block_variable_type: variable_identifier dimensions */ +#line 1660 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 8181 "verilog_parser.tab.c" + break; + + case 344: /* delay2_o: delay2 */ +#line 1665 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8187 "verilog_parser.tab.c" + break; + + case 345: /* delay2_o: %empty */ +#line 1665 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 8193 "verilog_parser.tab.c" + break; + + case 346: /* gate_instantiation: cmos_switchtype cmos_switch_instances SEMICOLON */ +#line 1668 "verilog_parser.y" + { + // $$ = ast_new_gate_instantiation(GATE_CMOS); + // $$ ->switches = ast_new_switches($1,$2); + } +#line 8202 "verilog_parser.tab.c" + break; + + case 347: /* gate_instantiation: mos_switchtype mos_switch_instances SEMICOLON */ +#line 1672 "verilog_parser.y" + { + // $$ = ast_new_gate_instantiation(GATE_MOS); + // $$ ->switches = ast_new_switches($1,$2); + } +#line 8211 "verilog_parser.tab.c" + break; + + case 348: /* gate_instantiation: pass_switchtype pass_switch_instances SEMICOLON */ +#line 1676 "verilog_parser.y" + { + // $$ = ast_new_gate_instantiation(GATE_PASS); + // $$ ->switches = ast_new_switches($1,$2); + } +#line 8220 "verilog_parser.tab.c" + break; + + case 349: /* gate_instantiation: gate_enable SEMICOLON */ +#line 1680 "verilog_parser.y" + { + // $$ = ast_new_gate_instantiation(GATE_ENABLE); + // $$ ->enable = $1; + } +#line 8229 "verilog_parser.tab.c" + break; + + case 350: /* gate_instantiation: gate_n_output SEMICOLON */ +#line 1684 "verilog_parser.y" + { + // $$ = ast_new_gate_instantiation(GATE_N_OUT); + // $$ ->n_out = $1; + } +#line 8238 "verilog_parser.tab.c" + break; + + case 351: /* gate_instantiation: gate_pass_en_switch SEMICOLON */ +#line 1688 "verilog_parser.y" + { + // $$ = ast_new_gate_instantiation(GATE_PASS_EN); + // $$ ->pass_en = $1; + } +#line 8247 "verilog_parser.tab.c" + break; + + case 352: /* gate_instantiation: gate_n_input SEMICOLON */ +#line 1692 "verilog_parser.y" + { + // $$ = ast_new_gate_instantiation(GATE_N_IN); + // $$ ->n_in = $1; + } +#line 8256 "verilog_parser.tab.c" + break; + + case 353: /* gate_instantiation: KW_PULLDOWN pulldown_strength_o pull_gate_instances SEMICOLON */ +#line 1696 "verilog_parser.y" + { + // $$ = ast_new_gate_instantiation(GATE_PULL_UP); + // $$ ->pull_strength = $2; + // $$ ->pull_gates = $3; + } +#line 8266 "verilog_parser.tab.c" + break; + + case 354: /* gate_instantiation: KW_PULLUP pullup_strength_o pull_gate_instances SEMICOLON */ +#line 1701 "verilog_parser.y" + { + // $$ = ast_new_gate_instantiation(GATE_PULL_DOWN); + // $$ ->pull_strength = $2; + // $$ ->pull_gates = $3; + } +#line 8276 "verilog_parser.tab.c" + break; + + case 357: /* gate_n_output: gatetype_n_output n_output_gate_instances */ +#line 1714 "verilog_parser.y" + { + // $$ = ast_new_n_output_gate_instances($1,NULL,NULL,$2); + } +#line 8284 "verilog_parser.tab.c" + break; + + case 358: /* gate_n_output: gatetype_n_output OB drive_strength delay2 n_output_gate_instances */ +#line 1717 "verilog_parser.y" + { + // $$ = ast_new_n_output_gate_instances($1,$4,$3,$5); + } +#line 8292 "verilog_parser.tab.c" + break; + + case 359: /* gate_n_output: gatetype_n_output OB drive_strength n_output_gate_instances */ +#line 1720 "verilog_parser.y" + { + // $$ = ast_new_n_output_gate_instances($1,NULL,$3,$4); + } +#line 8300 "verilog_parser.tab.c" + break; + + case 360: /* gate_n_output: gatetype_n_output delay2 n_output_gate_instances */ +#line 1723 "verilog_parser.y" + { + // $$ = ast_new_n_output_gate_instances($1,$2,NULL,$3); + } +#line 8308 "verilog_parser.tab.c" + break; + + case 361: /* gate_n_output: gatetype_n_output OB output_terminal COMMA input_terminal CB gate_n_output_a_id */ +#line 1727 "verilog_parser.y" + { + // $$ = ast_new_n_output_gate_instances($1,NULL,NULL,$7); + } +#line 8316 "verilog_parser.tab.c" + break; + + case 362: /* gate_n_output_a_id: %empty */ +#line 1732 "verilog_parser.y" + { +//$$ = NULL; +} +#line 8324 "verilog_parser.tab.c" + break; + + case 363: /* gate_n_output_a_id: COMMA n_output_gate_instances */ +#line 1735 "verilog_parser.y" + {(yyval.list)=(yyvsp[0].list);} +#line 8330 "verilog_parser.tab.c" + break; + + case 364: /* gatetype_n_output: KW_BUF */ +#line 1738 "verilog_parser.y" + {(yyval.treenode) = N_OUT_BUF;} +#line 8336 "verilog_parser.tab.c" + break; + + case 365: /* gatetype_n_output: KW_NOT */ +#line 1739 "verilog_parser.y" + {(yyval.treenode) = N_OUT_NOT;} +#line 8342 "verilog_parser.tab.c" + break; + + case 366: /* n_output_gate_instances: n_output_gate_instance */ +#line 1743 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8351 "verilog_parser.tab.c" + break; + + case 367: /* n_output_gate_instances: n_output_gate_instances COMMA n_output_gate_instance */ +#line 1748 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 8360 "verilog_parser.tab.c" + break; + + case 368: /* n_output_gate_instance: name_of_gate_instance OPEN_BRACKET output_terminals COMMA input_terminal CLOSE_BRACKET */ +#line 1756 "verilog_parser.y" + { + // $$ = ast_new_n_output_gate_instance($1,$3,$5); + } +#line 8368 "verilog_parser.tab.c" + break; + + case 369: /* gate_enable: enable_gatetype enable_gate_instances */ +#line 1764 "verilog_parser.y" + { + // $$ = ast_new_enable_gate_instances($1,NULL,NULL,$2); +} +#line 8376 "verilog_parser.tab.c" + break; + + case 370: /* gate_enable: enable_gatetype OB drive_strength delay2 enable_gate_instances */ +#line 1767 "verilog_parser.y" + { + // $$ = ast_new_enable_gate_instances($1,NULL,NULL,$5); +} +#line 8384 "verilog_parser.tab.c" + break; + + case 371: /* gate_enable: enable_gatetype OB drive_strength enable_gate_instances */ +#line 1770 "verilog_parser.y" + { + // $$ = ast_new_enable_gate_instances($1,NULL,$3,$4); +} +#line 8392 "verilog_parser.tab.c" + break; + + case 372: /* gate_enable: enable_gatetype OB output_terminal COMMA input_terminal COMMA enable_terminal CB COMMA n_output_gate_instances */ +#line 1774 "verilog_parser.y" + { + //ast_enable_gate_instance * gate = ast_new_enable_gate_instance( + // ast_new_identifier("unamed_gate",yylineno), $3,$7,$5); + //ast_list_preappend($10,gate); + // $$ = ast_new_enable_gate_instances($1,NULL,NULL,$10); +} +#line 8403 "verilog_parser.tab.c" + break; + + case 373: /* gate_enable: enable_gatetype OB output_terminal COMMA input_terminal COMMA enable_terminal CB */ +#line 1781 "verilog_parser.y" + { + //ast_enable_gate_instance * gate = ast_new_enable_gate_instance( + // ast_new_identifier("unamed_gate",yylineno), $3,$7,$5); + //ast_list * list = ast_list_new(); + //ast_list_append(list,gate); + // $$ = ast_new_enable_gate_instances($1,NULL,NULL,list); +} +#line 8415 "verilog_parser.tab.c" + break; + + case 374: /* gate_enable: enable_gatetype delay3 enable_gate_instances */ +#line 1788 "verilog_parser.y" + { + // $$ = ast_new_enable_gate_instances($1,$2,NULL,$3); +} +#line 8423 "verilog_parser.tab.c" + break; + + case 375: /* enable_gate_instances: enable_gate_instance */ +#line 1794 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8432 "verilog_parser.tab.c" + break; + + case 376: /* enable_gate_instances: enable_gate_instances COMMA enable_gate_instance */ +#line 1798 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); +} +#line 8441 "verilog_parser.tab.c" + break; + + case 377: /* enable_gate_instance: name_of_gate_instance OPEN_BRACKET output_terminal COMMA input_terminal COMMA enable_terminal CLOSE_BRACKET */ +#line 1806 "verilog_parser.y" + { + // $$ = ast_new_enable_gate_instance($1,$3,$7,$5); +} +#line 8449 "verilog_parser.tab.c" + break; + + case 378: /* enable_gatetype: KW_BUFIF0 */ +#line 1811 "verilog_parser.y" + {(yyval.treenode) = EN_BUFIF0;} +#line 8455 "verilog_parser.tab.c" + break; + + case 379: /* enable_gatetype: KW_BUFIF1 */ +#line 1812 "verilog_parser.y" + {(yyval.treenode) = EN_BUFIF1;} +#line 8461 "verilog_parser.tab.c" + break; + + case 380: /* enable_gatetype: KW_NOTIF0 */ +#line 1813 "verilog_parser.y" + {(yyval.treenode) = EN_NOTIF0;} +#line 8467 "verilog_parser.tab.c" + break; + + case 381: /* enable_gatetype: KW_NOTIF1 */ +#line 1814 "verilog_parser.y" + {(yyval.treenode) = EN_NOTIF1;} +#line 8473 "verilog_parser.tab.c" + break; + + case 382: /* gate_n_input: gatetype_n_input n_input_gate_instances */ +#line 1820 "verilog_parser.y" + { + // $$ = ast_new_n_input_gate_instances($1,NULL,NULL,$2); + } +#line 8481 "verilog_parser.tab.c" + break; + + case 383: /* gate_n_input: gatetype_n_input OB drive_strength delay2 n_input_gate_instances */ +#line 1823 "verilog_parser.y" + { + // $$ = ast_new_n_input_gate_instances($1,NULL,$3,$5); + } +#line 8489 "verilog_parser.tab.c" + break; + + case 384: /* gate_n_input: gatetype_n_input OB drive_strength n_input_gate_instances */ +#line 1826 "verilog_parser.y" + { + // $$ = ast_new_n_input_gate_instances($1,NULL,$3,$4); + } +#line 8497 "verilog_parser.tab.c" + break; + + case 385: /* gate_n_input: gatetype_n_input OB output_terminal COMMA input_terminals CB */ +#line 1829 "verilog_parser.y" + { + //ast_n_input_gate_instance * gate = ast_new_n_input_gate_instance( + // ast_new_identifier("unamed_gate",yylineno), $5,$3); + //ast_list * list = ast_list_new(); + //ast_list_append(list,gate); + // $$ = ast_new_n_input_gate_instances($1,NULL,NULL,list); + } +#line 8509 "verilog_parser.tab.c" + break; + + case 386: /* gate_n_input: gatetype_n_input OB output_terminal COMMA input_terminals CB COMMA n_input_gate_instances */ +#line 1837 "verilog_parser.y" + { + + //ast_n_input_gate_instance * gate = ast_new_n_input_gate_instance( + // ast_new_identifier("unamed_gate",yylineno), $5,$3); + //ast_list * list = $8; + //ast_list_preappend(list,gate); + // $$ = ast_new_n_input_gate_instances($1,NULL,NULL,list); + } +#line 8522 "verilog_parser.tab.c" + break; + + case 387: /* gate_n_input: gatetype_n_input delay3 n_input_gate_instances */ +#line 1845 "verilog_parser.y" + { + // $$ = ast_new_n_input_gate_instances($1,$2,NULL,$3); +} +#line 8530 "verilog_parser.tab.c" + break; + + case 388: /* gatetype_n_input: KW_AND */ +#line 1851 "verilog_parser.y" + { (yyval.treenode) = N_IN_AND ;} +#line 8536 "verilog_parser.tab.c" + break; + + case 389: /* gatetype_n_input: KW_NAND */ +#line 1852 "verilog_parser.y" + { (yyval.treenode) = N_IN_NAND;} +#line 8542 "verilog_parser.tab.c" + break; + + case 390: /* gatetype_n_input: KW_OR */ +#line 1853 "verilog_parser.y" + { (yyval.treenode) = N_IN_OR ;} +#line 8548 "verilog_parser.tab.c" + break; + + case 391: /* gatetype_n_input: KW_NOR */ +#line 1854 "verilog_parser.y" + { (yyval.treenode) = N_IN_NOR ;} +#line 8554 "verilog_parser.tab.c" + break; + + case 392: /* gatetype_n_input: KW_XOR */ +#line 1855 "verilog_parser.y" + { (yyval.treenode) = N_IN_XOR ;} +#line 8560 "verilog_parser.tab.c" + break; + + case 393: /* gatetype_n_input: KW_XNOR */ +#line 1856 "verilog_parser.y" + { (yyval.treenode) = N_IN_XNOR;} +#line 8566 "verilog_parser.tab.c" + break; + + case 394: /* gate_pass_en_switch: KW_TRANIF0 delay2 pass_enable_switch_instances */ +#line 1862 "verilog_parser.y" + { + // $$ = ast_new_pass_enable_switches(PASS_EN_TRANIF0,$2,$3); + } +#line 8574 "verilog_parser.tab.c" + break; + + case 395: /* gate_pass_en_switch: KW_TRANIF1 delay2 pass_enable_switch_instances */ +#line 1865 "verilog_parser.y" + { + // $$ = ast_new_pass_enable_switches(PASS_EN_TRANIF1,$2,$3); + } +#line 8582 "verilog_parser.tab.c" + break; + + case 396: /* gate_pass_en_switch: KW_RTRANIF1 delay2 pass_enable_switch_instances */ +#line 1868 "verilog_parser.y" + { + // $$ = ast_new_pass_enable_switches(PASS_EN_RTRANIF0,$2,$3); + } +#line 8590 "verilog_parser.tab.c" + break; + + case 397: /* gate_pass_en_switch: KW_RTRANIF0 delay2 pass_enable_switch_instances */ +#line 1871 "verilog_parser.y" + { + // $$ = ast_new_pass_enable_switches(PASS_EN_RTRANIF1,$2,$3); + } +#line 8598 "verilog_parser.tab.c" + break; + + case 398: /* pass_enable_switch_instances: pass_enable_switch_instance */ +#line 1877 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8607 "verilog_parser.tab.c" + break; + + case 399: /* pass_enable_switch_instances: pass_enable_switch_instances COMMA pass_enable_switch_instance */ +#line 1881 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8616 "verilog_parser.tab.c" + break; + + case 400: /* pass_enable_switch_instance: name_of_gate_instance OPEN_BRACKET inout_terminal COMMA inout_terminal COMMA enable_terminal CLOSE_BRACKET */ +#line 1890 "verilog_parser.y" + { + // $$ = ast_new_pass_enable_switch($1,$3,$5,$7); + } +#line 8624 "verilog_parser.tab.c" + break; + + case 401: /* pull_gate_instances: pull_gate_instance */ +#line 1899 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8633 "verilog_parser.tab.c" + break; + + case 402: /* pull_gate_instances: pull_gate_instances COMMA pull_gate_instance */ +#line 1903 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8642 "verilog_parser.tab.c" + break; + + case 403: /* pass_switch_instances: pass_switch_instance */ +#line 1910 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8651 "verilog_parser.tab.c" + break; + + case 404: /* pass_switch_instances: pass_switch_instances COMMA pass_switch_instance */ +#line 1914 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8660 "verilog_parser.tab.c" + break; + + case 405: /* n_input_gate_instances: n_input_gate_instance */ +#line 1921 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8669 "verilog_parser.tab.c" + break; + + case 406: /* n_input_gate_instances: n_input_gate_instances COMMA n_input_gate_instance */ +#line 1925 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8678 "verilog_parser.tab.c" + break; + + case 407: /* mos_switch_instances: mos_switch_instance */ +#line 1932 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8687 "verilog_parser.tab.c" + break; + + case 408: /* mos_switch_instances: mos_switch_instances COMMA mos_switch_instance */ +#line 1936 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8696 "verilog_parser.tab.c" + break; + + case 409: /* cmos_switch_instances: cmos_switch_instance */ +#line 1943 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8705 "verilog_parser.tab.c" + break; + + case 410: /* cmos_switch_instances: cmos_switch_instances COMMA cmos_switch_instance */ +#line 1947 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8714 "verilog_parser.tab.c" + break; + + case 411: /* pull_gate_instance: name_of_gate_instance OPEN_BRACKET output_terminal CLOSE_BRACKET */ +#line 1955 "verilog_parser.y" + { + // $$ = ast_new_pull_gate_instance($1,$3); + } +#line 8722 "verilog_parser.tab.c" + break; + + case 412: /* pass_switch_instance: name_of_gate_instance OPEN_BRACKET inout_terminal COMMA inout_terminal CLOSE_BRACKET */ +#line 1962 "verilog_parser.y" + { + // $$ = ast_new_pass_switch_instance($1,$3,$5); + } +#line 8730 "verilog_parser.tab.c" + break; + + case 413: /* n_input_gate_instance: name_of_gate_instance OPEN_BRACKET output_terminal COMMA input_terminals CLOSE_BRACKET */ +#line 1970 "verilog_parser.y" + { + // $$ = ast_new_n_input_gate_instance($1,$5,$3); + } +#line 8738 "verilog_parser.tab.c" + break; + + case 414: /* mos_switch_instance: name_of_gate_instance OPEN_BRACKET output_terminal COMMA input_terminal COMMA enable_terminal CLOSE_BRACKET */ +#line 1977 "verilog_parser.y" + { + // $$ = ast_new_mos_switch_instance($1,$3,$7,$5); + } +#line 8746 "verilog_parser.tab.c" + break; + + case 415: /* cmos_switch_instance: name_of_gate_instance OPEN_BRACKET output_terminal COMMA input_terminal COMMA ncontrol_terminal COMMA pcontrol_terminal CLOSE_BRACKET */ +#line 1984 "verilog_parser.y" + { + // $$ = ast_new_cmos_switch_instance($1,$3,$7,$9,$5); + } +#line 8754 "verilog_parser.tab.c" + break; + + case 416: /* output_terminals: output_terminals COMMA output_terminal */ +#line 1990 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 8763 "verilog_parser.tab.c" + break; + + case 417: /* output_terminals: output_terminal */ +#line 1994 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8772 "verilog_parser.tab.c" + break; + + case 418: /* input_terminals: input_terminal */ +#line 2001 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 8781 "verilog_parser.tab.c" + break; + + case 419: /* input_terminals: input_terminals COMMA input_terminal */ +#line 2005 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 8790 "verilog_parser.tab.c" + break; + + case 420: /* pulldown_strength_o: pulldown_strength */ +#line 2013 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8796 "verilog_parser.tab.c" + break; + + case 421: /* pulldown_strength_o: %empty */ +#line 2014 "verilog_parser.y" + { +// $$ = ast_new_primitive_pull_strength(PULL_NONE,STRENGTH_NONE,STRENGTH_NONE); +} +#line 8804 "verilog_parser.tab.c" + break; + + case 422: /* pulldown_strength: OPEN_BRACKET strength0 COMMA strength1 CLOSE_BRACKET */ +#line 2019 "verilog_parser.y" + { + // $$ = ast_new_primitive_pull_strength(PULL_DOWN,$2,$4); + } +#line 8812 "verilog_parser.tab.c" + break; + + case 423: /* pulldown_strength: OPEN_BRACKET strength1 COMMA strength0 CLOSE_BRACKET */ +#line 2022 "verilog_parser.y" + { + // $$ = ast_new_primitive_pull_strength(PULL_DOWN,$2,$4); + } +#line 8820 "verilog_parser.tab.c" + break; + + case 424: /* pulldown_strength: OPEN_BRACKET strength1 CLOSE_BRACKET */ +#line 2025 "verilog_parser.y" + { + // $$ = ast_new_primitive_pull_strength(PULL_DOWN,$2,$2); + } +#line 8828 "verilog_parser.tab.c" + break; + + case 425: /* pullup_strength_o: pullup_strength */ +#line 2030 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8834 "verilog_parser.tab.c" + break; + + case 426: /* pullup_strength_o: %empty */ +#line 2031 "verilog_parser.y" + { +// $$ = ast_new_primitive_pull_strength(PULL_NONE,STRENGTH_NONE,STRENGTH_NONE); +} +#line 8842 "verilog_parser.tab.c" + break; + + case 427: /* pullup_strength: OPEN_BRACKET strength0 COMMA strength1 CLOSE_BRACKET */ +#line 2036 "verilog_parser.y" + { + // $$ = ast_new_primitive_pull_strength(PULL_UP,$2,$4); + } +#line 8850 "verilog_parser.tab.c" + break; + + case 428: /* pullup_strength: OPEN_BRACKET strength1 COMMA strength0 CLOSE_BRACKET */ +#line 2039 "verilog_parser.y" + { + // $$ = ast_new_primitive_pull_strength(PULL_UP,$2,$4); + } +#line 8858 "verilog_parser.tab.c" + break; + + case 429: /* pullup_strength: OPEN_BRACKET strength1 CLOSE_BRACKET */ +#line 2042 "verilog_parser.y" + { + // $$ = ast_new_primitive_pull_strength(PULL_UP,$2,$2); + } +#line 8866 "verilog_parser.tab.c" + break; + + case 430: /* name_of_gate_instance: gate_instance_identifier range_o */ +#line 2049 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[-1].treenode);} +#line 8872 "verilog_parser.tab.c" + break; + + case 431: /* name_of_gate_instance: %empty */ +#line 2050 "verilog_parser.y" + {// $$ = ast_new_identifier("Unnamed gate instance", yylineno); +} +#line 8879 "verilog_parser.tab.c" + break; + + case 432: /* enable_terminal: expression */ +#line 2056 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8885 "verilog_parser.tab.c" + break; + + case 433: /* input_terminal: expression */ +#line 2057 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8891 "verilog_parser.tab.c" + break; + + case 434: /* ncontrol_terminal: expression */ +#line 2058 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8897 "verilog_parser.tab.c" + break; + + case 435: /* pcontrol_terminal: expression */ +#line 2059 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8903 "verilog_parser.tab.c" + break; + + case 436: /* inout_terminal: net_lvalue */ +#line 2060 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8909 "verilog_parser.tab.c" + break; + + case 437: /* output_terminal: net_lvalue */ +#line 2061 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 8915 "verilog_parser.tab.c" + break; + + case 438: /* cmos_switchtype: KW_CMOS delay3 */ +#line 2066 "verilog_parser.y" + {// $$ = ast_new_switch_gate_d3(SWITCH_CMOS ,$2); + } +#line 8922 "verilog_parser.tab.c" + break; + + case 439: /* cmos_switchtype: KW_RCMOS delay3 */ +#line 2068 "verilog_parser.y" + {// $$ = ast_new_switch_gate_d3(SWITCH_RCMOS,$2); +} +#line 8929 "verilog_parser.tab.c" + break; + + case 440: /* mos_switchtype: KW_NMOS delay3 */ +#line 2073 "verilog_parser.y" + {// $$ = ast_new_switch_gate_d3(SWITCH_NMOS ,$2); + } +#line 8936 "verilog_parser.tab.c" + break; + + case 441: /* mos_switchtype: KW_PMOS delay3 */ +#line 2075 "verilog_parser.y" + {// $$ = ast_new_switch_gate_d3(SWITCH_PMOS ,$2); +} +#line 8943 "verilog_parser.tab.c" + break; + + case 442: /* mos_switchtype: KW_RNMOS delay3 */ +#line 2077 "verilog_parser.y" + {// $$ = ast_new_switch_gate_d3(SWITCH_RNMOS,$2); +} +#line 8950 "verilog_parser.tab.c" + break; + + case 443: /* mos_switchtype: KW_RPMOS delay3 */ +#line 2079 "verilog_parser.y" + {// $$ = ast_new_switch_gate_d3(SWITCH_RPMOS,$2); +} +#line 8957 "verilog_parser.tab.c" + break; + + case 444: /* pass_switchtype: KW_TRAN delay2 */ +#line 2084 "verilog_parser.y" + {// $$ = ast_new_switch_gate_d2(SWITCH_TRAN ,$2); + } +#line 8964 "verilog_parser.tab.c" + break; + + case 445: /* pass_switchtype: KW_RTRAN delay2 */ +#line 2086 "verilog_parser.y" + {// $$ = ast_new_switch_gate_d2(SWITCH_RTRAN,$2); +} +#line 8971 "verilog_parser.tab.c" + break; + + case 446: /* module_instantiation: module_identifier HASH delay_value parameter_value_assignment_o module_instances SEMICOLON */ +#line 2094 "verilog_parser.y" + { + // $$ = ast_new_module_instantiation($1,$4,$5); + } +#line 8979 "verilog_parser.tab.c" + break; + + case 447: /* module_instantiation: module_identifier parameter_value_assignment_o module_instances SEMICOLON */ +#line 2097 "verilog_parser.y" + { + // $$ = ast_new_module_instantiation($1,$2,$3); + } +#line 8987 "verilog_parser.tab.c" + break; + + case 448: /* parameter_value_assignment_o: parameter_value_assignment */ +#line 2102 "verilog_parser.y" + {(yyval.list)=(yyvsp[0].list);} +#line 8993 "verilog_parser.tab.c" + break; + + case 449: /* parameter_value_assignment_o: %empty */ +#line 2103 "verilog_parser.y" + { + //$$=NULL; + } +#line 9001 "verilog_parser.tab.c" + break; + + case 450: /* parameter_value_assignment: HASH OPEN_BRACKET list_of_parameter_assignments CLOSE_BRACKET */ +#line 2108 "verilog_parser.y" + {(yyval.list)=(yyvsp[-1].list);} +#line 9007 "verilog_parser.tab.c" + break; + + case 451: /* list_of_parameter_assignments: ordered_parameter_assignments */ +#line 2112 "verilog_parser.y" + {(yyval.list)=(yyvsp[0].list);} +#line 9013 "verilog_parser.tab.c" + break; + + case 452: /* list_of_parameter_assignments: named_parameter_assignments */ +#line 2113 "verilog_parser.y" + {(yyval.list)=(yyvsp[0].list);} +#line 9019 "verilog_parser.tab.c" + break; + + case 453: /* ordered_parameter_assignments: ordered_parameter_assignment */ +#line 2117 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9028 "verilog_parser.tab.c" + break; + + case 454: /* ordered_parameter_assignments: ordered_parameter_assignments COMMA ordered_parameter_assignment */ +#line 2121 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 9037 "verilog_parser.tab.c" + break; + + case 455: /* named_parameter_assignments: named_parameter_assignment */ +#line 2127 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9046 "verilog_parser.tab.c" + break; + + case 456: /* named_parameter_assignments: named_parameter_assignments COMMA named_parameter_assignment */ +#line 2131 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 9055 "verilog_parser.tab.c" + break; + + case 457: /* module_instances: module_instance */ +#line 2137 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9064 "verilog_parser.tab.c" + break; + + case 458: /* module_instances: module_instances COMMA module_instance */ +#line 2141 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 9073 "verilog_parser.tab.c" + break; + + case 459: /* ordered_parameter_assignment: expression */ +#line 2147 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[0].treenode); +} +#line 9081 "verilog_parser.tab.c" + break; + + case 460: /* named_parameter_assignment: DOT parameter_identifier OPEN_BRACKET expression_o CLOSE_BRACKET */ +#line 2152 "verilog_parser.y" + { + // $$ = ast_new_named_port_connection($2,$4); +} +#line 9089 "verilog_parser.tab.c" + break; + + case 461: /* module_instance: name_of_instance OPEN_BRACKET list_of_port_connections CLOSE_BRACKET */ +#line 2158 "verilog_parser.y" + { + // $$ = ast_new_module_instance($1,$3); + } +#line 9097 "verilog_parser.tab.c" + break; + + case 462: /* name_of_instance: module_instance_identifier range_o */ +#line 2163 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 9103 "verilog_parser.tab.c" + break; + + case 463: /* list_of_port_connections: %empty */ +#line 2167 "verilog_parser.y" +{ + //$$=NULL; +} +#line 9111 "verilog_parser.tab.c" + break; + + case 464: /* list_of_port_connections: ordered_port_connections */ +#line 2170 "verilog_parser.y" + {(yyval.list)=(yyvsp[0].list);} +#line 9117 "verilog_parser.tab.c" + break; + + case 465: /* list_of_port_connections: named_port_connections */ +#line 2171 "verilog_parser.y" + {(yyval.list)=(yyvsp[0].list);} +#line 9123 "verilog_parser.tab.c" + break; + + case 466: /* ordered_port_connections: ordered_port_connection */ +#line 2175 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9132 "verilog_parser.tab.c" + break; + + case 467: /* ordered_port_connections: ordered_port_connections COMMA ordered_port_connection */ +#line 2179 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 9141 "verilog_parser.tab.c" + break; + + case 468: /* named_port_connections: named_port_connection */ +#line 2186 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9150 "verilog_parser.tab.c" + break; + + case 469: /* named_port_connections: named_port_connections COMMA named_port_connection */ +#line 2190 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); +} +#line 9159 "verilog_parser.tab.c" + break; + + case 470: /* ordered_port_connection: attribute_instances expression_o */ +#line 2196 "verilog_parser.y" + { + if((yyvsp[0].treenode) == NULL){ (yyval.treenode) = NULL;} + else{ +// $2 -> attributes = $1; + (yyval.treenode) = (yyvsp[0].treenode); + } +} +#line 9171 "verilog_parser.tab.c" + break; + + case 471: /* named_port_connection: DOT port_identifier OPEN_BRACKET expression_o CLOSE_BRACKET */ +#line 2206 "verilog_parser.y" + { + // $$ = ast_new_named_port_connection($2,$4); + } +#line 9179 "verilog_parser.tab.c" + break; + + case 472: /* expression_o: expression */ +#line 2211 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 9185 "verilog_parser.tab.c" + break; + + case 473: /* expression_o: %empty */ +#line 2212 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 9191 "verilog_parser.tab.c" + break; + + case 474: /* generated_instantiation: KW_GENERATE generate_items KW_ENDGENERATE */ +#line 2216 "verilog_parser.y" + { + //char * id = calloc(25,sizeof(char)); + //ast_identifier new_id; + //sprintf(id,"gen_%d",yylineno); + //new_id = ast_new_identifier(id,yylineno); + // $$ = ast_new_generate_block(new_id,$2); +} +#line 9203 "verilog_parser.tab.c" + break; + + case 475: /* generate_items: generate_item */ +#line 2225 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9212 "verilog_parser.tab.c" + break; + + case 476: /* generate_items: generate_items generate_item */ +#line 2229 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$,$2); + } +#line 9221 "verilog_parser.tab.c" + break; + + case 477: /* generate_item_or_null: generate_item */ +#line 2235 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 9227 "verilog_parser.tab.c" + break; + + case 478: /* generate_item_or_null: %empty */ +#line 2235 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 9233 "verilog_parser.tab.c" + break; + + case 479: /* generate_item: generate_conditional_statement */ +#line 2238 "verilog_parser.y" + { + // $$ = ast_new_generate_item(STM_CONDITIONAL,$1); + } +#line 9241 "verilog_parser.tab.c" + break; + + case 480: /* generate_item: generate_case_statement */ +#line 2241 "verilog_parser.y" + { + // $$ = ast_new_generate_item(STM_CASE,$1); + } +#line 9249 "verilog_parser.tab.c" + break; + + case 481: /* generate_item: generate_loop_statement */ +#line 2244 "verilog_parser.y" + { + // $$ = ast_new_generate_item(STM_LOOP,$1); + } +#line 9257 "verilog_parser.tab.c" + break; + + case 482: /* generate_item: generate_block */ +#line 2247 "verilog_parser.y" + { + // $$ = ast_new_generate_item(STM_GENERATE,$1); + } +#line 9265 "verilog_parser.tab.c" + break; + + case 483: /* generate_item: module_or_generate_item */ +#line 2250 "verilog_parser.y" + { + if((yyvsp[0].treenode) != NULL){ + // $$ = ast_new_generate_item(STM_MODULE_ITEM,$1); + } else{ + (yyval.treenode) = NULL; + } + } +#line 9277 "verilog_parser.tab.c" + break; + + case 484: /* generate_conditional_statement: KW_IF OPEN_BRACKET constant_expression CLOSE_BRACKET generate_item_or_null KW_ELSE generate_item_or_null */ +#line 2261 "verilog_parser.y" + { + //ast_conditional_statement * c1 = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(c1,$7); + } +#line 9286 "verilog_parser.tab.c" + break; + + case 485: /* generate_conditional_statement: KW_IF OPEN_BRACKET constant_expression CLOSE_BRACKET generate_item_or_null */ +#line 2265 "verilog_parser.y" + { + //ast_conditional_statement * c1 = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(c1,NULL); + } +#line 9295 "verilog_parser.tab.c" + break; + + case 486: /* generate_case_statement: KW_CASE OPEN_BRACKET constant_expression CLOSE_BRACKET genvar_case_items KW_ENDCASE */ +#line 2273 "verilog_parser.y" + { + // $$ = ast_new_case_statement($3,$5,CASE); +} +#line 9303 "verilog_parser.tab.c" + break; + + case 487: /* genvar_case_items: genvar_case_item */ +#line 2279 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9312 "verilog_parser.tab.c" + break; + + case 488: /* genvar_case_items: genvar_case_items genvar_case_item */ +#line 2283 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$,$2); + } +#line 9321 "verilog_parser.tab.c" + break; + + case 489: /* genvar_case_items: %empty */ +#line 2287 "verilog_parser.y" + { +//$$=NULL; +} +#line 9329 "verilog_parser.tab.c" + break; + + case 490: /* genvar_case_item: constant_expressions COLON generate_item_or_null */ +#line 2293 "verilog_parser.y" + { + // $$ = ast_new_case_item($1,$3); + } +#line 9337 "verilog_parser.tab.c" + break; + + case 491: /* genvar_case_item: KW_DEFAULT COLON generate_item_or_null */ +#line 2296 "verilog_parser.y" + { + // $$ = ast_new_case_item(NULL,$3); + // $$ ->is_default = AST_TRUE; + } +#line 9346 "verilog_parser.tab.c" + break; + + case 492: /* genvar_case_item: KW_DEFAULT generate_item_or_null */ +#line 2300 "verilog_parser.y" + { + // $$ = ast_new_case_item(NULL,$2); + // $$ ->is_default = AST_TRUE; + } +#line 9355 "verilog_parser.tab.c" + break; + + case 493: /* generate_loop_statement: KW_FOR OPEN_BRACKET genvar_assignment SEMICOLON constant_expression SEMICOLON genvar_assignment CLOSE_BRACKET KW_BEGIN COLON generate_block_identifier generate_items KW_END */ +#line 2310 "verilog_parser.y" + { + // $$ = ast_new_generate_loop_statement($12, $3,$7,$5); + } +#line 9363 "verilog_parser.tab.c" + break; + + case 494: /* genvar_assignment: genvar_identifier EQ constant_expression */ +#line 2315 "verilog_parser.y" + { + //ast_lvalue * lv = ast_new_lvalue_id(GENVAR_IDENTIFIER,$1); + // $$ = ast_new_single_assignment(lv, $3); +} +#line 9372 "verilog_parser.tab.c" + break; + + case 495: /* generate_block: KW_BEGIN generate_items KW_END */ +#line 2321 "verilog_parser.y" + { + //char * id = calloc(25,sizeof(char)); + //ast_identifier new_id; + //sprintf(id,"gen_%d",yylineno); + //new_id = ast_new_identifier(id,yylineno); + // $$ = ast_new_generate_block(new_id, $2); + } +#line 9384 "verilog_parser.tab.c" + break; + + case 496: /* generate_block: KW_BEGIN COLON generate_block_identifier generate_items KW_END */ +#line 2328 "verilog_parser.y" + { + // $$ = ast_new_generate_block($3, $4); + } +#line 9392 "verilog_parser.tab.c" + break; + + case 497: /* udp_declaration: attribute_instances KW_PRIMITIVE udp_identifier OPEN_BRACKET udp_port_list CLOSE_BRACKET SEMICOLON udp_port_declarations udp_body KW_ENDPRIMITIVE */ +#line 2337 "verilog_parser.y" + { +/* + ast_node_attributes * attrs = $1; + ast_identifier id = $3; + ast_list * ports = $8; + ast_udp_body * body = $9; + printf("%d %s Need to re-write this rule.\n",__LINE__,__FILE__); +*/ + // $$ = ast_new_udp_declaration(attrs,id,ports,body); + + } +#line 9408 "verilog_parser.tab.c" + break; + + case 498: /* udp_declaration: attribute_instances KW_PRIMITIVE udp_identifier OPEN_BRACKET udp_declaration_port_list CLOSE_BRACKET SEMICOLON udp_body KW_ENDPRIMITIVE */ +#line 2349 "verilog_parser.y" + { + // $$ = ast_new_udp_declaration($1,$3,$5,$8); + } +#line 9416 "verilog_parser.tab.c" + break; + + case 499: /* udp_port_declarations: udp_port_declaration */ +#line 2355 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9425 "verilog_parser.tab.c" + break; + + case 500: /* udp_port_declarations: udp_port_declarations udp_port_declaration */ +#line 2359 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$,$1); + } +#line 9434 "verilog_parser.tab.c" + break; + + case 501: /* udp_port_list: output_port_identifier COMMA input_port_identifiers */ +#line 2367 "verilog_parser.y" + { + (yyval.list) = (yyvsp[0].list); + //ast_list_preappend($$,$1); +} +#line 9443 "verilog_parser.tab.c" + break; + + case 502: /* input_port_identifiers: input_port_identifier */ +#line 2373 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9452 "verilog_parser.tab.c" + break; + + case 503: /* input_port_identifiers: input_port_identifiers COMMA input_port_identifier */ +#line 2377 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 9461 "verilog_parser.tab.c" + break; + + case 504: /* udp_declaration_port_list: udp_output_declaration COMMA udp_input_declarations */ +#line 2384 "verilog_parser.y" + { + (yyval.list) = (yyvsp[0].list); + //ast_list_preappend($$,$1); + } +#line 9470 "verilog_parser.tab.c" + break; + + case 505: /* udp_input_declarations: udp_input_declaration */ +#line 2391 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9479 "verilog_parser.tab.c" + break; + + case 506: /* udp_input_declarations: udp_input_declarations udp_input_declaration */ +#line 2395 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$,$1); + } +#line 9488 "verilog_parser.tab.c" + break; + + case 507: /* udp_port_declaration: udp_output_declaration SEMICOLON */ +#line 2402 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 9494 "verilog_parser.tab.c" + break; + + case 508: /* udp_port_declaration: udp_input_declaration SEMICOLON */ +#line 2403 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 9500 "verilog_parser.tab.c" + break; + + case 509: /* udp_port_declaration: udp_reg_declaration SEMICOLON */ +#line 2404 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 9506 "verilog_parser.tab.c" + break; + + case 510: /* udp_output_declaration: attribute_instances KW_OUTPUT port_identifier */ +#line 2408 "verilog_parser.y" + { + // $$ = ast_new_udp_port(PORT_OUTPUT, $3,$1,AST_FALSE, NULL); + } +#line 9514 "verilog_parser.tab.c" + break; + + case 511: /* udp_output_declaration: attribute_instances KW_OUTPUT KW_REG port_identifier */ +#line 2411 "verilog_parser.y" + { + // $$ = ast_new_udp_port(PORT_OUTPUT, $4,$1,AST_TRUE, NULL); + } +#line 9522 "verilog_parser.tab.c" + break; + + case 512: /* udp_output_declaration: attribute_instances KW_OUTPUT KW_REG port_identifier EQ constant_expression */ +#line 2414 "verilog_parser.y" + { + // $$ = ast_new_udp_port(PORT_OUTPUT, $4,$1,AST_TRUE, $6); + } +#line 9530 "verilog_parser.tab.c" + break; + + case 513: /* udp_input_declaration: attribute_instances KW_INPUT list_of_port_identifiers */ +#line 2420 "verilog_parser.y" + { + // $$ = ast_new_udp_input_port($3,$1); + } +#line 9538 "verilog_parser.tab.c" + break; + + case 514: /* udp_reg_declaration: attribute_instances KW_REG variable_identifier */ +#line 2425 "verilog_parser.y" + { + // $$ = ast_new_udp_port(PORT_NONE,$3,$1,AST_TRUE,NULL); + } +#line 9546 "verilog_parser.tab.c" + break; + + case 515: /* udp_body: KW_TABLE combinational_entrys KW_ENDTABLE */ +#line 2433 "verilog_parser.y" + { + // $$ = ast_new_udp_combinatoral_body($2); + } +#line 9554 "verilog_parser.tab.c" + break; + + case 516: /* udp_body: udp_initial_statement KW_TABLE sequential_entrys KW_ENDTABLE */ +#line 2436 "verilog_parser.y" + { + // $$ = ast_new_udp_sequential_body($1,$3); + } +#line 9562 "verilog_parser.tab.c" + break; + + case 517: /* udp_body: KW_TABLE sequential_entrys KW_ENDTABLE */ +#line 2439 "verilog_parser.y" + { + // $$ = ast_new_udp_sequential_body(NULL,$2); + } +#line 9570 "verilog_parser.tab.c" + break; + + case 518: /* sequential_entrys: sequential_entry */ +#line 2444 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); +} +#line 9579 "verilog_parser.tab.c" + break; + + case 519: /* sequential_entrys: sequential_entrys sequential_entry */ +#line 2448 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$,$2); +} +#line 9588 "verilog_parser.tab.c" + break; + + case 520: /* combinational_entrys: combinational_entry */ +#line 2454 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9597 "verilog_parser.tab.c" + break; + + case 521: /* combinational_entrys: combinational_entrys combinational_entry */ +#line 2458 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$,$2); + } +#line 9606 "verilog_parser.tab.c" + break; + + case 522: /* combinational_entry: level_symbols COLON output_symbol SEMICOLON */ +#line 2464 "verilog_parser.y" + { + // $$ = ast_new_udp_combinatoral_entry($1,$3); +} +#line 9614 "verilog_parser.tab.c" + break; + + case 523: /* sequential_entry: level_symbols COLON level_symbol COLON next_state SEMICOLON */ +#line 2469 "verilog_parser.y" + { + // $$ = ast_new_udp_sequential_entry(PREFIX_LEVELS, $1, $3, $5); + } +#line 9622 "verilog_parser.tab.c" + break; + + case 524: /* sequential_entry: edge_input_list COLON level_symbol COLON next_state SEMICOLON */ +#line 2472 "verilog_parser.y" + { + // $$ = ast_new_udp_sequential_entry(PREFIX_EDGES, $1, $3, $5); + } +#line 9630 "verilog_parser.tab.c" + break; + + case 525: /* udp_initial_statement: KW_INITIAL output_port_identifier EQ init_val SEMICOLON */ +#line 2478 "verilog_parser.y" + { + // $$ = ast_new_udp_initial_statement($2,$4); + } +#line 9638 "verilog_parser.tab.c" + break; + + case 526: /* init_val: unsigned_number */ +#line 2483 "verilog_parser.y" + { (yyval.treenode) = (yyvsp[0].treenode); } +#line 9644 "verilog_parser.tab.c" + break; + + case 527: /* init_val: number */ +#line 2484 "verilog_parser.y" + { (yyval.treenode) = (yyvsp[0].treenode); } +#line 9650 "verilog_parser.tab.c" + break; + + case 528: /* level_symbols_o: level_symbols */ +#line 2488 "verilog_parser.y" + { + (yyval.list)=(yyvsp[0].list); +} +#line 9658 "verilog_parser.tab.c" + break; + + case 529: /* level_symbols_o: %empty */ +#line 2491 "verilog_parser.y" + { +//$$=NULL; +} +#line 9666 "verilog_parser.tab.c" + break; + + case 530: /* level_symbols: level_symbol */ +#line 2496 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,&$1); + } +#line 9675 "verilog_parser.tab.c" + break; + + case 531: /* level_symbols: level_symbols level_symbol */ +#line 2500 "verilog_parser.y" + { + (yyval.list)= (yyvsp[-1].list); + //ast_list_append($$,&$2); + } +#line 9684 "verilog_parser.tab.c" + break; + + case 532: /* edge_input_list: level_symbols_o edge_indicator level_symbols_o */ +#line 2506 "verilog_parser.y" + { + // $$ = ast_list_new(); /** TODO FIX THIS */ +} +#line 9692 "verilog_parser.tab.c" + break; + + case 533: /* edge_indicator: OPEN_BRACKET level_symbol level_symbol CLOSE_BRACKET */ +#line 2511 "verilog_parser.y" + { + (yyvsp[-2].treenode) == LEVEL_0 && (yyvsp[-1].treenode) == LEVEL_1 ? (yyval.treenode) = EDGE_POS: + (yyvsp[-2].treenode) == LEVEL_1 && (yyvsp[-1].treenode) == LEVEL_0 ? (yyval.treenode) = EDGE_NEG: + EDGE_ANY ; + } +#line 9702 "verilog_parser.tab.c" + break; + + case 534: /* edge_indicator: edge_symbol */ +#line 2516 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 9708 "verilog_parser.tab.c" + break; + + case 535: /* next_state: output_symbol */ +#line 2519 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 9714 "verilog_parser.tab.c" + break; + + case 536: /* next_state: MINUS */ +#line 2520 "verilog_parser.y" + {(yyval.treenode)=UDP_NEXT_STATE_DC;} +#line 9720 "verilog_parser.tab.c" + break; + + case 537: /* output_symbol: unsigned_number */ +#line 2524 "verilog_parser.y" + {(yyval.treenode) = UDP_NEXT_STATE_X; /*TODO FIX THIS*/} +#line 9726 "verilog_parser.tab.c" + break; + + case 538: /* output_symbol: 'X' */ +#line 2525 "verilog_parser.y" + {(yyval.treenode) = UDP_NEXT_STATE_X;} +#line 9732 "verilog_parser.tab.c" + break; + + case 539: /* output_symbol: 'x' */ +#line 2526 "verilog_parser.y" + {(yyval.treenode) = UDP_NEXT_STATE_X;} +#line 9738 "verilog_parser.tab.c" + break; + + case 540: /* output_symbol: TERNARY */ +#line 2527 "verilog_parser.y" + {(yyval.treenode) = UDP_NEXT_STATE_QM;} +#line 9744 "verilog_parser.tab.c" + break; + + case 541: /* output_symbol: SIMPLE_ID */ +#line 2528 "verilog_parser.y" + {(yyval.treenode) = UDP_NEXT_STATE_X;} +#line 9750 "verilog_parser.tab.c" + break; + + case 542: /* level_symbol: unsigned_number */ +#line 2532 "verilog_parser.y" + {(yyval.treenode) = LEVEL_X;} +#line 9756 "verilog_parser.tab.c" + break; + + case 543: /* level_symbol: 'X' */ +#line 2533 "verilog_parser.y" + {(yyval.treenode) = LEVEL_X;} +#line 9762 "verilog_parser.tab.c" + break; + + case 544: /* level_symbol: 'x' */ +#line 2534 "verilog_parser.y" + {(yyval.treenode) = LEVEL_X;} +#line 9768 "verilog_parser.tab.c" + break; + + case 545: /* level_symbol: TERNARY */ +#line 2535 "verilog_parser.y" + {(yyval.treenode) = LEVEL_Q;} +#line 9774 "verilog_parser.tab.c" + break; + + case 546: /* level_symbol: 'B' */ +#line 2536 "verilog_parser.y" + {(yyval.treenode) = LEVEL_B;} +#line 9780 "verilog_parser.tab.c" + break; + + case 547: /* level_symbol: 'b' */ +#line 2537 "verilog_parser.y" + {(yyval.treenode) = LEVEL_B;} +#line 9786 "verilog_parser.tab.c" + break; + + case 548: /* level_symbol: SIMPLE_ID */ +#line 2538 "verilog_parser.y" + {(yyval.treenode) = LEVEL_X;} +#line 9792 "verilog_parser.tab.c" + break; + + case 549: /* edge_symbol: 'r' */ +#line 2542 "verilog_parser.y" + {(yyval.treenode) = EDGE_POS;} +#line 9798 "verilog_parser.tab.c" + break; + + case 550: /* edge_symbol: 'R' */ +#line 2543 "verilog_parser.y" + {(yyval.treenode) = EDGE_POS;} +#line 9804 "verilog_parser.tab.c" + break; + + case 551: /* edge_symbol: 'f' */ +#line 2544 "verilog_parser.y" + {(yyval.treenode) = EDGE_NEG;} +#line 9810 "verilog_parser.tab.c" + break; + + case 552: /* edge_symbol: 'F' */ +#line 2545 "verilog_parser.y" + {(yyval.treenode) = EDGE_NEG;} +#line 9816 "verilog_parser.tab.c" + break; + + case 553: /* edge_symbol: 'p' */ +#line 2546 "verilog_parser.y" + {(yyval.treenode) = EDGE_POS;} +#line 9822 "verilog_parser.tab.c" + break; + + case 554: /* edge_symbol: 'P' */ +#line 2547 "verilog_parser.y" + {(yyval.treenode) = EDGE_POS;} +#line 9828 "verilog_parser.tab.c" + break; + + case 555: /* edge_symbol: 'n' */ +#line 2548 "verilog_parser.y" + {(yyval.treenode) = EDGE_NEG;} +#line 9834 "verilog_parser.tab.c" + break; + + case 556: /* edge_symbol: 'N' */ +#line 2549 "verilog_parser.y" + {(yyval.treenode) = EDGE_NEG;} +#line 9840 "verilog_parser.tab.c" + break; + + case 557: /* edge_symbol: SIMPLE_ID */ +#line 2550 "verilog_parser.y" + { if (strcmp(yylval.string,"r") == 0) (yyval.treenode) = EDGE_POS ; + else if (strcmp(yylval.string,"R") == 0) (yyval.treenode) = EDGE_POS ; + else if (strcmp(yylval.string,"f") == 0) (yyval.treenode) = EDGE_NEG ; + else if (strcmp(yylval.string,"F") == 0) (yyval.treenode) = EDGE_NEG ; + else if (strcmp(yylval.string,"p") == 0) (yyval.treenode) = EDGE_POS ; + else if (strcmp(yylval.string,"P") == 0) (yyval.treenode) = EDGE_POS ; + else if (strcmp(yylval.string,"n") == 0) (yyval.treenode) = EDGE_NEG ; + else (yyval.treenode) = EDGE_NEG ; + } +#line 9854 "verilog_parser.tab.c" + break; + + case 558: /* edge_symbol: STAR */ +#line 2559 "verilog_parser.y" + {(yyval.treenode) = EDGE_ANY;} +#line 9860 "verilog_parser.tab.c" + break; + + case 559: /* udp_instantiation: udp_identifier drive_strength_o delay2_o udp_instances SEMICOLON */ +#line 2565 "verilog_parser.y" + { + // $$ = ast_new_udp_instantiation($4,$1,$2,$3); + } +#line 9868 "verilog_parser.tab.c" + break; + + case 560: /* udp_instances: udp_instance */ +#line 2571 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9877 "verilog_parser.tab.c" + break; + + case 561: /* udp_instances: udp_instances COMMA udp_instance */ +#line 2575 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); +} +#line 9886 "verilog_parser.tab.c" + break; + + case 562: /* udp_instance: udp_instance_identifier range_o OPEN_BRACKET output_terminal COMMA input_terminals CLOSE_BRACKET */ +#line 2583 "verilog_parser.y" + { + // $$ = ast_new_udp_instance($1,$2,$4,$6); + } +#line 9894 "verilog_parser.tab.c" + break; + + case 563: /* udp_instance: OPEN_BRACKET output_terminal COMMA input_terminals CLOSE_BRACKET */ +#line 2586 "verilog_parser.y" + { + // $$ = ast_new_udp_instance(NULL,NULL,$2,$4); + } +#line 9902 "verilog_parser.tab.c" + break; + + case 564: /* continuous_assign: KW_ASSIGN drive_strength_o delay3_o list_of_net_assignments SEMICOLON */ +#line 2595 "verilog_parser.y" + { + // $$ = ast_new_continuous_assignment($4,$2,$3); + } +#line 9910 "verilog_parser.tab.c" + break; + + case 565: /* list_of_net_assignments: net_assignment */ +#line 2601 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 9919 "verilog_parser.tab.c" + break; + + case 566: /* list_of_net_assignments: list_of_net_assignments COMMA net_assignment */ +#line 2605 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 9928 "verilog_parser.tab.c" + break; + + case 567: /* net_assignment: net_lvalue EQ expression */ +#line 2611 "verilog_parser.y" + { + // $$ = ast_new_single_assignment($1,$3); +} +#line 9936 "verilog_parser.tab.c" + break; + + case 568: /* initial_construct: KW_INITIAL statement */ +#line 2617 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 9942 "verilog_parser.tab.c" + break; + + case 569: /* always_construct: KW_ALWAYS statement */ +#line 2618 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 9948 "verilog_parser.tab.c" + break; + + case 570: /* blocking_assignment: variable_lvalue EQ delay_or_event_control_o expression */ +#line 2620 "verilog_parser.y" + { + // $$ = ast_new_blocking_assignment($1,$4,$3); +} +#line 9956 "verilog_parser.tab.c" + break; + + case 571: /* nonblocking_assignment: variable_lvalue LTE delay_or_event_control_o expression */ +#line 2625 "verilog_parser.y" + { + // $$ = ast_new_nonblocking_assignment($1,$4,$3); +} +#line 9964 "verilog_parser.tab.c" + break; + + case 572: /* delay_or_event_control_o: delay_or_event_control */ +#line 2629 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 9970 "verilog_parser.tab.c" + break; + + case 573: /* delay_or_event_control_o: %empty */ +#line 2629 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 9976 "verilog_parser.tab.c" + break; + + case 574: /* procedural_continuous_assignments: KW_ASSIGN variable_assignment */ +#line 2632 "verilog_parser.y" + { + // $$ = ast_new_hybrid_assignment(HYBRID_ASSIGNMENT_ASSIGN, $2); + } +#line 9984 "verilog_parser.tab.c" + break; + + case 575: /* procedural_continuous_assignments: KW_DEASSIGN variable_lvalue */ +#line 2635 "verilog_parser.y" + { + // $$ = ast_new_hybrid_lval_assignment(HYBRID_ASSIGNMENT_DEASSIGN, $2); + } +#line 9992 "verilog_parser.tab.c" + break; + + case 576: /* procedural_continuous_assignments: KW_FORCE variable_assignment */ +#line 2638 "verilog_parser.y" + { + // $$ = ast_new_hybrid_assignment(HYBRID_ASSIGNMENT_FORCE_VAR, $2); + } +#line 10000 "verilog_parser.tab.c" + break; + + case 577: /* procedural_continuous_assignments: KW_FORCE net_assignment */ +#line 2641 "verilog_parser.y" + { + // $$ = ast_new_hybrid_assignment(HYBRID_ASSIGNMENT_FORCE_NET, $2); + } +#line 10008 "verilog_parser.tab.c" + break; + + case 578: /* procedural_continuous_assignments: KW_RELEASE variable_lvalue */ +#line 2644 "verilog_parser.y" + { + // $$ = ast_new_hybrid_lval_assignment(HYBRID_ASSIGNMENT_RELEASE_VAR, $2); + } +#line 10016 "verilog_parser.tab.c" + break; + + case 579: /* procedural_continuous_assignments: KW_RELEASE net_lvalue */ +#line 2647 "verilog_parser.y" + { + // $$ = ast_new_hybrid_lval_assignment(HYBRID_ASSIGNMENT_RELEASE_NET, $2); + } +#line 10024 "verilog_parser.tab.c" + break; + + case 580: /* function_blocking_assignment: variable_lvalue EQ expression */ +#line 2652 "verilog_parser.y" + { + // $$ = ast_new_single_assignment($1,$3); +} +#line 10032 "verilog_parser.tab.c" + break; + + case 581: /* function_statement_or_null: function_statement */ +#line 2656 "verilog_parser.y" + {(yyval.treenode) =(yyvsp[0].treenode);} +#line 10038 "verilog_parser.tab.c" + break; + + case 582: /* function_statement_or_null: attribute_instances SEMICOLON */ +#line 2657 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 10044 "verilog_parser.tab.c" + break; + + case 583: /* block_item_declarations: block_item_declaration */ +#line 2663 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 10053 "verilog_parser.tab.c" + break; + + case 584: /* block_item_declarations: block_item_declarations block_item_declaration */ +#line 2667 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$,$2); +} +#line 10062 "verilog_parser.tab.c" + break; + + case 585: /* function_statements_o: function_statements */ +#line 2674 "verilog_parser.y" + {(yyval.list)=(yyvsp[0].list);} +#line 10068 "verilog_parser.tab.c" + break; + + case 586: /* function_statements_o: %empty */ +#line 2675 "verilog_parser.y" + {dlistInit(&(yyval.list));} +#line 10074 "verilog_parser.tab.c" + break; + + case 587: /* function_statements: function_statement */ +#line 2678 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 10083 "verilog_parser.tab.c" + break; + + case 588: /* function_statements: function_statements function_statement */ +#line 2682 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$,$2); +} +#line 10092 "verilog_parser.tab.c" + break; + + case 589: /* function_seq_block: KW_BEGIN function_statements_o KW_END */ +#line 2689 "verilog_parser.y" + { + // $$ = ast_new_statement_block(BLOCK_FUNCTION_SEQUENTIAL,NULL,NULL,$2); + } +#line 10100 "verilog_parser.tab.c" + break; + + case 590: /* function_seq_block: KW_BEGIN COLON block_identifier block_item_declarations function_statements_o KW_END */ +#line 2693 "verilog_parser.y" + { + // $$ = ast_new_statement_block(BLOCK_FUNCTION_SEQUENTIAL,$3,$4,$5); + } +#line 10108 "verilog_parser.tab.c" + break; + + case 591: /* variable_assignment: variable_lvalue EQ expression */ +#line 2698 "verilog_parser.y" + { + // $$ = ast_new_single_assignment($1,$3); +} +#line 10116 "verilog_parser.tab.c" + break; + + case 592: /* par_block: KW_FORK statements_o KW_JOIN */ +#line 2703 "verilog_parser.y" + { + // $$ = ast_new_statement_block(BLOCK_PARALLEL,NULL,NULL,$2); + } +#line 10124 "verilog_parser.tab.c" + break; + + case 593: /* par_block: KW_FORK COLON block_identifier block_item_declarations statements_o KW_JOIN */ +#line 2706 "verilog_parser.y" + { + // $$ = ast_new_statement_block(BLOCK_PARALLEL,$3,$4,$5); + } +#line 10132 "verilog_parser.tab.c" + break; + + case 594: /* seq_block: KW_BEGIN statements_o KW_END */ +#line 2712 "verilog_parser.y" + { + // $$ = ast_new_statement_block(BLOCK_SEQUENTIAL,NULL,NULL,$2); + } +#line 10140 "verilog_parser.tab.c" + break; + + case 595: /* seq_block: KW_BEGIN COLON block_identifier block_item_declarations statements_o KW_END */ +#line 2715 "verilog_parser.y" + { + // $$ = ast_new_statement_block(BLOCK_SEQUENTIAL,$3,$4,$5); + } +#line 10148 "verilog_parser.tab.c" + break; + + case 596: /* statements_o: statements */ +#line 2723 "verilog_parser.y" + { +// $$=$1; + } +#line 10156 "verilog_parser.tab.c" + break; + + case 597: /* statements_o: %empty */ +#line 2726 "verilog_parser.y" + { +//dlistInit($$); +} +#line 10164 "verilog_parser.tab.c" + break; + + case 598: /* statements: statement */ +#line 2731 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 10173 "verilog_parser.tab.c" + break; + + case 599: /* statements: statements statement */ +#line 2735 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$,$2); +} +#line 10182 "verilog_parser.tab.c" + break; + + case 600: /* statement: attribute_instances blocking_assignment SEMICOLON */ +#line 2742 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_ASSIGNMENT); + } +#line 10190 "verilog_parser.tab.c" + break; + + case 601: /* statement: attribute_instances task_enable */ +#line 2745 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_TASK_ENABLE); + } +#line 10198 "verilog_parser.tab.c" + break; + + case 602: /* statement: attribute_instances nonblocking_assignment SEMICOLON */ +#line 2748 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_ASSIGNMENT); + } +#line 10206 "verilog_parser.tab.c" + break; + + case 603: /* statement: attribute_instances case_statement */ +#line 2751 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_CASE); + } +#line 10214 "verilog_parser.tab.c" + break; + + case 604: /* statement: attribute_instances conditional_statement */ +#line 2754 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_CONDITIONAL); + } +#line 10222 "verilog_parser.tab.c" + break; + + case 605: /* statement: attribute_instances disable_statement */ +#line 2757 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_DISABLE); + } +#line 10230 "verilog_parser.tab.c" + break; + + case 606: /* statement: attribute_instances event_trigger */ +#line 2760 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_EVENT_TRIGGER); + } +#line 10238 "verilog_parser.tab.c" + break; + + case 607: /* statement: attribute_instances loop_statement */ +#line 2763 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_LOOP); + } +#line 10246 "verilog_parser.tab.c" + break; + + case 608: /* statement: attribute_instances par_block */ +#line 2766 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_BLOCK); + } +#line 10254 "verilog_parser.tab.c" + break; + + case 609: /* statement: attribute_instances procedural_continuous_assignments SEMICOLON */ +#line 2769 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_ASSIGNMENT); + } +#line 10262 "verilog_parser.tab.c" + break; + + case 610: /* statement: attribute_instances procedural_timing_control_statement */ +#line 2772 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_TIMING_CONTROL); + } +#line 10270 "verilog_parser.tab.c" + break; + + case 611: /* statement: attribute_instances seq_block */ +#line 2775 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_BLOCK); + } +#line 10278 "verilog_parser.tab.c" + break; + + case 612: /* statement: attribute_instances system_function_call SEMICOLON */ +#line 2778 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_FUNCTION_CALL); + } +#line 10286 "verilog_parser.tab.c" + break; + + case 613: /* statement: attribute_instances system_task_enable */ +#line 2781 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_TASK_ENABLE); + } +#line 10294 "verilog_parser.tab.c" + break; + + case 614: /* statement: attribute_instances wait_statement */ +#line 2784 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_WAIT); + } +#line 10302 "verilog_parser.tab.c" + break; + + case 615: /* statement_or_null: statement */ +#line 2789 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 10308 "verilog_parser.tab.c" + break; + + case 616: /* statement_or_null: attribute_instances SEMICOLON */ +#line 2790 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 10314 "verilog_parser.tab.c" + break; + + case 617: /* statement_or_null: SEMICOLON */ +#line 2791 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 10320 "verilog_parser.tab.c" + break; + + case 618: /* function_statement: attribute_instances function_blocking_assignment SEMICOLON */ +#line 2795 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_ASSIGNMENT); + } +#line 10328 "verilog_parser.tab.c" + break; + + case 619: /* function_statement: attribute_instances function_case_statement */ +#line 2798 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_CASE); + } +#line 10336 "verilog_parser.tab.c" + break; + + case 620: /* function_statement: attribute_instances function_conditional_statement */ +#line 2801 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_CONDITIONAL); + } +#line 10344 "verilog_parser.tab.c" + break; + + case 621: /* function_statement: attribute_instances function_loop_statement */ +#line 2804 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_LOOP); + } +#line 10352 "verilog_parser.tab.c" + break; + + case 622: /* function_statement: attribute_instances function_seq_block */ +#line 2807 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_BLOCK); + } +#line 10360 "verilog_parser.tab.c" + break; + + case 623: /* function_statement: attribute_instances disable_statement */ +#line 2810 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_DISABLE); + } +#line 10368 "verilog_parser.tab.c" + break; + + case 624: /* function_statement: attribute_instances system_function_call SEMICOLON */ +#line 2813 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_FUNCTION_CALL); + } +#line 10376 "verilog_parser.tab.c" + break; + + case 625: /* function_statement: attribute_instances system_task_enable */ +#line 2816 "verilog_parser.y" + { + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_TASK_ENABLE); + } +#line 10384 "verilog_parser.tab.c" + break; + + case 626: /* procedural_timing_control_statement: delay_or_event_control statement_or_null */ +#line 2825 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-1].treenode); + // $$ ->statement = $2; + } +#line 10393 "verilog_parser.tab.c" + break; + + case 627: /* delay_or_event_control: delay_control */ +#line 2832 "verilog_parser.y" + { + /* $$ = ast_new_timing_control_statement_delay( + TIMING_CTRL_DELAY_CONTROL, + NULL, + $1 + );*/ + } +#line 10405 "verilog_parser.tab.c" + break; + + case 628: /* delay_or_event_control: event_control */ +#line 2839 "verilog_parser.y" + { + /* $$ = ast_new_timing_control_statement_event( + TIMING_CTRL_EVENT_CONTROL, + NULL, + NULL, + $1 + );*/ + } +#line 10418 "verilog_parser.tab.c" + break; + + case 629: /* delay_or_event_control: KW_REPEAT OPEN_BRACKET expression CLOSE_BRACKET event_control */ +#line 2847 "verilog_parser.y" + { + /* $$ = ast_new_timing_control_statement_event( + TIMING_CTRL_EVENT_CONTROL_REPEAT, + $3, + NULL, + $5 + );*/ +} +#line 10431 "verilog_parser.tab.c" + break; + + case 630: /* delay_control: HASH delay_value */ +#line 2858 "verilog_parser.y" + { + // $$ = ast_new_delay_ctrl_value($2); + } +#line 10439 "verilog_parser.tab.c" + break; + + case 631: /* delay_control: HASH OPEN_BRACKET mintypmax_expression CLOSE_BRACKET */ +#line 2861 "verilog_parser.y" + { + // $$ = ast_new_delay_ctrl_mintypmax($3); + } +#line 10447 "verilog_parser.tab.c" + break; + + case 632: /* disable_statement: KW_DISABLE hierarchical_task_identifier SEMICOLON */ +#line 2868 "verilog_parser.y" + { + // $$ = ast_new_disable_statement($2); + } +#line 10455 "verilog_parser.tab.c" + break; + + case 633: /* disable_statement: KW_DISABLE hierarchical_block_identifier SEMICOLON */ +#line 2871 "verilog_parser.y" + { + // $$ = ast_new_disable_statement($2); + } +#line 10463 "verilog_parser.tab.c" + break; + + case 634: /* event_control: AT event_identifier */ +#line 2877 "verilog_parser.y" + { + //ast_primary * p = ast_new_primary(PRIMARY_IDENTIFIER); + //p -> value.identifier = $2; + { + //ast_expression * id = ast_new_expression_primary(p); + //ast_event_expression * ct = ast_new_event_expression(EVENT_CTRL_TRIGGERS, id); + // $$ = ast_new_event_control(EVENT_CTRL_TRIGGERS, ct); + } + } +#line 10477 "verilog_parser.tab.c" + break; + + case 635: /* event_control: AT OPEN_BRACKET event_expression CLOSE_BRACKET */ +#line 2886 "verilog_parser.y" + { + // $$ = ast_new_event_control(EVENT_CTRL_TRIGGERS, $3); + } +#line 10485 "verilog_parser.tab.c" + break; + + case 636: /* event_control: AT STAR */ +#line 2889 "verilog_parser.y" + { + // $$ = ast_new_event_control(EVENT_CTRL_ANY, NULL); + } +#line 10493 "verilog_parser.tab.c" + break; + + case 637: /* event_control: AT ATTRIBUTE_START CLOSE_BRACKET */ +#line 2894 "verilog_parser.y" + { + // $$ = ast_new_event_control(EVENT_CTRL_ANY, NULL); + } +#line 10501 "verilog_parser.tab.c" + break; + + case 638: /* event_control: AT OPEN_BRACKET STAR CLOSE_BRACKET */ +#line 2897 "verilog_parser.y" + { + // $$ = ast_new_event_control(EVENT_CTRL_ANY, NULL); + } +#line 10509 "verilog_parser.tab.c" + break; + + case 639: /* event_trigger: MINUS GT hierarchical_event_identifier */ +#line 2903 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 10515 "verilog_parser.tab.c" + break; + + case 640: /* event_expression: expression */ +#line 2907 "verilog_parser.y" + { + // $$ = ast_new_event_expression(EDGE_ANY, $1); +} +#line 10523 "verilog_parser.tab.c" + break; + + case 641: /* event_expression: KW_POSEDGE expression */ +#line 2910 "verilog_parser.y" + { + // $$ = ast_new_event_expression(EDGE_POS, $2); +} +#line 10531 "verilog_parser.tab.c" + break; + + case 642: /* event_expression: KW_NEGEDGE expression */ +#line 2913 "verilog_parser.y" + { + // $$ = ast_new_event_expression(EDGE_NEG, $2); +} +#line 10539 "verilog_parser.tab.c" + break; + + case 643: /* event_expression: event_expression KW_OR event_expression */ +#line 2916 "verilog_parser.y" + { + // $$ = ast_new_event_expression_sequence($1,$3); +} +#line 10547 "verilog_parser.tab.c" + break; + + case 644: /* event_expression: event_expression COMMA event_expression */ +#line 2919 "verilog_parser.y" + { + // $$ = ast_new_event_expression_sequence($1,$3); +} +#line 10555 "verilog_parser.tab.c" + break; + + case 645: /* wait_statement: KW_WAIT OPEN_BRACKET expression CLOSE_BRACKET statement_or_null */ +#line 2925 "verilog_parser.y" + { + // $$ = ast_new_wait_statement($3,$5); + } +#line 10563 "verilog_parser.tab.c" + break; + + case 646: /* conditional_statement: KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null */ +#line 2933 "verilog_parser.y" + { + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first,NULL); + } +#line 10572 "verilog_parser.tab.c" + break; + + case 647: /* conditional_statement: KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null KW_ELSE statement_or_null */ +#line 2938 "verilog_parser.y" + { + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first,$7); + } +#line 10581 "verilog_parser.tab.c" + break; + + case 648: /* conditional_statement: if_else_if_statement */ +#line 2942 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 10587 "verilog_parser.tab.c" + break; + + case 649: /* if_else_if_statement: KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null else_if_statements */ +#line 2947 "verilog_parser.y" + { + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first, NULL); + //ast_extend_if_else($$,$6); + } +#line 10597 "verilog_parser.tab.c" + break; + + case 650: /* if_else_if_statement: KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null else_if_statements KW_ELSE statement_or_null */ +#line 2953 "verilog_parser.y" + { + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first, $8); + //ast_extend_if_else($$,$6); + } +#line 10607 "verilog_parser.tab.c" + break; + + case 651: /* else_if_statements: KW_ELSE KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null */ +#line 2961 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$, ast_new_conditional_statement($6,$4)); + } +#line 10616 "verilog_parser.tab.c" + break; + + case 652: /* else_if_statements: else_if_statements KW_ELSE KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null */ +#line 2966 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-6].list); + //ast_list_append($$,ast_new_conditional_statement($7,$5)); + } +#line 10625 "verilog_parser.tab.c" + break; + + case 653: /* function_conditional_statement: KW_IF OPEN_BRACKET expression CLOSE_BRACKET function_statement_or_null */ +#line 2973 "verilog_parser.y" + { + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first,NULL); + } +#line 10634 "verilog_parser.tab.c" + break; + + case 654: /* function_conditional_statement: KW_IF OPEN_BRACKET expression CLOSE_BRACKET function_statement_or_null KW_ELSE function_statement_or_null */ +#line 2978 "verilog_parser.y" + { + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first,$7); + } +#line 10643 "verilog_parser.tab.c" + break; + + case 655: /* function_conditional_statement: function_if_else_if_statement */ +#line 2982 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + } +#line 10651 "verilog_parser.tab.c" + break; + + case 656: /* function_else_if_statements: KW_ELSE KW_IF OPEN_BRACKET expression CLOSE_BRACKET function_statement_or_null */ +#line 2989 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$, ast_new_conditional_statement($6,$4)); + } +#line 10660 "verilog_parser.tab.c" + break; + + case 657: /* function_else_if_statements: function_else_if_statements KW_ELSE KW_IF OPEN_BRACKET expression CLOSE_BRACKET function_statement_or_null */ +#line 2994 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-6].list); + //ast_list_append($$,ast_new_conditional_statement($7,$5)); + } +#line 10669 "verilog_parser.tab.c" + break; + + case 658: /* function_if_else_if_statement: KW_IF OPEN_BRACKET expression CLOSE_BRACKET function_statement_or_null function_else_if_statements */ +#line 3002 "verilog_parser.y" + { + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first, NULL); + //ast_extend_if_else($$,$6); + } +#line 10679 "verilog_parser.tab.c" + break; + + case 659: /* function_if_else_if_statement: KW_IF OPEN_BRACKET expression CLOSE_BRACKET function_statement_or_null function_else_if_statements KW_ELSE function_statement_or_null */ +#line 3008 "verilog_parser.y" + { + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first, $8); + //ast_extend_if_else($$,$6); + } +#line 10689 "verilog_parser.tab.c" + break; + + case 660: /* case_statement: KW_CASE OPEN_BRACKET expression CLOSE_BRACKET case_items KW_ENDCASE */ +#line 3018 "verilog_parser.y" + { + // $$ = ast_new_case_statement($3, $5, CASE); + } +#line 10697 "verilog_parser.tab.c" + break; + + case 661: /* case_statement: KW_CASEZ OPEN_BRACKET expression CLOSE_BRACKET case_items KW_ENDCASE */ +#line 3021 "verilog_parser.y" + { + // $$ = ast_new_case_statement($3, $5, CASEZ); + } +#line 10705 "verilog_parser.tab.c" + break; + + case 662: /* case_statement: KW_CASEX OPEN_BRACKET expression CLOSE_BRACKET case_items KW_ENDCASE */ +#line 3024 "verilog_parser.y" + { + // $$ = ast_new_case_statement($3, $5, CASEX); + } +#line 10713 "verilog_parser.tab.c" + break; + + case 663: /* case_items: case_item */ +#line 3030 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$, $1); + } +#line 10722 "verilog_parser.tab.c" + break; + + case 664: /* case_items: case_items case_item */ +#line 3034 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$, $2); + } +#line 10731 "verilog_parser.tab.c" + break; + + case 665: /* case_item: expressions COLON statement_or_null */ +#line 3048 "verilog_parser.y" + { + // $$ = ast_new_case_item($1,$3); + } +#line 10739 "verilog_parser.tab.c" + break; + + case 666: /* case_item: KW_DEFAULT statement_or_null */ +#line 3051 "verilog_parser.y" + { + // $$ = ast_new_case_item(NULL,$2); + // $$ ->is_default = AST_TRUE; + } +#line 10748 "verilog_parser.tab.c" + break; + + case 667: /* case_item: KW_DEFAULT COLON statement_or_null */ +#line 3055 "verilog_parser.y" + { + // $$ = ast_new_case_item(NULL,$3); + // $$ ->is_default = AST_TRUE; + } +#line 10757 "verilog_parser.tab.c" + break; + + case 668: /* function_case_statement: KW_CASE OPEN_BRACKET expression CLOSE_BRACKET function_case_items KW_ENDCASE */ +#line 3063 "verilog_parser.y" + { + // $$ = ast_new_case_statement($3, $5, CASE); + // $$ ->is_function = AST_TRUE; + } +#line 10766 "verilog_parser.tab.c" + break; + + case 669: /* function_case_statement: KW_CASEZ OPEN_BRACKET expression CLOSE_BRACKET function_case_items KW_ENDCASE */ +#line 3068 "verilog_parser.y" + { + // $$ = ast_new_case_statement($3, $5, CASEZ); + // $$ ->is_function = AST_TRUE; + } +#line 10775 "verilog_parser.tab.c" + break; + + case 670: /* function_case_statement: KW_CASEX OPEN_BRACKET expression CLOSE_BRACKET function_case_items KW_ENDCASE */ +#line 3073 "verilog_parser.y" + { + // $$ = ast_new_case_statement($3, $5, CASEX); + // $$ ->is_function = AST_TRUE; + } +#line 10784 "verilog_parser.tab.c" + break; + + case 671: /* function_case_items: function_case_item */ +#line 3080 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$, $1); + } +#line 10793 "verilog_parser.tab.c" + break; + + case 672: /* function_case_items: function_case_items function_case_item */ +#line 3084 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$, $2); + } +#line 10802 "verilog_parser.tab.c" + break; + + case 673: /* function_case_item: expressions COLON function_statement_or_null */ +#line 3091 "verilog_parser.y" + { + // $$ = ast_new_case_item($1, $3); + // $$ ->is_default = AST_FALSE; + } +#line 10811 "verilog_parser.tab.c" + break; + + case 674: /* function_case_item: KW_DEFAULT function_statement_or_null */ +#line 3095 "verilog_parser.y" + { + // $$ = ast_new_case_item(NULL, $2); + // $$ ->is_default = AST_TRUE; + } +#line 10820 "verilog_parser.tab.c" + break; + + case 675: /* function_case_item: KW_DEFAULT COLON function_statement_or_null */ +#line 3099 "verilog_parser.y" + { + // $$ = ast_new_case_item(NULL, $3); + // $$ ->is_default = AST_TRUE; + } +#line 10829 "verilog_parser.tab.c" + break; + + case 676: /* function_loop_statement: KW_FOREVER function_statement */ +#line 3108 "verilog_parser.y" + { + // $$ = ast_new_forever_loop_statement($2); + } +#line 10837 "verilog_parser.tab.c" + break; + + case 677: /* function_loop_statement: KW_REPEAT OPEN_BRACKET expression CLOSE_BRACKET function_statement */ +#line 3111 "verilog_parser.y" + { + // $$ = ast_new_repeat_loop_statement($5,$3); + } +#line 10845 "verilog_parser.tab.c" + break; + + case 678: /* function_loop_statement: KW_WHILE OPEN_BRACKET expression CLOSE_BRACKET function_statement */ +#line 3114 "verilog_parser.y" + { + // $$ = ast_new_while_loop_statement($5,$3); + } +#line 10853 "verilog_parser.tab.c" + break; + + case 679: /* function_loop_statement: KW_FOR OPEN_BRACKET variable_assignment SEMICOLON expression SEMICOLON variable_assignment CLOSE_BRACKET function_statement */ +#line 3118 "verilog_parser.y" + { + // $$ = ast_new_for_loop_statement($9, $3, $7,$5); + } +#line 10861 "verilog_parser.tab.c" + break; + + case 680: /* loop_statement: KW_FOREVER statement */ +#line 3124 "verilog_parser.y" + { + // $$ = ast_new_forever_loop_statement($2); + } +#line 10869 "verilog_parser.tab.c" + break; + + case 681: /* loop_statement: KW_REPEAT OPEN_BRACKET expression CLOSE_BRACKET statement */ +#line 3127 "verilog_parser.y" + { + // $$ = ast_new_repeat_loop_statement($5,$3); + } +#line 10877 "verilog_parser.tab.c" + break; + + case 682: /* loop_statement: KW_WHILE OPEN_BRACKET expression CLOSE_BRACKET statement */ +#line 3130 "verilog_parser.y" + { + // $$ = ast_new_while_loop_statement($5,$3); + } +#line 10885 "verilog_parser.tab.c" + break; + + case 683: /* loop_statement: KW_FOR OPEN_BRACKET variable_assignment SEMICOLON expression SEMICOLON variable_assignment CLOSE_BRACKET statement */ +#line 3134 "verilog_parser.y" + { + // $$ = ast_new_for_loop_statement($9, $3, $7,$5); + } +#line 10893 "verilog_parser.tab.c" + break; + + case 684: /* system_task_enable: system_task_identifier OPEN_BRACKET expressions CLOSE_BRACKET SEMICOLON */ +#line 3143 "verilog_parser.y" + { + // $$ = ast_new_task_enable_statement($3,$1,AST_TRUE); + } +#line 10901 "verilog_parser.tab.c" + break; + + case 685: /* system_task_enable: system_task_identifier SEMICOLON */ +#line 3146 "verilog_parser.y" + { + // $$ = ast_new_task_enable_statement(NULL,$1,AST_TRUE); + } +#line 10909 "verilog_parser.tab.c" + break; + + case 686: /* task_enable: hierarchical_task_identifier SEMICOLON */ +#line 3152 "verilog_parser.y" + { + // $$ = ast_new_task_enable_statement(NULL,$1,AST_FALSE); + } +#line 10917 "verilog_parser.tab.c" + break; + + case 687: /* task_enable: hierarchical_task_identifier OPEN_BRACKET expressions CLOSE_BRACKET SEMICOLON */ +#line 3156 "verilog_parser.y" + { + // $$ = ast_new_task_enable_statement($3,$1,AST_FALSE); + } +#line 10925 "verilog_parser.tab.c" + break; + + case 688: /* specify_block: KW_SPECIFY specify_items_o KW_ENDSPECIFY */ +#line 3163 "verilog_parser.y" + {(yyval.list) = (yyvsp[-1].list);} +#line 10931 "verilog_parser.tab.c" + break; + + case 689: /* specify_items_o: specify_items */ +#line 3166 "verilog_parser.y" + {(yyval.list) = (yyvsp[0].list);} +#line 10937 "verilog_parser.tab.c" + break; + + case 690: /* specify_items_o: %empty */ +#line 3167 "verilog_parser.y" + {// $$ = ast_list_new(); + } +#line 10944 "verilog_parser.tab.c" + break; + + case 691: /* specify_items: specify_item */ +#line 3171 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 10953 "verilog_parser.tab.c" + break; + + case 692: /* specify_items: specify_items specify_item */ +#line 3175 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-1].list); + //ast_list_append($$,$2); + } +#line 10962 "verilog_parser.tab.c" + break; + + case 697: /* specify_item: system_timing_check */ +#line 3185 "verilog_parser.y" + {printf("%s:%d: System Timing check not supported\n", __FILE__, __LINE__);} +#line 10968 "verilog_parser.tab.c" + break; + + case 702: /* path_declaration: simple_path_declaration SEMICOLON */ +#line 3198 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 10974 "verilog_parser.tab.c" + break; + + case 703: /* path_declaration: edge_sensitive_path_declaration SEMICOLON */ +#line 3199 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 10980 "verilog_parser.tab.c" + break; + + case 704: /* path_declaration: state_dependent_path_declaration SEMICOLON */ +#line 3200 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[-1].treenode);} +#line 10986 "verilog_parser.tab.c" + break; + + case 705: /* simple_path_declaration: OPEN_BRACKET specify_input_terminal_descriptor polarity_operator_o EQ GT specify_output_terminal_descriptor CLOSE_BRACKET EQ path_delay_value */ +#line 3205 "verilog_parser.y" + { + // $$ = ast_new_path_declaration(SIMPLE_PARALLEL_PATH); + // $$ ->parallel = ast_new_simple_parallel_path_declaration( + // $2,$3,$6,$9 + //); + } +#line 10997 "verilog_parser.tab.c" + break; + + case 706: /* simple_path_declaration: OPEN_BRACKET list_of_path_inputs polarity_operator_o STAR GT list_of_path_outputs CLOSE_BRACKET EQ path_delay_value */ +#line 3212 "verilog_parser.y" + { + // $$ = ast_new_path_declaration(SIMPLE_FULL_PATH); + // $$ ->full = ast_new_simple_full_path_declaration( + // $2,$3,$6,$9 + //); + } +#line 11008 "verilog_parser.tab.c" + break; + + case 707: /* list_of_path_inputs: specify_input_terminal_descriptor */ +#line 3222 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 11017 "verilog_parser.tab.c" + break; + + case 708: /* list_of_path_inputs: list_of_path_inputs COMMA specify_input_terminal_descriptor */ +#line 3226 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 11026 "verilog_parser.tab.c" + break; + + case 709: /* list_of_path_outputs: specify_output_terminal_descriptor */ +#line 3233 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 11035 "verilog_parser.tab.c" + break; + + case 710: /* list_of_path_outputs: list_of_path_outputs COMMA specify_output_terminal_descriptor */ +#line 3237 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 11044 "verilog_parser.tab.c" + break; + + case 711: /* specify_input_terminal_descriptor: input_identifier */ +#line 3246 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 11050 "verilog_parser.tab.c" + break; + + case 712: /* specify_input_terminal_descriptor: input_identifier constant_expression */ +#line 3247 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[-1].treenode);} +#line 11056 "verilog_parser.tab.c" + break; + + case 713: /* specify_input_terminal_descriptor: input_identifier range_expression */ +#line 3248 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[-1].treenode);} +#line 11062 "verilog_parser.tab.c" + break; + + case 714: /* specify_output_terminal_descriptor: output_identifier */ +#line 3252 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 11068 "verilog_parser.tab.c" + break; + + case 715: /* specify_output_terminal_descriptor: output_identifier constant_expression */ +#line 3253 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[-1].treenode);} +#line 11074 "verilog_parser.tab.c" + break; + + case 716: /* specify_output_terminal_descriptor: output_identifier range_expression */ +#line 3254 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[-1].treenode);} +#line 11080 "verilog_parser.tab.c" + break; + + case 717: /* input_identifier: input_port_identifier */ +#line 3257 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 11086 "verilog_parser.tab.c" + break; + + case 718: /* input_identifier: inout_port_identifier */ +#line 3258 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 11092 "verilog_parser.tab.c" + break; + + case 719: /* output_identifier: output_port_identifier */ +#line 3261 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 11098 "verilog_parser.tab.c" + break; + + case 720: /* output_identifier: inout_port_identifier */ +#line 3262 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 11104 "verilog_parser.tab.c" + break; + + case 721: /* path_delay_value: list_of_path_delay_expressions */ +#line 3267 "verilog_parser.y" + {(yyval.list)=(yyvsp[0].list);} +#line 11110 "verilog_parser.tab.c" + break; + + case 722: /* path_delay_value: OPEN_BRACKET list_of_path_delay_expressions CLOSE_BRACKET */ +#line 3269 "verilog_parser.y" + {(yyval.list)=(yyvsp[-1].list);} +#line 11116 "verilog_parser.tab.c" + break; + + case 723: /* list_of_path_delay_expressions: path_delay_expression */ +#line 3273 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 11125 "verilog_parser.tab.c" + break; + + case 724: /* list_of_path_delay_expressions: path_delay_expression COMMA path_delay_expression */ +#line 3278 "verilog_parser.y" + { + // $$ = ast_list_new(); //ast_list_append($$,$1); //ast_list_append($$,$3); + } +#line 11133 "verilog_parser.tab.c" + break; + + case 725: /* list_of_path_delay_expressions: path_delay_expression COMMA path_delay_expression COMMA path_delay_expression */ +#line 3283 "verilog_parser.y" + { + // $$ = ast_list_new(); //ast_list_append($$,$1); //ast_list_append($$,$3); + //ast_list_append($$,$5); + } +#line 11142 "verilog_parser.tab.c" + break; + + case 726: /* list_of_path_delay_expressions: path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression */ +#line 3292 "verilog_parser.y" + { + // $$ = ast_list_new(); //ast_list_append($$,$1); //ast_list_append($$,$3); + //ast_list_append($$,$5); //ast_list_append($$,$7); //ast_list_append($$,$9); + //ast_list_append($$,$11); + } +#line 11152 "verilog_parser.tab.c" + break; + + case 727: /* list_of_path_delay_expressions: path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression COMMA path_delay_expression */ +#line 3308 "verilog_parser.y" + { + // $$ = ast_list_new(); //ast_list_append($$,$1); //ast_list_append($$,$3); + //ast_list_append($$,$5); //ast_list_append($$,$7); //ast_list_append($$,$9); + //ast_list_append($$,$11); //ast_list_append($$,$13); //ast_list_append($$,$15); + //ast_list_append($$,$17); //ast_list_append($$,$19); //ast_list_append($$,$21); + //ast_list_append($$,$23); + + } +#line 11165 "verilog_parser.tab.c" + break; + + case 728: /* path_delay_expression: constant_mintypmax_expression */ +#line 3319 "verilog_parser.y" +{ +(yyval.treenode)=(yyvsp[0].treenode); +} +#line 11173 "verilog_parser.tab.c" + break; + + case 729: /* edge_sensitive_path_declaration: OPEN_BRACKET edge_identifier_o specify_input_terminal_descriptor EQ GT specify_output_terminal_descriptor polarity_operator_o COLON data_source_expression CLOSE_BRACKET EQ path_delay_value */ +#line 3326 "verilog_parser.y" + { + // $$ = ast_new_path_declaration(EDGE_SENSITIVE_PARALLEL_PATH); + // $$ ->es_parallel = + // ast_new_edge_sensitive_parallel_path_declaration($2,$3,$7,$6,$9,$12); + } +#line 11183 "verilog_parser.tab.c" + break; + + case 730: /* edge_sensitive_path_declaration: OPEN_BRACKET edge_identifier_o list_of_path_inputs STAR GT list_of_path_outputs polarity_operator_o COLON data_source_expression CLOSE_BRACKET EQ path_delay_value */ +#line 3333 "verilog_parser.y" + { + // $$ = ast_new_path_declaration(EDGE_SENSITIVE_FULL_PATH); + // $$ ->es_full= + // ast_new_edge_sensitive_full_path_declaration($2,$3,$7,$6,$9,$12); + } +#line 11193 "verilog_parser.tab.c" + break; + + case 731: /* data_source_expression: expression */ +#line 3340 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 11199 "verilog_parser.tab.c" + break; + + case 732: /* edge_identifier_o: edge_identifier */ +#line 3342 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 11205 "verilog_parser.tab.c" + break; + + case 733: /* edge_identifier_o: %empty */ +#line 3343 "verilog_parser.y" + {(yyval.treenode) = EDGE_NONE;} +#line 11211 "verilog_parser.tab.c" + break; + + case 734: /* edge_identifier: KW_POSEDGE */ +#line 3345 "verilog_parser.y" + {(yyval.treenode)=EDGE_POS;} +#line 11217 "verilog_parser.tab.c" + break; + + case 735: /* edge_identifier: KW_NEGEDGE */ +#line 3346 "verilog_parser.y" + {(yyval.treenode)=EDGE_NEG;} +#line 11223 "verilog_parser.tab.c" + break; + + case 736: /* state_dependent_path_declaration: KW_IF OPEN_BRACKET module_path_expression CLOSE_BRACKET simple_path_declaration */ +#line 3351 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + /* + if( $$ ->type == SIMPLE_PARALLEL_PATH) + $$ ->type = STATE_DEPENDENT_PARALLEL_PATH; + else if( $$ ->type == SIMPLE_FULL_PATH) + $$ ->type = STATE_DEPENDENT_FULL_PATH; + else + printf("%s:%d ERROR, invalid path declaration type when state dependent\n", + __FILE__,__LINE__); + */ + } +#line 11240 "verilog_parser.tab.c" + break; + + case 737: /* state_dependent_path_declaration: KW_IF OPEN_BRACKET module_path_expression CLOSE_BRACKET edge_sensitive_path_declaration */ +#line 3364 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + /* + if( $$ ->type == EDGE_SENSITIVE_PARALLEL_PATH) + $$ ->type = STATE_DEPENDENT_EDGE_PARALLEL_PATH; + else if( $$ ->type == EDGE_SENSITIVE_FULL_PATH) + $$ ->type = STATE_DEPENDENT_EDGE_FULL_PATH; + else + printf("%s:%d ERROR, invalid path declaration type when state dependent\n", + __FILE__,__LINE__); + */ + } +#line 11257 "verilog_parser.tab.c" + break; + + case 738: /* state_dependent_path_declaration: KW_IFNONE simple_path_declaration */ +#line 3377 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + } +#line 11265 "verilog_parser.tab.c" + break; + + case 739: /* polarity_operator_o: polarity_operator */ +#line 3382 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 11271 "verilog_parser.tab.c" + break; + + case 740: /* polarity_operator_o: %empty */ +#line 3383 "verilog_parser.y" + {(yyval.treenode)=OPERATOR_NONE;} +#line 11277 "verilog_parser.tab.c" + break; + + case 741: /* polarity_operator: PLUS */ +#line 3386 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 11283 "verilog_parser.tab.c" + break; + + case 742: /* polarity_operator: MINUS */ +#line 3387 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 11289 "verilog_parser.tab.c" + break; + + case 743: /* system_timing_check: %empty */ +#line 3392 "verilog_parser.y" + {printf("%s:%d Not Supported\n",__FILE__,__LINE__);} +#line 11295 "verilog_parser.tab.c" + break; + + case 744: /* concatenation: OPEN_SQ_BRACE expression concatenation_cont */ +#line 3401 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //ast_extend_concatenation($3,NULL,$2); + } +#line 11304 "verilog_parser.tab.c" + break; + + case 745: /* concatenation_cont: CLOSE_SQ_BRACE */ +#line 3408 "verilog_parser.y" + { + // $$ = ast_new_empty_concatenation(CONCATENATION_EXPRESSION); + } +#line 11312 "verilog_parser.tab.c" + break; + + case 746: /* concatenation_cont: COMMA expression concatenation_cont */ +#line 3411 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //ast_extend_concatenation($3,NULL,$2); + } +#line 11321 "verilog_parser.tab.c" + break; + + case 747: /* constant_concatenation: OPEN_SQ_BRACE expression constant_concatenation_cont */ +#line 3418 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //ast_extend_concatenation($3,NULL,$2); + } +#line 11330 "verilog_parser.tab.c" + break; + + case 748: /* constant_concatenation_cont: CLOSE_SQ_BRACE */ +#line 3425 "verilog_parser.y" + { + // $$ = ast_new_empty_concatenation(CONCATENATION_EXPRESSION); + } +#line 11338 "verilog_parser.tab.c" + break; + + case 749: /* constant_concatenation_cont: COMMA expression concatenation_cont */ +#line 3428 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //ast_extend_concatenation($3,NULL,$2); + } +#line 11347 "verilog_parser.tab.c" + break; + + case 750: /* multiple_concatenation: OPEN_SQ_BRACE constant_expression concatenation CLOSE_SQ_BRACE */ +#line 3435 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-1].treenode); + // $$ ->repeat = $2; + } +#line 11356 "verilog_parser.tab.c" + break; + + case 751: /* multiple_concatenation: OPEN_SQ_BRACE constant_expression concatenation_cont */ +#line 3439 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + // $$ ->repeat = $2; + } +#line 11365 "verilog_parser.tab.c" + break; + + case 752: /* constant_multiple_concatenation: OPEN_SQ_BRACE constant_expression constant_concatenation CLOSE_SQ_BRACE */ +#line 3446 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-1].treenode); + // $$ ->repeat = $2; + } +#line 11374 "verilog_parser.tab.c" + break; + + case 753: /* constant_multiple_concatenation: OPEN_SQ_BRACE constant_expression constant_concatenation_cont */ +#line 3450 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + // $$ ->repeat = $2; + } +#line 11383 "verilog_parser.tab.c" + break; + + case 754: /* module_path_concatenation: OPEN_SQ_BRACE module_path_expression modpath_concatenation_cont */ +#line 3457 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //ast_extend_concatenation($3,NULL,$2); + } +#line 11392 "verilog_parser.tab.c" + break; + + case 755: /* modpath_concatenation_cont: CLOSE_SQ_BRACE */ +#line 3464 "verilog_parser.y" + { + // $$ = ast_new_empty_concatenation(CONCATENATION_MODULE_PATH); + } +#line 11400 "verilog_parser.tab.c" + break; + + case 756: /* modpath_concatenation_cont: COMMA module_path_expression modpath_concatenation_cont */ +#line 3467 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //ast_extend_concatenation($3,NULL,$2); + } +#line 11409 "verilog_parser.tab.c" + break; + + case 757: /* module_path_multiple_concatenation: OPEN_SQ_BRACE constant_expression module_path_concatenation CLOSE_SQ_BRACE */ +#line 3474 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-1].treenode); + //$3 -> repeat = $2; + } +#line 11418 "verilog_parser.tab.c" + break; + + case 758: /* net_concatenation: OPEN_SQ_BRACE net_concatenation_value net_concatenation_cont */ +#line 3481 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //ast_extend_concatenation($3,NULL,$2); + } +#line 11427 "verilog_parser.tab.c" + break; + + case 759: /* net_concatenation_cont: CLOSE_SQ_BRACE */ +#line 3488 "verilog_parser.y" + { + // $$ = ast_new_empty_concatenation(CONCATENATION_NET); + } +#line 11435 "verilog_parser.tab.c" + break; + + case 760: /* net_concatenation_cont: COMMA net_concatenation_value net_concatenation_cont */ +#line 3491 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //ast_extend_concatenation($3,NULL,$2); + } +#line 11444 "verilog_parser.tab.c" + break; + + case 761: /* sq_bracket_expressions: OPEN_SQ_BRACKET expression CLOSE_SQ_BRACKET */ +#line 3498 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$2); + } +#line 11453 "verilog_parser.tab.c" + break; + + case 762: /* sq_bracket_expressions: OPEN_SQ_BRACKET range_expression CLOSE_SQ_BRACKET */ +#line 3502 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$2); + } +#line 11462 "verilog_parser.tab.c" + break; + + case 763: /* sq_bracket_expressions: OPEN_SQ_BRACKET expression CLOSE_SQ_BRACKET sq_bracket_expressions */ +#line 3506 "verilog_parser.y" + { + (yyval.list) = (yyvsp[0].list); + //ast_list_preappend($$,$2); + } +#line 11471 "verilog_parser.tab.c" + break; + + case 764: /* net_concatenation_value: hierarchical_net_identifier */ +#line 3513 "verilog_parser.y" + { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +#line 11479 "verilog_parser.tab.c" + break; + + case 765: /* net_concatenation_value: hierarchical_net_identifier sq_bracket_expressions */ +#line 3516 "verilog_parser.y" + { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +#line 11487 "verilog_parser.tab.c" + break; + + case 766: /* net_concatenation_value: hierarchical_net_identifier sq_bracket_expressions range_expression */ +#line 3519 "verilog_parser.y" + { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +#line 11495 "verilog_parser.tab.c" + break; + + case 767: /* net_concatenation_value: hierarchical_net_identifier range_expression */ +#line 3522 "verilog_parser.y" + { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +#line 11503 "verilog_parser.tab.c" + break; + + case 768: /* net_concatenation_value: net_concatenation */ +#line 3525 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + } +#line 11511 "verilog_parser.tab.c" + break; + + case 769: /* variable_concatenation: OPEN_SQ_BRACE variable_concatenation_value variable_concatenation_cont */ +#line 3531 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //ast_extend_concatenation($3,NULL,$2); + } +#line 11520 "verilog_parser.tab.c" + break; + + case 770: /* variable_concatenation_cont: CLOSE_SQ_BRACE */ +#line 3538 "verilog_parser.y" + { + // $$ = ast_new_empty_concatenation(CONCATENATION_VARIABLE); + } +#line 11528 "verilog_parser.tab.c" + break; + + case 771: /* variable_concatenation_cont: COMMA variable_concatenation_value variable_concatenation_cont */ +#line 3541 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + //ast_extend_concatenation($3,NULL,$2); + } +#line 11537 "verilog_parser.tab.c" + break; + + case 772: /* variable_concatenation_value: hierarchical_variable_identifier */ +#line 3548 "verilog_parser.y" + { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +#line 11545 "verilog_parser.tab.c" + break; + + case 773: /* variable_concatenation_value: hierarchical_variable_identifier sq_bracket_expressions */ +#line 3551 "verilog_parser.y" + { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +#line 11553 "verilog_parser.tab.c" + break; + + case 774: /* variable_concatenation_value: hierarchical_variable_identifier sq_bracket_expressions range_expression */ +#line 3554 "verilog_parser.y" + { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +#line 11561 "verilog_parser.tab.c" + break; + + case 775: /* variable_concatenation_value: hierarchical_variable_identifier range_expression */ +#line 3557 "verilog_parser.y" + { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +#line 11569 "verilog_parser.tab.c" + break; + + case 776: /* variable_concatenation_value: variable_concatenation */ +#line 3560 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + } +#line 11577 "verilog_parser.tab.c" + break; + + case 777: /* constant_expressions: constant_expression */ +#line 3569 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 11586 "verilog_parser.tab.c" + break; + + case 778: /* constant_expressions: constant_expressions COMMA constant_expression */ +#line 3573 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 11595 "verilog_parser.tab.c" + break; + + case 779: /* expressions: expression */ +#line 3580 "verilog_parser.y" + { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +#line 11604 "verilog_parser.tab.c" + break; + + case 780: /* expressions: expressions COMMA expression */ +#line 3584 "verilog_parser.y" + { + (yyval.list) = (yyvsp[-2].list); + //ast_list_append($$,$3); + } +#line 11613 "verilog_parser.tab.c" + break; + + case 781: /* constant_function_call: function_identifier attribute_instances OPEN_BRACKET constant_expressions CLOSE_BRACKET */ +#line 3592 "verilog_parser.y" + { + // $$ = ast_new_function_call($1,AST_FALSE,AST_FALSE,$2,$4); + } +#line 11621 "verilog_parser.tab.c" + break; + + case 782: /* constant_function_call_pid: attribute_instances OPEN_BRACKET constant_expressions CLOSE_BRACKET */ +#line 3598 "verilog_parser.y" + { + // $$ = ast_new_function_call(NULL,AST_TRUE,AST_FALSE,$1,$3); + } +#line 11629 "verilog_parser.tab.c" + break; + + case 783: /* function_call: hierarchical_function_identifier attribute_instances OPEN_BRACKET expressions CLOSE_BRACKET */ +#line 3604 "verilog_parser.y" + { + // $$ = ast_new_function_call($1,AST_FALSE,AST_FALSE,$2,$4); + } +#line 11637 "verilog_parser.tab.c" + break; + + case 784: /* system_function_call: system_function_identifier */ +#line 3610 "verilog_parser.y" + { + // $$ = ast_new_function_call($1,AST_FALSE,AST_TRUE,NULL,NULL); + } +#line 11645 "verilog_parser.tab.c" + break; + + case 785: /* system_function_call: system_function_identifier OPEN_BRACKET CLOSE_BRACKET */ +#line 3613 "verilog_parser.y" + { + // $$ = ast_new_function_call($1,AST_FALSE,AST_TRUE,NULL,NULL); + } +#line 11653 "verilog_parser.tab.c" + break; + + case 786: /* system_function_call: system_function_identifier OPEN_BRACKET expressions CLOSE_BRACKET */ +#line 3616 "verilog_parser.y" + { + // $$ = ast_new_function_call($1,AST_FALSE,AST_TRUE,NULL,$3); + } +#line 11661 "verilog_parser.tab.c" + break; + + case 787: /* conditional_expression: expression TERNARY attribute_instances expression COLON expression */ +#line 3625 "verilog_parser.y" + { + // $$ = ast_new_conditional_expression($1,$4,$6,$3); + } +#line 11669 "verilog_parser.tab.c" + break; + + case 788: /* constant_expression: constant_primary */ +#line 3632 "verilog_parser.y" + {// $$ = ast_new_expression_primary($1); + } +#line 11676 "verilog_parser.tab.c" + break; + + case 789: /* constant_expression: unary_operator attribute_instances constant_primary */ +#line 3634 "verilog_parser.y" + { + // $$ = ast_new_unary_expression($3,$1,$2,AST_TRUE); + } +#line 11684 "verilog_parser.tab.c" + break; + + case 790: /* constant_expression: constant_expression PLUS attribute_instances constant_expression */ +#line 3637 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11692 "verilog_parser.tab.c" + break; + + case 791: /* constant_expression: constant_expression MINUS attribute_instances constant_expression */ +#line 3640 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11700 "verilog_parser.tab.c" + break; + + case 792: /* constant_expression: constant_expression STAR attribute_instances constant_expression */ +#line 3643 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11708 "verilog_parser.tab.c" + break; + + case 793: /* constant_expression: constant_expression DIV attribute_instances constant_expression */ +#line 3646 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11716 "verilog_parser.tab.c" + break; + + case 794: /* constant_expression: constant_expression MOD attribute_instances constant_expression */ +#line 3649 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11724 "verilog_parser.tab.c" + break; + + case 795: /* constant_expression: constant_expression L_EQ attribute_instances constant_expression */ +#line 3652 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11732 "verilog_parser.tab.c" + break; + + case 796: /* constant_expression: constant_expression L_NEQ attribute_instances constant_expression */ +#line 3655 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11740 "verilog_parser.tab.c" + break; + + case 797: /* constant_expression: constant_expression C_EQ attribute_instances constant_expression */ +#line 3658 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11748 "verilog_parser.tab.c" + break; + + case 798: /* constant_expression: constant_expression C_NEQ attribute_instances constant_expression */ +#line 3661 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11756 "verilog_parser.tab.c" + break; + + case 799: /* constant_expression: constant_expression L_AND attribute_instances constant_expression */ +#line 3664 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11764 "verilog_parser.tab.c" + break; + + case 800: /* constant_expression: constant_expression L_OR attribute_instances constant_expression */ +#line 3667 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11772 "verilog_parser.tab.c" + break; + + case 801: /* constant_expression: constant_expression POW attribute_instances constant_expression */ +#line 3670 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11780 "verilog_parser.tab.c" + break; + + case 802: /* constant_expression: constant_expression LT attribute_instances constant_expression */ +#line 3673 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11788 "verilog_parser.tab.c" + break; + + case 803: /* constant_expression: constant_expression LTE attribute_instances constant_expression */ +#line 3676 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11796 "verilog_parser.tab.c" + break; + + case 804: /* constant_expression: constant_expression GT attribute_instances constant_expression */ +#line 3679 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11804 "verilog_parser.tab.c" + break; + + case 805: /* constant_expression: constant_expression GTE attribute_instances constant_expression */ +#line 3682 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11812 "verilog_parser.tab.c" + break; + + case 806: /* constant_expression: constant_expression B_AND attribute_instances constant_expression */ +#line 3685 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11820 "verilog_parser.tab.c" + break; + + case 807: /* constant_expression: constant_expression B_OR attribute_instances constant_expression */ +#line 3688 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11828 "verilog_parser.tab.c" + break; + + case 808: /* constant_expression: constant_expression B_XOR attribute_instances constant_expression */ +#line 3691 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11836 "verilog_parser.tab.c" + break; + + case 809: /* constant_expression: constant_expression B_EQU attribute_instances constant_expression */ +#line 3694 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11844 "verilog_parser.tab.c" + break; + + case 810: /* constant_expression: constant_expression LSR attribute_instances constant_expression */ +#line 3697 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11852 "verilog_parser.tab.c" + break; + + case 811: /* constant_expression: constant_expression LSL attribute_instances constant_expression */ +#line 3700 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11860 "verilog_parser.tab.c" + break; + + case 812: /* constant_expression: constant_expression ASR attribute_instances constant_expression */ +#line 3703 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11868 "verilog_parser.tab.c" + break; + + case 813: /* constant_expression: constant_expression ASL attribute_instances constant_expression */ +#line 3706 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +#line 11876 "verilog_parser.tab.c" + break; + + case 814: /* constant_expression: constant_expression TERNARY attribute_instances constant_expression COLON constant_expression */ +#line 3710 "verilog_parser.y" + { + // $$ = ast_new_conditional_expression($1,$4,$6,$3); + } +#line 11884 "verilog_parser.tab.c" + break; + + case 815: /* constant_expression: string */ +#line 3713 "verilog_parser.y" + { // $$ = ast_new_string_expression($1); +} +#line 11891 "verilog_parser.tab.c" + break; + + case 816: /* constant_mintypmax_expression: constant_expression */ +#line 3718 "verilog_parser.y" + { + // $$ = ast_new_mintypmax_expression(NULL,$1,NULL); + } +#line 11899 "verilog_parser.tab.c" + break; + + case 817: /* constant_mintypmax_expression: constant_expression COLON constant_expression COLON constant_expression */ +#line 3721 "verilog_parser.y" + { + // $$ = ast_new_mintypmax_expression($1,$3,$5); + } +#line 11907 "verilog_parser.tab.c" + break; + + case 818: /* constant_range_expression: constant_expression */ +#line 3727 "verilog_parser.y" + { + // $$ = ast_new_index_expression($1); + } +#line 11915 "verilog_parser.tab.c" + break; + + case 819: /* constant_range_expression: constant_expression COLON constant_expression */ +#line 3731 "verilog_parser.y" + { + // $$ = ast_new_range_expression($1,$3); + } +#line 11923 "verilog_parser.tab.c" + break; + + case 820: /* constant_range_expression: constant_expression IDX_PRT_SEL constant_expression */ +#line 3734 "verilog_parser.y" + { + // $$ = ast_new_range_expression($1,$3); + } +#line 11931 "verilog_parser.tab.c" + break; + + case 821: /* expression: primary */ +#line 3740 "verilog_parser.y" + { + // $$ = ast_new_expression_primary($1); + } +#line 11939 "verilog_parser.tab.c" + break; + + case 822: /* expression: unary_operator attribute_instances primary */ +#line 3743 "verilog_parser.y" + { + // $$ = ast_new_unary_expression($3,$1,$2, AST_FALSE); + } +#line 11947 "verilog_parser.tab.c" + break; + + case 823: /* expression: expression PLUS attribute_instances expression */ +#line 3746 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 11955 "verilog_parser.tab.c" + break; + + case 824: /* expression: expression MINUS attribute_instances expression */ +#line 3749 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 11963 "verilog_parser.tab.c" + break; + + case 825: /* expression: expression STAR attribute_instances expression */ +#line 3752 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 11971 "verilog_parser.tab.c" + break; + + case 826: /* expression: expression DIV attribute_instances expression */ +#line 3755 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 11979 "verilog_parser.tab.c" + break; + + case 827: /* expression: expression MOD attribute_instances expression */ +#line 3758 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 11987 "verilog_parser.tab.c" + break; + + case 828: /* expression: expression L_EQ attribute_instances expression */ +#line 3761 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 11995 "verilog_parser.tab.c" + break; + + case 829: /* expression: expression L_NEQ attribute_instances expression */ +#line 3764 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12003 "verilog_parser.tab.c" + break; + + case 830: /* expression: expression C_EQ attribute_instances expression */ +#line 3767 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12011 "verilog_parser.tab.c" + break; + + case 831: /* expression: expression C_NEQ attribute_instances expression */ +#line 3770 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12019 "verilog_parser.tab.c" + break; + + case 832: /* expression: expression L_AND attribute_instances expression */ +#line 3773 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12027 "verilog_parser.tab.c" + break; + + case 833: /* expression: expression L_OR attribute_instances expression */ +#line 3776 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12035 "verilog_parser.tab.c" + break; + + case 834: /* expression: expression POW attribute_instances expression */ +#line 3779 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12043 "verilog_parser.tab.c" + break; + + case 835: /* expression: expression LT attribute_instances expression */ +#line 3782 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12051 "verilog_parser.tab.c" + break; + + case 836: /* expression: expression LTE attribute_instances expression */ +#line 3785 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12059 "verilog_parser.tab.c" + break; + + case 837: /* expression: expression GT attribute_instances expression */ +#line 3788 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12067 "verilog_parser.tab.c" + break; + + case 838: /* expression: expression GTE attribute_instances expression */ +#line 3791 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12075 "verilog_parser.tab.c" + break; + + case 839: /* expression: expression B_AND attribute_instances expression */ +#line 3794 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12083 "verilog_parser.tab.c" + break; + + case 840: /* expression: expression B_OR attribute_instances expression */ +#line 3797 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12091 "verilog_parser.tab.c" + break; + + case 841: /* expression: expression B_XOR attribute_instances expression */ +#line 3800 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12099 "verilog_parser.tab.c" + break; + + case 842: /* expression: expression B_NOR attribute_instances expression */ +#line 3803 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12107 "verilog_parser.tab.c" + break; + + case 843: /* expression: expression B_NAND attribute_instances expression */ +#line 3806 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12115 "verilog_parser.tab.c" + break; + + case 844: /* expression: expression B_EQU attribute_instances expression */ +#line 3809 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12123 "verilog_parser.tab.c" + break; + + case 845: /* expression: expression LSR attribute_instances expression */ +#line 3812 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12131 "verilog_parser.tab.c" + break; + + case 846: /* expression: expression LSL attribute_instances expression */ +#line 3815 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12139 "verilog_parser.tab.c" + break; + + case 847: /* expression: expression ASR attribute_instances expression */ +#line 3818 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12147 "verilog_parser.tab.c" + break; + + case 848: /* expression: expression ASL attribute_instances expression */ +#line 3821 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +#line 12155 "verilog_parser.tab.c" + break; + + case 849: /* expression: conditional_expression */ +#line 3824 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 12161 "verilog_parser.tab.c" + break; + + case 850: /* expression: string */ +#line 3825 "verilog_parser.y" + {// $$ = ast_new_string_expression($1); +} +#line 12168 "verilog_parser.tab.c" + break; + + case 851: /* mintypmax_expression: expression */ +#line 3830 "verilog_parser.y" + { + // $$ = ast_new_mintypmax_expression(NULL,$1,NULL); + } +#line 12176 "verilog_parser.tab.c" + break; + + case 852: /* mintypmax_expression: expression COLON expression COLON expression */ +#line 3833 "verilog_parser.y" + { + // $$ = ast_new_mintypmax_expression($1,$3,$5); + } +#line 12184 "verilog_parser.tab.c" + break; + + case 853: /* module_path_conditional_expression: module_path_expression TERNARY attribute_instances module_path_expression COLON module_path_expression */ +#line 3840 "verilog_parser.y" + { + // $$ = ast_new_conditional_expression($1, $4, $6, $3); + // $$ ->type = MODULE_PATH_CONDITIONAL_EXPRESSION; + } +#line 12193 "verilog_parser.tab.c" + break; + + case 854: /* module_path_expression: module_path_primary */ +#line 3847 "verilog_parser.y" + { + // $$ = ast_new_expression_primary($1); + // $$ ->type = MODULE_PATH_PRIMARY_EXPRESSION; + } +#line 12202 "verilog_parser.tab.c" + break; + + case 855: /* module_path_expression: unary_module_path_operator attribute_instances module_path_primary */ +#line 3851 "verilog_parser.y" + { + // $$ = ast_new_unary_expression($3,$1,$2,AST_FALSE); + // $$ ->type = MODULE_PATH_UNARY_EXPRESSION; +} +#line 12211 "verilog_parser.tab.c" + break; + + case 856: /* module_path_expression: module_path_expression binary_module_path_operator attribute_instances module_path_expression */ +#line 3856 "verilog_parser.y" + { + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + // $$ ->type = MODULE_PATH_BINARY_EXPRESSION; + } +#line 12220 "verilog_parser.tab.c" + break; + + case 857: /* module_path_expression: module_path_conditional_expression */ +#line 3860 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); +} +#line 12228 "verilog_parser.tab.c" + break; + + case 858: /* module_path_mintypemax_expression: module_path_expression */ +#line 3866 "verilog_parser.y" + { + // $$ = ast_new_mintypmax_expression(NULL,$1,NULL); + // $$ ->type = MODULE_PATH_MINTYPMAX_EXPRESSION; + } +#line 12237 "verilog_parser.tab.c" + break; + + case 859: /* module_path_mintypemax_expression: module_path_expression COLON module_path_expression COLON module_path_expression */ +#line 3871 "verilog_parser.y" + { + // $$ = ast_new_mintypmax_expression($1,$3,$5); + // $$ ->type = MODULE_PATH_MINTYPMAX_EXPRESSION; + } +#line 12246 "verilog_parser.tab.c" + break; + + case 860: /* range_expression: expression */ +#line 3879 "verilog_parser.y" + { + // $$ = ast_new_index_expression($1); + } +#line 12254 "verilog_parser.tab.c" + break; + + case 861: /* range_expression: expression COLON constant_expression */ +#line 3882 "verilog_parser.y" + { + // $$ = ast_new_range_expression($1,$3); + } +#line 12262 "verilog_parser.tab.c" + break; + + case 862: /* range_expression: expression IDX_PRT_SEL constant_expression */ +#line 3886 "verilog_parser.y" + { + // $$ = ast_new_range_expression($1,$3); + } +#line 12270 "verilog_parser.tab.c" + break; + + case 863: /* constant_primary: constant_concatenation */ +#line 3895 "verilog_parser.y" + { + // $$ = ast_new_constant_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; +} +#line 12279 "verilog_parser.tab.c" + break; + + case 864: /* constant_primary: constant_function_call */ +#line 3899 "verilog_parser.y" + { + // $$ = ast_new_primary_function_call($1); +} +#line 12287 "verilog_parser.tab.c" + break; + + case 865: /* constant_primary: OPEN_BRACKET constant_mintypmax_expression CLOSE_BRACKET */ +#line 3902 "verilog_parser.y" + { + // $$ = ast_new_constant_primary(PRIMARY_MINMAX_EXP); + // $$ ->value.minmax = $2; +} +#line 12296 "verilog_parser.tab.c" + break; + + case 866: /* constant_primary: constant_multiple_concatenation */ +#line 3906 "verilog_parser.y" + { + // $$ = ast_new_constant_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; +} +#line 12305 "verilog_parser.tab.c" + break; + + case 867: /* constant_primary: genvar_identifier */ +#line 3910 "verilog_parser.y" + { + // $$ = ast_new_constant_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; +} +#line 12314 "verilog_parser.tab.c" + break; + + case 868: /* constant_primary: number */ +#line 3914 "verilog_parser.y" + { + // $$ = ast_new_constant_primary(PRIMARY_NUMBER); + // $$ ->value.number = $1; +} +#line 12323 "verilog_parser.tab.c" + break; + + case 869: /* constant_primary: parameter_identifier */ +#line 3918 "verilog_parser.y" + { + // $$ = ast_new_constant_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; +} +#line 12332 "verilog_parser.tab.c" + break; + + case 870: /* constant_primary: specparam_identifier */ +#line 3922 "verilog_parser.y" + { + // $$ = ast_new_constant_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; +} +#line 12341 "verilog_parser.tab.c" + break; + + case 871: /* constant_primary: text_macro_usage */ +#line 3926 "verilog_parser.y" + { + // $$ = ast_new_constant_primary(PRIMARY_MACRO_USAGE); + // $$ ->value.identifier = $1; +} +#line 12350 "verilog_parser.tab.c" + break; + + case 872: /* primary: number */ +#line 3933 "verilog_parser.y" + { + // $$ = ast_new_primary(PRIMARY_NUMBER); + // $$ ->value.number = $1; + } +#line 12359 "verilog_parser.tab.c" + break; + + case 873: /* primary: function_call */ +#line 3937 "verilog_parser.y" + { + // $$ = ast_new_primary_function_call($1); + } +#line 12367 "verilog_parser.tab.c" + break; + + case 874: /* primary: hierarchical_identifier constant_function_call_pid */ +#line 3940 "verilog_parser.y" + { + //$2 -> function= $1; + // $$ = ast_new_primary_function_call($2); + } +#line 12376 "verilog_parser.tab.c" + break; + + case 875: /* primary: SIMPLE_ID constant_function_call_pid */ +#line 3944 "verilog_parser.y" + { // Weird quick, but it works. + //$2 -> function= $1; + // $$ = ast_new_primary_function_call($2); + } +#line 12385 "verilog_parser.tab.c" + break; + + case 876: /* primary: system_function_call */ +#line 3948 "verilog_parser.y" + { + // $$ = ast_new_primary_function_call($1); + } +#line 12393 "verilog_parser.tab.c" + break; + + case 877: /* primary: hierarchical_identifier sq_bracket_expressions */ +#line 3951 "verilog_parser.y" + { + // $$ = ast_new_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; + } +#line 12402 "verilog_parser.tab.c" + break; + + case 878: /* primary: hierarchical_identifier sq_bracket_expressions OPEN_SQ_BRACKET range_expression CLOSE_SQ_BRACKET */ +#line 3956 "verilog_parser.y" + { + // $$ = ast_new_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; + } +#line 12411 "verilog_parser.tab.c" + break; + + case 879: /* primary: concatenation */ +#line 3960 "verilog_parser.y" + { + // $$ = ast_new_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; + } +#line 12420 "verilog_parser.tab.c" + break; + + case 880: /* primary: multiple_concatenation */ +#line 3964 "verilog_parser.y" + { + // $$ = ast_new_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; + } +#line 12429 "verilog_parser.tab.c" + break; + + case 881: /* primary: hierarchical_identifier */ +#line 3968 "verilog_parser.y" + { + // $$ = ast_new_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; + } +#line 12438 "verilog_parser.tab.c" + break; + + case 882: /* primary: OPEN_BRACKET mintypmax_expression CLOSE_BRACKET */ +#line 3972 "verilog_parser.y" + { + // $$ = ast_new_primary(PRIMARY_MINMAX_EXP); + // $$ ->value.minmax = $2; + } +#line 12447 "verilog_parser.tab.c" + break; + + case 883: /* primary: text_macro_usage */ +#line 3976 "verilog_parser.y" + { + // $$ = ast_new_primary(PRIMARY_MACRO_USAGE); + // $$ ->value.macro = $1; + } +#line 12456 "verilog_parser.tab.c" + break; + + case 884: /* module_path_primary: number */ +#line 3983 "verilog_parser.y" + { + // $$ = ast_new_module_path_primary(PRIMARY_NUMBER); + // $$ ->value.number = $1; + } +#line 12465 "verilog_parser.tab.c" + break; + + case 885: /* module_path_primary: identifier */ +#line 3988 "verilog_parser.y" + { + // $$ = ast_new_module_path_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier= $1; + } +#line 12474 "verilog_parser.tab.c" + break; + + case 886: /* module_path_primary: module_path_concatenation */ +#line 3993 "verilog_parser.y" + { + // $$ = ast_new_module_path_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; + } +#line 12483 "verilog_parser.tab.c" + break; + + case 887: /* module_path_primary: module_path_multiple_concatenation */ +#line 3998 "verilog_parser.y" + { + // $$ = ast_new_module_path_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; + } +#line 12492 "verilog_parser.tab.c" + break; + + case 888: /* module_path_primary: function_call */ +#line 4003 "verilog_parser.y" + { + // $$ = ast_new_primary_function_call($1); + } +#line 12500 "verilog_parser.tab.c" + break; + + case 889: /* module_path_primary: system_function_call */ +#line 4006 "verilog_parser.y" + { + // $$ = ast_new_primary_function_call($1); + } +#line 12508 "verilog_parser.tab.c" + break; + + case 890: /* module_path_primary: constant_function_call */ +#line 4009 "verilog_parser.y" + { + // $$ = ast_new_primary_function_call($1); + } +#line 12516 "verilog_parser.tab.c" + break; + + case 891: /* module_path_primary: OPEN_BRACKET module_path_mintypemax_expression CLOSE_BRACKET */ +#line 4012 "verilog_parser.y" + { + // $$ = ast_new_module_path_primary(PRIMARY_MINMAX_EXP); + // $$ ->value.minmax = $2; + } +#line 12525 "verilog_parser.tab.c" + break; + + case 892: /* module_path_primary: text_macro_usage */ +#line 4016 "verilog_parser.y" + { + // $$ = ast_new_module_path_primary(PRIMARY_MACRO_USAGE); + // $$ ->value.macro = $1; + } +#line 12534 "verilog_parser.tab.c" + break; + + case 895: /* net_lvalue: hierarchical_net_identifier */ +#line 4031 "verilog_parser.y" + { + // $$ = ast_new_lvalue_id(NET_IDENTIFIER, $1); + } +#line 12542 "verilog_parser.tab.c" + break; + + case 896: /* net_lvalue: hierarchical_net_identifier sq_bracket_constant_expressions */ +#line 4034 "verilog_parser.y" + { + // $$ = ast_new_lvalue_id(NET_IDENTIFIER, $1); + } +#line 12550 "verilog_parser.tab.c" + break; + + case 897: /* net_lvalue: hierarchical_net_identifier sq_bracket_constant_expressions OPEN_SQ_BRACKET constant_range_expression CLOSE_SQ_BRACKET */ +#line 4038 "verilog_parser.y" + { + // $$ = ast_new_lvalue_id(NET_IDENTIFIER, $1); + } +#line 12558 "verilog_parser.tab.c" + break; + + case 898: /* net_lvalue: hierarchical_net_identifier OPEN_SQ_BRACKET constant_range_expression CLOSE_SQ_BRACKET */ +#line 4042 "verilog_parser.y" + { + // $$ = ast_new_lvalue_id(NET_IDENTIFIER, $1); + } +#line 12566 "verilog_parser.tab.c" + break; + + case 899: /* net_lvalue: net_concatenation */ +#line 4045 "verilog_parser.y" + { + // $$ = ast_new_lvalue_concat(NET_CONCATENATION, $1); + } +#line 12574 "verilog_parser.tab.c" + break; + + case 900: /* variable_lvalue: hierarchical_variable_identifier */ +#line 4051 "verilog_parser.y" + { + // $$ = ast_new_lvalue_id(VAR_IDENTIFIER, $1); + } +#line 12582 "verilog_parser.tab.c" + break; + + case 901: /* variable_lvalue: hierarchical_variable_identifier sq_bracket_constant_expressions */ +#line 4054 "verilog_parser.y" + { + // $$ = ast_new_lvalue_id(VAR_IDENTIFIER, $1); + } +#line 12590 "verilog_parser.tab.c" + break; + + case 902: /* variable_lvalue: hierarchical_variable_identifier sq_bracket_constant_expressions OPEN_SQ_BRACKET constant_range_expression CLOSE_SQ_BRACKET */ +#line 4058 "verilog_parser.y" + { + // $$ = ast_new_lvalue_id(VAR_IDENTIFIER, $1); + } +#line 12598 "verilog_parser.tab.c" + break; + + case 903: /* variable_lvalue: hierarchical_variable_identifier OPEN_SQ_BRACKET constant_range_expression CLOSE_SQ_BRACKET */ +#line 4062 "verilog_parser.y" + { + // $$ = ast_new_lvalue_id(VAR_IDENTIFIER, $1); + } +#line 12606 "verilog_parser.tab.c" + break; + + case 904: /* variable_lvalue: variable_concatenation */ +#line 4065 "verilog_parser.y" + { + // $$ = ast_new_lvalue_concat(VAR_CONCATENATION, $1); + } +#line 12614 "verilog_parser.tab.c" + break; + + case 905: /* unary_operator: PLUS */ +#line 4073 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].operator);} +#line 12620 "verilog_parser.tab.c" + break; + + case 906: /* unary_operator: MINUS */ +#line 4074 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].operator);} +#line 12626 "verilog_parser.tab.c" + break; + + case 907: /* unary_operator: L_NEG */ +#line 4075 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].operator);} +#line 12632 "verilog_parser.tab.c" + break; + + case 908: /* unary_operator: B_NEG */ +#line 4076 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].operator);} +#line 12638 "verilog_parser.tab.c" + break; + + case 909: /* unary_operator: B_AND */ +#line 4077 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].operator);} +#line 12644 "verilog_parser.tab.c" + break; + + case 910: /* unary_operator: B_NAND */ +#line 4078 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].operator);} +#line 12650 "verilog_parser.tab.c" + break; + + case 911: /* unary_operator: B_OR */ +#line 4079 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].operator);} +#line 12656 "verilog_parser.tab.c" + break; + + case 912: /* unary_operator: B_NOR */ +#line 4080 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].operator);} +#line 12662 "verilog_parser.tab.c" + break; + + case 913: /* unary_operator: B_XOR */ +#line 4081 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].operator);} +#line 12668 "verilog_parser.tab.c" + break; + + case 914: /* unary_operator: B_EQU */ +#line 4082 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].operator);} +#line 12674 "verilog_parser.tab.c" + break; + + case 915: /* unary_module_path_operator: L_NEG */ +#line 4086 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12680 "verilog_parser.tab.c" + break; + + case 916: /* unary_module_path_operator: B_NEG */ +#line 4087 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12686 "verilog_parser.tab.c" + break; + + case 917: /* unary_module_path_operator: B_AND */ +#line 4088 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12692 "verilog_parser.tab.c" + break; + + case 918: /* unary_module_path_operator: B_NAND */ +#line 4089 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12698 "verilog_parser.tab.c" + break; + + case 919: /* unary_module_path_operator: B_OR */ +#line 4090 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12704 "verilog_parser.tab.c" + break; + + case 920: /* unary_module_path_operator: B_NOR */ +#line 4091 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12710 "verilog_parser.tab.c" + break; + + case 921: /* unary_module_path_operator: B_XOR */ +#line 4092 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12716 "verilog_parser.tab.c" + break; + + case 922: /* unary_module_path_operator: B_EQU */ +#line 4093 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12722 "verilog_parser.tab.c" + break; + + case 923: /* binary_module_path_operator: L_EQ */ +#line 4096 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12728 "verilog_parser.tab.c" + break; + + case 924: /* binary_module_path_operator: L_NEQ */ +#line 4097 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12734 "verilog_parser.tab.c" + break; + + case 925: /* binary_module_path_operator: L_AND */ +#line 4098 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12740 "verilog_parser.tab.c" + break; + + case 926: /* binary_module_path_operator: L_OR */ +#line 4099 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12746 "verilog_parser.tab.c" + break; + + case 927: /* binary_module_path_operator: B_AND */ +#line 4100 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12752 "verilog_parser.tab.c" + break; + + case 928: /* binary_module_path_operator: B_OR */ +#line 4101 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12758 "verilog_parser.tab.c" + break; + + case 929: /* binary_module_path_operator: B_XOR */ +#line 4102 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12764 "verilog_parser.tab.c" + break; + + case 930: /* binary_module_path_operator: B_EQU */ +#line 4103 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].operator);} +#line 12770 "verilog_parser.tab.c" + break; + + case 931: /* unsigned_number: UNSIGNED_NUMBER */ +#line 4109 "verilog_parser.y" + { + // $$ = ast_new_number(BASE_DECIMAL, REP_BITS, $1); + } +#line 12778 "verilog_parser.tab.c" + break; + + case 932: /* number: NUM_REAL */ +#line 4115 "verilog_parser.y" + { + // $$ = ast_new_number(BASE_DECIMAL,REP_BITS,$1); + } +#line 12786 "verilog_parser.tab.c" + break; + + case 933: /* number: BIN_BASE BIN_VALUE */ +#line 4118 "verilog_parser.y" + { + // $$ = ast_new_number(BASE_BINARY, REP_BITS, $2); +} +#line 12794 "verilog_parser.tab.c" + break; + + case 934: /* number: HEX_BASE HEX_VALUE */ +#line 4121 "verilog_parser.y" + { + // $$ = ast_new_number(BASE_HEX, REP_BITS, $2); +} +#line 12802 "verilog_parser.tab.c" + break; + + case 935: /* number: DEC_BASE DEC_VALUE */ +#line 4124 "verilog_parser.y" + { + // $$ = ast_new_number(BASE_DECIMAL, REP_BITS, $2); +} +#line 12810 "verilog_parser.tab.c" + break; + + case 936: /* number: OCT_BASE OCT_VALUE */ +#line 4127 "verilog_parser.y" + { + // $$ = ast_new_number(BASE_OCTAL, REP_BITS, $2); +} +#line 12818 "verilog_parser.tab.c" + break; + + case 937: /* number: UNSIGNED_NUMBER BIN_BASE BIN_VALUE */ +#line 4130 "verilog_parser.y" + { + // $$ = ast_new_number(BASE_BINARY, REP_BITS, $3); +} +#line 12826 "verilog_parser.tab.c" + break; + + case 938: /* number: UNSIGNED_NUMBER HEX_BASE HEX_VALUE */ +#line 4133 "verilog_parser.y" + { + // $$ = ast_new_number(BASE_HEX, REP_BITS, $3); +} +#line 12834 "verilog_parser.tab.c" + break; + + case 939: /* number: UNSIGNED_NUMBER OCT_BASE OCT_VALUE */ +#line 4136 "verilog_parser.y" + { + // $$ = ast_new_number(BASE_OCTAL, REP_BITS, $3); +} +#line 12842 "verilog_parser.tab.c" + break; + + case 940: /* number: UNSIGNED_NUMBER DEC_BASE DEC_VALUE */ +#line 4139 "verilog_parser.y" + { + // $$ = ast_new_number(BASE_DECIMAL, REP_BITS, $3); +} +#line 12850 "verilog_parser.tab.c" + break; + + case 941: /* number: unsigned_number */ +#line 4142 "verilog_parser.y" + {(yyval.treenode) = (yyvsp[0].treenode);} +#line 12856 "verilog_parser.tab.c" + break; + + case 943: /* attribute_instances: %empty */ +#line 4152 "verilog_parser.y" + {(yyval.treenode)=NULL;} +#line 12862 "verilog_parser.tab.c" + break; + + case 944: /* attribute_instances: list_of_attribute_instances */ +#line 4153 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 12868 "verilog_parser.tab.c" + break; + + case 945: /* list_of_attribute_instances: ATTRIBUTE_START attr_specs ATTRIBUTE_END */ +#line 4157 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-1].treenode); + } +#line 12876 "verilog_parser.tab.c" + break; + + case 946: /* list_of_attribute_instances: attribute_instances ATTRIBUTE_START attr_specs ATTRIBUTE_END */ +#line 4160 "verilog_parser.y" + { + if((yyvsp[-3].treenode) != NULL){ + //ast_append_attribute($1, $3); + (yyval.treenode) = (yyvsp[-3].treenode); + } else { + (yyval.treenode) = (yyvsp[-1].treenode); + } + } +#line 12889 "verilog_parser.tab.c" + break; + + case 947: /* attr_specs: %empty */ +#line 4170 "verilog_parser.y" + {(yyval.treenode) = NULL;} +#line 12895 "verilog_parser.tab.c" + break; + + case 948: /* attr_specs: attr_spec */ +#line 4171 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + } +#line 12903 "verilog_parser.tab.c" + break; + + case 949: /* attr_specs: attr_specs COMMA attr_spec */ +#line 4174 "verilog_parser.y" + { + // Append the new item to the existing list and return. + // ast_append_attribute($1,$3); + (yyval.treenode) = (yyvsp[-2].treenode); + } +#line 12913 "verilog_parser.tab.c" + break; + + case 950: /* attr_spec: attr_name EQ constant_expression */ +#line 4182 "verilog_parser.y" + {// $$ = ast_new_attributes($1,$3); + } +#line 12920 "verilog_parser.tab.c" + break; + + case 951: /* attr_spec: attr_name */ +#line 4185 "verilog_parser.y" + {// $$ = ast_new_attributes($1, NULL); + } +#line 12927 "verilog_parser.tab.c" + break; + + case 952: /* attr_name: identifier */ +#line 4189 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 12933 "verilog_parser.tab.c" + break; + + case 953: /* escaped_arrayed_identifier: escaped_identifier range_o */ +#line 4203 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-1].treenode); + if((yyvsp[0].treenode) != NULL){ + //ast_identifier_set_range($$,$2); + } +} +#line 12944 "verilog_parser.tab.c" + break; + + case 954: /* escaped_hierarchical_identifier: escaped_hierarchical_branch escaped_hierarchical_identifiers */ +#line 4211 "verilog_parser.y" + { + // $$ = ast_append_identifier($1,$2); +} +#line 12952 "verilog_parser.tab.c" + break; + + case 955: /* escaped_hierarchical_identifier: escaped_hierarchical_branch */ +#line 4214 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); +} +#line 12960 "verilog_parser.tab.c" + break; + + case 956: /* escaped_hierarchical_identifiers: DOT simple_hierarchical_identifier */ +#line 4220 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 12966 "verilog_parser.tab.c" + break; + + case 957: /* escaped_hierarchical_identifiers: DOT escaped_hierarchical_identifier */ +#line 4221 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 12972 "verilog_parser.tab.c" + break; + + case 958: /* escaped_hierarchical_identifiers: escaped_hierarchical_identifiers DOT simple_hierarchical_identifier */ +#line 4222 "verilog_parser.y" + { + //$$=ast_append_identifier($1,$3); + } +#line 12980 "verilog_parser.tab.c" + break; + + case 959: /* escaped_hierarchical_identifiers: escaped_hierarchical_identifier DOT escaped_hierarchical_identifiers */ +#line 4225 "verilog_parser.y" + { + //$$=ast_append_identifier($1,$3); + } +#line 12988 "verilog_parser.tab.c" + break; + + case 960: /* arrayed_identifier: simple_arrayed_identifier */ +#line 4235 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 12994 "verilog_parser.tab.c" + break; + + case 961: /* arrayed_identifier: escaped_arrayed_identifier */ +#line 4236 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 13000 "verilog_parser.tab.c" + break; + + case 962: /* hierarchical_identifier: simple_hierarchical_identifier */ +#line 4240 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 13006 "verilog_parser.tab.c" + break; + + case 963: /* hierarchical_identifier: escaped_hierarchical_identifier */ +#line 4241 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 13012 "verilog_parser.tab.c" + break; + + case 964: /* hierarchical_net_identifier: hierarchical_identifier */ +#line 4245 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_HIERARCHICAL_NET; + } +#line 13019 "verilog_parser.tab.c" + break; + + case 965: /* hierarchical_variable_identifier: hierarchical_identifier */ +#line 4248 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_HIERARCHICAL_VARIABLE; + } +#line 13026 "verilog_parser.tab.c" + break; + + case 966: /* hierarchical_task_identifier: hierarchical_identifier */ +#line 4251 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_HIERARCHICAL_TASK; + } +#line 13033 "verilog_parser.tab.c" + break; + + case 967: /* hierarchical_block_identifier: hierarchical_identifier */ +#line 4254 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_HIERARCHICAL_BLOCK; + } +#line 13040 "verilog_parser.tab.c" + break; + + case 968: /* hierarchical_event_identifier: hierarchical_identifier */ +#line 4257 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_HIERARCHICAL_EVENT; + } +#line 13047 "verilog_parser.tab.c" + break; + + case 969: /* hierarchical_function_identifier: hierarchical_identifier */ +#line 4260 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_FUNCTION; + } +#line 13054 "verilog_parser.tab.c" + break; + + case 970: /* gate_instance_identifier: arrayed_identifier */ +#line 4263 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_GATE_INSTANCE; + } +#line 13061 "verilog_parser.tab.c" + break; + + case 971: /* module_instance_identifier: arrayed_identifier */ +#line 4266 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_MODULE_INSTANCE; + } +#line 13068 "verilog_parser.tab.c" + break; + + case 972: /* udp_instance_identifier: arrayed_identifier */ +#line 4269 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_UDP_INSTANCE; + } +#line 13075 "verilog_parser.tab.c" + break; + + case 973: /* block_identifier: identifier */ +#line 4272 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_BLOCK; + } +#line 13082 "verilog_parser.tab.c" + break; + + case 974: /* cell_identifier: identifier */ +#line 4275 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_CELL; + } +#line 13089 "verilog_parser.tab.c" + break; + + case 975: /* config_identifier: identifier */ +#line 4278 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_CONFIG; + } +#line 13096 "verilog_parser.tab.c" + break; + + case 976: /* event_identifier: identifier */ +#line 4281 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_EVENT; + } +#line 13103 "verilog_parser.tab.c" + break; + + case 977: /* function_identifier: identifier */ +#line 4284 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_FUNCTION; + } +#line 13110 "verilog_parser.tab.c" + break; + + case 978: /* generate_block_identifier: identifier */ +#line 4287 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_GENERATE_BLOCK; + } +#line 13117 "verilog_parser.tab.c" + break; + + case 979: /* genvar_identifier: identifier */ +#line 4290 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_GENVAR; + } +#line 13124 "verilog_parser.tab.c" + break; + + case 980: /* inout_port_identifier: identifier */ +#line 4293 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_INOUT_PORT; + } +#line 13131 "verilog_parser.tab.c" + break; + + case 981: /* input_port_identifier: identifier */ +#line 4296 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_INPUT_PORT; + } +#line 13138 "verilog_parser.tab.c" + break; + + case 982: /* instance_identifier: identifier */ +#line 4299 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_INSTANCE; + } +#line 13145 "verilog_parser.tab.c" + break; + + case 983: /* library_identifier: identifier */ +#line 4302 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_LIBRARY; + } +#line 13152 "verilog_parser.tab.c" + break; + + case 984: /* module_identifier: identifier */ +#line 4305 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_MODULE; + } +#line 13160 "verilog_parser.tab.c" + break; + + case 985: /* net_identifier: identifier */ +#line 4309 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_NET; + } +#line 13168 "verilog_parser.tab.c" + break; + + case 986: /* net_identifier: hierarchical_identifier */ +#line 4312 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_NET; +} +#line 13176 "verilog_parser.tab.c" + break; + + case 987: /* output_port_identifier: identifier */ +#line 4317 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_OUTPUT_PORT; + } +#line 13183 "verilog_parser.tab.c" + break; + + case 988: /* specparam_identifier: identifier */ +#line 4320 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_SPECPARAM; + } +#line 13190 "verilog_parser.tab.c" + break; + + case 989: /* task_identifier: identifier */ +#line 4323 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_TASK; + } +#line 13197 "verilog_parser.tab.c" + break; + + case 990: /* topmodule_identifier: identifier */ +#line 4326 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_TOPMODULE; + } +#line 13204 "verilog_parser.tab.c" + break; + + case 991: /* udp_identifier: identifier */ +#line 4329 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_UDP; + } +#line 13211 "verilog_parser.tab.c" + break; + + case 992: /* variable_identifier: identifier */ +#line 4332 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_VARIABLE; + } +#line 13218 "verilog_parser.tab.c" + break; + + case 993: /* parameter_identifier: identifier */ +#line 4335 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_PARAMETER; + } +#line 13225 "verilog_parser.tab.c" + break; + + case 994: /* parameter_identifier: hierarchical_identifier */ +#line 4338 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_PARAMETER; + } +#line 13232 "verilog_parser.tab.c" + break; + + case 995: /* port_identifier: identifier */ +#line 4342 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_PORT; + } +#line 13240 "verilog_parser.tab.c" + break; + + case 996: /* real_identifier: identifier */ +#line 4348 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode); // $$ ->type = ID_REAL; + } +#line 13247 "verilog_parser.tab.c" + break; + + case 997: /* identifier: simple_identifier */ +#line 4352 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 13253 "verilog_parser.tab.c" + break; + + case 998: /* identifier: escaped_identifier */ +#line 4353 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 13259 "verilog_parser.tab.c" + break; + + case 999: /* identifier: text_macro_usage */ +#line 4354 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 13265 "verilog_parser.tab.c" + break; + + case 1000: /* simple_identifier: SIMPLE_ID */ +#line 4358 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].string); +} +#line 13273 "verilog_parser.tab.c" + break; + + case 1001: /* simple_identifier: text_macro_usage */ +#line 4361 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].treenode); + // $$ ->type = ID_UNEXPANDED_MACRO; +} +#line 13282 "verilog_parser.tab.c" + break; + + case 1002: /* escaped_identifier: ESCAPED_ID */ +#line 4367 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[0].string); +} +#line 13290 "verilog_parser.tab.c" + break; + + case 1003: /* simple_arrayed_identifier: simple_identifier range_o */ +#line 4371 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[-1].treenode); + if((yyvsp[0].treenode) != NULL){ + // //ast_identifier_set_range($$,$2); + } +} +#line 13301 "verilog_parser.tab.c" + break; + + case 1004: /* simple_hierarchical_identifier: simple_hierarchical_branch */ +#line 4379 "verilog_parser.y" + {(yyval.treenode)=(yyvsp[0].treenode);} +#line 13307 "verilog_parser.tab.c" + break; + + case 1005: /* simple_hierarchical_identifier: simple_hierarchical_branch DOT escaped_identifier */ +#line 4380 "verilog_parser.y" + { + // $$ = ast_append_identifier($1,$3); + } +#line 13315 "verilog_parser.tab.c" + break; + + case 1006: /* system_function_identifier: SYSTEM_ID */ +#line 4385 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].string); + // $$ ->type = ID_SYSTEM_FUNCTION; +} +#line 13324 "verilog_parser.tab.c" + break; + + case 1007: /* system_task_identifier: SYSTEM_ID */ +#line 4389 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].string); + // $$ ->type = ID_SYSTEM_TASK; +} +#line 13333 "verilog_parser.tab.c" + break; + + case 1008: /* simple_hierarchical_branch: SIMPLE_ID */ +#line 4400 "verilog_parser.y" + { + (yyval.treenode) = (yyvsp[0].string); + } +#line 13341 "verilog_parser.tab.c" + break; + + case 1009: /* simple_hierarchical_branch: SIMPLE_ID OPEN_SQ_BRACKET expression CLOSE_SQ_BRACKET */ +#line 4403 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[-3].string); + //ast_identifier_set_index($$,$3); + } +#line 13350 "verilog_parser.tab.c" + break; + + case 1010: /* simple_hierarchical_branch: SIMPLE_ID OPEN_SQ_BRACKET range_expression CLOSE_SQ_BRACKET */ +#line 4407 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[-3].string); + //ast_identifier_set_index($$,$3); + } +#line 13359 "verilog_parser.tab.c" + break; + + case 1011: /* simple_hierarchical_branch: simple_hierarchical_branch DOT simple_identifier */ +#line 4411 "verilog_parser.y" + { + // $$ = ast_append_identifier($1,$3); + } +#line 13367 "verilog_parser.tab.c" + break; + + case 1012: /* simple_hierarchical_branch: simple_hierarchical_branch DOT SIMPLE_ID OPEN_SQ_BRACKET expression CLOSE_SQ_BRACKET */ +#line 4415 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[-3].string); + ////ast_identifier_set_index($$,$5); + // $$ = ast_append_identifier($1,$$); + } +#line 13377 "verilog_parser.tab.c" + break; + + case 1013: /* simple_hierarchical_branch: simple_hierarchical_branch DOT SIMPLE_ID OPEN_SQ_BRACKET range_expression CLOSE_SQ_BRACKET */ +#line 4421 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[-3].string); + ////ast_identifier_set_index($$,$5); + // $$ = ast_append_identifier($1,$$); + } +#line 13387 "verilog_parser.tab.c" + break; + + case 1014: /* escaped_hierarchical_branch: escaped_hierarchical_branch DOT escaped_identifier */ +#line 4433 "verilog_parser.y" + { + // $$ = ast_append_identifier($1,$3); + } +#line 13395 "verilog_parser.tab.c" + break; + + case 1015: /* escaped_hierarchical_branch: escaped_hierarchical_branch DOT escaped_identifier OPEN_SQ_BRACKET expression CLOSE_SQ_BRACKET */ +#line 4437 "verilog_parser.y" + { + // //ast_identifier_set_index($3,$5); + // $$ = ast_append_identifier($1,$3); + } +#line 13404 "verilog_parser.tab.c" + break; + + case 1016: /* escaped_hierarchical_branch: escaped_identifier */ +#line 4441 "verilog_parser.y" + { + (yyval.treenode)=(yyvsp[0].treenode); + } +#line 13412 "verilog_parser.tab.c" + break; + + case 1017: /* escaped_hierarchical_branch: escaped_identifier OPEN_SQ_BRACKET expression CLOSE_SQ_BRACKET */ +#line 4444 "verilog_parser.y" + { + // //ast_identifier_set_index($1,$3); + (yyval.treenode)=(yyvsp[-3].treenode); + } +#line 13421 "verilog_parser.tab.c" + break; + + case 1018: /* escaped_hierarchical_branch: escaped_identifier OPEN_SQ_BRACKET range_expression CLOSE_SQ_BRACKET */ +#line 4448 "verilog_parser.y" + { + // //ast_identifier_set_index($1,$3); + (yyval.treenode)=(yyvsp[-3].treenode); + } +#line 13430 "verilog_parser.tab.c" + break; + + +#line 13434 "verilog_parser.tab.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; + + /* 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; + { + yypcontext_t yyctx + = {yyssp, yytoken}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == YYENOMEM) + goto yyexhaustedlab; + } + } + + 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); + 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; + + /* 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; + + + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* 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 yyreturn; + + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + + +#if 1 +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + goto yyreturn; +#endif + + +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ +yyreturn: + 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); + } + /* 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); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + return yyresult; +} + +#line 4455 "verilog_parser.y" + diff --git a/parser/verilog_parser.tab.h b/parser/verilog_parser.tab.h new file mode 100644 index 0000000..64508e6 --- /dev/null +++ b/parser/verilog_parser.tab.h @@ -0,0 +1,294 @@ +/* A Bison parser, made by GNU Bison 3.7. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 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. */ + +/* 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. */ + +#ifndef YY_YY_VERILOG_PARSER_TAB_H_INCLUDED +# define YY_YY_VERILOG_PARSER_TAB_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif +#if YYDEBUG +extern int yydebug; +#endif +/* "%code requires" blocks. */ +#line 24 "verilog_parser.y" + +#include "stdio.h" +#include "object.h" +#include "dlist.h" +#include "verilog_parsetree.h" +#include "verilog_ast.h" +#include "verilog_root.h" +#include "verilog_module.h" + +#line 59 "verilog_parser.tab.h" + +/* Token kinds. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + END = 258, /* END */ + ANY = 259, /* ANY */ + NEWLINE = 260, /* NEWLINE */ + SPACE = 261, /* SPACE */ + TAB = 262, /* TAB */ + AT = 263, /* AT */ + COMMA = 264, /* COMMA */ + HASH = 265, /* HASH */ + DOT = 266, /* DOT */ + EQ = 267, /* EQ */ + COLON = 268, /* COLON */ + IDX_PRT_SEL = 269, /* IDX_PRT_SEL */ + SEMICOLON = 270, /* SEMICOLON */ + OPEN_BRACKET = 271, /* OPEN_BRACKET */ + CLOSE_BRACKET = 272, /* CLOSE_BRACKET */ + OPEN_SQ_BRACKET = 273, /* OPEN_SQ_BRACKET */ + CLOSE_SQ_BRACKET = 274, /* CLOSE_SQ_BRACKET */ + OPEN_SQ_BRACE = 275, /* OPEN_SQ_BRACE */ + CLOSE_SQ_BRACE = 276, /* CLOSE_SQ_BRACE */ + BIN_VALUE = 277, /* BIN_VALUE */ + OCT_VALUE = 278, /* OCT_VALUE */ + HEX_VALUE = 279, /* HEX_VALUE */ + DEC_VALUE = 280, /* DEC_VALUE */ + DEC_BASE = 281, /* DEC_BASE */ + BIN_BASE = 282, /* BIN_BASE */ + OCT_BASE = 283, /* OCT_BASE */ + HEX_BASE = 284, /* HEX_BASE */ + NUM_REAL = 285, /* NUM_REAL */ + NUM_SIZE = 286, /* NUM_SIZE */ + UNSIGNED_NUMBER = 287, /* UNSIGNED_NUMBER */ + SYSTEM_ID = 288, /* SYSTEM_ID */ + SIMPLE_ID = 289, /* SIMPLE_ID */ + ESCAPED_ID = 290, /* ESCAPED_ID */ + DEFINE_ID = 291, /* DEFINE_ID */ + ATTRIBUTE_START = 292, /* ATTRIBUTE_START */ + ATTRIBUTE_END = 293, /* ATTRIBUTE_END */ + COMMENT_LINE = 294, /* COMMENT_LINE */ + COMMENT_BLOCK = 295, /* COMMENT_BLOCK */ + STRING = 296, /* STRING */ + STAR = 297, /* STAR */ + PLUS = 298, /* PLUS */ + MINUS = 299, /* MINUS */ + ASL = 300, /* ASL */ + ASR = 301, /* ASR */ + LSL = 302, /* LSL */ + LSR = 303, /* LSR */ + DIV = 304, /* DIV */ + POW = 305, /* POW */ + MOD = 306, /* MOD */ + GTE = 307, /* GTE */ + LTE = 308, /* LTE */ + GT = 309, /* GT */ + LT = 310, /* LT */ + L_NEG = 311, /* L_NEG */ + L_AND = 312, /* L_AND */ + L_OR = 313, /* L_OR */ + C_EQ = 314, /* C_EQ */ + L_EQ = 315, /* L_EQ */ + C_NEQ = 316, /* C_NEQ */ + L_NEQ = 317, /* L_NEQ */ + B_NEG = 318, /* B_NEG */ + B_AND = 319, /* B_AND */ + B_OR = 320, /* B_OR */ + B_XOR = 321, /* B_XOR */ + B_EQU = 322, /* B_EQU */ + B_NAND = 323, /* B_NAND */ + B_NOR = 324, /* B_NOR */ + TERNARY = 325, /* TERNARY */ + UNARY_OP = 326, /* UNARY_OP */ + MACRO_TEXT = 327, /* MACRO_TEXT */ + MACRO_IDENTIFIER = 328, /* MACRO_IDENTIFIER */ + KW_ALWAYS = 329, /* KW_ALWAYS */ + KW_AND = 330, /* KW_AND */ + KW_ASSIGN = 331, /* KW_ASSIGN */ + KW_AUTOMATIC = 332, /* KW_AUTOMATIC */ + KW_BEGIN = 333, /* KW_BEGIN */ + KW_BUF = 334, /* KW_BUF */ + KW_BUFIF0 = 335, /* KW_BUFIF0 */ + KW_BUFIF1 = 336, /* KW_BUFIF1 */ + KW_CASE = 337, /* KW_CASE */ + KW_CASEX = 338, /* KW_CASEX */ + KW_CASEZ = 339, /* KW_CASEZ */ + KW_CELL = 340, /* KW_CELL */ + KW_CMOS = 341, /* KW_CMOS */ + KW_CONFIG = 342, /* KW_CONFIG */ + KW_DEASSIGN = 343, /* KW_DEASSIGN */ + KW_DEFAULT = 344, /* KW_DEFAULT */ + KW_DEFPARAM = 345, /* KW_DEFPARAM */ + KW_DESIGN = 346, /* KW_DESIGN */ + KW_DISABLE = 347, /* KW_DISABLE */ + KW_EDGE = 348, /* KW_EDGE */ + KW_ELSE = 349, /* KW_ELSE */ + KW_END = 350, /* KW_END */ + KW_ENDCASE = 351, /* KW_ENDCASE */ + KW_ENDCONFIG = 352, /* KW_ENDCONFIG */ + KW_ENDFUNCTION = 353, /* KW_ENDFUNCTION */ + KW_ENDGENERATE = 354, /* KW_ENDGENERATE */ + KW_ENDMODULE = 355, /* KW_ENDMODULE */ + KW_ENDPRIMITIVE = 356, /* KW_ENDPRIMITIVE */ + KW_ENDSPECIFY = 357, /* KW_ENDSPECIFY */ + KW_ENDTABLE = 358, /* KW_ENDTABLE */ + KW_ENDTASK = 359, /* KW_ENDTASK */ + KW_EVENT = 360, /* KW_EVENT */ + KW_FOR = 361, /* KW_FOR */ + KW_FORCE = 362, /* KW_FORCE */ + KW_FOREVER = 363, /* KW_FOREVER */ + KW_FORK = 364, /* KW_FORK */ + KW_FUNCTION = 365, /* KW_FUNCTION */ + KW_GENERATE = 366, /* KW_GENERATE */ + KW_GENVAR = 367, /* KW_GENVAR */ + KW_HIGHZ0 = 368, /* KW_HIGHZ0 */ + KW_HIGHZ1 = 369, /* KW_HIGHZ1 */ + KW_IF = 370, /* KW_IF */ + KW_IFNONE = 371, /* KW_IFNONE */ + KW_INCDIR = 372, /* KW_INCDIR */ + KW_INCLUDE = 373, /* KW_INCLUDE */ + KW_INITIAL = 374, /* KW_INITIAL */ + KW_INOUT = 375, /* KW_INOUT */ + KW_INPUT = 376, /* KW_INPUT */ + KW_INSTANCE = 377, /* KW_INSTANCE */ + KW_INTEGER = 378, /* KW_INTEGER */ + KW_JOIN = 379, /* KW_JOIN */ + KW_LARGE = 380, /* KW_LARGE */ + KW_LIBLIST = 381, /* KW_LIBLIST */ + KW_LIBRARY = 382, /* KW_LIBRARY */ + KW_LOCALPARAM = 383, /* KW_LOCALPARAM */ + KW_MACROMODULE = 384, /* KW_MACROMODULE */ + KW_MEDIUM = 385, /* KW_MEDIUM */ + KW_MODULE = 386, /* KW_MODULE */ + KW_NAN = 387, /* KW_NAN */ + KW_NEGEDGE = 388, /* KW_NEGEDGE */ + KW_NMOS = 389, /* KW_NMOS */ + KW_NOR = 390, /* KW_NOR */ + KW_NOSHOWCANCELLED = 391, /* KW_NOSHOWCANCELLED */ + KW_NOT = 392, /* KW_NOT */ + KW_NOTIF0 = 393, /* KW_NOTIF0 */ + KW_NOTIF1 = 394, /* KW_NOTIF1 */ + KW_OR = 395, /* KW_OR */ + KW_OUTPUT = 396, /* KW_OUTPUT */ + KW_PARAMETER = 397, /* KW_PARAMETER */ + KW_PATHPULSE = 398, /* KW_PATHPULSE */ + KW_PMOS = 399, /* KW_PMOS */ + KW_POSEDGE = 400, /* KW_POSEDGE */ + KW_PRIMITIVE = 401, /* KW_PRIMITIVE */ + KW_PULL0 = 402, /* KW_PULL0 */ + KW_PULL1 = 403, /* KW_PULL1 */ + KW_PULLDOWN = 404, /* KW_PULLDOWN */ + KW_PULLUP = 405, /* KW_PULLUP */ + KW_PULSESTYLE_ONEVENT = 406, /* KW_PULSESTYLE_ONEVENT */ + KW_PULSESTYLE_ONDETECT = 407, /* KW_PULSESTYLE_ONDETECT */ + KW_RCMOS = 408, /* KW_RCMOS */ + KW_REAL = 409, /* KW_REAL */ + KW_REALTIME = 410, /* KW_REALTIME */ + KW_REG = 411, /* KW_REG */ + KW_RELEASE = 412, /* KW_RELEASE */ + KW_REPEAT = 413, /* KW_REPEAT */ + KW_RNMOS = 414, /* KW_RNMOS */ + KW_RPMOS = 415, /* KW_RPMOS */ + KW_RTRAN = 416, /* KW_RTRAN */ + KW_RTRANIF0 = 417, /* KW_RTRANIF0 */ + KW_RTRANIF1 = 418, /* KW_RTRANIF1 */ + KW_SCALARED = 419, /* KW_SCALARED */ + KW_SHOWCANCELLED = 420, /* KW_SHOWCANCELLED */ + KW_SIGNED = 421, /* KW_SIGNED */ + KW_SMALL = 422, /* KW_SMALL */ + KW_SPECIFY = 423, /* KW_SPECIFY */ + KW_SPECPARAM = 424, /* KW_SPECPARAM */ + KW_STRONG0 = 425, /* KW_STRONG0 */ + KW_STRONG1 = 426, /* KW_STRONG1 */ + KW_SUPPLY0 = 427, /* KW_SUPPLY0 */ + KW_SUPPLY1 = 428, /* KW_SUPPLY1 */ + KW_TABLE = 429, /* KW_TABLE */ + KW_TASK = 430, /* KW_TASK */ + KW_TIME = 431, /* KW_TIME */ + KW_TRAN = 432, /* KW_TRAN */ + KW_TRANIF0 = 433, /* KW_TRANIF0 */ + KW_TRANIF1 = 434, /* KW_TRANIF1 */ + KW_TRI = 435, /* KW_TRI */ + KW_TRI0 = 436, /* KW_TRI0 */ + KW_TRI1 = 437, /* KW_TRI1 */ + KW_TRIAND = 438, /* KW_TRIAND */ + KW_TRIOR = 439, /* KW_TRIOR */ + KW_TRIREG = 440, /* KW_TRIREG */ + KW_UNSIGNED = 441, /* KW_UNSIGNED */ + KW_USE = 442, /* KW_USE */ + KW_VECTORED = 443, /* KW_VECTORED */ + KW_WAIT = 444, /* KW_WAIT */ + KW_WAND = 445, /* KW_WAND */ + KW_WEAK0 = 446, /* KW_WEAK0 */ + KW_WEAK1 = 447, /* KW_WEAK1 */ + KW_WHILE = 448, /* KW_WHILE */ + KW_WIRE = 449, /* KW_WIRE */ + KW_WOR = 450, /* KW_WOR */ + KW_XNOR = 451, /* KW_XNOR */ + KW_XOR = 452, /* KW_XOR */ + KW_NAND = 453 /* KW_NAND */ + }; + typedef enum yytokentype yytoken_kind_t; +#endif + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +union YYSTYPE +{ +#line 35 "verilog_parser.y" + + HOBJECT treenode; + char * string; + int token; + int operator; + IDListVar list; + +#line 282 "verilog_parser.tab.h" + +}; +typedef union YYSTYPE YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE yylval; + +int yyparse (void); + +#endif /* !YY_YY_VERILOG_PARSER_TAB_H_INCLUDED */ diff --git a/parser/verilog_parser.y b/parser/verilog_parser.y new file mode 100644 index 0000000..55d820a --- /dev/null +++ b/parser/verilog_parser.y @@ -0,0 +1,4455 @@ +%require "3.0" +%defines +%define parse.trace +%verbose + + +%define parse.error verbose + +%{ + #include + #include + #include + + extern int yylex(); + extern int yylineno; + extern char * yytext; + + void yyerror(const char *msg){ + printf("line %d - ERROR: %s\n", yylineno,msg); + printf("- '%s'\n", yytext); + } +%} + +%code requires{ +#include "stdio.h" +#include "object.h" +#include "dlist.h" +#include "verilog_parsetree.h" +#include "verilog_ast.h" +#include "verilog_root.h" +#include "verilog_module.h" +} + +/* token types */ +%union { + HOBJECT treenode; + char * string; + int token; + int operator; + IDListVar list; +} + +%token END ANY NEWLINE SPACE TAB +%token AT COMMA HASH DOT EQ COLON IDX_PRT_SEL SEMICOLON OPEN_BRACKET CLOSE_BRACKET OPEN_SQ_BRACKET + CLOSE_SQ_BRACKET OPEN_SQ_BRACE CLOSE_SQ_BRACE + +%token BIN_VALUE OCT_VALUE HEX_VALUE DEC_VALUE + DEC_BASE BIN_BASE OCT_BASE HEX_BASE + NUM_REAL NUM_SIZE UNSIGNED_NUMBER + SYSTEM_ID SIMPLE_ID ESCAPED_ID DEFINE_ID + ATTRIBUTE_START ATTRIBUTE_END + COMMENT_LINE COMMENT_BLOCK + STRING + +/* Operators Precedence */ + +%token STAR PLUS MINUS ASL ASR LSL LSR DIV POW MOD GTE LTE GT LT L_NEG L_AND L_OR C_EQ L_EQ C_NEQ L_NEQ + B_NEG B_AND B_OR B_XOR B_EQU B_NAND B_NOR TERNARY UNARY_OP + +/* Operator Precedence */ + + +%right TERNARY /* Lowest Precedence */ +%left L_OR +%left L_AND +%left B_OR B_NOR +%left B_EQU B_XOR +%left B_NAND B_AND +%left L_EQ C_EQ L_NEQ C_NEQ +%left GT LT GTE LTE +%left LSL LSR ASR ASL +%left PLUS MINUS +%left STAR DIV MOD +%left POW +%right L_NEG B_NEG UNARY_OP /* Highest Precedence. */ + + +/* Compiler / Preprocessor tokens */ + +%token MACRO_TEXT MACRO_IDENTIFIER + +%token KW_ALWAYS KW_AND KW_ASSIGN KW_AUTOMATIC KW_BEGIN KW_BUF KW_BUFIF0 KW_BUFIF1 KW_CASE KW_CASEX + KW_CASEZ KW_CELL KW_CMOS KW_CONFIG KW_DEASSIGN KW_DEFAULT KW_DEFPARAM KW_DESIGN KW_DISABLE + KW_EDGE KW_ELSE KW_END KW_ENDCASE KW_ENDCONFIG KW_ENDFUNCTION KW_ENDGENERATE KW_ENDMODULE + KW_ENDPRIMITIVE KW_ENDSPECIFY KW_ENDTABLE KW_ENDTASK KW_EVENT KW_FOR KW_FORCE KW_FOREVER KW_FORK + KW_FUNCTION KW_GENERATE KW_GENVAR KW_HIGHZ0 KW_HIGHZ1 KW_IF KW_IFNONE KW_INCDIR KW_INCLUDE + KW_INITIAL KW_INOUT KW_INPUT KW_INSTANCE KW_INTEGER KW_JOIN KW_LARGE KW_LIBLIST KW_LIBRARY + KW_LOCALPARAM KW_MACROMODULE KW_MEDIUM KW_MODULE KW_NAN KW_NEGEDGE KW_NMOS KW_NOR KW_NOSHOWCANCELLED + KW_NOT KW_NOTIF0 KW_NOTIF1 KW_OR KW_OUTPUT KW_PARAMETER KW_PATHPULSE KW_PMOS KW_POSEDGE KW_PRIMITIVE + KW_PULL0 KW_PULL1 KW_PULLDOWN KW_PULLUP KW_PULSESTYLE_ONEVENT KW_PULSESTYLE_ONDETECT KW_RCMOS + KW_REAL KW_REALTIME KW_REG KW_RELEASE KW_REPEAT KW_RNMOS KW_RPMOS KW_RTRAN KW_RTRANIF0 KW_RTRANIF1 + KW_SCALARED KW_SHOWCANCELLED KW_SIGNED KW_SMALL KW_SPECIFY KW_SPECPARAM KW_STRONG0 KW_STRONG1 + KW_SUPPLY0 KW_SUPPLY1 KW_TABLE KW_TASK KW_TIME KW_TRAN KW_TRANIF0 KW_TRANIF1 KW_TRI KW_TRI0 + KW_TRI1 KW_TRIAND KW_TRIOR KW_TRIREG KW_UNSIGNED KW_USE KW_VECTORED KW_WAIT KW_WAND KW_WEAK0 + KW_WEAK1 KW_WHILE KW_WIRE KW_WOR KW_XNOR KW_XOR KW_NAND + +%start grammar_begin + +%type expression_o data_source_expression expression constant_mintypmax_expression blocking_assignment + continuous_assign nonblocking_assignment procedural_continuous_assignments block_item_declaration + block_reg_declaration automatic_o reg_o signed_o constant_function_call constant_function_call_pid + function_call system_function_call case_item function_case_item genvar_case_item case_statement + function_case_statement generate_case_statement charge_strength cmos_switch_instance concatenation + concatenation_cont constant_concatenation constant_concatenation_cont constant_multiple_concatenation + modpath_concatenation_cont module_path_concatenation module_path_multiple_concatenation multiple_concatenation + net_concatenation net_concatenation_cont net_concatenation_value variable_concatenation variable_concatenation_cont + variable_concatenation_value config_declaration config_rule_statement delay2 delay2_o delay3 delay3_o + delay_control delay_value disable_statement drive_strength drive_strength_o edge_identifier edge_identifier_o + edge_indicator edge_symbol enable_gate_instance gate_enable enable_gatetype event_control event_expression + conditional_expression constant_expression constant_mintypmax_treenode constant_range_treenode data_source_treenode + enable_terminal eq_const_exp_o error_limit_value error_limit_value_o treenode treenode_o input_terminal limit_value + mintypmax_treenode module_path_conditional_treenode module_path_treenode module_path_mintypemax_treenode + ncontrol_terminal ordered_parameter_assignment ordered_port_connection path_delay_treenode pcontrol_terminal + range_treenode reject_limit_value function_declaration function_item_declaration task_item_declaration + gate_instantiation generate_block generated_instantiation generate_item generate_item_or_null arrayed_identifier + attr_name block_identifier block_variable_type cell_clause cell_identifier config_identifier design_statement + escaped_arrayed_identifier escaped_hierarchical_branch escaped_hierarchical_identifier escaped_hierarchical_identifiers + escaped_identifier event_identifier event_trigger function_identifier gate_instance_identifier generate_block_identifier + genvar_identifier hierarchical_block_identifier hierarchical_event_identifier hierarchical_function_identifier + hierarchical_identifier hierarchical_net_identifier hierarchical_task_identifier hierarchical_variable_identifier + identifier identifier_csv inout_port_identifier input_identifier input_port_identifier inst_clause inst_name + instance_identifier instance_identifier_os lib_cell_identifier_os library_identifier module_identifier + module_instance_identifier name_of_gate_instance name_of_instance net_identifier output_identifier + output_port_identifier parameter_identifier port port_identifier port_reference real_identifier real_type + simple_arrayed_identifier simple_hierarchical_branch simple_hierarchical_identifier simple_identifier specify_input_terminal_descriptor + specify_output_terminal_descriptor specparam_identifier system_function_identifier system_task_identifier + task_identifier text_macro_usage topmodule_identifier udp_identifier udp_instance_identifier use_clause variable_identifier + variable_type conditional_statement function_conditional_statement function_if_else_if_statement generate_conditional_statement + if_else_if_statement level_symbol library_declaration library_descriptions function_loop_statement module_path_conditional_expression + generate_loop_statement loop_statement inout_terminal net_lvalue output_terminal variable_lvalue module_declaration + module_instance module_instantiation module_item module_or_generate_item module_or_generate_item_declaration non_port_module_item + mos_switch_instance n_input_gate_instance gate_n_input gatetype_n_input n_output_gate_instance gate_n_output gatetype_n_output + net_type net_type_o actual_argument pulsestyle_declaration showcancelled_declaration specify_item system_timing_check attr_spec + attr_specs attribute_instances list_of_attribute_instances init_val number unsigned_number binary_module_path_operator + polarity_operator polarity_operator_o unary_module_path_operator unary_operator local_parameter_declaration parameter_declaration + specparam_declaration output_variable_type output_variable_type_o pass_enable_switch_instance gate_pass_en_switch + pass_switch_instance edge_sensitive_path_declaration path_declaration simple_path_declaration state_dependent_path_declaration + named_parameter_assignment named_port_connection inout_declaration input_declaration output_declaration port_declaration + port_declaration_l port_dir constant_primary module_path_primary primary pulldown_strength pulldown_strength_o pullup_strength + pullup_strength_o strength0 strength1 pull_gate_instance pulse_control_specparam dimension range range_o range_or_type + range_or_type_o function_blocking_assignment genvar_assignment net_assignment net_decl_assignment param_assignment specparam_assignment + variable_assignment description always_construct function_statement function_statement_or_null initial_construct statement + statement_or_null function_seq_block par_block seq_block anys block_comment comment file_path file_path_spec include_statement + one_line_comment string white_space cmos_switchtype mos_switchtype pass_switchtype task_declaration system_task_enable + task_enable task_port_item tf_inout_declaration tf_input_declaration tf_output_declaration task_port_type task_port_type_o + delay_or_event_control delay_or_event_control_o procedural_timing_control_statement event_declaration genvar_declaration + integer_declaration net_dec_p_delay net_dec_p_ds net_dec_p_range net_dec_p_si net_dec_p_vs net_declaration real_declaration + realtime_declaration reg_dec_p_range reg_dec_p_signed reg_declaration time_declaration udp_body combinational_entry udp_declaration + udp_initial_statement udp_instance udp_instantiation next_state output_symbol udp_input_declaration udp_output_declaration + udp_port_declaration udp_reg_declaration sequential_entry wait_statement module_path_expression path_delay_expression + +%type block_item_declarations case_items cmos_switch_instances combinational_entrys config_rule_statement_os + constant_expressions dimensions dimensions_o edge_input_list else_if_statements enable_gate_instances + expressions expressions_o file_path_specs function_case_items function_else_if_statements + function_item_declarations function_port_list function_statements function_statements_o gate_n_output_a_id + generate_items genvar_case_items grammar_begin input_port_identifiers input_terminals level_symbols level_symbols_o + liblist_clause library_identifier_os library_text list_of_actual_arguments list_of_block_variable_identifiers + list_of_event_identifiers list_of_genvar_identifiers list_of_net_assignments list_of_net_decl_assignments + list_of_net_identifiers list_of_param_assignments list_of_parameter_assignments list_of_path_delay_expressions + list_of_path_inputs list_of_path_outputs list_of_port_connections list_of_port_declarations + list_of_port_identifiers list_of_ports list_of_real_identifiers list_of_specparam_assignments list_of_variable_identifiers + list_of_variable_port_identifiers module_instances module_item_os module_parameter_port_list module_params + mos_switch_instances n_input_gate_instances n_output_gate_instances named_parameter_assignments named_port_connections + non_port_module_item_os ordered_parameter_assignments ordered_port_connections output_terminals parameter_override + parameter_value_assignment parameter_value_assignment_o pass_enable_switch_instances pass_switch_instances + path_delay_value port_declarations port_expression ports pull_gate_instances sequential_entrys source_text + specify_block specify_items specify_items_o sq_bracket_constant_expressions sq_bracket_expressions statements + statements_o task_item_declarations task_port_list tf_input_declarations udp_declaration_port_list udp_input_declarations + udp_instances udp_port_declarations udp_port_list + + +%% +/* Start variables */ + +grammar_begin : + library_text { /* + assert(yy_verilog_source_tree != NULL); + yy_verilog_source_tree -> libraries = + ast_list_concat(yy_verilog_source_tree -> libraries, $1); + */ +} +| config_declaration {/* + assert(yy_verilog_source_tree != NULL); + //ast_list_append(yy_verilog_source_tree -> configs, $1); +*/} +| source_text { + //IVerilogParseTree ** ppTree = getVerilogParseTree(); + //(*ppTree)->append_source_text(ppTree, &$1); + /* unsigned int i; + assert(yy_verilog_source_tree != NULL); + + for(i = 0; i < $1 -> items; i ++) + { + ast_source_item * toadd = ast_list_get($1, i); + + if(toadd -> type == SOURCE_MODULE) + { + //ast_list_append(yy_verilog_source_tree -> modules, + toadd -> module); + } + else if (toadd -> type == SOURCE_UDP) + { + //ast_list_append(yy_verilog_source_tree -> primitives, + toadd -> udp); + } + else + { + // Do nothing / unknown / unsupported type. + printf("line %d of %s - Unknown source item type: %d", + __LINE__, + __FILE__, + toadd -> type); + } + } +*/ +} +| { + // Do nothing, it's an empty file. +} +; + +/* 19.0 Compiler Directives */ + + +text_macro_usage : MACRO_IDENTIFIER list_of_actual_arguments + | MACRO_IDENTIFIER + ; + +list_of_actual_arguments : actual_argument + | list_of_actual_arguments COMMA actual_argument + ; + +actual_argument : expression + ; + + +/* A.1.1 Library Source Text */ + +library_text : + library_descriptions{ +/* // $$ = ast_list_new(); + //ast_list_append($$,$1); +*/ + } +| library_text library_descriptions{ +/* $$ = $1; + //ast_list_append($$,$2); +*/ +} +; + +library_descriptions : + library_declaration{ + /* // $$ = ast_new_library_description(LIB_LIBRARY); + // $$ ->library = $1; + */ } +| include_statement{ +/* // $$ = ast_new_library_description(LIB_INCLUDE); + // $$ ->include = $1; +*/ } +| config_declaration{ +/* // $$ = ast_new_library_description(LIB_CONFIG); + // $$ ->config = $1; +*/ } +; + +library_declaration : + KW_LIBRARY library_identifier file_path_specs SEMICOLON{ + // // $$ = ast_new_library_declaration($2,$3,ast_list_new()); + } +| KW_LIBRARY library_identifier file_path_specs KW_INCDIR file_path_specs + SEMICOLON{ + //// $$ = ast_new_library_declaration($2,$3,$5); + } +; + +file_path_specs : + file_path_spec{ + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +| file_path_specs COMMA file_path_spec{ + //$$ = $1; + ////ast_list_append($$,$3); + } +; + +file_path_spec : file_path{$$=$1;} + ; + +file_path : string {$$=$1;}; + +include_statement : KW_INCLUDE file_path_spec SEMICOLON{$$=$2;} + ; + +/* A.1.2 Configuration Source Text */ + +config_declaration : + KW_CONFIG config_identifier SEMICOLON design_statement + config_rule_statement_os KW_ENDCONFIG{ + //$$ = ast_new_config_declaration($2,$4,$5); + } +; + +design_statement : KW_DESIGN lib_cell_identifier_os SEMICOLON{ + $$ = $2; +} +; + +lib_cell_identifier_os : + {$$ =NULL;} +| cell_identifier { + $$ = $1; + } +| library_identifier DOT cell_identifier{ + //$$ = ast_append_identifier($1,$3); +} +| lib_cell_identifier_os cell_identifier{ + if($1 == NULL){ + $$ = $2; + } else { + // $$ = ast_append_identifier($1,$2); + } +} +| lib_cell_identifier_os library_identifier DOT cell_identifier{ + if($1 == NULL){ + //$$ = ast_append_identifier($2,$4); + } else { + //$2 = ast_append_identifier($2,$4); + //$$ = ast_append_identifier($1,$2); + } +} +; + +config_rule_statement_os : { + //$$ = ast_list_new(); +} +| config_rule_statement{ + //$$ = ast_list_new(); + ////ast_list_append($$,$1); +} +| config_rule_statement_os config_rule_statement{ + //$$ = $1; + ////ast_list_append($$,$2); +} +; + +config_rule_statement : + KW_DEFAULT liblist_clause{ + //$$ = ast_new_config_rule_statement(AST_TRUE,NULL,NULL); + //// $$ ->multiple_clauses = AST_TRUE; + //// $$ ->clauses = $2; + } +| inst_clause liblist_clause{ + //$$ = ast_new_config_rule_statement(AST_FALSE,NULL,NULL); + //// $$ ->multiple_clauses = AST_TRUE; + //// $$ ->clauses = $2; + } +| inst_clause use_clause{ + //$$ = ast_new_config_rule_statement(AST_FALSE,$1,$2); + } +| cell_clause liblist_clause{ + //$$ = ast_new_config_rule_statement(AST_FALSE,NULL,NULL); + //// $$ ->multiple_clauses = AST_TRUE; + //// $$ ->clauses = $2; + } +| cell_clause use_clause{ + //$$ = ast_new_config_rule_statement(AST_FALSE,$1,$2); + } +; + +inst_clause : KW_INSTANCE inst_name {$$=$2;} + ; + +inst_name : + topmodule_identifier instance_identifier_os{ + //$$ = $1; + //if($2 != NULL) + // ast_append_identifier($$,$2); + } +; + +instance_identifier_os : + {$$ = NULL;} +| DOT instance_identifier{$$ = $2;} +| instance_identifier_os DOT instance_identifier{ + if($1 == NULL){ + $$ = $3; + } else { + $$ = $1; + // ast_append_identifier($$,$3); + } +} +; + +cell_clause : + KW_CELL cell_identifier { + $$ = $2; + } +| KW_CELL library_identifier DOT cell_identifier{ + $$ = $2; + //ast_append_identifier($$,$4); +} +; + +liblist_clause : KW_LIBLIST library_identifier_os{$$ = $2;} + ; + +library_identifier_os : + { + //$$ = ast_list_new(); + } +| library_identifier{ + // $$ = ast_list_new(); + ////ast_list_append($$,$1); +} +| library_identifier_os library_identifier{ + $$ = $1; + ////ast_list_append($$,$2); +} +; + +use_clause : + KW_USE library_identifier DOT cell_identifier COLON KW_CONFIG{ + $$ = $2; + //ast_append_identifier($$,$4); + } +| KW_USE library_identifier DOT cell_identifier{ + $$ = $2; + //ast_append_identifier($$,$4); + } +| KW_USE cell_identifier COLON KW_CONFIG{ + $$ = $2; + } +| KW_USE cell_identifier{ + $$ = $2; + } +; + +/* A.1.3 Module and primitive source text. */ + +source_text : + description { + dlistInit(&$$); + // dlistAppendItem(&$$, &$1); +} +| source_text description{ + $$ = $1; + // dlistAppendItem(&$$, &$2); +} +; + +description : + module_declaration { + $$ = $1; +} +| udp_declaration { + //$$ = $1; +} +; + +module_declaration : + attribute_instances + module_keyword + module_identifier + module_parameter_port_list + list_of_port_declarations + SEMICOLON + non_port_module_item_os + KW_ENDMODULE + { + IVerilogRoot ** ppRoot = getVerilogRoot(); + (*ppRoot)->add_module(ppRoot, $$ = verilogparseCreateModuleDeclaration($1,$3,&$4,&$5,&$7)); + //$$ = ast_new_module_declaration($1,$3,$4,$5,$7); +} +| attribute_instances + module_keyword + module_identifier + module_parameter_port_list + list_of_ports + SEMICOLON + module_item_os + KW_ENDMODULE{ + IVerilogRoot ** ppRoot = getVerilogRoot(); + (*ppRoot)->add_module(ppRoot, $$ = verilogparseCreateModuleDeclaration($1,$3,&$4,NULL,&$7)); + // Old style of port declaration, don't pass them directly into the + // function. + //$$ = ast_new_module_declaration($1,$3,$4,NULL,$7); +} +; + +module_keyword : KW_MODULE + | KW_MACROMODULE + ; + +/* A.1.4 Module parameters and ports */ + +module_parameter_port_list : { + //$$ = ast_list_new(); +} +| HASH OPEN_BRACKET module_params CLOSE_BRACKET{ + $$ = $3; +} +; + +module_params : + parameter_declaration{ + //$$ = ast_list_new(); + ////ast_list_append($$, $1); + } +| module_params COMMA parameter_declaration{ + $$ = $1; + ////ast_list_append($$,$3); +} +; + +list_of_ports : { +//$$ = ast_list_new(); +} +| OPEN_BRACKET ports CLOSE_BRACKET { + $$ = $2; +} +; + +list_of_port_declarations : + OPEN_BRACKET CLOSE_BRACKET{ +// $$ = ast_list_new(); + } +| OPEN_BRACKET port_declarations CLOSE_BRACKET{ + $$ = $2; +} +; + +port_declarations : + port_declarations COMMA port_dir port_declaration_l{ + $$ = $1; + // $4 -> direction = $3; + // //ast_list_append($$,$4); +} +| port_declarations COMMA identifier_csv port_dir port_declaration_l{ + $$ = $1; + // $5 -> direction = $4; + // //ast_list_append($$,$5); +} +| port_dir port_declaration_l{ + // $$ = ast_list_new(); + // $2 -> direction = $1; + // //ast_list_append($$,$2); +} +; + +port_declaration_l: + net_type_o signed_o range_o port_identifier{ + // ast_list * names = ast_list_new(); + // //ast_list_append(names, $4); + // $$ = ast_new_port_declaration(PORT_NONE, $1, $2, + // AST_FALSE,AST_FALSE,$3,names); +} +| signed_o range_o port_identifier{ + // ast_list * names = ast_list_new(); + // //ast_list_append(names, $3); + // $$ = ast_new_port_declaration(PORT_NONE, NET_TYPE_NONE, $1, + // AST_FALSE,AST_FALSE,$2,names); +} +| KW_REG signed_o range_o port_identifier eq_const_exp_o{ + // ast_list * names = ast_list_new(); + // //ast_list_append(names, $4); + // $$ = ast_new_port_declaration(PORT_NONE, NET_TYPE_NONE, AST_FALSE, + // AST_TRUE,AST_FALSE,$3,names); +} +| output_variable_type_o port_identifier{ + // ast_list * names = ast_list_new(); + // //ast_list_append(names, $2); + // $$ = ast_new_port_declaration(PORT_NONE, NET_TYPE_NONE, AST_FALSE, + // AST_FALSE,AST_TRUE,NULL,names); +} +| output_variable_type port_identifier eq_const_exp_o{ + // ast_list * names = ast_list_new(); + // //ast_list_append(names, $2); + // $$ = ast_new_port_declaration(PORT_NONE, NET_TYPE_NONE, AST_FALSE, + // AST_FALSE,AST_TRUE,NULL,names); +} +; + +identifier_csv : { +//$$ = ast_list_new(); +} +| identifier{ + // $$ = ast_list_new(); +// //ast_list_append($$,$1); +} +| COMMA identifier identifier_csv{ + $$ = $3; + // //ast_list_append($$,$2); +} +; + +port_dir : + attribute_instances KW_OUTPUT{$$ = PORT_OUTPUT;} +| attribute_instances KW_INPUT {$$ = PORT_INPUT;} +| attribute_instances KW_INOUT {$$ = PORT_INOUT;} +; + +port_declaration : + inout_declaration {$$ = $1;} +| input_declaration {$$ = $1;} +| output_declaration {$$ = $1;} +; + +ports : { +//$$ = ast_list_new(); +} +| ports COMMA port{ + $$ = $1; + ////ast_list_append($$,$3); +} +| port { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); +} +; + +port : + port_expression{ + //$$ = $1; + } +| DOT port_identifier OPEN_BRACKET port_expression CLOSE_BRACKET{ + $$ = $2; +} +; + +port_expression : + port_reference { + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +| port_expression COMMA port_reference{ + $$ = $1; + ////ast_list_append($$,$3); +} +; + +port_reference : + port_identifier{ + $$ = $1; +} +| port_identifier OPEN_SQ_BRACKET constant_expression CLOSE_SQ_BRACKET { + $$ = $1; +} +| port_identifier OPEN_SQ_BRACKET range_expression CLOSE_SQ_BRACKET{ + $$ = $1; +} +; + +/* A.1.5 Module Items */ + +module_item_os : { +//$$ = ast_list_new(); +} +| module_item{ + //$$ = ast_list_new(); +// //ast_list_append($$,$1); +} +| module_item_os module_item{ + $$ = $1; + // //ast_list_append($$,$2); +} +; + +non_port_module_item_os : { +//$$ = ast_list_new(); +} + | non_port_module_item{ + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } + | non_port_module_item_os non_port_module_item{ + $$ = $1; + // //ast_list_append($$,$2); + } +; + +module_item : + module_or_generate_item{ + $$ = $1; + } + | port_declaration SEMICOLON{ + // $$ = ast_new_module_item(NULL, MOD_ITEM_PORT_DECLARATION); + // // $$ ->port_declaration = $1; + } + | attribute_instances generated_instantiation{ + // $$ = ast_new_module_item($1, MOD_ITEM_GENERATED_INSTANTIATION); + // // $$ ->generated_instantiation = $2; + } + | attribute_instances local_parameter_declaration{ + // $$ = ast_new_module_item($1, MOD_ITEM_PARAMETER_DECLARATION); + // // $$ ->parameter_declaration = $2; + } + | attribute_instances parameter_declaration SEMICOLON{ + // $$ = ast_new_module_item($1, MOD_ITEM_PARAMETER_DECLARATION); + // // $$ ->parameter_declaration = $2; + } + | attribute_instances specify_block{ + // $$ = ast_new_module_item($1, MOD_ITEM_SPECIFY_BLOCK); + // // $$ ->specify_block = $2; + } + | attribute_instances specparam_declaration{ + // $$ = ast_new_module_item($1, MOD_ITEM_SPECPARAM_DECLARATION); + // // $$ ->specparam_declaration = $2; + } + ; + +module_or_generate_item : + attribute_instances module_or_generate_item_declaration{ + $$ = $2; + } +| attribute_instances parameter_override{ + // $$ = ast_new_module_item($1, MOD_ITEM_PARAMETER_OVERRIDE); + // // $$ ->parameter_override = $2; + } +| attribute_instances continuous_assign{ + // $$ = ast_new_module_item($1, MOD_ITEM_CONTINOUS_ASSIGNMENT); + // // $$ ->continuous_assignment = $2 -> continuous; + } +| attribute_instances gate_instantiation{ + // $$ = ast_new_module_item($1, MOD_ITEM_GATE_INSTANTIATION); + // // $$ ->gate_instantiation = $2; + } +| attribute_instances udp_instantiation{ + // $$ = ast_new_module_item($1, MOD_ITEM_UDP_INSTANTIATION); + // // $$ ->udp_instantiation = $2; + } +| attribute_instances module_instantiation{ + // $$ = ast_new_module_item($1, MOD_ITEM_MODULE_INSTANTIATION); + // // $$ ->module_instantiation = $2; + } +| attribute_instances initial_construct{ + // $$ = ast_new_module_item($1, MOD_ITEM_INITIAL_CONSTRUCT); + // // $$ ->initial_construct = $2; + } +| attribute_instances always_construct{ + // $$ = ast_new_module_item($1, MOD_ITEM_ALWAYS_CONSTRUCT); + // // $$ ->always_construct = $2; + } +; + +module_or_generate_item_declaration : + net_declaration{ + // $$ = ast_new_module_item(NULL,MOD_ITEM_NET_DECLARATION); + // // $$ ->net_declaration = $1; + } + | reg_declaration{ + // $$ = ast_new_module_item(NULL,MOD_ITEM_REG_DECLARATION); + // // $$ ->reg_declaration = $1; + } + | integer_declaration{ + // $$ = ast_new_module_item(NULL, MOD_ITEM_INTEGER_DECLARATION); + // // $$ ->integer_declaration = $1; + } + | real_declaration{ + // $$ = ast_new_module_item(NULL,MOD_ITEM_REAL_DECLARATION); + // // $$ ->real_declaration = $1; + } + | time_declaration{ + // $$ = ast_new_module_item(NULL,MOD_ITEM_TIME_DECLARATION); + // // $$ ->time_declaration = $1; + } + | realtime_declaration{ + // $$ = ast_new_module_item(NULL, MOD_ITEM_REALTIME_DECLARATION); + // // $$ ->realtime_declaration = $1; + } + | event_declaration{ + // $$ = ast_new_module_item(NULL,MOD_ITEM_EVENT_DECLARATION); + // // $$ ->event_declaration = $1; + } + | genvar_declaration{ + // $$ = ast_new_module_item(NULL,MOD_ITEM_GENVAR_DECLARATION); + // // $$ ->genvar_declaration = $1; + } + | task_declaration{ + // $$ = ast_new_module_item(NULL,MOD_ITEM_TASK_DECLARATION); + // // $$ ->task_declaration = $1; + } + | function_declaration{ + // $$ = ast_new_module_item(NULL,MOD_ITEM_FUNCTION_DECLARATION); + // // $$ ->function_declaration = $1; + } + ; + +non_port_module_item : + attribute_instances generated_instantiation{ + // $$ = ast_new_module_item($1, MOD_ITEM_GENERATED_INSTANTIATION); + // // $$ ->generated_instantiation = $2; + } +| attribute_instances local_parameter_declaration{ + // $$ = ast_new_module_item($1,MOD_ITEM_PARAMETER_DECLARATION); + // // $$ ->parameter_declaration = $2; +} +| attribute_instances module_or_generate_item{ + $$ = $2; +} +| attribute_instances parameter_declaration SEMICOLON{ + // $$ = ast_new_module_item($1,MOD_ITEM_PARAMETER_DECLARATION); + // // $$ ->parameter_declaration = $2; +} +| attribute_instances specify_block{ + // $$ = ast_new_module_item($1,MOD_ITEM_SPECIFY_BLOCK); + // // $$ ->specify_block = $2; +} +| attribute_instances specparam_declaration{ + // $$ = ast_new_module_item($1,MOD_ITEM_PORT_DECLARATION); + // // $$ ->specparam_declaration = $2; +} +; + +parameter_override : + KW_DEFPARAM list_of_param_assignments SEMICOLON{$$ = $2;} +; + +/* A.2.1.1 Module Parameter Declarations */ + +signed_o : KW_SIGNED {$$=1;}|{$$=0;} ; +range_o : range {$$=$1;} | {$$=NULL;} ; + +local_parameter_declaration : + KW_LOCALPARAM signed_o range_o list_of_param_assignments SEMICOLON{ + //$$ = ast_new_parameter_declarations($4,$2,AST_TRUE,$3,PARAM_GENERIC); + } +| KW_LOCALPARAM KW_INTEGER list_of_param_assignments SEMICOLON{ + // $$ = ast_new_parameter_declarations($3,AST_FALSE,AST_TRUE,NULL, + // PARAM_INTEGER); + } +| KW_LOCALPARAM KW_REAL list_of_param_assignments SEMICOLON{ + // $$ = ast_new_parameter_declarations($3,AST_FALSE,AST_TRUE,NULL, + // PARAM_REAL); + } +| KW_LOCALPARAM KW_REALTIME list_of_param_assignments SEMICOLON{ + // $$ = ast_new_parameter_declarations($3,AST_FALSE,AST_TRUE,NULL, + // PARAM_REALTIME); + } +| KW_LOCALPARAM KW_TIME list_of_param_assignments SEMICOLON{ + // $$ = ast_new_parameter_declarations($3,AST_FALSE,AST_TRUE,NULL, + // PARAM_TIME); + } +; + +parameter_declaration : + KW_PARAMETER signed_o range_o list_of_param_assignments { + //$$ = ast_new_parameter_declarations($4,$2,AST_FALSE,$3,PARAM_GENERIC); + } +| KW_PARAMETER KW_INTEGER list_of_param_assignments { + //$$ = ast_new_parameter_declarations($3,AST_FALSE,AST_FALSE,NULL, + // PARAM_INTEGER); + } +| KW_PARAMETER KW_REAL list_of_param_assignments { + //$$ = ast_new_parameter_declarations($3,AST_FALSE,AST_FALSE,NULL, + // PARAM_REAL); + } +| KW_PARAMETER KW_REALTIME list_of_param_assignments { + //$$ = ast_new_parameter_declarations($3,AST_FALSE,AST_FALSE,NULL, + // PARAM_REALTIME); + } +| KW_PARAMETER KW_TIME list_of_param_assignments { + //$$ = ast_new_parameter_declarations($3,AST_FALSE,AST_FALSE,NULL, + // PARAM_TIME); + } +; + +specparam_declaration : + KW_SPECPARAM range_o list_of_specparam_assignments SEMICOLON{ + //$$ = ast_new_parameter_declarations($3,AST_FALSE,AST_FALSE,$2, + // PARAM_SPECPARAM); + } +; + +/* A.2.1.2 Port declarations */ + +net_type_o : net_type {$$=$1;} | {$$ = NET_TYPE_NONE;} ; +reg_o : KW_REG {$$=1;}| {$$=0;}; + +inout_declaration : + KW_INOUT net_type_o signed_o range_o list_of_port_identifiers{ +//$$ = ast_new_port_declaration(PORT_INOUT, $2,$3,AST_FALSE,AST_FALSE,$4,$5); + } +; + +input_declaration : + KW_INPUT net_type_o signed_o range_o list_of_port_identifiers{ +//$$ = ast_new_port_declaration(PORT_INPUT, $2,$3,AST_FALSE,AST_FALSE,$4,$5); + } +; + +output_declaration: + KW_OUTPUT net_type_o signed_o range_o list_of_port_identifiers{ +//$$ = ast_new_port_declaration(PORT_OUTPUT, $2,$3,AST_FALSE,AST_FALSE,$4,$5); + } +| KW_OUTPUT reg_o signed_o range_o list_of_port_identifiers{ +//$$ = ast_new_port_declaration(PORT_OUTPUT, +//NET_TYPE_NONE,$3,$2,AST_FALSE,$4,$5); + } +| KW_OUTPUT output_variable_type_o list_of_port_identifiers{ + // $$ = ast_new_port_declaration(PORT_OUTPUT, NET_TYPE_NONE, + // AST_FALSE, + // AST_FALSE, + // AST_TRUE, + // NULL, + // $3); + } +| KW_OUTPUT output_variable_type list_of_variable_port_identifiers{ + // $$ = ast_new_port_declaration(PORT_OUTPUT, NET_TYPE_NONE, + // AST_FALSE, + // AST_FALSE, + // AST_TRUE, + // NULL, + // $3); + } +| KW_OUTPUT KW_REG signed_o range_o list_of_variable_port_identifiers{ + // $$ = ast_new_port_declaration(PORT_OUTPUT, + // NET_TYPE_NONE, + // $3, AST_TRUE, + // AST_FALSE, + // $4, $5); + } +; + +/* A.2.1.3 Type declarations */ + +event_declaration : KW_EVENT list_of_event_identifiers SEMICOLON { + // $$ = ast_new_type_declaration(DECLARE_EVENT); + // // $$ ->identifiers = $2; +}; +genvar_declaration : KW_GENVAR list_of_genvar_identifiers SEMICOLON { + // $$ = ast_new_type_declaration(DECLARE_GENVAR); + // // $$ ->identifiers = $2; +}; +integer_declaration : KW_INTEGER list_of_variable_identifiers SEMICOLON{ + // $$ = ast_new_type_declaration(DECLARE_INTEGER); + // // $$ ->identifiers = $2; +} ; +time_declaration : KW_TIME list_of_variable_identifiers SEMICOLON{ + // $$ = ast_new_type_declaration(DECLARE_TIME); + // // $$ ->identifiers = $2; +} ; +real_declaration : KW_REAL list_of_real_identifiers SEMICOLON{ + // $$ = ast_new_type_declaration(DECLARE_REAL); + // // $$ ->identifiers = $2; +} ; +realtime_declaration: KW_REALTIME list_of_real_identifiers SEMICOLON{ + // $$ = ast_new_type_declaration(DECLARE_REALTIME); + // // $$ ->identifiers = $2; +} ; + +delay3_o : delay3 {$$=$1;}| {$$=NULL;}; +drive_strength_o : OPEN_BRACKET drive_strength {$$=$2;}| {$$=NULL;}; + +net_declaration : + net_type net_dec_p_ds{ + $$ = $2; + //// $$ ->net_type = $1; + } +| net_type OPEN_BRACKET drive_strength net_dec_p_ds{ + $$ = $4; + //// $$ ->net_type = $1; + //// $$ ->drive_strength = $3; + } +| KW_TRIREG net_dec_p_ds{ + $$ = $2; + //// $$ ->net_type = NET_TYPE_TRIREG; + } +| KW_TRIREG OPEN_BRACKET drive_strength net_dec_p_ds{ + $$ = $4; + //// $$ ->drive_strength = $3; + //// $$ ->net_type = NET_TYPE_TRIREG; + } +| KW_TRIREG charge_strength net_dec_p_ds{ + $$ = $3; + //// $$ ->charge_strength = $2; + //// $$ ->net_type = NET_TYPE_TRIREG; + } +; + +net_dec_p_ds : + KW_VECTORED net_dec_p_vs{ + $$ = $2; + //// $$ ->vectored = AST_TRUE; + } +| KW_SCALARED net_dec_p_vs { + $$ = $2; + //// $$ ->scalared = AST_TRUE; + } +| net_dec_p_vs{ $$= $1;} +; + +net_dec_p_vs : + KW_SIGNED net_dec_p_si { + $$ = $2; + //// $$ ->is_signed = AST_TRUE; + } +| net_dec_p_si {$$=$1;} +; + +net_dec_p_si : + range net_dec_p_range{ + $$ = $2; + //// $$ ->range = $1; + } +| net_dec_p_range {$$ =$1;} +; + +net_dec_p_range : + delay3 net_dec_p_delay{ + $$ = $2; + //// $$ ->delay = $1; + } +| net_dec_p_delay {$$ = $1;} +; + +net_dec_p_delay : + list_of_net_identifiers SEMICOLON{ + //$$ = ast_new_type_declaration(DECLARE_NET); + //// $$ ->identifiers = $1; + } +| list_of_net_decl_assignments SEMICOLON{ + //$$ = ast_new_type_declaration(DECLARE_NET); + //// $$ ->identifiers = $1; + } +; + + + +reg_declaration : + KW_REG KW_SIGNED reg_dec_p_signed{ + $$ = $3; + //// $$ ->is_signed = AST_TRUE; + } +| KW_REG reg_dec_p_signed{ + $$ = $2; + //// $$ ->is_signed = AST_FALSE; + } +; + +reg_dec_p_signed : + range reg_dec_p_range { + $$ = $2; + //// $$ ->range = $1; + } +| reg_dec_p_range {$$=$1;} +; + +reg_dec_p_range : list_of_variable_identifiers SEMICOLON{ + //$$ = ast_new_type_declaration(DECLARE_REG); + //// $$ ->identifiers = $1; +} + ; + + +/* 2.2.1 Net and variable types */ + +net_type : + KW_SUPPLY0 { $$ = NET_TYPE_SUPPLY0 ;} +| KW_SUPPLY1 { $$ = NET_TYPE_SUPPLY1 ;} +| KW_TRI { $$ = NET_TYPE_TRI ;} +| KW_TRIAND { $$ = NET_TYPE_TRIAND ;} +| KW_TRIOR { $$ = NET_TYPE_TRIOR ;} +| KW_WIRE { $$ = NET_TYPE_WIRE ;} +| KW_WAND { $$ = NET_TYPE_WAND ;} +| KW_WOR { $$ = NET_TYPE_WOR ;} +; + +output_variable_type_o : output_variable_type {$$= $1;} |{$$=PARAM_GENERIC;}; +output_variable_type: KW_INTEGER{$$=PARAM_INTEGER;} + | KW_TIME{$$=PARAM_INTEGER;} + ; + +real_type : real_identifier {$$=$1; /* TODO FIXME */} + | real_identifier EQ constant_expression{$$=$1; /* TODO FIXME */} + | real_identifier dimension dimensions{ + $$=$1; + //// $$ ->range_or_idx = ID_HAS_RANGES; + //ast_list_preappend($3,$2); + //// $$ ->ranges = $3; + } ; + +dimensions : + dimension { + //$$=ast_list_new(); + ////ast_list_append($$,$1); + } + | dimensions dimension { + $$ = $1; + ////ast_list_append($$,$2); + } + | { + //$$ = ast_list_new(); + } + ; + +variable_type : + variable_identifier { + $$=$1; + } +| variable_identifier EQ constant_expression{ + $$=$1; /* TODO FIXME */ + } +| variable_identifier dimension dimensions{ + $$=$1; + // // $$ ->range_or_idx = ID_HAS_RANGES; + // ast_list_preappend($3,$2); + // // $$ ->ranges = $3; + } +; + +/* A.2.2.2 Strengths */ + +drive_strength : + strength0 COMMA strength1 CLOSE_BRACKET{ + // $$ = ast_new_pull_stregth($1,$3); + } +| strength1 COMMA strength0 CLOSE_BRACKET{ + // $$ = ast_new_pull_stregth($1,$3); + } +| strength0 COMMA KW_HIGHZ1 CLOSE_BRACKET{ + // $$ = ast_new_pull_stregth($1,STRENGTH_HIGHZ1); + } +| strength1 COMMA KW_HIGHZ0 CLOSE_BRACKET{ + // $$ = ast_new_pull_stregth($1,STRENGTH_HIGHZ0); + } +| KW_HIGHZ0 COMMA strength1 CLOSE_BRACKET{ + // $$ = ast_new_pull_stregth(STRENGTH_HIGHZ0, $3); + } +| KW_HIGHZ1 COMMA strength0 CLOSE_BRACKET{ + // $$ = ast_new_pull_stregth(STRENGTH_HIGHZ1, $3); + } +; + +strength0 : + KW_SUPPLY0 { $$ = STRENGTH_SUPPLY0;} +| KW_STRONG0 { $$ = STRENGTH_STRONG0;} +| KW_PULL0 { $$ = STRENGTH_PULL0 ;} +| KW_WEAK0 { $$ = STRENGTH_WEAK0 ;} +; + +strength1 : + KW_SUPPLY1 { $$ = STRENGTH_SUPPLY1;} +| KW_STRONG1 { $$ = STRENGTH_STRONG1;} +| KW_PULL1 { $$ = STRENGTH_PULL1 ;} +| KW_WEAK1 { $$ = STRENGTH_WEAK1 ;} +; + +charge_strength : OPEN_BRACKET KW_SMALL CLOSE_BRACKET {$$=CHARGE_SMALL;} + | OPEN_BRACKET KW_MEDIUM CLOSE_BRACKET {$$=CHARGE_MEDIUM;} + | OPEN_BRACKET KW_LARGE CLOSE_BRACKET {$$=CHARGE_LARGE;} + ; + +/* A.2.2.3 Delays */ + +delay3 : + HASH delay_value{ + // $$ = ast_new_delay3($2,$2,$2); + } +| HASH OPEN_BRACKET delay_value CLOSE_BRACKET{ + // $$ = ast_new_delay3($3,$3,$3); + } +| HASH OPEN_BRACKET delay_value COMMA delay_value CLOSE_BRACKET{ + // $$ = ast_new_delay3($3,NULL,$5); + } +| HASH OPEN_BRACKET delay_value COMMA delay_value COMMA delay_value CB{ + // $$ = ast_new_delay3($3,$5,$7); + } +| { +//$$ = ast_new_delay3(NULL,NULL,NULL); +} +; + +delay2 : + HASH delay_value{ +// $$ = ast_new_delay2($2,$2); + } +| HASH OPEN_BRACKET delay_value CLOSE_BRACKET{ + // $$ = ast_new_delay2($3,$3); + } +| HASH OPEN_BRACKET delay_value COMMA delay_value CLOSE_BRACKET{ + // $$ = ast_new_delay2($3,$5); + } +| { +//$$ = ast_new_delay2(NULL,NULL); +} +; + +delay_value : + unsigned_number { +// $$ = ast_new_delay_value(DELAY_VAL_NUMBER, $1); + } +| parameter_identifier{ +// $$ = ast_new_delay_value(DELAY_VAL_PARAMETER, $1); + } +| specparam_identifier{ + // $$ = ast_new_delay_value(DELAY_VAL_SPECPARAM, $1); + } +| mintypmax_expression{ + // $$ = ast_new_delay_value(DELAY_VAL_MINTYPMAX, $1); + } +; + +/* A.2.3 Declaration Lists */ + +dimensions_o : dimensions {$$ = $1;} + | { + //dlistInit($$); + } + ; + +list_of_event_identifiers : + event_identifier dimensions_o{ + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } +| list_of_event_identifiers COMMA event_identifier dimensions_o{ + $$ = $1; + // //ast_list_append($$,$3); +} +; + +list_of_genvar_identifiers: + genvar_identifier{ + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } +| list_of_genvar_identifiers COMMA genvar_identifier{ + $$ = $1; + // //ast_list_append($$,$3); +} +; + +list_of_net_decl_assignments : + net_decl_assignment{ + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } +| list_of_net_decl_assignments COMMA net_decl_assignment{ + $$= $1; + // //ast_list_append($$,$3); +} +; + +list_of_net_identifiers : + net_identifier dimensions_o{ + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +| list_of_net_identifiers COMMA net_identifier dimensions_o{ + $$ = $1; + ////ast_list_append($$,$3); +} +; + +list_of_param_assignments : + param_assignment{ + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } + | list_of_param_assignments COMMA param_assignment{ + $$ = $1; + ////ast_list_append($$,$3); + } + | list_of_param_assignments COMMA KW_PARAMETER param_assignment{ + $$ = $1; + ////ast_list_append($$,$3); + } + ; + +list_of_port_identifiers : + port_identifier{ + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +| port_identifier OPEN_SQ_BRACKET constant_expression CLOSE_SQ_BRACKET { + ////ast_identifier_set_index($1,$3); + //$$ = ast_list_new(); + ////ast_list_append($$,$1); +} +| list_of_port_identifiers COMMA port_identifier{ + $$ = $1; + ////ast_list_append($$,$3); +} +| list_of_port_identifiers COMMA port_identifier OPEN_SQ_BRACKET + constant_expression CLOSE_SQ_BRACKET { + ////ast_identifier_set_index($3,$5); + $$ = $1; + ////ast_list_append($$,$3); +} +; + +list_of_real_identifiers : + real_type{ + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +| list_of_real_identifiers COMMA real_type{ + $$ = $1; + ////ast_list_append($$,$3); +} +; + +list_of_specparam_assignments: + specparam_assignment{ + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +| list_of_specparam_assignments COMMA specparam_assignment{ + $$ = $1; + ////ast_list_append($$,$3); +} +; + +list_of_variable_identifiers : + variable_type{ + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +| list_of_variable_identifiers COMMA variable_type{ + $$ = $1; + ////ast_list_append($$,$3); +} +; + +eq_const_exp_o : + EQ constant_expression {$$ = $2;} +| {$$ = NULL;} +; + +list_of_variable_port_identifiers : + port_identifier eq_const_exp_o { + //$$ = ast_list_new(); + // //ast_list_append($$, + // ast_new_single_assignment(ast_new_lvalue_id(VAR_IDENTIFIER,$1),$2)); + } +| list_of_variable_port_identifiers COMMA port_identifier eq_const_exp_o{ + $$ = $1; + ////ast_list_append($$, + // ast_new_single_assignment(ast_new_lvalue_id(VAR_IDENTIFIER,$3),$4)); +} +; + +/* A.2.4 Declaration Assignments */ + +net_decl_assignment : + net_identifier EQ expression { + //$$ = ast_new_single_assignment(ast_new_lvalue_id(NET_IDENTIFIER,$1),$3); + } +| net_identifier{ + //$$ = ast_new_single_assignment(ast_new_lvalue_id(NET_IDENTIFIER,$1),NULL); +} +; + +param_assignment : parameter_identifier EQ constant_expression { + //$$ = ast_new_single_assignment(ast_new_lvalue_id(PARAM_ID,$1),$3); +}; + +specparam_assignment : + specparam_identifier EQ constant_mintypmax_expression{ + //$$= ast_new_single_assignment(ast_new_lvalue_id(SPECPARAM_ID,$1),$3); + } +| pulse_control_specparam{ + //$$ = $1; +} +; + +error_limit_value_o : COMMA error_limit_value {$$=$2;} + | {$$ =NULL;} + ; + +pulse_control_specparam : + KW_PATHPULSE EQ OPEN_BRACKET reject_limit_value error_limit_value_o + CLOSE_BRACKET SEMICOLON { + //$$ = ast_new_pulse_control_specparam($4,$5); + } +| KW_PATHPULSE specify_input_terminal_descriptor '$' + specify_output_terminal_descriptor EQ OPEN_BRACKET reject_limit_value + error_limit_value_o CLOSE_BRACKET SEMICOLON{ + //$$ = ast_new_pulse_control_specparam($7,$8); + //// $$ ->input_terminal = $2; + //// $$ ->output_terminal = $4; + } +; + +error_limit_value : limit_value {$$=$1;}; +reject_limit_value : limit_value {$$=$1;}; +limit_value : constant_mintypmax_expression {$$=$1;}; + +/* A.2.5 Declaration ranges */ + +dimension : OPEN_SQ_BRACKET constant_expression COLON constant_expression +CLOSE_SQ_BRACKET{ + //$$ = ast_new_range($2,$4); +}; + +range : OPEN_SQ_BRACKET constant_expression COLON constant_expression +CLOSE_SQ_BRACKET{ + //$$ = ast_new_range($2,$4); +}; + +/* A.2.6 Function Declarations */ + +automatic_o : KW_AUTOMATIC {$$=AST_TRUE;} | {$$=AST_FALSE;}; + +function_declaration : + KW_FUNCTION automatic_o signed_o range_or_type_o function_identifier + SEMICOLON function_item_declarations function_statement KW_ENDFUNCTION{ + //$$ = ast_new_function_declaration($2,$3,AST_TRUE,$4,$5,$7,$8); + } +| KW_FUNCTION automatic_o signed_o range_or_type_o function_identifier + OPEN_BRACKET function_port_list CLOSE_BRACKET SEMICOLON + block_item_declarations function_statement KW_ENDFUNCTION{ + //$$ = ast_new_function_declaration($2,$3,AST_FALSE,$4,$5,$10,$11); + } +; + +block_item_declarations : + block_item_declaration{ + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } +| block_item_declarations block_item_declaration{ + $$ = $1; + ////ast_list_append($$,$2); +} +| { +//$$ = ast_list_new(); +} +; + +function_item_declarations : + function_item_declaration{ + //$$ = ast_list_new(); + ////ast_list_append($$,$1); + } + | function_item_declarations function_item_declaration{ + $$ = $1; + ////ast_list_append($$,$2); + } + | { + //$$ = ast_list_new(); + } + ; + +function_item_declaration : + block_item_declaration { + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_FALSE; + // // $$ ->block_item = $1; +} +| tf_input_declaration SEMICOLON{ + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_TRUE; + // // $$ ->port_declaration = $1; +} +; + +function_port_list : +attribute_instances tf_input_declaration tf_input_declarations{ + $$ = $3; + // ast_list_preappend($$,$2); +}; + +tf_input_declarations : { + // $$ = ast_list_new(); +} +| COMMA attribute_instances tf_input_declaration tf_input_declarations{ + $$ = $4; + // ast_list_preappend($$,$3); +} +; + +range_or_type_o : range_or_type {$$=$1;} | {$$=NULL;}; + +range_or_type : + range { + //$$ = ast_new_range_or_type(AST_TRUE); + //// $$ ->range = $1; + } +| KW_INTEGER{ + //$$ = ast_new_range_or_type(AST_FALSE); + //// $$ ->type = PORT_TYPE_INTEGER; + } +| KW_REAL{ + //$$ = ast_new_range_or_type(AST_FALSE); + //// $$ ->type = PORT_TYPE_REAL; + } +| KW_REALTIME{ + //$$ = ast_new_range_or_type(AST_FALSE); + //// $$ ->type = PORT_TYPE_REALTIME; + } +| KW_TIME{ + //$$ = ast_new_range_or_type(AST_FALSE); + //// $$ ->type = PORT_TYPE_TIME; + } +; + +/* A.2.7 Task Declarations */ + +task_declaration : + KW_TASK automatic_o task_identifier SEMICOLON task_item_declarations + statement KW_ENDTASK{ + //$$ = ast_new_task_declaration($2,$3,NULL,$5,$6); + } +| KW_TASK automatic_o task_identifier OPEN_BRACKET task_port_list + CLOSE_BRACKET SEMICOLON block_item_declarations statement KW_ENDTASK{ + //$$ = ast_new_task_declaration($2,$3,$5,$8,$9); + } +; + +task_item_declarations : + { + //$$ = ast_list_new(); + } +| task_item_declaration{ + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } +| task_item_declarations task_item_declaration{ + $$ = $1; + // //ast_list_append($$,$2); + } +; + +task_item_declaration : + block_item_declaration{ + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_FALSE; + // // $$ ->block_item = $1; +} +| attribute_instances tf_input_declaration SEMICOLON{ + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_TRUE; + // // $$ ->port_declaration = $2; +} +| attribute_instances tf_output_declaration SEMICOLON{ + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_TRUE; + // // $$ ->port_declaration = $2; +} +| attribute_instances tf_inout_declaration SEMICOLON{ + // $$ = ast_new_function_item_declaration(); + // // $$ ->is_port_declaration = AST_TRUE; + // // $$ ->port_declaration = $2; +} +; + +task_port_list : + task_port_item{ + // $$ = ast_list_new(); + // //ast_list_append($$,$1); + } + | task_port_list COMMA task_port_item{ + $$ = $1; + // //ast_list_append($$,$3); + } + ; + +task_port_item : + attribute_instances tf_input_declaration SEMICOLON {$$=$2;} +| attribute_instances tf_output_declaration SEMICOLON {$$=$2;} +| attribute_instances tf_inout_declaration SEMICOLON {$$=$2;} +; + +tf_input_declaration : + KW_INPUT reg_o signed_o range_o list_of_port_identifiers{ + // $$ = ast_new_task_port(PORT_INPUT, $2,$3,$4,PORT_TYPE_NONE,$5); + } +| KW_INPUT task_port_type_o list_of_port_identifiers{ + // $$ = ast_new_task_port(PORT_INPUT,AST_FALSE,AST_FALSE,NULL, + // $2,$3); +} +; + +tf_output_declaration : + KW_OUTPUT reg_o signed_o range_o list_of_port_identifiers{ + //$$ = ast_new_task_port(PORT_OUTPUT, $2,$3,$4,PORT_TYPE_NONE,$5); + } +| KW_OUTPUT task_port_type_o list_of_port_identifiers{ + // $$ = ast_new_task_port(PORT_OUTPUT,AST_FALSE,AST_FALSE,NULL, + // $2,$3); +} +; + +tf_inout_declaration : + KW_INOUT reg_o signed_o range_o list_of_port_identifiers{ + //$$ = ast_new_task_port(PORT_INOUT, $2,$3,$4,PORT_TYPE_NONE,$5); + } +| KW_INOUT task_port_type_o list_of_port_identifiers{ + //$$ = ast_new_task_port(PORT_INOUT,AST_FALSE,AST_FALSE,NULL, + // $2,$3); +} +; + +task_port_type_o : task_port_type {$$=$1;} | {$$=PORT_TYPE_NONE;} ; +task_port_type : KW_TIME {$$ = PORT_TYPE_TIME;} + | KW_REAL {$$ = PORT_TYPE_REAL;} + | KW_REALTIME {$$ = PORT_TYPE_REALTIME;} + | KW_INTEGER {$$ = PORT_TYPE_INTEGER;} + ; + + +/* A.2.8 Block item declarations */ + +block_item_declaration : + attribute_instances block_reg_declaration{ + //$$ = ast_new_block_item_declaration(BLOCK_ITEM_REG, $1); + //// $$ ->reg = $2; + } +| attribute_instances event_declaration{ + //$$ = ast_new_block_item_declaration(BLOCK_ITEM_TYPE, $1); + //// $$ ->event_or_var = $2; + } +| attribute_instances integer_declaration{ + //$$ = ast_new_block_item_declaration(BLOCK_ITEM_TYPE, $1); + //// $$ ->event_or_var = $2; + } +| attribute_instances local_parameter_declaration{ + //$$ = ast_new_block_item_declaration(BLOCK_ITEM_PARAM, $1); + //// $$ ->parameters = $2; + } +| attribute_instances parameter_declaration SEMICOLON{ + //$$ = ast_new_block_item_declaration(BLOCK_ITEM_PARAM, $1); + //// $$ ->parameters = $2; + } +| attribute_instances real_declaration{ + // $$ = ast_new_block_item_declaration(BLOCK_ITEM_TYPE, $1); + // $$ ->event_or_var = $2; + } +| attribute_instances realtime_declaration{ + // $$ = ast_new_block_item_declaration(BLOCK_ITEM_TYPE, $1); + // $$ ->event_or_var = $2; + } +| attribute_instances time_declaration{ + // $$ = ast_new_block_item_declaration(BLOCK_ITEM_TYPE, $1); + // $$ ->event_or_var = $2; + } +; + +block_reg_declaration : + KW_REG signed_o range_o list_of_block_variable_identifiers SEMICOLON{ + // $$ = ast_new_block_reg_declaration($2,$3,$4); + } +; + +list_of_block_variable_identifiers : + block_variable_type{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| list_of_block_variable_identifiers COMMA block_variable_type{ + $$ = $1; + //ast_list_append($$,$3); +} +; + +block_variable_type : variable_identifier {$$=$1;} + | variable_identifier dimensions{$$=$1;} + ; + +/* A.3.1 primitive instantiation and instances */ + +delay2_o : delay2 {$$=$1;}| {$$=NULL;}; + +gate_instantiation : + cmos_switchtype cmos_switch_instances SEMICOLON{ + // $$ = ast_new_gate_instantiation(GATE_CMOS); + // $$ ->switches = ast_new_switches($1,$2); + } +| mos_switchtype mos_switch_instances SEMICOLON{ + // $$ = ast_new_gate_instantiation(GATE_MOS); + // $$ ->switches = ast_new_switches($1,$2); + } +| pass_switchtype pass_switch_instances SEMICOLON{ + // $$ = ast_new_gate_instantiation(GATE_PASS); + // $$ ->switches = ast_new_switches($1,$2); + } +| gate_enable SEMICOLON{ + // $$ = ast_new_gate_instantiation(GATE_ENABLE); + // $$ ->enable = $1; + } +| gate_n_output SEMICOLON { + // $$ = ast_new_gate_instantiation(GATE_N_OUT); + // $$ ->n_out = $1; + } +| gate_pass_en_switch SEMICOLON{ + // $$ = ast_new_gate_instantiation(GATE_PASS_EN); + // $$ ->pass_en = $1; + } +| gate_n_input SEMICOLON{ + // $$ = ast_new_gate_instantiation(GATE_N_IN); + // $$ ->n_in = $1; + } +| KW_PULLDOWN pulldown_strength_o pull_gate_instances SEMICOLON{ + // $$ = ast_new_gate_instantiation(GATE_PULL_UP); + // $$ ->pull_strength = $2; + // $$ ->pull_gates = $3; + } +| KW_PULLUP pullup_strength_o pull_gate_instances SEMICOLON{ + // $$ = ast_new_gate_instantiation(GATE_PULL_DOWN); + // $$ ->pull_strength = $2; + // $$ ->pull_gates = $3; + } +; + +/* -------------------------------------------------------------------------*/ + +OB : OPEN_BRACKET; +CB : CLOSE_BRACKET; + +gate_n_output : + gatetype_n_output n_output_gate_instances{ + // $$ = ast_new_n_output_gate_instances($1,NULL,NULL,$2); + } +| gatetype_n_output OB drive_strength delay2 n_output_gate_instances{ + // $$ = ast_new_n_output_gate_instances($1,$4,$3,$5); + } +| gatetype_n_output OB drive_strength n_output_gate_instances{ + // $$ = ast_new_n_output_gate_instances($1,NULL,$3,$4); + } +| gatetype_n_output delay2 n_output_gate_instances { + // $$ = ast_new_n_output_gate_instances($1,$2,NULL,$3); + } +| gatetype_n_output OB output_terminal COMMA input_terminal CB + gate_n_output_a_id{ + // $$ = ast_new_n_output_gate_instances($1,NULL,NULL,$7); + } +; + +gate_n_output_a_id : { +//$$ = NULL; +} + | COMMA n_output_gate_instances {$$=$2;} + ; + +gatetype_n_output : KW_BUF {$$ = N_OUT_BUF;} + | KW_NOT {$$ = N_OUT_NOT;} + ; + +n_output_gate_instances : + n_output_gate_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| n_output_gate_instances COMMA + n_output_gate_instance{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +n_output_gate_instance : + name_of_gate_instance OPEN_BRACKET output_terminals COMMA + input_terminal CLOSE_BRACKET{ + // $$ = ast_new_n_output_gate_instance($1,$3,$5); + } +; + +/* -------------------------------------------------------------------------*/ + +gate_enable : + enable_gatetype enable_gate_instances{ + // $$ = ast_new_enable_gate_instances($1,NULL,NULL,$2); +} +| enable_gatetype OB drive_strength delay2 enable_gate_instances{ + // $$ = ast_new_enable_gate_instances($1,NULL,NULL,$5); +} +| enable_gatetype OB drive_strength enable_gate_instances{ + // $$ = ast_new_enable_gate_instances($1,NULL,$3,$4); +} +| enable_gatetype OB output_terminal COMMA input_terminal COMMA + enable_terminal CB COMMA n_output_gate_instances{ + //ast_enable_gate_instance * gate = ast_new_enable_gate_instance( + // ast_new_identifier("unamed_gate",yylineno), $3,$7,$5); + //ast_list_preappend($10,gate); + // $$ = ast_new_enable_gate_instances($1,NULL,NULL,$10); +} +| enable_gatetype OB output_terminal COMMA input_terminal COMMA + enable_terminal CB{ + //ast_enable_gate_instance * gate = ast_new_enable_gate_instance( + // ast_new_identifier("unamed_gate",yylineno), $3,$7,$5); + //ast_list * list = ast_list_new(); + //ast_list_append(list,gate); + // $$ = ast_new_enable_gate_instances($1,NULL,NULL,list); +} +| enable_gatetype delay3 enable_gate_instances{ + // $$ = ast_new_enable_gate_instances($1,$2,NULL,$3); +} +; + +enable_gate_instances : + enable_gate_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| enable_gate_instances COMMA enable_gate_instance { + $$ = $1; + //ast_list_append($$,$3); +} +; + +enable_gate_instance : +name_of_gate_instance OPEN_BRACKET output_terminal COMMA +input_terminal COMMA enable_terminal CLOSE_BRACKET{ + // $$ = ast_new_enable_gate_instance($1,$3,$7,$5); +} +; + +enable_gatetype : KW_BUFIF0 {$$ = EN_BUFIF0;} + | KW_BUFIF1 {$$ = EN_BUFIF1;} + | KW_NOTIF0 {$$ = EN_NOTIF0;} + | KW_NOTIF1 {$$ = EN_NOTIF1;} + ; + +/* -------------------------------------------------------------------------*/ + +gate_n_input : + gatetype_n_input n_input_gate_instances{ + // $$ = ast_new_n_input_gate_instances($1,NULL,NULL,$2); + } +| gatetype_n_input OB drive_strength delay2 n_input_gate_instances{ + // $$ = ast_new_n_input_gate_instances($1,NULL,$3,$5); + } +| gatetype_n_input OB drive_strength n_input_gate_instances { + // $$ = ast_new_n_input_gate_instances($1,NULL,$3,$4); + } +| gatetype_n_input OB output_terminal COMMA input_terminals CB { + //ast_n_input_gate_instance * gate = ast_new_n_input_gate_instance( + // ast_new_identifier("unamed_gate",yylineno), $5,$3); + //ast_list * list = ast_list_new(); + //ast_list_append(list,gate); + // $$ = ast_new_n_input_gate_instances($1,NULL,NULL,list); + } +| gatetype_n_input OB output_terminal COMMA input_terminals CB + COMMA n_input_gate_instances{ + + //ast_n_input_gate_instance * gate = ast_new_n_input_gate_instance( + // ast_new_identifier("unamed_gate",yylineno), $5,$3); + //ast_list * list = $8; + //ast_list_preappend(list,gate); + // $$ = ast_new_n_input_gate_instances($1,NULL,NULL,list); + } +| gatetype_n_input delay3 n_input_gate_instances{ + // $$ = ast_new_n_input_gate_instances($1,$2,NULL,$3); +} + ; + + +gatetype_n_input : KW_AND { $$ = N_IN_AND ;} + | KW_NAND { $$ = N_IN_NAND;} + | KW_OR { $$ = N_IN_OR ;} + | KW_NOR { $$ = N_IN_NOR ;} + | KW_XOR { $$ = N_IN_XOR ;} + | KW_XNOR { $$ = N_IN_XNOR;} + ; + +/* -------------------------------------------------------------------------*/ + +gate_pass_en_switch : + KW_TRANIF0 delay2 pass_enable_switch_instances{ + // $$ = ast_new_pass_enable_switches(PASS_EN_TRANIF0,$2,$3); + } +| KW_TRANIF1 delay2 pass_enable_switch_instances{ + // $$ = ast_new_pass_enable_switches(PASS_EN_TRANIF1,$2,$3); + } +| KW_RTRANIF1 delay2 pass_enable_switch_instances{ + // $$ = ast_new_pass_enable_switches(PASS_EN_RTRANIF0,$2,$3); + } +| KW_RTRANIF0 delay2 pass_enable_switch_instances{ + // $$ = ast_new_pass_enable_switches(PASS_EN_RTRANIF1,$2,$3); + } +; + +pass_enable_switch_instances : + pass_enable_switch_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| pass_enable_switch_instances COMMA pass_enable_switch_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +; + + +pass_enable_switch_instance : + name_of_gate_instance OPEN_BRACKET inout_terminal COMMA inout_terminal COMMA + enable_terminal CLOSE_BRACKET{ + // $$ = ast_new_pass_enable_switch($1,$3,$5,$7); + } +; + + +/* -------------------------------------------------------------------------*/ + +pull_gate_instances : + pull_gate_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| pull_gate_instances COMMA pull_gate_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +; + +pass_switch_instances : + pass_switch_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| pass_switch_instances COMMA pass_switch_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +; + +n_input_gate_instances : + n_input_gate_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } + | n_input_gate_instances COMMA n_input_gate_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } + ; + +mos_switch_instances : + mos_switch_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| mos_switch_instances COMMA mos_switch_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +; + +cmos_switch_instances : + cmos_switch_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| cmos_switch_instances COMMA cmos_switch_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +; + + +pull_gate_instance : + name_of_gate_instance OPEN_BRACKET output_terminal CLOSE_BRACKET{ + // $$ = ast_new_pull_gate_instance($1,$3); + } +; + +pass_switch_instance : + name_of_gate_instance OPEN_BRACKET inout_terminal COMMA inout_terminal + CLOSE_BRACKET{ + // $$ = ast_new_pass_switch_instance($1,$3,$5); + } +; + + +n_input_gate_instance : + name_of_gate_instance OPEN_BRACKET output_terminal COMMA input_terminals + CLOSE_BRACKET{ + // $$ = ast_new_n_input_gate_instance($1,$5,$3); + } +; + +mos_switch_instance : + name_of_gate_instance OPEN_BRACKET output_terminal COMMA input_terminal + COMMA enable_terminal CLOSE_BRACKET { + // $$ = ast_new_mos_switch_instance($1,$3,$7,$5); + } +; + +cmos_switch_instance : + name_of_gate_instance OPEN_BRACKET output_terminal COMMA input_terminal + COMMA ncontrol_terminal COMMA pcontrol_terminal CLOSE_BRACKET{ + // $$ = ast_new_cmos_switch_instance($1,$3,$7,$9,$5); + } +; + +output_terminals : + output_terminals COMMA output_terminal{ + $$ = $1; + //ast_list_append($$,$3); + } + | output_terminal{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } + ; + +input_terminals : +input_terminal{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| input_terminals COMMA input_terminal{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +/* A.3.2 primitive strengths */ + +pulldown_strength_o : pulldown_strength {$$=$1;} +| { +// $$ = ast_new_primitive_pull_strength(PULL_NONE,STRENGTH_NONE,STRENGTH_NONE); +}; + +pulldown_strength : + OPEN_BRACKET strength0 COMMA strength1 CLOSE_BRACKET{ + // $$ = ast_new_primitive_pull_strength(PULL_DOWN,$2,$4); + } + | OPEN_BRACKET strength1 COMMA strength0 CLOSE_BRACKET{ + // $$ = ast_new_primitive_pull_strength(PULL_DOWN,$2,$4); + } + | OPEN_BRACKET strength1 CLOSE_BRACKET{ + // $$ = ast_new_primitive_pull_strength(PULL_DOWN,$2,$2); + } + ; + +pullup_strength_o : pullup_strength {$$=$1;} +| { +// $$ = ast_new_primitive_pull_strength(PULL_NONE,STRENGTH_NONE,STRENGTH_NONE); +}; + +pullup_strength : + OPEN_BRACKET strength0 COMMA strength1 CLOSE_BRACKET{ + // $$ = ast_new_primitive_pull_strength(PULL_UP,$2,$4); + } + | OPEN_BRACKET strength1 COMMA strength0 CLOSE_BRACKET{ + // $$ = ast_new_primitive_pull_strength(PULL_UP,$2,$4); + } + | OPEN_BRACKET strength1 CLOSE_BRACKET{ + // $$ = ast_new_primitive_pull_strength(PULL_UP,$2,$2); + } + ; + + +name_of_gate_instance : + gate_instance_identifier range_o {$$ = $1;} +| {// $$ = ast_new_identifier("Unnamed gate instance", yylineno); +} +; + +/* A.3.3 primitive terminals */ + +enable_terminal : expression {$$=$1;}; +input_terminal : expression {$$=$1;}; +ncontrol_terminal : expression {$$=$1;}; +pcontrol_terminal : expression {$$=$1;}; +inout_terminal : net_lvalue {$$=$1;}; +output_terminal : net_lvalue {$$=$1;}; + +/* A.3.4 primitive gate and switch types */ + +cmos_switchtype : + KW_CMOS delay3 {// $$ = ast_new_switch_gate_d3(SWITCH_CMOS ,$2); + } +| KW_RCMOS delay3 {// $$ = ast_new_switch_gate_d3(SWITCH_RCMOS,$2); +} +; + +mos_switchtype : + KW_NMOS delay3 {// $$ = ast_new_switch_gate_d3(SWITCH_NMOS ,$2); + } +| KW_PMOS delay3 {// $$ = ast_new_switch_gate_d3(SWITCH_PMOS ,$2); +} +| KW_RNMOS delay3 {// $$ = ast_new_switch_gate_d3(SWITCH_RNMOS,$2); +} +| KW_RPMOS delay3 {// $$ = ast_new_switch_gate_d3(SWITCH_RPMOS,$2); +} +; + +pass_switchtype : + KW_TRAN delay2 {// $$ = ast_new_switch_gate_d2(SWITCH_TRAN ,$2); + } +| KW_RTRAN delay2 {// $$ = ast_new_switch_gate_d2(SWITCH_RTRAN,$2); +} +; + +/* A.4.1 module instantiation */ + +module_instantiation: + module_identifier HASH delay_value parameter_value_assignment_o module_instances + SEMICOLON{ + // $$ = ast_new_module_instantiation($1,$4,$5); + } +| module_identifier parameter_value_assignment_o module_instances SEMICOLON{ + // $$ = ast_new_module_instantiation($1,$2,$3); + } +; + +parameter_value_assignment_o : parameter_value_assignment {$$=$1;} + | { + //$$=NULL; + }; + +parameter_value_assignment : +HASH OPEN_BRACKET list_of_parameter_assignments CLOSE_BRACKET {$$=$3;} +; + +list_of_parameter_assignments : + ordered_parameter_assignments {$$=$1;} + | named_parameter_assignments {$$=$1;} + ; + +ordered_parameter_assignments : + ordered_parameter_assignment{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| ordered_parameter_assignments COMMA ordered_parameter_assignment{ + $$ = $1; + //ast_list_append($$,$3); + } +; +named_parameter_assignments : + named_parameter_assignment{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| named_parameter_assignments COMMA named_parameter_assignment{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +module_instances : module_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| module_instances COMMA module_instance{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +ordered_parameter_assignment : expression{ + $$=$1; +}; + +named_parameter_assignment : +DOT parameter_identifier OPEN_BRACKET expression_o CLOSE_BRACKET { + // $$ = ast_new_named_port_connection($2,$4); +} +; + +module_instance : + name_of_instance OPEN_BRACKET list_of_port_connections CLOSE_BRACKET{ + // $$ = ast_new_module_instance($1,$3); + } +; + +name_of_instance : module_instance_identifier range_o {$$=$1;} + ; + +list_of_port_connections : +{ + //$$=NULL; +} + | ordered_port_connections {$$=$1;} + | named_port_connections {$$=$1;} + ; + +ordered_port_connections : + ordered_port_connection{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| ordered_port_connections COMMA ordered_port_connection{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +named_port_connections : + named_port_connection { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| named_port_connections COMMA named_port_connection{ + $$ = $1; + //ast_list_append($$,$3); +} +; + +ordered_port_connection : attribute_instances expression_o{ + if($2 == NULL){ $$ = NULL;} + else{ +// $2 -> attributes = $1; + $$ = $2; + } +} +; + +named_port_connection : + DOT port_identifier OPEN_BRACKET expression_o CLOSE_BRACKET { + // $$ = ast_new_named_port_connection($2,$4); + } +; + +expression_o : expression {$$=$1;} + | {$$=NULL;}; + +/* A.4.2 Generated instantiation */ + +generated_instantiation : KW_GENERATE generate_items KW_ENDGENERATE { + //char * id = calloc(25,sizeof(char)); + //ast_identifier new_id; + //sprintf(id,"gen_%d",yylineno); + //new_id = ast_new_identifier(id,yylineno); + // $$ = ast_new_generate_block(new_id,$2); +}; + +generate_items : + generate_item{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| generate_items generate_item{ + $$ = $1; + //ast_list_append($$,$2); + } +; + +generate_item_or_null: generate_item {$$=$1;}| {$$=NULL;}; + +generate_item : + generate_conditional_statement{ + // $$ = ast_new_generate_item(STM_CONDITIONAL,$1); + } +| generate_case_statement{ + // $$ = ast_new_generate_item(STM_CASE,$1); + } +| generate_loop_statement{ + // $$ = ast_new_generate_item(STM_LOOP,$1); + } +| generate_block{ + // $$ = ast_new_generate_item(STM_GENERATE,$1); + } +| module_or_generate_item{ + if($1 != NULL){ + // $$ = ast_new_generate_item(STM_MODULE_ITEM,$1); + } else{ + $$ = NULL; + } + } +; + +generate_conditional_statement : + KW_IF OPEN_BRACKET constant_expression CLOSE_BRACKET generate_item_or_null + KW_ELSE generate_item_or_null{ + //ast_conditional_statement * c1 = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(c1,$7); + } +| KW_IF OPEN_BRACKET constant_expression CLOSE_BRACKET generate_item_or_null{ + //ast_conditional_statement * c1 = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(c1,NULL); + } +; + +generate_case_statement : +KW_CASE OPEN_BRACKET constant_expression CLOSE_BRACKET genvar_case_items +KW_ENDCASE{ + // $$ = ast_new_case_statement($3,$5,CASE); +} +; + +genvar_case_items : + genvar_case_item{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| genvar_case_items genvar_case_item{ + $$ = $1; + //ast_list_append($$,$2); + } +| { +//$$=NULL; +} +; + +genvar_case_item : + constant_expressions COLON generate_item_or_null{ + // $$ = ast_new_case_item($1,$3); + } +| KW_DEFAULT COLON generate_item_or_null{ + // $$ = ast_new_case_item(NULL,$3); + // $$ ->is_default = AST_TRUE; + } +| KW_DEFAULT generate_item_or_null{ + // $$ = ast_new_case_item(NULL,$2); + // $$ ->is_default = AST_TRUE; + } +; + +generate_loop_statement : + KW_FOR OPEN_BRACKET genvar_assignment SEMICOLON + constant_expression + SEMICOLON genvar_assignment CLOSE_BRACKET KW_BEGIN COLON + generate_block_identifier generate_items KW_END{ + // $$ = ast_new_generate_loop_statement($12, $3,$7,$5); + } +; + +genvar_assignment : genvar_identifier EQ constant_expression{ + //ast_lvalue * lv = ast_new_lvalue_id(GENVAR_IDENTIFIER,$1); + // $$ = ast_new_single_assignment(lv, $3); +}; + +generate_block : + KW_BEGIN generate_items KW_END{ + //char * id = calloc(25,sizeof(char)); + //ast_identifier new_id; + //sprintf(id,"gen_%d",yylineno); + //new_id = ast_new_identifier(id,yylineno); + // $$ = ast_new_generate_block(new_id, $2); + } +| KW_BEGIN COLON generate_block_identifier generate_items KW_END{ + // $$ = ast_new_generate_block($3, $4); + } +; + +/* A.5.1 UDP Declaration */ + +udp_declaration : + attribute_instances KW_PRIMITIVE udp_identifier OPEN_BRACKET udp_port_list + CLOSE_BRACKET SEMICOLON udp_port_declarations udp_body KW_ENDPRIMITIVE { +/* + ast_node_attributes * attrs = $1; + ast_identifier id = $3; + ast_list * ports = $8; + ast_udp_body * body = $9; + printf("%d %s Need to re-write this rule.\n",__LINE__,__FILE__); +*/ + // $$ = ast_new_udp_declaration(attrs,id,ports,body); + + } +| attribute_instances KW_PRIMITIVE udp_identifier OPEN_BRACKET + udp_declaration_port_list CLOSE_BRACKET SEMICOLON udp_body KW_ENDPRIMITIVE{ + // $$ = ast_new_udp_declaration($1,$3,$5,$8); + } +; + +udp_port_declarations : + udp_port_declaration{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| udp_port_declarations udp_port_declaration{ + $$ = $1; + //ast_list_append($$,$1); + } +; + +/* A.5.2 UDP Ports */ + +udp_port_list : output_port_identifier COMMA input_port_identifiers{ + $$ = $3; + //ast_list_preappend($$,$1); +}; + +input_port_identifiers : + input_port_identifier{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| input_port_identifiers COMMA input_port_identifier{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +udp_declaration_port_list : + udp_output_declaration COMMA udp_input_declarations{ + $$ = $3; + //ast_list_preappend($$,$1); + } +; + +udp_input_declarations : + udp_input_declaration{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| udp_input_declarations udp_input_declaration{ + $$ = $1; + //ast_list_append($$,$1); + } +; + +udp_port_declaration : + udp_output_declaration SEMICOLON {$$=$1;} +| udp_input_declaration SEMICOLON {$$=$1;} +| udp_reg_declaration SEMICOLON {$$=$1;} +; + +udp_output_declaration : + attribute_instances KW_OUTPUT port_identifier{ + // $$ = ast_new_udp_port(PORT_OUTPUT, $3,$1,AST_FALSE, NULL); + } +| attribute_instances KW_OUTPUT KW_REG port_identifier{ + // $$ = ast_new_udp_port(PORT_OUTPUT, $4,$1,AST_TRUE, NULL); + } +|attribute_instances KW_OUTPUT KW_REG port_identifier EQ constant_expression{ + // $$ = ast_new_udp_port(PORT_OUTPUT, $4,$1,AST_TRUE, $6); + } +; + +udp_input_declaration : + attribute_instances KW_INPUT list_of_port_identifiers{ + // $$ = ast_new_udp_input_port($3,$1); + } +; + +udp_reg_declaration : attribute_instances KW_REG variable_identifier{ + // $$ = ast_new_udp_port(PORT_NONE,$3,$1,AST_TRUE,NULL); + } +; + +/* A.5.3 UDP body */ + +udp_body : + KW_TABLE combinational_entrys KW_ENDTABLE{ + // $$ = ast_new_udp_combinatoral_body($2); + } +| udp_initial_statement KW_TABLE sequential_entrys KW_ENDTABLE{ + // $$ = ast_new_udp_sequential_body($1,$3); + } +| KW_TABLE sequential_entrys KW_ENDTABLE{ + // $$ = ast_new_udp_sequential_body(NULL,$2); + } +; + +sequential_entrys : sequential_entry{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); +} +| sequential_entrys sequential_entry{ + $$ = $1; + //ast_list_append($$,$2); +}; + +combinational_entrys : + combinational_entry{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| combinational_entrys combinational_entry{ + $$ = $1; + //ast_list_append($$,$2); + } +; + +combinational_entry : level_symbols COLON output_symbol SEMICOLON{ + // $$ = ast_new_udp_combinatoral_entry($1,$3); +}; + +sequential_entry : + level_symbols COLON level_symbol COLON next_state SEMICOLON{ + // $$ = ast_new_udp_sequential_entry(PREFIX_LEVELS, $1, $3, $5); + } +| edge_input_list COLON level_symbol COLON next_state SEMICOLON{ + // $$ = ast_new_udp_sequential_entry(PREFIX_EDGES, $1, $3, $5); + } +; + +udp_initial_statement : + KW_INITIAL output_port_identifier EQ init_val SEMICOLON{ + // $$ = ast_new_udp_initial_statement($2,$4); + } +; + +init_val : unsigned_number { $$ = $1; } + | number { $$ = $1; } + ; + +level_symbols_o : +level_symbols { + $$=$1; +} +| { +//$$=NULL; +} ; + +level_symbols : + level_symbol { + // $$ = ast_list_new(); + //ast_list_append($$,&$1); + } +| level_symbols level_symbol{ + $$= $1; + //ast_list_append($$,&$2); + } +; + +edge_input_list : level_symbols_o edge_indicator level_symbols_o{ + // $$ = ast_list_new(); /** TODO FIX THIS */ +}; + +edge_indicator : + OPEN_BRACKET level_symbol level_symbol CLOSE_BRACKET { + $2 == LEVEL_0 && $3 == LEVEL_1 ? $$ = EDGE_POS: + $2 == LEVEL_1 && $3 == LEVEL_0 ? $$ = EDGE_NEG: + EDGE_ANY ; + } + | edge_symbol {$$ = $1;} + ; + +next_state : output_symbol {$$=$1;} + | MINUS {$$=UDP_NEXT_STATE_DC;} + ; + +output_symbol : + unsigned_number {$$ = UDP_NEXT_STATE_X; /*TODO FIX THIS*/} +| 'X' {$$ = UDP_NEXT_STATE_X;} +| 'x' {$$ = UDP_NEXT_STATE_X;} +| TERNARY {$$ = UDP_NEXT_STATE_QM;} +| SIMPLE_ID {$$ = UDP_NEXT_STATE_X;} +; + +level_symbol : + unsigned_number {$$ = LEVEL_X;} +| 'X' {$$ = LEVEL_X;} +| 'x' {$$ = LEVEL_X;} +| TERNARY {$$ = LEVEL_Q;} +| 'B' {$$ = LEVEL_B;} +| 'b' {$$ = LEVEL_B;} +| SIMPLE_ID {$$ = LEVEL_X;} +; + +edge_symbol : /* can be r,f,p,n or star in any case. */ + 'r' {$$ = EDGE_POS;} +| 'R' {$$ = EDGE_POS;} +| 'f' {$$ = EDGE_NEG;} +| 'F' {$$ = EDGE_NEG;} +| 'p' {$$ = EDGE_POS;} +| 'P' {$$ = EDGE_POS;} +| 'n' {$$ = EDGE_NEG;} +| 'N' {$$ = EDGE_NEG;} +| SIMPLE_ID { if (strcmp(yylval.string,"r") == 0) $$ = EDGE_POS ; + else if (strcmp(yylval.string,"R") == 0) $$ = EDGE_POS ; + else if (strcmp(yylval.string,"f") == 0) $$ = EDGE_NEG ; + else if (strcmp(yylval.string,"F") == 0) $$ = EDGE_NEG ; + else if (strcmp(yylval.string,"p") == 0) $$ = EDGE_POS ; + else if (strcmp(yylval.string,"P") == 0) $$ = EDGE_POS ; + else if (strcmp(yylval.string,"n") == 0) $$ = EDGE_NEG ; + else $$ = EDGE_NEG ; + } +| STAR {$$ = EDGE_ANY;} +; + +/* A.5.4 UDP instantiation */ + +udp_instantiation : + udp_identifier drive_strength_o delay2_o udp_instances SEMICOLON{ + // $$ = ast_new_udp_instantiation($4,$1,$2,$3); + } +; + +udp_instances : + udp_instance{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| udp_instances COMMA udp_instance{ + $$ = $1; + //ast_list_append($$,$3); +} +; + +udp_instance : + udp_instance_identifier range_o OPEN_BRACKET output_terminal COMMA + input_terminals CLOSE_BRACKET{ + // $$ = ast_new_udp_instance($1,$2,$4,$6); + } + | OPEN_BRACKET output_terminal COMMA input_terminals CLOSE_BRACKET{ + // $$ = ast_new_udp_instance(NULL,NULL,$2,$4); + } + ; + + +/* A.6.1 Continuous assignment statements */ + +continuous_assign : + KW_ASSIGN drive_strength_o delay3_o list_of_net_assignments SEMICOLON{ + // $$ = ast_new_continuous_assignment($4,$2,$3); + } +; + +list_of_net_assignments : + net_assignment{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| list_of_net_assignments COMMA net_assignment{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +net_assignment : net_lvalue EQ expression{ + // $$ = ast_new_single_assignment($1,$3); +}; + +/* A.6.2 Procedural blocks and assignments */ + +initial_construct : KW_INITIAL statement{$$ = $2;}; +always_construct : KW_ALWAYS statement {$$ = $2;}; + +blocking_assignment : variable_lvalue EQ delay_or_event_control_o expression{ + // $$ = ast_new_blocking_assignment($1,$4,$3); +}; + +nonblocking_assignment : variable_lvalue LTE delay_or_event_control_o + expression{ + // $$ = ast_new_nonblocking_assignment($1,$4,$3); +}; + +delay_or_event_control_o : delay_or_event_control{$$=$1;} | {$$=NULL;}; + +procedural_continuous_assignments : + KW_ASSIGN variable_assignment{ + // $$ = ast_new_hybrid_assignment(HYBRID_ASSIGNMENT_ASSIGN, $2); + } +| KW_DEASSIGN variable_lvalue{ + // $$ = ast_new_hybrid_lval_assignment(HYBRID_ASSIGNMENT_DEASSIGN, $2); + } +| KW_FORCE variable_assignment{ + // $$ = ast_new_hybrid_assignment(HYBRID_ASSIGNMENT_FORCE_VAR, $2); + } +| KW_FORCE net_assignment{ + // $$ = ast_new_hybrid_assignment(HYBRID_ASSIGNMENT_FORCE_NET, $2); + } +| KW_RELEASE variable_lvalue{ + // $$ = ast_new_hybrid_lval_assignment(HYBRID_ASSIGNMENT_RELEASE_VAR, $2); + } +| KW_RELEASE net_lvalue{ + // $$ = ast_new_hybrid_lval_assignment(HYBRID_ASSIGNMENT_RELEASE_NET, $2); + } +; + +function_blocking_assignment : variable_lvalue EQ expression{ + // $$ = ast_new_single_assignment($1,$3); +}; + +function_statement_or_null : function_statement {$$ =$1;} + | attribute_instances SEMICOLON {$$=NULL;} + ; + +/* A.6.3 Parallel and sequential blocks */ + +block_item_declarations : + block_item_declaration{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| block_item_declarations block_item_declaration{ + $$ = $1; + //ast_list_append($$,$2); +} +; + +function_statements_o : + function_statements {$$=$1;} + | {dlistInit(&$$);}; + +function_statements : + function_statement{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| function_statements function_statement{ + $$ = $1; + //ast_list_append($$,$2); +} +; + +function_seq_block : + KW_BEGIN function_statements_o KW_END{ + // $$ = ast_new_statement_block(BLOCK_FUNCTION_SEQUENTIAL,NULL,NULL,$2); + } +| KW_BEGIN COLON block_identifier block_item_declarations + function_statements_o KW_END{ + // $$ = ast_new_statement_block(BLOCK_FUNCTION_SEQUENTIAL,$3,$4,$5); + } +; + +variable_assignment : variable_lvalue EQ expression{ + // $$ = ast_new_single_assignment($1,$3); +}; + +par_block : + KW_FORK statements_o KW_JOIN{ + // $$ = ast_new_statement_block(BLOCK_PARALLEL,NULL,NULL,$2); + } +| KW_FORK COLON block_identifier block_item_declarations statements_o KW_JOIN{ + // $$ = ast_new_statement_block(BLOCK_PARALLEL,$3,$4,$5); + } +; + +seq_block : + KW_BEGIN statements_o KW_END{ + // $$ = ast_new_statement_block(BLOCK_SEQUENTIAL,NULL,NULL,$2); + } +| KW_BEGIN COLON block_identifier block_item_declarations statements_o KW_END{ + // $$ = ast_new_statement_block(BLOCK_SEQUENTIAL,$3,$4,$5); + } +; + +/* A.6.4 Statements */ + +statements_o : + statements { +// $$=$1; + } +| { +//dlistInit($$); +} ; + +statements : +statement{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| statements statement{ + $$ = $1; + //ast_list_append($$,$2); +} + ; + +statement : + attribute_instances blocking_assignment SEMICOLON{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_ASSIGNMENT); + } +| attribute_instances task_enable{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_TASK_ENABLE); + } +| attribute_instances nonblocking_assignment SEMICOLON{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_ASSIGNMENT); + } +| attribute_instances case_statement{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_CASE); + } +| attribute_instances conditional_statement{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_CONDITIONAL); + } +| attribute_instances disable_statement{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_DISABLE); + } +| attribute_instances event_trigger{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_EVENT_TRIGGER); + } +| attribute_instances loop_statement{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_LOOP); + } +| attribute_instances par_block{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_BLOCK); + } +| attribute_instances procedural_continuous_assignments SEMICOLON{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_ASSIGNMENT); + } +| attribute_instances procedural_timing_control_statement{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_TIMING_CONTROL); + } +| attribute_instances seq_block{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_BLOCK); + } +| attribute_instances system_function_call SEMICOLON{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_FUNCTION_CALL); + } +| attribute_instances system_task_enable{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_TASK_ENABLE); + } +| attribute_instances wait_statement{ + // $$ = ast_new_statement($1,AST_FALSE, $2, STM_WAIT); + } +; + +statement_or_null : statement {$$=$1;} + | attribute_instances SEMICOLON{$$=NULL;} + | SEMICOLON{$$=NULL;} + ; + +function_statement : + attribute_instances function_blocking_assignment SEMICOLON{ + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_ASSIGNMENT); + } +| attribute_instances function_case_statement{ + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_CASE); + } +| attribute_instances function_conditional_statement{ + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_CONDITIONAL); + } +| attribute_instances function_loop_statement{ + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_LOOP); + } +| attribute_instances function_seq_block{ + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_BLOCK); + } +| attribute_instances disable_statement{ + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_DISABLE); + } +| attribute_instances system_function_call SEMICOLON{ + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_FUNCTION_CALL); + } +| attribute_instances system_task_enable{ + // $$ = ast_new_statement($1,AST_TRUE, $2, STM_TASK_ENABLE); + } +; + +/* A.6.5 Timing control statements */ + + +procedural_timing_control_statement : + delay_or_event_control statement_or_null{ + $$ = $1; + // $$ ->statement = $2; + } +; + +delay_or_event_control : + delay_control{ + /* $$ = ast_new_timing_control_statement_delay( + TIMING_CTRL_DELAY_CONTROL, + NULL, + $1 + );*/ + } +| event_control{ + /* $$ = ast_new_timing_control_statement_event( + TIMING_CTRL_EVENT_CONTROL, + NULL, + NULL, + $1 + );*/ + } +| KW_REPEAT OPEN_BRACKET expression CLOSE_BRACKET event_control{ + /* $$ = ast_new_timing_control_statement_event( + TIMING_CTRL_EVENT_CONTROL_REPEAT, + $3, + NULL, + $5 + );*/ +} +; + +delay_control : + HASH delay_value{ + // $$ = ast_new_delay_ctrl_value($2); + } +| HASH OPEN_BRACKET mintypmax_expression CLOSE_BRACKET{ + // $$ = ast_new_delay_ctrl_mintypmax($3); + } +; + + +disable_statement : + KW_DISABLE hierarchical_task_identifier SEMICOLON{ + // $$ = ast_new_disable_statement($2); + } +| KW_DISABLE hierarchical_block_identifier SEMICOLON{ + // $$ = ast_new_disable_statement($2); + } +; + +event_control : + AT event_identifier{ + //ast_primary * p = ast_new_primary(PRIMARY_IDENTIFIER); + //p -> value.identifier = $2; + { + //ast_expression * id = ast_new_expression_primary(p); + //ast_event_expression * ct = ast_new_event_expression(EVENT_CTRL_TRIGGERS, id); + // $$ = ast_new_event_control(EVENT_CTRL_TRIGGERS, ct); + } + } +| AT OPEN_BRACKET event_expression CLOSE_BRACKET{ + // $$ = ast_new_event_control(EVENT_CTRL_TRIGGERS, $3); + } +| AT STAR{ + // $$ = ast_new_event_control(EVENT_CTRL_ANY, NULL); + } +/* Add attribute_start here since the tokeniser may return it an it still be + * valid.*/ +| AT ATTRIBUTE_START CLOSE_BRACKET { + // $$ = ast_new_event_control(EVENT_CTRL_ANY, NULL); + } +| AT OPEN_BRACKET STAR CLOSE_BRACKET{ + // $$ = ast_new_event_control(EVENT_CTRL_ANY, NULL); + } +; + +event_trigger : + MINUS GT hierarchical_event_identifier {$$=$3;} +; + +event_expression : + expression{ + // $$ = ast_new_event_expression(EDGE_ANY, $1); +} +| KW_POSEDGE expression{ + // $$ = ast_new_event_expression(EDGE_POS, $2); +} +| KW_NEGEDGE expression{ + // $$ = ast_new_event_expression(EDGE_NEG, $2); +} +| event_expression KW_OR event_expression{ + // $$ = ast_new_event_expression_sequence($1,$3); +} +| event_expression COMMA event_expression{ + // $$ = ast_new_event_expression_sequence($1,$3); +} +; + +wait_statement : + KW_WAIT OPEN_BRACKET expression CLOSE_BRACKET statement_or_null{ + // $$ = ast_new_wait_statement($3,$5); + } +; + +/* A.6.6 Conditional Statemnets */ + +conditional_statement : + KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null{ + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first,NULL); + } +| KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null KW_ELSE + statement_or_null{ + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first,$7); + } +| if_else_if_statement {$$ = $1;} +; + +if_else_if_statement : + KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null + else_if_statements{ + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first, NULL); + //ast_extend_if_else($$,$6); + } +| KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null + else_if_statements KW_ELSE statement_or_null{ + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first, $8); + //ast_extend_if_else($$,$6); + } +; + +else_if_statements : + KW_ELSE KW_IF OPEN_BRACKET expression CLOSE_BRACKET statement_or_null{ + // $$ = ast_list_new(); + //ast_list_append($$, ast_new_conditional_statement($6,$4)); + } +| else_if_statements KW_ELSE KW_IF OPEN_BRACKET expression + CLOSE_BRACKET statement_or_null{ + $$ = $1; + //ast_list_append($$,ast_new_conditional_statement($7,$5)); + } +; + +function_conditional_statement : + KW_IF OPEN_BRACKET expression CLOSE_BRACKET function_statement_or_null{ + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first,NULL); + } + | KW_IF OPEN_BRACKET expression CLOSE_BRACKET function_statement_or_null + KW_ELSE function_statement_or_null{ + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first,$7); + } + | function_if_else_if_statement{ + $$ = $1; + } + ; + +function_else_if_statements : + KW_ELSE KW_IF OPEN_BRACKET expression CLOSE_BRACKET + function_statement_or_null{ + // $$ = ast_list_new(); + //ast_list_append($$, ast_new_conditional_statement($6,$4)); + } +| function_else_if_statements KW_ELSE KW_IF OPEN_BRACKET expression + CLOSE_BRACKET function_statement_or_null{ + $$ = $1; + //ast_list_append($$,ast_new_conditional_statement($7,$5)); + } +; + +function_if_else_if_statement : + KW_IF OPEN_BRACKET expression CLOSE_BRACKET function_statement_or_null + function_else_if_statements{ + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first, NULL); + //ast_extend_if_else($$,$6); + } +| KW_IF OPEN_BRACKET expression CLOSE_BRACKET function_statement_or_null + function_else_if_statements KW_ELSE function_statement_or_null{ + //ast_conditional_statement * first = ast_new_conditional_statement($5,$3); + // $$ = ast_new_if_else(first, $8); + //ast_extend_if_else($$,$6); + } +; + +/* A.6.7 Case Statements */ + +case_statement : + KW_CASE OPEN_BRACKET expression CLOSE_BRACKET case_items KW_ENDCASE{ + // $$ = ast_new_case_statement($3, $5, CASE); + } +| KW_CASEZ OPEN_BRACKET expression CLOSE_BRACKET case_items KW_ENDCASE{ + // $$ = ast_new_case_statement($3, $5, CASEZ); + } +| KW_CASEX OPEN_BRACKET expression CLOSE_BRACKET case_items KW_ENDCASE{ + // $$ = ast_new_case_statement($3, $5, CASEX); + } +; + +case_items : + case_item{ + // $$ = ast_list_new(); + //ast_list_append($$, $1); + } +| case_items case_item{ + $$ = $1; + //ast_list_append($$, $2); + } + ; + +expressions_o : expressions {$$ = $1;} | +{ +//$$=ast_list_new(); +} + ; + + +case_item : + expressions COLON statement_or_null{ + // $$ = ast_new_case_item($1,$3); + } +| KW_DEFAULT statement_or_null{ + // $$ = ast_new_case_item(NULL,$2); + // $$ ->is_default = AST_TRUE; + } +| KW_DEFAULT COLON statement_or_null{ + // $$ = ast_new_case_item(NULL,$3); + // $$ ->is_default = AST_TRUE; + } +; + +function_case_statement : + KW_CASE OPEN_BRACKET expression CLOSE_BRACKET function_case_items + KW_ENDCASE{ + // $$ = ast_new_case_statement($3, $5, CASE); + // $$ ->is_function = AST_TRUE; + } +| KW_CASEZ OPEN_BRACKET expression CLOSE_BRACKET function_case_items + KW_ENDCASE{ + // $$ = ast_new_case_statement($3, $5, CASEZ); + // $$ ->is_function = AST_TRUE; + } +| KW_CASEX OPEN_BRACKET expression CLOSE_BRACKET function_case_items + KW_ENDCASE{ + // $$ = ast_new_case_statement($3, $5, CASEX); + // $$ ->is_function = AST_TRUE; + } +; + +function_case_items : + function_case_item { + // $$ = ast_list_new(); + //ast_list_append($$, $1); + } +| function_case_items function_case_item{ + $$ = $1; + //ast_list_append($$, $2); + } +; + +function_case_item : + expressions COLON function_statement_or_null{ + // $$ = ast_new_case_item($1, $3); + // $$ ->is_default = AST_FALSE; + } +| KW_DEFAULT function_statement_or_null{ + // $$ = ast_new_case_item(NULL, $2); + // $$ ->is_default = AST_TRUE; + } +| KW_DEFAULT COLON function_statement_or_null{ + // $$ = ast_new_case_item(NULL, $3); + // $$ ->is_default = AST_TRUE; + } +; + +/* A.6.8 looping statements */ + +function_loop_statement : + KW_FOREVER function_statement{ + // $$ = ast_new_forever_loop_statement($2); + } +| KW_REPEAT OPEN_BRACKET expression CLOSE_BRACKET function_statement{ + // $$ = ast_new_repeat_loop_statement($5,$3); + } +| KW_WHILE OPEN_BRACKET expression CLOSE_BRACKET function_statement{ + // $$ = ast_new_while_loop_statement($5,$3); + } +| KW_FOR OPEN_BRACKET variable_assignment SEMICOLON expression + SEMICOLON variable_assignment CLOSE_BRACKET function_statement{ + // $$ = ast_new_for_loop_statement($9, $3, $7,$5); + } +; + +loop_statement : + KW_FOREVER statement{ + // $$ = ast_new_forever_loop_statement($2); + } +| KW_REPEAT OPEN_BRACKET expression CLOSE_BRACKET statement{ + // $$ = ast_new_repeat_loop_statement($5,$3); + } +| KW_WHILE OPEN_BRACKET expression CLOSE_BRACKET statement{ + // $$ = ast_new_while_loop_statement($5,$3); + } +| KW_FOR OPEN_BRACKET variable_assignment SEMICOLON expression SEMICOLON + variable_assignment CLOSE_BRACKET statement{ + // $$ = ast_new_for_loop_statement($9, $3, $7,$5); + } +; + + +/* A.6.9 task enable statements */ + +system_task_enable : + system_task_identifier OPEN_BRACKET expressions CLOSE_BRACKET SEMICOLON { + // $$ = ast_new_task_enable_statement($3,$1,AST_TRUE); + } +| system_task_identifier SEMICOLON { + // $$ = ast_new_task_enable_statement(NULL,$1,AST_TRUE); + } + ; + +task_enable : + hierarchical_task_identifier SEMICOLON{ + // $$ = ast_new_task_enable_statement(NULL,$1,AST_FALSE); + } +| hierarchical_task_identifier OPEN_BRACKET expressions CLOSE_BRACKET + SEMICOLON{ + // $$ = ast_new_task_enable_statement($3,$1,AST_FALSE); + } +; + +/* A.7.1 specify block declaration */ + +specify_block : KW_SPECIFY specify_items_o KW_ENDSPECIFY {$$ = $2;} + ; + +specify_items_o : specify_items {$$ = $1;} + | {// $$ = ast_list_new(); + } + ; + +specify_items : specify_item{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } + | specify_items specify_item{ + $$ = $1; + //ast_list_append($$,$2); + } + ; + +specify_item : specparam_declaration + | pulsestyle_declaration + | showcancelled_declaration + | path_declaration + | system_timing_check {printf("%s:%d: System Timing check not supported\n", __FILE__, __LINE__);} + ; + +pulsestyle_declaration : KW_PULSESTYLE_ONEVENT list_of_path_outputs SEMICOLON + | KW_PULSESTYLE_ONDETECT list_of_path_outputs SEMICOLON + ; + +showcancelled_declaration : KW_SHOWCANCELLED list_of_path_outputs SEMICOLON + | KW_NOSHOWCANCELLED list_of_path_outputs SEMICOLON + ; + +/* A.7.2 specify path declarations */ + +path_declaration : simple_path_declaration SEMICOLON {$$=$1;} + | edge_sensitive_path_declaration SEMICOLON {$$=$1;} + | state_dependent_path_declaration SEMICOLON {$$=$1;} + ; + +simple_path_declaration : + OPEN_BRACKET specify_input_terminal_descriptor polarity_operator_o EQ GT + specify_output_terminal_descriptor CLOSE_BRACKET EQ path_delay_value{ + // $$ = ast_new_path_declaration(SIMPLE_PARALLEL_PATH); + // $$ ->parallel = ast_new_simple_parallel_path_declaration( + // $2,$3,$6,$9 + //); + } +| OPEN_BRACKET list_of_path_inputs polarity_operator_o STAR GT + list_of_path_outputs CLOSE_BRACKET EQ path_delay_value{ + // $$ = ast_new_path_declaration(SIMPLE_FULL_PATH); + // $$ ->full = ast_new_simple_full_path_declaration( + // $2,$3,$6,$9 + //); + } +; + + +list_of_path_inputs : + specify_input_terminal_descriptor { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| list_of_path_inputs COMMA specify_input_terminal_descriptor{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +list_of_path_outputs : + specify_output_terminal_descriptor { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| list_of_path_outputs COMMA specify_output_terminal_descriptor{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +/* A.7.3 specify block terminals */ + +specify_input_terminal_descriptor :/* TODO FIX THIS */ + input_identifier {$$ = $1;} +| input_identifier constant_expression {$$ = $1;} +| input_identifier range_expression {$$ = $1;} +; + +specify_output_terminal_descriptor : + output_identifier {$$ = $1;} +| output_identifier constant_expression {$$ = $1;} +| output_identifier range_expression {$$ = $1;} +; + +input_identifier : input_port_identifier {$$ = $1;} + | inout_port_identifier {$$ = $1;} + ; + +output_identifier : output_port_identifier {$$ = $1;} + | inout_port_identifier {$$ = $1;} + ; + +/* A.7.4 specify path delays */ + +path_delay_value : list_of_path_delay_expressions {$$=$1;} + | OPEN_BRACKET list_of_path_delay_expressions CLOSE_BRACKET + {$$=$2;} + ; + +list_of_path_delay_expressions : + path_delay_expression{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| path_delay_expression COMMA + path_delay_expression { + // $$ = ast_list_new(); //ast_list_append($$,$1); //ast_list_append($$,$3); + } +| path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression{ + // $$ = ast_list_new(); //ast_list_append($$,$1); //ast_list_append($$,$3); + //ast_list_append($$,$5); + } +| path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression{ + // $$ = ast_list_new(); //ast_list_append($$,$1); //ast_list_append($$,$3); + //ast_list_append($$,$5); //ast_list_append($$,$7); //ast_list_append($$,$9); + //ast_list_append($$,$11); + } +| path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression COMMA + path_delay_expression{ + // $$ = ast_list_new(); //ast_list_append($$,$1); //ast_list_append($$,$3); + //ast_list_append($$,$5); //ast_list_append($$,$7); //ast_list_append($$,$9); + //ast_list_append($$,$11); //ast_list_append($$,$13); //ast_list_append($$,$15); + //ast_list_append($$,$17); //ast_list_append($$,$19); //ast_list_append($$,$21); + //ast_list_append($$,$23); + + } +; + +path_delay_expression : constant_mintypmax_expression +{ +$$=$1; +}; + +edge_sensitive_path_declaration : + OPEN_BRACKET edge_identifier_o specify_input_terminal_descriptor EQ GT + specify_output_terminal_descriptor polarity_operator_o COLON + data_source_expression CLOSE_BRACKET EQ path_delay_value{ + // $$ = ast_new_path_declaration(EDGE_SENSITIVE_PARALLEL_PATH); + // $$ ->es_parallel = + // ast_new_edge_sensitive_parallel_path_declaration($2,$3,$7,$6,$9,$12); + } +| OPEN_BRACKET edge_identifier_o list_of_path_inputs STAR GT + list_of_path_outputs polarity_operator_o COLON data_source_expression + CLOSE_BRACKET EQ path_delay_value{ + // $$ = ast_new_path_declaration(EDGE_SENSITIVE_FULL_PATH); + // $$ ->es_full= + // ast_new_edge_sensitive_full_path_declaration($2,$3,$7,$6,$9,$12); + } +; + +data_source_expression : expression {$$=$1;}; + +edge_identifier_o : edge_identifier {$$=$1;} + | {$$ = EDGE_NONE;} + ; +edge_identifier : KW_POSEDGE {$$=EDGE_POS;} + | KW_NEGEDGE {$$=EDGE_NEG;} + ; + +state_dependent_path_declaration : + KW_IF OPEN_BRACKET module_path_expression CLOSE_BRACKET + simple_path_declaration{ + $$ = $5; + /* + if( $$ ->type == SIMPLE_PARALLEL_PATH) + $$ ->type = STATE_DEPENDENT_PARALLEL_PATH; + else if( $$ ->type == SIMPLE_FULL_PATH) + $$ ->type = STATE_DEPENDENT_FULL_PATH; + else + printf("%s:%d ERROR, invalid path declaration type when state dependent\n", + __FILE__,__LINE__); + */ + } +| KW_IF OPEN_BRACKET module_path_expression CLOSE_BRACKET + edge_sensitive_path_declaration{ + $$ = $5; + /* + if( $$ ->type == EDGE_SENSITIVE_PARALLEL_PATH) + $$ ->type = STATE_DEPENDENT_EDGE_PARALLEL_PATH; + else if( $$ ->type == EDGE_SENSITIVE_FULL_PATH) + $$ ->type = STATE_DEPENDENT_EDGE_FULL_PATH; + else + printf("%s:%d ERROR, invalid path declaration type when state dependent\n", + __FILE__,__LINE__); + */ + } + +| KW_IFNONE simple_path_declaration{ + $$ = $2; + } +; + +polarity_operator_o : polarity_operator {$$=$1;} + | {$$=OPERATOR_NONE;} + ; + +polarity_operator : PLUS {$$=$1;} + | MINUS {$$=$1;} + ; + +/* A.7.5.1 System timing check commands */ + +system_timing_check : {printf("%s:%d Not Supported\n",__FILE__,__LINE__);}; + +/* A.7.5.2 System timing check command arguments */ + +/* A.7.5.3 System timing check evet definitions */ + +/* A.8.1 Concatenations */ + +concatenation : + OPEN_SQ_BRACE expression concatenation_cont{ + $$ = $3; + //ast_extend_concatenation($3,NULL,$2); + } +; + +concatenation_cont : + CLOSE_SQ_BRACE { + // $$ = ast_new_empty_concatenation(CONCATENATION_EXPRESSION); + } +| COMMA expression concatenation_cont{ + $$ = $3; + //ast_extend_concatenation($3,NULL,$2); + } +; + +constant_concatenation : + OPEN_SQ_BRACE expression constant_concatenation_cont{ + $$ = $3; + //ast_extend_concatenation($3,NULL,$2); + } +; + +constant_concatenation_cont : + CLOSE_SQ_BRACE{ + // $$ = ast_new_empty_concatenation(CONCATENATION_EXPRESSION); + } +| COMMA expression concatenation_cont{ + $$ = $3; + //ast_extend_concatenation($3,NULL,$2); + } +; + +multiple_concatenation : + OPEN_SQ_BRACE constant_expression concatenation CLOSE_SQ_BRACE{ + $$ = $3; + // $$ ->repeat = $2; + } +| OPEN_SQ_BRACE constant_expression concatenation_cont{ + $$ = $3; + // $$ ->repeat = $2; + } +; + +constant_multiple_concatenation : + OPEN_SQ_BRACE constant_expression constant_concatenation CLOSE_SQ_BRACE{ + $$ = $3; + // $$ ->repeat = $2; + } +| OPEN_SQ_BRACE constant_expression constant_concatenation_cont{ + $$ = $3; + // $$ ->repeat = $2; + } +; + +module_path_concatenation : + OPEN_SQ_BRACE module_path_expression modpath_concatenation_cont{ + $$ = $3; + //ast_extend_concatenation($3,NULL,$2); + } +; + +modpath_concatenation_cont : + CLOSE_SQ_BRACE{ + // $$ = ast_new_empty_concatenation(CONCATENATION_MODULE_PATH); + } +| COMMA module_path_expression modpath_concatenation_cont{ + $$ = $3; + //ast_extend_concatenation($3,NULL,$2); + } +; + +module_path_multiple_concatenation : + OPEN_SQ_BRACE constant_expression module_path_concatenation CLOSE_SQ_BRACE{ + $$ = $3; + //$3 -> repeat = $2; + } +; + +net_concatenation : + OPEN_SQ_BRACE net_concatenation_value net_concatenation_cont{ + $$ = $3; + //ast_extend_concatenation($3,NULL,$2); + } +; + +net_concatenation_cont : + CLOSE_SQ_BRACE{ + // $$ = ast_new_empty_concatenation(CONCATENATION_NET); + } +| COMMA net_concatenation_value net_concatenation_cont{ + $$ = $3; + //ast_extend_concatenation($3,NULL,$2); + } +; + +sq_bracket_expressions : + OPEN_SQ_BRACKET expression CLOSE_SQ_BRACKET{ + // $$ = ast_list_new(); + //ast_list_append($$,$2); + } +| OPEN_SQ_BRACKET range_expression CLOSE_SQ_BRACKET{ + // $$ = ast_list_new(); + //ast_list_append($$,$2); + } +| OPEN_SQ_BRACKET expression CLOSE_SQ_BRACKET sq_bracket_expressions{ + $$ = $4; + //ast_list_preappend($$,$2); + } +; + +net_concatenation_value : /* TODO - fix proper identifier stuff. */ + hierarchical_net_identifier { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +| hierarchical_net_identifier sq_bracket_expressions { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +| hierarchical_net_identifier sq_bracket_expressions range_expression { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +| hierarchical_net_identifier range_expression { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +| net_concatenation { + $$ = $1; + } +; + +variable_concatenation : + OPEN_SQ_BRACE variable_concatenation_value variable_concatenation_cont{ + $$ = $3; + //ast_extend_concatenation($3,NULL,$2); + } +; + +variable_concatenation_cont : + CLOSE_SQ_BRACE{ + // $$ = ast_new_empty_concatenation(CONCATENATION_VARIABLE); + } +| COMMA variable_concatenation_value variable_concatenation_cont{ + $$ = $3; + //ast_extend_concatenation($3,NULL,$2); + } +; + +variable_concatenation_value : /* TODO - fix proper identifier stuff. */ + hierarchical_variable_identifier { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +| hierarchical_variable_identifier sq_bracket_expressions { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +| hierarchical_variable_identifier sq_bracket_expressions range_expression { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +| hierarchical_variable_identifier range_expression { + // $$ = ast_new_concatenation(CONCATENATION_NET,NULL,$1); + } +| variable_concatenation { + $$ = $1; + } +; + + +/* A.8.2 Function calls */ + +constant_expressions : + constant_expression{ + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| constant_expressions COMMA constant_expression{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +expressions : + expression { + // $$ = ast_list_new(); + //ast_list_append($$,$1); + } +| expressions COMMA expression{ + $$ = $1; + //ast_list_append($$,$3); + } +; + +constant_function_call : + function_identifier attribute_instances OPEN_BRACKET constant_expressions + CLOSE_BRACKET{ + // $$ = ast_new_function_call($1,AST_FALSE,AST_FALSE,$2,$4); + } +; + +constant_function_call_pid : + attribute_instances OPEN_BRACKET constant_expressions CLOSE_BRACKET{ + // $$ = ast_new_function_call(NULL,AST_TRUE,AST_FALSE,$1,$3); + } +; + +function_call : hierarchical_function_identifier + attribute_instances OPEN_BRACKET expressions CLOSE_BRACKET{ + // $$ = ast_new_function_call($1,AST_FALSE,AST_FALSE,$2,$4); + } +; + +system_function_call : + system_function_identifier{ + // $$ = ast_new_function_call($1,AST_FALSE,AST_TRUE,NULL,NULL); + } +| system_function_identifier OPEN_BRACKET CLOSE_BRACKET{ + // $$ = ast_new_function_call($1,AST_FALSE,AST_TRUE,NULL,NULL); + } +| system_function_identifier OPEN_BRACKET expressions CLOSE_BRACKET{ + // $$ = ast_new_function_call($1,AST_FALSE,AST_TRUE,NULL,$3); + } +; + + +/* A.8.3 Expressions */ + +conditional_expression : + expression TERNARY attribute_instances expression COLON expression{ + // $$ = ast_new_conditional_expression($1,$4,$6,$3); + } + +; + +constant_expression: + constant_primary {// $$ = ast_new_expression_primary($1); + } +| unary_operator attribute_instances constant_primary{ + // $$ = ast_new_unary_expression($3,$1,$2,AST_TRUE); + } +| constant_expression PLUS attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression MINUS attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression STAR attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression DIV attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression MOD attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression L_EQ attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression L_NEQ attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression C_EQ attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression C_NEQ attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression L_AND attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression L_OR attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression POW attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression LT attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression LTE attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression GT attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression GTE attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression B_AND attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression B_OR attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression B_XOR attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression B_EQU attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression LSR attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression LSL attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression ASR attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression ASL attribute_instances constant_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_TRUE); + } +| constant_expression TERNARY attribute_instances constant_expression COLON + constant_expression{ + // $$ = ast_new_conditional_expression($1,$4,$6,$3); + } +| string { // $$ = ast_new_string_expression($1); +} +; + +constant_mintypmax_expression : + constant_expression{ + // $$ = ast_new_mintypmax_expression(NULL,$1,NULL); + } +| constant_expression COLON constant_expression COLON constant_expression{ + // $$ = ast_new_mintypmax_expression($1,$3,$5); + } +; + +constant_range_expression : + constant_expression{ + // $$ = ast_new_index_expression($1); + } + +| constant_expression COLON constant_expression{ + // $$ = ast_new_range_expression($1,$3); + } +| constant_expression IDX_PRT_SEL constant_expression{ + // $$ = ast_new_range_expression($1,$3); + } +; + +expression : + primary { + // $$ = ast_new_expression_primary($1); + } +| unary_operator attribute_instances primary{ + // $$ = ast_new_unary_expression($3,$1,$2, AST_FALSE); + } +| expression PLUS attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression MINUS attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression STAR attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression DIV attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression MOD attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression L_EQ attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression L_NEQ attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression C_EQ attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression C_NEQ attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression L_AND attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression L_OR attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression POW attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression LT attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression LTE attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression GT attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression GTE attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression B_AND attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression B_OR attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression B_XOR attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression B_NOR attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression B_NAND attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression B_EQU attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression LSR attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression LSL attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression ASR attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| expression ASL attribute_instances expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + } +| conditional_expression {$$=$1;} +| string {// $$ = ast_new_string_expression($1); +} +; + +mintypmax_expression : + expression{ + // $$ = ast_new_mintypmax_expression(NULL,$1,NULL); + } +| expression COLON expression COLON expression{ + // $$ = ast_new_mintypmax_expression($1,$3,$5); + } +; + +module_path_conditional_expression : + module_path_expression TERNARY attribute_instances module_path_expression + COLON module_path_expression{ + // $$ = ast_new_conditional_expression($1, $4, $6, $3); + // $$ ->type = MODULE_PATH_CONDITIONAL_EXPRESSION; + } +; + +module_path_expression : + module_path_primary{ + // $$ = ast_new_expression_primary($1); + // $$ ->type = MODULE_PATH_PRIMARY_EXPRESSION; + } +| unary_module_path_operator attribute_instances module_path_primary{ + // $$ = ast_new_unary_expression($3,$1,$2,AST_FALSE); + // $$ ->type = MODULE_PATH_UNARY_EXPRESSION; +} +| module_path_expression binary_module_path_operator attribute_instances + module_path_expression{ + // $$ = ast_new_binary_expression($1,$4,$2,$3,AST_FALSE); + // $$ ->type = MODULE_PATH_BINARY_EXPRESSION; + } +| module_path_conditional_expression { + $$ = $1; +} +; + +module_path_mintypemax_expression : + module_path_expression { + // $$ = ast_new_mintypmax_expression(NULL,$1,NULL); + // $$ ->type = MODULE_PATH_MINTYPMAX_EXPRESSION; + } +| module_path_expression COLON module_path_expression COLON + module_path_expression { + // $$ = ast_new_mintypmax_expression($1,$3,$5); + // $$ ->type = MODULE_PATH_MINTYPMAX_EXPRESSION; + } + +; + +range_expression : + expression { + // $$ = ast_new_index_expression($1); + } +| expression COLON constant_expression{ + // $$ = ast_new_range_expression($1,$3); + } + +| expression IDX_PRT_SEL constant_expression %prec IDX_PRT_SEL{ + // $$ = ast_new_range_expression($1,$3); + } + +; + +/* A.8.4 Primaries */ + +constant_primary : + constant_concatenation { + // $$ = ast_new_constant_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; +} +| constant_function_call{ + // $$ = ast_new_primary_function_call($1); +} +| OPEN_BRACKET constant_mintypmax_expression CLOSE_BRACKET{ + // $$ = ast_new_constant_primary(PRIMARY_MINMAX_EXP); + // $$ ->value.minmax = $2; +} +| constant_multiple_concatenation{ + // $$ = ast_new_constant_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; +} +| genvar_identifier{ + // $$ = ast_new_constant_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; +} +| number{ + // $$ = ast_new_constant_primary(PRIMARY_NUMBER); + // $$ ->value.number = $1; +} +| parameter_identifier{ + // $$ = ast_new_constant_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; +} +| specparam_identifier{ + // $$ = ast_new_constant_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; +} +| text_macro_usage{ + // $$ = ast_new_constant_primary(PRIMARY_MACRO_USAGE); + // $$ ->value.identifier = $1; +} +; + +primary : + number{ + // $$ = ast_new_primary(PRIMARY_NUMBER); + // $$ ->value.number = $1; + } +| function_call{ + // $$ = ast_new_primary_function_call($1); + } +| hierarchical_identifier constant_function_call_pid{ + //$2 -> function= $1; + // $$ = ast_new_primary_function_call($2); + } +| SIMPLE_ID constant_function_call_pid{ // Weird quick, but it works. + //$2 -> function= $1; + // $$ = ast_new_primary_function_call($2); + } +| system_function_call{ + // $$ = ast_new_primary_function_call($1); + } +| hierarchical_identifier sq_bracket_expressions{ + // $$ = ast_new_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; + } +| hierarchical_identifier sq_bracket_expressions OPEN_SQ_BRACKET + range_expression CLOSE_SQ_BRACKET{ + // $$ = ast_new_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; + } +| concatenation{ + // $$ = ast_new_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; + } +| multiple_concatenation{ + // $$ = ast_new_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; + } +| hierarchical_identifier{ + // $$ = ast_new_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier = $1; + } +| OPEN_BRACKET mintypmax_expression CLOSE_BRACKET{ + // $$ = ast_new_primary(PRIMARY_MINMAX_EXP); + // $$ ->value.minmax = $2; + } +| text_macro_usage{ + // $$ = ast_new_primary(PRIMARY_MACRO_USAGE); + // $$ ->value.macro = $1; + } +; + +module_path_primary : + number{ + // $$ = ast_new_module_path_primary(PRIMARY_NUMBER); + // $$ ->value.number = $1; + } + +| identifier{ + // $$ = ast_new_module_path_primary(PRIMARY_IDENTIFIER); + // $$ ->value.identifier= $1; + } + +| module_path_concatenation{ + // $$ = ast_new_module_path_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; + } + +| module_path_multiple_concatenation{ + // $$ = ast_new_module_path_primary(PRIMARY_CONCATENATION); + // $$ ->value.concatenation = $1; + } + +| function_call{ + // $$ = ast_new_primary_function_call($1); + } +| system_function_call{ + // $$ = ast_new_primary_function_call($1); + } +| constant_function_call{ + // $$ = ast_new_primary_function_call($1); + } +| OPEN_BRACKET module_path_mintypemax_expression CLOSE_BRACKET{ + // $$ = ast_new_module_path_primary(PRIMARY_MINMAX_EXP); + // $$ ->value.minmax = $2; + } +| text_macro_usage{ + // $$ = ast_new_module_path_primary(PRIMARY_MACRO_USAGE); + // $$ ->value.macro = $1; + } +; + +/* A.8.5 Expression left-side values */ + +sq_bracket_constant_expressions : + OPEN_SQ_BRACKET constant_expression CLOSE_SQ_BRACKET +| OPEN_SQ_BRACKET constant_expression CLOSE_SQ_BRACKET + sq_bracket_constant_expressions +; + +net_lvalue : + hierarchical_net_identifier{ + // $$ = ast_new_lvalue_id(NET_IDENTIFIER, $1); + } +| hierarchical_net_identifier sq_bracket_constant_expressions{ + // $$ = ast_new_lvalue_id(NET_IDENTIFIER, $1); + } +| hierarchical_net_identifier sq_bracket_constant_expressions + OPEN_SQ_BRACKET constant_range_expression CLOSE_SQ_BRACKET{ + // $$ = ast_new_lvalue_id(NET_IDENTIFIER, $1); + } +| hierarchical_net_identifier OPEN_SQ_BRACKET constant_range_expression + CLOSE_SQ_BRACKET{ + // $$ = ast_new_lvalue_id(NET_IDENTIFIER, $1); + } +| net_concatenation { + // $$ = ast_new_lvalue_concat(NET_CONCATENATION, $1); + } +; + +variable_lvalue : + hierarchical_variable_identifier{ + // $$ = ast_new_lvalue_id(VAR_IDENTIFIER, $1); + } +| hierarchical_variable_identifier sq_bracket_constant_expressions{ + // $$ = ast_new_lvalue_id(VAR_IDENTIFIER, $1); + } +| hierarchical_variable_identifier sq_bracket_constant_expressions + OPEN_SQ_BRACKET constant_range_expression CLOSE_SQ_BRACKET{ + // $$ = ast_new_lvalue_id(VAR_IDENTIFIER, $1); + } +| hierarchical_variable_identifier OPEN_SQ_BRACKET constant_range_expression + CLOSE_SQ_BRACKET{ + // $$ = ast_new_lvalue_id(VAR_IDENTIFIER, $1); + } +| variable_concatenation{ + // $$ = ast_new_lvalue_concat(VAR_CONCATENATION, $1); + } + +; + +/* A.8.6 Operators */ + +unary_operator : PLUS {$$ = $1;} + | MINUS {$$ = $1;} + | L_NEG {$$ = $1;} + | B_NEG {$$ = $1;} + | B_AND {$$ = $1;} + | B_NAND {$$ = $1;} + | B_OR {$$ = $1;} + | B_NOR {$$ = $1;} + | B_XOR {$$ = $1;} + | B_EQU {$$ = $1;} + ; + + +unary_module_path_operator : L_NEG {$$=$1;} + | B_NEG {$$=$1;} + | B_AND {$$=$1;} + | B_NAND {$$=$1;} + | B_OR {$$=$1;} + | B_NOR {$$=$1;} + | B_XOR {$$=$1;} + | B_EQU {$$=$1;} + ; + +binary_module_path_operator : L_EQ {$$=$1;} + | L_NEQ {$$=$1;} + | L_AND {$$=$1;} + | L_OR {$$=$1;} + | B_AND {$$=$1;} + | B_OR {$$=$1;} + | B_XOR {$$=$1;} + | B_EQU {$$=$1;} + ; + +/* A.8.7 Numbers */ + +unsigned_number : + UNSIGNED_NUMBER { + // $$ = ast_new_number(BASE_DECIMAL, REP_BITS, $1); + } +; + +number : + NUM_REAL{ + // $$ = ast_new_number(BASE_DECIMAL,REP_BITS,$1); + } +| BIN_BASE BIN_VALUE { + // $$ = ast_new_number(BASE_BINARY, REP_BITS, $2); +} +| HEX_BASE HEX_VALUE { + // $$ = ast_new_number(BASE_HEX, REP_BITS, $2); +} +| DEC_BASE DEC_VALUE { + // $$ = ast_new_number(BASE_DECIMAL, REP_BITS, $2); +} +| OCT_BASE OCT_VALUE { + // $$ = ast_new_number(BASE_OCTAL, REP_BITS, $2); +} +| UNSIGNED_NUMBER BIN_BASE BIN_VALUE { + // $$ = ast_new_number(BASE_BINARY, REP_BITS, $3); +} +| UNSIGNED_NUMBER HEX_BASE HEX_VALUE { + // $$ = ast_new_number(BASE_HEX, REP_BITS, $3); +} +| UNSIGNED_NUMBER OCT_BASE OCT_VALUE { + // $$ = ast_new_number(BASE_OCTAL, REP_BITS, $3); +} +| UNSIGNED_NUMBER DEC_BASE DEC_VALUE{ + // $$ = ast_new_number(BASE_DECIMAL, REP_BITS, $3); +} +| unsigned_number {$$ = $1;} +; + + +/* A.8.8 Strings */ + +string : STRING; + +/* A.9.1 Attributes */ + +attribute_instances : {$$=NULL;} + | list_of_attribute_instances {$$=$1;} + ; + +list_of_attribute_instances : + ATTRIBUTE_START attr_specs ATTRIBUTE_END { + $$ = $2; + } +| attribute_instances ATTRIBUTE_START attr_specs ATTRIBUTE_END{ + if($1 != NULL){ + //ast_append_attribute($1, $3); + $$ = $1; + } else { + $$ = $3; + } + } + ; + +attr_specs : {$$ = NULL;} + | attr_spec { + $$ = $1; + } + | attr_specs COMMA attr_spec { + // Append the new item to the existing list and return. + // ast_append_attribute($1,$3); + $$ = $1; + } + ; + +attr_spec : attr_name EQ constant_expression + {// $$ = ast_new_attributes($1,$3); + } + | attr_name + {// $$ = ast_new_attributes($1, NULL); + } + ; + +attr_name : identifier {$$=$1;}; + +/* A.9.2 Comments */ + +comment : one_line_comment {$$=$1;} + | block_comment {$$=$1;} + ; + +one_line_comment : COMMENT_LINE {$$=$1;}; + +block_comment : COMMENT_BLOCK {$$=$1;}; + +/* A.9.3 Identifiers */ + +escaped_arrayed_identifier : escaped_identifier range_o{ + $$ = $1; + if($2 != NULL){ + //ast_identifier_set_range($$,$2); + } +}; + +escaped_hierarchical_identifier : + escaped_hierarchical_branch escaped_hierarchical_identifiers{ + // $$ = ast_append_identifier($1,$2); +} +| escaped_hierarchical_branch { + $$ = $1; +} +; + +escaped_hierarchical_identifiers: + DOT simple_hierarchical_identifier {$$=$2;} +| DOT escaped_hierarchical_identifier {$$=$2;} +| escaped_hierarchical_identifiers DOT simple_hierarchical_identifier { + //$$=ast_append_identifier($1,$3); + } +| escaped_hierarchical_identifier DOT escaped_hierarchical_identifiers { + //$$=ast_append_identifier($1,$3); + } +; + +anys : anys ANY {$$=$2;} + | ANY {$$ = $1;} + ; + + +arrayed_identifier : simple_arrayed_identifier {$$=$1;} + | escaped_arrayed_identifier {$$=$1;} + ; + + +hierarchical_identifier : simple_hierarchical_identifier {$$=$1;} + | escaped_hierarchical_identifier{$$=$1;} + ; + +hierarchical_net_identifier : hierarchical_identifier + {$$=$1; // $$ ->type = ID_HIERARCHICAL_NET; + }; +hierarchical_variable_identifier: hierarchical_identifier + {$$=$1; // $$ ->type = ID_HIERARCHICAL_VARIABLE; + }; +hierarchical_task_identifier : hierarchical_identifier + {$$=$1; // $$ ->type = ID_HIERARCHICAL_TASK; + }; +hierarchical_block_identifier : hierarchical_identifier + {$$=$1; // $$ ->type = ID_HIERARCHICAL_BLOCK; + }; +hierarchical_event_identifier : hierarchical_identifier + {$$=$1; // $$ ->type = ID_HIERARCHICAL_EVENT; + }; +hierarchical_function_identifier: hierarchical_identifier + {$$=$1; // $$ ->type = ID_FUNCTION; + }; +gate_instance_identifier : arrayed_identifier + {$$=$1; // $$ ->type = ID_GATE_INSTANCE; + }; +module_instance_identifier : arrayed_identifier + {$$=$1; // $$ ->type = ID_MODULE_INSTANCE; + }; +udp_instance_identifier : arrayed_identifier + {$$=$1; // $$ ->type = ID_UDP_INSTANCE; + }; +block_identifier : identifier + {$$=$1; // $$ ->type = ID_BLOCK; + }; +cell_identifier : identifier + {$$=$1; // $$ ->type = ID_CELL; + }; +config_identifier : identifier + {$$=$1; // $$ ->type = ID_CONFIG; + }; +event_identifier : identifier + {$$=$1; // $$ ->type = ID_EVENT; + }; +function_identifier : identifier + {$$=$1; // $$ ->type = ID_FUNCTION; + }; +generate_block_identifier : identifier + {$$=$1; // $$ ->type = ID_GENERATE_BLOCK; + }; +genvar_identifier : identifier + {$$=$1; // $$ ->type = ID_GENVAR; + }; +inout_port_identifier : identifier + {$$=$1; // $$ ->type = ID_INOUT_PORT; + }; +input_port_identifier : identifier + {$$=$1; // $$ ->type = ID_INPUT_PORT; + }; +instance_identifier : identifier + {$$=$1; // $$ ->type = ID_INSTANCE; + }; +library_identifier : identifier + {$$=$1; // $$ ->type = ID_LIBRARY; + }; +module_identifier : identifier + { + $$=$1; // $$ ->type = ID_MODULE; + }; +net_identifier : + identifier { + $$=$1; // $$ ->type = ID_NET; + } +| hierarchical_identifier { + $$=$1; // $$ ->type = ID_NET; +} +; +output_port_identifier : identifier + {$$=$1; // $$ ->type = ID_OUTPUT_PORT; + }; +specparam_identifier : identifier + {$$=$1; // $$ ->type = ID_SPECPARAM; + }; +task_identifier : identifier + {$$=$1; // $$ ->type = ID_TASK; + }; +topmodule_identifier : identifier + {$$=$1; // $$ ->type = ID_TOPMODULE; + }; +udp_identifier : identifier + {$$=$1; // $$ ->type = ID_UDP; + }; +variable_identifier : identifier + {$$=$1; // $$ ->type = ID_VARIABLE; + }; +parameter_identifier : identifier + {$$=$1; // $$ ->type = ID_PARAMETER; + } + | hierarchical_identifier + {$$=$1; // $$ ->type = ID_PARAMETER; + } + ; +port_identifier : + identifier { + $$=$1; // $$ ->type = ID_PORT; + } +; + +real_identifier : identifier + {$$=$1; // $$ ->type = ID_REAL; + }; + +identifier : + simple_identifier {$$=$1;} +| escaped_identifier {$$=$1;} +| text_macro_usage {$$=$1;} +; + +simple_identifier: + SIMPLE_ID { + $$ = $1; +} +| text_macro_usage { + $$ = $1; + // $$ ->type = ID_UNEXPANDED_MACRO; +} +; + +escaped_identifier : ESCAPED_ID { + $$=$1; +}; + +simple_arrayed_identifier : simple_identifier range_o { + $$ = $1; + if($2 != NULL){ + // //ast_identifier_set_range($$,$2); + } +}; + +simple_hierarchical_identifier : + simple_hierarchical_branch {$$=$1;} +| simple_hierarchical_branch DOT escaped_identifier { + // $$ = ast_append_identifier($1,$3); + } +; + +system_function_identifier : SYSTEM_ID { + $$ = $1; + // $$ ->type = ID_SYSTEM_FUNCTION; +}; +system_task_identifier : SYSTEM_ID { + $$ = $1; + // $$ ->type = ID_SYSTEM_TASK; +}; + +/* A.9.4 Identifier Branches */ + +/* Semantic checking needed to make sure that the "expression" +in the closed brackets reduces to an "unsigned_number" */ + +simple_hierarchical_branch : + SIMPLE_ID { + $$ = $1; + } +| SIMPLE_ID OPEN_SQ_BRACKET expression CLOSE_SQ_BRACKET{ + $$=$1; + //ast_identifier_set_index($$,$3); + } +| SIMPLE_ID OPEN_SQ_BRACKET range_expression CLOSE_SQ_BRACKET{ + $$=$1; + //ast_identifier_set_index($$,$3); + } +| simple_hierarchical_branch DOT simple_identifier{ + // $$ = ast_append_identifier($1,$3); + } +| simple_hierarchical_branch DOT SIMPLE_ID OPEN_SQ_BRACKET expression + CLOSE_SQ_BRACKET { + $$=$3; + ////ast_identifier_set_index($$,$5); + // $$ = ast_append_identifier($1,$$); + } +| simple_hierarchical_branch DOT SIMPLE_ID OPEN_SQ_BRACKET range_expression + CLOSE_SQ_BRACKET{ + $$=$3; + ////ast_identifier_set_index($$,$5); + // $$ = ast_append_identifier($1,$$); + } +; + + +/* Semantic checking needed to make sure that the "expression" +in the closed brackets reduces to an "unsigned_number" */ + +escaped_hierarchical_branch : + escaped_hierarchical_branch DOT escaped_identifier { + // $$ = ast_append_identifier($1,$3); + } +| escaped_hierarchical_branch DOT escaped_identifier OPEN_SQ_BRACKET + expression CLOSE_SQ_BRACKET { + // //ast_identifier_set_index($3,$5); + // $$ = ast_append_identifier($1,$3); + } +| escaped_identifier{ + $$=$1; + } +| escaped_identifier OPEN_SQ_BRACKET expression CLOSE_SQ_BRACKET{ + // //ast_identifier_set_index($1,$3); + $$=$1; + } +| escaped_identifier OPEN_SQ_BRACKET range_expression CLOSE_SQ_BRACKET{ + // //ast_identifier_set_index($1,$3); + $$=$1; + }; + +white_space : SPACE | TAB | NEWLINE; + +%% diff --git a/parser/verilog_parsetree.c b/parser/verilog_parsetree.c new file mode 100644 index 0000000..6d25c61 --- /dev/null +++ b/parser/verilog_parsetree.c @@ -0,0 +1,9 @@ +#include "stdio.h" +#include "object.h" +#include "dlist.h" +#define IMPLEMENT_GUID +#include "verilog_parsetree.h" +#undef IMPLEMENT_GUID + + + diff --git a/parser/verilog_parsetree.h b/parser/verilog_parsetree.h new file mode 100644 index 0000000..27166fd --- /dev/null +++ b/parser/verilog_parsetree.h @@ -0,0 +1,55 @@ + +#ifndef __VERILOG_PARSETREE_H +#define __VERILOG_PARSETREE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ASMLANGUAGE + +#include "guid.h" + +DEFINE_GUID(IID_VERILOG_ROOT, 0xa1fbe4b5, 0xbfb6, 0x41e2, 0xb2, 0xf, 0x5c, 0x14, 0xd1, 0xdf, 0x7c, 0x20); +DEFINE_GUID(IID_VERILOG_NODE, 0x88ec245f, 0xff4c, 0x4d5a, 0xb3, 0xe, 0x59, 0x70, 0x85, 0x42, 0x14, 0x20); + +typedef struct sIVerilogNode { + OBJECT_INTERFACE + int (*dump)(HOBJECT object, FILE * pFile, int opt); +}IVerilogNode; + +#define VERILOGNODE_VARDECLARE +#define VERILOGNODE_VARINIT(_objptr, _clsid) + +#define VERILOGNODE_FUNCDECLARE(_obj, _clsid, _localstruct) \ + static int _obj##_verilognode_dump(HOBJECT object, FILE * pFile, int opt); \ + static const IVerilogNode _obj##_verilognode_interface = { \ + INTERFACE_HEADER(_obj, IVerilogNode, _localstruct) \ + _obj##_verilognode_dump, \ +}; + +typedef struct sIVerilogRoot { + OBJECT_INTERFACE + int (*add_module)(HOBJECT object, HOBJECT module); + int (*add_primitive)(HOBJECT object, HOBJECT udp); +}IVerilogRoot; + +#define VERILOGROOT_VARDECLARE +#define VERILOGROOT_VARINIT(_objptr, _clsid) + +#define VERILOGROOT_FUNCDECLARE(_obj, _clsid, _localstruct) \ + static int _obj##_verilogroot_add_module(HOBJECT object, HOBJECT module); \ + static int _obj##_verilogroot_add_primitive(HOBJECT object, HOBJECT udp); \ + static const IVerilogRoot _obj##_verilogroot_interface = { \ + INTERFACE_HEADER(_obj, IVerilogRoot, _localstruct) \ + _obj##_verilogroot_add_module, \ + _obj##_verilogroot_add_primitive, \ +}; + +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/parser/verilog_root.c b/parser/verilog_root.c new file mode 100644 index 0000000..74c942a --- /dev/null +++ b/parser/verilog_root.c @@ -0,0 +1,115 @@ +#include "stdio.h" +#include "object.h" +#include "dlist.h" +#include "verilog_parsetree.h" +#define IMPLEMENT_GUID +#include "verilog_root.h" +#undef IMPLEMENT_GUID + +typedef struct _sVerilogRoot { + OBJECT_HEADER + INTERFACE_DECLARE(IVerilogRoot) + VERILOGROOT_VARDECLARE + INTERFACE_DECLARE(IVerilogNode) + VERILOGNODE_VARDECLARE + IDListVar modules; + IDListVar primitives; + IDListVar configs; + IDListVar libraries; +}sVerilogRoot; + +OBJECT_FUNCDECLARE(verilogroot, CLSID_VERILOG_ROOT); + +VERILOGROOT_FUNCDECLARE(verilogroot, CLSID_VERILOG_ROOT, sVerilogRoot); +VERILOGNODE_FUNCDECLARE(verilogroot, CLSID_VERILOG_ROOT, sVerilogRoot); + +OBJECT_FUNCIMPL(verilogroot, sVerilogRoot, CLSID_VERILOG_ROOT); + +QUERYINTERFACE_BEGIN(verilogroot, CLSID_VERILOG_ROOT) +QUERYINTERFACE_ITEM(IID_VERILOG_ROOT, IVerilogRoot, sVerilogRoot) +QUERYINTERFACE_ITEM(IID_VERILOG_NODE, IVerilogNode, sVerilogRoot) +QUERYINTERFACE_END + +static const char *verilogrootModuleInfo() +{ + return "1.0.0-20210427.1702 Verilog parse tree root"; +} + +static int verilogrootCreate(const PARAMITEM * pParams, int paramcount, HOBJECT * pObject) +{ + sVerilogRoot * pobj; + pobj = (sVerilogRoot *)malloc(sizeof(sVerilogRoot)); + if (pobj == NULL) + return -1; + + dlistInit(&pobj->modules); + dlistInit(&pobj->primitives); + dlistInit(&pobj->configs); + dlistInit(&pobj->libraries); + *pObject = 0; + VERILOGROOT_VARINIT(pobj, CLSID_VERILOG_ROOT); + VERILOGNODE_VARINIT(pobj, CLSID_VERILOG_ROOT); + INTERFACE_INIT(IVerilogRoot, pobj, verilogroot, verilogroot); + INTERFACE_INIT(IVerilogNode, pobj, verilogroot, verilognode); + + /*ɵĶ*/ + OBJECT_RETURN_GEN(verilogroot, pobj, pObject, CLSID_VERILOG_ROOT); + return EIID_OK; +} + + +static void verilogrootDestroy(HOBJECT object) +{ + sVerilogRoot * pTree; + pTree = (sVerilogRoot *)objectThis(object); + free(pTree); +} + +/* + ܣж϶ǷһЧ + + object -- ָ + ֵ + 0 -- Ч + 1 -- Ч +*/ +static int verilogrootValid(HOBJECT object) +{ + return 1; +} + +static int verilogroot_verilogroot_add_module(HOBJECT object, HOBJECT module) +{ + sVerilogRoot * pTree; + pTree = (sVerilogRoot *)objectThis(object); + + return 0; +} + +static int verilogroot_verilogroot_add_primitive(HOBJECT object, HOBJECT module) +{ + sVerilogRoot * pTree; + pTree = (sVerilogRoot *)objectThis(object); + + return 0; +} + +static int verilogroot_verilognode_dump(HOBJECT object, FILE * pFile, int opt) +{ + sVerilogRoot * pTree; + pTree = (sVerilogRoot *)objectThis(object); + + return 0; +} + +static IVerilogRoot ** pVerilogRoot = NULL; +IVerilogRoot ** getVerilogRoot() +{ + if (pVerilogRoot == NULL) { + A_u_t_o_registor_verilogroot(); + objectCreateEx(CLSID_VERILOG_ROOT, NULL, 0, IID_VERILOG_ROOT, (const void **)&pVerilogRoot); + } + return pVerilogRoot; +} + + diff --git a/parser/verilog_root.h b/parser/verilog_root.h new file mode 100644 index 0000000..485d79f --- /dev/null +++ b/parser/verilog_root.h @@ -0,0 +1,22 @@ + +#ifndef __VERILOG_ROOT_H +#define __VERILOG_ROOT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ASMLANGUAGE + +#include "guid.h" + +DEFINE_GUID(CLSID_VERILOG_ROOT, 0x5d3cde51, 0xdb70, 0x4283, 0x95, 0xe1, 0x0, 0xd3, 0xbf, 0x61, 0x12, 0x36); +IVerilogRoot ** getVerilogRoot(); + +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/parser/verilog_scanner.c b/parser/verilog_scanner.c new file mode 100644 index 0000000..454455c --- /dev/null +++ b/parser/verilog_scanner.c @@ -0,0 +1,2846 @@ +#line 1 "verilog_scanner.c" + +#line 3 "verilog_scanner.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* begin standard C++ headers. */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern int yyleng; + +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires + * access to the local variable yy_act. Since yyless() is a macro, it would break + * existing scanners that call yyless() from OUTSIDE yylex. + * One obvious solution it to make yy_act a global. I tried that, and saw + * a 5% performance hit in a non-yylineno scanner, because yy_act is + * normally declared as a register variable-- so it is not worth it. + */ + #define YY_LESS_LINENO(n) \ + do { \ + int yyl;\ + for ( yyl = n; yyl < yyleng; ++yyl )\ + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = NULL; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); + +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); + +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define yywrap() (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP +typedef flex_uint8_t YY_CHAR; + +FILE *yyin = NULL, *yyout = NULL; + +typedef int yy_state_type; + +extern int yylineno; +int yylineno = 1; + +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state ( void ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); +static int yy_get_next_buffer ( void ); +static void yynoreturn yy_fatal_error ( const char* msg ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; +#define YY_NUM_RULES 102 +#define YY_END_OF_BUFFER 103 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[323] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 103, 101, 100, 98, + 101, 99, 69, 101, 43, 101, 64, 77, 101, 49, + 50, 55, 56, 42, 57, 44, 62, 93, 46, 48, + 68, 45, 67, 83, 41, 96, 51, 101, 52, 79, + 101, 53, 78, 54, 76, 102, 100, 102, 99, 10, + 29, 102, 31, 19, 21, 23, 39, 34, 102, 12, + + 13, 14, 15, 16, 91, 91, 90, 90, 89, 89, + 88, 88, 36, 102, 100, 37, 102, 99, 5, 5, + 5, 5, 5, 5, 98, 75, 0, 97, 94, 70, + 87, 84, 85, 86, 0, 1, 2, 63, 47, 4, + 0, 0, 93, 0, 60, 66, 73, 65, 61, 96, + 95, 80, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 71, 81, 82, 10, 29, 0, 30, 31, + 19, 21, 23, 39, 34, 0, 27, 12, 13, 15, + 16, 91, 91, 90, 90, 89, 89, 88, 88, 36, + 0, 37, 37, 6, 74, 0, 3, 92, 0, 92, + + 58, 72, 59, 95, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 92, 92, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 24, 40, 40, 40, 40, 40, + 40, 28, 40, 40, 40, 40, 40, 40, 40, 40, + 22, 40, 25, 18, 40, 40, 40, 40, 40, 40, + 38, 40, 40, 35, 40, 20, 40, 40, 40, 40, + 40, 40, 40, 40, 26, 40, 40, 40, 40, 40, + 40, 40, 40, 17, 40, 40, 40, 40, 40, 40, + 11, 40, 7, 40, 40, 40, 40, 40, 40, 40, + + 40, 40, 40, 40, 40, 40, 8, 40, 40, 40, + 40, 40, 9, 40, 40, 40, 40, 40, 33, 40, + 32, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 21, 22, + 22, 22, 22, 22, 22, 23, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 31, 33, 34, 31, + 35, 36, 35, 35, 35, 35, 35, 35, 37, 35, + 35, 35, 38, 35, 35, 35, 35, 39, 35, 40, + 41, 42, 43, 44, 45, 46, 47, 32, 48, 49, + + 50, 51, 35, 36, 52, 35, 35, 53, 54, 55, + 56, 57, 35, 58, 59, 60, 61, 62, 35, 63, + 64, 65, 66, 67, 68, 69, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[70] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 4, 4, 4, 1, 1, 1, 1, 1, 5, 1, + 6, 6, 6, 6, 7, 7, 7, 7, 6, 6, + 1, 1, 1, 1, 6, 1, 6, 6, 6, 6, + 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 6, 7, 6, 1, 1, 1, 1 + } ; + +static const flex_int16_t yy_base[346] = + { 0, + 0, 0, 69, 0, 118, 0, 138, 177, 121, 125, + 164, 167, 170, 0, 205, 0, 240, 0, 275, 0, + 310, 0, 190, 369, 372, 0, 171, 226, 417, 0, + 462, 465, 510, 0, 524, 545, 557, 572, 0, 0, + 607, 0, 279, 314, 381, 493, 899, 1030, 1030, 1030, + 895, 1030, 870, 884, 1030, 0, 1030, 879, 567, 872, + 1030, 181, 861, 1030, 853, 1030, 336, 490, 1030, 1030, + 326, 849, 350, 1030, 1030, 0, 1030, 0, 1030, 802, + 625, 1030, 797, 1030, 448, 1030, 1030, 858, 1030, 0, + 569, 849, 606, 0, 0, 0, 0, 0, 847, 666, + + 0, 1030, 669, 0, 673, 676, 489, 497, 688, 703, + 716, 725, 0, 850, 847, 1030, 846, 844, 1030, 1030, + 1030, 839, 1030, 821, 1030, 812, 831, 829, 0, 1030, + 1030, 1030, 1030, 1030, 726, 1030, 1030, 1030, 1030, 1030, + 830, 358, 685, 498, 804, 1030, 802, 1030, 799, 0, + 0, 1030, 0, 776, 768, 109, 346, 759, 754, 758, + 747, 743, 1030, 1030, 1030, 0, 750, 790, 789, 755, + 0, 0, 0, 0, 0, 787, 782, 762, 0, 770, + 0, 780, 783, 541, 542, 792, 795, 823, 830, 0, + 784, 1030, 1030, 1030, 1030, 783, 1030, 844, 366, 851, + + 1030, 1030, 1030, 0, 0, 727, 723, 710, 718, 392, + 712, 702, 691, 691, 695, 350, 858, 861, 694, 366, + 164, 394, 694, 691, 681, 681, 674, 676, 673, 666, + 670, 654, 640, 645, 0, 642, 634, 631, 630, 629, + 615, 0, 605, 590, 590, 593, 585, 584, 580, 582, + 0, 578, 0, 0, 579, 576, 568, 574, 571, 563, + 0, 566, 555, 0, 560, 0, 559, 547, 545, 541, + 533, 525, 531, 523, 0, 514, 512, 503, 507, 497, + 496, 498, 488, 0, 486, 474, 473, 472, 466, 462, + 0, 457, 0, 446, 451, 440, 450, 433, 435, 439, + + 418, 397, 410, 409, 396, 387, 0, 398, 358, 365, + 365, 350, 0, 342, 320, 302, 271, 224, 0, 201, + 0, 1030, 908, 915, 922, 927, 932, 934, 936, 941, + 948, 953, 958, 963, 968, 973, 980, 985, 990, 994, + 998, 1005, 1012, 1017, 1022 + } ; + +static const flex_int16_t yy_def[346] = + { 0, + 322, 1, 322, 3, 3, 5, 5, 5, 5, 5, + 5, 5, 3, 13, 13, 15, 15, 17, 17, 19, + 19, 21, 5, 5, 5, 25, 5, 5, 5, 29, + 5, 5, 5, 33, 5, 5, 5, 5, 1, 1, + 21, 41, 323, 323, 324, 324, 322, 322, 322, 322, + 322, 322, 322, 325, 322, 326, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 327, 322, 328, 322, 322, + 329, 322, 322, 322, 322, 322, 322, 322, 322, 330, + 322, 331, 322, 332, 333, 334, 335, 336, 337, 322, + + 338, 322, 322, 339, 322, 322, 340, 340, 322, 322, + 322, 322, 341, 342, 342, 322, 342, 342, 322, 322, + 322, 322, 322, 322, 322, 322, 325, 325, 326, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 343, 322, 322, 322, 322, 322, 322, 322, 322, 327, + 344, 322, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 322, 322, 322, 330, 322, 331, 331, 322, + 332, 333, 334, 335, 336, 337, 337, 322, 338, 322, + 339, 322, 322, 340, 340, 322, 322, 322, 322, 341, + 342, 322, 322, 322, 322, 343, 322, 322, 322, 322, + + 322, 322, 322, 344, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 322, 322, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 0, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322 + } ; + +static const flex_int16_t yy_nxt[1100] = + { 0, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 68, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 77, 78, 79, 80, 76, 81, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 82, 83, 84, 85, 86, + 87, 50, 88, 89, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 90, + + 90, 90, 90, 90, 90, 90, 90, 90, 90, 86, + 86, 86, 86, 90, 86, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 86, 86, 86, 86, 91, 91, + 91, 93, 93, 93, 92, 93, 93, 93, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 208, 86, 209, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 92, 86, 86, 86, 86, 86, 86, + 102, 86, 86, 86, 137, 138, 99, 86, 86, 86, + + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 86, 86, 86, 235, 94, 236, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 102, 86, 86, 86, 95, + 321, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, + 115, 116, 117, 118, 96, 320, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, + + 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 97, 115, 116, 117, 118, 97, + 319, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 140, 145, 146, 318, 98, 141, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 99, 148, 149, 198, 198, + 198, 317, 120, 121, 122, 123, 200, 200, 200, 86, + 86, 86, 100, 100, 100, 124, 210, 230, 231, 316, + + 211, 315, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 233, 314, 313, 312, 101, 234, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 103, 103, 103, + 223, 237, 311, 310, 309, 238, 224, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 308, 164, 307, + 306, 104, 305, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 105, 105, 105, 105, 105, 105, 304, 303, + 106, 152, 302, 106, 120, 121, 122, 123, 301, 300, + + 105, 106, 299, 105, 106, 298, 297, 124, 142, 296, + 143, 143, 143, 199, 165, 199, 295, 185, 200, 200, + 200, 294, 293, 144, 105, 185, 106, 105, 185, 106, + 107, 107, 107, 292, 143, 291, 185, 290, 108, 144, + 107, 107, 107, 107, 109, 109, 86, 289, 107, 108, + 288, 287, 110, 185, 286, 285, 107, 107, 107, 107, + 107, 185, 109, 110, 284, 109, 109, 86, 283, 185, + 185, 282, 107, 110, 108, 281, 280, 111, 86, 86, + 185, 185, 279, 109, 110, 112, 109, 278, 110, 167, + 167, 167, 111, 86, 86, 111, 112, 277, 131, 132, + + 112, 276, 133, 134, 135, 185, 185, 109, 275, 110, + 111, 112, 274, 167, 273, 132, 272, 271, 270, 111, + 269, 112, 134, 268, 267, 135, 170, 170, 170, 266, + 265, 264, 263, 262, 111, 261, 112, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 260, 259, 258, + 170, 113, 257, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 154, 155, 156, 256, 157, 158, 255, 159, + 254, 253, 160, 252, 161, 162, 178, 178, 178, 180, + 180, 180, 251, 182, 182, 182, 182, 182, 182, 250, + + 249, 183, 248, 142, 183, 143, 143, 143, 186, 186, + 178, 182, 183, 180, 182, 183, 187, 182, 144, 247, + 182, 246, 245, 186, 186, 244, 186, 187, 243, 143, + 242, 187, 186, 241, 144, 182, 188, 183, 182, 240, + 183, 186, 187, 239, 189, 188, 232, 186, 229, 228, + 186, 227, 187, 189, 188, 189, 226, 131, 132, 225, + 188, 133, 134, 188, 189, 186, 222, 187, 221, 188, + 167, 167, 167, 220, 132, 170, 170, 170, 188, 219, + 189, 134, 178, 178, 178, 197, 192, 188, 177, 189, + 180, 180, 180, 177, 167, 169, 169, 216, 215, 170, + + 182, 182, 182, 182, 182, 182, 178, 214, 183, 213, + 212, 183, 186, 186, 180, 186, 186, 207, 182, 183, + 187, 182, 183, 187, 182, 206, 203, 182, 202, 201, + 186, 187, 197, 186, 187, 128, 186, 128, 195, 186, + 194, 125, 182, 188, 183, 182, 192, 183, 193, 192, + 188, 189, 192, 177, 186, 169, 187, 186, 189, 187, + 125, 188, 189, 163, 217, 217, 217, 188, 188, 189, + 152, 218, 218, 218, 188, 147, 139, 144, 217, 217, + 217, 218, 218, 218, 139, 188, 136, 189, 217, 130, + 128, 144, 188, 144, 189, 218, 126, 125, 322, 322, + + 322, 322, 217, 322, 322, 218, 322, 144, 114, 114, + 114, 114, 114, 114, 114, 119, 119, 119, 119, 119, + 119, 119, 127, 322, 127, 127, 127, 127, 127, 129, + 129, 322, 129, 129, 150, 150, 322, 150, 150, 151, + 151, 153, 153, 166, 166, 322, 166, 166, 168, 322, + 168, 168, 168, 168, 168, 171, 171, 322, 171, 171, + 172, 172, 322, 172, 172, 173, 173, 322, 173, 173, + 174, 174, 322, 174, 174, 175, 175, 322, 175, 175, + 176, 322, 176, 176, 176, 176, 176, 179, 179, 322, + 179, 179, 181, 181, 322, 181, 181, 184, 184, 184, + + 190, 190, 322, 190, 190, 191, 191, 191, 191, 191, + 191, 191, 196, 196, 196, 196, 196, 196, 196, 204, + 204, 322, 204, 204, 205, 205, 322, 205, 205, 47, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322 + + } ; + +static const flex_int16_t yy_chk[1100] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, + 5, 9, 9, 9, 7, 10, 10, 10, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, + 7, 156, 5, 156, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 8, 11, 11, 11, 12, 12, 12, + 27, 27, 27, 27, 62, 62, 23, 8, 8, 8, + + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 23, 23, 23, 221, 13, 221, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 28, 28, 28, 28, 15, + 320, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 43, 43, 43, 43, 17, 318, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + + 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 44, 44, 44, 44, 19, + 317, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 67, 71, 71, 316, 21, 67, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 24, 73, 73, 142, 142, + 142, 315, 45, 45, 45, 45, 199, 199, 199, 24, + 24, 24, 25, 25, 25, 45, 157, 216, 216, 314, + + 157, 312, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 220, 311, 310, 309, 25, 220, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 29, 29, 29, + 210, 222, 308, 306, 305, 222, 210, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 304, 85, 303, + 302, 29, 301, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 31, 31, 31, 32, 32, 32, 300, 299, + 31, 85, 298, 32, 46, 46, 46, 46, 297, 296, + + 31, 31, 295, 32, 32, 294, 292, 46, 68, 290, + 68, 68, 68, 144, 85, 144, 289, 107, 144, 144, + 144, 288, 287, 68, 31, 108, 31, 32, 107, 32, + 33, 33, 33, 286, 68, 285, 108, 283, 33, 68, + 33, 33, 33, 33, 35, 35, 35, 282, 33, 33, + 281, 280, 35, 107, 279, 278, 33, 33, 33, 33, + 33, 108, 35, 35, 277, 36, 36, 36, 276, 184, + 185, 274, 33, 36, 33, 273, 272, 37, 37, 37, + 184, 185, 271, 36, 36, 37, 35, 270, 35, 91, + 91, 91, 38, 38, 38, 37, 37, 269, 59, 59, + + 38, 268, 59, 59, 59, 184, 185, 36, 267, 36, + 38, 38, 265, 91, 263, 59, 262, 260, 259, 37, + 258, 37, 59, 257, 256, 59, 93, 93, 93, 255, + 252, 250, 249, 248, 38, 247, 38, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 246, 245, 244, + 93, 41, 243, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 81, 81, 81, 241, 81, 81, 240, 81, + 239, 238, 81, 237, 81, 81, 100, 100, 100, 103, + 103, 103, 236, 105, 105, 105, 106, 106, 106, 234, + + 233, 105, 232, 143, 106, 143, 143, 143, 109, 109, + 100, 105, 105, 103, 106, 106, 109, 105, 143, 231, + 106, 230, 229, 110, 110, 228, 109, 109, 227, 143, + 226, 110, 109, 225, 143, 105, 111, 105, 106, 224, + 106, 110, 110, 223, 111, 112, 219, 110, 215, 214, + 109, 213, 109, 112, 111, 111, 212, 135, 135, 211, + 111, 135, 135, 112, 112, 110, 209, 110, 208, 112, + 167, 167, 167, 207, 135, 170, 170, 170, 111, 206, + 111, 135, 178, 178, 178, 196, 191, 112, 177, 112, + 180, 180, 180, 176, 167, 169, 168, 162, 161, 170, + + 182, 182, 182, 183, 183, 183, 178, 160, 182, 159, + 158, 183, 186, 186, 180, 187, 187, 155, 182, 182, + 186, 183, 183, 187, 182, 154, 149, 183, 147, 145, + 186, 186, 141, 187, 187, 128, 186, 127, 126, 187, + 124, 122, 182, 188, 182, 183, 118, 183, 117, 115, + 189, 188, 114, 99, 186, 92, 186, 187, 189, 187, + 88, 188, 188, 83, 198, 198, 198, 188, 189, 189, + 80, 200, 200, 200, 189, 72, 65, 198, 217, 217, + 217, 218, 218, 218, 63, 188, 60, 188, 198, 58, + 54, 217, 189, 198, 189, 200, 53, 51, 47, 0, + + 0, 0, 217, 0, 0, 218, 0, 217, 323, 323, + 323, 323, 323, 323, 323, 324, 324, 324, 324, 324, + 324, 324, 325, 0, 325, 325, 325, 325, 325, 326, + 326, 0, 326, 326, 327, 327, 0, 327, 327, 328, + 328, 329, 329, 330, 330, 0, 330, 330, 331, 0, + 331, 331, 331, 331, 331, 332, 332, 0, 332, 332, + 333, 333, 0, 333, 333, 334, 334, 0, 334, 334, + 335, 335, 0, 335, 335, 336, 336, 0, 336, 336, + 337, 0, 337, 337, 337, 337, 337, 338, 338, 0, + 338, 338, 339, 339, 0, 339, 339, 340, 340, 340, + + 341, 341, 0, 341, 341, 342, 342, 342, 342, 342, + 342, 342, 343, 343, 343, 343, 343, 343, 343, 344, + 344, 0, 344, 344, 345, 345, 0, 345, 345, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322 + + } ; + +/* Table of booleans, true if rule could match eol. */ +static const flex_int32_t yy_rule_can_match_eol[103] = + { 0, +0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 0, }; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "verilog_scanner.l" +#line 2 "verilog_scanner.l" + #include "verilog_parser.tab.h" + #include "object.h" + #include "preprocess.h" + #include "verilog_preprocess.h" + + static IPreprocess ** preprocess = NULL; + static char * __macroname = NULL; + + int SetPreProcess(HOBJECT object) + { + return objectQueryInterface(object, IID_PREPROCESS, (const void **)&preprocess); + } + + extern int verilog_find_reserved_word(const char * ident); + #define YY_NO_UNISTD_H + + #define YY_INPUT(buf, result, max_size) \ + { \ + result = objectCall2(preprocess, GetText, buf, max_size); \ + } + + #define EMIT_TOKEN(x) if (objectCall0(preprocess, SymbolEmitEnabled)) { return x; } +#line 851 "verilog_scanner.c" +/* Pre-processor definitions */ + +/* Include Directives */ + +/* Times and compiler directives */ + +/* Single character tokens */ +/* Tokens related to numbers */ + +/* Identifiers */ + +/* Attributes */ +/* Comments */ + +/* Strings */ +/* Operators */ +#line 868 "verilog_scanner.c" + +#define INITIAL 0 +#define in_default_nettype 1 +#define in_line_1 2 +#define in_line_2 3 +#define in_line_3 4 +#define in_line_4 5 +#define in_ifdef 6 +#define in_ifndef 7 +#define in_elseif 8 +#define in_undef 9 +#define in_unconnected_drive 10 +#define in_include 11 +#define in_ts_1 12 +#define in_ts_2 13 +#define in_ts_3 14 +#define in_dec_val 15 +#define in_hex_val 16 +#define in_oct_val 17 +#define in_bin_val 18 +#define in_number 19 +#define in_define 20 +#define in_define_t 21 +#define in_comment 22 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals ( void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy ( void ); + +int yyget_debug ( void ); + +void yyset_debug ( int debug_flag ); + +YY_EXTRA_TYPE yyget_extra ( void ); + +void yyset_extra ( YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in ( void ); + +void yyset_in ( FILE * _in_str ); + +FILE *yyget_out ( void ); + +void yyset_out ( FILE * _out_str ); + + int yyget_leng ( void ); + +char *yyget_text ( void ); + +int yyget_lineno ( void ); + +void yyset_lineno ( int _line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap ( void ); +#else +extern int yywrap ( void ); +#endif +#endif + +#ifndef YY_NO_UNPUT + + static void yyunput ( int c, char *buf_ptr ); + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * ); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput ( void ); +#else +static int input ( void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { +#line 199 "verilog_scanner.l" + +#line 1109 "verilog_scanner.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 323 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 1030 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + yylineno++; +; + } + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 200 "verilog_scanner.l" +{EMIT_TOKEN(ATTRIBUTE_START);} + YY_BREAK +case 2: +YY_RULE_SETUP +#line 201 "verilog_scanner.l" +{EMIT_TOKEN(ATTRIBUTE_END);} + YY_BREAK +case 3: +/* rule 3 can match eol */ +YY_RULE_SETUP +#line 203 "verilog_scanner.l" +{/*EMIT_TOKEN(COMMENT_LINE); IGNORE */} + YY_BREAK +case 4: +YY_RULE_SETUP +#line 204 "verilog_scanner.l" +{BEGIN(in_comment); ;} + YY_BREAK +case 5: +/* rule 5 can match eol */ +YY_RULE_SETUP +#line 206 "verilog_scanner.l" +{/* IGNORE */} + YY_BREAK +case 6: +YY_RULE_SETUP +#line 207 "verilog_scanner.l" +{BEGIN(INITIAL); } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 209 "verilog_scanner.l" +{/*verilog_preproc_enter_cell_define();*/} + YY_BREAK +case 8: +YY_RULE_SETUP +#line 210 "verilog_scanner.l" +{/*verilog_preproc_exit_cell_define();*/} + YY_BREAK +case 9: +YY_RULE_SETUP +#line 212 "verilog_scanner.l" +{BEGIN(in_default_nettype);} + YY_BREAK +case 10: +YY_RULE_SETUP +#line 213 "verilog_scanner.l" +{ + objectCall3(preprocess, PreAction, PA_NETTYPE, yytext, ""); + BEGIN(INITIAL); + } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 218 "verilog_scanner.l" +{ + BEGIN(in_ts_1); +} + YY_BREAK +case 12: +YY_RULE_SETUP +#line 221 "verilog_scanner.l" +{ + objectCall2(preprocess, SetParam, "timescale.scale", yytext); +} + YY_BREAK +case 13: +YY_RULE_SETUP +#line 224 "verilog_scanner.l" +{ + BEGIN(in_ts_2); +} + YY_BREAK +case 14: +YY_RULE_SETUP +#line 227 "verilog_scanner.l" +{ + BEGIN(in_ts_3); +} + YY_BREAK +case 15: +YY_RULE_SETUP +#line 230 "verilog_scanner.l" +{ + objectCall2(preprocess, SetParam, "timescale.precision", yytext); +} + YY_BREAK +case 16: +YY_RULE_SETUP +#line 233 "verilog_scanner.l" +{ + BEGIN(INITIAL); +} + YY_BREAK +case 17: +YY_RULE_SETUP +#line 237 "verilog_scanner.l" +{ + /*verilog_preprocessor_resetall();*/ +} + YY_BREAK +case 18: +YY_RULE_SETUP +#line 241 "verilog_scanner.l" +{ + BEGIN(in_ifdef); +} + YY_BREAK +case 19: +YY_RULE_SETUP +#line 244 "verilog_scanner.l" +{ + objectCall3(preprocess, PreAction, PA_IFDEF, yytext, ""); + BEGIN(INITIAL); +} + YY_BREAK +case 20: +YY_RULE_SETUP +#line 249 "verilog_scanner.l" +{ + BEGIN(in_ifndef); +} + YY_BREAK +case 21: +YY_RULE_SETUP +#line 252 "verilog_scanner.l" +{ + objectCall3(preprocess, PreAction, PA_IFNDEF, yytext, ""); + BEGIN(INITIAL); +} + YY_BREAK +case 22: +YY_RULE_SETUP +#line 257 "verilog_scanner.l" +{ + BEGIN(in_elseif); +} + YY_BREAK +case 23: +YY_RULE_SETUP +#line 260 "verilog_scanner.l" +{ + objectCall3(preprocess, PreAction, PA_ELSEIFDEF, yytext, ""); + BEGIN(INITIAL); +} + YY_BREAK +case 24: +YY_RULE_SETUP +#line 265 "verilog_scanner.l" +{ + objectCall3(preprocess, PreAction, PA_ELSE, "", ""); +} + YY_BREAK +case 25: +YY_RULE_SETUP +#line 269 "verilog_scanner.l" +{ + objectCall3(preprocess, PreAction, PA_ENDIF, "", ""); +} + YY_BREAK +case 26: +YY_RULE_SETUP +#line 273 "verilog_scanner.l" +{ + BEGIN(in_include); +} + YY_BREAK +case 27: +YY_RULE_SETUP +#line 276 "verilog_scanner.l" +{ + if (0 == objectCall3(preprocess, PreAction, PA_INCLUDE, yytext, "")) { + yypush_buffer_state(yy_create_buffer(stdin, YY_BUF_SIZE)); + } + BEGIN(INITIAL); +} + YY_BREAK +case 28: +YY_RULE_SETUP +#line 283 "verilog_scanner.l" +{BEGIN(in_line_1);} + YY_BREAK +case 29: +YY_RULE_SETUP +#line 284 "verilog_scanner.l" +{BEGIN(in_line_2);} + YY_BREAK +case 30: +YY_RULE_SETUP +#line 285 "verilog_scanner.l" +{BEGIN(in_line_3);} + YY_BREAK +case 31: +YY_RULE_SETUP +#line 286 "verilog_scanner.l" +{BEGIN(INITIAL);} + YY_BREAK +case 32: +YY_RULE_SETUP +#line 288 "verilog_scanner.l" +{ + objectCall2(preprocess, SetParam, "nounconnected_drive", "NONE"); +} + YY_BREAK +case 33: +YY_RULE_SETUP +#line 291 "verilog_scanner.l" +{ + BEGIN(in_unconnected_drive); +} + YY_BREAK +case 34: +YY_RULE_SETUP +#line 294 "verilog_scanner.l" +{ + objectCall2(preprocess, SetParam, "nounconnected_drive", yytext); + BEGIN(INITIAL); +} + YY_BREAK +case 35: +YY_RULE_SETUP +#line 299 "verilog_scanner.l" +{ + BEGIN(in_define); +} + YY_BREAK +case 36: +YY_RULE_SETUP +#line 303 "verilog_scanner.l" +{ + __macroname = strdup(yytext); + BEGIN(in_define_t); +} + YY_BREAK +case 37: +/* rule 37 can match eol */ +YY_RULE_SETUP +#line 308 "verilog_scanner.l" +{ + if(yyleng == 1) + { + // Macro has no value, and is just a newline character. + objectCall3(preprocess, PreAction, PA_DEFINE, __macroname, ""); + } + else + { + objectCall3(preprocess, PreAction, PA_DEFINE, __macroname, yytext+1); + } + free(__macroname); + BEGIN(INITIAL); +} + YY_BREAK +case 38: +YY_RULE_SETUP +#line 322 "verilog_scanner.l" +{ + BEGIN(in_undef); +} + YY_BREAK +case 39: +YY_RULE_SETUP +#line 326 "verilog_scanner.l" +{ + objectCall3(preprocess, PreAction, PA_UNDEF, yytext, ""); + BEGIN(INITIAL); +} + YY_BREAK +case 40: +YY_RULE_SETUP +#line 331 "verilog_scanner.l" +{ + if (0 == objectCall3(preprocess, PreAction, PA_MACRO, (yytext)+1, "")) { + yypush_buffer_state(yy_create_buffer(stdin, YY_BUF_SIZE)); + } +} + YY_BREAK +case 41: +YY_RULE_SETUP +#line 337 "verilog_scanner.l" +{EMIT_TOKEN(AT);} + YY_BREAK +case 42: +YY_RULE_SETUP +#line 338 "verilog_scanner.l" +{EMIT_TOKEN(COMMA);} + YY_BREAK +case 43: +YY_RULE_SETUP +#line 339 "verilog_scanner.l" +{EMIT_TOKEN(HASH);} + YY_BREAK +case 44: +YY_RULE_SETUP +#line 340 "verilog_scanner.l" +{EMIT_TOKEN(DOT);} + YY_BREAK +case 45: +YY_RULE_SETUP +#line 341 "verilog_scanner.l" +{yylval.operator = OPERATOR_L_EQ; EMIT_TOKEN(EQ);} + YY_BREAK +case 46: +YY_RULE_SETUP +#line 342 "verilog_scanner.l" +{EMIT_TOKEN(COLON);} + YY_BREAK +case 47: +YY_RULE_SETUP +#line 343 "verilog_scanner.l" +{EMIT_TOKEN(IDX_PRT_SEL);} + YY_BREAK +case 48: +YY_RULE_SETUP +#line 344 "verilog_scanner.l" +{EMIT_TOKEN(SEMICOLON);} + YY_BREAK +case 49: +YY_RULE_SETUP +#line 345 "verilog_scanner.l" +{EMIT_TOKEN(OPEN_BRACKET);} + YY_BREAK +case 50: +YY_RULE_SETUP +#line 346 "verilog_scanner.l" +{EMIT_TOKEN(CLOSE_BRACKET);} + YY_BREAK +case 51: +YY_RULE_SETUP +#line 347 "verilog_scanner.l" +{EMIT_TOKEN(OPEN_SQ_BRACKET);} + YY_BREAK +case 52: +YY_RULE_SETUP +#line 348 "verilog_scanner.l" +{EMIT_TOKEN(CLOSE_SQ_BRACKET);} + YY_BREAK +case 53: +YY_RULE_SETUP +#line 349 "verilog_scanner.l" +{EMIT_TOKEN(OPEN_SQ_BRACE);} + YY_BREAK +case 54: +YY_RULE_SETUP +#line 350 "verilog_scanner.l" +{EMIT_TOKEN(CLOSE_SQ_BRACE);} + YY_BREAK +case 55: +YY_RULE_SETUP +#line 351 "verilog_scanner.l" +{ yylval.operator=OPERATOR_STAR ; EMIT_TOKEN(STAR);} + YY_BREAK +case 56: +YY_RULE_SETUP +#line 352 "verilog_scanner.l" +{ yylval.operator=OPERATOR_PLUS ; EMIT_TOKEN(PLUS);} + YY_BREAK +case 57: +YY_RULE_SETUP +#line 353 "verilog_scanner.l" +{ yylval.operator=OPERATOR_MINUS ; EMIT_TOKEN(MINUS);} + YY_BREAK +case 58: +YY_RULE_SETUP +#line 354 "verilog_scanner.l" +{ yylval.operator=OPERATOR_ASL ; EMIT_TOKEN(ASL);} + YY_BREAK +case 59: +YY_RULE_SETUP +#line 355 "verilog_scanner.l" +{ yylval.operator=OPERATOR_ASR ; EMIT_TOKEN(ASR);} + YY_BREAK +case 60: +YY_RULE_SETUP +#line 356 "verilog_scanner.l" +{ yylval.operator=OPERATOR_LSL ; EMIT_TOKEN(LSL);} + YY_BREAK +case 61: +YY_RULE_SETUP +#line 357 "verilog_scanner.l" +{ yylval.operator=OPERATOR_LSR ; EMIT_TOKEN(LSR);} + YY_BREAK +case 62: +YY_RULE_SETUP +#line 358 "verilog_scanner.l" +{ yylval.operator=OPERATOR_DIV ; EMIT_TOKEN(DIV);} + YY_BREAK +case 63: +YY_RULE_SETUP +#line 359 "verilog_scanner.l" +{ yylval.operator=OPERATOR_POW ; EMIT_TOKEN(POW);} + YY_BREAK +case 64: +YY_RULE_SETUP +#line 360 "verilog_scanner.l" +{ yylval.operator=OPERATOR_MOD ; EMIT_TOKEN(MOD);} + YY_BREAK +case 65: +YY_RULE_SETUP +#line 361 "verilog_scanner.l" +{ yylval.operator=OPERATOR_GTE ; EMIT_TOKEN(GTE);} + YY_BREAK +case 66: +YY_RULE_SETUP +#line 362 "verilog_scanner.l" +{ yylval.operator=OPERATOR_LTE ; EMIT_TOKEN(LTE);} + YY_BREAK +case 67: +YY_RULE_SETUP +#line 363 "verilog_scanner.l" +{ yylval.operator=OPERATOR_GT ; EMIT_TOKEN(GT);} + YY_BREAK +case 68: +YY_RULE_SETUP +#line 364 "verilog_scanner.l" +{ yylval.operator=OPERATOR_LT ; EMIT_TOKEN(LT);} + YY_BREAK +case 69: +YY_RULE_SETUP +#line 365 "verilog_scanner.l" +{ yylval.operator=OPERATOR_L_NEG ; EMIT_TOKEN(L_NEG);} + YY_BREAK +case 70: +YY_RULE_SETUP +#line 366 "verilog_scanner.l" +{ yylval.operator=OPERATOR_L_AND ; EMIT_TOKEN(L_AND);} + YY_BREAK +case 71: +YY_RULE_SETUP +#line 367 "verilog_scanner.l" +{ yylval.operator=OPERATOR_L_OR ; EMIT_TOKEN(L_OR);} + YY_BREAK +case 72: +YY_RULE_SETUP +#line 368 "verilog_scanner.l" +{ yylval.operator=OPERATOR_C_EQ ; EMIT_TOKEN(C_EQ);} + YY_BREAK +case 73: +YY_RULE_SETUP +#line 369 "verilog_scanner.l" +{ yylval.operator=OPERATOR_L_EQ ; EMIT_TOKEN(L_EQ);} + YY_BREAK +case 74: +YY_RULE_SETUP +#line 370 "verilog_scanner.l" +{ yylval.operator=OPERATOR_C_NEQ ; EMIT_TOKEN(C_NEQ);} + YY_BREAK +case 75: +YY_RULE_SETUP +#line 371 "verilog_scanner.l" +{ yylval.operator=OPERATOR_L_NEQ ; EMIT_TOKEN(L_NEQ);} + YY_BREAK +case 76: +YY_RULE_SETUP +#line 372 "verilog_scanner.l" +{ yylval.operator=OPERATOR_B_NEG ; EMIT_TOKEN(B_NEG);} + YY_BREAK +case 77: +YY_RULE_SETUP +#line 373 "verilog_scanner.l" +{ yylval.operator=OPERATOR_B_AND ; EMIT_TOKEN(B_AND);} + YY_BREAK +case 78: +YY_RULE_SETUP +#line 374 "verilog_scanner.l" +{ yylval.operator=OPERATOR_B_OR ; EMIT_TOKEN(B_OR);} + YY_BREAK +case 79: +YY_RULE_SETUP +#line 375 "verilog_scanner.l" +{ yylval.operator=OPERATOR_B_XOR ; EMIT_TOKEN(B_XOR);} + YY_BREAK +case 80: +YY_RULE_SETUP +#line 376 "verilog_scanner.l" +{ yylval.operator=OPERATOR_B_EQU ; EMIT_TOKEN(B_EQU);} + YY_BREAK +case 81: +YY_RULE_SETUP +#line 377 "verilog_scanner.l" +{ yylval.operator=OPERATOR_B_NAND ; EMIT_TOKEN(B_NAND);} + YY_BREAK +case 82: +YY_RULE_SETUP +#line 378 "verilog_scanner.l" +{ yylval.operator=OPERATOR_B_NOR ; EMIT_TOKEN(B_NOR);} + YY_BREAK +case 83: +YY_RULE_SETUP +#line 379 "verilog_scanner.l" +{ yylval.operator=OPERATOR_TERNARY; EMIT_TOKEN(TERNARY);} + YY_BREAK +case 84: +YY_RULE_SETUP +#line 381 "verilog_scanner.l" +{BEGIN(in_dec_val); EMIT_TOKEN(DEC_BASE);} + YY_BREAK +case 85: +YY_RULE_SETUP +#line 382 "verilog_scanner.l" +{BEGIN(in_hex_val); EMIT_TOKEN(HEX_BASE);} + YY_BREAK +case 86: +YY_RULE_SETUP +#line 383 "verilog_scanner.l" +{BEGIN(in_oct_val); EMIT_TOKEN(OCT_BASE);} + YY_BREAK +case 87: +YY_RULE_SETUP +#line 384 "verilog_scanner.l" +{BEGIN(in_bin_val); EMIT_TOKEN(BIN_BASE);} + YY_BREAK +case 88: +YY_RULE_SETUP +#line 386 "verilog_scanner.l" +{BEGIN(INITIAL); yylval.string = _strdup(yytext); EMIT_TOKEN(BIN_VALUE);} + YY_BREAK +case 89: +YY_RULE_SETUP +#line 387 "verilog_scanner.l" +{BEGIN(INITIAL); yylval.string = _strdup(yytext); EMIT_TOKEN(OCT_VALUE);} + YY_BREAK +case 90: +YY_RULE_SETUP +#line 388 "verilog_scanner.l" +{BEGIN(INITIAL); yylval.string = _strdup(yytext); EMIT_TOKEN(HEX_VALUE);} + YY_BREAK +case 91: +YY_RULE_SETUP +#line 389 "verilog_scanner.l" +{BEGIN(INITIAL); yylval.string = _strdup(yytext); EMIT_TOKEN(DEC_VALUE);} + YY_BREAK +case 92: +YY_RULE_SETUP +#line 392 "verilog_scanner.l" +{yylval.string=_strdup(yytext);EMIT_TOKEN(NUM_REAL);} + YY_BREAK +case 93: +YY_RULE_SETUP +#line 393 "verilog_scanner.l" +{ + yylval.string=_strdup(yytext); + EMIT_TOKEN(UNSIGNED_NUMBER); + } + YY_BREAK +case 94: +YY_RULE_SETUP +#line 398 "verilog_scanner.l" +{ + /*yylval.identifier = ast_new_identifier(yytext,yylineno);*/ + yylval.string=_strdup(yytext); + EMIT_TOKEN(SYSTEM_ID); +} + YY_BREAK +case 95: +YY_RULE_SETUP +#line 403 "verilog_scanner.l" +{ + /*yylval.identifier = ast_new_identifier(yytext,yylineno);*/ + yylval.string=_strdup(yytext); + EMIT_TOKEN(ESCAPED_ID); +} + YY_BREAK +case 96: +YY_RULE_SETUP +#line 408 "verilog_scanner.l" +{ + /*yylval.identifier = ast_new_identifier(yytext,yylineno);*/ + yylval.string=_strdup(yytext); + if (objectCall0(preprocess, SymbolEmitEnabled)) { + int id = verilog_find_reserved_word(yytext); + if (id == -1) { + EMIT_TOKEN(SIMPLE_ID); + } else { + EMIT_TOKEN(id); + } + } +} + YY_BREAK +case 97: +YY_RULE_SETUP +#line 421 "verilog_scanner.l" +{yylval.string= _strdup(yytext);EMIT_TOKEN(STRING);} + YY_BREAK +case 98: +/* rule 98 can match eol */ +YY_RULE_SETUP +#line 423 "verilog_scanner.l" +{/*EMIT_TOKEN(NEWLINE); IGNORE */ } + YY_BREAK +case 99: +YY_RULE_SETUP +#line 424 "verilog_scanner.l" +{/*EMIT_TOKEN(SPACE); IGNORE */ } + YY_BREAK +case 100: +YY_RULE_SETUP +#line 425 "verilog_scanner.l" +{/*EMIT_TOKEN(TAB); IGNORE */ } + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(in_default_nettype): +case YY_STATE_EOF(in_line_1): +case YY_STATE_EOF(in_line_2): +case YY_STATE_EOF(in_line_3): +case YY_STATE_EOF(in_line_4): +case YY_STATE_EOF(in_ifdef): +case YY_STATE_EOF(in_ifndef): +case YY_STATE_EOF(in_elseif): +case YY_STATE_EOF(in_undef): +case YY_STATE_EOF(in_unconnected_drive): +case YY_STATE_EOF(in_include): +case YY_STATE_EOF(in_ts_1): +case YY_STATE_EOF(in_ts_2): +case YY_STATE_EOF(in_ts_3): +case YY_STATE_EOF(in_dec_val): +case YY_STATE_EOF(in_hex_val): +case YY_STATE_EOF(in_oct_val): +case YY_STATE_EOF(in_bin_val): +case YY_STATE_EOF(in_number): +case YY_STATE_EOF(in_define): +case YY_STATE_EOF(in_define_t): +case YY_STATE_EOF(in_comment): +#line 427 "verilog_scanner.l" +{ + + yypop_buffer_state(); + + if ( !YY_CURRENT_BUFFER ) + { + yyterminate(); + } + else + { + YY_BUFFER_STATE cur = YY_CURRENT_BUFFER; + yylineno = cur -> yy_bs_lineno; + } +} + YY_BREAK +case 101: +YY_RULE_SETUP +#line 442 "verilog_scanner.l" +{ + EMIT_TOKEN(ANY); +} + YY_BREAK +case 102: +YY_RULE_SETUP +#line 446 "verilog_scanner.l" +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK +#line 1829 "verilog_scanner.c" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 323 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 323 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 322); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp ) +{ + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ){ + --yylineno; + } + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + if ( c == '\n' ) + + yylineno++; +; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); + + yyfree( (void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (const char * yystr ) +{ + + return yy_scan_bytes( yystr, (int) strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (const char* msg ) +{ + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param _line_number line number + * + */ +void yyset_lineno (int _line_number ) +{ + + yylineno = _line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * _in_str ) +{ + yyin = _in_str ; +} + +void yyset_out (FILE * _out_str ) +{ + yyout = _out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int _bdebug ) +{ + yy_flex_debug = _bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + /* We do not touch yylineno unless the option is enabled. */ + yylineno = 1; + + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 446 "verilog_scanner.l" + + diff --git a/parser/verilog_scanner.l b/parser/verilog_scanner.l new file mode 100644 index 0000000..3ade2a9 --- /dev/null +++ b/parser/verilog_scanner.l @@ -0,0 +1,446 @@ +%{ + #include "verilog_parser.tab.h" + #include "object.h" + #include "preprocess.h" + #include "verilog_preprocess.h" + + static IPreprocess ** preprocess = NULL; + static char * __macroname = NULL; + + int SetPreProcess(HOBJECT object) + { + return objectQueryInterface(object, IID_PREPROCESS, (const void **)&preprocess); + } + + extern int verilog_find_reserved_word(const char * ident); + #define YY_NO_UNISTD_H + + #define YY_INPUT(buf, result, max_size) \ + { \ + result = objectCall2(preprocess, GetText, buf, max_size); \ + } + + #define EMIT_TOKEN(x) if (objectCall0(preprocess, SymbolEmitEnabled)) { return x; } +%} + +%option outfile="verilog_scanner.c" +%option yylineno +%option nodefault +%option noyywrap + +/* Pre-processor definitions */ +CD_DEFAULT_NETTYPE "`default_nettype" +%x in_default_nettype + +CD_LINE "`line" +%x in_line_1 +%x in_line_2 +%x in_line_3 +%x in_line_4 + +CD_CELLDEFINE "`celldefine" +CD_DEFINE "`define" +CD_RESETALL "`resetall" +CD_ENDCELLDEFINE "`endcelldefine" + +CD_ELSE "`else" +CD_ELSIF "`elsif" +CD_ENDIF "`endif" +CD_IFDEF "`ifdef" +CD_IFNDEF "`ifndef" + +%x in_ifdef +%x in_ifndef +%x in_elseif + +CD_UNDEF "`undef" + +%x in_undef + +CD_NOUNCONNECTED_DRIVE "`nounconnected_drive" +CD_UNCONNECTED_DRIVE "`unconnected_drive" + +%x in_unconnected_drive + +/* Include Directives */ + +CD_INCLUDE "`include" + +%x in_include + +/* Times and compiler directives */ + +CD_TIMESCALE "`timescale" +TIME_UNITS "(s|ms|us|ns|ps|fs)" +%x in_ts_1 +%x in_ts_2 +%x in_ts_3 + + +/* Single character tokens */ + +NEWLINE "\n"|"\r\n" +SPACE " " +TAB "\t" + +AT "@" +COMMA "," +HASH "#" +DOT "." +EQ "=" +COLON ":" +IDX_PRT_SEL "+:"|"-:" +SEMICOLON ";" +OPEN_BRACKET "\(" +CLOSE_BRACKET "\)" +OPEN_SQ_BRACKET "\[" +CLOSE_SQ_BRACKET "\]" +OPEN_SQ_BRACE "{" +CLOSE_SQ_BRACE "}" + + +/* Tokens related to numbers */ + +EXP "e"|"E" +UNDERSCORE "_" +SIGN {PLUS}|{MINUS} +X "x"|"X" +Z "z"|"Z"|"?" + +DIGIT_DECIMAL [0-9] +DIGIT_DECMIAL_NZ [1-9] +DIGIT_BINARY [0-1]|{X}|{Z} +DIGIT_OCTAL [0-7]|{X}|{Z} +DIGIT_HEX [0-9a-fA-F]|{X}|{Z} +DIGIT_DEC [0-9]|{X}|{Z} + +BASE_DECIMAL '[sS]?[dD] +BASE_BINARY '[sS]?[bB] +BASE_OCTAL '[sS]?[oO] +BASE_HEX '[sS]?[hH] + +NUM_REAL_EXP {NUM_UNSIGNED}({DOT}{NUM_UNSIGNED})?{EXP}({SIGN})?{NUM_UNSIGNED} + +BIN_VALUE {DIGIT_BINARY}({UNDERSCORE}|{DIGIT_BINARY})* +OCT_VALUE {DIGIT_OCTAL}({UNDERSCORE}|{DIGIT_OCTAL})* +HEX_VALUE {DIGIT_HEX}({UNDERSCORE}|{DIGIT_HEX})* +DEC_VALUE {DIGIT_DEC}({UNDERSCORE}|{DIGIT_DEC})* + +%x in_dec_val +%x in_hex_val +%x in_oct_val +%x in_bin_val +%s in_number + +NUM_REAL {NUM_UNSIGNED}{DOT}{NUM_UNSIGNED}|{NUM_REAL_EXP} +NUM_UNSIGNED {DIGIT_DECIMAL}({UNDERSCORE}|{DIGIT_DECIMAL})* + +/* Identifiers */ + +SYSTEM_ID \$[a-zA-Z0-9_\$]+ +SIMPLE_ID [a-zA-Z_][a-zA-Z0-9_$]* +ESCAPED_ID \\{SIMPLE_ID} +MACRO_IDENTIFIER `{SIMPLE_ID} + +MACRO_TEXT .*\n + +%x in_define +%x in_define_t + +/* Attributes */ + +ATTRIBUTE_START \(\* +ATTRIBUTE_END \*\) + +/* Comments */ +COMMENT_LINE "//".*\n + +COMMENT_BEGIN "/*" +COMMENT_END "*/" + +%x in_comment + +/* Strings */ + +STRING \".*\" + +/* Operators */ + +STAR "\*" +PLUS "+" +MINUS "-" +ASL "<<<" +ASR ">>>" +LSL "<<" +LSR ">>" +DIV "/" +POW "**" +MOD "%" +GTE ">=" +LTE "<=" +GT ">" +LT "<" +L_NEG "!" +L_AND "&&" +L_OR "||" +C_EQ "===" +L_EQ "==" +C_NEQ "!==" +L_NEQ "!=" +B_NEG "~" +B_AND "&" +B_OR "|" +B_XOR "^" +B_EQU "^~"|"~^" +B_NAND "~&" +B_NOR "~|" +TERNARY "?" + +%% +{ATTRIBUTE_START} {EMIT_TOKEN(ATTRIBUTE_START);} +{ATTRIBUTE_END} {EMIT_TOKEN(ATTRIBUTE_END);} + +{COMMENT_LINE} {/*EMIT_TOKEN(COMMENT_LINE); IGNORE */} +{COMMENT_BEGIN} {BEGIN(in_comment); ;} + +.|\n {/* IGNORE */} +{COMMENT_END} {BEGIN(INITIAL); } + +{CD_CELLDEFINE} {/*verilog_preproc_enter_cell_define();*/} +{CD_ENDCELLDEFINE} {/*verilog_preproc_exit_cell_define();*/} + +{CD_DEFAULT_NETTYPE} {BEGIN(in_default_nettype);} +{SIMPLE_ID} { + objectCall3(preprocess, PreAction, PA_NETTYPE, yytext, ""); + BEGIN(INITIAL); + } + +{CD_TIMESCALE} { + BEGIN(in_ts_1); +} +{NUM_UNSIGNED} { + objectCall2(preprocess, SetParam, "timescale.scale", yytext); +} +{SIMPLE_ID} { + BEGIN(in_ts_2); +} +{DIV} { + BEGIN(in_ts_3); +} +{NUM_UNSIGNED} { + objectCall2(preprocess, SetParam, "timescale.precision", yytext); +} +{SIMPLE_ID} { + BEGIN(INITIAL); +} + +{CD_RESETALL} { + /*verilog_preprocessor_resetall();*/ +} + +{CD_IFDEF} { + BEGIN(in_ifdef); +} +{SIMPLE_ID} { + objectCall3(preprocess, PreAction, PA_IFDEF, yytext, ""); + BEGIN(INITIAL); +} + +{CD_IFNDEF} { + BEGIN(in_ifndef); +} +{SIMPLE_ID} { + objectCall3(preprocess, PreAction, PA_IFNDEF, yytext, ""); + BEGIN(INITIAL); +} + +{CD_ELSIF} { + BEGIN(in_elseif); +} +{SIMPLE_ID} { + objectCall3(preprocess, PreAction, PA_ELSEIFDEF, yytext, ""); + BEGIN(INITIAL); +} + +{CD_ELSE} { + objectCall3(preprocess, PreAction, PA_ELSE, "", ""); +} + +{CD_ENDIF} { + objectCall3(preprocess, PreAction, PA_ENDIF, "", ""); +} + +{CD_INCLUDE} { + BEGIN(in_include); +} +{STRING} { + if (0 == objectCall3(preprocess, PreAction, PA_INCLUDE, yytext, "")) { + yypush_buffer_state(yy_create_buffer(stdin, YY_BUF_SIZE)); + } + BEGIN(INITIAL); +} + +{CD_LINE} {BEGIN(in_line_1);} +{NUM_UNSIGNED} {BEGIN(in_line_2);} +{STRING} {BEGIN(in_line_3);} +{NUM_UNSIGNED} {BEGIN(INITIAL);} + +{CD_NOUNCONNECTED_DRIVE} { + objectCall2(preprocess, SetParam, "nounconnected_drive", "NONE"); +} +{CD_UNCONNECTED_DRIVE} { + BEGIN(in_unconnected_drive); +} +{SIMPLE_ID} { + objectCall2(preprocess, SetParam, "nounconnected_drive", yytext); + BEGIN(INITIAL); +} + +{CD_DEFINE} { + BEGIN(in_define); +} + +{SIMPLE_ID} { + __macroname = strdup(yytext); + BEGIN(in_define_t); +} + +{MACRO_TEXT} { + if(yyleng == 1) + { + // Macro has no value, and is just a newline character. + objectCall3(preprocess, PreAction, PA_DEFINE, __macroname, ""); + } + else + { + objectCall3(preprocess, PreAction, PA_DEFINE, __macroname, yytext+1); + } + free(__macroname); + BEGIN(INITIAL); +} + +{CD_UNDEF} { + BEGIN(in_undef); +} + +{SIMPLE_ID} { + objectCall3(preprocess, PreAction, PA_UNDEF, yytext, ""); + BEGIN(INITIAL); +} + +{MACRO_IDENTIFIER} { + if (0 == objectCall3(preprocess, PreAction, PA_MACRO, (yytext)+1, "")) { + yypush_buffer_state(yy_create_buffer(stdin, YY_BUF_SIZE)); + } +} + +{AT} {EMIT_TOKEN(AT);} +{COMMA} {EMIT_TOKEN(COMMA);} +{HASH} {EMIT_TOKEN(HASH);} +{DOT} {EMIT_TOKEN(DOT);} +{EQ} {yylval.operator = OPERATOR_L_EQ; EMIT_TOKEN(EQ);} +{COLON} {EMIT_TOKEN(COLON);} +{IDX_PRT_SEL} {EMIT_TOKEN(IDX_PRT_SEL);} +{SEMICOLON} {EMIT_TOKEN(SEMICOLON);} +{OPEN_BRACKET} {EMIT_TOKEN(OPEN_BRACKET);} +{CLOSE_BRACKET} {EMIT_TOKEN(CLOSE_BRACKET);} +{OPEN_SQ_BRACKET} {EMIT_TOKEN(OPEN_SQ_BRACKET);} +{CLOSE_SQ_BRACKET} {EMIT_TOKEN(CLOSE_SQ_BRACKET);} +{OPEN_SQ_BRACE} {EMIT_TOKEN(OPEN_SQ_BRACE);} +{CLOSE_SQ_BRACE} {EMIT_TOKEN(CLOSE_SQ_BRACE);} +{STAR} { yylval.operator=OPERATOR_STAR ; EMIT_TOKEN(STAR);} +{PLUS} { yylval.operator=OPERATOR_PLUS ; EMIT_TOKEN(PLUS);} +{MINUS} { yylval.operator=OPERATOR_MINUS ; EMIT_TOKEN(MINUS);} +{ASL} { yylval.operator=OPERATOR_ASL ; EMIT_TOKEN(ASL);} +{ASR} { yylval.operator=OPERATOR_ASR ; EMIT_TOKEN(ASR);} +{LSL} { yylval.operator=OPERATOR_LSL ; EMIT_TOKEN(LSL);} +{LSR} { yylval.operator=OPERATOR_LSR ; EMIT_TOKEN(LSR);} +{DIV} { yylval.operator=OPERATOR_DIV ; EMIT_TOKEN(DIV);} +{POW} { yylval.operator=OPERATOR_POW ; EMIT_TOKEN(POW);} +{MOD} { yylval.operator=OPERATOR_MOD ; EMIT_TOKEN(MOD);} +{GTE} { yylval.operator=OPERATOR_GTE ; EMIT_TOKEN(GTE);} +{LTE} { yylval.operator=OPERATOR_LTE ; EMIT_TOKEN(LTE);} +{GT} { yylval.operator=OPERATOR_GT ; EMIT_TOKEN(GT);} +{LT} { yylval.operator=OPERATOR_LT ; EMIT_TOKEN(LT);} +{L_NEG} { yylval.operator=OPERATOR_L_NEG ; EMIT_TOKEN(L_NEG);} +{L_AND} { yylval.operator=OPERATOR_L_AND ; EMIT_TOKEN(L_AND);} +{L_OR} { yylval.operator=OPERATOR_L_OR ; EMIT_TOKEN(L_OR);} +{C_EQ} { yylval.operator=OPERATOR_C_EQ ; EMIT_TOKEN(C_EQ);} +{L_EQ} { yylval.operator=OPERATOR_L_EQ ; EMIT_TOKEN(L_EQ);} +{C_NEQ} { yylval.operator=OPERATOR_C_NEQ ; EMIT_TOKEN(C_NEQ);} +{L_NEQ} { yylval.operator=OPERATOR_L_NEQ ; EMIT_TOKEN(L_NEQ);} +{B_NEG} { yylval.operator=OPERATOR_B_NEG ; EMIT_TOKEN(B_NEG);} +{B_AND} { yylval.operator=OPERATOR_B_AND ; EMIT_TOKEN(B_AND);} +{B_OR} { yylval.operator=OPERATOR_B_OR ; EMIT_TOKEN(B_OR);} +{B_XOR} { yylval.operator=OPERATOR_B_XOR ; EMIT_TOKEN(B_XOR);} +{B_EQU} { yylval.operator=OPERATOR_B_EQU ; EMIT_TOKEN(B_EQU);} +{B_NAND} { yylval.operator=OPERATOR_B_NAND ; EMIT_TOKEN(B_NAND);} +{B_NOR} { yylval.operator=OPERATOR_B_NOR ; EMIT_TOKEN(B_NOR);} +{TERNARY} { yylval.operator=OPERATOR_TERNARY; EMIT_TOKEN(TERNARY);} + +{BASE_DECIMAL} {BEGIN(in_dec_val); EMIT_TOKEN(DEC_BASE);} +{BASE_HEX} {BEGIN(in_hex_val); EMIT_TOKEN(HEX_BASE);} +{BASE_OCTAL} {BEGIN(in_oct_val); EMIT_TOKEN(OCT_BASE);} +{BASE_BINARY} {BEGIN(in_bin_val); EMIT_TOKEN(BIN_BASE);} + +{BIN_VALUE} {BEGIN(INITIAL); yylval.string = _strdup(yytext); EMIT_TOKEN(BIN_VALUE);} +{OCT_VALUE} {BEGIN(INITIAL); yylval.string = _strdup(yytext); EMIT_TOKEN(OCT_VALUE);} +{HEX_VALUE} {BEGIN(INITIAL); yylval.string = _strdup(yytext); EMIT_TOKEN(HEX_VALUE);} +{DEC_VALUE} {BEGIN(INITIAL); yylval.string = _strdup(yytext); EMIT_TOKEN(DEC_VALUE);} + + +{NUM_REAL} {yylval.string=_strdup(yytext);EMIT_TOKEN(NUM_REAL);} +{NUM_UNSIGNED} { + yylval.string=_strdup(yytext); + EMIT_TOKEN(UNSIGNED_NUMBER); + } + +{SYSTEM_ID} { + /*yylval.identifier = ast_new_identifier(yytext,yylineno);*/ + yylval.string=_strdup(yytext); + EMIT_TOKEN(SYSTEM_ID); +} +{ESCAPED_ID} { + /*yylval.identifier = ast_new_identifier(yytext,yylineno);*/ + yylval.string=_strdup(yytext); + EMIT_TOKEN(ESCAPED_ID); +} +{SIMPLE_ID} { + /*yylval.identifier = ast_new_identifier(yytext,yylineno);*/ + yylval.string=_strdup(yytext); + if (objectCall0(preprocess, SymbolEmitEnabled)) { + int id = verilog_find_reserved_word(yytext); + if (id == -1) { + EMIT_TOKEN(SIMPLE_ID); + } else { + EMIT_TOKEN(id); + } + } +} + +{STRING} {yylval.string= _strdup(yytext);EMIT_TOKEN(STRING);} + +<*>{NEWLINE} {/*EMIT_TOKEN(NEWLINE); IGNORE */ } +<*>{SPACE} {/*EMIT_TOKEN(SPACE); IGNORE */ } +<*>{TAB} {/*EMIT_TOKEN(TAB); IGNORE */ } + +<> { + + yypop_buffer_state(); + + if ( !YY_CURRENT_BUFFER ) + { + yyterminate(); + } + else + { + YY_BUFFER_STATE cur = YY_CURRENT_BUFFER; + yylineno = cur -> yy_bs_lineno; + } +} + +. { + EMIT_TOKEN(ANY); +} + +%% diff --git a/parser/verlog.y b/parser/verlog.y new file mode 100644 index 0000000..4dd5a0c --- /dev/null +++ b/parser/verlog.y @@ -0,0 +1,1049 @@ + +/* +IEEE 1364-2005 +Formal syntax definition +The formal syntax of Verilog HDL is described using Backus-Naur Form (BNF). The syntax of Verilog +HDL source is derived from the starting symbol source_text. The syntax of a library map file is derived from +the starting symbol library_text. +A.1 Source text +A.1.1 Library source text +*/ + +library_text ::= { library_description } +library_description ::= +library_declaration +| include_statement +| config_declaration +library_declaration ::= +library library_identifier file_path_spec [ { , file_path_spec } ] +[ -incdir file_path_spec { , file_path_spec } ] ; +include_statement ::= include file_path_spec ; +/* +A.1.2 Verilog source text +*/ +source_text ::= { description } +description ::= +module_declaration +| udp_declaration +| config_declaration +module_declaration ::= +{ attribute_instance } module_keyword module_identifier [ module_parameter_port_list ] +list_of_ports ; { module_item } +endmodule +| { attribute_instance } module_keyword module_identifier [ module_parameter_port_list ] +[ list_of_port_declarations ] ; { non_port_module_item } +endmodule +module_keyword ::= module | macromodule + +/* +A.1.3 Module parameters and ports +*/ + +module_parameter_port_list ::= # ( parameter_declaration { , parameter_declaration } ) +list_of_ports ::= ( port { , port } ) +list_of_port_declarations ::= +( port_declaration { , port_declaration } ) +| ( ) +port ::= +[ port_expression ] +| . port_identifier ( [ port_expression ] ) +port_expression ::= +port_reference +| { port_reference { , port_reference } } +port_reference ::= +port_identifier [ [ constant_range_expression ] ] +port_declaration ::= +{attribute_instance} inout_declaration +| {attribute_instance} input_declaration +| {attribute_instance} output_declaration +/* +A.1.4 Module items +*/ +module_item ::= +port_declaration ; +| non_port_module_item +module_or_generate_item ::= +{ attribute_instance } module_or_generate_item_declaration +| { attribute_instance } local_parameter_declaration ; +| { attribute_instance } parameter_override +| { attribute_instance } continuous_assign +| { attribute_instance } gate_instantiation +| { attribute_instance } udp_instantiation +| { attribute_instance } module_instantiation +| { attribute_instance } initial_construct +| { attribute_instance } always_construct +| { attribute_instance } loop_generate_construct +| { attribute_instance } conditional_generate_construct +module_or_generate_item_declaration ::= +net_declaration +| reg_declaration +| integer_declaration +| real_declaration +| time_declaration +| realtime_declaration +| event_declaration +| genvar_declaration +| task_declaration +| function_declaration +non_port_module_item ::= +module_or_generate_item +| generate_region +| specify_block +| { attribute_instance } parameter_declaration ; +| { attribute_instance } specparam_declaration +parameter_override ::= defparam list_of_defparam_assignments ; +/* +A.1.5 Configuration source text +*/ +config_declaration ::= +config config_identifier ; +design_statement +{config_rule_statement} +endconfig +design_statement ::= design { [library_identifier.]cell_identifier } ; +config_rule_statement ::= +default_clause liblist_clause ; +| inst_clause liblist_clause ; +| inst_clause use_clause ; +| cell_clause liblist_clause ; +| cell_clause use_clause ; +default_clause ::= default +inst_clause ::= instance inst_name +inst_name ::= topmodule_identifier{.instance_identifier} +cell_clause ::= cell [ library_identifier.]cell_identifier +liblist_clause ::= liblist { library_identifier } +use_clause ::= use [library_identifier.]cell_identifier[:config] +/* +A.2 Declarations +A.2.1 Declaration types +A.2.1.1 Module parameter declarations +*/ +local_parameter_declaration ::= +localparam [ signed ] [ range ] list_of_param_assignments +| localparam parameter_type list_of_param_assignments +parameter_declaration ::= +parameter [ signed ] [ range ] list_of_param_assignments +| parameter parameter_type list_of_param_assignments +specparam_declaration ::= specparam [ range ] list_of_specparam_assignments ; +parameter_type ::= +integer | real | realtime | time +/* +A.2.1.2 Port declarations +*/ +inout_declaration ::= inout [ net_type ] [ signed ] [ range ] +list_of_port_identifiers +input_declaration ::= input [ net_type ] [ signed ] [ range ] +list_of_port_identifiers +output_declaration ::= +output [ net_type ] [ signed ] [ range ] +list_of_port_identifiers +| output reg [ signed ] [ range ] +list_of_variable_port_identifiers +| output output_variable_type +list_of_variable_port_identifiers +/* +A.2.1.3 Type declarations +*/ +event_declaration ::= event list_of_event_identifiers ; +integer_declaration ::= integer list_of_variable_identifiers ; +net_declaration ::= +net_type [ signed ] +[ delay3 ] list_of_net_identifiers ; +| net_type [ drive_strength ] [ signed ] +[ delay3 ] list_of_net_decl_assignments ; +| net_type [ vectored | scalared ] [ signed ] +range [ delay3 ] list_of_net_identifiers ; +| net_type [ drive_strength ] [ vectored | scalared ] [ signed ] +range [ delay3 ] list_of_net_decl_assignments ; +| trireg [ charge_strength ] [ signed ] +[ delay3 ] list_of_net_identifiers ; +| trireg [ drive_strength ] [ signed ] +[ delay3 ] list_of_net_decl_assignments ; +| trireg [ charge_strength ] [ vectored | scalared ] [ signed ] +range [ delay3 ] list_of_net_identifiers ; +| trireg [ drive_strength ] [ vectored | scalared ] [ signed ] +range [ delay3 ] list_of_net_decl_assignments ; +real_declaration ::= real list_of_real_identifiers ; +realtime_declaration ::= realtime list_of_real_identifiers ; +reg_declaration ::= reg [ signed ] [ range ] +list_of_variable_identifiers ; +time_declaration ::= time list_of_variable_identifiers ; +/* +A.2.2 Declaration data types +A.2.2.1 Net and variable types +*/ +net_type ::= +supply0 | supply1 +| tri | triand | trior | tri0 | tri1 +| uwire | wire | wand | wor +output_variable_type ::= integer | time +real_type ::= +real_identifier { dimension } +| real_identifier = constant_expression +variable_type ::= +variable_identifier { dimension } +| variable_identifier = constant_expression +A.2.2.2 Strengths +drive_strength ::= +( strength0 , strength1 ) +| ( strength1 , strength0 ) +| ( strength0 , highz1 ) +| ( strength1 , highz0 ) +| ( highz0 , strength1 ) +| ( highz1 , strength0 ) +strength0 ::= supply0 | strong0 | pull0 | weak0 +strength1 ::= supply1 | strong1 | pull1 | weak1 +charge_strength ::= ( small ) | ( medium ) | ( large ) +/* +A.2.2.3 Delays +*/ +delay3 ::= +# delay_value +| # ( mintypmax_expression [ , mintypmax_expression [ , mintypmax_expression ] ] ) +delay2 ::= +# delay_value +| # ( mintypmax_expression [ , mintypmax_expression ] ) +delay_value ::= +unsigned_number +| real_number +| identifier +/* +A.2.3 Declaration lists +*/ +list_of_defparam_assignments ::= defparam_assignment { , defparam_assignment } +list_of_event_identifiers ::= event_identifier { dimension } +{ , event_identifier { dimension } } +list_of_net_decl_assignments ::= net_decl_assignment { , net_decl_assignment } +list_of_net_identifiers ::= net_identifier { dimension } +{ , net_identifier { dimension } } +list_of_param_assignments ::= param_assignment { , param_assignment } +list_of_port_identifiers ::= port_identifier { , port_identifier } +list_of_real_identifiers ::= real_type { , real_type } +list_of_specparam_assignments ::= specparam_assignment { , specparam_assignment } +list_of_variable_identifiers ::= variable_type { , variable_type } +list_of_variable_port_identifiers ::= port_identifier [ = constant_expression ] +{ , port_identifier [ = constant_expression ] } +/* +A.2.4 Declaration assignments +*/ +defparam_assignment ::= hierarchical_parameter_identifier = constant_mintypmax_expression +net_decl_assignment ::= net_identifier = expression +param_assignment ::= parameter_identifier = constant_mintypmax_expression +specparam_assignment ::= +specparam_identifier = constant_mintypmax_expression +| pulse_control_specparam +pulse_control_specparam ::= +PATHPULSE$ = ( reject_limit_value [ , error_limit_value ] ) +| PATHPULSE$specify_input_terminal_descriptor$specify_output_terminal_descriptor += ( reject_limit_value [ , error_limit_value ] ) +error_limit_value ::= limit_value +reject_limit_value ::= limit_value +limit_value ::= constant_mintypmax_expression +/* +A.2.5 Declaration ranges +*/ +dimension ::= [ dimension_constant_expression : dimension_constant_expression ] +range ::= [ msb_constant_expression : lsb_constant_expression ] +A.2.6 Function declarations +function_declaration ::= +function [ automatic ] [ function_range_or_type ] function_identifier ; +function_item_declaration { function_item_declaration } +function_statement +endfunction +| function [ automatic ] [ function_range_or_type ] function_identifier ( function_port_list ) ; +{ block_item_declaration } +function_statement +endfunction +function_item_declaration ::= +block_item_declaration +| { attribute_instance } tf_input_declaration ; +function_port_list ::= { attribute_instance } tf_input_declaration { , { attribute_instance } +tf_input_declaration } +function_range_or_type ::= +[ signed ] [ range ] +| integer +| real +| realtime +| time +/* +A.2.7 Task declarations +*/ +task_declaration ::= +task [ automatic ] task_identifier ; +{ task_item_declaration } +statement_or_null +endtask +| task [ automatic ] task_identifier ( [ task_port_list ] ) ; +{ block_item_declaration } +statement_or_null +endtask +task_item_declaration ::= +block_item_declaration +| { attribute_instance } tf_input_declaration ; +| { attribute_instance } tf_output_declaration ; +| { attribute_instance } tf_inout_declaration ; +task_port_list ::= task_port_item { , task_port_item } +task_port_item ::= +{ attribute_instance } tf_input_declaration +| { attribute_instance } tf_output_declaration +| { attribute_instance } tf_inout_declaration +tf_input_declaration ::= +input [ reg ] [ signed ] [ range ] list_of_port_identifiers +| input task_port_type list_of_port_identifiers +tf_output_declaration ::= +output [ reg ] [ signed ] [ range ] list_of_port_identifiers +| output task_port_type list_of_port_identifiers +tf_inout_declaration ::= +inout [ reg ] [ signed ] [ range ] list_of_port_identifiers +| inout task_port_type list_of_port_identifiers +task_port_type ::= +integer | real | realtime | time +/* +A.2.8 Block item declarations +*/ +block_item_declaration ::= +{ attribute_instance } reg [ signed ] [ range ] list_of_block_variable_identifiers ; +| { attribute_instance } integer list_of_block_variable_identifiers ; +| { attribute_instance } time list_of_block_variable_identifiers ; +| { attribute_instance } real list_of_block_real_identifiers ; +| { attribute_instance } realtime list_of_block_real_identifiers ; +| { attribute_instance } event_declaration +| { attribute_instance } local_parameter_declaration ; +| { attribute_instance } parameter_declaration ; +list_of_block_variable_identifiers ::= block_variable_type { , block_variable_type } +list_of_block_real_identifiers ::= block_real_type { , block_real_type } +block_variable_type ::= variable_identifier { dimension } +block_real_type ::= real_identifier { dimension } +/* +A.3 Primitive instances +A.3.1 Primitive instantiation and instances +*/ +gate_instantiation ::= +cmos_switchtype [delay3] +cmos_switch_instance { , cmos_switch_instance } ; +| enable_gatetype [drive_strength] [delay3] +enable_gate_instance { , enable_gate_instance } ; +| mos_switchtype [delay3] +mos_switch_instance { , mos_switch_instance } ; +| n_input_gatetype [drive_strength] [delay2] +n_input_gate_instance { , n_input_gate_instance } ; +| n_output_gatetype [drive_strength] [delay2] +n_output_gate_instance { , n_output_gate_instance } ; +| pass_en_switchtype [delay2] +pass_enable_switch_instance { , pass_enable_switch_instance } ; +| pass_switchtype +pass_switch_instance { , pass_switch_instance } ; +| pulldown [pulldown_strength] +pull_gate_instance { , pull_gate_instance } ; +| pullup [pullup_strength] +pull_gate_instance { , pull_gate_instance } ; +cmos_switch_instance ::= [ name_of_gate_instance ] ( output_terminal , input_terminal , +ncontrol_terminal , pcontrol_terminal ) +enable_gate_instance ::= [ name_of_gate_instance ] ( output_terminal , input_terminal , enable_terminal ) +mos_switch_instance ::= [ name_of_gate_instance ] ( output_terminal , input_terminal , enable_terminal ) +n_input_gate_instance ::= [ name_of_gate_instance ] ( output_terminal , input_terminal { , input_terminal } ) +n_output_gate_instance ::= [ name_of_gate_instance ] ( output_terminal { , output_terminal } , +input_terminal ) +pass_switch_instance ::= [ name_of_gate_instance ] ( inout_terminal , inout_terminal ) +pass_enable_switch_instance ::= [ name_of_gate_instance ] ( inout_terminal , inout_terminal , +enable_terminal ) +pull_gate_instance ::= [ name_of_gate_instance ] ( output_terminal ) +name_of_gate_instance ::= gate_instance_identifier [ range ] +/* +A.3.2 Primitive strengths +*/ +pulldown_strength ::= +( strength0 , strength1 ) +| ( strength1 , strength0 ) +| ( strength0 ) +pullup_strength ::= +( strength0 , strength1 ) +| ( strength1 , strength0 ) +| ( strength1 ) +/* +A.3.3 Primitive terminals +*/ +enable_terminal ::= expression +inout_terminal ::= net_lvalue +input_terminal ::= expression +ncontrol_terminal ::= expression +output_terminal ::= net_lvalue +pcontrol_terminal ::= expression +/* +A.3.4 Primitive gate and switch types +*/ +cmos_switchtype ::= cmos | rcmos +enable_gatetype ::= bufif0 | bufif1 | notif0 | notif1 +mos_switchtype ::= nmos | pmos | rnmos | rpmos +n_input_gatetype ::= and | nand | or | nor | xor | xnor +n_output_gatetype ::= buf | not +pass_en_switchtype ::= tranif0 | tranif1 | rtranif1 | rtranif0 +pass_switchtype ::= tran | rtran +/* +A.4 Module instantiation and generate construct +A.4.1 Module instantiation +*/ +module_instantiation ::= +module_identifier [ parameter_value_assignment ] +module_instance { , module_instance } ; +parameter_value_assignment ::= # ( list_of_parameter_assignments ) +list_of_parameter_assignments ::= +ordered_parameter_assignment { , ordered_parameter_assignment } | +named_parameter_assignment { , named_parameter_assignment } +ordered_parameter_assignment ::= expression +named_parameter_assignment ::= . parameter_identifier ( [ mintypmax_expression ] ) +module_instance ::= name_of_module_instance ( [ list_of_port_connections ] ) +name_of_module_instance ::= module_instance_identifier [ range ] +list_of_port_connections ::= +ordered_port_connection { , ordered_port_connection } +| named_port_connection { , named_port_connection } +ordered_port_connection ::= { attribute_instance } [ expression ] +named_port_connection ::= { attribute_instance } . port_identifier ( [ expression ] ) +/* +A.4.2 Generate construct +*/ +generate_region ::= +generate { module_or_generate_item } endgenerate +genvar_declaration ::= +genvar list_of_genvar_identifiers ; +list_of_genvar_identifiers ::= +genvar_identifier { , genvar_identifier } +loop_generate_construct ::= +for ( genvar_initialization ; genvar_expression ; genvar_iteration ) +generate_block +genvar_initialization ::= +genvar_identifier = constant_expression +genvar_expression ::= +genvar_primary +| unary_operator { attribute_instance } genvar_primary +| genvar_expression binary_operator { attribute_instance } genvar_expression +| genvar_expression ? { attribute_instance } genvar_expression : genvar_expression +genvar_iteration ::= +genvar_identifier = genvar_expression +genvar_primary ::= +constant_primary +| genvar_identifier +conditional_generate_construct ::= +if_generate_construct +| case_generate_construct +if_generate_construct ::= +if ( constant_expression ) generate_block_or_null +[ else generate_block_or_null ] +case_generate_construct ::= +case ( constant_expression ) +case_generate_item { case_generate_item } endcase +case_generate_item ::= +constant_expression { , constant_expression } : generate_block_or_null +| default [ : ] generate_block_or_null +generate_block ::= +module_or_generate_item +| begin [ : generate_block_identifier ] { module_or_generate_item } end +generate_block_or_null ::= +generate_block +| ; +/* +A.5 UDP declaration and instantiation +A.5.1 UDP declaration +*/ +udp_declaration ::= +{ attribute_instance } primitive udp_identifier ( udp_port_list ) ; +udp_port_declaration { udp_port_declaration } +udp_body +endprimitive +| { attribute_instance } primitive udp_identifier ( udp_declaration_port_list ) ; +udp_body +endprimitive +/* +A.5.2 UDP ports +*/ +udp_port_list ::= output_port_identifier , input_port_identifier { , input_port_identifier } +udp_declaration_port_list ::= +udp_output_declaration , udp_input_declaration { , udp_input_declaration } +udp_port_declaration ::= +udp_output_declaration ; +| udp_input_declaration ; +| udp_reg_declaration ; +udp_output_declaration ::= +{ attribute_instance } output port_identifier +| { attribute_instance } output reg port_identifier [ = constant_expression ] +udp_input_declaration ::= { attribute_instance } input list_of_port_identifiers +udp_reg_declaration ::= { attribute_instance } reg variable_identifier +/* +A.5.3 UDP body +*/ +udp_body ::= combinational_body | sequential_body +combinational_body ::= table combinational_entry { combinational_entry } endtable +combinational_entry ::= level_input_list : output_symbol ; +sequential_body ::= [ udp_initial_statement ] table sequential_entry { sequential_entry } endtable +udp_initial_statement ::= initial output_port_identifier = init_val ; +init_val ::= 1'b0 | 1'b1 | 1'bx | 1'bX | 1'B0 | 1'B1 | 1'Bx | 1'BX | 1 | 0 +sequential_entry ::= seq_input_list : current_state : next_state ; +seq_input_list ::= level_input_list | edge_input_list +level_input_list ::= level_symbol { level_symbol } +edge_input_list ::= { level_symbol } edge_indicator { level_symbol } +edge_indicator ::= ( level_symbol level_symbol ) | edge_symbol +current_state ::= level_symbol +next_state ::= output_symbol | - +output_symbol ::= 0 | 1 | x | X +level_symbol ::= 0 | 1 | x | X | ? | b | B +edge_symbol ::= r | R | f | F | p | P | n | N | * +/* +A.5.4 UDP instantiation +*/ +udp_instantiation ::= udp_identifier [ drive_strength ] [ delay2 ] +udp_instance { , udp_instance } ; +udp_instance ::= [ name_of_udp_instance ] ( output_terminal , input_terminal +{ , input_terminal } ) +name_of_udp_instance ::= udp_instance_identifier [ range ] +/* +A.6 Behavioral statements +A.6.1 Continuous assignment statements +*/ +continuous_assign ::= assign [ drive_strength ] [ delay3 ] list_of_net_assignments ; +list_of_net_assignments ::= net_assignment { , net_assignment } +net_assignment ::= net_lvalue = expression +/* +A.6.2 Procedural blocks and assignments +*/ +initial_construct ::= initial statement +always_construct ::= always statement +blocking_assignment ::= variable_lvalue = [ delay_or_event_control ] expression +nonblocking_assignment ::= variable_lvalue <= [ delay_or_event_control ] expression +procedural_continuous_assignments ::= +assign variable_assignment +| deassign variable_lvalue +| force variable_assignment +| force net_assignment +| release variable_lvalue +| release net_lvalue +variable_assignment ::= variable_lvalue = expression +/* +A.6.3 Parallel and sequential blocks +*/ +par_block ::= fork [ : block_identifier +{ block_item_declaration } ] { statement } join +seq_block ::= begin [ : block_identifier +{ block_item_declaration } ] { statement } end +/* +A.6.4 Statements +*/ +statement ::= +{ attribute_instance } blocking_assignment ; +| { attribute_instance } case_statement +| { attribute_instance } conditional_statement +| { attribute_instance } disable_statement +| { attribute_instance } event_trigger +| { attribute_instance } loop_statement +| { attribute_instance } nonblocking_assignment ; +| { attribute_instance } par_block +| { attribute_instance } procedural_continuous_assignments ; +| { attribute_instance } procedural_timing_control_statement +| { attribute_instance } seq_block +| { attribute_instance } system_task_enable +| { attribute_instance } task_enable +| { attribute_instance } wait_statement +statement_or_null ::= +statement +| { attribute_instance } ; +function_statement1 ::= statement +/* +A.6.5 Timing control statements +*/ +delay_control ::= +# delay_value +| # ( mintypmax_expression ) +delay_or_event_control ::= +delay_control +| event_control +| repeat ( expression ) event_control +disable_statement ::= +disable hierarchical_task_identifier ; +| disable hierarchical_block_identifier ; +event_control ::= +@ hierarchical_event_identifier +| @ ( event_expression ) +| @* +| @ (*) +event_trigger ::= +-> hierarchical_event_identifier { [ expression ] } ; +event_expression ::= +expression +| posedge expression +| negedge expression +| event_expression or event_expression +| event_expression , event_expression +procedural_timing_control ::= +delay_control +| event_control +procedural_timing_control_statement ::= +procedural_timing_control statement_or_null +wait_statement ::= +wait ( expression ) statement_or_null +/* +A.6.6 Conditional statements +*/ +conditional_statement ::= +if ( expression ) +statement_or_null [ else statement_or_null ] +| if_else_if_statement +if_else_if_statement ::= +if ( expression ) statement_or_null +{ else if ( expression ) statement_or_null } +[ else statement_or_null ] +/* +A.6.7 Case statements +*/ +case_statement ::= +case ( expression ) +case_item { case_item } endcase +| casez ( expression ) +case_item { case_item } endcase +| casex ( expression ) +case_item { case_item } endcase +case_item ::= +expression { , expression } : statement_or_null +| default [ : ] statement_or_null +/* +A.6.8 Looping statements +*/ +loop_statement ::= +forever statement +| repeat ( expression ) statement +| while ( expression ) statement +| for ( variable_assignment ; expression ; variable_assignment ) +statement +/* +A.6.9 Task enable statements +*/ +system_task_enable ::= system_task_identifier [ ( [ expression ] { , [ expression ] } ) ] ; +task_enable ::= hierarchical_task_identifier [ ( expression { , expression } ) ] ; +/* +A.7 Specify section +A.7.1 Specify block declaration +*/ +specify_block ::= specify { specify_item } endspecify +specify_item ::= +specparam_declaration +| pulsestyle_declaration +| showcancelled_declaration +| path_declaration +| system_timing_check +pulsestyle_declaration ::= +pulsestyle_onevent list_of_path_outputs ; +| pulsestyle_ondetect list_of_path_outputs ; +showcancelled_declaration ::= +showcancelled list_of_path_outputs ; +| noshowcancelled list_of_path_outputs ; +/* +A.7.2 Specify path declarations +*/ +path_declaration ::= +simple_path_declaration ; +| edge_sensitive_path_declaration ; +| state_dependent_path_declaration ; +simple_path_declaration ::= +parallel_path_description = path_delay_value +| full_path_description = path_delay_value +parallel_path_description ::= +( specify_input_terminal_descriptor [ polarity_operator ] => specify_output_terminal_descriptor ) +full_path_description ::= +( list_of_path_inputs [ polarity_operator ] *> list_of_path_outputs ) +list_of_path_inputs ::= +specify_input_terminal_descriptor { , specify_input_terminal_descriptor } +list_of_path_outputs ::= +specify_output_terminal_descriptor { , specify_output_terminal_descriptor } +/* +A.7.3 Specify block terminals +*/ +specify_input_terminal_descriptor ::= +input_identifier [ [ constant_range_expression ] ] +specify_output_terminal_descriptor ::= +output_identifier [ [ constant_range_expression ] ] +input_identifier ::= input_port_identifier | inout_port_identifier +output_identifier ::= output_port_identifier | inout_port_identifier +/* +A.7.4 Specify path delays +*/ +path_delay_value ::= +list_of_path_delay_expressions +| ( list_of_path_delay_expressions ) +list_of_path_delay_expressions ::= +t_path_delay_expression +| trise_path_delay_expression , tfall_path_delay_expression +| trise_path_delay_expression , tfall_path_delay_expression , tz_path_delay_expression +| t01_path_delay_expression , t10_path_delay_expression , t0z_path_delay_expression , +tz1_path_delay_expression , t1z_path_delay_expression , tz0_path_delay_expression +| t01_path_delay_expression , t10_path_delay_expression , t0z_path_delay_expression , +tz1_path_delay_expression , t1z_path_delay_expression , tz0_path_delay_expression , +t0x_path_delay_expression , tx1_path_delay_expression , t1x_path_delay_expression , +tx0_path_delay_expression , txz_path_delay_expression , tzx_path_delay_expression +t_path_delay_expression ::= path_delay_expression +trise_path_delay_expression ::= path_delay_expression +tfall_path_delay_expression ::= path_delay_expression +tz_path_delay_expression ::= path_delay_expression +t01_path_delay_expression ::= path_delay_expression +t10_path_delay_expression ::= path_delay_expression +t0z_path_delay_expression ::= path_delay_expression +tz1_path_delay_expression ::= path_delay_expression +t1z_path_delay_expression ::= path_delay_expression +tz0_path_delay_expression ::= path_delay_expression +t0x_path_delay_expression ::= path_delay_expression +tx1_path_delay_expression ::= path_delay_expression +t1x_path_delay_expression ::= path_delay_expression +tx0_path_delay_expression ::= path_delay_expression +txz_path_delay_expression ::= path_delay_expression +tzx_path_delay_expression ::= path_delay_expression +path_delay_expression ::= constant_mintypmax_expression +edge_sensitive_path_declaration ::= +parallel_edge_sensitive_path_description = path_delay_value +| full_edge_sensitive_path_description = path_delay_value +parallel_edge_sensitive_path_description ::= +( [ edge_identifier ] specify_input_terminal_descriptor => +( specify_output_terminal_descriptor [ polarity_operator ] : data_source_expression ) ) +full_edge_sensitive_path_description ::= +( [ edge_identifier ] list_of_path_inputs *> +( list_of_path_outputs [ polarity_operator ] : data_source_expression ) ) +data_source_expression ::= expression +edge_identifier ::= posedge | negedge +state_dependent_path_declaration ::= +if ( module_path_expression ) simple_path_declaration +| if ( module_path_expression ) edge_sensitive_path_declaration +| ifnone simple_path_declaration +polarity_operator ::= + | - +/* +A.7.5 System timing checks +A.7.5.1 System timing check commands +*/ +system_timing_check ::= +$setup_timing_check +| $hold_timing_check +| $setuphold_timing_check +| $recovery_timing_check +| $removal_timing_check +| $recrem_timing_check +| $skew_timing_check +| $timeskew_timing_check +| $fullskew_timing_check +| $period_timing_check +| $width_timing_check +| $nochange_timing_check +$setup_timing_check ::= +$setup ( data_event , reference_event , timing_check_limit [ , [ notifier ] ] ) ; +$hold_timing_check ::= +$hold ( reference_event , data_event , timing_check_limit [ , [ notifier ] ] ) ; +$setuphold_timing_check ::= +$setuphold ( reference_event , data_event , timing_check_limit , timing_check_limit +[ , [ notifier ] [ , [ stamptime_condition ] [ , [ checktime_condition ] +[ , [ delayed_reference ] [ , [ delayed_data ] ] ] ] ] ] ) ; +$recovery_timing_check ::= +$recovery ( reference_event , data_event , timing_check_limit [ , [ notifier ] ] ) ; +$removal_timing_check ::= +$removal ( reference_event , data_event , timing_check_limit [ , [ notifier ] ] ) ; +$recrem_timing_check ::= +$recrem ( reference_event , data_event , timing_check_limit , timing_check_limit +[ , [ notifier ] [ , [ stamptime_condition ] [ , [ checktime_condition ] +[ , [ delayed_reference ] [ , [ delayed_data ] ] ] ] ] ] ) ; +$skew_timing_check ::= +$skew ( reference_event , data_event , timing_check_limit [ , [ notifier ] ] ) ; +$timeskew_timing_check ::= +$timeskew ( reference_event , data_event , timing_check_limit +[ , [ notifier ] [ , [ event_based_flag ] [ , [ remain_active_flag ] ] ] ] ) ; +$fullskew_timing_check ::= +$fullskew ( reference_event , data_event , timing_check_limit , timing_check_limit +[ , [ notifier ] [ , [ event_based_flag ] [ , [ remain_active_flag ] ] ] ] ) ; +$period_timing_check ::= +$period ( controlled_reference_event , timing_check_limit [ , [ notifier ] ] ) ; +$width_timing_check ::= +$width ( controlled_reference_event , timing_check_limit +[ , threshold [ , notifier ] ] ) ; +$nochange_timing_check ::= +$nochange ( reference_event , data_event , start_edge_offset , +end_edge_offset [ , [ notifier ] ] ) ; +/* +A.7.5.2 System timing check command arguments +*/ +checktime_condition ::= mintypmax_expression +controlled_reference_event ::= controlled_timing_check_event +data_event ::= timing_check_event +delayed_data ::= +terminal_identifier +| terminal_identifier [ constant_mintypmax_expression ] +delayed_reference ::= +terminal_identifier +| terminal_identifier [ constant_mintypmax_expression ] +end_edge_offset ::= mintypmax_expression +event_based_flag ::= constant_expression +notifier ::= variable_identifier +reference_event ::= timing_check_event +remain_active_flag ::= constant_expression +stamptime_condition ::= mintypmax_expression +start_edge_offset ::= mintypmax_expression +threshold ::= constant_expression +timing_check_limit ::= expression +/* +A.7.5.3 System timing check event definitions +*/ +timing_check_event ::= +[timing_check_event_control] specify_terminal_descriptor [ &&& timing_check_condition ] +controlled_timing_check_event ::= +timing_check_event_control specify_terminal_descriptor [ &&& timing_check_condition ] +timing_check_event_control ::= +posedge +| negedge +| edge_control_specifier +specify_terminal_descriptor ::= +specify_input_terminal_descriptor +| specify_output_terminal_descriptor +edge_control_specifier ::= edge [ edge_descriptor { , edge_descriptor } ] +edge_descriptor2 ::= +01 +| 10 +| z_or_x zero_or_one +| zero_or_one z_or_x +zero_or_one ::= 0 | 1 +z_or_x ::= x | X | z | Z +timing_check_condition ::= +scalar_timing_check_condition +| ( scalar_timing_check_condition ) +scalar_timing_check_condition ::= +expression +| ~ expression +| expression == scalar_constant +| expression === scalar_constant +| expression != scalar_constant +| expression !== scalar_constant +scalar_constant ::= +1'b0 | 1'b1 | 1'B0 | 1'B1 | 'b0 | 'b1 | 'B0 | 'B1 | 1 | 0 +/* +A.8 Expressions +A.8.1 Concatenations +*/ +concatenation ::= { expression { , expression } } +constant_concatenation ::= { constant_expression { , constant_expression } } +constant_multiple_concatenation ::= { constant_expression constant_concatenation } +module_path_concatenation ::= { module_path_expression { , module_path_expression } } +module_path_multiple_concatenation ::= { constant_expression module_path_concatenation } +multiple_concatenation ::= { constant_expression concatenation } +/* +A.8.2 Function calls +*/ +constant_function_call ::= function_identifier { attribute_instance } +( constant_expression { , constant_expression } ) +constant_system_function_call ::= system_function_identifier +( constant_expression { , constant_expression } ) +function_call ::= hierarchical_function_identifier{ attribute_instance } +( expression { , expression } ) +system_function_call ::= system_function_identifier +[ ( expression { , expression } ) ] +/* +A.8.3 Expressions +*/ +base_expression ::= expression +conditional_expression ::= expression1 ? { attribute_instance } expression2 : expression3 +constant_base_expression ::= constant_expression +constant_expression ::= +constant_primary +| unary_operator { attribute_instance } constant_primary +| constant_expression binary_operator { attribute_instance } constant_expression +| constant_expression ? { attribute_instance } constant_expression : constant_expression +constant_mintypmax_expression ::= +constant_expression +| constant_expression : constant_expression : constant_expression +constant_range_expression ::= +constant_expression +| msb_constant_expression : lsb_constant_expression +| constant_base_expression +: width_constant_expression +| constant_base_expression -: width_constant_expression +dimension_constant_expression ::= constant_expression +expression ::= +primary +| unary_operator { attribute_instance } primary +| expression binary_operator { attribute_instance } expression +| conditional_expression +expression1 ::= expression +expression2 ::= expression +expression3 ::= expression +lsb_constant_expression ::= constant_expression +mintypmax_expression ::= +expression +| expression : expression : expression +module_path_conditional_expression ::= module_path_expression ? { attribute_instance } +module_path_expression : module_path_expression +module_path_expression ::= +module_path_primary +| unary_module_path_operator { attribute_instance } module_path_primary +| module_path_expression binary_module_path_operator { attribute_instance } +module_path_expression +| module_path_conditional_expression +module_path_mintypmax_expression ::= +module_path_expression +| module_path_expression : module_path_expression : module_path_expression +msb_constant_expression ::= constant_expression +range_expression ::= +expression +| msb_constant_expression : lsb_constant_expression +| base_expression +: width_constant_expression +| base_expression -: width_constant_expression +width_constant_expression ::= constant_expression +/* +A.8.4 Primaries +*/ +constant_primary ::= +number +| parameter_identifier [ [ constant_range_expression ] ] +| specparam_identifier [ [ constant_range_expression ] ] +| constant_concatenation +| constant_multiple_concatenation +| constant_function_call +| constant_system_function_call +| ( constant_mintypmax_expression ) +| string +module_path_primary ::= +number +| identifier +| module_path_concatenation +| module_path_multiple_concatenation +| function_call +| system_function_call +| ( module_path_mintypmax_expression ) +primary ::= +number +| hierarchical_identifier [ { [ expression ] } [ range_expression ] ] +| concatenation +| multiple_concatenation +| function_call +| system_function_call +| ( mintypmax_expression ) +| string +/* +A.8.5 Expression left-side values +*/ +net_lvalue ::= +hierarchical_net_identifier [ { [ constant_expression ] } [ constant_range_expression ] ] +| { net_lvalue { , net_lvalue } } +variable_lvalue ::= +hierarchical_variable_identifier [ { [ expression ] } [ range_expression ] ] +| { variable_lvalue { , variable_lvalue } } +/* +A.8.6 Operators +*/ +unary_operator ::= ++ | - | ! | ~ | & | ~& | | | ~| | ^ | ~^ | ^~ +binary_operator ::= ++ | - | * | / | % | == | != | === | !== | && | || | ** +| < | <= | > | >= | & | | | ^ | ^~ | ~^ | >> | << | >>> | <<< +unary_module_path_operator ::= +! | ~ | & | ~& | | | ~| | ^ | ~^ | ^~ +binary_module_path_operator ::= +== | != | && | || | & | | | ^ | ^~ | ~^ +/* +A.8.7 Numbers +*/ +number ::= +decimal_number +| octal_number +| binary_number +| hex_number +| real_number +real_number2 ::= +unsigned_number . unsigned_number +| unsigned_number [ . unsigned_number ] exp [ sign ] unsigned_number +exp ::= e | E +decimal_number ::= +unsigned_number +| [ size ] decimal_base unsigned_number +| [ size ] decimal_base x_digit { _ } +| [ size ] decimal_base z_digit { _ } +binary_number ::= [ size ] binary_base binary_value +octal_number ::= [ size ] octal_base octal_value +hex_number ::= [ size ] hex_base hex_value +sign ::= + | - +size ::= non_zero_unsigned_number +non_zero_unsigned_number2 ::= non_zero_decimal_digit { _ | decimal_digit} +unsigned_number2 ::= decimal_digit { _ | decimal_digit } +binary_value2 ::= binary_digit { _ | binary_digit } +octal_value2 ::= octal_digit { _ | octal_digit } +hex_value2 ::= hex_digit { _ | hex_digit } +decimal_base2 ::= '[s|S]d | '[s|S]D +binary_base2 ::= '[s|S]b | '[s|S]B +octal_base2 ::= '[s|S]o | '[s|S]O +hex_base2 ::= '[s|S]h | '[s|S]H +non_zero_decimal_digit ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 +decimal_digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 +binary_digit ::= x_digit | z_digit | 0 | 1 +octal_digit ::= x_digit | z_digit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 +hex_digit ::= +x_digit | z_digit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 +| a | b | c | d | e | f | A | B | C | D | E | F +x_digit ::= x | X +z_digit ::= z | Z | ? +/* +A.8.8 Strings +*/ +string ::= " { Any_ASCII_Characters_except_new_line } " +/* +A.9 General +A.9.1 Attributes +*/ +attribute_instance ::= (* attr_spec { , attr_spec } *) +attr_spec ::= +attr_name [ = constant_expression ] +attr_name ::= identifier +/* +A.9.2 Comments +*/ +comment ::= +one_line_comment +| block_comment +one_line_comment ::= // comment_text \n +block_comment ::= /* comment_text */ +comment_text ::= { Any_ASCII_character } +/* +A.9.3 Identifiers +*/ +block_identifier ::= identifier +cell_identifier ::= identifier +config_identifier ::= identifier +escaped_identifier ::= \ {Any_ASCII_character_except_white_space} white_space +event_identifier ::= identifier +function_identifier ::= identifier +gate_instance_identifier ::= identifier +generate_block_identifier ::= identifier +genvar_identifier ::= identifier +hierarchical_block_identifier ::= hierarchical_identifier +hierarchical_event_identifier ::= hierarchical_identifier +hierarchical_function_identifier ::= hierarchical_identifier +hierarchical_identifier ::= { identifier [ [ constant_expression ] ] . } identifier +hierarchical_net_identifier ::= hierarchical_identifier +hierarchical_parameter_identifier ::= hierarchical_identifier +hierarchical_variable_identifier ::= hierarchical_identifier +hierarchical_task_identifier ::= hierarchical_identifier +identifier ::= +simple_identifier +| escaped_identifier +inout_port_identifier ::= identifier +input_port_identifier ::= identifier +instance_identifier ::= identifier +library_identifier ::= identifier +module_identifier ::= identifier +module_instance_identifier ::= identifier +net_identifier ::= identifier +output_port_identifier ::= identifier +parameter_identifier ::= identifier +port_identifier ::= identifier +real_identifier ::= identifier +simple_identifier3 ::= [ a-zA-Z_ ] { [ a-zA-Z0-9_$ ] } +specparam_identifier ::= identifier +system_function_identifier4 ::= $[ a-zA-Z0-9_$ ]{ [ a-zA-Z0-9_$ ] } +system_task_identifier4 ::= $[ a-zA-Z0-9_$ ]{ [ a-zA-Z0-9_$ ] } +task_identifier ::= identifier +terminal_identifier ::= identifier +text_macro_identifier ::= identifier +topmodule_identifier ::= identifier +udp_identifier ::= identifier +udp_instance_identifier ::= identifier +variable_identifier ::= identifier +/* +A.9.4 White space +*/ +white_space ::= space | tab | newline | eof diff --git a/preprocess/CMakeLists.txt b/preprocess/CMakeLists.txt index 2f858b1..4c6ee07 100644 --- a/preprocess/CMakeLists.txt +++ b/preprocess/CMakeLists.txt @@ -3,7 +3,7 @@ # cmake_minimum_required (VERSION 3.8) -add_library (preprocess STATIC +add_library (verilog_preprocess STATIC "include/filestack.h" "src/preprocess.c" "include/preprocess.h" diff --git a/testpreprocess/CMakeLists.txt b/testpreprocess/CMakeLists.txt index ec504cd..e371013 100644 --- a/testpreprocess/CMakeLists.txt +++ b/testpreprocess/CMakeLists.txt @@ -1,7 +1,7 @@ - + cmake_minimum_required (VERSION 3.8) add_executable (testpreprocess "testpreprocess.c") -target_link_libraries(testpreprocess preprocess lcom) +target_link_libraries(testpreprocess verilog_preprocess lcom) include_directories("../../lcom/include") include_directories("../preprocess/include") -- GitLab