kshchepanovskyi / protostuff-googlecode-exported

Automatically exported from code.google.com/p/protostuff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to parse proto enum containing hex constants

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?

 Attempt to parse the following declaration in a proto:
 enum testEnum 
 {
    ONE = 0x1;
    TWO = 0x2;
    THREE = 0x3;
  }

What is the expected output? What do you see instead?
 Expected output is a EnumGroup named testEnum with three EnumGroup.Value objects {ONE:1, TWO:2, THREE:3}
 Instead ProtoParser#enum_field(Proto, Message, EnumGroup) throws a MismatchedTokenException (59!= 54) and an EnumGroup named testEnum is created without any EnumGroup.Value objects.

What version of the product are you using? On what operating system?
 Pulled from https://github.com/protostuff/protostuff on 2015-02-11

Please provide any additional information below.

Original issue reported on code.google.com by kblanch...@gmail.com on 21 Apr 2015 at 7:18