Skip to content

Commit

Permalink
unicode/fsm: delete all of the old DFAs
Browse files Browse the repository at this point in the history
These DFAs were generated for regex-automata 0.1 by ucd-generate. We're
going to start completely fresh with regex-automata 0.3 using regex-cli.

This also lets us drop the once_cell dependency, since we'll plan to use
regex-automata's `Lazy` type for loading DFAs.
  • Loading branch information
BurntSushi committed Jul 5, 2023
1 parent b3cab19 commit 88a12ae
Show file tree
Hide file tree
Showing 27 changed files with 1 addition and 352 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ bench = false
default = ["std", "unicode"]
std = ["alloc", "memchr/std", "serde?/std"]
alloc = ["serde?/alloc"]
unicode = ["dep:once_cell", "dep:regex-automata"]
unicode = ["dep:regex-automata"]
serde = ["dep:serde"]

[dependencies]
memchr = { version = "2.4.0", default-features = false }
once_cell = { version = "1.14.0", optional = true }
regex-automata = { version = "0.1.5", default-features = false, optional = true }
serde = { version = "1.0.85", default-features = false, optional = true }

Expand Down
14 changes: 0 additions & 14 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,20 +394,6 @@ and Unicode support.
#![cfg_attr(not(any(feature = "std", test)), no_std)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

// Why do we do this? Well, in order for us to use once_cell's 'Lazy' type to
// load DFAs, it requires enabling its 'std' feature. Yet, there is really
// nothing about our 'unicode' feature that requires 'std'. We could declare
// that 'unicode = [std, ...]', which would be fine, but once regex-automata
// 0.3 is a thing, I believe we can drop once_cell altogether and thus drop
// the need for 'std' to be enabled when 'unicode' is enabled. But if we make
// 'unicode' also enable 'std', then it would be a breaking change to remove
// 'std' from that list.
//
// So, for right now, we force folks to explicitly say they want 'std' if they
// want 'unicode'. In the future, we should be able to relax this.
#[cfg(all(feature = "unicode", not(feature = "std")))]
compile_error!("enabling 'unicode' requires enabling 'std'");

#[cfg(feature = "alloc")]
extern crate alloc;

Expand Down
Binary file removed src/unicode/fsm/grapheme_break_fwd.bigendian.dfa
Binary file not shown.
Binary file removed src/unicode/fsm/grapheme_break_fwd.littleendian.dfa
Binary file not shown.
41 changes: 0 additions & 41 deletions src/unicode/fsm/grapheme_break_fwd.rs

This file was deleted.

Binary file removed src/unicode/fsm/grapheme_break_rev.bigendian.dfa
Binary file not shown.
Binary file not shown.
41 changes: 0 additions & 41 deletions src/unicode/fsm/grapheme_break_rev.rs

This file was deleted.

8 changes: 0 additions & 8 deletions src/unicode/fsm/mod.rs

This file was deleted.

Binary file removed src/unicode/fsm/regional_indicator_rev.bigendian.dfa
Binary file not shown.
Binary file removed src/unicode/fsm/regional_indicator_rev.littleendian.dfa
Binary file not shown.
41 changes: 0 additions & 41 deletions src/unicode/fsm/regional_indicator_rev.rs

This file was deleted.

Binary file removed src/unicode/fsm/sentence_break_fwd.bigendian.dfa
Binary file not shown.
Binary file removed src/unicode/fsm/sentence_break_fwd.littleendian.dfa
Binary file not shown.
41 changes: 0 additions & 41 deletions src/unicode/fsm/sentence_break_fwd.rs

This file was deleted.

Binary file removed src/unicode/fsm/simple_word_fwd.bigendian.dfa
Binary file not shown.
Binary file removed src/unicode/fsm/simple_word_fwd.littleendian.dfa
Binary file not shown.
41 changes: 0 additions & 41 deletions src/unicode/fsm/simple_word_fwd.rs

This file was deleted.

Binary file removed src/unicode/fsm/whitespace_anchored_fwd.bigendian.dfa
Binary file not shown.
Binary file not shown.
41 changes: 0 additions & 41 deletions src/unicode/fsm/whitespace_anchored_fwd.rs

This file was deleted.

Binary file removed src/unicode/fsm/whitespace_anchored_rev.bigendian.dfa
Binary file not shown.
Binary file not shown.
41 changes: 0 additions & 41 deletions src/unicode/fsm/whitespace_anchored_rev.rs

This file was deleted.

Binary file removed src/unicode/fsm/word_break_fwd.bigendian.dfa
Binary file not shown.
Binary file removed src/unicode/fsm/word_break_fwd.littleendian.dfa
Binary file not shown.
41 changes: 0 additions & 41 deletions src/unicode/fsm/word_break_fwd.rs

This file was deleted.

0 comments on commit 88a12ae

Please sign in to comment.