diff options
author | Yann Herklotz Grave <git@yannherklotzgrave.com> | 2019-02-25 19:59:19 +0000 |
---|---|---|
committer | Yann Herklotz Grave <git@yannherklotzgrave.com> | 2019-02-25 19:59:19 +0000 |
commit | 6daba5fb5523f49ef9965df009a5c276d2d34ccc (patch) | |
tree | 74c535de151cfff92a08a7473d0d553ca65cf026 /src/VeriFuzz/Parser.hs | |
parent | 79f7d262ed0246ea6556478c611c0db59bb47191 (diff) | |
download | verismith-6daba5fb5523f49ef9965df009a5c276d2d34ccc.tar.gz verismith-6daba5fb5523f49ef9965df009a5c276d2d34ccc.zip |
Add recursive reduce call
Diffstat (limited to 'src/VeriFuzz/Parser.hs')
-rw-r--r-- | src/VeriFuzz/Parser.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/VeriFuzz/Parser.hs b/src/VeriFuzz/Parser.hs index 23329bb..596867c 100644 --- a/src/VeriFuzz/Parser.hs +++ b/src/VeriFuzz/Parser.hs @@ -225,8 +225,12 @@ parseModDecl = do parseDescription :: Parser Description parseDescription = Description <$> lexeme parseModDecl +-- | Parses a 'String' into 'VerilogSrc' by skipping any beginning whitespace +-- and then parsing multiple Verilog source. parseVerilogSrc :: Parser VerilogSrc parseVerilogSrc = VerilogSrc <$> (whiteSpace *> many parseDescription) +-- | Parse a 'String' containing verilog code. The parser currently only supports +-- the subset of Verilog that is being generated randomly. parseVerilog :: String -> String -> Either ParseError VerilogSrc parseVerilog = parse parseVerilogSrc |