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
57
58
59
60
61
62
63
64
65
66
//! Recursive descent parser for phonetic regular expressions.
//!
//! This parser implements the grammar defined in the AST module,
//! supporting both standard regex constructs and phonetic rewrite rules.
//!
//! The parser is split along the char/byte duality:
//! - [`char`] holds the Unicode [`Parser`] with full feature support
//! (capturing groups, scoped flags, group references).
//! - [`byte`] holds the leaner ASCII [`ParserByte`].
//! - [`common`] holds shared helpers and the public [`SymbolTable`]
//! re-export.
//!
//! # Grammar
//!
//! ```text
//! regex ::= alternation
//! alternation ::= concatenation ('|' concatenation)*
//! concatenation ::= quantified+
//! quantified ::= primary quantifier?
//! quantifier ::= '*' | '+' | '?' | '{' number '}' | '{' number ',' number? '}'
//! primary ::= '(' regex ')' | char_class | literal | '.' | '#'
//! char_class ::= '[' '^'? (char | char '-' char)+ ']'
//!
//! rewrite_rule ::= pattern '->' replacement context? weight?
//! context ::= '/' left_context? '_' right_context?
//! weight ::= '[' float ']'
//! ```
pub use ParserByte;
pub use charParser;
pub use ;
use crate;
use crateParseResult;
/// Parse a regex pattern string.
/// Parse a rewrite rule string.
/// Parse multiple rewrite rules.
/// Parse a byte-level regex pattern.
/// Parse a byte-level rewrite rule.