Rule language now working cleanly with no errors showing. Very occasional

null pointer exception during parsing, not yet diagnosed.
This commit is contained in:
Simon Brooke 2014-07-20 15:15:12 +01:00
parent a61ace1694
commit 91310af2d8
4 changed files with 27 additions and 27 deletions

View file

@ -30,22 +30,10 @@
"Compile each non-comment line of this `string` into an executable anonymous
function, and return the sequence of such functions."
[string]
(map #(compile-rule % true) (remove comment? (split string #"\n"))))
(map #(compile-rule % true) (remove comment? (trim (split string #"\n")))))
(defn compile-file
"Compile each non-comment line of the file indicated by this `filename` into
an executable anonymous function, and return the sequence of such functions."
[filename]
(compile-string (slurp filename)))
;; (let [lines
;; (doall (with-open [rdr (reader filename)] (line-seq rdr)))]
;; (map parse-line lines)))
;;(defn parse-string
;; "Parse rules from successive lines in this `string`"
;; [string]
;; (parse-from-reader (BufferedReader. (StringReader. string))))

View file

@ -118,7 +118,7 @@
([tokens expect-int]
(or
(parse-disjunct-value tokens expect-int)
(parse-simple-value tokens)))
(parse-simple-value tokens expect-int)))
([tokens]
(parse-value tokens false)))