summaryrefslogtreecommitdiff
path: root/sa-extract/sym.pxd
diff options
context:
space:
mode:
authorChris Dyer <prguest11@taipan.cs>2012-02-02 06:29:50 +0000
committerChris Dyer <prguest11@taipan.cs>2012-02-02 06:29:50 +0000
commit8e5fad9bcbadf36bbab3c1c5b053e3c8f7dddbce (patch)
tree9c812b3f267aa1975cdf8b7af928c4b20eb36f93 /sa-extract/sym.pxd
parentff496d3089e84846c8562c574155d8df1e4d911c (diff)
lopez suffix array extractor with copyrighted david chiang code excised
Diffstat (limited to 'sa-extract/sym.pxd')
-rw-r--r--sa-extract/sym.pxd17
1 files changed, 17 insertions, 0 deletions
diff --git a/sa-extract/sym.pxd b/sa-extract/sym.pxd
new file mode 100644
index 00000000..d0650f46
--- /dev/null
+++ b/sa-extract/sym.pxd
@@ -0,0 +1,17 @@
+cimport cstrmap
+
+cdef class Alphabet:
+ cdef readonly cstrmap.StringMap terminals, nonterminals
+ cdef int first_nonterminal, last_nonterminal
+ cdef int isvar(self, int sym)
+ cdef int isword(self, int sym)
+ cdef int getindex(self, int sym)
+ cdef int setindex(self, int sym, int ind)
+ cdef int clearindex(self, int sym)
+ cdef int match(self, int sym1, int sym2)
+ cdef char* tocat(self, int sym)
+ cdef int fromcat(self, char *s)
+ cdef char* tostring(self, int sym)
+ cdef int fromstring(self, char *s, int terminal)
+
+