mirror of
https://github.com/Noratrieb/regex.git
synced 2026-01-15 00:45:03 +01:00
21 lines
312 B
Rust
21 lines
312 B
Rust
use crate::parse::Regex;
|
|
|
|
struct Transition {
|
|
char: char,
|
|
}
|
|
|
|
struct Node {
|
|
end: bool,
|
|
transitions: Vec<Transition>,
|
|
}
|
|
|
|
struct RegexFsm {
|
|
nodes: Vec<Node>,
|
|
}
|
|
|
|
/// Compiles the parsed Regex into a FSM
|
|
fn compile(regex: Regex) -> RegexFsm {
|
|
let mut nodes = Vec::new();
|
|
|
|
RegexFsm { nodes }
|
|
}
|