chompy/
lib.rs

1//! chompy provides a series of utilities used to create parsers. This crate is primarily developed
2//! to assist with the specific needs of my own projects but aspires to be robust enough to serve
3//! any user interested in creating a parser quickly.
4
5#![warn(missing_docs)]
6#![warn(clippy::dbg_macro)]
7#![warn(clippy::print_stdout)]
8#![warn(clippy::map_unwrap_or)]
9#![warn(clippy::similar_names)]
10#![warn(clippy::todo)]
11#![warn(clippy::unimplemented)]
12#![warn(clippy::undocumented_unsafe_blocks)]
13#![allow(clippy::module_inception)]
14
15/// Tools for creating tokens and lexers.
16pub mod lex {
17    mod char_stream;
18    mod errors;
19    mod lex;
20    mod tok;
21    pub use char_stream::*;
22    pub use errors::*;
23    pub use lex::*;
24    pub use tok::*;
25}
26
27/// Tools for creating parsers.
28pub mod parse {
29    mod errors;
30    mod parse;
31    pub use errors::*;
32    pub use parse::*;
33}
34
35/// Common utilities shared across the different elements of chompy.
36pub mod utils {
37    mod files;
38    mod location;
39    pub use files::*;
40    pub use location::*;
41}
42
43/// Handles the creation and management of user-driven errors with chompy.
44pub mod diagnostics {
45    mod diag;
46    mod macros;
47    mod utils;
48    pub use diag::*;
49    pub use utils::*;
50}
51
52#[cfg(test)]
53mod tests {
54    mod lex;
55    mod utils;
56}