com.aptana.ide.lexer
Interface ITokenList

All Known Subinterfaces:
ICodeBasedTokenList, IRegexTokenList
All Known Implementing Classes:
AsciiTokenList, CodeBasedTokenList, CSSTokenList, HTMLTokenList, JSCommentTokenList, JSTokenList, MatcherTokenList, RegexTokenList, ScriptDocTokenList, TokenList, UnicodeTokenList, XMLTokenList

public interface ITokenList

Author:
Kevin Lindsey

Method Summary
 int add(IToken token)
          Add a new token to the list
 IToken createToken()
          Create a new token
 IToken get(int index)
          Get the token at the specified index
 java.lang.String getCurrentGroup()
          Returns the name of the group that is current active
 java.lang.String[] getGroupNames()
          getGroupNames
 int[] getIgnoreSet()
          Get the list of Token types to skip when scanning the source text
 java.lang.String getLanguage()
          Get the language associated with this token list
 boolean isSealed()
          This indicates whether this token list can be modified or if it has been sealed
 void seal()
          Build the regexes for each token in this list
 void setCurrentGroup(int index)
           
 void setCurrentGroup(java.lang.String groupName)
          Set the currently active lexer group
 void setIgnoreSet(int[] set)
          Set the list of Token types to skip when scanning the source text
 int size()
          Get the number of tokens in this list
 

Method Detail

get

IToken get(int index)
Get the token at the specified index

Parameters:
index - The index of the token to retrieve
Returns:
The Token at the specified index

getCurrentGroup

java.lang.String getCurrentGroup()
Returns the name of the group that is current active

Returns:
Returns the current group name

setCurrentGroup

void setCurrentGroup(java.lang.String groupName)
                     throws LexerException
Set the currently active lexer group

Parameters:
groupName - The name of the group to activate
Throws:
LexerException

setCurrentGroup

void setCurrentGroup(int index)
Parameters:
index -

getGroupNames

java.lang.String[] getGroupNames()
getGroupNames

Returns:
String[]

getIgnoreSet

int[] getIgnoreSet()
Get the list of Token types to skip when scanning the source text

Returns:
The set of token type to skip

setIgnoreSet

void setIgnoreSet(int[] set)
Set the list of Token types to skip when scanning the source text

Parameters:
set - The set of token type to skip

getLanguage

java.lang.String getLanguage()
Get the language associated with this token list

Returns:
The token list's language

add

int add(IToken token)
Add a new token to the list

Parameters:
token - the token to add to this list
Returns:
The new token index

createToken

IToken createToken()
Create a new token

Returns:
IToken

seal

void seal()
          throws LexerException
Build the regexes for each token in this list

Throws:
LexerException

size

int size()
Get the number of tokens in this list

Returns:
The token count

isSealed

boolean isSealed()
This indicates whether this token list can be modified or if it has been sealed

Returns:
Returns true if this list is no longer modifiable