public static final class Translet.Recursive<R> extends Translet.Parser<R>
Modifier and Type | Field and Description |
---|---|
protected @Opt String |
name
The optional name of this instance, only for messaging purposes.
|
protected @Opt Translet.Parser<R> |
sub
The parser to call whenever this parser shall become active.
|
Constructor and Description |
---|
Recursive(@Opt String name)
Only constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
executeStoring(Translet.State<R> s,
Event e,
Location<XMLDocumentIdentifier> loc,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
Execute the store operation represented by "this" parser.
|
Format |
name(boolean full,
Map<Translet.Recursive,String> names)
Returns a user-readable text representation.
|
Set<Translet.State<R>> |
parseOneState(Translet.State<?> inState,
Set<Translet.Alternative> alternatives)
Calculate a set of possible successor states by applying this parser
to the incoming state and append all altenatives found underways to
the parameter "alternatives".
|
void |
setSub(Translet.Parser<R> sub)
Link this placeholder to the given Parser.
|
Translet.Parser<R> |
stripOpt()
Returns the first nested parser which is NOT an
Translet.OptionParser . |
String |
unparse(Object key)
Reverse the parsing process (as far as possible) and deliver a
string representation which when parsed delivered the parse result.
|
isTerminal, mparse, name, parseEpsilon, toString, toString, wrapResult
@Opt protected @Opt Translet.Parser<R> sub
public void setSub(Translet.Parser<R> sub)
public String unparse(Object key)
Translet.Parser
unparse
in class Translet.Parser<R>
public Translet.Parser<R> stripOpt()
Translet.Parser
Translet.OptionParser
.stripOpt
in class Translet.Parser<R>
public void executeStoring(Translet.State<R> s, Event e, Location<XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
Translet.Parser
executeStoring
in class Translet.Parser<R>
public Set<Translet.State<R>> parseOneState(Translet.State<?> inState, Set<Translet.Alternative> alternatives)
Translet.Parser
parseOneState
in class Translet.Parser<R>
public Format name(boolean full, Map<Translet.Recursive,String> names)
Translet.Parser
name
in class Translet.Parser<R>
full
- whether storage constructs do appear in the rendering.names
- a map for managing the renderings of recursive calls