Copyright | (c) 2019 Yann Herklotz |
---|---|
License | GPL-3 |
Maintainer | yann [at] yannherklotz [dot] com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Minimal Verilog parser to reconstruct the AST. This parser does not support the whole Verilog syntax, as the AST does not support it either.
Synopsis
- parseVerilog :: Text -> Text -> Either Text Verilog
- parseVerilogFile :: Text -> IO Verilog
- parseSourceInfoFile :: Text -> Text -> IO SourceInfo
- parseEvent :: Parser Event
- parseStatement :: Parser Statement
- parseModItem :: Parser ModItem
- parseModDecl :: Parser ModDecl
- type Parser = Parsec [Token] ()
Parser
:: Text | Name of parsed object. |
-> Text | Content to be parsed. |
-> Either Text Verilog | Returns |
Parse a String
containing verilog code. The parser currently only supports
the subset of Verilog that is being generated randomly.
parseSourceInfoFile :: Text -> Text -> IO SourceInfo Source #
Internal parsers
parseEvent :: Parser Event Source #