def AaGNfa.next

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

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

155# the positions active after the byte h: cin, the position is reached
156# without a byte (after a star); ain, the previous position moved here
157def AaGNfa.next(+seq: List<&2, AaGTok>, +bs: List<&2, Bool>, +cin: Bool, +ain: Bool, +h: U32) -> List<&2, Bool>:
158  match seq:
159    case Nil{}:
160      [ain]
161    case Con{+tok, r}:
162      Con{Bool.or(Bool.and(Bool.or(AaGNfa.hd(bs), cin), AaGNfa.stay(tok, h)), ain), AaGNfa.next(r, AaGNfa.tl(bs), Bool.and(Bool.or(AaGNfa.hd(bs), cin), AaGNfa.isstar(tok)), Bool.and(Bool.or(AaGNfa.hd(bs), cin), AaGNfa.adv(tok, h)), h)}

Uses (11)

Used by (3)