I'd like to get started learning and using Synalyze It and Hexinator, but I could use a little more help than the docs offer to get me onto the learning curve.
So I'm hoping someone can provide an example grammar to get me started on a simplified version of a file format I'm interested in.
A file in this format consists of a sequence of records, where each record consists of:
- An initial 8-bit type value type from a set of predefined values (with a symbolic name for each, but that detail can be left for later).
- A 16-bit little endian byteCount of data bytes to follow
- A series of byteCount dataBytes
- An 8-bit checksum, the two's complement of the sum across type, byteCount, and dataBytes
The full details are much more complex, essentially what you'll see in Intel's OMF-51 object file format specification which you can find at https://www.keil.com/download/files/omf51.zip, but I'm happy to put off all of that until I know how to write a suitable grammar for the basic format.
A script to check a record's checksum would also be helpful but can be left for later.