|
||||||||||
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 |
void |
reset()
Resets the parser and clears the state stack. |
SmartStepReturn |
smartStep(T next)
Performs the actions induced by a particular terminal. |
void |
step(T next)
Performs the actions induced by a particular terminal. |
Method Detail |
---|
boolean isBranchingParser()
SmartStepReturn smartStep(T next)
next
- the new terminal
void step(T next)
next
- the terminal.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 |