Skip to content

davidsiaw/bsm2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bsm2

bsm2 consists of

  • bsm2 which converts input that describes a binary file in a human-readable format and outputs a binary file.
  • msb2 which converts a binary file into a bsm2 file that can be parsed as plain text

Building

requires sudo apt install flex libfl-dev

make

Example file

bsm2 is a "literate language". All lines are ignored except the ones starting with a semicolon (;). When we create binary files we are engaging in the worst kind of micromanagement and should be encouraged to document our every move.

this file is called input.bsm

writes ABC

; 41 42 43

writes D

; 44

You can find more examples in the spec directory, as well as more detailed documentation on how to use different features and explanations about edge cases.

Running

bin/bsm2 < input.bsm

Testing

The spec for this program is written in Markdown. See the spec directory.

In order to run the tests, you need markspec, which you can install with gem install markspec

Run the tests by going markspec

You can run an individual test too by going markspec spec/abc_test.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published