2012-11-02

Parsing a Protocol Buffers .proto File in F#

I just uploaded Froto.Parser to the nuget gallery. It is a parser for Protocol Buffer .proto files. It is written in F# using the awesome FParsec library. The idea is that it can be used for generating code or making an F# type provider. I intend to try both.
Here is a basic example that lists all the message names and field names:
This could be used in combination with Roslyn to generate protobuf-net classes from .proto files. It could also be used to create a very optimized erasing F# type provider.