Arc Forumnew | comments | leaders | submitlogin
4 points by sjs 5928 days ago | link | parent

I fixed a few bugs and have pushed this to the git anarki: http://git.nex-3.com/arc-wiki.git

There is now a maybe combinator (like ? in a regex) and n-times, which is like {N} or {N,M} in a regex.

e.g.

    ((maybe "x") "hi") => (t "" "hi")
    ((maybe "x") "xhi") => (t "x" "hi")
    ((n-times any-char 3) "ab") => (nil nil "ab")
    ((n-times any-char 3) "abc") => (t "abc" "")
    ((n-times any-char 3) "abcd") => (t "abc" "d")
    ((n-times any-char 3 6) "abc") => (t "abc" "")
    ((n-times any-char 3 6) "abcd") => (t "abcd" "")
    ((n-times any-char 3 6) "abcdefg") => (t "abcdef" "g")
I'm starting to work on a simple markdown grammar, but so far it's all on paper. The library is not ready for real use yet but it's getting there.