Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bmillare committed May 19, 2012
1 parent bbd1b52 commit d4621c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -12,14 +12,14 @@ it, this would be a good opportunity to check it out.

A quick example:

(require [dj.peg :as peg])
`(require [dj.peg :as peg])

(let [num (peg/alter-result (peg/token #"\d+") #(Integer/parseInt %))
whitespace (peg/token #"\s+")
triplet (peg/seq num whitespace num whitespace num)]
(peg/parse triplet "3 44 2theremaininginput"))

;;user=> [[3 " " 44 " " 2] "theremaininginput"]
;;user=> [[3 " " 44 " " 2] "theremaininginput"] `

# Author

Expand Down

0 comments on commit d4621c9

Please sign in to comment.