aboutsummaryrefslogtreecommitdiffstats
path: root/src/VeriFuzz/Parser.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/VeriFuzz/Parser.hs')
-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