Parser generator in pure zig, and a fully test toml parser/serializer generated by it

I start this project just for fun (not realy, it’s because I want edit toml document in-place like rust cargo toml-edit or minecraft mods config).

It currently contains three modules. A parser generator ‘plib’, a abnf parser/serializer ‘abnf’ and a toml parser/serializer ‘toml’.

‘plib’ takes an abnf sturcture and produce a parser that generate AST from raw text.

‘abnf’ takes an abnf file and generate a zig file contains the abnf structure, which will used by ‘plib’ lately.

‘toml’ is parser/serializer created by ‘plib’ that current pass all toml-test tests.

It’s a pleasure solo journey. How do you think about it?

6 Likes