Permalink
Browse files

Stub evan2hs

  • Loading branch information...
1 parent 406087f commit 81cc254954112f1a7e51f9d1bf320380c51746d5 @bytbox committed Mar 28, 2012
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,7 +2,7 @@
__pycache__
*.o
*.hi
-json2hs/json2hs
+evan2hs/evan2hs
dist
lib/evan
bin
View
@@ -0,0 +1,3 @@
+all:
+ ghc --make evan2hs
+
View
@@ -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.