Protobuf Description

Hello,

I recently am looking at Protobufs and I noticed that there is a Protobuf library for reading / writing messages on the “wire”.

I want to use prolog to parse protobuf files themselves – and there is an API for this Protobuf Descriptors.

Has anyone made use of this library and could offer some guidance how it could be used to generate an AST in prolog.

thanks,

Dan

The protobuf compiler protoc outputs all information about a .proto file into a file in protobuf format. There’s an example of using this in packages/protobufs/interop and packages/protobufs/bootstrap/protoc-gen-swipl (also parse_descriptor_proto_dump.pl).