jeremiah-c-leary / vhdl-style-guide

Style guide enforcement for VHDL
GNU General Public License v3.0
189 stars 38 forks source link

Resiliance to malformed VHDL #669

Open imd1 opened 2 years ago

imd1 commented 2 years ago

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?

jeremiah-c-leary commented 2 years ago

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?

imd1 commented 2 years ago

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