     :deprecated-meta [open-deprecated-meta :expr :expr]
     :unquote-splicing [open-unquote-splicing :expr]
     :unquote [open-unquote :expr]
-    :string (unspaced open-string #"(?:\\.|[^\\\"])++(?=\")" :? \")
-    :regex  (unspaced open-regex #"(?:\\.|[^\\\"])++(?=\")" :? \")
+    :string (p/unspaced open-string #"(?:\\.|[^\\\"])++(?=\")" :? \")
+    :regex  (p/unspaced open-regex #"(?:\\.|[^\\\"])++(?=\")" :? \")
     :symbol
       #"(?:[\-\+](?![0-9])[^\^\(\[\#\{\\\"\~\%\:\,\s\;\'\@\`\)\]\}]*)|(?:[^\^\(\[\#\{\\\"\~\%\:\,\s\;\'\@\`\)\]\}\-\+;0-9][^\^\(\[\#\{\\\"\~\%\:\,\s\;\'\@\`\)\]\}]*|#(?![\{\(\'\^\"\_\!])[^\^\(\[\#\{\\\"\~\%\:\,\s\;\'\@\`\)\]\}]*)#?"
-    :keyword (unspaced open-keyword #"[^\(\[\{\'\^\@\`\~\"\\\,\s\;\)\]\}]*"); factorize with symbol
+    :keyword (p/unspaced open-keyword #"[^\(\[\{\'\^\@\`\~\"\\\,\s\;\)\]\}]*"); factorize with symbol
     :int #"(?:[-+]?(?:0(?!\.)|[1-9][0-9]*+(?!\.)|0[xX][0-9A-Fa-f]+(?!\.)|0[0-7]+(?!\.)|[1-9][0-9]?[rR][0-9A-Za-z]+(?!\.)|0[0-9]+(?!\.))(?!/))"
     :ratio #"[-+]?[0-9]+/[0-9]*"
     :float #"[-+]?[0-9]+\.[0-9]*+(?:[eE][-+]?+[0-9]+)?+M?"
-    :anon-arg (unspaced open-anon-arg #"(?:[0-9|\&])?+")
-    :char (unspaced open-char #"(?:newline|space|tab|backspace|formfeed|return|u[0-9|a-f|A-F]{4}|o[0-3]?+[0-7]{1,2}|.)")
+    :anon-arg (p/unspaced open-anon-arg #"(?:[0-9|\&])?+")
+    :char (p/unspaced open-char #"(?:newline|space|tab|backspace|formfeed|return|u[0-9|a-f|A-F]{4}|o[0-3]?+[0-7]{1,2}|.)")
     :whitespace whitespace
-    :comment (unspaced open-comment #"[^\n]*")
+    :comment (p/unspaced open-comment #"[^\n]*")
     :discard [open-discard :expr]
     ))
 
+(defn edit-buffer [buffer offset len text]
+  (let [text (or text "")]
+    (if (= [0 -1] [offset len])
+      (p/edit (p/incremental-buffer sexp) 0 0 text)
+      (p/edit (or buffer (p/incremental-buffer sexp)) offset len text))))
+
+(defn buffer-parse-tree [buffer]
+  (p/parse-tree buffer))
+
 (defn parse
   ([^String text]
-    (sexp text))
+    (p/parse-tree (edit-buffer nil 0 -1 text)))
   ([^String text offset]
-    (sexp text)))
+    (throw (RuntimeException. "deprecated arity")) #_(sexp text)))
 
 (defn parse-tree
   [state]

                [open-discard #{"]" "}" ")" eof}]
                [open-unquote-splicing #{"]" "}" ")" eof}]
                [open-unquote #{"]" "}" ")" eof}]
                (unspaced open-char eof)
                }
    :vector [open-vector :expr* "]"]
    :map [open-map :expr* "}"]

    open-unquote open-anon-arg open-keyword open-discard whitespace open-comment
    open-char})
(def sexp
  (p/parser {:root-tag :root
           :main :expr*
           :space (p/unspaced gspaces :*)}
    :expr- #{
             :list
             :vector
