Package | Description |
---|---|
org.netbeans.api.lexer |
The entrance point into Lexer API is
TokenHierarchy class with
its static methods that provide its instance for the given input source. |
org.netbeans.spi.lexer |
The main abstract class in the Lexer SPI that must be implemented
is
LanguageHierarchy that mainly defines
set of token ids and token categories for the new language
and its Lexer . |
Modifier and Type | Method and Description |
---|---|
static <I extends CharSequence,T extends TokenId> |
TokenHierarchy.create(I inputText,
boolean copyInputText,
Language<T> language,
Set<T> skipTokenIds,
InputAttributes inputAttributes)
Create token hierarchy for the given input text.
|
static <I extends CharSequence> |
TokenHierarchy.create(I inputText,
Language<?> language)
Create token hierarchy for the given non-mutating input text (for example
java.lang.String).
|
static <I extends Reader,T extends TokenId> |
TokenHierarchy.create(I inputReader,
Language<T> language,
Set<T> skipTokenIds,
InputAttributes inputAttributes)
Create token hierarchy for the given reader.
|
static <D extends Document> |
TokenHierarchy.get(D doc)
Get or create mutable token hierarchy for the given swing document.
|
TokenHierarchy<?> |
TokenHierarchyEvent.tokenHierarchy()
Get source of this event as a token hierarchy instance.
|
Modifier and Type | Method and Description |
---|---|
abstract int |
Token.offset(TokenHierarchy<?> tokenHierarchy)
Get the offset at which this token is present in the input
or
-1 if this token is flyweight (and therefore does not store offset). |
Modifier and Type | Method and Description |
---|---|
TokenHierarchy<I> |
TokenHierarchyControl.tokenHierarchy()
Get token hierarchy managed by this control object.
|