From f8475d5530f6a5eac747bbc1167bc1fd6c134f0c Mon Sep 17 00:00:00 2001 From: Yann Herklotz Grave Date: Mon, 11 Feb 2019 19:35:31 +0000 Subject: Add simple parser --- src/VeriFuzz/Parser.hs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/VeriFuzz/Parser.hs (limited to 'src') 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 -- cgit