Debian Codegraph @

lib/grn_onigmo.h

raw symbols SCIP
1 /*
2 Copyright(C) 2018 Kouhei Sutou <[email protected]>
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 as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #pragma once
20
21 #include "grn.h"
22
23 #ifdef GRN_SUPPORT_REGEXP
24 # include <onigmo.h>
25 #endif /* GRN_SUPPORT_REGEXP */
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 #ifdef GRN_SUPPORT_REGEXP
32
33 #define GRN_ONIGMO_OPTION_DEFAULT \
34 (ONIG_OPTION_ASCII_RANGE | \
35 ONIG_OPTION_MULTILINE)
36
37 #define GRN_ONIGMO_SYNTAX_DEFAULT ONIG_SYNTAX_RUBY
38
39 bool
40 grn_onigmo_is_valid_encoding(grn_ctx *ctx);
41
42 GRN_API OnigRegex
43 grn_onigmo_new(grn_ctx *ctx,
44 const char *pattern,
45 size_t pattern_length,
46 OnigOptionType option,
47 const OnigSyntaxType *syntax,
48 const char *context);
49
50 #endif /* GRN_SUPPORT_REGEXP */
51
52 #ifdef __cplusplus
53 }
54 #endif