public abstract class AbstractLexer extends net.sf.okapi.lib.extra.Component implements ILexer
| Constructor and Description |
|---|
AbstractLexer() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the current process.
|
protected boolean |
checkRule(LexerRule rule) |
protected boolean |
checkRule(LexerRule rule,
LocaleId language) |
void |
close()
Called after the lexer is done with extracting lexems.
|
LexerRules |
getRules()
Gets the current rules for this lexer.
|
boolean |
hasNext()
Indicates if there is a lexem extracted.
|
void |
init()
Initializes the lexer.
|
protected Class<? extends LexerRules> |
lexer_getRulesClass() |
protected abstract boolean |
lexer_hasNext() |
protected abstract void |
lexer_init() |
protected abstract Lexem |
lexer_next() |
protected abstract void |
lexer_open(String text,
LocaleId language,
Tokens tokens) |
Lexem |
next()
Gets the next lexem available.
|
void |
open(String text,
LocaleId language,
Tokens tokens)
Starts processing a string or a list of tokens, extracting lexems from them.
|
void |
setRules(LexerRules rules)
Sets new rules for this lexer.
|
exec, getDescription, getName, setDescription, setName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemaining, removeprotected abstract void lexer_init()
protected abstract boolean lexer_hasNext()
protected abstract Lexem lexer_next()
public void init()
ILexerpublic void cancel()
ILexerpublic void close()
ILexerpublic LexerRules getRules()
ILexerpublic boolean hasNext()
ILexerpublic void open(String text, LocaleId language, Tokens tokens)
ILexerpublic void setRules(LexerRules rules)
ILexerprotected boolean checkRule(LexerRule rule)
protected Class<? extends LexerRules> lexer_getRulesClass()
Copyright © 2018. All rights reserved.