Releases: RunDevelopment/refa
Releases · RunDevelopment/refa
0.5.0
Breaking changes
- Remove
NFA.fromDFAandNFA.fromNFA. Use{DFA,NFA}.fromFAinstead. - Renamed
NFA#removeEmptyWordtoNFA#withoutEmptyWord. - All
NFA/DFA-specific interfaces/classes now live in theNFA/DFAnamespace.
Added
- New
FAIteratorinterface. - New options for
#toRegexfunctions. NFA#reversewill reverse the accepted language.CharSet#commonCharactercan used to return any character two sets have in common.- New
Wordsmethods to pick as-readable-as-possible words or characters from a set of words or characters.
Changed
- Unified
DFA/NFAAPI. This givesDFAa lot of functionality that used to beNFA-exclusive. JS.toLiteralwill now print smaller character classes.- New build system.
Fixed
- A few minor bug fixes.
0.4.1
Changed
- NFA intersection performance optimizations by using lazy data structures.
NFA#disjointWithis now a lot faster.
Fixed
- Fixed NFA intersection always discarding the empty word. The intersection can now contain the empty word.
0.4.0
Breaking changes
- Removed
JS.toSource. UseJS.toLiteralinstead.
Added
NFA#suffixes()will change the NFA to accepts all suffixes of its language.- New options for intersection operations.
- Added a method to count the number of nodes in DFA and NFA.
DFA#complement()will make the DFA match the opposite language.- New options for the DFA creation operation.
- New
ReadonlyDFAinterface. - New
ReadonlyCharMap<T>interface. CharSet#compare(CharSet)will compare two character sets. This can be used to sort character sets.- Added regex stress test. This will check common operations on all 2.5K regexes of the PrismJS syntax highlighter.
Changed
- The RE produced by the
toRegexfunctions is now optimized to be as minimal as possible. JS.toLiteralwill now make efficient use of flags to produce smaller literals.
Fixed
- Fixed and improved
DFA.minimize(). - Fixed
CharMap's AVL tree implementation. - Underlying implementation of the
toRegexfunctions will now the correct AST and that much faster. - Fixed
filterMutin util. toPatternStringnow correctly handles quantified empty concatenations.
0.3.1
Fixed
- The prefix and suffix optimization removed final states from the graph but not from the set of final states.
- The intersection algorithm can now handle final states not reachable from the initial states of either NFAs.
0.3.0
Breaking changes
- New
JS.ParserAPI. - Removed
MutSimpleinterface.
Added
CharSet#sizereturns the number of characters in the set.NFA#prefixes()will change the NFA such that it accepts all prefixes of itself.- New
ReadonlyNFAinterface. - New
FAIteratorinterface as an abstraction over different FA representations. This is now the basis for virtually all FA operations that don't change the underlying data structure. - New
NoParentandNoSourceinterface for AST nodes.
Changed
- Better
Flagsinterface for JS functions. - Some minor improvements.
Fixed
- The prefix and suffix optimizations of the NFA construction didn't check the equivalence of states correctly.
0.2.2
0.2.1
Fixed
- Calling
CharSet#isSubsetOfcaused a stack overflow because of infinite recursion.
0.2.0
Breaking changes
- New
CharSetAPI. This renames some ofhas*methods, to instead use names based on set relations. NFA#concatis now calledappend.NodeList#finalis now calledfinalsfor both DFA and NFA nodes lists.NFANode#inandNFANode#outare now of typeReadonlyMapinstead ofMap.
Added
- New options for
NFA.fromRegexto disable assertions instead of throwing an error and to simplify quantifiers with a huge maximum. - New
NFA#prependmethod. - Added changelog.
Changed
CharSet#toStringnow uses a simple hexadecimal format.
Fixed
NFA#appendmodified the given NFA.