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