summaryrefslogtreecommitdiff
path: root/Cython/Plex/DFA.pxd
blob: 226d075676b9bdc4e8de58fd2b7c1de7f167c3c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# cython: auto_pickle=False

cimport cython

from . cimport Machines
from .Transitions cimport TransitionMap


@cython.final
cdef class StateMap:
    cdef Machines.FastMachine new_machine
    cdef dict old_to_new_dict
    cdef dict new_to_old_dict

    cdef old_to_new(self, dict old_state_set)

    @cython.locals(state=Machines.Node)
    cdef highest_priority_action(self, dict state_set)

    cdef make_key(self, dict state_set)


@cython.locals(new_machine=Machines.FastMachine, transitions=TransitionMap)
cpdef nfa_to_dfa(Machines.Machine old_machine, debug=*)

cdef set_epsilon_closure(dict state_set)
cdef dict epsilon_closure(Machines.Node state)

@cython.locals(state_set_2=dict, state2=Machines.Node)
cdef add_to_epsilon_closure(dict state_set, Machines.Node state)