Re: Have C++ Parser; Need Difficult C++ Examples (Gary Merrill)
Wed, 16 Sep 1992 12:48:33 GMT

          From comp.compilers

Related articles
Have C++ Parser; Need Difficult C++ Examples (1992-09-14)
Re: Have C++ Parser; Need Difficult C++ Examples (1992-09-16)
| List of all articles for this month |

Newsgroups: comp.compilers,comp.lang.c++
From: (Gary Merrill)
Organization: SAS Institute Inc.
Date: Wed, 16 Sep 1992 12:48:33 GMT
Keywords: C++, parse, testing
References: 92-09-071 (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
ICON source
TLEX source

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 ... !mcnc!sas!sasghm

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.