zachjs / sv2v

SystemVerilog to Verilog conversion
BSD 3-Clause "New" or "Revised" License
498 stars 50 forks source link

Issue in how block comments are handled #231

Closed mole99 closed 1 year ago

mole99 commented 1 year ago

There seems to be a small bug in how sv2v handles block comments :)

Take for example this comment:

/*/This is a test*/

sv2v generates this error: test.sv:1:18: Parse error: unexpected token '*' (Sym_aster)

While all of these comments are fine:

/*This is a test*/
/*This is a test/*/
/* /This is a test/*/

According to the small section about comments in the SV LRM everything between /* and */ should be ignored:

grafik

zachjs commented 1 year ago

Thanks for reporting this issue! I agree with your interpretation of the standard. I just pushed a change that should fix this behavior. Please let me know if it works for you!

mole99 commented 1 year ago

I can confirm that it works!

Thanks for the quick solution :)