BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [OT] A C-language parser test file?
by GotToBTru (Prior) on Aug 27, 2015 at 13:19 UTC | |
by BrowserUk (Patriarch) on Aug 27, 2015 at 13:45 UTC | |
by tye (Sage) on Aug 27, 2015 at 17:36 UTC | |
|
Re: [OT] A C-language parser test file?
by RonW (Parson) on Aug 27, 2015 at 19:02 UTC | |
|
Re: [OT] A C-language parser test file?
by Anonymous Monk on Aug 27, 2015 at 16:01 UTC |