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 embedded into a parser construct, and
later be assigned the complete parser as a whole, for recursive use.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteStoring(Translet.State<R> s, Event e, Location<XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<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".voidsetSub(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.ParserReverse the parsing process (as far as possible) and deliver a string representation which when parsed delivered the parse result.- Specified by:
unparsein classTranslet.Parser<R>
-
stripOpt
Description copied from class:Translet.ParserReturns the first nested parser which is NOT anTranslet.OptionParser.- Overrides:
stripOptin classTranslet.Parser<R>
-
executeStoring
public void executeStoring(Translet.State<R> s, Event e, Location<XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg) Description copied from class:Translet.ParserExecute the store operation represented by "this" parser.- Overrides:
executeStoringin classTranslet.Parser<R>
-
parseOneState
public Set<Translet.State<R>> parseOneState(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Description copied from class:Translet.ParserCalculate 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:
parseOneStatein classTranslet.Parser<R>
-
name
Description copied from class:Translet.ParserReturns a user-readable text representation. This is in most cases, but not always, source text to construct the parser.- Specified by:
namein classTranslet.Parser<R>- Parameters:
full- whether storage constructs do appear in the rendering.names- a map for managing the renderings of recursive calls
-