Does anyone know of a publicly available C source file specifically constructed for testing the edge cases of C-language parsers?
I'm writing a parser for the C-language (and yes; I need to write my own), and I sat down to think of a good way to test it.
My conclusion is that rather than just feeding it it reams and reams of C sources; most of which will simply be re-exercising the same paths; it would be better to try and construct a single, preferably relatively small, C-source that doesn't necessarily have to do anything useful, but simply uses all the constructs and language features that I need to support. (Which isn't the full standard; any of them.)
I started to try and write notes on everything I think need to be in this file -- and I will continue that -- but then I thought maybe such a file already exists. I've done a few half-hearted searches for something that might fit the bill; but its proven to be a difficult thing to construct a discriminative search criteria for.
So, this is just a hope that maybe someone here has knowledge of something that might lend itself to my purpose.
In reply to [OT] A C-language parser test file? by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |