2title = "4h: Parsing (ASCII Glyphs)"
11Parses ASCII character 32, space.
30 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q=""]]]]
32 > (ace [[1 1] " abc "])
33 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="abc "]]]]
42Parses ASCII character 124, the vertical bar.
56 > `cord`(scan "|" bar)
60 [p=[p=1 q=2] q=[~ [p=~~~7c. q=[p=[p=1 q=2] q=""]]]]
63 [p=[p=1 q=2] q=[~ [p=~~~7c. q=[p=[p=1 q=2] q="="]]]]
72Parses ASCII character 92, the backslash. Note the extra `\` in the calling of
73`bas` with [`++just`](/docs/hoon/reference/stdlib/4f) is to escape the escape
88 > `cord`(scan "\\" bas)
92 ~ <syntax error at [1 18]>
95 [p=[p=1 q=2] q=[~ [p=~~~5c. q=[p=[p=1 q=2] q=""]]]]
107Parses ASCII character 36, the dollar sign.
121 > `cord`(scan "$" buc)
125 [p=[p=1 q=2] q=[~ [p=~~~24. q=[p=[p=1 q=2] q=""]]]]
128 [p=[p=1 q=2] q=[~ [p=~~~24. q=[p=[p=1 q=2] q="%"]]]]
137Parses ASCII character 95, the underscore.
151 > `cord`(scan "_" cab)
155 [p=[p=1 q=2] q=[~ [p=~~~5f. q=[p=[p=1 q=2] q=""]]]]
167Parses ASCII character 37, the percent sign.
181 > `cord`(scan "%" cen)
185 [p=[p=1 q=2] q=[~ [p=~~~25. q=[p=[p=1 q=2] q=""]]]]
188 [p=[p=1 q=2] q=[~ [p=~~~25. q=[p=[p=1 q=2] q="^"]]]]
197Parses ASCII character 58, the colon
211 > `cord`(scan ":" col)
215 [p=[p=1 q=2] q=[~ [p=~~~3a. q=[p=[p=1 q=2] q=""]]]]
218 [p=[p=1 q=2] q=[~ [p=~~~3a. q=[p=[p=1 q=2] q="-"]]]]
226Parses ASCII character 44, the comma.
240 > `cord`(scan "," com)
244 [p=[p=1 q=2] q=[~ [p=~~~2c. q=[p=[p=1 q=2] q=""]]]]
246 > (com [[1 1] "not com"])
256Parses ASCII character 34, the double quote.
270 > `cord`(scan "\"" doq)
274 [p=[p=1 q=2] q=[~ [p=~~~22. q=[p=[p=1 q=2] q=""]]]]
276 > (doq [[1 1] "not successfully parsed"])
291Parses ASCII character 46, the period.
305 > `cord`(scan "." dot)
309 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q=""]]]]
312 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q="^"]]]]
321Parses ASCII character 47, the forward slash.
336 [p=[p=1 q=2] q=[~ [p=~~~2f. q=[p=[p=1 q=2] q=""]]]]
348Parses ASCII character 60, the less-than sign.
363 [p=[p=1 q=2] q=[~ [p=~~~3c. q=[p=[p=1 q=2] q=""]]]]
366 [p=[p=1 q=2] q=[~ [p=~~~3c. q=[p=[p=1 q=2] q="+"]]]]
376Parse greater-than sign
378Parses ASCII character 62, the greater-than sign.
392 > `cord`(scan ">" gar)
396 [p=[p=1 q=2] q=[~ [p=~~~3e. q=[p=[p=1 q=2] q=""]]]]
408Parses ASCII character 35, the number sign.
423 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q=""]]]]
426 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q="!"]]]]
435Parses ASCII character 45, the hyphen.
450 [p=[p=1 q=2] q=[~ [p=~~- q=[p=[p=1 q=2] q=""]]]]
460Parse left curley bracket
462Parses ASCII character 123, the left curly bracket. Note that `{`
463(`kel`) and `}` (`ker`) open and close a Hoon expression for Hoon string
464interpolation. To parse either of them, they must be escaped.
479 [p=[p=1 q=2] q=[~ [p=~~~7b. q=[p=[p=1 q=2] q=""]]]]
481 > (kel [[1 1] " \{"])
489Parse right curley bracket
491Parses ASCII character 125, the right curly bracket. Note that `{`
492(`kel`) and `}` (`ker`) open and close a Hoon expression for Hoon string
493interpolation. To parse either of them, they must be escaped.
508 [p=[p=1 q=2] q=[~ [p=~~~7d. q=[p=[p=1 q=2] q=""]]]]
510 > (ker [[1 1] "\{}"])
520Parses ASCII character 94, the caret.
535 [p=[p=1 q=2] q=[~ [p=~~~5e. q=[p=[p=1 q=2] q=""]]]]
546Parses ASCII character 43, the plus sign.
560 > `cord`(scan "+" lus)
564 [p=[p=1 q=2] q=[~ [p=~~~2b. q=[p=[p=1 q=2] q=""]]]]
576Parses ASCII character 38, the ampersand.
590 > `cord`(scan "&" pam)
594 [p=[p=1 q=2] q=[~ [p=~~~26. q=[p=[p=1 q=2] q=""]]]]
606Parses ASCII character 64, the "at" sign.
620 > `cord`(scan "@" pat)
624 [p=[p=1 q=2] q=[~ [p=~~~4. q=[p=[p=1 q=2] q=""]]]]
634Parse left parenthesis
636Parses ASCII character 40, the left parenthesis.
651 [p=[p=1 q=2] q=[~ [p=~~~28. q=[p=[p=1 q=2] q=""]]]]
661Parse right parenthesis
663Parses ASCII character 41, the right parenthesis.
678 [p=[p=1 q=2] q=[~ [p=~~~29. q=[p=[p=1 q=2] q=""]]]]
688Parse left square bracket
690Parses ASCII character 91, the left square bracket.
705 [p=[p=1 q=2] q=[~ [p=~~~5b. q=[p=[p=1 q=2] q=""]]]]
717Parses ASCII character 59, the semicolon.
732 [p=[p=1 q=2] q=[~ [p=~~~3b. q=[p=[p=1 q=2] q=""]]]]
742Parse right square bracket
744Parses ASCII character 93, the right square bracket.
759 [p=[p=1 q=2] q=[~ [p=~~~5d. q=[p=[p=1 q=2] q=""]]]]
761 > (ser [[1 1] "[ ]"])
771Parses ASCII character 126, the tilde.
786 [p=[p=1 q=2] q=[~ [p=~~~~ q=[p=[p=1 q=2] q=""]]]]
798Parses ASCII character 39, soq. Note the extra '' is to escape the first
799`soq` because soq delimits a `++cord`.
814 [p=[p=1 q=2] q=[~ [p=~~~27. q=[p=[p=1 q=2] q=""]]]]
826Parses ASCII character 42, the asterisk.
840 > `cord`(scan "*" tar)
844 [p=[p=1 q=2] q=[~ [p=~~~2a. q=[p=[p=1 q=2] q=""]]]]
856Parses ASCII character 96, the backtick (also known as the "grave
862 ++ tec (just '`') :: backTiCk
871 > `cord`(scan "`" tec)
875 [p=[p=1 q=2] q=[~ [p=~~~6. q=[p=[p=1 q=2] q=""]]]]
887Parses ASCII character 61, the equals sign.
902 [p=[p=1 q=2] q=[~ [p=~~~3d. q=[p=[p=1 q=2] q=""]]]]
913Parses ASCII character 63, the question mark.
928 [p=[p=1 q=2] q=[~ [p=~~~3f. q=[p=[p=1 q=2] q=""]]]]
940Parses ASCII character 33, the exclamation point zap.
955 [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