diff options
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 |