1import cython 2 3from Cython.Plex.Actions cimport Action 4 5cdef class Scanner: 6 7 cdef public lexicon 8 cdef public stream 9 cdef public name 10 cdef public unicode buffer 11 cdef public Py_ssize_t buf_start_pos 12 cdef public Py_ssize_t next_pos 13 cdef public Py_ssize_t cur_pos 14 cdef public Py_ssize_t cur_line 15 cdef public Py_ssize_t cur_line_start 16 cdef public Py_ssize_t start_pos 17 cdef public Py_ssize_t start_line 18 cdef public Py_ssize_t start_col 19 cdef public text 20 cdef public initial_state # int? 21 cdef public state_name 22 cdef public list queue 23 cdef public bint trace 24 cdef public cur_char 25 cdef public int input_state 26 27 cdef public level 28 29 @cython.locals(input_state=long) 30 cdef next_char(self) 31 @cython.locals(action=Action) 32 cdef tuple read(self) 33 cdef tuple scan_a_token(self) 34 cdef tuple position(self) 35 36 @cython.locals(cur_pos=long, cur_line=long, cur_line_start=long, 37 input_state=long, next_pos=long, state=dict, 38 buf_start_pos=long, buf_len=long, buf_index=long, 39 trace=bint, discard=long, data=unicode, buffer=unicode) 40 cdef run_machine_inlined(self) 41 42 cdef begin(self, state) 43 cdef produce(self, value, text = *) 44