From a3dda80fb27a3a98b5b476d4332514a02d8cc294 Mon Sep 17 00:00:00 2001 From: steve Date: Fri, 23 Mar 2007 23:22:57 +0000 Subject: [PATCH] Properly support signed task/function arguments. --- parse.y | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/parse.y b/parse.y index 8cebf1e25..ddf213afa 100644 --- a/parse.y +++ b/parse.y @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: parse.y,v 1.201.2.6 2007/03/23 19:31:22 steve Exp $" +#ident "$Id: parse.y,v 1.201.2.7 2007/03/23 23:22:57 steve Exp $" #endif # include "config.h" @@ -1030,6 +1030,14 @@ function_item $$ = tmp; yyerror(@1, "Functions may not have output ports."); } + | K_output K_signed range_opt list_of_identifiers ';' + { svector*tmp + = pform_make_task_ports(NetNet::PINPUT, true, + $3, $4, + @1.text, @1.first_line); + $$ = tmp; + yyerror(@1, "Functions may not have output ports."); + } | K_inout range_opt list_of_identifiers ';' { svector*tmp = pform_make_task_ports(NetNet::PINPUT, false, @@ -1038,6 +1046,14 @@ function_item $$ = tmp; yyerror(@1, "Functions may not have inout ports."); } + | K_inout K_signed range_opt list_of_identifiers ';' + { svector*tmp + = pform_make_task_ports(NetNet::PINPUT, true, + $3, $4, + @1.text, @1.first_line); + $$ = tmp; + yyerror(@1, "Functions may not have inout ports."); + } | attribute_list_opt block_item_decl { $$ = 0; } ; @@ -2863,6 +2879,13 @@ task_item @1.text, @1.first_line); $$ = tmp; } + | K_input K_signed range_opt list_of_identifiers ';' + { svector*tmp + = pform_make_task_ports(NetNet::PINPUT, true, + $3, $4, + @1.text, @1.first_line); + $$ = tmp; + } | K_output range_opt list_of_identifiers ';' { svector*tmp = pform_make_task_ports(NetNet::POUTPUT, false, @@ -2870,6 +2893,13 @@ task_item @1.text, @1.first_line); $$ = tmp; } + | K_output K_signed range_opt list_of_identifiers ';' + { svector*tmp + = pform_make_task_ports(NetNet::POUTPUT, true, + $3, $4, + @1.text, @1.first_line); + $$ = tmp; + } | K_inout range_opt list_of_identifiers ';' { svector*tmp = pform_make_task_ports(NetNet::PINOUT, false, @@ -2877,6 +2907,13 @@ task_item @1.text, @1.first_line); $$ = tmp; } + | K_inout K_signed range_opt list_of_identifiers ';' + { svector*tmp + = pform_make_task_ports(NetNet::PINOUT, true, + $3, $4, + @1.text, @1.first_line); + $$ = tmp; + } ; task_item_list