> On 30 Dec 2016, at 20:06, Tim Kientzle <[email protected]> wrote: > > When building a new implementation, you can avoid writing your own parser by > building a "plugin" for protoc. That lets you focus on the code generation > and leverage the existing parsing (and normalization) performed by proton. I saw this when I initially checked the code. But believe it or not - I actually like writing parsers :-) It helps to understand the language you are dealing with. Although I have to admit that the plugin way is the one I will likely follow.
> Your code generator can be written in almost any language: Writing it in an > already-supported language will let you leverage existing tools to parse the > `CodeGeneratorRequest` and serialize the `CodeGeneratorResponse`. Writing > your plugin in your target language requires a lot more work to bootstrap > everything. As far as I understood the code the plugin is expected to read a protobof-encoded CodeGeneratorResponse. You I’d either need to write the Smalltalk plugin in a language already able to read protobuf or do the initial “bootstrap” implementation myself. Maybe the parser wasn’t as useless as I thought :-) > Hint: Write a short shell script called `protoc-gen-capture` that just > copies its standard input to a file and run that with `protoc --capture_out` > to capture a copy of the request generated by protoc. Then you can inspect > the generated request at your leisure. Good tip! Thanks!!! CU, Udo -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Message signed with OpenPGP using GPGMail
