on 492ae2f help sign in
56 lines 1.1 kB history raw
1### `++knee`
3Recursive parsers
5Used for recursive parsers, which would otherwise be infinite when
6compiled.
8Accepts
9-------
11`gar` is a noun.
13`sef` is a gate that accepts a `++rule`
15Produces
16--------
18A `++rule`.
20Source
21------
23 ++ knee :: callbacks
24 |* {gar/* sef/_|.(*rule)}
25 |= tub/nail
26 ^- (like _gar)
27 ((sef) tub)
28 ::
30Examples
31--------
33 ~zod/try=> |-(;~(plug prn ;~(pose $ (easy ~))))
34 ! rest-loop
35 ! exit
36 ~zod/try=> |-(;~(plug prn ;~(pose (knee *tape |.(^$)) (easy ~))))
37 < 1.obo
38 [ c=c=tub=[p=[p=@ud q=@ud] q=""]
39 b
40 < 1.bes
41 [ c=tub=[p=[p=@ud q=@ud] q=""]
42 b=<1.tnv [tub=[p=[p=@ud q=@ud] q=""] <1.ktu [daf=@tD <414.fvk 101.jzo 1.ypj %164>]>]>
43 a=<1.fvg [tub=[p=[p=@ud q=@ud] q=""] <1.khu [[les=@ mos=@] <414.fvk 101.jzo 1.ypj %164>]>]>
44 v=<414.fvk 101.jzo 1.ypj %164>
45 ]
46 >
47 a
48 ... 450 lines omitted ...
49 ]
50 >
51 ~zod/try=> (scan "abcd" |-(;~(plug prn ;~(pose (knee *tape |.(^$)) (easy ~)))))
52 [~~a "bcd"]
56***