1# 4g: parsing (outside caller)
6Parse a cord with a given `++rule` and crash if the `++cord` isn't entirely
19The value of the parse result, or crash.
24 ++ rash |*({naf/@ sab/rule} (scan (trip naf) sab)) ::
30 > (rash 'I was the world in which I walked, and what I saw' (star (shim 0 200)))
31 "I was the world in which I walked, and what I saw"
32 > (rash 'abc' (just 'a'))
36 > (rash 'abc' (jest 'abc'))
38 `> (rash 'abc' (jest 'ab'))
50Parse a given with a given rule and produce null if the cord isn't
63The value of the parse result, or null.
68 ++ rush |*({naf/@ sab/rule} (rust (trip naf) sab))
74 > (rush 'I was the world in which I walked, and what I saw' (star (shim 0 200)))
75 [~ "I was the world in which I walked, and what I saw"]
76 > (rush 'abc' (just 'a'))
78 > (rush 'abc' (jest 'abc'))
80 > (rush 'abc' (jest 'ac'))
82 > (rush 'abc' (jest 'ab'))
92Parse a `++tape` with a given `++rule` and produce null if the `++tape` isn't
110 ++ rust |* {los/tape sab/rule}
111 =+ vex=((full sab) [[1 1] los])
112 ?~(q.vex ~ [~ u=p.u.q.vex])
118 > (rust "I was the world in which I walked, and what I saw" (star (shim 0 200)))
119 [~ "I was the world in which I walked, and what I saw"]
120 > (rust "Or heard or felt came not but from myself;" (star (shim 0 200)))
121 [~ "Or heard or felt came not but from myself;"]
122 > (rust "And there I found myself more truly and more strange." (jest 'And there I'))
132Parse a `++tape` with a given `++rule` and crash if the `++tape` isn't entirely
145Either a `++tape` or a crash.
150 ++ scan |* {los/tape sab/rule}
151 =+ vex=((full sab) [[1 1] los])
153 ~_ (show [%m '{%d %d}'] p.p.vex q.p.vex ~)
154 ~|('syntax-error' !!)
160 > (scan "I was the world in which I walked, and what I saw" (star (shim 0 200)))
161 "I was the world in which I walked, and what I saw"
162 > (scan "Or heard or felt came not but from myself;" (star (shim 0 200)))
163 "Or heard or felt came not but from myself;"
164 > (scan "And there I found myself more truly and more strange." (jest 'And there I'))
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