Handle empty argument list to system function. (SystemVerilog)

This commit is contained in:
Stephen Williams 2011-11-06 09:13:09 -08:00
parent 8e0beff3ab
commit fc44658dad
1 changed files with 11 additions and 0 deletions

11
parse.y
View File

@ -1661,6 +1661,17 @@ expr_primary
yyerror(@1, "error: Empty function argument list requires SystemVerilog.");
}
}
| SYSTEM_IDENTIFIER '(' ')'
{ perm_string tn = lex_strings.make($1);
const vector<PExpr*>empty;
PECallFunction*tmp = new PECallFunction(tn, empty);
FILE_NAME(tmp, @1);
delete[]$1;
$$ = tmp;
if (!gn_system_verilog()) {
yyerror(@1, "error: Empty function argument list requires SystemVerilog.");
}
}
/* Many of the VAMS built-in functions are available as builtin
functions with $system_function equivalents. */