Skip to content

Releases: RunDevelopment/refa

0.5.0

26 Oct 17:28
Compare
Choose a tag to compare

Breaking changes

  • Remove NFA.fromDFA and NFA.fromNFA. Use {DFA,NFA}.fromFA instead.
  • Renamed NFA#removeEmptyWord to NFA#withoutEmptyWord.
  • All NFA/DFA-specific interfaces/classes now live in the NFA/DFA namespace.

Added

  • New FAIterator interface.
  • New options for #toRegex functions.
  • NFA#reverse will reverse the accepted language.
  • CharSet#commonCharacter can used to return any character two sets have in common.
  • New Words methods to pick as-readable-as-possible words or characters from a set of words or characters.

Changed

  • Unified DFA/NFA API. This gives DFA a lot of functionality that used to be NFA-exclusive.
  • JS.toLiteral will now print smaller character classes.
  • New build system.

Fixed

  • A few minor bug fixes.

0.4.1

29 Aug 14:20
Compare
Choose a tag to compare

Changed

  • NFA intersection performance optimizations by using lazy data structures. NFA#disjointWith is now a lot faster.

Fixed

  • Fixed NFA intersection always discarding the empty word. The intersection can now contain the empty word.

v0.4.0...v0.4.1

0.4.0

23 Aug 19:57
Compare
Choose a tag to compare

Breaking changes

  • Removed JS.toSource. Use JS.toLiteral instead.

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 ReadonlyDFA interface.
  • 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 toRegex functions is now optimized to be as minimal as possible.
  • JS.toLiteral will 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 toRegex functions will now the correct AST and that much faster.
  • Fixed filterMut in util.
  • toPatternString now correctly handles quantified empty concatenations.

v0.3.1...v0.4.0

0.3.1

09 Aug 10:45
Compare
Choose a tag to compare

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.

v0.3.0...v0.3.1

0.3.0

11 Jul 14:16
Compare
Choose a tag to compare

Breaking changes

  • New JS.Parser API.
  • Removed MutSimple interface.

Added

  • CharSet#size returns the number of characters in the set.
  • NFA#prefixes() will change the NFA such that it accepts all prefixes of itself.
  • New ReadonlyNFA interface.
  • New FAIterator interface 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 NoParent and NoSource interface for AST nodes.

Changed

  • Better Flags interface for JS functions.
  • Some minor improvements.

Fixed

  • The prefix and suffix optimizations of the NFA construction didn't check the equivalence of states correctly.

v0.2.2...v0.3.0

0.2.2

03 May 23:06
Compare
Choose a tag to compare

Fixed

  • Added a prepublish script to actually publish changes.

v0.2.1...v0.2.2

0.2.1

03 May 22:50
Compare
Choose a tag to compare

Fixed

  • Calling CharSet#isSubsetOf caused a stack overflow because of infinite recursion.

v0.2.0...v0.2.1

0.2.0

03 May 20:28
Compare
Choose a tag to compare

Breaking changes

  • New CharSet API. This renames some of has* methods, to instead use names based on set relations.
  • NFA#concat is now called append.
  • NodeList#final is now called finals for both DFA and NFA nodes lists.
  • NFANode#in and NFANode#out are now of type ReadonlyMap instead of Map.

Added

  • New options for NFA.fromRegex to disable assertions instead of throwing an error and to simplify quantifiers with a huge maximum.
  • New NFA#prepend method.
  • Added changelog.

Changed

  • CharSet#toString now uses a simple hexadecimal format.

Fixed

  • NFA#append modified the given NFA.

v0.1.1...v0.2.0