Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions benches/benches/char_stream.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
//! Character-stream benchmarks.
//!
//! Every generated lexer walks an [`InputStream`] one code point at a time, so
Expand Down
2 changes: 2 additions & 0 deletions benches/benches/grammar_frontend.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
//! End-to-end benchmarks for the `ANTLRv4` grammar frontend.
//!
//! Parsing a `.g4` source drives the whole runtime stack in one call: the
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/artifact.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet, btree_map::Entry};
use std::fs;
use std::io;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/bin/antlr4-rust-gen.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
fn main() -> miette::Result<()> {
antlr_rust_codegen::run_cli()
}
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/bin/antlr4-rust-testrig.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
fn main() -> miette::Result<std::process::ExitCode> {
antlr_rust_codegen::run_testrig_cli()
}
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/builder.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeSet;
use std::path::{Path, PathBuf};

Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::io::{self, IsTerminal as _, Write as _};
use std::path::PathBuf;
use std::time::Duration;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/cli_report.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::error::Error as StdError;
use std::fmt;
use std::fs;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeSet;
use std::path::PathBuf;

Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/driver.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use crate::config::CompilerConfig;
use crate::generator::prelude::*;
use crate::lexer::{LexerRenderModel, render_lexer_model};
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/embedded/antlr4rust/aliases.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use super::{Range, RustDelimiterMap, RustLexeme, RustLexemeKind, RustReplacement, io};

pub(crate) fn recog_input_replacement(
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/embedded/antlr4rust/macros.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use super::{
BTreeSet, Cow, FormatMacroCaptures, Range, RustDelimiterMap, RustLexeme, RustLexemeKind,
RustReplacement, io, is_turbofish_open, is_unqualified_identifier, lex_rust_body, lexeme_text,
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/embedded/antlr4rust/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
mod aliases;
mod macros;
mod scopes;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/embedded/antlr4rust/scopes.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use super::*;

impl AliasBindingScopes {
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/embedded/members.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use super::{
ANTLR4RUST_INPUT_FACADE, Antlr4RustSourceKind, BTreeSet, MemberField, MemberItem, MembersModel,
Range, RustDelimiterMap, RustLexeme, RustLexemeKind, SourceId, io, lex_rust_body, lexeme_text,
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/embedded/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
//! Embedded-action grammar model and `$`-attribute translator.
//!
//! In embedded mode the generator receives a grammar whose actions and
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/embedded/model.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use super::*;

/// One `name: type` attribute declared in a rule's `[...]` args clause or
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/embedded/translate.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use super::*;

/// Context for translating one action/predicate body.
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::fmt;
use std::io;
use std::ops::Range;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/generator/tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
#![allow(clippy::disallowed_methods)] // `insta` assertion macros unwrap internal I/O.
use super::*;
use antlr4_runtime::atn::parser_atn::{ParserAtnBuilder, ParserTransitionSpec};
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/action.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub(crate) struct ActionReference<'a> {
pub(crate) kind: ActionReferenceKind<'a>,
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/atn/analysis.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet};

use antlr4_runtime::atn::AtnStateKind;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/atn/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeMap;

use antlr4_runtime::atn::AtnStateKind;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/atn/general_bug_test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet, VecDeque};
use std::fmt::Write as _;
use std::path::{Path, PathBuf};
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/atn/interp_test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeMap;
use std::fmt::Write;

Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/atn/lexer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet};

use antlr4_runtime::atn::lexer_dfa::CompiledLexerDfa;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/atn/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
mod analysis;
mod build;
#[cfg(test)]
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/atn/optimize.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeSet;

use antlr4_runtime::atn::AtnStateKind;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/atn/parser.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeMap;

use antlr4_runtime::atn::AtnStateKind;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/char_support.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use antlr4_runtime::atn::IntervalSet;

use super::unicode::simple_uppercase;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/compiler.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeMap;

use super::action::{ActionReferenceParser, action_references};
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/diagnostic.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::fmt;
use std::path::PathBuf;

Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/escape_sequence.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use antlr4_runtime::atn::IntervalSet;

use super::unicode::property_ranges;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/integration.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet};

