summaryrefslogtreecommitdiff
path: root/Cython/Plex/Machines.pxd
diff options
context:
space:
mode:
Diffstat (limited to 'Cython/Plex/Machines.pxd')
-rw-r--r--Cython/Plex/Machines.pxd33
1 files changed, 33 insertions, 0 deletions
diff --git a/Cython/Plex/Machines.pxd b/Cython/Plex/Machines.pxd
new file mode 100644
index 000000000..13b43a234
--- /dev/null
+++ b/Cython/Plex/Machines.pxd
@@ -0,0 +1,33 @@
+cimport cython
+
+from .Actions cimport Action
+from .Transitions cimport TransitionMap
+
+cdef int 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 int 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