public class Run extends AbstractFaAction
runs several FaAction
objects, one after another.
Objects of this class contain a sequence of client
FaAction
s which are run one after another when
invoke()
is called. The first action in the sequence
will see the original TextStore
object as prepared
by the calling DfaRun
. The second and further client
actions will get passed a TextStore
which contains
only one part, namely the text resulting from the application of
the previous actions. The resulting text in the output will be
exactly what the last action leaves there.
Constructor and Description |
---|
Run(FaAction a0) |
Run(FaAction a0,
FaAction a1) |
Run(FaAction a0,
FaAction a1,
FaAction a2) |
Run(FaAction a0,
FaAction a1,
FaAction a2,
FaAction a3) |
Modifier and Type | Method and Description |
---|---|
Run |
add(FaAction a)
adds the given action
a to the list of actions to
execute when invoke is called. |
void |
invoke(java.lang.StringBuilder out,
int start,
DfaRun r)
is called by methods of
DfaRun in case of a
match. |
mergeWith, setPriority
public Run(FaAction a0)
public Run add(FaAction a)
adds the given action a
to the list of actions to
execute when invoke
is called.
public void invoke(java.lang.StringBuilder out, int start, DfaRun r) 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
.
CallbackException