3 ms·
Link to the repo for the lazy: https://github.com/binspector/binspector https://github.com/binspector/binspector Interesting project. Is there support for impo
by steventhedev 12y ago
Link to the repo for the lazy: https://github.com/binspector/binspector https://github.com/binspector/binspector
Interesting project. Is there support for importing/exporting from a C header? Or generating file import code given a bfft file?
- MontagFTB 12y agoThere isn't any support for importing from a C header. In order to get it right you would need a decent C parser as well as details about the compile-time environment (e.g, char being (un)signed.) At this point it's probably faster to code up the format grammar manually. Generating import code given a bfft is a thought I had considered. One of the features I would like to implement is to separate the parse tree generator from the analyzer and expose an analyzer API. Applications would be able to use the Binspector core as a library, then, and read file contents directly by providing their own bffts and hooking the API to populate their own internals. edit: spelling.
- steventhedev 12y agoVery good point. Perhaps you could use libclang? Regarding the import code, even if you start with just emitting a C header, it would make it easier to use your tool to design file formats.
- MontagFTB 12y agoGood idea leveraging Clang for struct round-tripping. Yet another thing to look into!