|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.umlv.tatoo.runtime.lexer.Lexer<B>
B
- type of the buffer.public abstract class Lexer<B extends LexerBuffer>
A Lexer
represents a lexer process.
LexerBuilder
Nested Class Summary | |
---|---|
static class |
Lexer.LexerImpl<R,B extends LexerBuffer>
|
Method Summary | ||
---|---|---|
static
|
createLexer(LexerTable<R> lexerTable,
B buffer,
LexerListener<? super R,? super B> listener,
RuleActivator<R> activator,
LifecycleHandler<B> lifecycleHandler,
LexerErrorRecoveryPolicy<R,B> policy)
Creates a new lexer process. |
|
abstract RuleActivator<?> |
getActivator()
returns the RuleActivator used by this Lexer |
|
B |
getBuffer()
returns the Buffer used by this Lexer |
|
abstract LexerErrorRecoveryPolicy<?,?> |
getLexerErrorRecoveryPolicy()
Returns the LexerErrorRecoveryPolicy used by this lexer |
|
abstract LexerListener<?,?> |
getLexerListener()
Returns the LexerListener this lexer notifies events to |
|
LifecycleHandler<B> |
getLifecycleHandler()
Returns the LifecycleHandler for this lexer |
|
abstract void |
reset(B buffer)
Reset the lexer to perform a new analysis. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.umlv.tatoo.runtime.lexer.SimpleLexer |
---|
close, run, step |
Method Detail |
---|
public static <R,B extends LexerBuffer> Lexer<B> createLexer(LexerTable<R> lexerTable, B buffer, LexerListener<? super R,? super B> listener, RuleActivator<R> activator, LifecycleHandler<B> lifecycleHandler, LexerErrorRecoveryPolicy<R,B> policy)
R
- type of rules.B
- type of buffer.lexerTable
- table representing automata used by the lexer.buffer
- character buffer the lexer has to processlistener
- the token listener called after each token recognitionactivator
- the rule activator called before each token recognition start to
determine the set of active ruleslifecycleHandler
- handler called when reset or close the lexer.
public B getBuffer()
public LifecycleHandler<B> getLifecycleHandler()
public abstract void reset(B buffer)
LifecycleHandler.handleReset(Lexer)
after the reset of the lexer.
public abstract RuleActivator<?> getActivator()
public abstract LexerListener<?,?> getLexerListener()
public abstract LexerErrorRecoveryPolicy<?,?> getLexerErrorRecoveryPolicy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |