public class DefaultAction extends java.lang.Object implements FaAction
mergeWith(monq.jfa.FaAction)
. The intention is that this
never
survives in a DFA compilation. Should it do nevertheless, the default
action is called in case this
is called.Constructor and Description |
---|
DefaultAction(FaAction dflt) |
Modifier and Type | Method and Description |
---|---|
void |
invoke(java.lang.StringBuilder yytext,
int start,
DfaRun runner)
is called by methods of
DfaRun in case of a
match. |
FaAction |
mergeWith(FaAction other)
always returns
other . |
static DefaultAction |
nullInstance()
returns an instance with no default.
|
java.lang.String |
toString() |
public DefaultAction(FaAction dflt)
public static DefaultAction nullInstance()
NullPointerException
.public void invoke(java.lang.StringBuilder yytext, int start, DfaRun runner) throws CallbackException
FaAction
is called by methods of DfaRun
in case of a
match. Parameter yytext
contains the matching text
from position start
onwards. The callback may change
the whole of yytext
, but the under most
circumstances, only the matching text should be
changed. Parameter runner
is the DfaRun
object which called this function. Of interest are its fields
DfaRun.clientData
and DfaRun.collect
.
invoke
in interface FaAction
CallbackException
public java.lang.String toString()
toString
in class java.lang.Object