2019-03-18 10:00:23 +01:00
|
|
|
{- sv2v
|
|
|
|
|
- Author: Zachary Snow <zach@zachjs.com>
|
|
|
|
|
-}
|
2019-02-08 06:19:39 +01:00
|
|
|
module Language.SystemVerilog.Parser
|
2019-04-04 02:24:09 +02:00
|
|
|
( parseFile
|
|
|
|
|
) where
|
2019-02-08 05:49:12 +01:00
|
|
|
|
2019-04-04 02:24:09 +02:00
|
|
|
import Language.SystemVerilog.AST (AST)
|
|
|
|
|
import Language.SystemVerilog.Parser.Lex (lexFile)
|
|
|
|
|
import Language.SystemVerilog.Parser.Parse (parse)
|
2019-02-08 05:49:12 +01:00
|
|
|
|
2019-04-04 02:24:09 +02:00
|
|
|
-- parses a file given include search paths, a table of predefined macros, and
|
|
|
|
|
-- the file path
|
2019-03-29 00:55:53 +01:00
|
|
|
parseFile :: [String] -> [(String, String)] -> FilePath -> IO AST
|
2019-04-04 02:24:09 +02:00
|
|
|
parseFile includePaths defines path =
|
|
|
|
|
lexFile includePaths defines path >>= return . parse
|