Grammar does not allow more than one parenthesized identifier.
Defined as
option = "option" optionName "=" constant ";"
optionName = ( ident | "(" fullIdent ")" ) { "." ident }
with
ident = letter { letter | unicodeDigit | "_" }
fullIdent = ident { "." ident }
yet in unittest_custom_options.proto there's:
message VariousComplexOptions {
option (.protobuf_unittest.complex_opt1).foo = 42;
option (protobuf_unittest.complex_opt1).(.protobuf_unittest.quux) = 324;
option (.protobuf_unittest.complex_opt1).(protobuf_unittest.corge).qux = 876;
option (protobuf_unittest.complex_opt1).foo4 = 99;
option (protobuf_unittest.complex_opt1).foo4 = 88;
option (complex_opt2).baz = 987;
option (complex_opt2).(grault) = 654;
option (complex_opt2).bar.foo = 743;
option (complex_opt2).bar.(quux) = 1999;
option (complex_opt2).bar.(protobuf_unittest.corge).qux = 2008;
option (complex_opt2).(garply).foo = 741;
option (complex_opt2).(garply).(.protobuf_unittest.quux) = 1998;
option (complex_opt2).(protobuf_unittest.garply).(corge).qux = 2121;
option (ComplexOptionType2.ComplexOptionType4.complex_opt4).waldo = 1971;
option (complex_opt2).fred.waldo = 321;
option (complex_opt2).barney = { waldo: 101 };
option (complex_opt2).barney = { waldo: 212 };
option (protobuf_unittest.complex_opt3).qux = 9;
option (complex_opt3).complexoptiontype5.plugh = 22;
option (complexopt6).xyzzy = 24;
}
half of which have multiple parenthesized identifiers.
@LisaFC looks like this is worth investigating.
By the way, @JakeWharton do you have your own .proto file parser? Would be curious to know the use case for that.
We have systems which need to parse, read, and write protos dynamically at runtime in Java. We also ship our own "compiler" and Java runtime which generates files that are much more terse than protoc's Java format but not as crazy as the choices made by JavaNano. The latter is targeted at Android.
How about optionName = ( ident | bracedFullIdent ) { "." ( ident | bracedFullIdent ) } bracedFullIdent = "(" ["."] fullIdent ")"
correct spec
I'm working on correcting the spec based on the suggestion from @anandolee and the updates already made to the proto3 spec.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive because the last activity was over 90 days ago.
@Logofile what's the status on this? Issue should remain open until fixed. (and that bot really needs to be turned off. It's actively rude to volunteer contributors.)
I've sent a change to @anandolee to review.
The change has been committed internally. We push internal change to the external site about once a week.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive because the last activity was over 90 days ago. This issue will be closed and archived after 14 additional days without activity.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.
This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.