eprotoc icon indicating copy to clipboard operation
eprotoc copied to clipboard

Fix yecc grammar to properly handle the 'packed' option

Open tyler-eon opened this issue 12 years ago • 5 comments
trafficstars

Currently the "packed" option always throws an error when used as it expects a non-reserved atom value, but should only ever be set using the "true" or "false" reserved words.

tyler-eon avatar Aug 26 '13 22:08 tyler-eon

Yea I understand the error now. We can actually probably delete the line before that since it shouldn't accept arbitrary atoms. Accepting true and false should be sufficient.

jeremyong avatar Aug 26 '13 22:08 jeremyong

Updated; removed the general "atom" line and only use true and false now.

tyler-eon avatar Aug 26 '13 22:08 tyler-eon

Before I merge this, I just remembered that I never got around to implementing packed fields since it was a feature I didn't use haha.

jeremyong avatar Aug 26 '13 22:08 jeremyong

Maybe I should leave this open until that happens?

jeremyong avatar Aug 26 '13 22:08 jeremyong

Right now a proto message will raise a syntax error if it includes the packed option. If we want to leave it like that, because there is no formal handling of packed fields, then we can definitely leave this issue open until we can implement packed fields.

Also, facepalm. Haha.

tyler-eon avatar Aug 26 '13 22:08 tyler-eon