Package eu.bandm.tscore.base
Class Translet.Recursive<R>
java.lang.Object
eu.bandm.tscore.base.Translet.Parser<R>
eu.bandm.tscore.base.Translet.Recursive<R>
- Enclosing class:
- Translet
A placeholder which can be formandum into a parser construct, and
later be assigned the complete parser as a whole, for recursive use.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
executeStoring
(Translet.State<R> s, Event e, eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Execute the store operation represented by "this" parser.name
(boolean full, Map<Translet.Recursive, String> names) Returns a user-readable text representation.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.stripOpt()
Returns the first nested parser which is NOT anTranslet.OptionParser
.Reverse the parsing process (as far as possible) and deliver a string representation which when parsed delivered the parse result.Methods inherited from class eu.bandm.tscore.base.Translet.Parser
isTerminal, mparse, name, parseEpsilon, toString, toString
-
Field Details
-
sub
The parser to call whenever this parser shall become active. -
name
The optional name of this instance, only for messaging purposes.
-
-
Constructor Details
-
Recursive
Only constructor.
-
-
Method Details
-
setSub
Link this placeholder to the given Parser. -
unparse
Description copied from class:Translet.Parser
Reverse the parsing process (as far as possible) and deliver a string representation which when parsed delivered the parse result.- Specified by:
unparse
in classTranslet.Parser<R>
-
stripOpt
Description copied from class:Translet.Parser
Returns the first nested parser which is NOT anTranslet.OptionParser
.- Overrides:
stripOpt
in classTranslet.Parser<R>
-
executeStoring
public void executeStoring(Translet.State<R> s, Event e, eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Description copied from class:Translet.Parser
Execute the store operation represented by "this" parser.- Overrides:
executeStoring
in classTranslet.Parser<R>
-
parseOneState
public Set<Translet.State<R>> parseOneState(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Description copied from class:Translet.Parser
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". This method is specific to and overridden by the subclasses of Parser.- Specified by:
parseOneState
in classTranslet.Parser<R>
-
name
Description copied from class:Translet.Parser
Returns a user-readable text representation. This is in most cases, but not always, source text to construct the parser.- Specified by:
name
in classTranslet.Parser<R>
- Parameters:
full
- whether storage constructs do appear in the rendering.names
- a map for managing the renderings of recursive calls
-