|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.umlv.tatoo.runtime.lexer.rules.Action<R>
R
- type of rules.public class Action<R>
This class contains the live data used to process
one rule of the lexer.
A rule data is break down in one regular expression
and one optional regular expresison represented by the
class RuleData
.
The state of the automaton of a regular expression
is represented by the class DFA
.
RuleData
,
DFA
Constructor Summary | |
---|---|
Action()
Creates an action. |
Method Summary | |
---|---|
R |
getRule()
Returns the rule of the current action. |
int |
lastMatch()
Returns the last buffer position that has matched the rule. |
void |
reset(R rule,
RuleData ruleData)
Reuse the action with a new rule and its data. |
boolean |
step(int a)
Steps by one letter on the internal automaton and returns false if the letter is rejected or accepted by the automaton. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Action()
Method Detail |
---|
public void reset(R rule, RuleData ruleData)
rule
- the lexer ruleruleData
- the data generated by Tatoo lexer containing
the two regular expressions associated with the rulepublic boolean step(int a)
a
- the letter
public int lastMatch()
public R getRule()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |