summaryrefslogtreecommitdiff
path: root/Cython/Plex/Machines.pxd
blob: 8f785a07cf7cf4d37e7a06c510a6a5c76f3a026b (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
31
32
33
cimport cython

from .Actions cimport Action
from .Transitions cimport TransitionMap

cdef long maxint


@cython.final
cdef class Machine:
    cdef readonly list states
    cdef readonly dict  initial_states
    cdef readonly Py_ssize_t next_state_number

    cpdef new_state(self)
    cpdef new_initial_state(self, name)


@cython.final
cdef class Node:
    cdef readonly TransitionMap transitions
    cdef readonly Action action
    cdef public dict epsilon_closure
    cdef readonly Py_ssize_t number
    cdef readonly long action_priority


@cython.final
cdef class FastMachine:
    cdef readonly dict initial_states
    cdef readonly dict new_state_template
    cdef readonly list states
    cdef readonly Py_ssize_t next_number