18 #include "highlight_api.h"
21 #if defined(PCRE_MAJOR) && defined(PCRE_MINOR) && PCRE_MAJOR >= 8 && PCRE_MINOR >= 20
22 #define free_pcre_study pcre_free_study
24 #define free_pcre_study pcre_free
34 #define INDEX_TYPE(name) typedef enum { FAKE_CONST_##name = -1 } name
36 #define INDEX_TYPE(name) typedef int name
38 INDEX_TYPE(pattern_idx_t);
39 INDEX_TYPE(dst_idx_t);
41 #define NO_CHANGE ((pattern_idx_t) -1)
44 #define EXIT_STATE ((pattern_idx_t) -2)
48 #define T3_HIGHLIGHT_ALLOW_EMPTY_START (1<<15)
62 char *dynamic_pattern;
63 on_entry_info_t *on_entry;
69 pattern_extra_t *extra;
70 pattern_idx_t next_state;
74 typedef VECTOR(pattern_t) patterns_t;
81 typedef VECTOR(state_t) states_t;
98 pattern_idx_t highlight_state;
99 dynamic_state_t *dynamic;
104 VECTOR(state_mapping_t) mapping;
123 int (*map_style)(
void *,
const char *);
124 void *map_style_data;
128 VECTOR(use_mapping_t) use_map;
130 } highlight_context_t;
150 T3_HIGHLIGHT_LOCAL
char *_t3_highlight_strdup(
const char *str);
151 T3_HIGHLIGHT_LOCAL
t3_bool _t3_compile_highlight(
const char *highlight, full_pcre_t *regex,
const t3_config_t *error_context,
153 T3_HIGHLIGHT_LOCAL
t3_bool _t3_check_empty_start_cycle(highlight_context_t *context);
154 T3_HIGHLIGHT_LOCAL
t3_bool _t3_check_use_cycle(highlight_context_t *context);
156 int code,
int line_number,
const char *file_name,
const char *extra,
int flags);
157 T3_HIGHLIGHT_LOCAL
void _t3_highlight_set_error_simple(
t3_highlight_error_t *error,
int code,
int flags);
An opaque struct representing a match and current state during highlighting.
Definition: internal.h:102
An opaque struct representing a highlighting pattern.
Definition: internal.h:83
char t3_bool
A boolean type that does not clash with C++ or C99 bool.
Definition: highlight_api.h:47
A struct with error information.
Definition: highlight.h:104