diff options
author | Yann Herklotz Grave <git@yannherklotzgrave.com> | 2019-02-17 00:51:45 +0000 |
---|---|---|
committer | Yann Herklotz Grave <git@yannherklotzgrave.com> | 2019-02-17 00:51:45 +0000 |
commit | 08b2b306ae1accfa0b84dc3d327ba54add10a284 (patch) | |
tree | df35370c314d266314cd684c893782d7b0537c17 /src/VeriFuzz/Parser.hs | |
parent | 75a909badfa5396204d31243d94a2db614a2a024 (diff) | |
download | verismith-08b2b306ae1accfa0b84dc3d327ba54add10a284.tar.gz verismith-08b2b306ae1accfa0b84dc3d327ba54add10a284.zip |
Add Parser to Main.hs
Diffstat (limited to 'src/VeriFuzz/Parser.hs')
-rw-r--r-- | src/VeriFuzz/Parser.hs | 6 |
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 |