def AaGNfa.run

bend-osdev-apparmor@0.1.0.0 · glob.bend:180

import bend-osdev-apparmor@0.1.0.0/glob.bend as Glob
import Base

180# the positions moved along the path; at its end, the active positions
181# whose suffixes match the empty string accept. alive: some position is
182# active (computed by the caller); when none is, the path cannot match.
183def AaGNfa.run(s: List<&2, U32>, alive: Bool, +seq: List<&2, AaGTok>, bs: List<&2, Bool>) -> Bool:
184  match s:
185    case Nil{}:
186      AaGNfa.sem(seq, bs, Nil{})
187    case Con{h, t}:
188      match alive:
189        case False{}:
190          False{}
191        case True{}:
192          +n = AaGNfa.next(seq, bs, False{}, False{}, h)
193          AaGNfa.run(t, AaGNfa.alive(n), seq, n)

Uses (7)

Used by (3)