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="-"]]]]
227Parses ASCII character 44, the comma.
241 > `cord`(scan "," com)
245 [p=[p=1 q=2] q=[~ [p=~~~2c. q=[p=[p=1 q=2] q=""]]]]
247 > (com [[1 1] "not com"])
257Parses ASCII character 34, the double quote.
271 > `cord`(scan "\"" doq)
275 [p=[p=1 q=2] q=[~ [p=~~~22. q=[p=[p=1 q=2] q=""]]]]
277 > (doq [[1 1] "not successfully parsed"])
292Parses ASCII character 46, the period.
306 > `cord`(scan "." dot)
310 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q=""]]]]
313 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q="^"]]]]
322Parses ASCII character 47, the forward slash.
337 [p=[p=1 q=2] q=[~ [p=~~~2f. q=[p=[p=1 q=2] q=""]]]]
349Parses ASCII character 60, the less-than sign.
364 [p=[p=1 q=2] q=[~ [p=~~~3c. q=[p=[p=1 q=2] q=""]]]]
367 [p=[p=1 q=2] q=[~ [p=~~~3c. q=[p=[p=1 q=2] q="+"]]]]
377Parse greater-than sign
379Parses ASCII character 62, the greater-than sign.
393 > `cord`(scan ">" gar)
397 [p=[p=1 q=2] q=[~ [p=~~~3e. q=[p=[p=1 q=2] q=""]]]]
409Parses ASCII character 35, the number sign.
424 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q=""]]]]
427 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q="!"]]]]
436Parses ASCII character 45, the hyphen.
451 [p=[p=1 q=2] q=[~ [p=~~- q=[p=[p=1 q=2] q=""]]]]
461Parse left curley bracket
463Parses ASCII character 123, the left curly bracket. Note that `{`
464(`kel`) and `}` (`ker`) open and close a Hoon expression for Hoon string
465interpolation. To parse either of them, they must be escaped.
480 [p=[p=1 q=2] q=[~ [p=~~~7b. q=[p=[p=1 q=2] q=""]]]]
482 > (kel [[1 1] " \{"])
490Parse right curley bracket
492Parses ASCII character 125, the right curly bracket. Note that `{`
493(`kel`) and `}` (`ker`) open and close a Hoon expression for Hoon string
494interpolation. To parse either of them, they must be escaped.
509 [p=[p=1 q=2] q=[~ [p=~~~7d. q=[p=[p=1 q=2] q=""]]]]
511 > (ker [[1 1] "\{}"])
521Parses ASCII character 94, the caret.
536 [p=[p=1 q=2] q=[~ [p=~~~5e. q=[p=[p=1 q=2] q=""]]]]
548Parses ASCII character 43, the plus sign.
562 > `cord`(scan "+" lus)
566 [p=[p=1 q=2] q=[~ [p=~~~2b. q=[p=[p=1 q=2] q=""]]]]
578Parses ASCII character 38, the ampersand.
592 > `cord`(scan "&" pam)
596 [p=[p=1 q=2] q=[~ [p=~~~26. q=[p=[p=1 q=2] q=""]]]]
608Parses ASCII character 64, the "at" sign.
622 > `cord`(scan "@" pat)
626 [p=[p=1 q=2] q=[~ [p=~~~4. q=[p=[p=1 q=2] q=""]]]]
636Parse left parenthesis
638Parses ASCII character 40, the left parenthesis.
653 [p=[p=1 q=2] q=[~ [p=~~~28. q=[p=[p=1 q=2] q=""]]]]
663Parse right parenthesis
665Parses ASCII character 41, the right parenthesis.
680 [p=[p=1 q=2] q=[~ [p=~~~29. q=[p=[p=1 q=2] q=""]]]]
690Parse left square bracket
692Parses ASCII character 91, the left square bracket.
707 [p=[p=1 q=2] q=[~ [p=~~~5b. q=[p=[p=1 q=2] q=""]]]]
719Parses ASCII character 59, the semicolon.
734 [p=[p=1 q=2] q=[~ [p=~~~3b. q=[p=[p=1 q=2] q=""]]]]
744Parse right square bracket
746Parses ASCII character 93, the right square bracket.
761 [p=[p=1 q=2] q=[~ [p=~~~5d. q=[p=[p=1 q=2] q=""]]]]
763 > (ser [[1 1] "[ ]"])
773Parses ASCII character 126, the tilde.
788 [p=[p=1 q=2] q=[~ [p=~~~~ q=[p=[p=1 q=2] q=""]]]]
800Parses ASCII character 39, soq. Note the extra '' is to escape the first
801`soq` because soq delimits a `++cord`.
816 [p=[p=1 q=2] q=[~ [p=~~~27. q=[p=[p=1 q=2] q=""]]]]
828Parses ASCII character 42, the asterisk.
842 > `cord`(scan "*" tar)
846 [p=[p=1 q=2] q=[~ [p=~~~2a. q=[p=[p=1 q=2] q=""]]]]
858Parses ASCII character 96, the backtick (also known as the "grave
864 ++ tec (just '`') :: backTiCk
873 > `cord`(scan "`" tec)
877 [p=[p=1 q=2] q=[~ [p=~~~6. q=[p=[p=1 q=2] q=""]]]]
889Parses ASCII character 61, the equals sign.
904 [p=[p=1 q=2] q=[~ [p=~~~3d. q=[p=[p=1 q=2] q=""]]]]
916Parses ASCII character 63, the question mark.
931 [p=[p=1 q=2] q=[~ [p=~~~3f. q=[p=[p=1 q=2] q=""]]]]
943Parses ASCII character 33, the exclamation point zap.
958 [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