NodeType.java revision 953:221a84ef44c0
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 22public interface NodeType { 23 /* node type */ 24 final int STR = 0; 25 final int CCLASS = 1; 26 final int CTYPE = 2; 27 final int CANY = 3; 28 final int BREF = 4; 29 final int QTFR = 5; 30 final int ENCLOSE = 6; 31 final int ANCHOR = 7; 32 final int LIST = 8; 33 final int ALT = 9; 34 final int CALL = 10; 35 36 final int BIT_STR = 1 << STR; 37 final int BIT_CCLASS = 1 << CCLASS; 38 final int BIT_CTYPE = 1 << CTYPE; 39 final int BIT_CANY = 1 << CANY; 40 final int BIT_BREF = 1 << BREF; 41 final int BIT_QTFR = 1 << QTFR; 42 final int BIT_ENCLOSE = 1 << ENCLOSE; 43 final int BIT_ANCHOR = 1 << ANCHOR; 44 final int BIT_LIST = 1 << LIST; 45 final int BIT_ALT = 1 << ALT; 46 final int BIT_CALL = 1 << CALL; 47 48 /* allowed node types in look-behind */ 49 final int ALLOWED_IN_LB = ( BIT_LIST | 50 BIT_ALT | 51 BIT_STR | 52 BIT_CCLASS | 53 BIT_CTYPE | 54 BIT_CANY | 55 BIT_ANCHOR | 56 BIT_ENCLOSE | 57 BIT_QTFR | 58 BIT_CALL ); 59 60 final int SIMPLE = ( BIT_STR | 61 BIT_CCLASS | 62 BIT_CTYPE | 63 BIT_CANY | 64 BIT_BREF); 65 66} 67