dlang-community / Pegged

A Parsing Expression Grammar (PEG) module, using the D programming language.
534 stars 66 forks source link

protobuf grammar examples #264

Open patrickkh7788 opened 5 years ago

patrickkh7788 commented 5 years ago

Protobuf is perfect use case for pegged. not like JSON or CSS, it only need convert to d source at compile time, no need runtime parse.

I find a JavaScript version peg here: https://github.com/lal12/proto-parse/blob/master/proto.peg

I plan to translate it into pegged ( I still can not full understand pegged).

Maybe someone already does this, so I create a issue here.