本文整理汇总了Python中spark.GenericScanner类的典型用法代码示例。如果您正苦于以下问题:Python GenericScanner类的具体用法?Python GenericScanner怎么用?Python GenericScanner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GenericScanner类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tokenize
def tokenize(self, line):
"""
Create tokens from string.
@param line: string to scan
"""
self.rv = []
GenericScanner.tokenize(self, line)
return self.rv
示例2: tokenize
def tokenize(self, input):
self.tokens = []
lines=input.split("\n")
for line in lines:
#remove inline comments
line=line.split("//")[0]
GenericScanner.tokenize(self, line)
self.lineno+=1
t=Token(type='NEWLINE',lineno=self.lineno)
self.tokens.append(t)
return self.tokens
示例3: tokenize
def tokenize(self, input):
self.rv = []
GenericScanner.tokenize(self, input)
return self.rv
示例4: __init__
def __init__(self,lineno):
GenericScanner.__init__(self)
self.lineno = lineno
示例5: __init__
def __init__(self):
GenericScanner.__init__(self)
示例6: tokenize
def tokenize(self, input, outputFile):
self.rv = []
self.outputFile = outputFile
GenericScanner.tokenize(self, input)
return self.rv
示例7: __init__
def __init__(self):
GenericScanner.__init__(self)
self.labelingOrCoding = None
self.blockLabelOrCoding = None
示例8: __init__
def __init__(self, operators=''):
self.operators = operators
GenericScanner.__init__(self)
示例9: __init__
def __init__(self):
GenericScanner.__init__(self)
self.charOffset = 0
示例10: tokenize
def tokenize(self, input):
self.rv = []
GenericScanner.tokenize(self, input)
self.line_count=0
return self.rv
示例11: __init__
def __init__(self, flags=0):
GenericScanner.__init__(self,flags)
self.lineno=1
示例12: __init__
def __init__(self, keywordRegexString=keywordRegex):
GenericScanner.__init__(self)
self.keywordRegex = re.compile(keywordRegexString)