|Have C++ Parser; Need Difficult C++ Examples email@example.com (1992-09-14)|
|Re: Have C++ Parser; Need Difficult C++ Examples firstname.lastname@example.org (1992-09-16)|
|From:||email@example.com (Gary Merrill)|
|Organization:||SAS Institute Inc.|
|Date:||Wed, 16 Sep 1992 12:48:33 GMT|
|Keywords:||C++, parse, testing|
firstname.lastname@example.org (Ed Ipser) writes:
|> We have developed a C++ parser (abstract translator, actually) which is
|> now in beta testing. We are looking for difficult C++ programs to test the
|> parser. It already successfully handles all publishd ambiguities including
|> several difficult examples posted to comp.compilers recently.
The testing suite we employ contains, but is not limited to, the following
(which are generally available, though some are not PD):
Suite++ from Plum-Hall
The NIH class libraries
Puzzles from the "C++ Report"
Suite from Bruce Eckel's book
The Rogue Math. Lib
All examples shipped with the following C++ compilers:
You should also of course run your translator on a bunch of standard C
code. Our tests of this include:
Plum-Hall C Test Suite
In addition, our in-house testing department has written a C++ expression
test generator and a C++ inheritance test generator which generate many
(sometimes I think *uncountably* many) tests.
Of the above, our testing people feel that the Plum-Hall suite and the
puzzles from the "C++ Report" contain some of the most perverse code (and
if its perverse to the testing people, it's a nightmare to a compiler
writer). Since the Plum-Hall suite is still under development (as is
everyone's C++) you need to look at test results with a critical eye.
Even test suites have their bugs or disputable areas.
Interviews is a good test as well, but it is written so idiosyncratically
that you may need to modify it to get it to work on your system. (Header
file structure and redefinition of various preprocessor symbols drove our
testing department nuts for a while.)
Then there are the little fun examples our merry testing group likes to
throw in. For example, expressions with 128, 1024, and 2048 nested
parentheses. If you are using a table driven parser with a statically
sized stack, good luck!
Y'all have fun now (I know I have).
Gary H. Merrill [Principal Systems Developer, C Compiler Development]
SAS Institute Inc. / SAS Campus Dr. / Cary, NC 27513 / (919) 677-8000
email@example.com ... !mcnc!sas!sasghm
Return to the
Search the comp.compilers archives again.