fact: Definition Parse' (parse : arg_type -> bool) (p : arg_type) : bool := let '(r,s,k) := p in match r with | regexp_null => false | regexp_empty => k s | regexp_char c => match s with | nil => false | c'::s' => If c = c' then k s' else false end | regexp_alt r1 r2 => parse (r1,s,k) || parse (r2,s,k) | regexp_seq r1 r2 => parse (r1,s,(fun s' => parse (r2,s',k))) | regexp_star r1 => k s || parse (r1,s,(fun s' => ##text_sub s' s## parse (r,s',k))) end.
imports: TLC(LibTactics LibLogic LibReflect LibFun LibEpsilon LibList LibInt LibNat LibProd LibSum LibRelation LibWf LibFix LibStream) ZifyNat TLC.LibNat