Open seldridge opened 3 years ago
Good idea. Do you think that set of focused tests could cover these corner cases?
Do you think that set of focused tests could cover these corner cases?
Probably. The test cases included in fixes to llvm/circt#550 and llvm/circt#559 are effectively this.
I had thought that this problem would be more widespread, but I wasn't able to uncover issues other than those two. It's not high priority to add this feature to the fuzzer.
The FIRRTL grammar is context sensitive. While not insanely critical, it could help catch parsing bugs if there's an option to generate identifiers that use known FIRRTL keywords.
E.g., the following circuit is tricky for a parser (see:
input intput
,output UInt
, orinst of of inst
):The CIRCT FIRRTL parser currently falls down with this:
While the Scala FIRRTL Compiler parser doesn't care (because it's using an ANLTR specification of the grammar).
Support for this would help unearth things like: https://github.com/llvm/circt/issues/550.
However, this type of problem is likely pretty rare and this issue is likely lower priority.