Skip to content

Commit

Permalink
add find-lilac; alpha release
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenYong committed Jun 29, 2020
1 parent ff704f4 commit 56d4b89
Show file tree
Hide file tree
Showing 5 changed files with 253 additions and 5 deletions.
10 changes: 8 additions & 2 deletions README.md
Expand Up @@ -11,14 +11,14 @@ Try with `(def a (add 1 2))` or `{"json": [1, 2]}`.
[![Clojars Project](https://img.shields.io/clojars/v/mvc-works/lilac-parser.svg)](https://clojars.org/mvc-works/lilac-parser)

```edn
[mvc-works/lilac-parser "0.0.3-a3"]
[mvc-works/lilac-parser "0.0.3-a4"]
```

```clojure
(require '[lilac-parser.core :refer
[parse-lilac defparser is+ many+ one-of+ other-than+
some+ combine+ interleave+ label+
replace-lilac]])
replace-lilac find-lilac]])

(parse-lilac (string/split "aaaa" "") (many+ (is+ "a")))
```
Expand Down Expand Up @@ -173,6 +173,12 @@ which returns `:result` as well as parsing details in `:attempts`:

This is an experimental API serving jobs as a custom regular expression replacer.

Similarly matched pieces can be collected with `find-lilac`:

```clojure
(find-lilac (string/split content "") rule)
```

### Workflow

Workflow https://github.com/mvc-works/calcit-workflow
Expand Down

0 comments on commit 56d4b89

Please sign in to comment.