2 tre-parse.c - Regexp parser definitions
4 This software is released under a BSD-style license.
5 See the file LICENSE for details and copyright.
12 #include "xlocale_private.h"
16 /* Memory allocator. The AST is allocated using this. */
18 /* Stack used for keeping track of regexp syntax. */
20 /* The parse result. */
21 tre_ast_node_t
*result
;
22 /* The regexp to parse and its length. */
24 /* The first character of the entire regexp. */
25 const tre_char_t
*re_start
;
26 /* The first character after the end of the regexp. */
27 const tre_char_t
*re_end
;
28 /* The current locale */
31 /* Current submatch ID. */
33 /* Current invisible submatch ID. */
34 int submatch_id_invisible
;
35 /* Current position (number of literal). */
37 /* The highest back reference or -1 if none seen so far. */
39 /* Number of tags that need reordering. */
41 /* This flag is set if the regexp uses approximate matching. */
43 /* Compilation flags. */
45 /* If this flag is set the top-level submatch is not captured. */
47 /* The currently set approximate matching parameters. */
48 int params
[TRE_PARAM_LAST
];
51 /* Parses a wide character regexp pattern into a syntax tree. This parser
52 handles both syntaxes (BRE and ERE), including the TRE extensions. */
54 tre_parse(tre_parse_ctx_t
*ctx
);
56 #endif /* TRE_PARSE_H */