Copyright | (c) 2019-2022 Yann Herklotz |
---|---|
License | GPL-3 |
Maintainer | yann [at] yannherklotz [dot] com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Verismith.Verilog.Parser
Contents
Description
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 ann)
- parseVerilogFile :: Text -> IO (Verilog ann)
- parseSourceInfoFile :: Text -> Text -> IO (SourceInfo ann)
- parseEvent :: Parser Event
- parseStatement :: Parser (Statement ann)
- parseModItem :: Parser (ModItem ann)
- parseModDecl :: Parser (ModDecl ann)
- type Parser = Parsec [Token] ()
Parser
Arguments
:: Text | Name of parsed object. |
-> Text | Content to be parsed. |
-> Either Text (Verilog ann) | 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 ann) Source #
Internal parsers
parseEvent :: Parser Event Source #
parseStatement :: Parser (Statement ann) Source #
parseModItem :: Parser (ModItem ann) Source #
parseModDecl :: Parser (ModDecl ann) Source #