RFC: generator_generator 1.01

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hello everyone,

I'm seeking comments about a script I'll be releasing on CPAN soon. You
can think of it as YACC for generators instead of parsers.

   generator_generator - given a grammar, generates a C++ string generator

   generate_generator generates a C++ program that generates all strings of
   the format specified by the input grammar. The resulting generator
   generates strings of the user-specified length. The input file format is
   very similar to the normal YACC and LEX input files.  This program is
   designed to create a fast program for computing the "exhaustive initial
   segment" of inputs for testing of another program.

I've tried very hard to make it easy to use, but it's still fragile due to
the complexity and system-dependent nature of it. I hope to test on a
wider set of platforms to make it more robust.  You can get it here if you
want to take a look:


The TODO file contains the beginnings of a tutorial, which I need to
write. I also need to update the documentation. I'll finish all that
before releasing the script publicly. If you want to try it out
out-of-the-box (after running "perl Makefile.PL"):

   ./generator_generator -fm -u in*tree grammars/f*.yg grammars/f*.lg
   ./output/progs/generate 12

to generate fault trees of length 13, and:

   ./generator_generator -fm -u in*ion grammars/l*.yg grammars/l*.lg
   ./output/progs/generate 4

to generate logical expressions of length 8.

I need comments on the following:

- I really don't like the name. Anyone have a better one?
- I'm not really sure how to explain it succinctly. The above blurb is
   quite bad. Can anyone suggest a better description?
- I need to install templates and other non-module code on the system.
   Should I use the generator_generator:: namespace? (Anyone know how to do
   installation of non-module files with Module::Install?)
- Is it best to write the tutorial up in POD, and embed it in an otherwise
   empty module? (I think Inline does this.)
- I need to distribute some example files. Is there a standard directory
   like "eg" or "ex"? If I choose "examples" will that break anything?
- Should I install examle files on the system?

If you happen to try it out, please let me know.


Site Timeline