changeset 31:66f167c2286c

remove unnecessary files.
author Ryoma SHINYA <shinya@firefly.cr.ie.u-ryukyu.ac.jp>
date Fri, 09 Jul 2010 22:53:41 +0900
parents ef2928cdbdb6
children 8d5ab8036fac
files test/test_DFARuntime.py test/test_NFA2DFA.py
diffstat 2 files changed, 0 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/test/test_DFARuntime.py	Fri Jul 09 22:51:30 2010 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-from dfareg import *
-
-# -*- coding: utf-8 -*-
-
-def transition(stat, char):
-    if stat == 1 and char == 'a': return 2
-    if stat == 2 and char == 'b': return 3
-    return 0
-
-dfa = DeterministicFiniteAutomaton(
-    transition,
-    1,
-    frozenset([3]),
-    )
-
-for str in (u'ab', u'ba'):
-    runtime = dfa.getRuntime()
-    if runtime.doesAccept(str):
-        print u"%s is accepted" % str
-    else:
-        print u"%s is not accepted" % str
--- a/test/test_NFA2DFA.py	Fri Jul 09 22:51:30 2010 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-from dfareg import *
-
-def transition(state, char):
-    if state == 0 and char == u"a": return frozenset([1, 2])
-    if state == 1 and char == u"b": return frozenset([2])
-    if state == 2 and char == u"" : return frozenset([0])
-    return frozenset([])
-
-nfa = NondeterministicFiniteAutomaton(
-    transition,
-    0,
-    frozenset([2])
-    )
-
-class Token(object):
-    CHARACTER = 0
-    OPE_UNION = 1
-    OPE_STAR  = 2
-    LPAREN    = 3
-    RPAREN    = 4
-    EOF       = 5
-
-# Convert NFA into DFA
-
-def nfa2dfa(nfa):
-    def transition(set_, alpha):
-        ret = set()
-        for elem in set_:
-            ret |= nfa.transition(elem, alpha)
-        return nfa.epsilonExpand(frozenset(ret))
-    return DeterministicFiniteAutomaton(
-        transition,
-        nfa.epsilonExpand(frozenset([nfa.start])),
-        NondeterministicFiniteAutomaton(nfa.accepts)
-        )
-