[protobuf] [Proto2] Language spec help

2018-10-31 Thread Michael Powell
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 "String literals" section, what does this mean: charValue = hexEscape | octEscape | charEscape | /[^\0\n\\]/ Specifically, the trailing

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

2018-10-31 Thread Michael Powell
On Wed, Oct 31, 2018 at 1:17 PM Adam Cozzette wrote: > > I think that specification has suffered a little bit of neglect (sorry about > that), because in practice our C++ parser is really the de facto standard and > we have not recently made an effort to go through and make sure the official >

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

2018-10-31 Thread 'Adam Cozzette' via Protocol Buffers
+Jie Luo who knows the most about C# The one thing that might be a problem is that C# does not yet have full support for proto2, though that work is in progress (see this most recent pull request ). That could make it hard to parse the

Re: [protobuf] Fwd: Testsuite summary for Protocol Buffers 3.5.1 - test failure

2018-10-31 Thread 'Adam Cozzette' via Protocol Buffers
Could you try running the test with 3.6.1 or the latest code on master and see if you get the same kind of test failure? On Tue, Oct 30, 2018 at 1:04 AM Daniel Klein wrote: > > > -- Forwarded message - > From: Daniel Klein > Date: Tue, Oct 30, 2018 at 9:27 AM > Subject:

[protobuf] Re: [Proto2] Language spec help

2018-10-31 Thread Michael Powell
Concerning Constant, literally from the v2 spec: syntax = "syntax" "=" quote "proto2" quote ";" Do I read that correctly you can expect either 'proto2' or "proto2", but never 'proto2" nor "proto2' ? If accurate, that just seems to me to be lazy spec authorship... Thanks! On Wed, Oct 31, 2018

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

2018-10-31 Thread 'Adam Cozzette' via Protocol Buffers
I think that specification has suffered a little bit of neglect (sorry about that), because in practice our C++ parser is really the de facto standard and we have not recently made an effort to go through and make sure the official spec matches it perfectly. My reading of that string (/[^\0\n\\]/)

[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 expect either 'proto2' or "proto2", > but never 'proto2" nor

[protobuf] [ANN] Package in Go for parsing .proto(3)

2018-10-31 Thread Yohei Yoshimuta
go-protoparser parses the proto3 file. - https://github.com/yoheimuta/go-protoparser - You can use it if you know one Parse function. A Protocol Buffer file versioned 3 which is an example of the official

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

2018-10-31 Thread 'Jie Luo' via Protocol Buffers
On Wed, Oct 31, 2018 at 2:19 PM Adam Cozzette wrote: > I'm not sure how soon we can expect the proto2 support in C#. Jie, do you > happen to know how close it is to being complete? > I don't think it will be very soon. We do not have people in google working on C# (I only review PRs). Only one

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

2018-10-31 Thread 'Adam Cozzette' via Protocol Buffers
I'm not sure how soon we can expect the proto2 support in C#. Jie, do you happen to know how close it is to being complete? But if you're just trying to generate C# code at build time, I was thinking you could also use for example a C++ binary to generate the C# code, without needing SWIG or

[protobuf] Proto2 possible field options

2018-10-31 Thread Michael Powell
Hello, In the Proto2 specification, "field options" are sort of meta-tucked away. I don't think the specification really names them. Is there a list of them somewhere in the docs? i.e. field = label type fieldName "=" fieldNumber [ "[" fieldOptions "]" ] ";" fieldOptions = fieldOption { ","