johngunderman/fuzzbuzz — pull request #1 by timtadh (2012-02-19 22:00:06+00:00)
Title: I wrote what I had in mind for the "binary"

Hi John,

I wrote what I had in mind for the binary. There are some things which are not perfect, but in general:

- I want to give it the grammar, and reverse lexer
- I want it to load the grammar and lexer
- I want it to use a specified engine
- with a sensible default

In the future

- Engines should be able to register themselves
- Provide a description of their functionality
- Declare an additional input needed from the user (an example corpus, statistics tables, etc...)

Where I am going should be fairly clear.

##### On argparse vs getopt

I decided to kill the argparse version because I wasn't sure if you preserved some features, such as the helper functions sensibly dying when something went wrong. Eg. if a function expected a file_path and no file was there, it should cause the program to die.

I structure my frontends like this to simplify the code and return to the user as soon as an error is encountered. I am also trying to protect the backend by no allowing bad inputs through.

Let me know what you think.