Created
January 15, 2014 18:22
-
-
Save robknight/8441515 to your computer and use it in GitHub Desktop.
Calling test-parser results in out of memory error. Reducing the number of elements in the string does get it to work.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns parser.testing | |
(:require [instaparse.core :as insta])) | |
(def textparse | |
(insta/parser | |
"S = (Content)* | |
Content = (ContentLine)* | |
ContentLine = (Word | Whitespace)+ LineEnd? | |
<Word> = #'\\S+' | |
<Whitespace> = #'\\s*' | |
LineEnd = '\\n'" | |
)) | |
(defn test-parser [] | |
(textparse "1 2 3 4 5 6 7 8 9 0")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment