aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYann Herklotz Grave <git@yannherklotzgrave.com>2019-02-17 00:51:45 +0000
committerYann Herklotz Grave <git@yannherklotzgrave.com>2019-02-17 00:51:45 +0000
commit08b2b306ae1accfa0b84dc3d327ba54add10a284 (patch)
treedf35370c314d266314cd684c893782d7b0537c17 /src
parent75a909badfa5396204d31243d94a2db614a2a024 (diff)
downloadverismith-08b2b306ae1accfa0b84dc3d327ba54add10a284.tar.gz
verismith-08b2b306ae1accfa0b84dc3d327ba54add10a284.zip
Add Parser to Main.hs
Diffstat (limited to 'src')
-rw-r--r--src/VeriFuzz/Parser.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/VeriFuzz/Parser.hs b/src/VeriFuzz/Parser.hs
index b4831d1..fa44202 100644
--- a/src/VeriFuzz/Parser.hs
+++ b/src/VeriFuzz/Parser.hs
@@ -13,7 +13,8 @@ whole Verilog syntax, as the AST does not support it either.
module VeriFuzz.Parser
( -- * Parsers
- parseVerilogSrc
+ parseVerilog
+ , parseVerilogSrc
, parseDescription
, parseModDecl
, parseContAssign
@@ -212,3 +213,6 @@ parseDescription = Description <$> lexeme parseModDecl
parseVerilogSrc :: Parser VerilogSrc
parseVerilogSrc = VerilogSrc <$> (whiteSpace *> (many parseDescription))
+
+parseVerilog :: String -> String -> Either ParseError VerilogSrc
+parseVerilog f s = parse parseVerilogSrc f s