on c19bc7a help sign in
1327 lines 22 kB history raw
1:- :~ navhome/'/docs/'
2 sort/'38'
3 title/'4k: Atom Printing'
4 ==
6;>
8# 4k: atom printing
10### `++co`
12Literal rendering engine
14A door that contains arms that operate on the sample coin `lot`.
16#### Accepts
18#### Produces
20`lot` is a `++coin`.
22#### Source
24```
25 ++ co !.
26 ~% %co ..co ~
27 =< |_ lot/coin
28```
30#### Examples
32```
33 > < 3.nta
34 { lot/{$many {$~ $ta @t} {$~ $ud @ud} $~}
35 <10.cfg 4.jjn {rep/"" <402.arm 110.jyx 1.ztu $151>}>
36 }
37 >
38```
40------------------------------------------------------------------------
42### `++rear`
44Prepend & render as tape
46Renders a coin `lot` as a tape prepended to the sample tape `rom`.
48#### Accepts
50#### Produces
52`rom` is a `pe`
54`lot` is a `++coin`.
56#### Source
58```
59 ++ rear |=(rom/tape =>(.(rex rom) rend))
60```
62#### Examples
64```
65 > (~(rear co %$ %ux 200) "--ha")
66 "0xc8--ha"
67```
69------------------------------------------------------------------------
71### `++rent`
73Render as span
75Renders a coin `lot` as a span.
77#### Accepts
79#### Produces
81`lot` is a `++coin`.
83#### Source
85```
86 ++ rent `@ta`(rap 3 rend)
87```
89#### Examples
91```
92 > ~(rent co %$ %ux 200)
93 ~.0xc8
95 > `@t`~(rent co %$ %ux 200)
96 '0xc8'
97```
98------------------------------------------------------------------------
100### `++rend`
102Render as tape
104Renders a coin `lot` as a tape.
106#### Accepts
108#### Produces
110`lot` is a `++coin`.
112#### Source
114```
115 ++ rend
116 ^- tape
117 ?: ?=($blob -.lot)
118 ['~' '0' ((v-co 1) (jam p.lot))]
119 ?: ?=($many -.lot)
120 :- '.'
121 |- ^- tape
122 ?~ p.lot
123 ['_' '_' rep]
124 ['_' (weld (trip (wack rent(lot i.p.lot))) $(p.lot t.p.lot))]
125 =+ [yed=(end 3 1 p.p.lot) hay=(cut 3 [1 1] p.p.lot)]
126 |- ^- tape
127 ?+ yed (z-co q.p.lot)
128 $c ['~' '-' (weld (rip 3 (wood (tuft q.p.lot))) rep)]
129 $d
130 ?+ hay (z-co q.p.lot)
131 $a
132 =+ yod=(yore q.p.lot)
133 => ^+(. .(rep ?~(f.t.yod rep ['.' (s-co f.t.yod)])))
134 => ^+ .
135 %= .
136 rep
137 ?: &(=(~ f.t.yod) =(0 h.t.yod) =(0 m.t.yod) =(0 s.t.yod))
138 rep
139 => .(rep ['.' (y-co s.t.yod)])
140 => .(rep ['.' (y-co m.t.yod)])
141 ['.' '.' (y-co h.t.yod)]
142 ==
143 => .(rep ['.' (a-co d.t.yod)])
144 => .(rep ['.' (a-co m.yod)])
145 => .(rep ?:(a.yod rep ['-' rep]))
146 ['~' (a-co y.yod)]
147 ::
148 $r
149 =+ yug=(yell q.p.lot)
150 => ^+(. .(rep ?~(f.yug rep ['.' (s-co f.yug)])))
151 :- '~'
152 ?: &(=(0 d.yug) =(0 m.yug) =(0 h.yug) =(0 s.yug))
153 ['s' '0' rep]
154 => ^+(. ?:(=(0 s.yug) . .(rep ['.' 's' (a-co s.yug)])))
155 => ^+(. ?:(=(0 m.yug) . .(rep ['.' 'm' (a-co m.yug)])))
156 => ^+(. ?:(=(0 h.yug) . .(rep ['.' 'h' (a-co h.yug)])))
157 => ^+(. ?:(=(0 d.yug) . .(rep ['.' 'd' (a-co d.yug)])))
158 +.rep
159 ==
160 ::
161 $f
162 ?: =(& q.p.lot)
163 ['.' 'y' rep]
164 ?:(=(| q.p.lot) ['.' 'n' rep] (z-co q.p.lot))
165 ::
166 $n ['~' rep]
167 $i
168 ?+ hay (z-co q.p.lot)
169 $f ((ro-co [3 10 4] |=(a/@ ~(d ne a))) q.p.lot)
170 $s ((ro-co [4 16 8] |=(a/@ ~(x ne a))) q.p.lot)
171 ==
172 ::
173 $p
174 =+ dyx=(met 3 q.p.lot)
175 :- '~'
176 ?: (lte dyx 1)
177 (weld (trip (tod:po q.p.lot)) rep)
178 ?: =(2 dyx)
179 ;: weld
180 (trip (tos:po (end 3 1 q.p.lot)))
181 (trip (tod:po (rsh 3 1 q.p.lot)))
182 rep
183 ==
184 =+ [dyz=(met 5 q.p.lot) fin=| dub=&]
185 |- ^- tape
186 ?: =(0 dyz)
187 rep
188 %= $
189 fin &
190 dub !dub
191 dyz (dec dyz)
192 q.p.lot (rsh 5 1 q.p.lot)
193 rep
194 =+ syb=(wren:un (end 5 1 q.p.lot))
195 =+ cog=~(zig mu [(rsh 4 1 syb) (end 4 1 syb)])
196 ;: weld
197 (trip (tos:po (end 3 1 p.cog)))
198 (trip (tod:po (rsh 3 1 p.cog)))
199 `tape`['-' ~]
200 (trip (tos:po (end 3 1 q.cog)))
201 (trip (tod:po (rsh 3 1 q.cog)))
202 `tape`?.(fin ~ ['-' ?.(dub ~ ['-' ~])])
203 rep
204 ==
205 ==
206 ::
207 $r
208 ?+ hay (z-co q.p.lot)
209 $d ['.' '~' (r-co (rlyd q.p.lot))]
210 $h ['.' '~' '~' (r-co (rlyh q.p.lot))]
211 $q ['.' '~' '~' '~' (r-co (rlyq q.p.lot))]
212 $s ['.' (r-co (rlys q.p.lot))]
213 ==
214 ::
215 $u
216 ?: ?=($c hay)
217 %+ welp ['0' 'c' (reap (pad:fa q.p.lot) '1')]
218 (c-co (enc:fa q.p.lot))
219 =- (weld p.gam ?:(=(0 q.p.lot) `tape`['0' ~] q.gam))
220 ^= gam ^- {p/tape q/tape}
221 ?+ hay [~ ((ox-co [10 3] |=(a/@ ~(d ne a))) q.p.lot)]
222 $b [['0' 'b' ~] ((ox-co [2 4] |=(a/@ ~(d ne a))) q.p.lot)]
223 $i [['0' 'i' ~] ((d-co 1) q.p.lot)]
224 $x [['0' 'x' ~] ((ox-co [16 4] |=(a/@ ~(x ne a))) q.p.lot)]
225 $v [['0' 'v' ~] ((ox-co [32 5] |=(a/@ ~(x ne a))) q.p.lot)]
226 $w [['0' 'w' ~] ((ox-co [64 5] |=(a/@ ~(w ne a))) q.p.lot)]
227 ==
228 ::
229 $s
230 %+ weld
231 ?:((syn:si q.p.lot) "--" "-")
232 $(yed 'u', q.p.lot (abs:si q.p.lot))
233 ::
234 $t
235 ?: =('a' hay)
236 ?: =('s' (cut 3 [2 1] p.p.lot))
237 (weld (rip 3 q.p.lot) rep)
238 ['~' '.' (weld (rip 3 q.p.lot) rep)]
239 ['~' '~' (weld (rip 3 (wood q.p.lot)) rep)]
240 ==
241 --
242```
244#### Examples
246```
247 > ~(rend co ~ %ux 200)
248 "0xc8"
250 > ~(rend co %many ~[[%$ ux+200] [%$ p+40]])
251 "._0xc8_~~tem__"
253 > ~(rend co ~ %p 32.819)
254 "~pillyt"
256 > ~(rend co ~ %ux 18)
257 "0x12"
259 > ~(rend co [~ p=[p=%if q=0x7f00.0001]])
260 ".127.0.0.1"
262 > `@ux`.127.0.0.1
263 2.130.706.433
265 > ~(rend co %many ~[[~ %ud 20] [~ %uw 133] [~ %tas 'sam']])
266 "._20_0w25_sam__"
268 > ~(rend co %blob [1 1])
269 "~0ph"
271 > ~0ph
272 [1 1]
274 > `@uv`(jam [1 1])
275 0vph
276```
279---
280### `++alf`
282Alphabetic characters
284Parse alphabetic characters, both upper and lowercase.
286#### Source
288```
289 ++ alf ;~(pose low hig) :: alphabetic
290```
292#### Examples
294```
295 > (scan "a" alf)
296 ~~a
298 > (scan "A" alf)
299 ~~~41.
301 > (scan "AaBbCc" (star alf))
302 "AaBbCc"
303```
306---
307### `++aln`
309Alphanumeric characters
311Parse alphanumeric characters - both alphabetic characters and numbers.
313#### Source
315```
316 ++ aln ;~(pose low hig nud) :: alphanumeric
317```
319#### Examples
321```
322 > (scan "0" aln)
323 ~~0
325 > (scan "alf42" (star aln))
326 "alf42"
328 > (scan "0123456789abcdef" (star aln))
329 "0123456789abcdef"
330```
333---
334### `++alp`
336Alphanumeric and `-`
338Parse alphanumeric strings and hep, "-".
340#### Source
342```
343 ++ alp ;~(pose low hig nud hep) :: alphanumeric and -
344```
346#### Examples
348```
349 > (scan "7" alp)
350 ~~7
352 > (scan "s" alp)
353 ~~s
355 > (scan "123abc-" (star alp))
356 "123abc-"
357```
360---
362### `++bet`
364Axis syntax `-`, `+`
366Parse the hep and lus axis syntax.
368#### Source
370```
371 ++ bet ;~(pose (cold 2 hep) (cold 3 lus)) :: axis syntax - +
372```
374#### Examples
376```
377 > (scan "-" bet)
378 2
380 > (scan "+" bet)
381 3
382```
385---
386### `++bin`
388Binary to atom
390Parse a tape of binary (0s and 1s) and produce its atomic representation.
392#### Source
394```
395 ++ bin (bass 2 (most gon but)) :: binary to atom
396```
398#### Examples
400```
401 > (scan "0000" bin)
402 0
404 > (scan "0001" bin)
405 1
407 > (scan "0010" bin)
408 2
410 > (scan "100000001111" bin)
411 2.063
412```
415---
416### `++but`
418Binary digit
420Parse a single binary digit.
422#### Source
424```
425 ++ but (cook |=(a=@ (sub a '0')) (shim '0' '1')) :: binary digit
426```
428#### Examples
430```
431 > (scan "0" but)
432 0
433 > (scan "1" but)
434 1
435 > (scan "01" but)
436 ! {1 2}
437 ! 'syntax-error'
438 ! exit
439 > (scan "01" (star but))
440 ~[0 1]
441```
444---
445### `++cit`
447Octal digit
449Parse a single octal digit.
451#### Source
453```
454 ++ cit (cook |=(a=@ (sub a '0')) (shim '0' '7')) :: octal digit
455```
457#### Examples
459```
460 > (scan "1" cit)
461 1
462 > (scan "7" cit)
463 7
464 > (scan "8" cit)
465 ! {1 1}
466 ! 'syntax-error'
467 ! exit
468 > (scan "60" (star cit))
469 ~[6 0]
470```
473---
474### `++dem`
476Decimal to atom
478Parse a decimal number to an atom.
480#### Source
482```
483 ++ dem (bass 10 (most gon dit)) :: decimal to atom
484```
486#### Examples
488```
489 > (scan "7" dem)
490 7
491 > (scan "42" dem)
492 42
493 > (scan "150000000" dem)
494 150.000.000
495 > (scan "12456" dem)
496 12.456
497```
500---
501### `++dit`
503Decimal digit
505Parse a single decimal digit.
507#### Source
509```
510 ++ dit (cook |=(a=@ (sub a '0')) (shim '0' '9')) :: decimal digit
511```
513#### Examples
515```
516 > (scan "7" dit)
517 7
518 > (scan "42" (star dit))
519 ~[4 2]
520 > (scan "26000" (star dit))
521 ~[2 6 0 0 0]
522```
525---
526### `++dog`
528`.` optional gap
530Dot followed by an optional gap, used with numbers.
532#### Source
534```
535 ++ dog ;~(plug dot gay) ::
536```
538#### Examples
540```
541 > 1.234.703
542 703
543 1.234.703
545 > (scan "a. " ;~(pfix alf dog))
546 [~~~. ~]
547```
550---
551### `++doh`
553`@p` separator
555Phonetic base phrase separator
557#### Source
559```
560 ++ doh ;~(plug ;~(plug hep hep) gay) ::
561```
563#### Examples
565```
566 /> ~nopfel-botduc-nilnev-dolfyn--haspub-natlun-lodmur-holtyd
567 ~nopfel-botduc-nilnev-dolfyn--haspub-natlun-lodmur-holtyd
568 /> ~nopfel-botduc-nilnev-dolfyn--
569 haspub-natlun-lodmur-holtyd
570 ~nopfel-botduc-nilnev-dolfyn--haspub-natlun-lodmur-holtyd
571 > (scan "--" doh)
572 [[~~- ~~-] ~]
573 > (scan "-- " doh)
574 [[~~- ~~-] ~]
575```
578---
579### `++dun`
581`--` to `~`
583Parse phep, `--`, to null, `~`.
585#### Source
587```
588 ++ dun (cold ~ ;~(plug hep hep)) :: -- (phep) to ~
589```
591#### Examples
593```
594 > (scan "--" dun)
595 ~
596 > (dun [[1 1] "--"])
597 [p=[p=1 q=3] q=[~ u=[p=~ q=[p=[p=1 q=3] q=""]]]]
598```
601---
603### `++duz`
605`==` to `~`
607Parse stet, `==`, to null `~`.
609#### Source
611```
612 ++ duz (cold ~ ;~(plug tis tis)) :: == (stet) to ~
613```
615#### Examples
617```
618 > (scan "==" duz)
619 ~
620 > (duz [[1 1] "== |=..."])
621 [p=[p=1 q=3] q=[~ u=[p=~ q=[p=[p=1 q=3] q=" |=..."]]]]
622```
625---
627### `++gah`
629Newline or ' '
631Whitespace component, either newline or space.
633#### Source
635```
636 ++ gah (mask [`@`10 ' ' ~]) :: newline or ace
637```
639#### Examples
641```
642 /> ^- * :: show spaces
643 """
644 -
645 -
646 -
647 """
648 [32 32 32 45 10 32 45 10 32 32 45 0]
649 /> ^- *
650 """
652 """
653 [32 32 32 10 32 10 32 32 0]
654 /> ^- (list ,@)
655 %- scan :_ (star gah)
656 """
658 """
659 ~[32 32 32 10 32 10 32 32]
660```
663---
664### `++gap`
666Plural whitespace
668Separates tall runes
670#### Source
672```
673 ++ gap (cold ~ ;~(plug gaq (star ;~(pose vul gah)))) :: plural whitespace
674```
677---
678### `++gaq`
680End of line
682Two spaces, a newline, or comment.
684#### Source
686```
687 ++ gaq ;~ pose :: end of line
688 (just `@`10)
689 ;~(plug gah ;~(pose gah vul))
690 vul
691 ==
692```
696---
697### `++gaw`
699Classic whitespace
701Terran whitespace.
703#### Source
705```
706 ++ gaw (cold ~ (star ;~(pose vul gah))) :: classic white
707```
710---
711### `++gay`
713Optional gap
715Optional gap.
717#### Source
719```
720 ++ gay ;~(pose gap (easy ~)) ::
721```
723---
724### `++gon`
726Long numbers
728Parse long numbers - Numbers which wrap around the shell with the line
730#### Source
732```
733 ++ gon ;~(pose ;~(plug bas gay fas) (easy ~)) :: long numbers \ /
734```
736#### Examples
738```
739 > (scan "\\/" gon)
740 [~~~5c. ~ ~~~2f.]
742 > (gon [[1 1] "\\/"])
743 [p=[p=1 q=3] q=[~ u=[p=[~~~5c. ~ ~~~2f.] q=[p=[p=1 q=3] q=""]]]]
744```
747---
748### `++gul`
750Axis syntax `<` or `>`
752Parse the axis gal and gar axis syntax.
754#### Source
756```
757 ++ gul ;~(pose (cold 2 gal) (cold 3 gar)) :: axis syntax < >
758```
760#### Examples
762```
763 > (scan "<" gul)
764 2
766 > (scan ">" gul)
767 3
768```
771---
772### `++hex`
774Hex to atom
776Parse any hexadecimal number to an atom.
778#### Source
780```
781 ++ hex (bass 16 (most gon hit)) :: hex to atom
782```
784#### Examples
786```
787 > (scan "a" hex)
788 10
789 > (scan "A" hex)
790 10
791 > (scan "2A" hex)
792 42
793 > (scan "1ee7" hex)
794 7.911
795 > (scan "1EE7" hex)
796 7.911
797 > (scan "1EE7F7" hex)
798 2.025.463
799 > `@ux`(scan "1EE7F7" hex)
800 0x1e.e7f7
801```
803---
804### `++hig`
806Uppercase
808Parse a single uppercase letter.
810#### Source
812```
813 ++ hig (shim 'A' 'Z') :: uppercase
814```
816#### Examples
818```
819 > (scan "G" hig)
820 ~~~47.
822 > `cord`(scan "G" hig)
823 'G'
825 > (scan "ABCDEFGHIJKLMNOPQRSTUVWXYZ" (star hig))
826 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
828 > (hig [[1 1] "G"])
829 [p=[p=1 q=2] q=[~ [p=~~~47. q=[p=[p=1 q=2] q=""]]]]
830```
833---
834### `++hit`
836Hex digits
838Parse a single hexadecimal digit.
840#### Source
842```
843 ++ hit ;~ pose :: hex digits
844 dit
845 (cook |=(a=char (sub a 87)) (shim 'a' 'f'))
846 (cook |=(a=char (sub a 55)) (shim 'A' 'F'))
847 ==
848```
850#### Examples
852```
853 > (scan "a" hit)
854 10
855 > (scan "A" hit)
856 10
857 > (hit [[1 1] "a"])
858 [p=[p=1 q=2] q=[~ [p=10 q=[p=[p=1 q=2] q=""]]]]
859 > (scan "2A" (star hit))
860 ~[2 10]
861```
863---
864### `++iny`
866Indentation block
868Apply `++rule` to indented block starting at current column number, omitting
869the leading whitespace.
871#### Accepts
873`sef` is a `++rule`
875#### Produces
877A `++rule`.
879#### Source
881```
882 ++ inde |* sef/rule :: indentation block
883 |= nail ^+ (sef)
884 =+ [har tap]=[p q]:+<
885 =+ lev=(fil 3 (dec q.har) ' ')
886 =+ eol=(just `@t`10)
887 =+ =- roq=((star ;~(pose prn ;~(sfix eol (jest lev)) -)) har tap)
888 ;~(simu ;~(plug eol eol) eol)
889 ?~ q.roq roq
890 =+ vex=(sef har(q 1) p.u.q.roq)
891 =+ fur=p.vex(q (add (dec q.har) q.p.vex))
892 ?~ q.vex vex(p fur)
893 =- vex(p fur, u.q -)
894 :+ &3.vex
895 &4.vex(q.p (add (dec q.har) q.p.&4.vex))
896 =+ res=|4.vex
897 |- ?~ res |4.roq
898 ?. =(10 -.res) [-.res $(res +.res)]
899 (welp [`@t`10 (trip lev)] $(res +.res))
900 ::
901```
903#### Examples
905```
906 > (scan "abc" (iny (star ;~(pose prn (just `@`10)))))
907 "abc"
908 > (scan "abc" (star ;~(pose prn (just `@`10))))
909 "abc"
910 > (scan " abc\0ade" ;~(pfix ace ace (star ;~(pose prn (just `@`10)))))
911 "abc
912 de"
913 > (scan " abc\0ade" ;~(pfix ace ace (iny (star ;~(pose prn (just `@`10))))))
914 ! {1 6}
915 ! exit
916 > (scan " abc\0a de" ;~(pfix ace ace (iny (star ;~(pose prn (just `@`10))))))
917 "abc
918 de"
919```
922---
923### `++low`
925Lowercase
927Parse a single lowercase letter.
929#### Source
931```
932 ++ low (shim 'a' 'z') :: lowercase
933```
935#### Examples
937```
938 > (scan "g" low)
939 ~~g
940 > `cord`(scan "g" low)
941 'g'
942 > (scan "abcdefghijklmnopqrstuvwxyz" (star low))
943 "abcdefghijklmnopqrstuvwxyz"
944 > (low [[1 1] "g"])
945 [p=[p=1 q=2] q=[~ [p=~~g q=[p=[p=1 q=2] q=""]]]]
946```
949---
950### `++mes`
952Hexbyte
954Parse a hexbyte.
956#### Source
958```
959 ++ mes %+ cook :: hexbyte
960 |=({a/@ b/@} (add (mul 16 a) b))
961 ;~(plug hit hit)
962```
964#### Examples
966```
967 > (scan "2A" mes)
968 42
969 > (mes [[1 1] "2A"])
970 [p=[p=1 q=3] q=[~ u=[p=42 q=[p=[p=1 q=3] q=""]]]]
971 > (scan "42" mes)
972 66
973```
976---
977### `++nix`
979Letters and `-`
981Parse Letters and `-`.
983#### Source
985```
986 ++ nix (boss 256 (star ;~(pose aln cab))) ::
987```
989#### Examples
991```
992 > (scan "as_me" nix)
993 q=435.626.668.897
995 > `@t`(scan "as_me" nix)
996 'as_me'
997```
1000---
1002### `++nud`
1004Numeric
1006Parse a numeric character - A number.
1008#### Source
1010```
1011 ++ nud (shim '0' '9') :: numeric
1012```
1014#### Examples
1016```
1017 > (scan "0" nud)
1018 ~~0
1019 > (scan "7" nud)
1020 ~~7
1021 > (nud [[1 1] "1"])
1022 [p=[p=1 q=2] q=[~ [p=~~1 q=[p=[p=1 q=2] q=""]]]]
1023 > (scan "0123456789" (star nud))
1024 "0123456789"
1025```
1027---
1028### `++prn`
1030Printable character
1032Parse any printable character.
1034#### Source
1036```
1037 ++ prn ;~(less (just `@`127) (shim 32 256))
1038```
1040#### Examples
1042```
1043 > (scan "h" prn)
1044 ~~h
1045 > (scan "!" prn)
1046 ~~~21.
1047 > (scan "\01" prn)
1048 ! {1 1}
1049 ! exit
1050```
1053---
1054### `++qit`
1056Chars in cord
1058Parse an individual character to its cord atom representation.
1060#### Source
1062```
1063 ++ qit ;~ pose :: chars in a cord
1064 ;~(less bas soq prn)
1065 ;~(pfix bas ;~(pose bas soq mes)) :: escape chars
1066 ==
1067```
1069#### Examples
1071```
1072 > (scan "%" qit)
1073 37
1074 > `@t`(scan "%" qit)
1075 '%'
1076 > (scan "0" qit)
1077 48
1078 > (scan "E" qit)
1079 69
1080 > (scan "a" qit)
1081 97
1082 > (scan "\\0a" qit)
1083 10
1084 > `@ux`(scan "\\0a" qit)
1085 0xa
1086 > (scan "cord" (star qit))
1087 ~[99 111 114 100]
1088```
1091---
1092### `++qit`
1094Chars in cord
1096Parse an individual character to its cord atom representation.
1098#### Source
1100```
1101 ++ qit ;~ pose :: chars in a cord
1102 ;~(less bas soq prn)
1103 ;~(pfix bas ;~(pose bas soq mes)) :: escape chars
1104 ==
1105```
1107#### Examples
1109```
1110 > (scan "%" qit)
1111 37
1112 > `@t`(scan "%" qit)
1113 '%'
1114 > (scan "0" qit)
1115 48
1116 > (scan "E" qit)
1117 69
1118 > (scan "a" qit)
1119 97
1120 > (scan "\\0a" qit)
1121 10
1122 > `@ux`(scan "\\0a" qit)
1123 0xa
1124 > (scan "cord" (star qit))
1125 ~[99 111 114 100]
1126```
1130---
1131### `++qut`
1133Cord
1135Parse single-soq cord with `\{gap}/` anywhere in the middle, or triple-single
1136quote (aka triple-soq) cord, between which must be in an indented block.
1138#### Source
1140```
1141 ++ qut ;~ pose :: cord
1142 ;~ less soqs
1143 (ifix [soq soq] (boss 256 (more gon qit)))
1144 ==
1145 %- inde %+ ifix
1146 :- ;~ plug soqs
1147 ;~(pose ;~(plug (plus ace) vul) (just '\0a'))
1148 ==
1149 ;~(plug (just '\0a') soqs)
1150 (boss 256 (star qat))
1151 ==
1152 ::
1153```
1155#### Examples
1157```
1158 > (scan "'cord'" qut)
1159 q=1.685.221.219
1160 > 'cord'
1161 'cord'
1162 > `@ud`'cord'
1163 1.685.221.219
1164 > '''
1165 Heredoc isn't prohibited from containing quotes
1166 '''
1167 'Heredoc isn't prohibited from containing quotes'
1168```
1171---
1172### `++soz`
1174Delimiting `'''`
1176Parse a triple-single quote, used for multiline strings.
1178#### Source
1180```
1181 ++ soz ;~(plug soq soq soq) :: delimiting '''
1182```
1184#### Examples
1186```
1187 > (scan "'''" soz)
1188 [~~~27. ~~~27. ~~~27.]
1189 > (rash '"""' soz)
1190 ! {1 1}
1191 ! exit
1192```
1195---
1196### `++sym`
1198Term
1200A term: a letter(lowercase), followed by letters, numbers, or `-`.
1202#### Source
1204```
1205 ++ sym
1206 %+ cook
1207 |=(a=tape (rap 3 ^-((list ,@) a)))
1208 ;~(plug low (star ;~(pose nud low hep)))
1209 ::
1210```
1212#### Examples
1214```
1215 > (scan "sam-2" sym)
1216 215.510.507.891
1217 > `@t`(scan "sam-2" sym)
1218 'sam-2'
1219 > (scan "sym" sym)
1220 7.174.515
1221```
1224---
1225### `++ven`
1227`+>-` axis syntax
1229Axis syntax parser
1231#### Source
1233```
1234 ++ ven ;~ (comp |=({a/@ b/@} (peg a b))) :: +>- axis syntax
1235 bet
1236 =+ hom=`?`|
1237 |= tub/nail
1238 ^- (like axis)
1239 =+ vex=?:(hom (bet tub) (gul tub))
1240 ?~ q.vex
1241 [p.tub [~ 1 tub]]
1242 =+ wag=$(p.tub p.vex, hom !hom, tub q.u.q.vex)
1243 ?> ?=(^ q.wag)
1244 [p.wag [~ (peg p.u.q.vex p.u.q.wag) q.u.q.wag]]
1245 ==
1246```
1248#### Examples
1250```
1251 ~zod/arvo=/hoon/hoon> (scan "->+" ven)
1252 11
1254 ~zod/arvo=/hoon/hoon> `@ub`(scan "->+" ven)
1255 0b1011
1257 ~zod/arvo=/hoon/hoon> (peg (scan "->" ven) (scan "+" ven))
1258 11
1260 ~zod/arvo=/hoon/hoon> ->+:[[1 2 [3 4]] 5]
1261 [3 4]
1262```
1265---
1266### `++vit`
1268Base64 digit
1270Parse a standard base64 digit.
1272#### Source
1274```
1275 ++ vit :: base64 digit
1276 ;~ pose
1277 (cook |=(a/@ (sub a 65)) (shim 'A' 'Z'))
1278 (cook |=(a/@ (sub a 71)) (shim 'a' 'z'))
1279 (cook |=(a/@ (add a 4)) (shim '0' '9'))
1280 (cold 62 (just '-'))
1281 (cold 63 (just '+'))
1282 ==
1283```
1285#### Examples
1287```
1288 ~zod/arvo=/hoon/hoon> (scan "C" vit)
1290 ~zod/arvo=/hoon/hoon> (scan "c" vit)
1291 28
1292 ~zod/arvo=/hoon/hoon> (scan "2" vit)
1293 54
1294 ~zod/arvo=/hoon/hoon> (scan "-" vit)
1295 62
1296```
1298---
1299### `++vul`
1301Comments to null
1303#### Source
1305```
1306 ++ vul %+ cold ~ :: comments
1307 ;~ plug col col
1308 (star prn)
1309 (just `@`10)
1310 ==
1311```
1313Parse comments and produce a null. Note that a comment must be ended
1314with a newline character.
1316#### Examples
1318```
1319 > (scan "::this is a comment \0a" vul)
1321 > (scan "::this is a comment " vul)
1322 ! {1 21}
1323 ! exit
1324```
1327---