use super::char_support::get_char_value_from_grammar_char_literal;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/left_recursion.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeSet;

use super::diagnostic::Diagnostic;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/loader.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet};
use std::fs;
use std::path::{Path, PathBuf};
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
pub(crate) mod action;
pub(crate) mod atn;
mod char_support;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/model.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeMap;

use super::frontend::{SourceId, SourceSpan, SyntaxId};
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/mutual_recursion.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
//! Mutual (indirect) left-recursion elimination — issue #151.
//!
//! ANTLR 4 rewrites *direct* left recursion (`e : e '+' e | INT`) into a
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/provenance.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeMap;

use super::frontend::{SourceSpan, SyntaxId};
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/rule_reachability.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet};

use petgraph::algo::tarjan_scc;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/semantics.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet};
use std::fs;

Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/semantics/attributes.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet};

use crate::grammar::diagnostic::Diagnostic;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/semantics/bindings.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeMap;

use crate::grammar::action::{ActionReference, ActionReferenceKind, ActionReferenceParser};
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/source.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeMap;
use std::path::{Path, PathBuf};
use std::rc::Rc;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/syntax.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use super::char_support::get_string_from_grammar_string_literal;
use super::frontend::{Cst, SourceFile, SourceSpan, SyntaxId, SyntaxNodeKind, SyntaxToken};
use super::generated::antlr_v4_parser as p;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/transform/analysis.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet};

use petgraph::algo::tarjan_scc;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/transform/artifact.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::borrow::Cow;
use std::collections::BTreeMap;

Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/transform/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
pub(crate) mod analysis;
pub(crate) mod artifact;
mod registry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::{BTreeMap, BTreeSet};

#[cfg(test)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeSet;

use crate::grammar::diagnostic::Diagnostic;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/transform/registry.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use super::analysis::TransformAnalysis;
use super::{
GrammarTransform, TransformContext, TransformGrammar, TransformReport, TransformReportEntry,
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/unicode.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::HashMap;
use std::hash::{DefaultHasher, Hash, Hasher};
use std::sync::{Mutex, OnceLock, PoisonError};
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/unicode_escape.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub(super) enum UnicodeEscapeStyle {
Utf16CodeUnits,
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/unicode_icu_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use super::{property_ranges, simple_lowercase, simple_uppercase};
use std::collections::BTreeMap;
use std::fmt::Write;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/grammar/validation.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeSet;

use super::diagnostic::Diagnostic;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/json.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use serde::Serialize;

pub(crate) fn to_pretty_json<T: Serialize>(value: &T) -> String {
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/lexer/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use crate::generator::prelude::*;
use crate::semantics::{
ActionTemplate, CoordinateDispose, PredicateTemplate, SemPatternFile, SemUnknownPolicy,
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/lexer/render.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
/// Renders a Rust lexer module that delegates token recognition to the shared
/// ATN interpreter.
///
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/lexer/render_model.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
/// Complete, immutable input to lexer Rust emission.
///
/// Constructing this value before calling the renderer keeps CLI/configuration
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
//! ANTLR v4 grammar compiler and Rust source generator.

mod artifact;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/optimization/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeSet;

use crate::config::CompilerConfig;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/optimization/descriptor.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use crate::grammar::transform::SafetyClass;
use crate::grammar::transform::passes::precedence_ladder::CollapsePrecedenceLadders;
use crate::grammar::transform::passes::prune_unreachable::PruneUnreachableRules;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/optimization/metrics.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use crate::grammar::model::{Block, ElementKind, GrammarUnit};

/// Deterministic structural counts captured around an optimization pass.
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/optimization/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
mod config;
mod descriptor;
pub(crate) mod metrics;
Expand Down
2 changes: 2 additions & 0 deletions crates/antlr-rust-codegen/src/optimization/report.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Konstantin Vyatkin
use std::collections::BTreeSet;

use crate::grammar::compiler::Compilation;
Expand Down
Loading
Loading