01: /*
02: * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved.
03: * http://www.jaspersoft.com.
04: *
05: * Unless you have purchased a commercial license agreement from JasperSoft,
06: * the following license terms apply:
07: *
08: * This program is free software; you can redistribute it and/or modify
09: * it under the terms of the GNU General Public License version 2 as published by
10: * the Free Software Foundation.
11: *
12: * This program is distributed WITHOUT ANY WARRANTY; and without the
13: * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14: * See the GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
18: * or write to:
19: *
20: * Free Software Foundation, Inc.,
21: * 59 Temple Place - Suite 330,
22: * Boston, MA USA 02111-1307
23: *
24: *
25: *
26: *
27: * IDLTokenMarker.java
28: *
29: */
30:
31: package org.syntax.jedit.tokenmarker;
32:
33: import org.syntax.jedit.*;
34: import javax.swing.text.Segment;
35:
36: /**
37: * IDL token marker.
38: *
39: * @author Slava Pestov
40: * @author Juha Lindfors
41: * @version $Id: IDLTokenMarker.java 1167 2008-01-15 18:49:05Z gtoffoli $
42: */
43: public class IDLTokenMarker extends CTokenMarker {
44: public IDLTokenMarker() {
45: super (true, getKeywords());
46: }
47:
48: public static KeywordMap getKeywords() {
49: if (idlKeywords == null) {
50: idlKeywords = new KeywordMap(false);
51:
52: idlKeywords.add("any", Token.KEYWORD3);
53: idlKeywords.add("attribute", Token.KEYWORD1);
54: idlKeywords.add("boolean", Token.KEYWORD3);
55: idlKeywords.add("case", Token.KEYWORD1);
56: idlKeywords.add("char", Token.KEYWORD3);
57: idlKeywords.add("const", Token.KEYWORD1);
58: idlKeywords.add("context", Token.KEYWORD1);
59: idlKeywords.add("default", Token.KEYWORD1);
60: idlKeywords.add("double", Token.KEYWORD3);
61: idlKeywords.add("enum", Token.KEYWORD3);
62: idlKeywords.add("exception", Token.KEYWORD1);
63: idlKeywords.add("FALSE", Token.LITERAL2);
64: idlKeywords.add("fixed", Token.KEYWORD1);
65: idlKeywords.add("float", Token.KEYWORD3);
66: idlKeywords.add("in", Token.KEYWORD1);
67: idlKeywords.add("inout", Token.KEYWORD1);
68: idlKeywords.add("interface", Token.KEYWORD1);
69: idlKeywords.add("long", Token.KEYWORD3);
70: idlKeywords.add("module", Token.KEYWORD1);
71: idlKeywords.add("Object", Token.KEYWORD3);
72: idlKeywords.add("octet", Token.KEYWORD3);
73: idlKeywords.add("oneway", Token.KEYWORD1);
74: idlKeywords.add("out", Token.KEYWORD1);
75: idlKeywords.add("raises", Token.KEYWORD1);
76: idlKeywords.add("readonly", Token.KEYWORD1);
77: idlKeywords.add("sequence", Token.KEYWORD3);
78: idlKeywords.add("short", Token.KEYWORD3);
79: idlKeywords.add("string", Token.KEYWORD3);
80: idlKeywords.add("struct", Token.KEYWORD3);
81: idlKeywords.add("switch", Token.KEYWORD1);
82: idlKeywords.add("TRUE", Token.LITERAL2);
83: idlKeywords.add("typedef", Token.KEYWORD3);
84: idlKeywords.add("unsigned", Token.KEYWORD3);
85: idlKeywords.add("union", Token.KEYWORD3);
86: idlKeywords.add("void", Token.KEYWORD3);
87: idlKeywords.add("wchar", Token.KEYWORD3);
88: idlKeywords.add("wstring", Token.KEYWORD3);
89: }
90: return idlKeywords;
91: }
92:
93: // private members
94: private static KeywordMap idlKeywords;
95: }
|