4j: Parsing (Bases and Base Digits)

+ab

Primitive parser engine.

A core containing numeric parser primitives.

Source

++  ab
  |%

Examples

> ab
<36.ecc 414.gly 100.xkc 1.ypj %164>

+bix:ab

Parse hex pair.

Parsing $rule. Parses a pair of base-16 digits. Used in escapes.

Source

++  bix  (bass 16 (stun [2 2] six))

Examples


+fem:ab

Parse base58check char.

Parse a single base58check character.

Source

Examples


+haf:ab

Parse non-doz phonetic pair.

Parsing $rule. Parses an $atom of aura @pE, a phrase of two bytes encoded phonetically. If the leading syllable is .z (0), parsing will fail.

Source

Examples


+hef:ab

Parse non-dozzod phonetic pair.

Parsing $rule. Parses an $atom of aura @pE without leading ~ or .~, a phrase of two bytes encoded phonetically. If it's dozzod, parsing will fail.

Source

Examples


+hif:ab

Parse phonetic pair.

Parsing $rule. Parses an $atom of aura @pE, without leading ~ or .~. A phrase of two bytes encoded phonetically.

Source

Examples


+hof:ab

Parse 2-4 @q phonetic pairs.

Parsing $rule. Parses an $atom of aura @q (non-scrambled @p), without leading ~ or .~, of between two and four phrases.

Source

Example


+huf:ab

Parse 1-4 @q phonetic pairs.

Parsing $rule. Parses an $atom of aura @q (non-scrambled @p), without leading ~ or .~, of between one and four phrases.

Source

Examples


+hyf:ab

Parse four @q phonetic pairs.

Parsing $rule. Parses an $atom of aura @q (non-scrambled @p), without leading ~ or .~, of exactly four phrases.

Source

Examples


+pev:ab

Parse 1-5 @uv base-32 chars.

Parsing $rule. Parses one to five @uv base-32 digits without the leading 0v or leading zeros.

Source

Examples


+pew:ab

Parse 1-5 @uw base-64 chars.

Parsing $rule. Parses one to five @uw base-64 digits without the leading 0w or leading zeros.

Source

Examples


+piv:ab

Parse 5 @uv base-32 chars.

Parsing $rule. Parses exactly five @uv base-32 digits without the leading 0v or leading zeros.

Source

Examples


+piw:ab

Parse 5 @uw base-64 chars.

Parsing $rule. Parses exactly five @uw base-64 digits without the leading 0w or leading zeros.

Source

Examples


+qeb:ab

Parse 1-4 binary digits.

Parsing $rule. Parses a binary number of up to 4 digits in length without a leading zero.

Source

Examples


+qex:ab

Parse 1-4 hex digits.

Parsing $rule. Parses a hexadecimal number of up to 4 digits in length without a leading zero.

Source

Examples


+qib:ab

Parse 4 binary.

Parsing $rule. Parses exactly four binary digits - may have leading zeros.

Source

Examples


+qix:ab

Parse 4 hex.

Parsing $rule. Parses exactly four hexadecimal digits - may have leading zeros.

Source

Examples


+seb:ab

Parse 1.

Parsing $rule. Parses the number 1.

Source

Examples


+sed:ab

Parse decimal.

Parsing $rule. Parses a nonzero decimal digit.

Source

Examples


+sev:ab

Parse base-32.

Parsing $rule. Parses a nonzero base-32 digit.

Source

Examples


+sew:ab

Parse base-64.

Parsing $rule. Parses a nonzero base-64 digit.

Source

Examples


+sex:ab

Parse hex.

Parsing $rule. Parses a non-zero hexadecimal digit.

Source

Examples


+sib:ab

Parse binary.

Parsing $rule. Parses a binary digit.

Source

Examples


+sid:ab

Parse decimal.

Parsing $rule. Parses a decimal digit.

Source

Examples


+siv:ab

Parse base-32.

Parsing $rule. Parses a base-32 digit.

Source

Examples


+siw:ab

Parse base-64.

Parsing $rule. Parses a base-64 digit.

Source

Examples


+six:ab

Parse hex.

Parsing $rule. Parses a hexadecimal digit.

Source

Examples


+sov:ab

Parse @uv base-32 letter.

Parsing $rule. Parses a @uv base-32 letter (but not a number).

Source

Examples


+sow:ab

Parse @uw base-64 letter/symbol.

Parsing $rule. Parses a base-64 letter/symbol (but not number).

Source

Examples


+sox:ab

Parse hex letter.

Parsing $rule. Parses a hexadecimal letter (but not number).

Source

Examples


+ted:ab

Parse 1-999 decimal.

Parsing $rule. Parses a decimal number of up to 3 digits without a leading zero.

Source

Examples


+tep:ab

Parse non-doz leading phonetic byte.

Parsing $rule. Parses the leading phonetic byte , which represents a syllable. Fails if it is .doz.

Source

Examples


+tip:ab

Leading phonetic byte.

Parsing $rule. Parses the leading phonetic byte, which represents a syllable.

Source

Examples


+tiq:ab

