File: AutomatonSearchIterLong.h

package info (click to toggle)
python-pyahocorasick 1.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 748 kB
  • sloc: ansic: 4,554; python: 2,823; sh: 312; makefile: 242
file content (43 lines) | stat: -rw-r--r-- 1,242 bytes parent folder | download | duplicates (2)
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
34
35
36
37
38
39
40
41
42
43
/*
    This is part of pyahocorasick Python module.
    
    AutomatonSearchIterLong const, struct & methods declarations.
    This class implements iterator walk over Aho-Corasick
    automaton. Object of this class is returnd by 'iter' method
    of Automaton class.

    Author    : Wojciech Muła, wojciech_mula@poczta.onet.pl
    License   : 3-clauses BSD (see LICENSE)
*/
#ifndef ahocorasick_AutomatonSearchIterLong_h_included
#define ahocorasick_AutomatonSearchIterLong_h_included

#include "common.h"
#include "Automaton.h"

typedef struct AutomatonSearchIterLong {
    PyObject_HEAD

    Automaton*  automaton;
    int         version;    ///< automaton version
    PyObject*   object;     ///< unicode or buffer
    struct Input input;     ///< input string
    TrieNode*   state;      ///< current state of automaton
    TrieNode*   last_node;  ///< last node on trie path
    int         last_index;
    
    int         index;      ///< current index in data
    int         shift;      ///< shift + index => output index
    int         end;        ///< end index
} AutomatonSearchIterLong;


static PyObject*
automaton_search_iter_long_new(
    Automaton* automaton,
    PyObject* object,
    int start,
    int end
);

#endif