diff --git a/src/ludus/compile.clj b/src/ludus/compile.clj new file mode 100644 index 0000000..e3f0423 --- /dev/null +++ b/src/ludus/compile.clj @@ -0,0 +1,5 @@ +(ns ludus.compile + (:require + [ludus.grammar :as g] + [ludus.parser-new :as p] + [ludus.scanner :as s])) \ No newline at end of file diff --git a/src/ludus/parser_new.clj b/src/ludus/parser_new.clj index c36aab6..6dfc8b5 100644 --- a/src/ludus/parser_new.clj +++ b/src/ludus/parser_new.clj @@ -28,7 +28,7 @@ (defn apply-kw-parser [kw tokens] (let [token (first tokens)] - (if (= kw (:type token)) (println "Matched " kw)) + ;(if (= kw (:type token)) (println "Matched " kw)) (if (= kw (:type token)) {:status :ok :type kw @@ -39,16 +39,16 @@ (defn apply-fn-parser [parser tokens] (let [rule (:rule parser) name (:name parser) result (rule tokens)] - (if (pass? result) (println "Matched " (:name parser))) + ;(if (pass? result) (println "Matched " (:name parser))) result)) (defn apply-parser [parser tokens] - (println "Applying parser " (? (:name parser) parser)) + ;(println "Applying parser " (? (:name parser) parser)) (let [result (cond (keyword? parser) (apply-kw-parser parser tokens) (:rule parser) (apply-fn-parser parser tokens) :else (throw (Exception. "`apply-parser` requires a parser")))] - (println "Parser result " (? (:name parser) parser) (:status result)) + ;(println "Parser result " (? (:name parser) parser) (:status result)) result ))