Trailing phonetic syllable.

Parsing $rule. Parses the trailing phonetic byte, which represents a syllable.

Source

Examples


+tid:ab

Parse 3 decimal digits.

Parsing $rule. Parses exactly three decimal digits.

Source

Examples


+til:ab

Parse 3 lowercase.

Parsing $rule. Parses exactly three lowercase letters.

Source

Examples


+urs:ab

Parse knot characters.

Parsing $rule. Parses characters from an $atom of the knot aura @ta.

Source

Examples


+urt:ab

Parse knot without underscores.

Parsing $rule. Parses all characters of the knot aura @ta except for cab, _.

Source

Examples


+voy:ab

Parse bas, soq, or bix.

Parsing $rule. Parses an escaped backslash \\, single quote \', or hex pair \0a byte.

Source

Examples


+ag

Top-level $atom parser engine.

A core containing top-level $atom parsers.

Source


+ape:ag

Parse 0 or $rule.

Parser modifier. Parses 0 or the sample $rule .fel.

Accepts

.l is a $rule.

Produces

A $rule.

Source

Examples


+bay:ag

Parses binary number.

Parsing $rule. Parses a binary number without a leading zero.

Source

Examples


+bip:ag

Parse IPv6.

Parsing $rule. Parses a @is, an IPv6 address.

Source

Examples


+dem:ag

Parse decimal with dots.

Parsing $rule. Parses a decimal number that includes dot separators.

Source

Examples


+dim:ag

Parse decimal number.

Parsing $rule. Parses a decimal number without a leading zero.

Source

Examples


+dum:ag

Parse decimal with leading 0.

Parsing $rule. Parses a decmial number with leading zeroes.

Source

Examples


+fed:ag

Parse phonetic base.

Parsing $rule. Parses an $atom of aura @p, the phonetic base.

Source

Examples


+feq:ag

Parse @q phonetic base.

Parsing $rule. Parses an $atom of aura @q (an unscrambled @p).

Source

Examples


+fim:ag

Parse base58check.

Parse a base58check value, check checksum, and return decoded value sans-checksum. If the checksum check fails, parsing will fail.

Source

Examples

With valid checksum:

With invalid checksum:


+hex:ag

Parse hex.

Parsing $rule. Parses a hexadecimal number

Source

Examples


+lip:ag

Parse IPv4 address.

Parsing $rule. Parses an IPv4 address.

Source

Examples


+mot:ag

Parse numerical month.

Parse a numerical month (1-12).

Source

Examples


+viz:ag

Parse Base-32 with dots.

Parsing $rule. Parses a Base-32 number with dot separators.

Source

Examples


+vum:ag

Parse base-32 string.

Parsing $rule. Parses a raw base-32 string (without dots).

Source

Examples


+wiz:ag

Parse base-64.

Parsing $rule. Parses a base-64 number.

Source

Examples


+mu

Core used to scramble 16-bit $atoms.

A door that contains arms that are used to scramble two $atoms, .p and .bot. Used especially in the phonetic base to disguise the relationship between a planet and its star.

Accepts

.p is an $atom.

.t is an $atom.

Source


+zag:mu

Add bottom into top.

Produces the cell of .p and .t with .p scrambled to the result of adding .t to .p modulo 16. Used to scramble the name of a planet.

Accepts

.p & .t are $atoms, and are the sample of +mu.

Produces

A (pair @ @).

Source

Examples


+zig:mu

Subtract bottom from top.

The inverse of +zag. Produces the cell of .p and .t with .p unscrambled. The unscrambled .p is the sum of the sample .p and the 16-bit complement of .bot. Used to unscramble the name of the planet.

Accepts

.p & .t are $atoms, and are the sample of +mu.

Produces

A (pair @ @).

Source

Examples


+zug:mu

Concatenate into $atom.

Produces the concatenation of .p and .bot. Used to assemble a planet name.

Accepts

.p & .t are $atoms, and are the sample of +mu.

Produces

An $atom.

Source

Examples


+ne

Digit rendering engine.

A door containing arms that render digits at bases 10, 16, 32, and 64.

Accepts

.g is an $atom.

Source


+c:ne

Render base58check.

Render a single base58check character.

Accepts

.g is an $atom, and is the sample of +ne.

Produces

An $atom.

Source

Examples


+d:ne

Render decimal.

Renders a decimal digit as an $atom of an ACII byte value.

Accepts

.g is an $atom, and is the sample of +ne.

Produces

An $atom.

Source

Examples


+x:ne

Render hex.

Renders a hexadecimal digit as an $atom of an ASCII byte value.

Accepts

.g is an $atom, and is the sample of +ne.

Produces

An $atom.

Source

Examples


+v:ne

Render base-32.

Renders a base-32 digit as an $atom of an ASCII byte value.

Accepts

.g is an $atom, and is the sample of +ne.

Produces

An $atom.

Source

Examples


+w:ne

Render base-64.

Renders a base-64 digit as an $atom of an ASCII byte value.

Accepts

.g is an $atom, and is the sample of +ne.

Produces

An $atom.

Source

Examples


Last updated