Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Stub evan2hs

  • Loading branch information...
commit 81cc254954112f1a7e51f9d1bf320380c51746d5 1 parent 406087f
@bytbox authored
Showing with 22 additions and 1 deletion.
  1. +1 −1  .gitignore
  2. +3 −0  tools/evan2hs/Makefile
  3. +18 −0 tools/evan2hs/evan2hs.hs
View
2  .gitignore
@@ -2,7 +2,7 @@
__pycache__
*.o
*.hi
-json2hs/json2hs
+evan2hs/evan2hs
dist
lib/evan
bin
View
3  tools/evan2hs/Makefile
@@ -0,0 +1,3 @@
+all:
+ ghc --make evan2hs
+
View
18 tools/evan2hs/evan2hs.hs
@@ -0,0 +1,18 @@
+module Main where
+
+import Text.ParserCombinators.Parsec
+
+skip p = p >> return ()
+
+comment = skip $ char '['
+
+tokEach = skip $ string "each"
+
+statement = tokEach <|> comment
+
+parser = statement
+
+parseFile f c = runParser parser () f c
+
+main = putStrLn . show . parseFile "<stdin>" =<< getContents
+

0 comments on commit 81cc254

Please sign in to comment.
Something went wrong with that request. Please try again.