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(char32, 5)
30DEF(dot, 1)
31DEF(any, 1) /* same as dot but match any character including line terminator */
32DEF(line_start, 1)
33DEF(line_end, 1)
34DEF(goto, 5)
35DEF(split_goto_first, 5)
36DEF(split_next_first, 5)
37DEF(match, 1)
38DEF(save_start, 2) /* save start position */
39DEF(save_end, 2) /* save end position, must come after saved_start */
40DEF(save_reset, 3) /* reset save positions */
41DEF(loop, 5) /* decrement the top the stack and goto if != 0 */
42DEF(push_i32, 5) /* push integer on the stack */
43DEF(drop, 1)
44DEF(word_boundary, 1)
45DEF(not_word_boundary, 1)
46DEF(back_reference, 2)
47DEF(backward_back_reference, 2) /* must come after back_reference */
48DEF(range, 3) /* variable length */
49DEF(range32, 3) /* variable length */
50DEF(lookahead, 5)
51DEF(negative_lookahead, 5)
52DEF(push_char_pos, 1) /* push the character position on the stack */
53DEF(check_advance, 1) /* pop one stack element and check that it is different from the character position */
54DEF(prev, 1) /* go to the previous char */
55DEF(simple_greedy_quant, 17)
56
57#endif /* DEF */
58