Announcing libbnf v1.0!
EDIT: The download links were modified to point to the GR Hack CVS server. Read this for more info on how to access the repository.
I finally found some time to finish and release libbnf. Libbnf is a tiny C library that can parse a Backus-Naur Form grammar from a text file and create a graph-like datastructure out of it. Libbnf can also visualize the parsed grammar via Graphviz – it actually exports the BNF grammar in Graphviz’s .dot format which your can later use in order to create a jpeg, png or even a vector image.
For example, here’s how libbnf visualizes this C grammar (K&R with minor modifications).
Libbnf requires libdatastruct which you can download from here. Unfortunately, libdatastruct still lacks proper documentation.
You can download libbnf from this location. Make sure you read the REAMDE, test.c, test.bnf and C.bnf files before using libbnf in your programs. If you encounter any problems, bugs etc let me know by mailing me. Please do not post compilation errors in the comment section!
Waiting for your feedback!
– dp