aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYann Herklotz Grave <git@yannherklotzgrave.com>2019-02-11 19:35:31 +0000
committerYann Herklotz Grave <git@yannherklotzgrave.com>2019-02-11 19:35:31 +0000
commitf8475d5530f6a5eac747bbc1167bc1fd6c134f0c (patch)
treeec1816d42b2bd0789491331c56eaa02c466f28e3 /src
parent5a8261323483f9028ec0e2998ffdf7e8ded1d599 (diff)
downloadverismith-f8475d5530f6a5eac747bbc1167bc1fd6c134f0c.tar.gz
verismith-f8475d5530f6a5eac747bbc1167bc1fd6c134f0c.zip
Add simple parser
Diffstat (limited to 'src')
-rw-r--r--src/VeriFuzz/Parser.hs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/VeriFuzz/Parser.hs b/src/VeriFuzz/Parser.hs
new file mode 100644
index 0000000..494e0c0
--- /dev/null
+++ b/src/VeriFuzz/Parser.hs
@@ -0,0 +1,25 @@
+{-|
+Module : VeriFuzz.Parser
+Description : Minimal Verilog parser to reconstruct the AST.
+Copyright : (c) 2019, Yann Herklotz Grave
+License : GPL-3
+Maintainer : ymherklotz [at] gmail [dot] com
+Stability : experimental
+Portability : POSIX
+
+Minimal Verilog parser to reconstruct the AST. This parser does not support the
+whole Verilog syntax, as the AST does not support it either.
+-}
+
+module VeriFuzz.Parser where
+
+import Data.Attoparsec.Text
+import Data.Text (Text)
+import qualified Data.Text as T
+import VeriFuzz.AST
+
+parseDescription :: Text -> Parser Description
+parseDescription = undefined
+
+parseVerilogSrc :: Text -> Parser VerilogSrc
+parseVerilogSrc = VerilogSrc <$> many1 parseDescription