@[inline]
def
Parser.Char.char
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
(tk : Char)
:
char tk
accepts and returns character tk
, otherwise fails
Equations
- Parser.Char.char tk = Parser.withErrorMessage (toString "expected " ++ toString (repr tk) ++ toString "") (Parser.token tk)
Instances For
def
Parser.Char.chars
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
(tks : String)
:
chars tks
accepts and returns string tks
, otherwise fails
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Parser.Char.captureStr
{ε : Type}
{m : Type → Type u_1}
[Monad m]
{α : Type}
[Parser.Error ε Substring Char]
(p : ParserT ε Substring Char m α)
:
captureStr p
parses p
and returns the output of p
with the corresponding substring
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Parser.Char.space
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse space (U+0020)
Equations
- Parser.Char.space = Parser.withErrorMessage "expected space (U+0020)" (Parser.token ' ')
Instances For
@[inline]
def
Parser.Char.tab
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse horizontal tab (U+0009)
Equations
- Parser.Char.tab = Parser.withErrorMessage "expected horizontal tab (U+0009)" (Parser.token '\t')
Instances For
@[inline]
def
Parser.Char.ASCII.lf
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse line feed (U+000A)
Equations
- Parser.Char.ASCII.lf = Parser.withErrorMessage "expected line feed (U+000A)" (Parser.token '\n')
Instances For
@[inline]
def
Parser.Char.ASCII.cr
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse carriage return (U+000D)
Equations
- Parser.Char.ASCII.cr = Parser.withErrorMessage "expected carriage return (U+000D)" (Parser.token '\x0d')
Instances For
@[inline]
def
Parser.Char.eol
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse end of line
Equations
- Parser.Char.eol = Parser.withErrorMessage "expected newline" (Parser.Char.ASCII.cr *> Parser.Char.ASCII.lf <|> Parser.Char.ASCII.lf)
Instances For
def
Parser.Char.ASCII.whitespace
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse whitespace character
Equations
- Parser.Char.ASCII.whitespace = Parser.withErrorMessage "expected whitespace character" (Parser.tokenFilter fun (c : Char) => c == ' ' || decide (c ≥ '\t') && decide (c ≤ '\x0d'))
Instances For
def
Parser.Char.ASCII.uppercase
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse uppercase letter character (A
..Z
)
Equations
- Parser.Char.ASCII.uppercase = Parser.withErrorMessage "expected uppercase letter character" (Parser.tokenFilter fun (c : Char) => decide (c ≥ 'A') && decide (c ≤ 'Z'))
Instances For
def
Parser.Char.ASCII.lowercase
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse lowercase letter character (a
..z
)
Equations
- Parser.Char.ASCII.lowercase = Parser.withErrorMessage "expected lowercase letter character" (Parser.tokenFilter fun (c : Char) => decide (c ≥ 'a') && decide (c ≤ 'z'))
Instances For
def
Parser.Char.ASCII.alpha
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse alphabetic character (A
..Z
and a
..z
)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Parser.Char.ASCII.numeric
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse numeric character (0
..9
)
Equations
- Parser.Char.ASCII.numeric = Parser.withErrorMessage "expected decimal digit character" (Parser.tokenFilter fun (c : Char) => decide (c ≥ '0') && decide (c ≤ '9'))
Instances For
def
Parser.Char.ASCII.alphanum
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse alphabetic letter or digit (A
..Z
, a
..z
and 0
..9
)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Parser.Char.ASCII.control
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse control character
Equations
- Parser.Char.ASCII.control = Parser.withErrorMessage "expected control character" (Parser.tokenFilter fun (c : Char) => decide (c.val < 32) || c.val == 127)
Instances For
def
Parser.Char.ASCII.digit
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse decimal digit (0
-9
)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Parser.Char.ASCII.binDigit
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse binary digit (0
..1
)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Parser.Char.ASCII.octDigit
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse octal digit (0
..7
)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Parser.Char.ASCII.hexDigit
{ε σ : Type}
{m : Type → Type u_1}
[Parser.Stream σ Char]
[Parser.Error ε σ Char]
[Monad m]
:
Parse hexadecimal digit (0
..9
, A
..F
and a
..f
)
Equations
- One or more equations did not get rendered due to their size.