You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
Froto appears to only parse a subset of the proto2 language, and allows a looser syntax. Requesting the parser be tightened up to match the official protoc compiler: handle the complete syntax and produce errors in the same cases, in order to provide better compatibility.
Support enum as a top-level construct (outside any message)
Support "group" keyword in a message
Support "one of" keyword in a message
Support "map" keyword in a message
Support "extensions" keyword in a message
Support "reserved" keyword in a message
Support options on enum, enumItem
Support alternate option syntax; e.g. option (myOpt) = { fieldA : 1, fieldB: "test" };
Tighten up intLit to support proto2 octal (code uses pint32, which parses "0o77", but not "077")
Same thing for strLit; can't recall the specifics, but don't think Froto handles all proto2 escape sequences
Parse out strong literal types for constants (intLit, floatLit, boolLit, and strLit), rather than parsing all of those as string values.
Tighten up identifier parser; can't recall the specifics, but IIRC Froto allows invalid identifiers
I've been hacking my own F#/FParsec parser and am almost done: have support for all the above w/tests, and only a few productions remaining (iirc, "service" and "extends"). Using this as a learning experience. Once I've implemented proto3 syntax (using an FParsec state and rejection of invalid items when in proto3 mode), I should probably circle back and fork Froto to help implement the above, if you're open to contributions :-).
The text was updated successfully, but these errors were encountered:
jhugard
changed the title
[Req] Strict/complete proto2 compliance
Request: Strict/complete proto2 compliance
Jan 16, 2016
Froto appears to only parse a subset of the proto2 language, and allows a looser syntax. Requesting the parser be tightened up to match the official protoc compiler: handle the complete syntax and produce errors in the same cases, in order to provide better compatibility.
option (myOpt) = { fieldA : 1, fieldB: "test" };
I've been hacking my own F#/FParsec parser and am almost done: have support for all the above w/tests, and only a few productions remaining (iirc, "service" and "extends"). Using this as a learning experience. Once I've implemented proto3 syntax (using an FParsec state and rejection of invalid items when in proto3 mode), I should probably circle back and fork Froto to help implement the above, if you're open to contributions :-).
The text was updated successfully, but these errors were encountered: