u/mttdin r/ProgrammingLanguages • Recommends
On “Generating runnable programs automatically for any programming language”
…ingbook.org/html/Grammars.html
There's been a great talk recently, introducing this topic as well as presenting some pretty interesting research in this area (e.g., if you don't have the grammar, but have a parser, you can extract the grammar from the parser!), "Learning the Language of Failure" by (one of the authors of the book) Andreas Zeller (link to this video slides: https://andreas-zeller.info/assets/CASA-2020-Learning-the-Language-of-Failure.pdf; pFuzzer: Parser-Directed Fuzzing: https://github.com/vrthra/pFuzzer).
It's a very popular method for compiler testing, with many available tools: https://github.com/MattPD/cpplinks/blob/master/compilers.correctness.md#testing-software
One practical…