2title = "3g: Molds and Mold-Builders"
9Noun-literal syntax cases
11Syntax cases for nouns-literal: atoms, jammed nouns, and nestable tuples. Parsed
12and printed using `++so` and `++co` cores.
17 ++ coin $% [$$ p=dime]
27 > `coin`(need (slay '~s1'))
28 [%$ p=[p=~.dr q=18.446.744.073.709.551.616]]
30 > `coin`(need (slay '0x2b59'))
31 [%$ p=[p=~.ux q=11.097]]
33 > ~(rend co [%many ~[[%$ %ud 1] [%$ %tas 'a'] [%$ %s -2]]])
54Used in `++coin`. Convenience methods [`++scot`](@/docs/reference/library/4m.md) and
55[`++scow`](@/docs/reference/library/4m.md) print dimes as `++cord` and `++tape`, respectively.
56[`++slat`](@/docs/reference/library/4m.md), [`++slav`](@/docs/reference/library/4m.md), and [`++slaw`](@/docs/reference/library/4m.md) are used
57to parse atoms of specific auras.
75Parsing location metadata
77Optional result `p` and parsing continuation `q`.
91 > (tall:vast [1 1] "a b")
92 [p=[p=1 q=3] q=[~ u=[p=[%wing p=~[%a]] q=[p=[p=1 q=2] q=" b"]]]]
97See also: [Section 2e](@/docs/reference/library/2e.md), `++rule`
103Parsing line and column
105A pair of two `@ud` used in parsing indicating line and column number.
110 ++ hair [p=@ud q=@ud]
119 > `hair`[1 1] :: parsing starts at [1 1] as a convention.
122 > ((plus ace) [1 1] " --")
123 [p=[p=1 q=4] q=[~ u=[p=[~~. " "] q=[p=[p=1 q=4] q="--"]]]]
125 > `hair`p:((plus ace) [1 1] " --")
134Generates an `++edge` with a parsed result set to a specific type.
144 u=[p=(a +>-.b) q=[p=(hair -.b) q=(tape +.b)]]
154 [p=[p=1 q=2] q=[~ u=[p=' ' q=[p=[p=1 q=2] q="a"]]]]
156 > `(like char)`(ace [1 1] " a")
157 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
159 > `(like ,@)`(ace [1 1] " a")
160 [p=[p=1 q=2] q=[~ u=[p=32 q=[p=[p=1 q=2] q="a"]]]]
166Location, remainder of parsed text
168Indicates parsing position `p`, and remaining text to be parsed `q`.
173 ++ nail [p=hair q=tape]
179 > +<:;~(plug cab cab)
188A list of `++knot`s. `++knot` is another name for `@ta`.
205Used in `%clay` and `%eyre` extensively.
212A `++pint` is a pair of `++hair`, indicating from `p` to `q`. Mostly used for
218 ++ pint [p=[p=@ q=@] q=[p=@ q=@]]
224 > !:(!!) :: !! always produces a crash
225 /~zod/home/~2014.9.20..01.22.04..52e3/:<[1 4].[1 6]>
227 > `pint`[[1 4] [1 6]]
228 [p=[p=1 q=4] q=[p=1 q=6]]
237An empty parsing rule, but used to check that parsing rules match this with `_`.
243 ++ rule _|=(nail *edge)
249 > ([|=(a=nail [p.a ~ u=['a' a]])]:|6 [1 1] "hi")
250 [[p=1 q=1] ~ u=['a' p=[p=1 q=1] q="hi"]]
258The stack trace that is printed after crashing.
263 ++ spot [p=path q=pint]
269 > !: !! :: !! always produces a crash
270 /~zod/home/~2018.8.8..21.42.40..7852:<[1 5].[1 7]>
277Nock result, error report
279Produces either success (`%0`), a block with list of requests blocked on (`%1`),
280or failure with an error report (`%2`).
286 ++ tone $% [$0 p=*] :: success
287 [$1 p=(list)] :: blocks
288 [$2 p=(list [@ta *])] :: error report
295 > (mink [[20 21] 0 3] $~)
299 > (mink [[1 2] !=(!:(+(.)))] ,~)
304 [ [ \/72.245.008.048.359.254.300.063.028.130.093.488.830.539.186.242.06\/
305 3.318.457.928.725.368.447.417.075.673.617.723.940.025.940.705.343
306 .057.601.925.133.611.559.292.046.932.324.629.048.702
309 \/347.698.068.472.453.194.464.038.059.283.550.210.118.689.128.761.6\/
325Nock result, stack trace
327Produces either success (`%0`), a block with list of requests blocked on (`%1`),
328or failure with a stack trace (`%2`).
334 ++ toon $% [$0 p=*] :: success
335 [$1 p=(list)] :: blocks
336 [$2 p=(list tank)] :: stack trace
343 > (mock [[20 21] 0 3] $~)
346 > (mock [[1 2] !=(!:(+(.)))] ,~)
347 [%2 p=~[[%leaf p="/~zod/try/~2014.9.23..18.34.32..d3c5/:<[1 20].[1 24]>"]]]
355Pull result out of a `++edge`, or crash if there's no result.
360 ++ wonk |*(veq=edge ?~(q.veq !! p.u.q.veq))
366 > (wide:vast [1 1] "(add 2 2)")
371 [ p=[%cnhp p=[%wing p=~[%add]] q=~[[%sand p=%ud q=2] [%sand p=%ud q=2]]]
372 q=[p=[p=1 q=10] q=""]
377 > (wonk (wide:vast [1 1] "(add 2 2)"))
378 [%cnhp p=[%wing p=~[%add]] q=~[[%sand p=%ud q=2] [%sand p=%ud q=2]]]
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list