1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
//! ANTLR v4 grammar compiler and Rust source generator for the `dbt-antlr-runtime`
//! runtime.
//!
//! The emission layer renders recognizers from the minijinja template
//! `templates/dbt/Rust.stg.jinja` on top of the grammar analysis in `grammar`.
//! There are two ways to run a generation:
//!
//! - [`Config`]: the build-script API. Add this crate as a build dependency
//! and call it from `build.rs`; the generated code compiles against the
//! `dbt-antlr-runtime` crate. No tool installation is needed.
//! - The `dbt-antlr-codegen` binary: the Java-tool-like command line for
//! one-shot or checked-in generation.
//!
//! # Crate features
//!
//! - `generator` (default): the in-process grammar compiler and emission
//! layer. Disable it to use this crate as a thin client.
//! - `download`: enables [`Config::pinned_release`], which downloads and runs
//! a pinned prebuilt release binary instead of compiling the generator.
//! - `fancy` (default): pretty miette diagnostics for the command line.
//! - `atn-export`: internal, for this workspace's own tests.
pub
pub use ;
pub use ;
pub use OptimizationOptions;
/// Version of this generator package.
pub const VERSION: &str = env!;
/// Runs the `dbt-antlr-codegen` command using the process arguments and
/// streams.