Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasseglare committed Nov 9, 2017
1 parent ecc56b7 commit a198825
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/fsa/tokenizer.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(ns fsa.tokenizer)
(ns fsa.tokenizer
(:require [fsa.core :as fsa]))

(defn remove-eol-comment [s]
(let [i (.indexOf s "//")]
Expand All @@ -11,3 +12,11 @@
str
(map remove-eol-comment
(clojure.string/split-lines x))))

(def graphviz-state
{::fsa/current :idle
::fsa/table {:idle (fsa/dispatch)}})


; (fsa/parse graphviz-state "digraph kattskit {}")

3 changes: 2 additions & 1 deletion test/fsa/tokenizer-test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

(deftest graphviz-test
(let [s (remove-eol-comments "asdf // kattskit\n d")]
(is (= s "asdf d"))))
(is (= s "asdf d"))
(fsa/state? graphviz-state)))

0 comments on commit a198825

Please sign in to comment.