|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - type of terminal.public interface SimpleParser<T>
| Method Summary | |
|---|---|
ActionReturn |
branchOnError(T terminal,
String message)
Signals to the parser an external error, (by example a lexer error) has occurred allowing the parser to try to branch (enter or exit from the current grammar). |
void |
close()
Indicates to the parser that there is no more terminals. |
Set<? extends T> |
getLookahead()
Returns the set of terminals which don't lead to an error for the current state. |
LookaheadMap<? extends T,?> |
getLookaheadMap()
Returns the lookahead map. |
ReadOnlyIntStack |
getStateStack()
Returns a view on the current parser state stack. |
ParserTable<T,?,?,?> |
getTable()
Returns the table associated with the parser. |
boolean |
isBranchingParser()
Returns true if the current parser is a branching parser |
boolean |
push(T next)
Performs the actions induced by a particular terminal. |
void |
reset()
Resets the parser and clears the state stack. |
void |
step(T next)
Performs the actions induced by a particular terminal. |
| Method Detail |
|---|
boolean isBranchingParser()
boolean push(T next)
step(Object).
If you want to call this method without taking into account the return value
use next(terminal) instead.
next - the new terminal
void step(T next)
push(Object)
followed by a runtime check on step return value.
next - the terminal.
IllegalStateException - if lexer error policy ask for a relexing.push(Object),
ParserForwarder.forwardUnexpectedCharacter(fr.umlv.tatoo.runtime.lexer.Lexer)void reset()
void close()
Set<? extends T> getLookahead()
null if no lookahead states was provided
at construction of the parser.LookaheadMap<? extends T,?> getLookaheadMap()
null if no lookahead
map was provided at construction of the parser.ReadOnlyIntStack getStateStack()
ParserTable<T,?,?,?> getTable()
ActionReturn branchOnError(T terminal,
String message)
isBranchingParser(),
ParserErrorRecoveryPolicy.recoverOnError(Parser, IntArrayList, Object, String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||