jsim2010 / rec Goto Github PK
View Code? Open in Web Editor NEWRegular Expression Constructor - the recreational version of regular expressions
License: MIT License
Regular Expression Constructor - the recreational version of regular expressions
License: MIT License
Blocked by stabilization of str concatenation as const
example: '.' | Class::Digit
Blocked by stabilization of Span::join()
Blocked by #84
Also check out snafu
Adds a non-zero digit i.e. 1-9
Ex: Ch::range(start, end)
would become Ch::Range(start..=end)
.
This potentially would allow certain items to be const.
Blocked by stabilization of str concatenation as const
This must update the version in src/lib.rs prior to running cargo readme
Ex: Ch(0x0d)
let pattern = Pattern::new(user_str.parse::<Rec>()?);
Will also need to update documentation to highlight correct usage of functionality.
Appears regex does not allow {,x}
repetition. Will need to use {0,x}
.
use [[:xdigit:]]
Example: "a" + ("b" | "c") + "d"
becomes ab|cd
instead of a(b|c)d
Could be useful for matching patterns as they are typed.
More investigation is needed.
range(min, max) both values inclusive
Currently grouping occurs when the alternation is applied. This results in regexes with just the alternation, ex: "aa" | "bb"
, being grouped, i.e. (?:aa|bb)
, even though the grouping is not needed, aa|bb
. Ideally, this grouping only applies if it is necessary, ex: ("aa" | "bb") + "c"
= (?:aa|bb)c
.
Atom | Element -> Ch
where Element.is_atom()
is true
impl** BitOr<Element> for Atom
must define an Output
type, which must be Rec
if Element.is_atom()
is false
.Element
an Atom
; ex: Convert Class::Digit | "a"
to Class::Digit | 'a'
.x | x
where x
is char
or &str
or String
impl BitOr for x
does not use types inside crateCh::AnyOf
for union of char
s and Rec::from
for the others.x * ..
where x is char
or &str
or String
impl Mul<RangeFull> for x
does not use types inside craterpt
to generate a RepeatRange
Instead of ChCls::Digit.rpt(SOME)
, could use SOME(ChCls::Digit).
Question how would this work with defined quantifiers? Ex: {1,3}
Thus Ch::Range(char::from(32), char::from(45))
would become Ch::Range(32, 45)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.