Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
token.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 2 -*- */
2 /* Copyright(C) 2009 Brazil
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License version 2.1 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Lesser General Public License for more details.
12 
13  You should have received a copy of the GNU Lesser General Public
14  License along with this library; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 #ifndef GRN_TOKEN_H
18 #define GRN_TOKEN_H
19 
20 #ifndef GROONGA_IN_H
21 #include "groonga_in.h"
22 #endif /* GROONGA_IN_H */
23 
24 #ifndef GRN_CTX_H
25 #include "ctx.h"
26 #endif /* GRN_CTX_H */
27 
28 #ifndef GRN_DB_H
29 #include "db.h"
30 #endif /* GRN_DB_H */
31 
32 #ifndef GRN_STR_H
33 #include "str.h"
34 #endif /* GRN_STR_H */
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 typedef enum {
45 
46 typedef enum {
51 
52 typedef struct {
54  const unsigned char *orig;
55  const unsigned char *curr;
56  uint32_t orig_blen;
57  uint32_t curr_size;
58  int32_t pos;
61  uint8_t force_prefix;
66  uint32_t variant;
68 } grn_token;
69 
71 
73 grn_rc grn_token_fin(void);
74 
75 #define GRN_TOKEN_ENABLE_TOKENIZED_DELIMITER (0x01L<<0)
76 
77 GRN_API grn_token *grn_token_open(grn_ctx *ctx, grn_obj *table, const char *str,
78  size_t str_len, grn_token_mode mode,
79  unsigned int flags);
80 
83 
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif /* GRN_TOKEN_H */