01: package net.xoetrope.builder.editor.syntaxhighlight;
02:
03: /*
04: * IDLTokenMarker.java - IDL token marker
05: * Copyright (C) 1999 Slava Pestov
06: * Copyright (C) 1999 Juha Lindfors
07: *
08: * You may use and modify this package for any purpose. Redistribution is
09: * permitted, in both source and binary form, provided that this notice
10: * remains intact in all source distributions of this package.
11: */
12:
13: import javax.swing.text.Segment;
14:
15: /**
16: * IDL token marker.
17: *
18: * @author Slava Pestov
19: * @author Juha Lindfors
20: * @version $Id: IDLTokenMarker.java,v 1.22 2005/01/05 17:20:48 luano Exp $
21: */
22: public class IDLTokenMarker extends CTokenMarker {
23: public IDLTokenMarker() {
24: super (true, getKeywords());
25: }
26:
27: public static KeywordMap getKeywords() {
28: if (idlKeywords == null) {
29: idlKeywords = new KeywordMap(false);
30:
31: idlKeywords.add("any", Token.KEYWORD3);
32: idlKeywords.add("attribute", Token.KEYWORD1);
33: idlKeywords.add("boolean", Token.KEYWORD3);
34: idlKeywords.add("case", Token.KEYWORD1);
35: idlKeywords.add("char", Token.KEYWORD3);
36: idlKeywords.add("const", Token.KEYWORD1);
37: idlKeywords.add("context", Token.KEYWORD1);
38: idlKeywords.add("default", Token.KEYWORD1);
39: idlKeywords.add("double", Token.KEYWORD3);
40: idlKeywords.add("enum", Token.KEYWORD3);
41: idlKeywords.add("exception", Token.KEYWORD1);
42: idlKeywords.add("FALSE", Token.LITERAL2);
43: idlKeywords.add("fixed", Token.KEYWORD1);
44: idlKeywords.add("float", Token.KEYWORD3);
45: idlKeywords.add("in", Token.KEYWORD1);
46: idlKeywords.add("inout", Token.KEYWORD1);
47: idlKeywords.add("interface", Token.KEYWORD1);
48: idlKeywords.add("long", Token.KEYWORD3);
49: idlKeywords.add("module", Token.KEYWORD1);
50: idlKeywords.add("Object", Token.KEYWORD3);
51: idlKeywords.add("octet", Token.KEYWORD3);
52: idlKeywords.add("oneway", Token.KEYWORD1);
53: idlKeywords.add("out", Token.KEYWORD1);
54: idlKeywords.add("raises", Token.KEYWORD1);
55: idlKeywords.add("readonly", Token.KEYWORD1);
56: idlKeywords.add("sequence", Token.KEYWORD3);
57: idlKeywords.add("short", Token.KEYWORD3);
58: idlKeywords.add("string", Token.KEYWORD3);
59: idlKeywords.add("struct", Token.KEYWORD3);
60: idlKeywords.add("switch", Token.KEYWORD1);
61: idlKeywords.add("TRUE", Token.LITERAL2);
62: idlKeywords.add("typedef", Token.KEYWORD3);
63: idlKeywords.add("unsigned", Token.KEYWORD3);
64: idlKeywords.add("union", Token.KEYWORD3);
65: idlKeywords.add("void", Token.KEYWORD3);
66: idlKeywords.add("wchar", Token.KEYWORD3);
67: idlKeywords.add("wstring", Token.KEYWORD3);
68: }
69: return idlKeywords;
70: }
71:
72: // private members
73: private static KeywordMap idlKeywords;
74: }
|