Grip.Ascii: named ASCII byte predicates, constants, and helpers #
Pure byte layer: is-prefixed predicates over UInt8, the common delimiter bytes as
named constants, and code : Char → UInt8 for ASCII character literals. No parsers and
no grades live here; Grip.Combinators builds parsers on top. Batteries-only.
@[inline]
Blank: space (0x20) or tab (0x09) only, excluding line breaks.
Equations
- Grip.Ascii.isBlank b = (b == 32 || b == 9)
Instances For
@[inline]
ASCII letter.
Equations
Instances For
@[inline]
ASCII letter or decimal digit.
Equations
Instances For
@[inline]
Control byte: 0x00-0x1F or 0x7F (DEL).
Instances For
@[inline]
Punctuation: printable, not alphanumeric, not space.
Equations
- Grip.Ascii.isPunct b = (Grip.Ascii.isPrint b && !Grip.Ascii.isAlphaNum b && b != 32)
Instances For
@[inline]
Numeric value of a decimal digit byte (meaningful only when isDigit).
Equations
- Grip.Ascii.digitValue b = b.toNat - 48
Instances For
@[inline]
Numeric value of a hex digit byte (0-15); 0 for non-hex bytes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Double quote ".
Equations
Instances For
@[inline]
Apostrophe '.
Equations
Instances For
@[inline]
Backslash \.
Equations
Instances For
@[inline]
Forward slash /.
Equations
Instances For
@[inline]
Semicolon ;.
Equations
Instances For
@[inline]
Left parenthesis (.
Equations
Instances For
@[inline]
Right parenthesis ).
Equations
Instances For
@[inline]
Left bracket [.
Equations
Instances For
@[inline]
Right bracket ].