meta-programming language for binary format specification
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
falsycat 65c819cae6 RELEASE v1.0.2 3 years ago
c Tidies the directory structure. 3 years ago
test Supports bit shift operators. 3 years ago
.gitignore Supports partial code generation. 3 years ago
CMakeLists.txt Supports partial code generation. 3 years ago
LICENSE Creates new project. 3 years ago
README.md RELEASE v1.0.1 3 years ago
biner.l Improves performance in skipping comment. 3 years ago
biner.y Supports bit shift operators. 3 years ago
main.c Supports partial code generation. 3 years ago
transpile.h Supports partial code generation. 3 years ago
transpile_c.c Supports bit shift operators. 3 years ago
tree.c Removes unused types, f16/f32/f64. 3 years ago
tree.h Supports bit shift operators. 3 years ago
zone.h Tidies the directory structure. 3 years ago

README.md

biner

The Simplest Interface Description Language for Binary Format

features

  • provides readable way to express binary format
  • generates pack/unpack function for C from biner file

requirements

  • flex
  • bison
  • cmake
  • gcc (generated codes uses GCC extension)

install

  1. add this repo to yours as submodule
  2. write the following code on your CMakeLists.txt
add_subdirectory(path/to/biner)
target_biner_sources(target-name
  OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/generated
  SOURCES
    file1.biner
    file2.biner
)

Now file1.biner.h and file2.biner.h are generated under ${CMAKE_CURRENT_BINARY_DIR}/generated directory.

You can get an example from test directory.

license

Do What The Fuck You Want To Public License

author

falsycat

If you find something, please contact me at email address written in my portfolio.