ivl: Parsing rules for type casting.

This commit is contained in:
Maciej Suminski 2014-10-31 09:47:02 +01:00
parent 13f861a963
commit daa59a95ad
1 changed files with 12 additions and 0 deletions

12
parse.y
View File

@ -3543,6 +3543,18 @@ expr_primary
}
}
| data_type '\'' '(' expression ')'
{ PExpr*base = $4;
if (gn_system_verilog()) {
PECastType*tmp = new PECastType($1, base);
FILE_NAME(tmp, @1);
$$ = tmp;
} else {
yyerror(@1, "error: Type cast requires SystemVerilog.");
$$ = base;
}
}
/* Aggregate literals are primaries. */
| assignment_pattern