6# 4h: parsing (ascii glyphs)
11Parses ASCII character 32, space.
23 > `cord`(scan " " ace)
26 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q=""]]]]
27 > (ace [[1 1] " abc "])
28 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="abc "]]]]
37Parses ASCII character 124, the vertical bar.
49 > `cord`(scan "|" bar)
52 [p=[p=1 q=2] q=[~ [p=~~~7c. q=[p=[p=1 q=2] q=""]]]]
54 [p=[p=1 q=2] q=[~ [p=~~~7c. q=[p=[p=1 q=2] q="="]]]]
63Parses ASCII character 92, the backslash. Note the extra `\` in the calling of
64`bas` with [`++just`](/docs/hoon/library/2ec#++just) is to escape the escape
77 > `cord`(scan "\\" bas)
80 ~ <syntax error at [1 18]>
82 [p=[p=1 q=2] q=[~ [p=~~~5c. q=[p=[p=1 q=2] q=""]]]]
93Parses ASCII character 36, the dollar sign.
105 > `cord`(scan "$" buc)
108 [p=[p=1 q=2] q=[~ [p=~~~24. q=[p=[p=1 q=2] q=""]]]]
110 [p=[p=1 q=2] q=[~ [p=~~~24. q=[p=[p=1 q=2] q="%"]]]]
119Parses ASCII character 95, the underscore.
131 > `cord`(scan "_" cab)
134 [p=[p=1 q=2] q=[~ [p=~~~5f. q=[p=[p=1 q=2] q=""]]]]
145Parses ASCII character 37, the percent sign.
157 > `cord`(scan "%" cen)
160 [p=[p=1 q=2] q=[~ [p=~~~25. q=[p=[p=1 q=2] q=""]]]]
162 [p=[p=1 q=2] q=[~ [p=~~~25. q=[p=[p=1 q=2] q="^"]]]]
171Parses ASCII character 58, the colon
183 > `cord`(scan ":" col)
186 [p=[p=1 q=2] q=[~ [p=~~~3a. q=[p=[p=1 q=2] q=""]]]]
188 [p=[p=1 q=2] q=[~ [p=~~~3a. q=[p=[p=1 q=2] q="-"]]]]
197Parses ASCII character 44, the comma.
209 > `cord`(scan "," com)
212 [p=[p=1 q=2] q=[~ [p=~~~2c. q=[p=[p=1 q=2] q=""]]]]
213 > (com [[1 1] "not com"])
223Parses ASCII character 34, the double quote.
235 > `cord`(scan "\"" doq)
238 [p=[p=1 q=2] q=[~ [p=~~~22. q=[p=[p=1 q=2] q=""]]]]
239 > (doq [[1 1] "not successfully parsed"])
253Parses ASCII character 46, the period.
265 > `cord`(scan "." dot)
268 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q=""]]]]
270 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q="^"]]]]
279Parses ASCII character 47, the forward slash.
291 > `cord`(scan "/" fas)
294 [p=[p=1 q=2] q=[~ [p=~~~2f. q=[p=[p=1 q=2] q=""]]]]
305Parses ASCII character 60, the less-than sign.
317 > `cord`(scan "<" gal)
320 [p=[p=1 q=2] q=[~ [p=~~~3c. q=[p=[p=1 q=2] q=""]]]]
322 [p=[p=1 q=2] q=[~ [p=~~~3c. q=[p=[p=1 q=2] q="+"]]]]
331Parse greater-than sign
333Parses ASCII character 62, the greater-than sign.
345 > `cord`(scan ">" gar)
348 [p=[p=1 q=2] q=[~ [p=~~~3e. q=[p=[p=1 q=2] q=""]]]]
359Parses ASCII character 35, the number sign.
371 > `cord`(scan "#" hax)
374 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q=""]]]]
376 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q="!"]]]]
385Parses ASCII character 45, the hyphen.
397 > `cord`(scan "-" hep)
400 [p=[p=1 q=2] q=[~ [p=~~- q=[p=[p=1 q=2] q=""]]]]
409Parse left curley bracket
411Parses ASCII character 123, the left curly bracket. Note that `{`
412(`kel`) and `}` (`ker`) open and close a Hoon expression for Hoon string
413interpolation. To parse either of them, they must be escaped.
425 > `cord`(scan "\{" kel)
428 [p=[p=1 q=2] q=[~ [p=~~~7b. q=[p=[p=1 q=2] q=""]]]]
429 > (kel [[1 1] " \{"])
437Parse right curley bracket
439Parses ASCII character 125, the right curly bracket. Note that `{`
440(`kel`) and `}` (`ker`) open and close a Hoon expression for Hoon string
441interpolation. To parse either of them, they must be escaped.
453 > `cord`(scan "}" ker)
456 [p=[p=1 q=2] q=[~ [p=~~~7d. q=[p=[p=1 q=2] q=""]]]]
457 > (ker [[1 1] "\{}"])
467Parses ASCII character 94, the caret.
479 > `cord`(scan "^" ket)
482 [p=[p=1 q=2] q=[~ [p=~~~5e. q=[p=[p=1 q=2] q=""]]]]
492Parses ASCII character 43, the plus sign.
504 > `cord`(scan "+" lus)
507 [p=[p=1 q=2] q=[~ [p=~~~2b. q=[p=[p=1 q=2] q=""]]]]
518Parses ASCII character 38, the ampersand.
530 > `cord`(scan "&" pam)
533 [p=[p=1 q=2] q=[~ [p=~~~26. q=[p=[p=1 q=2] q=""]]]]
544Parses ASCII character 64, the "at" sign.
556 > `cord`(scan "@" pat)
559 [p=[p=1 q=2] q=[~ [p=~~~4. q=[p=[p=1 q=2] q=""]]]]
568Parse left parenthesis
570Parses ASCII character 40, the left parenthesis.
582 > `cord`(scan "(" pel)
585 [p=[p=1 q=2] q=[~ [p=~~~28. q=[p=[p=1 q=2] q=""]]]]
594Parse right parenthesis
596Parses ASCII character 41, the right parenthesis.
608 > `cord`(scan ")" per)
611 [p=[p=1 q=2] q=[~ [p=~~~29. q=[p=[p=1 q=2] q=""]]]]
620Parse left square bracket
622Parses ASCII character 91, the left square bracket.
634 > `cord`(scan "[" sel)
637 [p=[p=1 q=2] q=[~ [p=~~~5b. q=[p=[p=1 q=2] q=""]]]]
648Parses ASCII character 59, the semicolon.
660 > `cord`(scan ";" sem)
663 [p=[p=1 q=2] q=[~ [p=~~~3b. q=[p=[p=1 q=2] q=""]]]]
672Parse right square bracket
674Parses ASCII character 93, the right square bracket.
686 > `cord`(scan "]" ser)
689 [p=[p=1 q=2] q=[~ [p=~~~5d. q=[p=[p=1 q=2] q=""]]]]
690 > (ser [[1 1] "[ ]"])
700Parses ASCII character 126, the tilde.
712 > `cord`(scan "~" sig)
715 [p=[p=1 q=2] q=[~ [p=~~~~ q=[p=[p=1 q=2] q=""]]]]
726Parses ASCII character 39, soq. Note the extra '' is to escape the first
727`soq` because soq delimits a [`++cord`]().
739 > `cord`(scan "'" soq)
742 [p=[p=1 q=2] q=[~ [p=~~~27. q=[p=[p=1 q=2] q=""]]]]
753Parses ASCII character 42, the asterisk.
765 > `cord`(scan "*" tar)
768 [p=[p=1 q=2] q=[~ [p=~~~2a. q=[p=[p=1 q=2] q=""]]]]
779Parses ASCII character 96, the backtick (also known as the "grave
785 ++ tec (just '`') :: backTiCk
792 > `cord`(scan "`" tec)
795 [p=[p=1 q=2] q=[~ [p=~~~6. q=[p=[p=1 q=2] q=""]]]]
806Parses ASCII character 61, the equals sign.
818 > `cord`(scan "=" tis)
821 [p=[p=1 q=2] q=[~ [p=~~~3d. q=[p=[p=1 q=2] q=""]]]]
832Parses ASCII character 63, the question mark.
844 > `cord`(scan "?" wut)
847 [p=[p=1 q=2] q=[~ [p=~~~3f. q=[p=[p=1 q=2] q=""]]]]
858Parses ASCII character 33, the exclamation point zap.
870 > `cord`(scan "!" zap)
873 [p=[p=1 q=2] q=[~ [p=~~~21. q=[p=[p=1 q=2] q=""]]]]
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