You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Author Name: David A
Original Redmine Issue: 84 from https://www.veripool.org
Original Date: 2009-05-08
Original Assignee: Wilson Snyder (@wsnyder)
Hi, I have a question regarding the precompiler macro parser.
If I'm not mistaken, Verilog-Parser doesn't support newline characters to separate formal arguments. Ex:
`define MY_MACRO ( FORMAL1, // here is a newline char, which is also a whitespace
FORMAL2 ) rest of the macro text here...
Again, if I'm not mistaken I think this is valid syntax.
According to the Verilog-2005 LRM (IEEE Std 1364-2005), on section 19.3.1 (page 351 first parragraph) "The formal argument names shall be simple_identifiers, separated by commas and optionally whitespace". Focus on the optional whitespaces. Now in the same document of the formal syntax definition (Annex A), on section A.9.4 (page 509) whitespaces are defined in BNF as:
white_space ::= space | tab | newline | eof
So, if this syntax is valid, could it be included on Verilog-Perl?
Thanks,
Davd
The text was updated successfully, but these errors were encountered:
Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-05-09T00:14:01Z
Wow, the committee botched that one. It should be the same rule as CPP,
and it's definitely illegal there, but I see at least one simulator takes
it so your interpretation is correct. If I were you I'd change the code
and never do that again, as you're certain to hit other tools that will get this wrong.
This is somewhat a pain to fix as it reads the entire line right now, so no patch yet.
Author Name: David A
Original Redmine Issue: 84 from https://www.veripool.org
Original Date: 2009-05-08
Original Assignee: Wilson Snyder (@wsnyder)
Hi, I have a question regarding the precompiler macro parser.
If I'm not mistaken, Verilog-Parser doesn't support newline characters to separate formal arguments. Ex:
Again, if I'm not mistaken I think this is valid syntax.
According to the Verilog-2005 LRM (IEEE Std 1364-2005), on section 19.3.1 (page 351 first parragraph) "The formal argument names shall be simple_identifiers, separated by commas and optionally whitespace". Focus on the optional whitespaces. Now in the same document of the formal syntax definition (Annex A), on section A.9.4 (page 509) whitespaces are defined in BNF as:
So, if this syntax is valid, could it be included on Verilog-Perl?
Thanks,
Davd
The text was updated successfully, but these errors were encountered: