open_vaf/
lib.rs

1//  * ******************************************************************************************
2//  * Copyright (c) 2019 Pascal Kuthe. This file is part of the OpenVAF project.
3//  * It is subject to the license terms in the LICENSE file found in the top-level directory
4//  *  of this distribution and at  https://gitlab.com/DSPOM/OpenVAF/blob/master/LICENSE.
5//  *  No part of OpenVAF, including this file, may be copied, modified, propagated, or
6//  *  distributed except according to the terms contained in the LICENSE file.
7//  * *******************************************************************************************
8//! A frontend for Verilog AMS that returns an Tree based IR as its end result
9//!
10//! ```
11//! # use bumpalo::Bump;
12//! # use std::path::Path;
13//! let source_map_allocator = Bump::new();
14//!  let source_map = ast
15//!     .parse_from_and_print_errors(Path::new("<File>"), &source_map_allocator, true)?;
16//!  let hir = ast
17//!     .lower_and_print_errors(source_map, true)?;
18//!  let mir = hir
19//!     .lower_and_print_errors(source_map, true)?;
20//! ```
21//!  
22//!
23//!
24
25#![allow(clippy::module_name_repetitions,clippy::unreadable_literal,clippy::unseparated_literal_suffix,clippy::pub_enum_variant_names)]
26
27#[macro_use]
28extern crate bitflags;
29#[macro_use]
30extern crate intrusive_collections;
31#[macro_use]
32extern crate lazy_static;
33extern crate std;
34
35pub use bumpalo;
36
37pub use ahash;
38pub use rustc_hash;
39
40#[doc(inline)]
41pub use ir::ast;
42#[doc(hidden)]
43pub use ir::ast::Ast;
44#[doc(inline)]
45pub use ir::cfg;
46#[doc(hidden)]
47pub use ir::cfg::ControlFlowGraph;
48#[doc(inline)]
49pub use ir::hir;
50#[doc(hidden)]
51pub use ir::hir::Hir;
52#[doc(inline)]
53pub use ir::mir;
54#[doc(hidden)]
55pub use parser::lexer::Lexer;
56#[doc(hidden)]
57pub use parser::preprocessor::Preprocessor;
58#[doc(inline)]
59pub use parser::preprocessor::SourceMap;
60#[doc(hidden)]
61pub(crate) use parser::Parser;
62#[doc(inline)]
63pub use span::Span;
64
65pub mod symbol;
66#[macro_use]
67pub mod util;
68#[macro_use]
69pub mod ir;
70pub mod analysis;
71pub mod ast_lowering;
72pub mod data_structures;
73mod error;
74mod hir_lowering;
75mod literals;
76pub mod parser;
77mod span;
78pub mod symbol_table;
79
80pub use literals::StringLiteral;