Support bit/logic return from functions.

Acked-by: Oswaldo Cadenas <oswaldo.cadenas@gmail.com>
Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
This commit is contained in:
Prasad Joshi 2011-07-11 14:06:11 +01:00 committed by Stephen Williams
parent ceaa45e9e5
commit 7b7abb1d55
1 changed files with 10 additions and 0 deletions

10
parse.y
View File

@ -3531,6 +3531,16 @@ function_range_or_type_opt
if ($3)
$$.range = make_range_vector($3);
}
| bit_logic unsigned_signed_opt range_opt
{
/* the default type is bit/logic unsigned and no range */
$$.type = PTF_REG;
$$.range = 0;
if ($2)
$$.type = PTF_REG_S;
if ($3)
$$.range = make_range_vector($3);
}
| K_integer { $$.range = 0; $$.type = PTF_INTEGER; }
| K_real { $$.range = 0; $$.type = PTF_REAL; }
| K_realtime { $$.range = 0; $$.type = PTF_REALTIME; }