V
valtih1978
Guest
My parser accepts this
$random(1); // ok
$random(); // ok
but fails when assignment is involved
a = $random(); // parser syntax error
Modelsim accepts everything. I have checked the LRM,
http://www.verilog.com/VerilogBNF.html#REF161, which says
<function_call>
::= <name_of_function> ( <expression> <,<expression>>* )
||= <name_of_system_function> ( <expression> <,<expression>>* )
||= <name_of_system_function>
It seems that parenthesis demand an argument. What is correct?
$random(1); // ok
$random(); // ok
but fails when assignment is involved
a = $random(); // parser syntax error
Modelsim accepts everything. I have checked the LRM,
http://www.verilog.com/VerilogBNF.html#REF161, which says
<function_call>
::= <name_of_function> ( <expression> <,<expression>>* )
||= <name_of_system_function> ( <expression> <,<expression>>* )
||= <name_of_system_function>
It seems that parenthesis demand an argument. What is correct?