Experimental combinators. These may get promoted, or changed, or dismissed.
These combinators are not available in the string- or data-driven grammar (yet). To use them with those, combine them in a larger grammar like so:
(require '[crustimoney.experimental.combinators :as e])
(grammar
(create-parser
"root= <- stream
expr= <- '{' [0-9]+ '}'")
{:stream (e/stream*
(e/with-callback handle-expr
(e/recover (ref :expr) (regex ".*?}")))})
Experimental combinators. These may get promoted, or changed,
or dismissed.
These combinators are not available in the string- or data-driven
grammar (yet). To use them with those, combine them in a larger
grammar like so:
(require '[crustimoney.experimental.combinators :as e])
(grammar
(create-parser
"root= <- stream
expr= <- '{' [0-9]+ '}'")
{:stream (e/stream*
(e/with-callback handle-expr
(e/recover (ref :expr) (regex ".*?}")))})This experimental reader is created for stream support.
It takes a Reader as input and implements a CharSequence, based
on an internal buffer. It will fill its buffer on demand.
Support for matching a literal substring or a regular expression
pattern has been implemented on top of this, via the MatchSupport
protocol. Part of the internal buffer can be released by a cut
operation, via the CutSupport protocol.
The MatchSupport protocol has been implemented for a normal String
as well.
This experimental reader is created for stream support. It takes a `Reader` as input and implements a `CharSequence`, based on an internal buffer. It will fill its buffer on demand. Support for matching a literal substring or a regular expression pattern has been implemented on top of this, via the `MatchSupport` protocol. Part of the internal buffer can be released by a cut operation, via the `CutSupport` protocol. The `MatchSupport` protocol has been implemented for a normal String as well.
Expiremental result constructors, accessors and predicates. These may get promoted, or changed, or dismissed.
Expiremental result constructors, accessors and predicates. These may get promoted, or changed, or dismissed.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |