aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusFreke@JesusFreke.com <JesusFreke@JesusFreke.com@55b6fa8a-2a1e-11de-a435-ffa8d773f76a>2010-11-18 04:57:05 +0000
committerJesusFreke@JesusFreke.com <JesusFreke@JesusFreke.com@55b6fa8a-2a1e-11de-a435-ffa8d773f76a>2010-11-18 04:57:05 +0000
commit2c486b4ee7057ce14287439dcee1f1e31dc89ce0 (patch)
tree90d85388cc02672bf32be8f50d2d1929346b7dbd
parent83ef98462a09a3f447f83462c712427be7946c02 (diff)
downloadsmali-2c486b4ee7057ce14287439dcee1f1e31dc89ce0.tar.gz
Add the high and low surrogate characters as valid characters for identifiers
The dex format allows any supplemental character to be used for identifiers, but jflex doesn't directly support supplemental characters. However, we can tell jflex to accept a high and low surrogate character pair instead, which has the same effect as directly accepting any supplemental character git-svn-id: https://smali.googlecode.com/svn/trunk@795 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
-rw-r--r--smali/src/main/jflex/smaliLexer.flex8
1 files changed, 7 insertions, 1 deletions
diff --git a/smali/src/main/jflex/smaliLexer.flex b/smali/src/main/jflex/smaliLexer.flex
index 9248503a..d8ca0b39 100644
--- a/smali/src/main/jflex/smaliLexer.flex
+++ b/smali/src/main/jflex/smaliLexer.flex
@@ -202,7 +202,13 @@ Float3 = -? {HexPrefix} {HexDigit}+ "." {HexDigit}* {BinaryExponent}
Float4 = -? {HexPrefix} "." {HexDigit}+ {BinaryExponent}
Float = {Float1} | {Float2} | {Float3} | {Float4}
-SimpleName = [A-Za-z0-9$\-_\u00a1-\u1fff\u2010-\u2027\u2030-\ud7ff\ue000-\uffef]+
+HighSurrogate = [\ud800-\udbff]
+
+LowSurrogate = [\udc00-\udfff]
+
+SimpleNameCharacter = ({HighSurrogate} {LowSurrogate}) | [A-Za-z0-9$\-_\u00a1-\u1fff\u2010-\u2027\u2030-\ud7ff\ue000-\uffef]
+
+SimpleName = {SimpleNameCharacter}+
PrimitiveType = [ZBSCIJFD]