1# 4h: parsing (ascii glyphs)
6Parses ASCII character 32, space.
18 > `cord`(scan " " ace)
21 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q=""]]]]
22 > (ace [[1 1] " abc "])
23 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="abc "]]]]
32Parses ASCII character 124, the vertical bar.
44 > `cord`(scan "|" bar)
47 [p=[p=1 q=2] q=[~ [p=~~~7c. q=[p=[p=1 q=2] q=""]]]]
49 [p=[p=1 q=2] q=[~ [p=~~~7c. q=[p=[p=1 q=2] q="="]]]]
58Parses ASCII character 92, the backslash. Note the extra `\` in the calling of
59`bas` with [`++just`](/doc/hoon/library/2ec#++just) is to escape the escape
72 > `cord`(scan "\\" bas)
75 ~ <syntax error at [1 18]>
77 [p=[p=1 q=2] q=[~ [p=~~~5c. q=[p=[p=1 q=2] q=""]]]]
88Parses ASCII character 36, the dollar sign.
100 > `cord`(scan "$" buc)
103 [p=[p=1 q=2] q=[~ [p=~~~24. q=[p=[p=1 q=2] q=""]]]]
105 [p=[p=1 q=2] q=[~ [p=~~~24. q=[p=[p=1 q=2] q="%"]]]]
114Parses ASCII character 95, the underscore.
126 > `cord`(scan "_" cab)
129 [p=[p=1 q=2] q=[~ [p=~~~5f. q=[p=[p=1 q=2] q=""]]]]
140Parses ASCII character 37, the percent sign.
152 > `cord`(scan "%" cen)
155 [p=[p=1 q=2] q=[~ [p=~~~25. q=[p=[p=1 q=2] q=""]]]]
157 [p=[p=1 q=2] q=[~ [p=~~~25. q=[p=[p=1 q=2] q="^"]]]]
166Parses ASCII character 58, the colon
178 > `cord`(scan ":" col)
181 [p=[p=1 q=2] q=[~ [p=~~~3a. q=[p=[p=1 q=2] q=""]]]]
183 [p=[p=1 q=2] q=[~ [p=~~~3a. q=[p=[p=1 q=2] q="-"]]]]
192Parses ASCII character 44, the comma.
204 > `cord`(scan "," com)
207 [p=[p=1 q=2] q=[~ [p=~~~2c. q=[p=[p=1 q=2] q=""]]]]
208 > (com [[1 1] "not com"])
218Parses ASCII character 34, the double quote.
230 > `cord`(scan "\"" doq)
233 [p=[p=1 q=2] q=[~ [p=~~~22. q=[p=[p=1 q=2] q=""]]]]
234 > (doq [[1 1] "not successfully parsed"])
248Parses ASCII character 46, the period.
260 > `cord`(scan "." dot)
263 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q=""]]]]
265 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q="^"]]]]
274Parses ASCII character 47, the forward slash.
286 > `cord`(scan "/" fas)
289 [p=[p=1 q=2] q=[~ [p=~~~2f. q=[p=[p=1 q=2] q=""]]]]
300Parses ASCII character 60, the less-than sign.
312 > `cord`(scan "<" gal)
315 [p=[p=1 q=2] q=[~ [p=~~~3c. q=[p=[p=1 q=2] q=""]]]]
317 [p=[p=1 q=2] q=[~ [p=~~~3c. q=[p=[p=1 q=2] q="+"]]]]
326Parse greater-than sign
328Parses ASCII character 62, the greater-than sign.
340 > `cord`(scan ">" gar)
343 [p=[p=1 q=2] q=[~ [p=~~~3e. q=[p=[p=1 q=2] q=""]]]]
354Parses ASCII character 35, the number sign.
366 > `cord`(scan "#" hax)
369 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q=""]]]]
371 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q="!"]]]]
380Parses ASCII character 45, the hyphen.
392 > `cord`(scan "-" hep)
395 [p=[p=1 q=2] q=[~ [p=~~- q=[p=[p=1 q=2] q=""]]]]
404Parse left curley bracket
406Parses ASCII character 123, the left curly bracket. Note that `{`
407(`kel`) and `}` (`ker`) open and close a Hoon expression for Hoon string
408interpolation. To parse either of them, they must be escaped.
420 > `cord`(scan "\{" kel)
423 [p=[p=1 q=2] q=[~ [p=~~~7b. q=[p=[p=1 q=2] q=""]]]]
424 > (kel [[1 1] " \{"])
432Parse right curley bracket
434Parses ASCII character 125, the right curly bracket. Note that `{`
435(`kel`) and `}` (`ker`) open and close a Hoon expression for Hoon string
436interpolation. To parse either of them, they must be escaped.
448 > `cord`(scan "}" ker)
451 [p=[p=1 q=2] q=[~ [p=~~~7d. q=[p=[p=1 q=2] q=""]]]]
452 > (ker [[1 1] "\{}"])
462Parses ASCII character 94, the caret.
474 > `cord`(scan "^" ket)
477 [p=[p=1 q=2] q=[~ [p=~~~5e. q=[p=[p=1 q=2] q=""]]]]
487Parses ASCII character 43, the plus sign.
499 > `cord`(scan "+" lus)
502 [p=[p=1 q=2] q=[~ [p=~~~2b. q=[p=[p=1 q=2] q=""]]]]
513Parses ASCII character 38, the ampersand.
525 > `cord`(scan "&" pam)
528 [p=[p=1 q=2] q=[~ [p=~~~26. q=[p=[p=1 q=2] q=""]]]]
539Parses ASCII character 64, the "at" sign.
551 > `cord`(scan "@" pat)
554 [p=[p=1 q=2] q=[~ [p=~~~4. q=[p=[p=1 q=2] q=""]]]]
563Parse left parenthesis
565Parses ASCII character 40, the left parenthesis.
577 > `cord`(scan "(" pel)
580 [p=[p=1 q=2] q=[~ [p=~~~28. q=[p=[p=1 q=2] q=""]]]]
589Parse right parenthesis
591Parses ASCII character 41, the right parenthesis.
603 > `cord`(scan ")" per)
606 [p=[p=1 q=2] q=[~ [p=~~~29. q=[p=[p=1 q=2] q=""]]]]
615Parse left square bracket
617Parses ASCII character 91, the left square bracket.
629 > `cord`(scan "[" sel)
632 [p=[p=1 q=2] q=[~ [p=~~~5b. q=[p=[p=1 q=2] q=""]]]]
643Parses ASCII character 59, the semicolon.
655 > `cord`(scan ";" sem)
658 [p=[p=1 q=2] q=[~ [p=~~~3b. q=[p=[p=1 q=2] q=""]]]]
667Parse right square bracket
669Parses ASCII character 93, the right square bracket.
681 > `cord`(scan "]" ser)
684 [p=[p=1 q=2] q=[~ [p=~~~5d. q=[p=[p=1 q=2] q=""]]]]
685 > (ser [[1 1] "[ ]"])
695Parses ASCII character 126, the tilde.
707 > `cord`(scan "~" sig)
710 [p=[p=1 q=2] q=[~ [p=~~~~ q=[p=[p=1 q=2] q=""]]]]
721Parses ASCII character 39, soq. Note the extra '' is to escape the first
722`soq` because soq delimits a [`++cord`]().
734 > `cord`(scan "'" soq)
737 [p=[p=1 q=2] q=[~ [p=~~~27. q=[p=[p=1 q=2] q=""]]]]
748Parses ASCII character 42, the asterisk.
760 > `cord`(scan "*" tar)
763 [p=[p=1 q=2] q=[~ [p=~~~2a. q=[p=[p=1 q=2] q=""]]]]
774Parses ASCII character 96, the backtick (also known as the "grave
780 ++ tec (just '`') :: backTiCk
787 > `cord`(scan "`" tec)
790 [p=[p=1 q=2] q=[~ [p=~~~6. q=[p=[p=1 q=2] q=""]]]]
801Parses ASCII character 61, the equals sign.
813 > `cord`(scan "=" tis)
816 [p=[p=1 q=2] q=[~ [p=~~~3d. q=[p=[p=1 q=2] q=""]]]]
827Parses ASCII character 63, the question mark.
839 > `cord`(scan "?" wut)
842 [p=[p=1 q=2] q=[~ [p=~~~3f. q=[p=[p=1 q=2] q=""]]]]
853Parses ASCII character 33, the exclamation point zap.
865 > `cord`(scan "!" zap)
868 [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