Lines Matching refs:group
59 def group(*choices): return '(' + '|'.join(choices) + ')'
60 def any(*choices): return group(*choices) + '*'
61 def maybe(*choices): return group(*choices) + '?'
74 Intnumber = group(Hexnumber, Binnumber, Octnumber, Decnumber)
76 Pointfloat = group(r'[0-9](?:_?[0-9])*\.(?:[0-9](?:_?[0-9])*)?',
79 Floatnumber = group(Pointfloat, Expfloat)
80 Imagnumber = group(r'[0-9](?:_?[0-9])*[jJ]', Floatnumber + r'[jJ]')
81 Number = group(Imagnumber, Floatnumber, Intnumber)
105 StringPrefix = group(*_all_string_prefixes())
115 Triple = group(StringPrefix + "'''", StringPrefix + '"""')
117 String = group(StringPrefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*'",
123 Special = group(*map(re.escape, sorted(EXACT_TOKEN_TYPES, reverse=True)))
124 Funny = group(r'\r?\n', Special)
126 PlainToken = group(Number, Funny, String, Name)
130 ContStr = group(StringPrefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*" +
131 group("'", r'\\\r?\n'),
133 group('"', r'\\\r?\n'))
134 PseudoExtras = group(r'\\\r?\n|\Z', Comment, Triple)
135 PseudoToken = Whitespace + group(PseudoExtras, Number, Funny, ContStr, Name)
344 encoding = _get_normal_name(match.group(1))