riteshtijoriwala / protostuff

Automatically exported from code.google.com/p/protostuff
Apache License 2.0
0 stars 0 forks source link

Unable to parse proto enum containing hex constants #167

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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