metrale_grammar/support/
mod.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2
3//! 2026-09-26: Support code for the grammar crate: UTF-8, Latin-1 and hex decoding
4//! (`encoding`), escape handling for grammar literals (`escape`), union and intersection
5//! of sorted integer sets (`int_set`), the CSR `Compact2DArray`, `UnionFindSet`, and
6//! hash-combine helpers (`hash`).
7//!
8//! Owner: grammar.
9//! Invariants: none beyond the types.
10
11pub mod compact_2d_array;
12pub mod encoding;
13pub mod escape;
14pub mod hash;
15pub mod int_set;
16pub mod union_find;
17
18pub use compact_2d_array::Compact2DArray;
19pub use encoding::{
20    TCodepoint, byte_to_latin1, char_handling_error, char_to_utf8, handle_utf8_first_byte,
21    hex_char_to_int, latin1_to_bytes, parse_next_utf8, parse_utf8,
22};
23pub use escape::{
24    parse_next_escaped, parse_next_utf8_or_escaped, print_as_escaped, print_byte_as_escaped,
25    print_str_as_escaped, unescape_string,
26};
27pub use hash::{hash_combine, hash_combine_binary};
28pub use int_set::{intset_intersection, intset_union};
29pub use union_find::UnionFindSet;