|
From: | Hans Aberg |
Subject: | Re: question |
Date: | Mon, 15 Aug 2005 12:25:39 +0200 |
On 15 Aug 2005, at 05:20, David Ja wrote:
Thank you guys very much. I noticed my mistakes as well. Forgetting to allocate memory is quite embrassing. Thank you very much again for helpingme.I guess in a sense it is a pretty-printing function. The point however is not the print anything. I want to generate a bunch of strings based/ accepted on a given grammar. That is really fundamentally what I needed. As you seen I pick a random transition stepping through the grammar until I reach theend state. (pop out of the stack)
If you want to generate a generate a random sentence, you need to generate a random parse tree, and for each token, a random string matching it. I do not see, though, how you intend to generate the random parse tree.
Hans Aberg
[Prev in Thread] | Current Thread | [Next in Thread] |