public class Stop extends AbstractFaAction
implements an FaAction
which resets the input of the
calling DfaRun
to the empty string by calling
DfaRun.setIn(null)
. If the DfaRun
's
Dfa
has not defined an action to invoke at EOF, input
processing will stop immediatly after returning from this
action.
This action leaves the matching text untouched. To do something
with it, consider using a Run
action.
Constructor and Description |
---|
Stop(int priority)
use only if
STOP is not what you want, because you
have to specify a priority. |
Modifier and Type | Method and Description |
---|---|
void |
invoke(java.lang.StringBuilder out,
int start,
DfaRun runner)
is called by methods of
DfaRun in case of a
match. |
java.lang.String |
toString() |
mergeWith, setPriority
public static final FaAction STOP
public Stop(int priority)
STOP
is not what you want, because you
have to specify a priority.public void invoke(java.lang.StringBuilder out, int start, DfaRun runner)
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
.
public java.lang.String toString()
toString
in class java.lang.Object