source: other-projects/rsyntax-textarea/devel-packages/jflex-1.4.3/src/JFlex/CharClassInterval.java@ 25584

Last change on this file since 25584 was 25584, checked in by davidb, 12 years ago

Initial cut an a text edit area for GLI that supports color syntax highlighting

File size: 2.8 KB
Line 
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * JFlex 1.4.3 *
3 * Copyright (C) 1998-2009 Gerwin Klein <[email protected]> *
4 * All rights reserved. *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License. See the file *
8 * COPYRIGHT for more information. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License along *
16 * with this program; if not, write to the Free Software Foundation, Inc., *
17 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
18 * *
19 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
20
21package JFlex;
22
23/**
24 * Stores an interval of characters together with the character class
25 *
26 * A character belongs to an interval, if its Unicode value is greater than or equal
27 * to the Unicode value of <CODE>start</code> and smaller than or euqal to the Unicode
28 * value of <CODE>end</code>.
29 *
30 * All characters of the interval must belong to the same character class.
31 *
32 * @author Gerwin Klein
33 * @version JFlex 1.4.3, $Revision: 433 $, $Date: 2009-01-31 19:52:34 +1100 (Sat, 31 Jan 2009) $
34 */
35public class CharClassInterval {
36
37 /**
38 * The first character of the interval
39 */
40 int start;
41
42 /**
43 * The last character of the interval
44 */
45 int end;
46
47 /**
48 * The code of the class all characters of this interval belong to.
49 */
50 int charClass;
51
52
53 /**
54 * Creates a new CharClassInterval from <CODE>start</code> to <CODE>end</code>
55 * that belongs to character class <CODE>charClass</code>.
56 *
57 * @param start The first character of the interval
58 * @param end The last character of the interval
59 * @param charClass The code of the class all characters of this interval belong to.
60 */
61 public CharClassInterval(int start, int end, int charClass) {
62 this.start = start;
63 this.end = end;
64 this.charClass = charClass;
65 }
66
67 /**
68 * returns string representation of this class interval
69 */
70 public String toString() {
71 return "["+start+"-"+end+"="+charClass+"]";
72 }
73}
Note: See TracBrowser for help on using the repository browser.