|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.umlv.tatoo.runtime.lexer.rules.ActionProcessor<R>
R - type of rules.public class ActionProcessor<R>
| Constructor Summary | |
|---|---|
ActionProcessor(LexerTable<R> lexerTable)
Creates a new lexer process. |
|
| Method Summary | |
|---|---|
LexerTable<R> |
getLexerTable()
Returns the rule tables for this process |
void |
reset()
Reset the action processor. |
ProcessReturn |
step(LexerBuffer buffer,
R... rules)
Processes available characters from the input stream. |
ProcessReturn |
stepClose()
This method is called after step(fr.umlv.tatoo.runtime.buffer.LexerBuffer, R...) has returned
MORE and end-of-file is reached |
int |
tokenLength()
Returns the token length, upon successful analyze. |
R |
winningRule()
Returns the rule that matched, upon successful analyze. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActionProcessor(LexerTable<R> lexerTable)
lexerTable - the rule tables for this process| Method Detail |
|---|
public void reset()
public ProcessReturn step(LexerBuffer buffer,
R... rules)
buffer - the lexer buffer.
MORE if more characters are needed to perform the match,
ERROR, if an error occurred
and TOKEN if a new token is spawned.public ProcessReturn stepClose()
step(fr.umlv.tatoo.runtime.buffer.LexerBuffer, R...) has returned
MORE and end-of-file is reached
NOTHING if no new token is available,
ERROR, if an error occurred
and TOKEN if a new token is spawned. In this case;
if characters are back available in the buffer, step(fr.umlv.tatoo.runtime.buffer.LexerBuffer, R...) must be
called again until it returns MORE, and then
this method has to be called againpublic R winningRule()
step(fr.umlv.tatoo.runtime.buffer.LexerBuffer, R...) or stepClose() has returned
ProcessReturn.TOKEN
public int tokenLength()
step(fr.umlv.tatoo.runtime.buffer.LexerBuffer, R...) or stepClose() has returned
ProcessReturn.TOKEN
public LexerTable<R> getLexerTable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||