Related articles |
---|
need help with using a grammar to construct a sentence from a group of plantz@fgm.com (Glen Plantz) (1998-04-13) |
Re: need help with using a grammar to construct a sentence from a grou kelley@iguana.ruralnet.net (1998-04-18) |
Re: need help with using a grammar to construct a sentence from a grou resslere@erols.com (resslere) (1998-04-21) |
Re: need help with using a grammar to construct a sentence from a grou donham@linex.com (Jake Donham) (1998-04-27) |
Re: need help with using a grammar to construct a sentence from a grou js10@doc.ic.ac.uk (1998-05-04) |
Re: need help with using a grammar to construct a sentence from a grou schairer@dfki.de (Axel Schairer) (1998-05-04) |
From: | Jake Donham <donham@linex.com> |
Newsgroups: | comp.compilers,comp.lang.java.programmer |
Date: | 27 Apr 1998 23:29:31 -0400 |
Organization: | DNAI ( Direct Network Access ) |
References: | 98-04-049 98-04-075 |
Keywords: | testing, parse |
>> I have a problem where I need to do the opposite of parsing;
>> given a grammar and a group of words, I need to use the grammar
>> to construct a valid sentence. ...
I have a yacc-based generator in C that I wrote to generate nonsense
text; it takes a yacc-like grammar and picks random paths through it
(you can weight particular branches so they have a higher chance of
being picked).
I'd be happy to send you the source if you're interested. It's pretty
simple.
Jake
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.