|Grammar generator email@example.com (Thomas Duwe) (2006-04-08)|
|Re: Grammar generator firstname.lastname@example.org (Thomas Duwe) (2006-04-21)|
|Re: Grammar generator DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-04-23)|
|From:||Thomas Duwe <email@example.com>|
|Date:||21 Apr 2006 23:49:29 -0400|
|Organization:||Humboldt University of Berlin, Department of Computer Science|
|Posted-Date:||21 Apr 2006 23:49:29 EDT|
> [We've seen sentence generators that generate random source code from
> a grammar, shouldn't be any harder than that. -John]
That's in principle right.
But I Want To Generate A Grammar ( in ebnf or bnf ) where the
rules, if i parse the resulting grammar, are producing something.
So I Have To Specify, That I Need To Generate A Random Grammar,
where the rules produce something and all the rules are also used.
I read some papers regarding generating sentences from a grammar
( e.g. Purdom's algorithm and variants of that ).
Unfortunately, that isn't helping me much.
Perhaps someone have further suggestions?
I've taken now following steps to accomplish my task :
-I've taken the grammar of ebnf and implemented these rules as methods,
which are recursively called according to the grammar of ebnf.
-And i specified some rules, such as nesting level of +,*,?, so
that the generated tree is not to deep.
But up till now, nothing 'useful' is generated.
Return to the
Search the comp.compilers archives again.