File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,17 @@ compiled to bytecode).
218218 @code`patt` cannot match more than @code`window-patt`; it will
219219 see end-of-input at the end of the substring matched by
220220 @code`window-patt`. If @code`patt` also succeeds, @code`sub` will
221- advance to the end of what @code`window-patt` matched. }}}
221+ advance to the end of what @code`window-patt` matched. }}
222+
223+ @tr{@td{@code`(split separator-patt patt)` }
224+ @td{ Split the remaining input by @code`separator-patt`, and execute
225+ @code`patt` on each substring. @code`patt` will execute with its
226+ input constrained to the next instance of @code`separator-patt`,
227+ as if narrowed by @code`(sub (to separator-patt) ...)`.
228+ @code`split` will continue to match separators and patterns until
229+ it reaches the end of the input; if you don't want to match to the
230+ end of the input you should first narrow it with
231+ @code`(sub ... (split ...))`. }}}
222232
223233PEGs try to match an input text with a pattern in a greedy manner. This means
224234that if a rule fails to match, that rule will fail and not try again. The only
You can’t perform that action at this time.
0 commit comments