vhdl-style-guide icon indicating copy to clipboard operation
vhdl-style-guide copied to clipboard

Resiliance to malformed VHDL

Open imd1 opened this issue 4 years ago • 2 comments

What is your question? Sometimes I run VSG against code that does not compile i.e. it has VHDL syntax errors. VSG tends to fall over in a heap. Should this happen? Are there not traps somewhere so VSG can fail gracefully?

imd1 avatar Nov 09 '21 11:11 imd1

I would think that is possible, after all vcom does not stop at the first error.

Currently my parser will stop if there is a syntax error, but a syntax error is just something missing. I might be able to continue parsing and just skip the missing element.

No guarantee the rest could be parsed though.

It might give false results.

Maybe just analyze up to the syntax error?

jeremiah-c-leary avatar Nov 09 '21 19:11 jeremiah-c-leary

When malformed VHDL is processed, I'd like VSG to report this rather than some obscure traceback error

imd1 avatar Feb 06 '22 16:02 imd1