summaryrefslogtreecommitdiff
path: root/src/regparse.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-05-01 09:43:15 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-05-01 09:43:15 +0200
commit031a61b81318d9df626b2a332713eb1effa997a1 (patch)
tree085e531ee4e07594d904106413989fa5fdf14be8 /src/regparse.h
parent5587db012cd0e8f69f811e8959a861112904136a (diff)
parent38848ee931202f14ff21b07de1033e6fcd17f079 (diff)
Merge branch 'release/6.8.1-1'6.8.1-1
Diffstat (limited to 'src/regparse.h')
-rw-r--r--src/regparse.h40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/regparse.h b/src/regparse.h
index 99fe7c9..3ffbea4 100644
--- a/src/regparse.h
+++ b/src/regparse.h
@@ -4,7 +4,7 @@
regparse.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2017 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2018 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -51,8 +51,12 @@ enum GimmickType {
GIMMICK_KEEP = 1,
GIMMICK_SAVE = 2,
GIMMICK_UPDATE_VAR = 3,
+#ifdef USE_CALLOUT
+ GIMMICK_CALLOUT = 4,
+#endif
};
+
/* node type bit */
#define NODE_TYPE2BIT(type) (1<<(type))
@@ -97,7 +101,7 @@ enum GimmickType {
(NODE_IS_FIXED_OPTION(node) ? CTYPE_(node)->options : reg->options)
-#define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML)
+#define ANCHOR_ANYCHAR_INF_MASK (ANCHOR_ANYCHAR_INF | ANCHOR_ANYCHAR_INF_ML)
#define ANCHOR_END_BUF_MASK (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)
enum EnclosureType {
@@ -129,10 +133,12 @@ enum EnclosureType {
#define BACKREFS_P(br) \
(IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static)
-#define QUANT_BODY_IS_NOT_EMPTY 0
-#define QUANT_BODY_IS_EMPTY 1
-#define QUANT_BODY_IS_EMPTY_MEM 2
-#define QUANT_BODY_IS_EMPTY_REC 3
+enum QuantBodyEmpty {
+ QUANT_BODY_IS_NOT_EMPTY = 0,
+ QUANT_BODY_IS_EMPTY = 1,
+ QUANT_BODY_IS_EMPTY_MEM = 2,
+ QUANT_BODY_IS_EMPTY_REC = 3
+};
/* node status bits */
#define NST_MIN_FIXED (1<<0)
@@ -221,13 +227,10 @@ typedef struct {
int lower;
int upper;
int greedy;
- int body_empty_info;
+ enum QuantBodyEmpty body_empty_info;
struct _Node* head_exact;
struct _Node* next_head_exact;
int is_refered; /* include called node. don't eliminate even if {0} */
-#ifdef USE_COMBINATION_EXPLOSION_CHECK
- int comb_exp_check_num; /* 1,2,3...: check, 0: no check */
-#endif
} QuantNode;
typedef struct {
@@ -330,6 +333,7 @@ typedef struct {
enum GimmickType type;
int detail_type;
+ int num;
int id;
} GimmickNode;
@@ -398,15 +402,9 @@ typedef struct {
int num_mem;
int num_named;
int mem_alloc;
- MemEnv mem_env_static[SCANENV_MEMENV_SIZE];
- MemEnv* mem_env_dynamic;
-#ifdef USE_COMBINATION_EXPLOSION_CHECK
- int num_comb_exp_check;
- int comb_exp_max_regnum;
- int curr_max_regnum;
- int has_recursion;
-#endif
- unsigned int parse_depth;
+ MemEnv mem_env_static[SCANENV_MEMENV_SIZE];
+ MemEnv* mem_env_dynamic;
+ unsigned int parse_depth;
int keep_num;
int save_num;
@@ -447,6 +445,10 @@ extern int onig_free_shared_cclass_table P_((void));
extern int onig_is_code_in_cc P_((OnigEncoding enc, OnigCodePoint code, CClassNode* cc));
extern OnigLen onig_get_tiny_min_len(Node* node, unsigned int inhibit_node_types, int* invalid_node);
+#ifdef USE_CALLOUT
+extern int onig_global_callout_names_free(void);
+#endif
+
#ifdef ONIG_DEBUG
extern int onig_print_names(FILE*, regex_t*);
#endif