Protobuf keyword list.

40 views
Skip to first unread message

Simon Su

unread,
Aug 28, 2019, 5:28:38 AM8/28/19
to Protocol Buffers
Hi all , I want to know all the keywords in .proto file, Is there a keyword list about this ?

Sydney Acksman

unread,
Aug 28, 2019, 5:34:54 AM8/28/19
to Protocol Buffers
There's a protobuf-grammar repo with an open PR for a context-free grammar. You could probably use that to get a list of keywords.

You can find it here: https://github.com/ObsidianMinor/protobuf-grammar/blob/0bc288b63405bad84202be670b03d169a148fdee/spec/grammar.ebnf

Michael W Powell

unread,
Aug 28, 2019, 11:55:43 AM8/28/19
to Protocol Buffers

On Wednesday, August 28, 2019 at 5:28:38 AM UTC-4, Simon Su wrote:
Hi all , I want to know all the keywords in .proto file, Is there a keyword list about this ?

Depends what you are talking about? As in a descriptor view of the .proto file?


You can integrate with the `protoc´ compiler, but it has some limitations, i.e. around target language support for v2 and v3 for instance. Or roll your own parser as needs be as we did, for a v2 specific definition.

Good luck.

Michael W Powell
Reply all
Reply to author
Forward
0 new messages