public class LowerCase extends AbstractFaAction
implements an FaAction
which applies
Character.toLowerCase
to every character of the
match.
Hint: Instead of attaching this callback to the regular
expression "[A-Z]"
, rather use "[A-Z]+"
to save some callbacks.
Modifier and Type | Field and Description |
---|---|
static FaAction |
LOWERCASE
a predefined
FaAction with priority 0 which applies
Character.toLowerCase() to every character of the
match. |
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. |
mergeWith, setPriority
public static final FaAction LOWERCASE
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
.