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