• Home
  • Raw
  • Download

Lines Matching +full:block +full:- +full:fixup

6 # Copyright (c) 1997-2001 by Secret Labs AB.  All rights reserved.
84 code[skip] = _len(code) - skip
97 code[skip] = _len(code) - skip
113 code[skip] = _len(code) - skip
120 code[skip] = _len(code) - skip
126 emit((group-1)*2)
131 emit((group-1)*2+1)
142 code[skip] = _len(code) - skip
153 raise error("look-behind requires fixed-width pattern")
157 code[skip] = _len(code) - skip
177 code[skip] = _len(code) - skip
180 code[tail] = _len(code) - tail
197 emit(av-1)
200 emit(av[0]-1)
206 code[skipyes] = _len(code) - skipyes + 1
208 code[skipno] = _len(code) - skipno
210 code[skipyes] = _len(code) - skipyes + 1
241 def _optimize_charset(charset, iscased=None, fixup=None, fixes=None): argument
251 if fixup:
252 lo = fixup(av)
263 if fixup:
265 for i in map(fixup, r):
271 for i in map(fixup, r):
284 # character set contains non-UCS1 character codes
287 # Character set contains non-BMP character codes.
290 if fixup:
293 # IN_UNI_IGNORE+RANGE_UNI_IGNORE work for all non-BMP
295 # which is not in the BMP) match case-insensitively
300 # characters for every non-BMP character.
324 if q - p == 1:
327 out.append((RANGE, (p, q - 1)))
346 # represented by a 32-bit word sequence, consisting of one word for
349 # sequence of 256-bit chunks (8 words each).
355 # chunks of all one-bits or all zero-bits.
365 block = 0
372 mapping[i // 256] = comps[chunk] = block
373 block += 1
376 data[0:0] = [block] + _bytes_to_codes(mapping)
382 MAXCODE = (1 << _CODEBITS) - 1
385 s = bits.translate(_BITS_TRANS)[::-1]
386 return [_int(s[i - _CODEBITS: i], 2)
387 for i in range(len(s), 0, -_CODEBITS)]
390 # Convert block indices to word array
402 return av[0] is None and _simple(av[-1])
409 informs about the potential self-overlap for each index in the prefix:
410 - if overlap[i] == 0, prefix[i:] can't overlap prefix[0:...]
411 - if overlap[i] == k with 0 < k <= i, prefix[i-k+1:i+1] overlaps with
416 idx = table[i - 1]
421 idx = table[idx - 1]
510 # internal: compile an info block. in the current version,
533 # add an info block
566 code[skip] = len(code) - skip
576 # compile info block
594 offset_width = len(str(len(code) - 1))
602 end=' '*(level-1))
647 print_(op, '%#02x %#02x (%r-%r)' % (lo, hi, chr(lo), chr(hi)))
662 level -= 1
728 level -= 1
733 level -= 1
761 p.state.groups-1,