286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 1999-2002,2004,2005 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * This class represents a character class such as [a-z] or a period. 286N/A //System.err.println("Token#addRange(): "+start+" "+end); 286N/A //System.err.println("Do sorting: "+this.ranges.length); 286N/A // Why? -- In many cases, 286N/A // this.ranges has few elements. 286N/A for (
int j =
0; j <= i; j +=
2) {
286N/A * this.ranges is sorted. 286N/A //System.err.println("Token#substractRanges(): Entry: "+this.ranges.length+", "+tok.ranges.length); 286N/A // Reuse src(=right res) 286N/A // this.ranges is sorted and compacted. 286N/A * @param tok Ignore whether it is NRANGE or not. 286N/A // src2: o------------o 286N/A // src2: o------------o 286N/A // Reuse the rest of src1 286N/A // Reuse the rest of src1 286N/A // this.ranges is sorted and compacted. 286N/A * for RANGE: Creates complement. 286N/A * for NRANGE: Creates the same meaning RANGE. 286N/A map[j/
32] |=
1<<(j&
0x1f);
// s&0x1f : 0-31 286N/A //for (int i = 0; i < asize; i ++) System.err.println("Map: "+Integer.toString(this.map[i], 16)); 286N/A case '[':
case ']':
case '-':
case '^':
286N/A //case 0x0b: ret = "\\v"; break;