|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.umlv.tatoo.runtime.lexer.Lexer<R,B>
R - type of rules.B - type of the buffer.public final class Lexer<R extends Rule,B extends CharacterBuffer>
A Lexer represents a lexer process.
| Method Summary | ||
|---|---|---|
void |
close()
|
|
static
|
createLexer(B buffer,
LexerListener<R,? super B> listener,
R[] rules,
ErrorHandler<? super B> errorHandler)
Creates a new lexer process with a fix set of active rules. |
|
static
|
createLexer(B buffer,
LexerListener<R,? super B> listener,
RuleActivator<R> activator)
Creates a new lexer process with default error handling. |
|
static
|
createLexer(B buffer,
LexerListener<R,? super B> listener,
RuleActivator<R> activator,
ErrorHandler<? super B> errorHandler)
Creates a new lexer process. |
|
static
|
createLexer(E buffer,
LexerListener<R,? super E> listener,
R[] rules)
Creates a new lexer process with a fix set of active rules and a default error handler. |
|
void |
reset(B buffer)
Resets the lexer processs with a new character buffer to process. |
|
void |
step()
Processes next character of the input stream. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <R extends Rule,B extends CharacterBuffer> Lexer<R,B> createLexer(B buffer,
LexerListener<R,? super B> listener,
RuleActivator<R> activator,
ErrorHandler<? super B> errorHandler)
R - type of rules.B - type of the buffer.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 ruleserrorHandler - the error handler to be used
public static <R extends Rule,B extends CharacterBuffer> Lexer<R,B> createLexer(B buffer,
LexerListener<R,? super B> listener,
R[] rules,
ErrorHandler<? super B> errorHandler)
R - type of rules.B - type of the buffer.buffer - character buffer the lexer has to processlistener - the token listener called after each token recognitionrules - set of ruleserrorHandler - the error handler to be used
public static <R extends Rule,B extends CharacterBuffer & ErrorContextBuffer<?>> Lexer<R,B> createLexer(B buffer,
LexerListener<R,? super B> listener,
RuleActivator<R> activator)
R - type of rules.B - type of the huffer.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 rules
public static <R extends Rule,E extends CharacterBuffer & ErrorContextBuffer<?>> Lexer<R,E> createLexer(E buffer,
LexerListener<R,? super E> listener,
R[] rules)
R - type of rules.E - type of the buffer with an error handling macanism.buffer - character buffer the lexer has to processlistener - the token listener called after each token recognitionrules - set of rules
public void reset(B buffer)
buffer - the new character buffer to processpublic void step()
LexingException - if the lexer encounters an unexpected character or end of file
before a token has been unambiguously recognizedpublic void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||