def __init__(self, get_obfuscated):
"""BNF grammar for Kivy source statements.
Parameters
----------
get_obfuscated : function
Function to return the obfuscated name for an identifier.
"""
super(ObfuscateKivyBNF, self).__init__(get_obfuscated)
self.kivy_import = (
ZeroOrMore(
(self.directive |
Literal('import') |
self.ident |
self.separator.suppress() |
self.fnumber.suppress() |
self.string.suppress()
) + Optional(self.comment).suppress()
))
self.kivy_import.setParseAction(self.add_kivy_import)
###############
# Parse actions
###############
评论列表
文章目录