o
‡ÎÖaÞ ã @ sb d Z ddlZddlmZmZmZ ddlmZmZm Z m
Z
mZmZm
Z
mZ dgZG dd„ deƒZdS )zá
pygments.lexers.dalvik
~~~~~~~~~~~~~~~~~~~~~~
Pygments lexers for Dalvik VM-related languages.
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é N)Ú
RegexLexerÚincludeÚbygroups)ÚKeywordÚTextÚCommentÚNameÚStringÚNumberÚPunctuationÚ
WhitespaceÚ
SmaliLexerc @ sd e Zd ZdZdZdgZdgZdgZedƒedƒedƒed ƒed
ƒedƒedƒed
ƒedƒedƒedƒedƒgde e
eƒfde e
ee
eƒfde e
ee
eƒfgdefgde
fde
fgdej
fde ee
ƒfgdefdejfdejfdejfgde eejeƒfgdejfd e eejeƒfgd!ejfgd"e ejeejeƒfgd#efd$efgd%ejfgd&efgd'œ
Zd(d)„ Zd*S )+r
zw
For `Smali `_ (Android/Dalvik) assembly
code.
.. versionadded:: 1.6
ÚSmaliÚsmaliz*.smaliz
text/smaliÚcommentÚlabelÚfieldÚmethodÚclassÚ directiveúaccess-modifierÚinstructionÚliteralÚpunctuationÚtypeÚ
whitespacezÇ^([ \t]*)(\.(?:class|super|implements|field|subannotation|annotation|enum|method|registers|locals|array-data|packed-switch|sparse-switch|catchall|catch|line|parameter|local|prologue|epilogue|source))zq^([ \t]*)(\.end)( )(field|subannotation|annotation|method|array-data|packed-switch|sparse-switch|parameter|local)z^([ \t]*)(\.restart)( )(local)zµ(public|private|protected|static|final|synchronized|bridge|varargs|native|abstract|strictfp|synthetic|constructor|declared-synchronized|interface|enum|annotation|volatile|transient)z\nz\s+z\b[vp]\d+\bz(\b[a-z][A-Za-z0-9/-]+)(\s+)z".*"z0x[0-9A-Fa-f]+t?z [0-9]*\.[0-9]+([eE][0-9]+)?[fd]?z[0-9]+L?z(\$?\b)([\w$]*)(:)z
<(?:cl)?init>z(\$?\b)([\w$]*)(\()z:\w+z(L)((?:[\w$]+/)*)([\w$]+)(;)z->z[{},():=.-]z[ZBSCIJFDV\[]+z#.*?\n)
Úrootr r r r r r r r r r r r c C sP d}t d| t j¡r|d7 }t d| t j¡r|d7 }t d| t j¡r&|d7 }|S )Nr z
^\s*\.class\sg à?z\b((check-cast|instance-of|throw-verification-error)\b|(-to|add|[ais]get|[ais]put|and|cmpl|const|div|if|invoke|move|mul|neg|not|or|rem|return|rsub|shl|shr|sub|ushr)[-/])|{|}g333333Ó?a> (\.(catchall|epilogue|restart local|prologue)|\b(array-data|class-change-error|declared-synchronized|(field|inline|vtable)@0x[0-9a-fA-F]|generic-error|illegal-class-access|illegal-field-access|illegal-method-access|instantiation-error|no-error|no-such-class|no-such-field|no-such-method|packed-switch|sparse-switch))\bg333333ã?)ÚreÚsearchÚ MULTILINE)ÚtextÚscore© r" ú8/usr/lib/python3/dist-packages/pygments/lexers/dalvik.pyÚanalyse_textk s ýúzSmaliLexer.analyse_textN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ filenamesÚ mimetypesr r r r r ÚBuiltinr r r
ÚHexÚFloatÚIntegerr ÚVariableÚFunctionÚLabelÚTypeÚClassr Útokensr$ r" r" r" r# r
s„ ôýÿù
ýÿþþüÿÿÿþÿÿüþÿÿºK)r( r Úpygments.lexerr r r Úpygments.tokenr r r r r r
r r Ú__all__r
r" r" r" r# Ú s
(