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

📄 oaverilogparser.ypp

📁 openaccess与verilog互相转化时所用的源代码
💻 YPP
📖 第 1 页 / 共 5 页
字号:
                                 list_of_param_assignments ';'                                  {                                    callback->realDeclaration(*$3);                                    $$ = $3;                                 }                               | YYPARAMETER YYREALTIME                                    list_of_param_assignments ';'                                   {                                    callback->realtimeDeclaration(*$3);                                    $$ = $3;                                 }                               | YYPARAMETER YYTIME                                  list_of_param_assignments ';'                                   {                                    callback->timeDeclaration(*$3);                                    $$ = $3;                                 }                               ;  parameter_declaration_list     : /* empty */                                 {                                    $$ = new ParamList;                                 }                                                                  | parameter_declaration_list                                    parameter_declaration                                 {                                    $1->append(*$2);                                    deletePos(2);                                    $$ = $1;                                  }                                                // See parameter_declaration callback                               ;  specparam_declaration          : YYSPECPARAM list_of_specparam_assignments ';'                                 | YYSPECPARAM range                                    list_of_specparam_assignments ';'                                ;  net_type_option                : /* empty */                                                                    {                                    $$ = oacSignalSigType;                                 }                               | net_type                                      {                                     $$ = $1;                                 }                                // See net_declaration callback                               ; inout_decl_header              : YYINOUT                               | YYCOMMAINOUT                               ;      inout_declaration              : inout_decl_header                                 net_type_option signed_option                                    range_option list_of_port_identifiers                                  {                                    oaSigType   sigType($2);                                    oaName	portName;                                                                        for (NameListIter i = $5->begin();                                         i != $5->end(); i++) {                                        Options::oaStringToName(**i, portName);                                        callback->portDeclaration(oacInputOutputTermType,                                                                  sigType, $3,                                                                  $4, portName);                                    }                                                                        $$ = $5;                                    deletePos(3);                                    deletePos(4);                                 }                               ; input_decl_header              : YYINPUT                               | YYCOMMAINPUT                               ; input_declaration              : input_decl_header                                  net_type_option signed_option                                    range_option list_of_port_identifiers                                  {                                    oaSigType	sigType($2);                                    oaName	portName;                                                                        for (NameListIter i = $5->begin();                                         i != $5->end(); i++) {                                        Options::oaStringToName(**i, portName);                                        callback->portDeclaration(oacInputTermType,                                                                  sigType,                                                                  $3,                                                                  $4,                                                                  portName);                                    }                                                                        $$ = $5;                                    deletePos(3);                                    deletePos(4);                                 }                               ; output_decl_header             : YYOUTPUT                               | YYCOMMAOUTPUT                               ; output_declaration             : output_decl_header                                 signed_option range_option                                  list_of_port_identifiers                                  {				    oaName  portName;				                                        for (NameListIter i = $4->begin();                                         i != $4->end(); i++) {                                        Options::oaStringToName(**i, portName);                                        callback->portDeclaration(oacOutputTermType,                                                                  oacSignalSigType,                                                                  $2,                                                                  $3,                                                                  portName);                                    }                                                                        $$ = $4;                                    deletePos(2);                                    deletePos(3);                                 }                               | output_decl_header net_type                                  signed_option range_option                                  list_of_port_identifiers                                  {                                    oaSigType   sigType($2);                                    oaName	portName;                                                                        for (NameListIter i = $5->begin();                                         i != $5->end(); i++) {                                        Options::oaStringToName(**i, portName);                                        callback->portDeclaration(oacInputTermType,                                                                  sigType,                                                                  $3,                                                                  $4,                                                                  portName);                                   }                                                                      $$ = $5;                                   deletePos(3);                                   deletePos(4);                                 }                               | YYOUTPUT YYREG                                 signed_option range_option                                  list_of_port_identifiers                                  {				    oaName  portName;				                                        for (NameListIter i = $5->begin();                                         i != $5->end(); i++) {                                         Options::oaStringToName(**i, portName);                                         callback->portDeclaration(oacInputTermType,                                                                   oacSignalSigType,                                                                   $3,                                                                   $4,                                                                   portName);                                    }                                                                        $$ = $5;                                    deletePos(3);                                    deletePos(4);                                 }                               ; event_declaration              : event_decl_header                                 list_of_event_identifiers ';'                                  {                                    callback->eventDeclaration();                                 }                               ; event_decl_header              : YYEVENT                                  { }                                 ; genvar_declaration             : genvar_decl_header                                 list_of_genvar_identifiers ';'                                       {                                    callback->genvarDeclaration();                                    deletePos(2);                                 }                               ; genvar_decl_header             : YYGENVAR                                   { }                                 ; integer_declaration            : integer_decl_header range_option                                 list_of_variable_identifiers ';'                                    {                                    if ($2) {                                        callback->integerDeclaration(*$2, *$3);                                    } else {                                        callback->integerDeclaration(*$3);                                    }                                    deletePos(2);                                    deletePos(3);                                 }                               ; integer_decl_header            : YYINTEGER                                   { }                                 ;net_declaration                : net_type                                    signed_option                                 delay3_option                                 list_of_net_identifiers ';'                                 {                                    callback->netDeclaration($1, NULL, $2,                                                             NULL, $3, *$4);                                    deletePos(1);                                    deletePos(2);                                    deletePos(3);                                    deletePos(4);                                 }                               | net_type                                    signed_option                                 delay3_option                                 list_of_net_decl_assignments ';'                                 {                                     callback->netDeclAssign($1, NULL, $2,                                                            NULL, $3, *$4);                                    deletePos(1);                                    deletePos(2);                                    deletePos(3);                                    deletePos(4);                                             }                               | net_type                                    signed_option                                 delay3_option                                 drive_strength                                  list_of_net_decl_assignments ';'                                 {                                     callback->netDeclAssign($1, $4, NULL,                                                            NULL, $3, *$5);                                    deletePos(1);                                    deletePos(3);                                    deletePos(4);                                    deletePos(5);                                             }                               | net_type                                    signed_option                                    net_range                                    delay3_option                                  list_of_net_identifiers ';'                                 {                                    callback->netDeclaration($1, NULL, $2,                                                             $3, $4, *$5);                                    deletePos(1);                                    deletePos(2);                                    deletePos(3);                                    deletePos(4);                                    deletePos(5);                                 }                               | net_type                                    signed_option                                    net_range                                    delay3_option                                   list_of_net_decl_assignments ';'                                 {                                     callback->netDeclAssign($1, NULL, $2,                                                            $3, $4, *$5);                                    deletePos(1);                                    deletePos(2);                                    deletePos(3);                                    deletePos(4);                                    deletePos(5);                                             }                               | net_type                                  drive_strength                                     signed_option                                    net_range                                    delay3_option                                    list_of_net_decl_assignments ';'                                 {                                     callback->netDeclAssign($1, $2, $3,                                                            $4, $5, *$6);                                    deletePos(1);          

⌨️ 快捷键说明

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