⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oaverilogparser.ypp

📁 openaccess与verilog互相转化时所用的源代码
💻 YPP
📖 第 1 页 / 共 5 页
字号:
// Token precedence are arranged from lowest to highest. Tokens that appear on // the same line have equal precedence.%left  YYEQUAL%nonassoc '{' '}'%nonassoc PRIMARY%right YYCOLON%right YYQUESTION %left  YYVERTBARVERTBAR%left  YYAMPERAMPER%left  YYVERTBAR YYTILDEVERTBAR%left  YYCARET YYTILDECARET YYCARETTILDE%left  YYAMPER YYTILDEAMPER %left  YYEQUALEQUAL YYEXCLAMEQUAL YYEQUALEQUALEQUAL YYEXCLAMEQUALEQUAL%left  YYLESS YYLESSEQUAL YYGREATER YYGREATEREQUAL%left  YYLESSLESS YYGREATERGREATER YYLESSLESSLESS YYGREATERGREATERGREATER%left  YYPLUS YYMINUS%left  YYASTERIC YYSLASH YYPERCENT%left  YYASTERICASTERIC%left  YYEXCLAM YYTILDE%nonassoc YYUNARY%right '('%left  ')'// Type declarations for non-terminals// %type <oaStringStype()>           always_construct%type <oaStringStype()>           arrayed_identifier%type <oaStringStype()>           attr_name%type <oaParamStype()>            attr_spec%type <ParamListStype()>	  attr_spec_list%type <oaParamStype()>            attribute_instance%type <ParamListStype()>	  attribute_instance_list%type <verilogValueStype()>       base_expression%type <oaStringStype()>           binary_module_path_operator%type <verilogValueStype()>       binary_number%type <oaStringStype()>           binary_only_module_path_operator%type <oaStringStype()>           binary_only_operator%type <oaStringStype()>           binary_operator%type <oaStringStype()>           binary_operator_with_attribute%type <oaStringStype()>           block_identifier%type <oaStringStype()>           block_variable_type%type <verilogNameListStype()>    block_variable_type_list%type <oaStringStype()>           cell_identifier%type <verilogValueListStype()>   concatenation%type <verilogValueStype()>       conditional_expression%type <oaStringStype()>           config_identifier%type <verilogValueStype()>       constant_function_call%type <verilogValueStype()>       constant_mintypmax_expression%type <verilogValueStype()>       decimal_number%type <ParamListStype()>	  delay2%type <ParamListStype()>	  delay3%type <ParamListStype()>	  delay3_option%type <verilogRangeStype()>       dimension%type <verilogRangeListStype()>   dimension_list%type <oaStringStype()>           dot_escaped_identifier%type <oaStringStype()>           drive_strength%type <oaStringStype()>           drive_strength_option%type <verilogValueStype()>       expression%type <verilogValueListStype()>   expression_list%type <verilogValueStype()>       expression_no_string%type <oaParamStype()>            function_blocking_assignment%type <verilogValueStype()>       function_call%type <oaStringStype()>           function_identifier%type <oaStringStype()>           gate_instance_identifier%type <verilogValueStype()>       general_function_call%type <oaStringStype()>           generate_block_identifier%type <oaStringStype()>           genvar_identifier%type <verilogValueStype()>       hex_number%type <oaParamStype()>            hierarchical_assignment%type <oaStringStype()>           hierarchical_identifier%type <oaStringStype()>           hierarchical_primary%type <oaStringStype()>           identifier%type <oaStringStype()>           init_val%type <oaStringStype()>           initial_construct%type <verilogNameListStype()>    inout_declaration%type <verilogNameListStype()>    input_declaration%type <oaStringStype()>           input_port_identifier%type <oaStringStype()>           instance_identifier%type <oaStringStype()>           library_identifier%type <verilogNameListStype()>    list_of_block_variable_identifiers%type <verilogNameListStype()>    list_of_genvar_identifiers%type <ParamListStype()>	  list_of_net_assignments%type <ParamListStype()>	  list_of_net_decl_assignments%type <verilogNameListStype()>    list_of_net_identifiers%type <ParamListStype()>	  list_of_param_assignments%type <ParamListStype()>	  list_of_parameter_assignments%type <ParamListStype()>	  list_of_port_connections%type <verilogNameListStype()>    list_of_port_declarations%type <verilogNameListStype()>    list_of_port_identifiers%type <ParamListStype()>	  list_of_ports%type <ParamListStype()>	  list_of_real_identifiers%type <ParamListStype()>	  list_of_variable_identifiers%type <ParamListStype()>	  local_parameter_declaration%type <verilogValueStype()>       min_typ_max_expression%type <oaStringStype()>           module_identifier%type <oaStringStype()>           module_instance%type <verilogNameListStype()>    module_instance_list%type <verilogNameListStype()>    module_instantiation%type <oaStringStype()>           module_or_udp_instance_identifier%type <verilogValueStype()>       module_path_primary%type <verilogValueListStype()>   multiple_concatenation%type <oaStringStype()>           name_of_gate_instance%type <oaStringStype()>           name_of_gate_instance_option%type <oaParamStype()>            named_parameter_assignment%type <ParamListStype()>	  named_parameter_assignment_list%type <oaParamStype()>            named_port_connection%type <ParamListStype()>	  named_port_connection_list%type <oaParamStype()>            net_assignment%type <ParamListStype()>	  net_assignment_list%type <oaParamStype()>            net_decl_assignment%type <oaStringStype()>           net_dimension_identifier%type <oaStringStype()>           net_identifier%type <verilogRangeStype()>       net_range%type <oaSigTypeStype()>          net_trireg_decl%type <oaSigTypeStype()>          net_type%type <oaSigTypeStype()>          net_type_option%type <ParamListStype()>	  non_empty_attribute_instance_list%type <verilogValueListStype()>   non_empty_expression_list%type <verilogValueStype()>       number%type <verilogValueStype()>       octal_number%type <oaParamStype()>            ordered_parameter_assignment%type <ParamListStype()>	  ordered_parameter_assignment_list%type <oaParamStype()>            ordered_port_connection%type <ParamListStype()>	  ordered_port_connection_list%type <verilogNameListStype()>    output_declaration%type <oaStringStype()>           output_port_identifier%type <oaParamStype()>            param_assignment%type <ParamListStype()>	  parameter_declaration%type <ParamListStype()>	  parameter_declaration_list%type <oaStringStype()>           parameter_identifier%type <ParamListStype()>	  parameter_override%type <ParamListStype()>	  parameter_value_assignment%type <oaParamStype()>            port%type <verilogNameListStype()>    port_declaration%type <verilogNameListStype()>    port_declaration_list%type <oaStringStype()>           port_expression%type <oaStringStype()>           port_identifier%type <ParamListStype()>	  port_list%type <oaStringStype()>           port_reference%type <verilogNameListStype()>    port_reference_list%type <verilogValueStype()>       primary%type <verilogRangeStype()>       range_option%type <verilogRangeStype()>       range%type <verilogRangeListStype()>   range_list%type <oaStringStype()>           real_identifier%type <verilogValueStype()>       real_number%type <oaParamStype()>            real_type%type <oaStringStype()>           scalar_constant%type <oaStringStype()>           signed_option%type <verilogValueStype()>       simple_expression%type <oaStringStype()>           simple_hierarchical_branch%type <oaStringStype()>           small_medium_large%type <oaStringStype()>           specparam_identifier%type <verilogValueStype()>       system_function_call%type <oaStringStype()>           task_identifier%type <oaStringStype()>           terminal_identifier%type <oaStringStype()>           topmodule_identifier%type <oaStringStype()>           udp_identifier%type <oaStringStype()>           udp_instantiation%type <oaStringStype()>           unary_module_path_operator%type <oaStringStype()>           unary_only_operator%type <oaStringStype()>           unary_operator%type <oaStringStype()>           unary_operator_with_attribute%type <oaStringStype()>           unary_or_binary_module_path_operator%type <oaStringStype()>           unary_or_binary_operator%type <oaStringStype()>           variable_identifier%type <oaStringStype()>           variable_lvalue%type <oaParamStype()>            variable_type%type <oaStringStype()>           z_or_x%type <oaStringStype()>           zero_or_one%start all%%  all                            : library_text source_text                                  {                                    callback->all();                                 }                               | library_text error                                 {				    // To avoid warnings about unreferenced lables,				    // at least one error condition must be caught				    // explicitly by the grammar.				    YYERROR;				 }                               ; library_text                   : library_descriptions_list                                ;  library_descriptions_list      : /* empty */                                                                  | library_descriptions_list                                   library_descriptions                                  {				    callback->libraryText();				 }                                                   // See library_text callback                                             ;  library_descriptions           : library_declaration                                                          | include_statement                                                            | config_declaration                                           // See library_text callback                                                 ;  library_declaration            : YYLIBRARY library_identifier                                   file_path_spec_list ';'                                  {                                    deletePos(2);                                 }                               | YYLIBRARY library_identifier                                   file_path_spec_list                                   YYINCDIR file_path_spec_list                                  {                                    // See library_text callback                                     deletePos(2);                                 }                                       ;  file_path_spec_list            : file_path_spec                                | file_path_spec_list ',' file_path_spec                               ;  file_path_spec                 : YYFILE_PATH                                                                 {                                            // See include_statement callback                                      deletePos(1);                               }                               ;  include_statement              : YYINCLUDE '<' file_path_spec '>' ';'                                   {				    callback->notImplemented(IncludeImpl);                                 }                                     ;  /* A.1.2 Configuration source text */  config_declaration             : YYCONFIG config_identifier ';'                                  design_statement                                  config_rule_statement_list YYENDCONFIG                                  {                                    callback->configDeclaration(*$2);                                    deletePos(2);                                 } config_rule_statement_list     : /* empty */                                | config_rule_statement_list                                  config_rule_statement                                  // See config_declaration callback                               ;  design_statement_list          : /* empty */                                                                 | design_statement_list libcell_identifier                                 // See config_declaration callback                                ;  libcell_identifier             : cell_identifier                                  {                                    deletePos(1);                                 }                               | library_identifier '.' cell_identifier                                  {                                    deletePos(1);                                    deletePos(3);                                 }                                 // See config_declaration callback                               ;  design_statement               : YYDESIGN design_statement_list ';'                                 // See config_declaration callback                                           ;  config_rule_statement          : config_default_clause config_liblist_clause                                 | config_inst_clause config_liblist_clause                                      | config_inst_clause config_use_clause                                          | config_cell_clause config_liblist_clause                                      | config_cell_clause config_use_clause                                   // See config_declaration callback                                           ; config_default_clause          : YYDEFAULT                                                     // See config_declaration callback                                            ; 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -