AnchorType.java revision 1088:7e62d98d4625
1/*
2 * Permission is hereby granted, free of charge, to any person obtaining a copy of
3 * this software and associated documentation files (the "Software"), to deal in
4 * the Software without restriction, including without limitation the rights to
5 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
6 * of the Software, and to permit persons to whom the Software is furnished to do
7 * so, subject to the following conditions:
8 *
9 * The above copyright notice and this permission notice shall be included in all
10 * copies or substantial portions of the Software.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18 * SOFTWARE.
19 */
20package jdk.nashorn.internal.runtime.regexp.joni.constants;
21
22@SuppressWarnings("javadoc")
23public interface AnchorType {
24    final int BEGIN_BUF         = (1<<0);
25    final int BEGIN_LINE        = (1<<1);
26    final int BEGIN_POSITION    = (1<<2);
27    final int END_BUF           = (1<<3);
28    final int SEMI_END_BUF      = (1<<4);
29    final int END_LINE          = (1<<5);
30
31    final int WORD_BOUND        = (1<<6);
32    final int NOT_WORD_BOUND    = (1<<7);
33    final int WORD_BEGIN        = (1<<8);
34    final int WORD_END          = (1<<9);
35    final int PREC_READ         = (1<<10);
36    final int PREC_READ_NOT     = (1<<11);
37    final int LOOK_BEHIND       = (1<<12);
38    final int LOOK_BEHIND_NOT   = (1<<13);
39
40    final int ANYCHAR_STAR      = (1<<14);   /* ".*" optimize info */
41    final int ANYCHAR_STAR_ML   = (1<<15);   /* ".*" optimize info (multi-line) */
42
43    final int ANYCHAR_STAR_MASK = (ANYCHAR_STAR | ANYCHAR_STAR_ML);
44    final int END_BUF_MASK      = (END_BUF | SEMI_END_BUF);
45
46    final int ALLOWED_IN_LB =     ( LOOK_BEHIND |
47                                    BEGIN_LINE |
48                                    END_LINE |
49                                    BEGIN_BUF |
50                                    BEGIN_POSITION );
51
52    final int ALLOWED_IN_LB_NOT = ( LOOK_BEHIND |
53                                    LOOK_BEHIND_NOT |
54                                    BEGIN_LINE |
55                                    END_LINE |
56                                    BEGIN_BUF |
57                                    BEGIN_POSITION );
58
59}
60