|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.umlv.tatoo.runtime.tools.builder.Builder.ExpertLexerBuilder<R,B>
R - type of rules.B - type of the buffer.public static class Builder.ExpertLexerBuilder<R,B extends LexerBuffer>
A lexer builder that configures the error policy and lifecycle handler of the lexer.
| Method Summary | ||
|---|---|---|
Lexer<B> |
create()
Creates a lexer with all values. |
|
Builder.ExpertLexerBuilder<R,B> |
defaultErrorPolicy(LexerErrorForwarder<B> forwarder,
LexerWarningReporter<B> lexerWarningReporter)
Configures the lexer error recovery policy with the default policy. |
|
Builder.ExpertLexerBuilder<R,B> |
defaultErrorPolicy(LexerWarningReporter<B> lexerWarningReporter)
Configures the lexer error recovery policy with the default policy. |
|
Builder.ExpertLexerBuilder<R,B> |
errorPolicy(LexerErrorRecoveryPolicy<R,B> errorPolicy)
Set a pluggable error recovery policy. |
|
Builder.ExpertLexerBuilder<R,B> |
lifecycleHandler(LifecycleHandler<B> lifecycleHandler)
Configures a lifecycle handler for the lexer. |
|
Builder.ExpertLexerBuilder<R,B> |
noErrorPolicy()
Configures the lexer error recovery policy to throw a lexing exception if a character is not recognized. |
|
|
parser(Parser<T,N,P,V> parser)
Asks to configure the lexer with an existing parser. |
|
|
parser(Parser<T,N,P,V> parser,
ToolsTable<R,T> toolsTable)
Asks to configure the lexer with an existing parser. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Builder.ExpertLexerBuilder<R,B> lifecycleHandler(LifecycleHandler<B> lifecycleHandler)
lifecycleHandler - a lifecycle handler.
public Builder.ExpertLexerBuilder<R,B> noErrorPolicy()
errorPolicy(LexerErrorRecoveryPolicy),
NoLexerErrorRecoveryPolicy
public Builder.ExpertLexerBuilder<R,B> defaultErrorPolicy(LexerErrorForwarder<B> forwarder,
LexerWarningReporter<B> lexerWarningReporter)
forwarder - an error forwarderlexerWarningReporter - a warning reporter called each time a character
is discarded.
errorPolicy(LexerErrorRecoveryPolicy),
defaultErrorPolicy(LexerWarningReporter),
DefaultLexerErrorRecoveryPolicypublic Builder.ExpertLexerBuilder<R,B> defaultErrorPolicy(LexerWarningReporter<B> lexerWarningReporter)
lexerWarningReporter - a warning reporter called each time a character
is discarded.
errorPolicy(LexerErrorRecoveryPolicy),
defaultErrorPolicy(LexerErrorForwarder, LexerWarningReporter),
DefaultLexerWarningReporterpublic Builder.ExpertLexerBuilder<R,B> errorPolicy(LexerErrorRecoveryPolicy<R,B> errorPolicy)
errorPolicy - an error recovery policy
public <T,N,P,V> Builder.AnalyzerFromParserBuilder<R,B,T,N,P,V> parser(Parser<T,N,P,V> parser,
ToolsTable<R,T> toolsTable)
T - type of terminals.N - type of non-terminalsP - type of productions.V - type of versions.parser - a parser.toolsTable - a tools table or null.
public <T,N,P,V> Builder.AnalyzerFromParserBuilder<R,B,T,N,P,V> parser(Parser<T,N,P,V> parser)
parser(parser, null).
T - type of terminals.N - type of non-terminals.P - type of productions.V - type of versions.parser - a parser.
public Lexer<B> create()
default one
is used with default warning reporter.
Lexer.createLexer(LexerTable, LexerBuffer, LexerListener, RuleActivator, LifecycleHandler, LexerErrorRecoveryPolicy)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||