Re: Parsing techniques for generating sentences from grammar

James Jones <jejones@microware.com>
14 Jul 1999 02:07:03 -0400

          From comp.compilers

Related articles
Parsing techniques for generating sentences from grammar amitr@abinfosys.com (Amit Rekhi) (1999-07-10)
Re: Parsing techniques for generating sentences from grammar jejones@microware.com (James Jones) (1999-07-14)
Re: Parsing techniques for generating sentences from grammar adrian@dcs.rhbnc.ac.uk (1999-07-19)
Re: Parsing techniques for generating sentences from grammar peter.r.wilson@boeing.com (Peter Wilson) (1999-07-28)
| List of all articles for this month |
From: James Jones <jejones@microware.com>
Newsgroups: comp.compilers
Date: 14 Jul 1999 02:07:03 -0400
Organization: Microware Systems Corporation
References: 99-07-036
Keywords: parse, testing

Seems to me that it would be easy to turn a recursive descent parser
into a sentence generator of the sort desired; where the parser
expects to see a token, it should instead print it. Wherever there's
a * or +, you'd need some way to keep it from going on forever (flip a
coin or extend the grammar syntax to let the user attach probabilities
to alternatives, the latter being of wider applicability than just
preventing endless recursion). Not that this is new stuff; check out
Charles Wetherell's paper on the subject in a _Computing Surveys_
issue back in the early 1980s.


James Jones


Post a followup to this message

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