summaryrefslogtreecommitdiff
path: root/sa-extract/sym.pxd
blob: d0650f460452db4b7f506bd5c9fd66911f909aca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)