libbiosyntax

CI Lines of Code PURE VIBE CODING DOI

libbiosyntax is a small C99 reimplementation of BioSyntax’s biological text highlighting model. It reads one text line at a time and returns byte spans with semantic token-class IDs.

It does not perform IO. Compressed or binary inputs such as BAM, CRAM, and BCF should be decoded by the caller before passing text lines to the core.

The core is intentionally copy-friendly:

include/biosyntax.h
src/biosyntax.c

No runtime data files are required. The Makefile builds FFI-friendly shared and static libraries by default. The bcat and biocat commands under examples/ are only example CLIs.

Quick start

make
make test
make examples

For direct embedding:

cc -Iinclude your_program.c src/biosyntax.c -o your_program

Documentation

License

This implementation is inspired by BioSyntax and is distributed under the GNU Lesser General Public License version 2.1 or later. See LICENSE.md.

This relicensing was made possible by the kind permission of BioSyntax’s current owner and maintainer. See the discussion in BioSyntax issue #70.

Original BioSyntax project: https://github.com/bioSyntax/bioSyntax