|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.umlv.tatoo.runtime.tools.builder.ParserBuilder<T,N,P,V>
public class ParserBuilder<T,N,P,V>
Constructor Summary | |
---|---|
protected |
ParserBuilder(ParserTable<T,N,P,V> table)
|
Method Summary | ||
---|---|---|
protected ParserErrorRecoveryPolicy<T,N,P,V> |
createNoErrorRecoveryPolicy()
Overrides this method if you want to change the warning reporter used by the no error recovery policy. |
|
Parser<T,N,P,V> |
createParser()
|
|
static
|
createParserBuilder(ParserTable<T,N,P,V> table)
|
|
SimpleParser<T> |
createSimpleParser()
|
|
BranchingParserListener<? super T> |
getBranchingParserListener()
|
|
ErrorRecoveryListener<? super T,? super N> |
getErrorRecoveryListener()
|
|
LookaheadMap<? extends T,? super V> |
getLookaheadMap()
|
|
ParserErrorRecoveryPolicy<T,N,P,V> |
getParserErrorRecoveryPolicy()
|
|
ParserListener<? super T,? super N,? super P> |
getParserListener()
|
|
ParserTable<T,N,P,V> |
getParserTable()
Returns the parser table. |
|
N |
getStart()
Returns the starting non termianl of the grammar that will be used to start the parsing. |
|
V |
getVersion()
Returns the version of the grammar that will be used during parsing. |
|
ParserBuilder<T,N,P,V> |
setBranchingParserListener(BranchingParserListener<? super T> branchingListener)
optional (default null) |
|
static
|
setEnumLookaheadMap(ParserBuilder<T,N,P,V> builder)
parser table must be set before calling this method. |
|
ParserBuilder<T,N,P,V> |
setHashLookaheadMap()
parser table and version (or default) must be set before calling this method. |
|
ParserBuilder<T,N,P,V> |
setLookaheadMap(LookaheadMap<? extends T,? super V> lookaheadMap)
optional (default is no lookahead map) |
|
ParserBuilder<T,N,P,V> |
setParserErrorRecoveryListener(ErrorRecoveryListener<? super T,? super N> errorRecoveryListener)
optional (default is no error recovery) |
|
ParserBuilder<T,N,P,V> |
setParserErrorRecoveryPolicy(ParserErrorRecoveryPolicy<T,N,P,V> policy)
Set the paraesr error recovery policy. |
|
ParserBuilder<T,N,P,V> |
setParserListener(ParserListener<? super T,? super N,? super P> listener)
optional (default prints actions on standard error) |
|
ParserBuilder<T,N,P,V> |
setStart(N start)
Set the non terminal that will be used to start the parsing. |
|
ParserBuilder<T,N,P,V> |
setVersion(V version)
Set the version of the grammar that will be use to start the parsing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ParserBuilder(ParserTable<T,N,P,V> table)
Method Detail |
---|
public static <T,N,P,V> ParserBuilder<T,N,P,V> createParserBuilder(ParserTable<T,N,P,V> table)
public Parser<T,N,P,V> createParser()
public SimpleParser<T> createSimpleParser()
protected ParserErrorRecoveryPolicy<T,N,P,V> createNoErrorRecoveryPolicy()
ParserErrorRecoveryPolicy.getNoErrorRecoveryPolicy(ParserWarningReporter)
public ParserBuilder<T,N,P,V> setParserErrorRecoveryListener(ErrorRecoveryListener<? super T,? super N> errorRecoveryListener)
errorRecoveryListener
- public ParserBuilder<T,N,P,V> setParserListener(ParserListener<? super T,? super N,? super P> listener)
listener
- public ParserBuilder<T,N,P,V> setBranchingParserListener(BranchingParserListener<? super T> branchingListener)
branchingListener
- branching listenerpublic ParserBuilder<T,N,P,V> setLookaheadMap(LookaheadMap<? extends T,? super V> lookaheadMap)
lookaheadMap
- public ParserBuilder<T,N,P,V> setHashLookaheadMap()
public static <T extends Enum<T>,N,P,V extends Enum<V>> ParserBuilder<T,N,P,V> setEnumLookaheadMap(ParserBuilder<T,N,P,V> builder)
public ParserBuilder<T,N,P,V> setParserErrorRecoveryPolicy(ParserErrorRecoveryPolicy<T,N,P,V> policy)
policy
- an error recovery policy.
public ParserBuilder<T,N,P,V> setStart(N start)
start
- a start non terminal.
setVersion(Object)
,
getStart()
public ParserBuilder<T,N,P,V> setVersion(V version)
version
- the parsing version,
if null the default version will be used.
setStart(Object)
,
getVersion()
public ErrorRecoveryListener<? super T,? super N> getErrorRecoveryListener()
public ParserListener<? super T,? super N,? super P> getParserListener()
public BranchingParserListener<? super T> getBranchingParserListener()
public LookaheadMap<? extends T,? super V> getLookaheadMap()
public ParserErrorRecoveryPolicy<T,N,P,V> getParserErrorRecoveryPolicy()
public N getStart()
setStart(Object)
public ParserTable<T,N,P,V> getParserTable()
public V getVersion()
setVersion(Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |