Enum LexerBuildError
pub enum LexerBuildError {
Uncompilable {
terminal: String,
reason: String,
},
ZeroWidth {
terminal: String,
},
UnknownIgnore {
name: String,
},
UnsupportedGlobalFlags {
flags: u32,
},
DivergentConstruct {
terminal: String,
construct: String,
at: usize,
reason: String,
pattern: String,
hint: Option<String>,
},
}Expand description
Construction-time errors, mirroring Lark’s validation,
all gated by skip_validation.
Variants§
Uncompilable
Neither engine compiles the terminal.
ZeroWidth
The terminal can match the empty string.
UnknownIgnore
%ignore names a terminal that does not exist.
UnsupportedGlobalFlags
Unsupported g_regex_flags bits (surfaced from the scanner build).
DivergentConstruct
A terminal uses a Python-re construct whose Rust-engine semantics
differ, and it was neither suppressed by flag context nor rewritten
(translation off, or an untranslatable exotic). Enable
LexerConf::translate_python_regex to rewrite the mechanical set (user
decision 2026-07-07; see [crate::py_regex]). Lark itself never raises
this — it runs on CPython re directly — so there is no Lark parity to
preserve; hyperlark refuses what it cannot match Python-exactly.
Fields
reason: StringWhy it is refused — specific to the construct, and names the dialect
(Python re, the regex module) the prefix no longer states.
Trait Implementations§
§impl Clone for LexerBuildError
impl Clone for LexerBuildError
§fn clone(&self) -> LexerBuildError
fn clone(&self) -> LexerBuildError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for LexerBuildError
impl Debug for LexerBuildError
§impl Display for LexerBuildError
impl Display for LexerBuildError
impl Eq for LexerBuildError
§impl Error for LexerBuildError
impl Error for LexerBuildError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
§impl PartialEq for LexerBuildError
impl PartialEq for LexerBuildError
impl StructuralPartialEq for LexerBuildError
Auto Trait Implementations§
impl Freeze for LexerBuildError
impl RefUnwindSafe for LexerBuildError
impl Send for LexerBuildError
impl Sync for LexerBuildError
impl Unpin for LexerBuildError
impl UnsafeUnpin for LexerBuildError
impl UnwindSafe for LexerBuildError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more