Debian Codegraph @

lib/grn_token_cursor.h

raw symbols SCIP
1 /*
2 Copyright(C) 2009-2016 Brazil
3 Copyright(C) 2018-2021 Sutou Kouhei <[email protected]>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #pragma once
21
22 #include "grn_ctx.h"
23 #include "grn_token.h"
24 #include "grn_tokenizer.h"
25 #include "grn_db.h"
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 struct _grn_token_cursor {
32 bool initialized;
33 grn_obj *table;
34 grn_obj original_buffer;
35 const unsigned char *orig;
36 const unsigned char *curr;
37 uint32_t orig_blen;
38 uint32_t curr_size;
39 int32_t pos;
40 grn_tokenize_mode mode;
41 grn_token_cursor_status status;
42 grn_obj_flags table_flags;
43 grn_encoding encoding;
44 uint32_t flags;
45 struct {
46 grn_obj *object;
47 grn_proc_ctx pctx;
48 grn_tokenizer_query query;
49 grn_id query_domain;
50 grn_obj casted_query;
51 void *user_data;
52 grn_token current_token;
53 grn_token next_token;
54 grn_token original_token;
55 } tokenizer;
56 struct {
57 grn_obj *objects;
58 void **data;
59 } token_filter;
60 struct {
61 grn_token_cursor_status status;
62 grn_token *token;
63 } pending;
64 };
65
66 #ifdef __cplusplus
67 }
68 #endif