bend-kit-regex
Search uses release 0.8.0.0 · 316 definitions
Definitions (316)
- def asc.bit
- def asc.goc: the byte for step n, counting down from 127 to 0.
- def asc
- def rev.build
- def rev.if
- type Regex
- def build
- def compile.fin
- def compile.parse
- def compileThe pattern, or None for a syntax error.
- def word
- def assert.ok
- type ThA thread: its pc and its capture slots.
- type ClThe epsilon closure as a depth-first walk: stack is the work left, seen the pcs visited at this position, out the threads that wait on a char or match (reversed).
- def close.assert
- def close.inst
- def close.seenponytail: trie lookup and membership cost O(log m) per thread step, so a char costs O(m log m) for m instructions; a sparse set over an Array would make a step O(1).
- def close.step
- def closefuel: each pc expands once and pushes at most two threads.
- type ScA scan of the threads at one char, in priority order: items are the threads that step past it (reversed), best the latest match.
- def scan.set
- def scan.char
- def scan.hitany: only whether a match exists counts, so a match also drops the earlier threads.
- def scan.inst
- def scan.go
- def scan.step
- def scan
- type VmThe live threads and the best match so far.
- def seedUntil a match is found, a new thread starts at each position, below every other.
- def seed.skipNo live thread and no match yet: the seed is the only thread, and it dies unless next is in start.
- def run.seed
- def run.close
- def run.step
- def run.end
- def runpos: the position of s's head.
- type Span
- def spans
- def find.spans
- def execslots: capture slots to keep; is_match keeps none, so each ISave is free.
- def findThe leftmost match in s: the span of group 0, then of each group; None for a group that did not take part.
- def is_match.vmThe Pike VM form of is_match: stops at the first match of any priority and records no captures.
- type BsOne char through the bit NFA: next the sets live after it, fin and end as in Bit.
- def bits.take
- def bits.char
- def bits.stepponytail: one test per set in the program, not a table lookup; use per-byte tables if sets grow many.
- def bits.idleOnly the sets live at a fresh start wait on c, and c starts none of them: nothing moves.
- def bits.gohit1: a match starts and ends at the end of the text, so end starts from it.
- def bits.runr: the sets live at s's head, whether a match was found, and whether one ends at the end of the text, if the text ends here.
- def bits.is_match
- def is_match.bitsThe bit NFA form of is_match, or None when the program is too large or has a word boundary.
- def is_match.pick
- def is_matchWhether s has a match; the bit NFA runs when the program allows it, else the Pike VM.
- type DcA code point decoded from UTF-8 and its width in bytes, or DEnd at the end of the buffer.
- def Dc.char
- def pk.if
- def pkByte i, or 0 past len, which is no continuation byte.
- def cont
- def dec.pick
- def dec.nOverlong forms, surrogates, and code points past U+10FFFF are invalid.
- def dec.b3
- def dec.b2
- def dec.b1
- def dec.lead
- def dec.at
- def dec.if
- def decThe char at byte i, or DEnd at len.
- def asc.word
- def asc.hasAny non-ASCII byte may start a match: it may lead a char in start.
- def probe.of
- def probe.ifPast len counts as a hit, so a skip stops there.
- def probe
- def skipThe first offset at or after k whose byte may start a match, or len; r holds the probe of k.
- def skip.from
- type RbThe Pike VM over Bytes: the buffer, the offset i of the next char, that char, and the threads waiting on it.
- def rb.step
- def rb.seedA fresh seed at k.
- def rb.skip
- def rb.idleNo thread is live and no match exists.
- def runbfuel: each step eats at least one byte, and the last one sees DEnd.
- def seed.idThe seed thread's index, and the id of a state the full cache could not add.
- type OpA new thread: pc, the thread at src it came from (or the seed), and the slots it saved.
- type Trnext: the state after the char; hit: 1 + the index of the thread that matched, or 0; fresh: no match yet and every new thread comes from the seed, so the next state is a fresh start.
- type Sk
- type Ix
- type IkThe interned states, how many there are, and the id of one.
- type LrA learned transition, with the next state's key in place of its id.
- def vm.pcs
- def vm.key
- def pcs.eq
- def sk.eq
- def pcs.hash
- def sk.hash
- def ix.find
- def intern.bucket
- def intern.add
- def intern.if
- def intern.full
- def internA full cache is not searched; the plain Pike VM handles the remaining text.
- def sym.caps
- def sym.ths