Regex.runqa: def of bend-kit-regex@0.8.0.0 Import: import bend-kit-regex@0.8.0.0/regex.bend as Regex Lines 2062-2083 of bend-kit-regex@0.8.0.0/regex.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-regex@0.8.0.0/regex.bend&start_line=2062&end_line=2083 import Base # Each step consumes a byte; after the cache fills, continue in the plain Pike VM. def runqa(+fuel: Nat, r: Qa, +len: U32, +prog: Trie, +cfuel: Nat, +init: List<&2, Maybe<&2, U32>>, +start: Maybe<&2, List<&2, Inst>>, +asc: Maybe<&2, Asc>, +any: Bool, +slots: Nat, +cap: U32) -> Array & Maybe<&2, List<&2, Maybe<&2, U32>>>: match fuel: case 0n: Qa{a, tab, keys, n, id, i, d, ar, same} = r (a, None{}) case 1n+f: Qa{a, tab, +keys, +n, +id, +i, d, ar, same} = r match d: case DEnd{}: qa.end.status(ar, a, prog, any) case Dc{+c, +w}: match ar: case QDone{best}: (a, Some{best}) case QIdle{ar}: runqa(f, qa.from(rq.of(rb.idle(asc, a, len, (i + w : U32), c, prog, cfuel, init, start, any), tab, keys, n, cap), ar, init, cap), len, prog, cfuel, init, start, asc, any, slots, cap) case QLive{ar}: +j = (i + w : U32) runqa(f, qa.spin(qa.step(dec(a, len, j), j, tab, keys, n, id, ar, c, prog, cfuel, init, start, any, slots, cap), f, len, cap), len, prog, cfuel, init, start, asc, any, slots, cap) case QPlain{st}: runb(Nat.add(f, 1n), Rb{a, i, Dc{c, w}, st}, len, prog, cfuel, init, start, asc, any) Uses (25): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=Asc https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=Dc https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=Inst https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=Qa https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=Qst https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=Rb https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=Trie https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=dec https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=qa.end.status https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=qa.from https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=qa.spin https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=qa.step https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=rb.idle https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=rq.of https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=runb