From 2c486b4ee7057ce14287439dcee1f1e31dc89ce0 Mon Sep 17 00:00:00 2001 From: "JesusFreke@JesusFreke.com" Date: Thu, 18 Nov 2010 04:57:05 +0000 Subject: [PATCH] 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 --- smali/src/main/jflex/smaliLexer.flex | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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]