#![allow(
unreachable_code,
unused_imports,
unused_macros,
unused_variables,
dead_code,
unused_mut
)]
#![feature(
box_patterns,
box_syntax,
drain_filter,
map_first_last,
btree_drain_filter
)]
macro_rules! set {
() => (Set::new());
($($x:expr),*) => {
vtoset(vec![$($x),*])
}
}
pub mod bset;
pub mod def;
pub mod expr;
pub mod ops;
pub mod re;
pub use bset::*;
pub use def::*;
pub use def::*;
pub use expr::*;
pub use ops::*;
pub fn vtoset<T: Ord>(v: Vec<T>) -> Set<T> {
v.into_iter().collect()
}
pub fn parse(src: &str) -> Re {
re::ReParser::new().parse(&mut 0, src).unwrap()
}
fn arg(n: usize) -> String {
std::env::args()
.collect::<Vec<_>>()
.get(n)
.cloned()
.unwrap_or_default()
}
#[test]
fn test() {
eprintln!("{:?}", parse("123"));
eprintln!("{:?}", parse("a|b"));
eprintln!("{:?}", parse("^a|b$"));
}