public class Fail extends AbstractFaAction
implements an FaAction
which unconditionally throws a
CallbackException
with the message specified in the
constructor.
Constructor and Description |
---|
Fail(java.lang.String message)
create an action which fails with the given message.
|
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 Fail(java.lang.String message)
create an action which fails with the given message.
public void invoke(java.lang.StringBuilder out, 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
.
CallbackException
public java.lang.String toString()
toString
in class java.lang.Object