scanning binary files in antlr3
I would like to parse a binary file and specify the characters in hex format instead of unicode, is thi开发者_运维问答s possible?
For instance: rule: '\x7F' ;
Instead of: rule: '\u007F' ;
Since I do not understand how unicode maps to one byte.
A binary file by definition doesn't contain characters or text. So you're right that you should not be using Unicode characters to specify the format. However, the underlying question is "should you use Anltr in the first place?". It doens't come as a surprise that SO already has an answer to that: No
精彩评论