View Javadoc

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