[protobuf] [C# .NET] How to parse .proto file and generate some boilerplate code

2018-10-29 Thread Michael Powell
you. The only rub there would be whether it fits with the Roslyn/MSBuild work flow. Thanks in advance! Best regards, Michael Powell -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receivin

Re: [protobuf] [C# .NET] How to parse .proto file and generate some boilerplate code

2018-10-29 Thread Michael Powell
On Mon, Oct 29, 2018 at 9:35 PM Michael Powell wrote: > > Hello, > > I'm a frequent participant in the OR-tools group, but here I have a Protobuf > specific question, I think. > > I'm looking for a way to parse a .proto file and generate some really > boilerplate c

Re: [protobuf] Proto2 possible field options

2018-11-01 Thread Michael Powell
gle/protobuf/descriptor.proto#L136 > Josh Humphries > jh...@bluegosling.com > > > On Wed, Oct 31, 2018 at 7:30 PM Michael Powell wrote: >> >> Hello, >> >> In the Proto2 specification, "field options" are sort of meta-tucked >> away. I don't th

[protobuf] [Proto2] Language spec help

2018-10-31 Thread Michael Powell
e trailing list of character soup? I want to say that there are escaped characters in the sequence? Or am I to take that string literally? Or notwithstanding the enclosing forward slashes? Thanks much in advance! Best regards, Michael Powell -- You received this message because you are

Re: [protobuf] Re: [Proto2] Language spec help

2018-10-31 Thread Michael Powell
e less difficult, I think, for me to Reflect through that and generate the boilerplate that I want, probably, than spinning up a full on parser replete with its AST. > On Wed, Oct 31, 2018 at 9:23 AM Michael Powell wrote: >> >> On Wed, Oct 31, 2018 at 12:22 PM Michael Powell >> wrote

[protobuf] Re: [Proto2] Language spec help

2018-10-31 Thread Michael Powell
to be lazy spec authorship... Thanks! On Wed, Oct 31, 2018 at 12:07 PM Michael Powell wrote: > > Hello, > > I am writing a parser for the Proto language specification starting > with v2. I need a little help interpreting one of the lines if you > please: > > In the &

[protobuf] Re: [Proto2] Language spec help

2018-10-31 Thread Michael Powell
On Wed, Oct 31, 2018 at 12:22 PM Michael Powell wrote: > > Concerning Constant, literally from the v2 spec: Rather, Syntax section, excuse me... > syntax = "syntax" "=" quote "proto2" quote ";" > > Do I read that correctly you can expec

[protobuf] Proto2 possible field options

2018-10-31 Thread Michael Powell
]" ] ";" fieldOptions = fieldOption { "," fieldOption } fieldOption = optionName "=" constant Specifically, "optionName" ? If memory serves from examples, things like "default" ? Thanks! Best regards, Michael Powell -- You received this message beca

Re: [protobuf] Re: [Proto2] Language spec help

2018-11-02 Thread Michael Powell
On Friday, November 2, 2018 at 6:44:27 PM UTC-4, Michael Powell wrote: > > > > On Wednesday, October 31, 2018 at 1:17:46 PM UTC-4, Adam Cozzette wrote: >> >> I think that specification has suffered a little bit of neglect (sorry >> about that), because in pra

[protobuf] Getting started developing a protoc plugin

2018-11-01 Thread Michael Powell
with the protoc.exe compiler? What I want is to just have the descriptors drawn from the target .proto(s) themselves. That's it. A full-on plugin seems like a little bit of overkill. Suggestions? Thanks so much! Best regards, Michael Powell -- You received this message because you are subscribed

[protobuf] Import statement semantics

2018-11-07 Thread Michael Powell
t of "weak"? "public"? Or an unspecified modifier? Thanks! Best regards, Michael Powell -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from

[protobuf] Spec v2 int-lit snafu?

2018-11-10 Thread Michael Powell
ble source of confusion if you aren't paying careful attention. Thoughts? Best regards, Michael Powell -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an emai

Re: [protobuf] Spec v2 int-lit snafu?

2018-11-12 Thread Michael Powell
On Mon, Nov 12, 2018 at 12:46 PM Michael Powell wrote: > > On Mon, Nov 12, 2018 at 10:06 AM Michael Powell wrote: > > > > Hello, > > > > Another question following up, how about the sign character for hex > > and oct integers? Is it necessary, sh

Re: [protobuf] Spec v2 int-lit snafu?

2018-11-12 Thread Michael Powell
literal. Decimal values will not have a leading zero. > > > Josh Humphries > jh...@bluegosling.com > > > On Sat, Nov 10, 2018 at 10:16 PM Michael Powell wrote: >> >> Hello, >> >> I think 0 can be a decimal-lit, don't you think? However, the spec &

[protobuf] String literal character set

2018-11-09 Thread Michael Powell
/proto2-spec Thanks! Michael Powell -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group,

[protobuf] Re: String literal character set

2018-11-09 Thread Michael Powell
On Fri, Nov 9, 2018 at 11:37 AM Michael Powell wrote: > > Hello, > > When considering the String Literal character set, there is the > regular expression /[^\0\n\\]/, meaning virtually any other character > than those specified in the expression. That's in addition to t

Re: [protobuf] Spec v2 int-lit snafu?

2018-11-12 Thread Michael Powell
On Mon, Nov 12, 2018 at 10:06 AM Michael Powell wrote: > > Hello, > > Another question following up, how about the sign character for hex > and oct integers? Is it necessary, should it be discarded? > > intLit = decimalLit | octalLit | hexLit > decimalLit = ( &q

[protobuf] Looking for guidelines for v2 transitive linkage

2018-12-07 Thread Michael Powell
. Another significant aspect is how to treat the imports via vis-a-vis the import modifier. I'd received some feedback along these lines, but any clarification along these lines would also be appreciated. Best regards, Michael Powell -- You received this message because you are subscribed

[protobuf] Proto v2 ambiguities in parsed identifiers

2018-11-29 Thread Michael Powell
ixed64" | "sfixed32" | "sfixed64" | "bool" | "string" | "bytes" | messageType | enumType fieldNumber = intLit; // <- is the trailing semicolon here a typo? http://developers.google.com/protocol-buffers/docs/reference/proto2-spec Best, Michael

Re: [protobuf] Proto v2 ambiguities in parsed identifiers

2018-11-29 Thread Michael Powell
aces, > not like > // Java or .NET package names. > > message NestedMsg { // fqn = foo.bar.SomeMsg.NestedMsg > extends google.protobuf.FieldOption { > uint64 some_other_option = ; // fqn = > foo.bar.SomeMsg.NestedMsg.some_other_option > } > } > } > > > Josh

[protobuf] Re: Import statement semantics

2018-12-04 Thread Michael Powell
On Wed, Nov 7, 2018 at 4:28 PM Michael Powell wrote: > > Hello, > > Is there some documentation concerning import semantics? > > For starters, I assume that you specify the path. This may be further > enhanced by specification of an "import path", not unlike i

Re: [protobuf] Re: Getting started developing a protoc plugin

2018-11-27 Thread Michael Powell
l execute to run our plugin inside a JVM. The exact instructions to > run it are in the provided README.md > > > On Tue, Nov 27, 2018 at 6:01 AM Michael Powell wrote: >> >> >> >> On Saturday, November 10, 2018 at 5:33:11 PM UTC-5, Nadav Samet wrote: >

Re: [protobuf] Re: Getting started developing a protoc plugin

2018-11-27 Thread Michael Powell
rification. I'm not sure which download I saw, but it did not include sources, or I downloaded the minimal one. If memory serves there was a full source one, so I'll have a look there. Thanks! > On Tue, Nov 27, 2018 at 9:46 PM Michael Powell wrote: >> >> So... >>

[protobuf] String literals escaped content

2018-11-20 Thread Michael Powell
t;f" | "n" | "r" | "t" | "v" | '\' | "'" | '"' ) quote = "'" | '"' I think Octal can support through 512, whereas Hex supports through 256. But apart from that, basically the char or unsigned char limits? Thanks! Cheers, M

[protobuf] Re: Getting started developing a protoc plugin

2018-11-27 Thread Michael Powell
g on a Boost Spirit Qi parser in the meantime, which the learning curve is not a plateau, I can agree there. It's not terrible to work through, and I end up with an AST that I know forwards and backwards without too much extra effort once the rules have done their synthetic magic. Cheers, thank

[protobuf] v2 disposition towards nodes like "package", and then some

2018-12-28 Thread Michael Powell
ccessible to a service RPC method. Certainly not without an "(option)" prefix, I think? Seems very ad-hoc to me. Am I missing something there? ... Not to mention the "ad hoc" appearance of "supported" options: https://developers.google.com/protocol-buffers/doc

Re: [protobuf] v2 disposition towards nodes like "package", and then some

2018-12-28 Thread Michael Powell
On Fri, Dec 28, 2018 at 1:08 PM Josh Humphries wrote: > > On Fri, Dec 28, 2018 at 11:57 AM Michael Powell wrote: >> >> Hello, >> >> At present I've "compiled" the .proto (v2) to its AST; analogous, I >> think, to the protoc "descriptor&q

[protobuf] Resolving a Protobuf descriptor identification strategy

2019-02-28 Thread Michael Powell
Hello, I'd like to get a handle on an identification strategy for elements in a Protocol Buffer descriptor hierarchy and just trying to get a sense of what is involved. My parser is working well. I decided to take an approach through Antlr4 for dotnet and CSharp after all. ... Where is

Re: [protobuf] Guidance for proto linkage

2019-03-12 Thread Michael Powell
On Tuesday, March 12, 2019 at 9:43:38 PM UTC-4, Josh Humphries wrote: > > > On Tue, Mar 12, 2019 at 7:31 PM Michael Powell > wrote: > >> >> >> On Monday, March 11, 2019 at 12:24:57 PM UTC-4, Josh Humphries wrote: >>> >>> Since I've im

[protobuf] Guidance for proto linkage

2019-03-09 Thread Michael Powell
Hello, I am looking for guidance as far as what steps one must take in order to verify that a Proto is valid, link the names, i.e. considering ambiguities of Element (i.e. Message or Enum) Type Names during parsing, etc. Some things seem obvious, such as the Field Numbers must be unique, that

Re: [protobuf] can proto 3 message's bytes parsed by proto2?

2019-03-19 Thread Michael Powell
n Tue, Mar 19, 2019 at 4:14 PM Michael Powell > wrote: > >> >> >> On Tuesday, March 19, 2019 at 6:50:37 PM UTC-4, Adam Cozzette wrote: >>> >>> Not exactly, by unknown enum value I mean an enum value that doesn't >>> appear in the enum definitio

Re: [protobuf] can proto 3 message's bytes parsed by proto2?

2019-03-19 Thread Michael Powell
On Tuesday, March 19, 2019 at 6:50:37 PM UTC-4, Adam Cozzette wrote: > > Not exactly, by unknown enum value I mean an enum value that doesn't > appear in the enum definition. For example let's say your enum has only > values 0, 1, and 2 but you parse a 3. This could happen if the message was

Re: [protobuf] can proto 3 message's bytes parsed by proto2?

2019-03-20 Thread Michael Powell
. Perhaps there are also posts, blogs, etc, concerning how to manage versioning of assets; is a problem not exclusive to protocol buffers, ZeroC, ZeroMQ, WCF from back in the day, even nanomsg, I would imagine. On Tue, Mar 19, 2019 at 6:07 PM Michael Powell > wrote: > >> >> >

[protobuf] Re: Q: v2 field numbering scope

2019-03-15 Thread Michael Powell
On Thursday, March 14, 2019 at 8:48:54 PM UTC-4, Michael Powell wrote: > > Hello, > > I am scanning through the v2 language guide, and the reserved field > numbers as well as the allowed field numbers makes sense. > > What does not make sense is the scope. I

Re: [protobuf] can proto 3 message's bytes parsed by proto2?

2019-03-15 Thread Michael Powell
On Thursday, March 14, 2019 at 2:12:31 PM UTC-4, Adam Cozzette wrote: > > Going from proto3 to proto2 should be fine. There are some slight > differences but I can't think of any major problems. The only thing that > comes to mind is that proto2 handles unknown enum values a little bit >

[protobuf] Typo in v2 spec

2019-03-14 Thread Michael Powell
Hello, I think there's a typo in the v2 spec, re: Field Names Reserved Statement. Consider: ident = letter { letter | decimalDigit | "_" } fieldName = ident reserved = "reserved" ( ranges | fieldNames ) ";" fieldNames = fieldName { "," fieldName } In the case of a list of Field Names, I

[protobuf] Q: v2 field numbering scope

2019-03-14 Thread Michael Powell
Hello, I am scanning through the v2 language guide, and the reserved field numbers as well as the allowed field numbers makes sense. What does not make sense is the scope. Is the scope contained with in a given message? That is, MessageA has one set of field numbers, whereas MessageB has an

Re: [protobuf] Guidance for proto linkage

2019-03-12 Thread Michael Powell
a file with syntax = "proto2". > - The first value for an enum *must* have a numeric value of zero. > (Similarly: every enum must have a value whose numeric value is zero.) > - Field definitions may not use the "default" option (default field >

Re: [protobuf] Guidance for proto linkage

2019-03-11 Thread Michael Powell
elds are always optional in proto3, unless they have the "repeated" label > or are map fields.) > No messages may define extension ranges. > No messages may define groups. > No messages may include a field whose type is an enum defined in a file with > syntax = "p

[protobuf] Language mappings for Protobuf Types

2019-01-30 Thread Michael Powell
Hello, I am looking for a table or some cross reference for target language to Protocol Buffer types and key types. I can make some informed guesses, of course, but if there was a generally recognized table, cross reference, something like that, that would be a useful reference. Thanks! Best

Re: [protobuf] Language mappings for Protobuf Types

2019-01-30 Thread Michael Powell
2019 at 3:35 AM Michael Powell wrote: >> >> Hello, >> >> I am looking for a table or some cross reference for target language >> to Protocol Buffer types and key types. I can make some informed >> guesses, of course, but if there was a generally r

Re: [protobuf] Language mappings for Protobuf Types

2019-01-30 Thread Michael Powell
I found the same for proto2, thanks! On Wed, Jan 30, 2019 at 8:12 PM Michael Powell wrote: > > On Wed, Jan 30, 2019 at 8:05 PM Mohammed Nisamudheen S > wrote: > > > > Following table can be the one you are looking for. > > > > https://developers.google.com/pr