Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Oct 15, 2018
1 parent 5b949ad commit c6ca932
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,13 +633,19 @@ def test_dfa(self):

from regexy.process.match import dfa

pattern = '(?:lm|(?:g|l|m)|(?:i*(?:(?:o*p+q*|o*np*q*|o*kq*|o+|q+)|(?:(?:c|b)h*d|j(?:e|bh*d?))|aa?|(?:o|p|q|n|k|c|d|e|b|r))?)?(?:f|h|j)*)'
#pattern = '(?:kj|(?:e|j|k)|(?:d|f|h)*(?:(?:(?:o*n+m*|o*n*lm*|o*im*|m+|o+)|(?:(?:chf*)+c)|bb?|(?:m|n|o|l|i|c|p))?g*)?)'
#pattern = '(0|1)*1(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)'
#dfa(regexy.compile(pattern))


#dfa(regexy.compile('(bc|b)'))
#dfa(regexy.compile('a(f|g)b(f|g)'))
#dfa(regexy.compile('(?:h|h)*'))
#dfa(regexy.compile('(?:hi|h)*'))
#dfa(regexy.compile('(?:ab|c*(?:d|e)(?:f|g)*)'))
#dfa(regexy.compile('a*'))
#dfa(regexy.compile('(?:rf*|r)'))

# proof of NFA of O(n) states -> DFA of O(2^n) states
#pattern = '(0|1)*1(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)'
#dfa(regexy.compile(pattern))

0 comments on commit c6ca932

Please sign in to comment.