| 1 | // DO NOT EDIT THIS FILE. IT WAS AUTOMATICALLY GENERATED BY: |
| 2 | // |
| 3 | // regex-cli generate serialize sparse regex MULTI_PATTERN_V2 regex-automata/tests/gen/sparse/ --rustfmt --safe --starts-for-each-pattern --specialize-start-states --start-kind both --unicode-word-boundary --minimize \b[a-zA-Z]+\b (?m)^\S+$ (?Rm)^\S+$ |
| 4 | // |
| 5 | // regex-cli 0.0.1 is available on crates.io. |
| 6 | |
| 7 | use regex_automata::{ |
| 8 | dfa::{regex::Regex, sparse::DFA}, |
| 9 | util::lazy::Lazy, |
| 10 | }; |
| 11 | |
| 12 | pub static MULTI_PATTERN_V2: Lazy<Regex<DFA<&'static [u8]>>> = |
| 13 | Lazy::new(|| { |
| 14 | let dfafwd = { |
| 15 | #[cfg (target_endian = "big" )] |
| 16 | static BYTES: &'static [u8] = |
| 17 | include_bytes!("multi_pattern_v2_fwd.bigendian.dfa" ); |
| 18 | #[cfg (target_endian = "little" )] |
| 19 | static BYTES: &'static [u8] = |
| 20 | include_bytes!("multi_pattern_v2_fwd.littleendian.dfa" ); |
| 21 | DFA::from_bytes(BYTES) |
| 22 | .expect("serialized forward DFA should be valid" ) |
| 23 | .0 |
| 24 | }; |
| 25 | let dfarev = { |
| 26 | #[cfg (target_endian = "big" )] |
| 27 | static BYTES: &'static [u8] = |
| 28 | include_bytes!("multi_pattern_v2_rev.bigendian.dfa" ); |
| 29 | #[cfg (target_endian = "little" )] |
| 30 | static BYTES: &'static [u8] = |
| 31 | include_bytes!("multi_pattern_v2_rev.littleendian.dfa" ); |
| 32 | DFA::from_bytes(BYTES) |
| 33 | .expect("serialized reverse DFA should be valid" ) |
| 34 | .0 |
| 35 | }; |
| 36 | Regex::builder().build_from_dfas(dfafwd, dfarev) |
| 37 | }); |
| 38 | |