d0c-s4vage / gramfuzz

gramfuzz is a grammar-based fuzzer that lets one define complex grammars to generate text and binary data formats.
https://d0c-s4vage.github.io/gramfuzz/
MIT License
251 stars 39 forks source link

add feature to import [e]bnf grammars #6

Open d0c-s4vage opened 7 years ago

d0c-s4vage commented 7 years ago

gramfuzz should have a method analogous to the load_grammar method that will parse a grammar file and create analogous gramfuzz structures in memory. Maybe something like:

fuzzer.import_grammar("path/to/test_grammar.bnf", type="bnf")

Both ebnf and bnf grammars should be allowed.

aside it may be cool (not sure how useful really though) to export grammar rules from memory into a file as well.

d0c-s4vage commented 5 years ago

This would be fantastic - bumping this one up