antlr_rust_codegen/
lib.rs1mod artifact;
4mod builder;
5mod cli;
6mod config;
7mod driver;
8pub(crate) mod embedded;
9mod error;
10#[path = "pipeline.rs"]
11mod generator;
12#[allow(dead_code)]
13pub(crate) mod grammar;
14mod lexer;
15mod optimization;
16mod parser;
17mod rust_output;
18mod semantics;
19mod structural;
20
21pub use artifact::Generation;
22pub use builder::{ActionMode, Builder, UnknownSemanticPolicy};
23pub use error::{Diagnostic, Error, ErrorKind, Severity};
24
25pub const VERSION: &str = env!("CARGO_PKG_VERSION");
27
28pub const CODEGEN_API: u32 = antlr4_runtime::__ANTLR4_RUST_CODEGEN_API;
30
31#[cfg(test)]
32pub(crate) use generator::ParserCodegenData;
33#[cfg(test)]
34pub(crate) use parser::render_parser;
35#[cfg(test)]
36pub(crate) use rust_output::rust_string;
37#[cfg(test)]
38pub(crate) use semantics::collect_structural_grammar_options;
39#[cfg(test)]
40pub(crate) use structural::{structural_embedded_model, structural_predicates};
41
42#[doc(hidden)]
47pub fn run_cli() -> Result<(), Box<dyn std::error::Error>> {
48 cli::run_cli()
49}