XenevaOS
Loading...
Searching...
No Matches
libregexp-opcode.h
Go to the documentation of this file.
1/*
2 * Regular Expression Engine
3 *
4 * Copyright (c) 2017-2018 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24
25#ifdef DEF
26
27DEF(invalid, 1) /* never used */
28DEF(char, 3)
29DEF(char_i, 3)
30DEF(char32, 5)
31DEF(char32_i, 5)
32DEF(dot, 1)
33DEF(any, 1) /* same as dot but match any character including line terminator */
34DEF(space, 1)
35DEF(not_space, 1) /* must come after */
36DEF(line_start, 1)
37DEF(line_start_m, 1)
38DEF(line_end, 1)
39DEF(line_end_m, 1)
40DEF(goto, 5)
41DEF(split_goto_first, 5)
42DEF(split_next_first, 5)
43DEF(match, 1)
44DEF(lookahead_match, 1)
45DEF(negative_lookahead_match, 1) /* must come after */
46DEF(save_start, 2) /* save start position */
47DEF(save_end, 2) /* save end position, must come after saved_start */
48DEF(save_reset, 3) /* reset save positions */
49DEF(loop, 6) /* decrement the top the stack and goto if != 0 */
50DEF(loop_split_goto_first, 10) /* loop and then split */
51DEF(loop_split_next_first, 10)
52DEF(loop_check_adv_split_goto_first, 10) /* loop and then check advance and split */
53DEF(loop_check_adv_split_next_first, 10)
54DEF(set_i32, 6) /* store the immediate value to a register */
55DEF(word_boundary, 1)
56DEF(word_boundary_i, 1)
57DEF(not_word_boundary, 1)
58DEF(not_word_boundary_i, 1)
59DEF(back_reference, 2) /* variable length */
60DEF(back_reference_i, 2) /* must come after */
61DEF(backward_back_reference, 2) /* must come after */
62DEF(backward_back_reference_i, 2) /* must come after */
63DEF(range, 3) /* variable length */
64DEF(range_i, 3) /* variable length */
65DEF(range32, 3) /* variable length */
66DEF(range32_i, 3) /* variable length */
67DEF(lookahead, 5)
68DEF(negative_lookahead, 5) /* must come after */
69DEF(set_char_pos, 2) /* store the character position to a register */
70DEF(check_advance, 2) /* check that the register is different from the character position */
71DEF(prev, 1) /* go to the previous char */
72
73#endif /* DEF */
#define DEF(id, size)
Definition libregexp.c:53