BIT Numerical Mathematics

, Volume 12, Issue 3, pp 366–375

A sentence generator for testing parsers

  • Paul Purdom

DOI: 10.1007/BF01932308

Cite this article as:
Purdom, P. BIT (1972) 12: 366. doi:10.1007/BF01932308


A fast algorithm is given to produce a small set of short sentences from a context free grammar such that each production of the grammar is used at least once. The sentences are useful for testing parsing programs and for debugging grammars (finding errors in a grammar which causes it to specify some language other than the one intended). Some experimental results from using the sentences to test some automatically generated simpleLR(1) parsers are also given.

Copyright information

© BIT Foundations 1972

Authors and Affiliations

  • Paul Purdom
    • 1
  1. 1.Computer Science DepartmentIndiana UniversityBloomingtonUSA

Personalised recommendations