Rule language now working cleanly with no errors showing. Very occasional
null pointer exception during parsing, not yet diagnosed.
This commit is contained in:
parent
a61ace1694
commit
91310af2d8
4 changed files with 27 additions and 27 deletions
|
|
@ -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))))
|
||||
|
|
@ -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)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue