Re: syntactically comprehensive test program



<nobrow@xxxxxxxxx> wrote in message
I need a syntactically comprehensive test program to test a C parser
on. Does anyone know where I might find a program that uses all
syntactical elements of the language and combines them in cunning/
realistic ways so that one might be confident that a pass on this
program will mean a pass on any valid C program.

Big ask, but I thought someone might know of a suitable file(s).

Look for a program called C torture, which is designed to stress compilers.

Unfortunately it is extremely difficult to verify that a grammar parser is correct. Non-artificial bugs will often fail to manifest themselves on the vast majority of inputs. C torture is a good test, but not definitive by any means, which is why ANSI haven't endorsed it or any similar test suite.


--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

.



Relevant Pages

  • Re: Python from Wise Guys Viewpoint
    ... acceptable by the compiler. ... >>They same holds for assertions as soon as they are run by the test suite. ... Maybe we both understand language implementation, ... type system is better. ...
    (comp.lang.python)
  • Re: Python from Wise Guys Viewpoint
    ... acceptable by the compiler. ... >>They same holds for assertions as soon as they are run by the test suite. ... Maybe we both understand language implementation, ... type system is better. ...
    (comp.lang.lisp)
  • Re: Why did no one invent Python before?
    ... why is a language like this only NOW appearing? ... Around 10 years ago I was using a language called Amiga E. After ... For example, if running your test suite takes 20 minutes now, on a dual ... some modern styles of programming simply were not ...
    (comp.lang.python)
  • Re: FreeRTOS / SafeRTOS in a Medical Device
    ... code and publish a load of patches to 'upgrade' the code to be compliant ... with some safety related standard or other then, I would not have a problem ... This would be a full build test suite, language compliance, test of language extensions, maths tests etc. ...
    (comp.arch.embedded)
  • Re: Test first as specification
    ... > Do you know of any prior experience with specifying a programming ... language; XSLT comes to mind. ... It's much easier to find cases where a comprehensive test suite was ... "Specifying by tests" sounds a bit more ambitious, ...
    (comp.object)