Equations
Equations
Equations
- Auto.Regex.CC.instInhabitedTy = { default := Auto.Regex.CC.Ty.all }
Equations
- Auto.Regex.CC.Ty.all.toString = Auto.Regex.CC.alls✝
- Auto.Regex.CC.Ty.upper.toString = Auto.Regex.CC.uppers✝
- Auto.Regex.CC.Ty.lower.toString = Auto.Regex.CC.lowers✝
- Auto.Regex.CC.Ty.alpha.toString = Auto.Regex.CC.alphas✝
- Auto.Regex.CC.Ty.digit.toString = Auto.Regex.CC.digits✝
- Auto.Regex.CC.Ty.alnum.toString = Auto.Regex.CC.alnums✝
- Auto.Regex.CC.Ty.xdigit.toString = Auto.Regex.CC.xdigits✝
- Auto.Regex.CC.Ty.punct.toString = Auto.Regex.CC.puncts✝
- Auto.Regex.CC.Ty.blank.toString = Auto.Regex.CC.blanks✝
- Auto.Regex.CC.Ty.space.toString = Auto.Regex.CC.spaces✝
- Auto.Regex.CC.Ty.cntrl.toString = Auto.Regex.CC.cntrls✝
- Auto.Regex.CC.Ty.graph.toString = Auto.Regex.CC.graphs✝
- Auto.Regex.CC.Ty.print.toString = Auto.Regex.CC.prints✝
Instances For
Equations
- Auto.Regex.CC.instToStringTy = { toString := Auto.Regex.CC.Ty.toString }
- cc : CC.Ty → EREBracket
- inStr : String → EREBracket
- plus : Array EREBracket → EREBracket
- minus (b1 b2 : EREBracket) : EREBracket
Instances For
Equations
Equations
Equations
Taking complement of b
with respect to the set of ascii characters
Equations
Instances For
Instances For
Equations
- bracket : EREBracket → ERE
- bracketN : EREBracket → ERE
- startp : ERE
- endp : ERE
- epsilon : ERE
- star : ERE → ERE
- repN : ERE → (n : Nat) → ERE
- repGe : ERE → (n : Nat) → ERE
- repLe : ERE → (n : Nat) → ERE
- repGeLe : ERE → (n m : Nat) → ERE
- comp : Array ERE → ERE
- plus : Array ERE → ERE
- attr : ERE → String → ERE
Instances For
Equations
- Auto.Regex.instBEqERE = { beq := Auto.Regex.beqERE✝ }
Equations
- Auto.Regex.instHashableERE = { hash := Auto.Regex.hashERE✝ }
Equations
- Auto.Regex.instInhabitedERE = { default := Auto.Regex.ERE.bracket default }
Match any character in the string
Equations
Instances For
Match the given string
Equations
- Auto.Regex.ERE.ofStr s = Auto.Regex.ERE.comp { toList := List.map (fun (c : Char) => Auto.Regex.ERE.inStr { data := [c] }) s.toList }
Instances For
Equations
Instances For
Given an ERE
, group characters that behaves the same
,
according to all the bracket
s in this ERE
- ngroup : Nat
- all : Std.HashSet σ
- charMap : Std.HashMap σ Nat
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- cg.toString = cg.toStringAux toString
Instances For
Equations
Equations
- Auto.Regex.instToStringADFA = { toString := Auto.Regex.ADFA.toString }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
- complete : LexResultTy
- incomplete : LexResultTy
- malformed : LexResultTy
Instances For
Equations
Equations
Equations
Equations
- Auto.Regex.LexResultTy.complete.toString = "LexResultTy.complete"
- Auto.Regex.LexResultTy.incomplete.toString = "LexResultTy.incomplete"
- Auto.Regex.LexResultTy.malformed.toString = "LexResultTy.malformed"
Instances For
Equations
- type : LexResultTy
- matched : Substring
- endSMatched : Bool
- state : Nat
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.Regex.instToStringLexResult = { toString := Auto.Regex.LexResult.toString }
Usage : First use ERE.toADFA
to generate
the lexing table in another file <f>
and use
initialize
to store it, then call the following
function in another file, where the ADFA
is
the one initialized in <f>
.
Leftmost match, eager (in finding the first matching character) and
matches at least one character.
short = false
: Longest match, default
short = true
: Shortest match
strict = false
: Start from the first valid character, default
strict = true
: Start from the first character of s
Note that if we can't find the matching first character with
strict = false
, we just return incomplete
This function takes an ADFA
generated by
ERE.toADFA (e : ERE)
, a string s
. It first finds the leftmost
character in s
that is a [valid first character of the lexicon]
(thus the name eager
). Then, it returns the longest match
(as a substring) if there is one, and returns none
otherwise.
We prepend s
with the "beginning of string" group
and append to s
the "end of string" group
Equations
- One or more equations did not get rendered due to their size.