Protocol Buffer for PHP

160 views
Skip to first unread message

kordi

unread,
Jul 17, 2008, 3:10:31 PM7/17/08
to Protocol Buffers
The last two evenings (after work) i implemented a protocol buffer for
php, where all message encoding, decoding + parsing of the proto files
is written in php.

At the moment i only implemented the datatypes string, message, enum +
unsigned int.

http://code.google.com/p/pb4php/

Kenton Varda

unread,
Jul 17, 2008, 3:25:10 PM7/17/08
to kordi, Protocol Buffers
Cool!  I've already updated the OtherLanguages wiki:


Any reason why you chose to re-implement the parser, rather than use the existing parser?  protoc can easily be extended to support other languages.


By reusing the existing parser, you can avoid parsing bugs and you won't have to update your parser every time we change the main one.  You would have to write your CodeGenerator in C++, but it's just a bunch of print statements so it shouldn't be too hard.

kordi

unread,
Jul 17, 2008, 3:51:48 PM7/17/08
to Protocol Buffers
On 17 Jul., 21:25, "Kenton Varda" <ken...@google.com> wrote:
> Cool! I've already updated the OtherLanguages wiki:http://code.google.com/p/protobuf/wiki/OtherLanguages

thanks

>
> Any reason why you chose to re-implement the parser, rather than use the
> existing parser? protoc can easily be extended to support other languages.
>

this was just for fun ...

> http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google...
>
> By reusing the existing parser, you can avoid parsing bugs and you won't
> have to update your parser every time we change the main one. You would
> have to write your CodeGenerator in C++, but it's just a bunch of print
> statements so it shouldn't be too hard.

ok i will do this in the next days.

piposek

unread,
Jul 22, 2008, 5:33:45 AM7/22/08
to Protocol Buffers
I'd like to join your project. Answer me at osc...@gmail.com plz.
Reply all
Reply to author
Forward
0 new messages