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
helping
me.
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 the
end 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
_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison